Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added zoom, office365-video as valid event-type locations #18777

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/api/v2/swagger/documentation.json
Original file line number Diff line number Diff line change
Expand Up @@ -7196,7 +7196,9 @@
"example": "cal-video",
"enum": [
"cal-video",
"google-meet"
"google-meet",
"zoom",
"office365-video"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/v2/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -6752,7 +6752,7 @@
"integration": {
"type": "string",
"example": "cal-video",
"enum": ["cal-video", "google-meet"]
"enum": ["cal-video", "google-meet", "zoom", "office365-video"]
}
},
"required": ["type", "integration"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions packages/lib/event-types/transformers/internal/locations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading