* Init organizations users GET endpoint * Fix get users endpoint * Add create user input * Add POST to organization user endpoint * Creating a user make email mandatory * Move DTOs out of platform types * Use plainToInstance for data filtering * POST create user and org membership * Add email check * Filter update user call * Add getOrg decorator to endpoints * Add update endpoint * Add delete endpoint * Fix merge changes to create new org user * Init tests * Send org signup email * Abstract username check * Implement email service * WIP E2E test * Rename methods * Update update org user DTO * Remove unused inputs * chore: add ApiProperty decorator to users class validators * Type fix * Update tests * chore: code review comments * chore: code review comments * chore: code review comments --------- Co-authored-by: Morgan Vernay <morgan@cal.com> Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
20 lines
643 B
TypeScript
20 lines
643 B
TypeScript
import { ApiProperty } from "@nestjs/swagger";
|
|
import { Transform } from "class-transformer";
|
|
import { IsOptional, Validate } from "class-validator";
|
|
|
|
import { SkipTakePagination } from "@calcom/platform-types";
|
|
|
|
import { IsEmailStringOrArray } from "../validators/isEmailStringOrArray";
|
|
|
|
export class GetUsersInput extends SkipTakePagination {
|
|
@IsOptional()
|
|
@Validate(IsEmailStringOrArray)
|
|
@Transform(({ value }: { value: string | string[] }) => {
|
|
return typeof value === "string" ? [value] : value;
|
|
})
|
|
@ApiProperty({
|
|
description: "The email address or an array of email addresses to filter by",
|
|
})
|
|
emails?: string[];
|
|
}
|