chore: add successRedirectUrl to event-types api v2 (#18136)
* chore: add successRedirectUrl to event-types api v2 * chore: add successRedirectUrl to event-types api v2 patch * chore: add successRedirectUrl to event-types api v2 patch
This commit is contained in:
+6
-1
@@ -235,6 +235,7 @@ describe("Organizations Event Types Endpoints", () => {
|
||||
|
||||
it("should create a collective team event-type", async () => {
|
||||
const body: CreateTeamEventTypeInput_2024_06_14 = {
|
||||
successRedirectUrl: "https://masterchief.com/argentina/flan/video/1234",
|
||||
title: "Coding consultation collective",
|
||||
slug: "coding-consultation collective",
|
||||
description: "Our team will review your codebase.",
|
||||
@@ -334,7 +335,7 @@ describe("Organizations Event Types Endpoints", () => {
|
||||
expect(data.hideCalendarEventDetails).toEqual(body.hideCalendarEventDetails);
|
||||
expect(data.lockTimeZoneToggleOnBookingPage).toEqual(body.lockTimeZoneToggleOnBookingPage);
|
||||
expect(data.color).toEqual(body.color);
|
||||
|
||||
expect(data.successRedirectUrl).toEqual("https://masterchief.com/argentina/flan/video/1234");
|
||||
collectiveEventType = responseBody.data;
|
||||
});
|
||||
});
|
||||
@@ -496,6 +497,7 @@ describe("Organizations Event Types Endpoints", () => {
|
||||
|
||||
const body: UpdateTeamEventTypeInput_2024_06_14 = {
|
||||
hosts: newHosts,
|
||||
successRedirectUrl: "https://new-url-success.com",
|
||||
};
|
||||
|
||||
return request(app.getHttpServer())
|
||||
@@ -507,6 +509,7 @@ describe("Organizations Event Types Endpoints", () => {
|
||||
expect(responseBody.status).toEqual(SUCCESS_STATUS);
|
||||
|
||||
const eventType = responseBody.data;
|
||||
expect(eventType.successRedirectUrl).toEqual("https://new-url-success.com");
|
||||
expect(eventType.title).toEqual(collectiveEventType.title);
|
||||
expect(eventType.hosts.length).toEqual(1);
|
||||
evaluateHost(eventType.hosts[0], newHosts[0]);
|
||||
@@ -526,6 +529,7 @@ describe("Organizations Event Types Endpoints", () => {
|
||||
const body: UpdateTeamEventTypeInput_2024_06_14 = {
|
||||
title: newTitle,
|
||||
hosts: newHosts,
|
||||
successRedirectUrl: "https://new-url-success-managed.com",
|
||||
};
|
||||
|
||||
return request(app.getHttpServer())
|
||||
@@ -569,6 +573,7 @@ describe("Organizations Event Types Endpoints", () => {
|
||||
expect(responseTeammate1Event?.title).toEqual(newTitle);
|
||||
|
||||
managedEventType = responseBody.data[0];
|
||||
expect(managedEventType.successRedirectUrl).toEqual("https://new-url-success-managed.com");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
+9
@@ -11,6 +11,7 @@ import {
|
||||
IsBoolean,
|
||||
IsOptional,
|
||||
Min,
|
||||
IsUrl,
|
||||
IsEnum,
|
||||
IsArray,
|
||||
ValidateNested,
|
||||
@@ -381,6 +382,14 @@ export class CreateEventTypeInput_2024_06_14 {
|
||||
@IsBoolean()
|
||||
@DocsPropertyOptional()
|
||||
hideCalendarEventDetails?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
@DocsPropertyOptional({
|
||||
description: "A valid URL where the booker will redirect to, once the booking is completed successfully",
|
||||
example: "https://masterchief.com/argentina/flan/video/9129412",
|
||||
})
|
||||
successRedirectUrl?: string;
|
||||
}
|
||||
|
||||
export enum HostPriority {
|
||||
|
||||
+9
@@ -15,6 +15,7 @@ import {
|
||||
IsArray,
|
||||
ArrayNotEmpty,
|
||||
ArrayUnique,
|
||||
IsUrl,
|
||||
} from "class-validator";
|
||||
|
||||
import { BookerLayouts_2024_06_14 } from "./booker-layouts.input";
|
||||
@@ -382,6 +383,14 @@ export class UpdateEventTypeInput_2024_06_14 {
|
||||
@IsBoolean()
|
||||
@DocsPropertyOptional()
|
||||
hideCalendarEventDetails?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
@DocsPropertyOptional({
|
||||
description: "A valid URL where the booker will redirect to, once the booking is completed successfully",
|
||||
example: "https://masterchief.com/argentina/flan/video/9129412",
|
||||
})
|
||||
successRedirectUrl?: string;
|
||||
}
|
||||
|
||||
export class UpdateTeamEventTypeInput_2024_06_14 extends UpdateEventTypeInput_2024_06_14 {
|
||||
|
||||
Reference in New Issue
Block a user