feat: v2 teams CRUD (#18019)
* feat: teams endpoints * refactor: organization teams reuse team types * refactor: move team specific functions out of organizations-teams.repository * supporting files * regenerate docs * feat: stripe service to generate team creation checkout * refactor: request payment when creating a team * fix: tests * fix env * driveby: event type name and email booking fields * finish merge main
This commit is contained in:
1 parent
b0094bad2d
commit
a0f986f949
38 files changed
+2081
-446
No files matched your search
+7
-1
@@ -26,8 +26,10 @@ import {
|
||||
AddressFieldInput_2024_06_14,
|
||||
BooleanFieldInput_2024_06_14,
|
||||
CheckboxGroupFieldInput_2024_06_14,
|
||||
EmailFieldInput_2024_06_14,
|
||||
MultiEmailFieldInput_2024_06_14,
|
||||
MultiSelectFieldInput_2024_06_14,
|
||||
NameFieldInput_2024_06_14,
|
||||
NumberFieldInput_2024_06_14,
|
||||
PhoneFieldInput_2024_06_14,
|
||||
RadioGroupFieldInput_2024_06_14,
|
||||
@@ -103,7 +105,9 @@ export const CREATE_EVENT_SLUG_EXAMPLE = "learn-the-secrets-of-masterchief";
|
||||
Seats_2024_06_14,
|
||||
InputAttendeeAddressLocation_2024_06_14,
|
||||
InputAttendeePhoneLocation_2024_06_14,
|
||||
InputAttendeeDefinedLocation_2024_06_14
|
||||
InputAttendeeDefinedLocation_2024_06_14,
|
||||
NameFieldInput_2024_06_14,
|
||||
EmailFieldInput_2024_06_14
|
||||
)
|
||||
export class CreateEventTypeInput_2024_06_14 {
|
||||
@IsInt()
|
||||
@@ -162,6 +166,8 @@ export class CreateEventTypeInput_2024_06_14 {
|
||||
description:
|
||||
"Custom fields that can be added to the booking form when the event is booked by someone. By default booking form has name and email field.",
|
||||
oneOf: [
|
||||
{ $ref: getSchemaPath(NameFieldInput_2024_06_14) },
|
||||
{ $ref: getSchemaPath(EmailFieldInput_2024_06_14) },
|
||||
{ $ref: getSchemaPath(PhoneFieldInput_2024_06_14) },
|
||||
{ $ref: getSchemaPath(AddressFieldInput_2024_06_14) },
|
||||
{ $ref: getSchemaPath(TextFieldInput_2024_06_14) },
|
||||
|
||||
+7
-1
@@ -24,8 +24,10 @@ import {
|
||||
AddressFieldInput_2024_06_14,
|
||||
BooleanFieldInput_2024_06_14,
|
||||
CheckboxGroupFieldInput_2024_06_14,
|
||||
EmailFieldInput_2024_06_14,
|
||||
MultiEmailFieldInput_2024_06_14,
|
||||
MultiSelectFieldInput_2024_06_14,
|
||||
NameFieldInput_2024_06_14,
|
||||
NumberFieldInput_2024_06_14,
|
||||
PhoneFieldInput_2024_06_14,
|
||||
RadioGroupFieldInput_2024_06_14,
|
||||
@@ -101,7 +103,9 @@ import { Seats_2024_06_14 } from "./seats.input";
|
||||
Seats_2024_06_14,
|
||||
InputAttendeeAddressLocation_2024_06_14,
|
||||
InputAttendeePhoneLocation_2024_06_14,
|
||||
InputAttendeeDefinedLocation_2024_06_14
|
||||
InputAttendeeDefinedLocation_2024_06_14,
|
||||
NameFieldInput_2024_06_14,
|
||||
EmailFieldInput_2024_06_14
|
||||
)
|
||||
export class UpdateEventTypeInput_2024_06_14 {
|
||||
@IsOptional()
|
||||
@@ -163,6 +167,8 @@ export class UpdateEventTypeInput_2024_06_14 {
|
||||
description:
|
||||
"Custom fields that can be added to the booking form when the event is booked by someone. By default booking form has name and email field.",
|
||||
oneOf: [
|
||||
{ $ref: getSchemaPath(NameFieldInput_2024_06_14) },
|
||||
{ $ref: getSchemaPath(EmailFieldInput_2024_06_14) },
|
||||
{ $ref: getSchemaPath(PhoneFieldInput_2024_06_14) },
|
||||
{ $ref: getSchemaPath(AddressFieldInput_2024_06_14) },
|
||||
{ $ref: getSchemaPath(TextFieldInput_2024_06_14) },
|
||||
|
||||
@@ -8,3 +8,4 @@ export * from "./billing";
|
||||
export * from "./schedules";
|
||||
export * from "./event-types";
|
||||
export * from "./organizations";
|
||||
export * from "./teams";
|
||||
@@ -1,129 +1,13 @@
|
||||
import { ApiProperty as DocsProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||
import { Expose } from "class-transformer";
|
||||
import { IsBoolean, IsInt, IsOptional, IsString, IsUrl, Length } from "class-validator";
|
||||
import { IsInt, IsOptional } from "class-validator";
|
||||
|
||||
export class OrgTeamOutputDto {
|
||||
@IsInt()
|
||||
@Expose()
|
||||
@DocsProperty()
|
||||
readonly id!: number;
|
||||
import { TeamOutputDto } from "../../../teams/outputs";
|
||||
|
||||
export class OrgTeamOutputDto extends TeamOutputDto {
|
||||
@IsInt()
|
||||
@IsOptional()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly parentId?: number;
|
||||
|
||||
@IsString()
|
||||
@Length(1)
|
||||
@Expose()
|
||||
@DocsProperty()
|
||||
readonly name!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly slug?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly logoUrl?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly calVideoLogo?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly appLogo?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly appIconLogo?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly bio?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly hideBranding?: boolean;
|
||||
|
||||
@IsBoolean()
|
||||
@Expose()
|
||||
@DocsProperty()
|
||||
readonly isOrganization!: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly isPrivate?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly hideBookATeamMember?: boolean = false;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly metadata?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly theme?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly brandColor?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly darkBrandColor?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly bannerUrl?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly timeFormat?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional({ type: String, default: "Europe/London" })
|
||||
readonly timeZone?: string = "Europe/London";
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional({ type: String, default: "Sunday" })
|
||||
readonly weekStart?: string = "Sunday";
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./outputs";
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./team.output";
|
||||
@@ -0,0 +1,129 @@
|
||||
import { ApiProperty as DocsProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||
import { Expose } from "class-transformer";
|
||||
import { IsBoolean, IsInt, IsOptional, IsString, IsUrl, Length } from "class-validator";
|
||||
|
||||
export class TeamOutputDto {
|
||||
@IsInt()
|
||||
@Expose()
|
||||
@DocsProperty()
|
||||
readonly id!: number;
|
||||
|
||||
@IsInt()
|
||||
@IsOptional()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly parentId?: number;
|
||||
|
||||
@IsString()
|
||||
@Length(1)
|
||||
@Expose()
|
||||
@DocsProperty()
|
||||
readonly name!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly slug?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly logoUrl?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly calVideoLogo?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly appLogo?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly appIconLogo?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly bio?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly hideBranding?: boolean;
|
||||
|
||||
@IsBoolean()
|
||||
@Expose()
|
||||
@DocsProperty()
|
||||
readonly isOrganization!: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly isPrivate?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly hideBookATeamMember?: boolean = false;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly metadata?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly theme?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly brandColor?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly darkBrandColor?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly bannerUrl?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional()
|
||||
readonly timeFormat?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional({ type: String, default: "Europe/London" })
|
||||
readonly timeZone?: string = "Europe/London";
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Expose()
|
||||
@ApiPropertyOptional({ type: String, default: "Sunday" })
|
||||
readonly weekStart?: string = "Sunday";
|
||||
}
|
||||
Reference in new issue
Block a user