From 82629d72864c49801f3d0b0dab365dbcf405ce08 Mon Sep 17 00:00:00 2001 From: Somay Chauhan Date: Tue, 21 Jan 2025 15:12:47 +0530 Subject: [PATCH 1/2] feat: added zoom, office365-video as valid event-type locations --- apps/api/v2/swagger/documentation.json | 4 +++- docs/api-reference/v2/openapi.json | 2 +- .../lib/event-types/transformers/api-to-internal/locations.ts | 4 +++- packages/lib/event-types/transformers/internal/locations.ts | 2 ++ .../atom-api-transformers/transformApiEventTypeForAtom.ts | 2 +- .../event-types_2024_06_14/inputs/locations.input.ts | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json index 0de90fa49c9fa8..b8125624a2e195 100644 --- a/apps/api/v2/swagger/documentation.json +++ b/apps/api/v2/swagger/documentation.json @@ -7196,7 +7196,9 @@ "example": "cal-video", "enum": [ "cal-video", - "google-meet" + "google-meet", + "zoom", + "msteams" ] } }, diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json index 85acb066f8087a..1f853563235f54 100644 --- a/docs/api-reference/v2/openapi.json +++ b/docs/api-reference/v2/openapi.json @@ -6752,7 +6752,7 @@ "integration": { "type": "string", "example": "cal-video", - "enum": ["cal-video", "google-meet"] + "enum": ["cal-video", "google-meet", "zoom", "msteams"] } }, "required": ["type", "integration"] diff --git a/packages/lib/event-types/transformers/api-to-internal/locations.ts b/packages/lib/event-types/transformers/api-to-internal/locations.ts index 5ae02b6039f545..877aef868d572f 100644 --- a/packages/lib/event-types/transformers/api-to-internal/locations.ts +++ b/packages/lib/event-types/transformers/api-to-internal/locations.ts @@ -13,10 +13,12 @@ import type { const apiToInternalintegrationsMapping: Record< Integration_2024_06_14, - "integrations:daily" | "integrations:google:meet" + "integrations:daily" | "integrations:google:meet" | "integrations:zoom" | "integrations:office365_video" > = { "cal-video": "integrations:daily", "google-meet": "integrations:google:meet", + zoom: "integrations:zoom", + "office365-video": "integrations:office365_video", }; export function transformLocationsApiToInternal(inputLocations: InputLocation_2024_06_14[] | undefined) { diff --git a/packages/lib/event-types/transformers/internal/locations.ts b/packages/lib/event-types/transformers/internal/locations.ts index 3bcdf6dd98a748..2b6089e229c21d 100644 --- a/packages/lib/event-types/transformers/internal/locations.ts +++ b/packages/lib/event-types/transformers/internal/locations.ts @@ -3,6 +3,8 @@ import { z } from "zod"; const integrationsApiAvailable = { "cal-video": z.literal("integrations:daily"), "google-meet": z.literal("integrations:google:meet"), + zoom: z.literal("integrations:zoom"), + "office365-video": z.literal("integrations:office365_video"), }; // note(Lauris): these are read only aka they exist in database and are to be returned by a READ operation diff --git a/packages/platform/atoms/event-types/atom-api-transformers/transformApiEventTypeForAtom.ts b/packages/platform/atoms/event-types/atom-api-transformers/transformApiEventTypeForAtom.ts index bc7f7165d91cb2..f4f1deb3b9f130 100644 --- a/packages/platform/atoms/event-types/atom-api-transformers/transformApiEventTypeForAtom.ts +++ b/packages/platform/atoms/event-types/atom-api-transformers/transformApiEventTypeForAtom.ts @@ -318,7 +318,7 @@ function getLocations(locations: EventTypeOutput_2024_06_14["locations"]) { function isAtomSupportedLocation( location: EventTypeOutput_2024_06_14["locations"][number] ): location is InputLocation_2024_06_14 { - const supportedIntegrations = ["cal-video", "google-meet"]; + const supportedIntegrations = ["cal-video", "google-meet", "zoom", "office365-video"]; return ( location.type === "address" || diff --git a/packages/platform/types/event-types/event-types_2024_06_14/inputs/locations.input.ts b/packages/platform/types/event-types/event-types_2024_06_14/inputs/locations.input.ts index 8995f149bdb3c0..76473b1fad8b45 100644 --- a/packages/platform/types/event-types/event-types_2024_06_14/inputs/locations.input.ts +++ b/packages/platform/types/event-types/event-types_2024_06_14/inputs/locations.input.ts @@ -43,7 +43,7 @@ export class InputLinkLocation_2024_06_14 { public!: boolean; } -export const supportedIntegrations = ["cal-video", "google-meet"] as const; +export const supportedIntegrations = ["cal-video", "google-meet", "zoom", "office365-video"] as const; export type Integration_2024_06_14 = (typeof supportedIntegrations)[number]; export class InputIntegrationLocation_2024_06_14 { From 1d27a8b379203f33a78b5949f56a66830634ff03 Mon Sep 17 00:00:00 2001 From: Somay Chauhan Date: Tue, 21 Jan 2025 15:41:43 +0530 Subject: [PATCH 2/2] added docs --- apps/api/v2/swagger/documentation.json | 2 +- docs/api-reference/v2/openapi.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json index b8125624a2e195..f010439831c9fd 100644 --- a/apps/api/v2/swagger/documentation.json +++ b/apps/api/v2/swagger/documentation.json @@ -7198,7 +7198,7 @@ "cal-video", "google-meet", "zoom", - "msteams" + "office365-video" ] } }, diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json index 1f853563235f54..8767459782ae63 100644 --- a/docs/api-reference/v2/openapi.json +++ b/docs/api-reference/v2/openapi.json @@ -6752,7 +6752,7 @@ "integration": { "type": "string", "example": "cal-video", - "enum": ["cal-video", "google-meet", "zoom", "msteams"] + "enum": ["cal-video", "google-meet", "zoom", "office365-video"] } }, "required": ["type", "integration"]