* feat: api v2 add missing event type fields for advanced settings Add 9 event type fields to API v2 that were available in tRPC but missing from the platform API: - disableCancelling: disable cancelling for guests/organizer - disableRescheduling: disable rescheduling for guests/organizer - canSendCalVideoTranscriptionEmails: send Cal Video transcription emails - autoTranslateInstantMeetingTitleEnabled: auto-translate instant meeting titles - interfaceLanguage: preferred booking interface language - allowReschedulingPastBookings: allow rescheduling past events - allowReschedulingCancelledBookings: allow booking via reschedule link - customReplyToEmail: custom reply-to email for confirmations - showOptimizedSlots: optimize time slot arrangement Updated output/input schemas, transformation services, and E2E tests. * fix(api-v2): add proper OpenAPI types for nullable event type fields Add explicit type and nullable properties to @ApiPropertyOptional decorators for fields with `boolean | null` or `string | null` types. Without these, Swagger was generating incorrect "type": "object" instead of the correct types. Fixed fields: - disableCancelling: type: Boolean, nullable: true - disableRescheduling: type: Boolean, nullable: true - interfaceLanguage: type: String, nullable: true - allowReschedulingCancelledBookings: type: Boolean, nullable: true - customReplyToEmail: type: String, nullable: true - showOptimizedSlots: type: Boolean, nullable: true * refactor: customReplyToEmail was intentionally excluded from this PR. The web UI restricts this field to only allow the user's own verified emails via a dropdown, but implementing the same validation in the API requires additional business logic. This will be addressed in a separate PR with proper email ownership validation. * feat(api-v2): add validation for interfaceLanguage field Add @IsIn validation to interfaceLanguage field to only accept supported locales. This ensures API v2 matches the web UI behavior where users can only select from a predefined dropdown of supported languages. Changes: - Add SUPPORTED_LOCALES constant to @calcom/platform-constants - Add @IsIn([...SUPPORTED_LOCALES]) validation to create/update DTOs - Add E2E tests for invalid locale rejection (400 error) - Add cross-reference comments in i18n.json and api.ts to keep in sync * docs(api): add default values to event type input field documentation Added default value documentation to @DocsPropertyOptional decorators for the new event type fields in API v2 (2024_06_14): - disableCancelling: false - disableRescheduling: false - canSendCalVideoTranscriptionEmails: true - autoTranslateInstantMeetingTitleEnabled: false - allowReschedulingPastBookings: false - allowReschedulingCancelledBookings: false - showOptimizedSlots: false This improves API documentation by clearly communicating default values to API consumers in the OpenAPI spec. * feat(api-v2): refactor event type settings to object types for future extensibility - Convert disableRescheduling from boolean to object with disabled and minutesBefore properties - Convert disableCancelling from boolean to object with disabled property - Move canSendCalVideoTranscriptionEmails into CalVideoSettings as sendTranscriptionEmails - Remove autoTranslateInstantMeetingTitleEnabled (Enterprise-only feature) - Add DisableRescheduling_2024_06_14 and DisableCancelling_2024_06_14 input/output types - Add transformation methods for new object types in input and output services - Update E2E tests for new API contract BREAKING CHANGE: disableRescheduling and disableCancelling now accept objects instead of booleans * fix(api-v2): prevent clearing calVideoSettings when only sendTranscriptionEmails is provided Only include calVideoSettings in transformed output if it has properties, avoiding unintentional reset of existing settings during updates.
52 lines
804 B
JSON
52 lines
804 B
JSON
{
|
|
"version": 1.2,
|
|
"_comment": "When adding new locales, also update SUPPORTED_LOCALES in packages/platform/constants/api.ts",
|
|
"locale": {
|
|
"source": "en",
|
|
"targets": [
|
|
"ar",
|
|
"az",
|
|
"bg",
|
|
"bn",
|
|
"ca",
|
|
"cs",
|
|
"da",
|
|
"de",
|
|
"el",
|
|
"es",
|
|
"es-419",
|
|
"eu",
|
|
"et",
|
|
"fi",
|
|
"fr",
|
|
"he",
|
|
"hu",
|
|
"it",
|
|
"ja",
|
|
"km",
|
|
"ko",
|
|
"nl",
|
|
"no",
|
|
"pl",
|
|
"pt-BR",
|
|
"pt",
|
|
"ro",
|
|
"ru",
|
|
"sk-SK",
|
|
"sr",
|
|
"sv",
|
|
"tr",
|
|
"uk",
|
|
"vi",
|
|
"zh-CN",
|
|
"zh-TW"
|
|
]
|
|
},
|
|
"buckets": {
|
|
"json": {
|
|
"include": ["apps/web/public/static/locales/[locale]/common.json"]
|
|
}
|
|
},
|
|
"$schema": "https://lingo.dev/schema/i18n.json"
|
|
}
|