feat: authentication secured event types (#23217)

* feat: EventType bookingRequiresAuthentication column

* feat: toggle EventType bookingRequiresAuthentication via api

* feat: check bookingRequiresAuthentication when booking

* docs: v2 swagger

* fix: ts error

* refactor: use Forbidden exception instead of Unauthorized

* refactor: use findFirst instead of unique

* fix: only count accepted memberships

* fix: orgs schedules docs

* regenerate docs

* chore: update platform libraries

* fix: unit test

* fix: e2e test
This commit is contained in:
Lauris Skraucis authored and GitHub committed 2025-08-22 15:22:50 +01:00
1 parent aea6e105e6
commit e0dc2ba03a
25 files changed
+810 -17

No files matched your search

@@ -451,6 +451,15 @@ class BaseCreateEventTypeInput {
@IsBoolean()
@DocsPropertyOptional()
hidden?: boolean;
@IsOptional()
@IsBoolean()
@DocsPropertyOptional({
default: false,
description:
"Boolean to require authentication for booking this event type via api. If true, only authenticated users can book this event type.",
})
bookingRequiresAuthentication?: boolean;
}
export class CreateEventTypeInput_2024_06_14 extends BaseCreateEventTypeInput {
@IsOptional()
@@ -419,6 +419,15 @@ class BaseUpdateEventTypeInput {
@IsBoolean()
@DocsPropertyOptional()
hidden?: boolean;
@IsOptional()
@IsBoolean()
@DocsPropertyOptional({
default: false,
description:
"Boolean to require authentication for booking this event type via api. If true, only authenticated users can book this event type.",
})
bookingRequiresAuthentication?: boolean;
}
export class UpdateEventTypeInput_2024_06_14 extends BaseUpdateEventTypeInput {
@IsOptional()
@@ -444,6 +444,14 @@ class BaseEventTypeOutput_2024_06_14 {
@IsBoolean()
@DocsProperty()
hidden?: boolean;
@IsOptional()
@IsBoolean()
@DocsProperty({
description:
"Boolean to require authentication for booking this event type via api. If true, only authenticated users can book this event type.",
})
bookingRequiresAuthentication?: boolean;
}
export class TeamEventTypeResponseHost extends TeamEventTypeHostInput {