feat: api v2 reassign (#17460)
* adding input types and method to controller/service * add output types * add outputs and inputs * feat: reassign automatically * feat: reassign to user * e2e test for reassign * update platform libraries + experimental modules for jest * fix test --------- Co-authored-by: supalarry <[email protected]> Co-authored-by: Lauris Skraucis <[email protected]>
This commit is contained in:
12 files changed
+614
-12
No files matched your search
@@ -161,6 +161,9 @@ export { getTranslation };
|
||||
|
||||
export { updateNewTeamMemberEventTypes } from "@calcom/lib/server/queries";
|
||||
|
||||
export { roundRobinReassignment } from "@calcom/features/ee/round-robin/roundRobinReassignment";
|
||||
export { roundRobinManualReassignment } from "@calcom/features/ee/round-robin/roundRobinManualReassignment";
|
||||
|
||||
export { ErrorCode } from "@calcom/lib/errorCodes";
|
||||
|
||||
export { IcsFeedCalendarService };
|
||||
|
||||
@@ -4,5 +4,6 @@ export * from "./get-bookings.input";
|
||||
export * from "./reschedule-booking.input";
|
||||
export * from "./cancel-booking.input";
|
||||
export * from "./mark-absent.input";
|
||||
export * from "./reassign-to-user.input";
|
||||
export * from "./reschedule-booking-input.pipe";
|
||||
export * from "./cancel-booking-input.pipe";
|
||||
@@ -0,0 +1,13 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { IsOptional, IsString } from "class-validator";
|
||||
|
||||
export class ReassignToUserBookingInput_2024_08_13 {
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@ApiProperty({
|
||||
example: "Host has to take another call",
|
||||
required: false,
|
||||
description: "Reason for reassigning the booking",
|
||||
})
|
||||
reason?: string;
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
IsObject,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsEmail,
|
||||
IsTimeZone,
|
||||
IsUrl,
|
||||
ValidateNested,
|
||||
@@ -291,3 +292,33 @@ export class CreateRecurringSeatedBookingOutput_2024_08_13 extends BaseBookingOu
|
||||
@Expose()
|
||||
recurringBookingUid!: string;
|
||||
}
|
||||
|
||||
class ReassignedToDto {
|
||||
@ApiProperty({ type: Number, example: 123 })
|
||||
@IsInt()
|
||||
@Expose()
|
||||
id!: number;
|
||||
|
||||
@ApiProperty({ type: String, example: "John Doe" })
|
||||
@IsString()
|
||||
@Expose()
|
||||
name!: string;
|
||||
|
||||
@ApiProperty({ type: String, example: "[email protected]" })
|
||||
@IsEmail()
|
||||
@Expose()
|
||||
email!: string;
|
||||
}
|
||||
|
||||
export class ReassignBookingOutput_2024_08_13 {
|
||||
@ApiProperty({ type: String, example: "booking_uid_123" })
|
||||
@IsString()
|
||||
@Expose()
|
||||
bookingUid!: string;
|
||||
|
||||
@ApiProperty({ type: ReassignedToDto })
|
||||
@ValidateNested()
|
||||
@Type(() => ReassignedToDto)
|
||||
@Expose()
|
||||
reassignedTo!: ReassignedToDto;
|
||||
}
|
||||
Reference in new issue
Block a user