From 7d477a448e35ee95e448820d06d8dd63d961c752 Mon Sep 17 00:00:00 2001 From: Ryukemeister Date: Thu, 6 Feb 2025 19:54:40 +0530 Subject: [PATCH 1/6] hide docs for old google connect endpoint --- apps/api/v2/src/ee/gcal/gcal.controller.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/api/v2/src/ee/gcal/gcal.controller.ts b/apps/api/v2/src/ee/gcal/gcal.controller.ts index 3e43006c8a53ea..1104de235882fb 100644 --- a/apps/api/v2/src/ee/gcal/gcal.controller.ts +++ b/apps/api/v2/src/ee/gcal/gcal.controller.ts @@ -26,7 +26,8 @@ import { Headers, } from "@nestjs/common"; import { ConfigService } from "@nestjs/config"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiExcludeController } from "@nestjs/swagger"; +import { ApiOperation } from "@nestjs/swagger"; import { Request } from "express"; import { APPS_READ, GOOGLE_CALENDAR_TYPE, SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -41,7 +42,7 @@ const CALENDAR_SCOPES = [ path: "/v2/gcal", version: API_VERSIONS_VALUES, }) -@DocsTags("Platform / Google Calendar") +@ApiExcludeController(true) export class GcalController { private readonly logger = new Logger("Platform Gcal Provider"); From 04464996e34deb6d3b93034817ef83271b9d146f Mon Sep 17 00:00:00 2001 From: Ryukemeister Date: Thu, 6 Feb 2025 19:57:03 +0530 Subject: [PATCH 2/6] update docs for atoms --- docs/platform/atoms/availability-settings.mdx | 4 ++++ docs/platform/atoms/booker.mdx | 5 ++++- docs/platform/atoms/calendar-settings.mdx | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/platform/atoms/availability-settings.mdx b/docs/platform/atoms/availability-settings.mdx index 75545e21c70f59..76230eb7505b3a 100644 --- a/docs/platform/atoms/availability-settings.mdx +++ b/docs/platform/atoms/availability-settings.mdx @@ -100,6 +100,10 @@ Below is a list of props that can be passed to the availability settings atom. | onDeleteSuccess | No | A callback function that gets triggered when the user availability is deleted successfully | | onDeleteError | No | A callback function that gets triggered when the user availability fails to delete | | enableOverrides | No | Allows user to enable or disable date overrides display in the atom; defaults to disabled | +| disableEditableHeading | No | Prevents users from editing the heading | +| allowDelete | No | When set to false, this prop hides the delete button | +| allowSetToDefault | No | When set to false, this prop hides the set to default toggle | +| disableToasts | No | Allows users to enable or disable toast notifications, with the default setting being disabled. | Along with the props, Availability settings atom accepts custom styles via the **customClassNames** prop. Below is a list of props that fall under this **customClassNames** prop.

diff --git a/docs/platform/atoms/booker.mdx b/docs/platform/atoms/booker.mdx index 38d81c26437e79..c62c43a57f216d 100644 --- a/docs/platform/atoms/booker.mdx +++ b/docs/platform/atoms/booker.mdx @@ -116,7 +116,10 @@ Below is a list of props that can be passed to the booker atom. | onReserveSlotSuccess | No | Callback function for successful slot reservation | | onReserveSlotError | No | Callback function triggered on slot reservation failure | | onDeleteSlotSuccess | No | Callback function for successful slot deletion | -| onDeleteSlotError | No | Callback function triggered on slot deletion failure +| onDeleteSlotError | No | Callback function triggered on slot deletion failure +| view | No | Specifies the layout of the booker atom into column, week, or month view | +| metadata | No | Used to pass custom metadata values into the booker. Metadata should be an object eg: `{ bookingSource: "website", userRole: "admin" }` | +| bannerUrl | No | Adds custom banner to the booker atom | Along with the props, booker atom accepts custom styles via the **customClassNames** prop. Below is a list of props that fall under this **customClassNames** prop.

diff --git a/docs/platform/atoms/calendar-settings.mdx b/docs/platform/atoms/calendar-settings.mdx index c004c6e6df0696..82c3cae1f727ae 100644 --- a/docs/platform/atoms/calendar-settings.mdx +++ b/docs/platform/atoms/calendar-settings.mdx @@ -85,12 +85,12 @@ Customizations can be done to the destination calendar settings atom via props. The selected calendar settings atom lets you select which calendars you want to check for conflicts to prevent double bookings. Below code snippet can be used to render the selected calendar settings atom. ```js -import { SelectedCalendarSettings } from "@calcom/atoms"; +import { SelectedCalendarsSettings } from "@calcom/atoms"; export default function SelectedCalendars( props : SelectedCalendarsProps ) { return ( <> - + ) } From 5fe3dbcf2892b095a426e64901ff1fa5ccd48ea6 Mon Sep 17 00:00:00 2001 From: Ryukemeister Date: Thu, 6 Feb 2025 19:58:03 +0530 Subject: [PATCH 3/6] fix css styles for week view --- packages/platform/atoms/globals.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/platform/atoms/globals.css b/packages/platform/atoms/globals.css index 7648d22fcc4919..2d3f010e27bc7a 100644 --- a/packages/platform/atoms/globals.css +++ b/packages/platform/atoms/globals.css @@ -13182,19 +13182,19 @@ select { --calendar-dates-sticky-offset:66px } -.\[--disabled-gradient-background\: \#E5E7EB\] { +.\[--disabled-gradient-background\:\#E5E7EB\] { --disabled-gradient-background:#e5e7eb } -.\[--disabled-gradient-background\: \#F8F9FB\] { +.\[--disabled-gradient-background\:\#F8F9FB\] { --disabled-gradient-background:#f8f9fb } -.\[--disabled-gradient-foreground\: \#D1D5DB\] { +.\[--disabled-gradient-foreground\:\#D1D5DB\] { --disabled-gradient-foreground:#d1d5db } -.\[--disabled-gradient-foreground\: \#E6E7EB\] { +.\[--disabled-gradient-foreground\:\#E6E7EB\] { --disabled-gradient-foreground:#e6e7eb } From 0897790875c0307dc2d43c042822f4c1d3f085bd Mon Sep 17 00:00:00 2001 From: Ryukemeister Date: Thu, 6 Feb 2025 20:01:21 +0530 Subject: [PATCH 4/6] update v2 reference --- apps/api/v2/swagger/documentation.json | 150 ------------------------- 1 file changed, 150 deletions(-) diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json index 571dc3049f4e94..ac4944b3760e48 100644 --- a/apps/api/v2/swagger/documentation.json +++ b/apps/api/v2/swagger/documentation.json @@ -63,98 +63,6 @@ ] } }, - "/v2/gcal/oauth/auth-url": { - "get": { - "operationId": "GcalController_redirect", - "summary": "Get auth URL", - "parameters": [ - { - "name": "Authorization", - "required": true, - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GcalAuthUrlOutput" - } - } - } - } - }, - "tags": [ - "Platform / Google Calendar" - ] - } - }, - "/v2/gcal/oauth/save": { - "get": { - "operationId": "GcalController_save", - "summary": "Connect a calendar", - "parameters": [ - { - "name": "state", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "code", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GcalSaveRedirectOutput" - } - } - } - } - }, - "tags": [ - "Platform / Google Calendar" - ] - } - }, - "/v2/gcal/check": { - "get": { - "operationId": "GcalController_check", - "summary": "Check a calendar connection status", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GcalCheckOutput" - } - } - } - } - }, - "tags": [ - "Platform / Google Calendar" - ] - } - }, "/v2/oauth-clients/{clientId}/users": { "get": { "operationId": "OAuthClientUsersController_getManagedUsers", @@ -14130,64 +14038,6 @@ "data" ] }, - "AuthUrlData": { - "type": "object", - "properties": { - "authUrl": { - "type": "string" - } - }, - "required": [ - "authUrl" - ] - }, - "GcalAuthUrlOutput": { - "type": "object", - "properties": { - "status": { - "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] - }, - "data": { - "$ref": "#/components/schemas/AuthUrlData" - } - }, - "required": [ - "status", - "data" - ] - }, - "GcalSaveRedirectOutput": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "required": [ - "url" - ] - }, - "GcalCheckOutput": { - "type": "object", - "properties": { - "status": { - "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] - } - }, - "required": [ - "status" - ] - }, "ProviderVerifyClientData": { "type": "object", "properties": { From ee1aa749dacc1408e998127162d53293a6a84ba2 Mon Sep 17 00:00:00 2001 From: Ryukemeister Date: Thu, 6 Feb 2025 20:03:32 +0530 Subject: [PATCH 5/6] add dutch translations in cal provider --- .../platform/atoms/cal-provider/CalProvider.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/platform/atoms/cal-provider/CalProvider.tsx b/packages/platform/atoms/cal-provider/CalProvider.tsx index 416e4090770be1..7f3477f95c54d1 100644 --- a/packages/platform/atoms/cal-provider/CalProvider.tsx +++ b/packages/platform/atoms/cal-provider/CalProvider.tsx @@ -9,6 +9,7 @@ import type deTranslations from "@calcom/web/public/static/locales/de/common.jso import type enTranslations from "@calcom/web/public/static/locales/en/common.json"; import type esTranslations from "@calcom/web/public/static/locales/es/common.json"; import type frTranslations from "@calcom/web/public/static/locales/fr/common.json"; +import type nlTranslations from "@calcom/web/public/static/locales/nl/common.json"; import type ptBrTranslations from "@calcom/web/public/static/locales/pt-BR/common.json"; import http from "../lib/http"; @@ -19,19 +20,22 @@ export type frTranslationKeys = keyof typeof frTranslations; export type deTranslationKeys = keyof typeof deTranslations; export type esTranslationKeys = keyof typeof esTranslations; export type ptBrTranslationKeys = keyof typeof ptBrTranslations; +export type nlTranslationKeys = keyof typeof nlTranslations; export type translationKeys = | enTranslationKeys | frTranslationKeys | deTranslationKeys | esTranslationKeys - | ptBrTranslationKeys; + | ptBrTranslationKeys + | nlTranslationKeys; const FR = "fr"; export const EN = "en"; const PT_BR = "pt-BR"; const DE = "de"; const ES = "es"; -export const CAL_PROVIDER_LANGUAUES = [FR, EN, PT_BR, DE, ES] as const; +const NL = "nl"; +export const CAL_PROVIDER_LANGUAUES = [FR, EN, PT_BR, DE, ES, NL] as const; export type CalProviderLanguagesType = (typeof CAL_PROVIDER_LANGUAUES)[number]; const queryClient = new QueryClient(); @@ -61,7 +65,12 @@ type i18nEsProps = { language?: "es"; }; -export type i18nProps = i18nFrProps | i18nEnProps | i18nPtBrProps | i18nDeProps | i18nEsProps; +type i18nNlProps = { + labels?: Partial>; + language?: "nl"; +}; + +export type i18nProps = i18nFrProps | i18nEnProps | i18nPtBrProps | i18nDeProps | i18nEsProps | i18nNlProps; export type CalProviderProps = { children?: ReactNode; From f3b7bb9ee7ea9387bf5477096267aba13ab48a5b Mon Sep 17 00:00:00 2001 From: Morgan Vernay Date: Mon, 10 Feb 2025 21:46:35 +0200 Subject: [PATCH 6/6] fix: add nl i18n in BaseCalProvider --- packages/platform/atoms/cal-provider/BaseCalProvider.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/platform/atoms/cal-provider/BaseCalProvider.tsx b/packages/platform/atoms/cal-provider/BaseCalProvider.tsx index 85801976212ecd..479a290c35ba67 100644 --- a/packages/platform/atoms/cal-provider/BaseCalProvider.tsx +++ b/packages/platform/atoms/cal-provider/BaseCalProvider.tsx @@ -7,6 +7,7 @@ import deTranslations from "@calcom/web/public/static/locales/de/common.json"; import enTranslations from "@calcom/web/public/static/locales/en/common.json"; import esTranslations from "@calcom/web/public/static/locales/es/common.json"; import frTranslations from "@calcom/web/public/static/locales/fr/common.json"; +import nlTranslations from "@calcom/web/public/static/locales/nl/common.json"; import ptBrTranslations from "@calcom/web/public/static/locales/pt-BR/common.json"; import { AtomsContext } from "../hooks/useAtomsContext"; @@ -27,6 +28,7 @@ import type { ptBrTranslationKeys, deTranslationKeys, esTranslationKeys, + nlTranslationKeys, } from "./CalProvider"; export function BaseCalProvider({ @@ -208,6 +210,8 @@ function getTranslation(key: string, language: CalProviderLanguagesType) { return deTranslations[key as deTranslationKeys]; case "es": return esTranslations[key as esTranslationKeys]; + case "nl": + return nlTranslations[key as nlTranslationKeys]; default: return enTranslations[key as enTranslationKeys]; }