tonightpass 0.0.169 → 0.0.170

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -626,10 +626,29 @@ type OrganizationEventEndpoints = Endpoint<"GET", "/organizations/events/search"
626
626
  radius?: number;
627
627
  }> | Endpoint<"GET", "/organizations/:organizationSlug/events", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/:organizationSlug/events/past", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/:organizationSlug/events/upcoming", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent> | Endpoint<"POST", "/organizations/:organizationSlug/events", OrganizationEvent, CreateOrganizationEventDto> | Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, UpdateOrganizationEventDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, null> | Endpoint<"POST", "/organizations/:organizationSlug/events/:eventSlug/files/:eventFileType", string, FormData> | Endpoint<"POST", "/events/files/:eventFileType", string, FormData> | OrganizationEventOrderEndpoints | OrganizationEventStyleEndpoints | OrganizationEventTicketEndpoints | OrganizationEventViewEndpoints;
628
628
 
629
+ declare class AcceptOrganizationMemberInvitationDto {
630
+ token: string;
631
+ }
632
+
633
+ declare class CreateOrganizationMemberInvitationLinkDto {
634
+ role?: OrganizationMemberRole;
635
+ }
636
+
629
637
  declare class UpdateOrganizationMemberDto {
630
638
  role: OrganizationMemberRole;
631
639
  }
632
640
 
641
+ type OrganizationToken = Omit<Base, "updatedAt"> & {
642
+ type: OrganizationTokenType;
643
+ value: string;
644
+ expiresAt: Date;
645
+ organization?: Organization;
646
+ role?: string;
647
+ };
648
+ declare enum OrganizationTokenType {
649
+ InvitationLink = "invitation_link"
650
+ }
651
+
633
652
  type OrganizationMember = Base & {
634
653
  organization: OrganizationProfile;
635
654
  role: OrganizationMemberRole;
@@ -648,7 +667,7 @@ declare enum OrganizationMemberRole {
648
667
  Admin = "admin",
649
668
  Owner = "owner"
650
669
  }
651
- type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members/@me", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"GET", "/organizations/:organizationSlug/members", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"POST", "/organizations/:organizationSlug/members", OrganizationMember, CreateOrganizationMemberDto> | Endpoint<"PUT", "/organizations/:organizationSlug/members/:userId", OrganizationMember, UpdateOrganizationMemberDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/members/:userId", OrganizationMember[], null>;
670
+ type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members/@me", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"GET", "/organizations/:organizationSlug/members", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"POST", "/organizations/:organizationSlug/members", OrganizationMember, CreateOrganizationMemberDto> | Endpoint<"PUT", "/organizations/:organizationSlug/members/:userId", OrganizationMember, UpdateOrganizationMemberDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/members/:userId", OrganizationMember[], null> | Endpoint<"POST", "/organizations/:organizationSlug/members/invitations/links", OrganizationToken, CreateOrganizationMemberInvitationLinkDto> | Endpoint<"POST", "/organizations/:organizationSlug/members/invitations/accept", OrganizationMember, AcceptOrganizationMemberInvitationDto>;
652
671
 
653
672
  type Organization = Base & {
654
673
  slug: string;
@@ -1239,6 +1258,8 @@ declare const organizations: (client: Client) => {
1239
1258
  create: (organizationSlug: string, data: CreateOrganizationMemberDto) => Promise<OrganizationMember>;
1240
1259
  update: (organizationSlug: string, userId: string, data: UpdateOrganizationMemberDto) => Promise<OrganizationMember>;
1241
1260
  delete: (organizationSlug: string, userId: string) => Promise<OrganizationMember[]>;
1261
+ createInvitationLink: (organizationSlug: string, data?: CreateOrganizationMemberInvitationLinkDto) => Promise<OrganizationToken>;
1262
+ acceptInvitation: (organizationSlug: string, data: AcceptOrganizationMemberInvitationDto) => Promise<OrganizationMember>;
1242
1263
  };
1243
1264
  };
1244
1265
 
@@ -1425,6 +1446,8 @@ declare class TonightPass {
1425
1446
  create: (organizationSlug: string, data: CreateOrganizationMemberDto) => Promise<OrganizationMember>;
1426
1447
  update: (organizationSlug: string, userId: string, data: UpdateOrganizationMemberDto) => Promise<OrganizationMember>;
1427
1448
  delete: (organizationSlug: string, userId: string) => Promise<OrganizationMember[]>;
1449
+ createInvitationLink: (organizationSlug: string, data?: CreateOrganizationMemberInvitationLinkDto) => Promise<OrganizationToken>;
1450
+ acceptInvitation: (organizationSlug: string, data: AcceptOrganizationMemberInvitationDto) => Promise<OrganizationMember>;
1428
1451
  };
1429
1452
  };
1430
1453
  readonly profiles: {
@@ -1469,4 +1492,4 @@ declare class TonightPass {
1469
1492
  declare const isBrowser: boolean;
1470
1493
  declare function buildFileFormData(key: string, files: File | File[] | FileList): FormData;
1471
1494
 
1472
- export { type APIRequestOptions, type APIResponse, AddParticipantDto, AddReactionDto, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelEndpoints, type ChannelMember, ChannelMemberRole, type ChannelMessage, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelParticipant, ChannelStatus, ChannelType, Client, type ClientOptions, ContentOrAttachmentsConstraint, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, CreateUserIdentityDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type ExchangeRates, type ExcludeBase, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type PublicUser, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, type WebhookEndpoints, auth, buildFileFormData, careers, channels, currencies, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
1495
+ export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelEndpoints, type ChannelMember, ChannelMemberRole, type ChannelMessage, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelParticipant, ChannelStatus, ChannelType, Client, type ClientOptions, ContentOrAttachmentsConstraint, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type ExchangeRates, type ExcludeBase, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type PublicUser, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, type WebhookEndpoints, auth, buildFileFormData, careers, channels, currencies, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
package/dist/index.d.ts CHANGED
@@ -626,10 +626,29 @@ type OrganizationEventEndpoints = Endpoint<"GET", "/organizations/events/search"
626
626
  radius?: number;
627
627
  }> | Endpoint<"GET", "/organizations/:organizationSlug/events", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/:organizationSlug/events/past", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/:organizationSlug/events/upcoming", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent> | Endpoint<"POST", "/organizations/:organizationSlug/events", OrganizationEvent, CreateOrganizationEventDto> | Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, UpdateOrganizationEventDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, null> | Endpoint<"POST", "/organizations/:organizationSlug/events/:eventSlug/files/:eventFileType", string, FormData> | Endpoint<"POST", "/events/files/:eventFileType", string, FormData> | OrganizationEventOrderEndpoints | OrganizationEventStyleEndpoints | OrganizationEventTicketEndpoints | OrganizationEventViewEndpoints;
628
628
 
629
+ declare class AcceptOrganizationMemberInvitationDto {
630
+ token: string;
631
+ }
632
+
633
+ declare class CreateOrganizationMemberInvitationLinkDto {
634
+ role?: OrganizationMemberRole;
635
+ }
636
+
629
637
  declare class UpdateOrganizationMemberDto {
630
638
  role: OrganizationMemberRole;
631
639
  }
632
640
 
641
+ type OrganizationToken = Omit<Base, "updatedAt"> & {
642
+ type: OrganizationTokenType;
643
+ value: string;
644
+ expiresAt: Date;
645
+ organization?: Organization;
646
+ role?: string;
647
+ };
648
+ declare enum OrganizationTokenType {
649
+ InvitationLink = "invitation_link"
650
+ }
651
+
633
652
  type OrganizationMember = Base & {
634
653
  organization: OrganizationProfile;
635
654
  role: OrganizationMemberRole;
@@ -648,7 +667,7 @@ declare enum OrganizationMemberRole {
648
667
  Admin = "admin",
649
668
  Owner = "owner"
650
669
  }
651
- type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members/@me", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"GET", "/organizations/:organizationSlug/members", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"POST", "/organizations/:organizationSlug/members", OrganizationMember, CreateOrganizationMemberDto> | Endpoint<"PUT", "/organizations/:organizationSlug/members/:userId", OrganizationMember, UpdateOrganizationMemberDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/members/:userId", OrganizationMember[], null>;
670
+ type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members/@me", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"GET", "/organizations/:organizationSlug/members", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"POST", "/organizations/:organizationSlug/members", OrganizationMember, CreateOrganizationMemberDto> | Endpoint<"PUT", "/organizations/:organizationSlug/members/:userId", OrganizationMember, UpdateOrganizationMemberDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/members/:userId", OrganizationMember[], null> | Endpoint<"POST", "/organizations/:organizationSlug/members/invitations/links", OrganizationToken, CreateOrganizationMemberInvitationLinkDto> | Endpoint<"POST", "/organizations/:organizationSlug/members/invitations/accept", OrganizationMember, AcceptOrganizationMemberInvitationDto>;
652
671
 
653
672
  type Organization = Base & {
654
673
  slug: string;
@@ -1239,6 +1258,8 @@ declare const organizations: (client: Client) => {
1239
1258
  create: (organizationSlug: string, data: CreateOrganizationMemberDto) => Promise<OrganizationMember>;
1240
1259
  update: (organizationSlug: string, userId: string, data: UpdateOrganizationMemberDto) => Promise<OrganizationMember>;
1241
1260
  delete: (organizationSlug: string, userId: string) => Promise<OrganizationMember[]>;
1261
+ createInvitationLink: (organizationSlug: string, data?: CreateOrganizationMemberInvitationLinkDto) => Promise<OrganizationToken>;
1262
+ acceptInvitation: (organizationSlug: string, data: AcceptOrganizationMemberInvitationDto) => Promise<OrganizationMember>;
1242
1263
  };
1243
1264
  };
1244
1265
 
@@ -1425,6 +1446,8 @@ declare class TonightPass {
1425
1446
  create: (organizationSlug: string, data: CreateOrganizationMemberDto) => Promise<OrganizationMember>;
1426
1447
  update: (organizationSlug: string, userId: string, data: UpdateOrganizationMemberDto) => Promise<OrganizationMember>;
1427
1448
  delete: (organizationSlug: string, userId: string) => Promise<OrganizationMember[]>;
1449
+ createInvitationLink: (organizationSlug: string, data?: CreateOrganizationMemberInvitationLinkDto) => Promise<OrganizationToken>;
1450
+ acceptInvitation: (organizationSlug: string, data: AcceptOrganizationMemberInvitationDto) => Promise<OrganizationMember>;
1428
1451
  };
1429
1452
  };
1430
1453
  readonly profiles: {
@@ -1469,4 +1492,4 @@ declare class TonightPass {
1469
1492
  declare const isBrowser: boolean;
1470
1493
  declare function buildFileFormData(key: string, files: File | File[] | FileList): FormData;
1471
1494
 
1472
- export { type APIRequestOptions, type APIResponse, AddParticipantDto, AddReactionDto, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelEndpoints, type ChannelMember, ChannelMemberRole, type ChannelMessage, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelParticipant, ChannelStatus, ChannelType, Client, type ClientOptions, ContentOrAttachmentsConstraint, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, CreateUserIdentityDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type ExchangeRates, type ExcludeBase, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type PublicUser, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, type WebhookEndpoints, auth, buildFileFormData, careers, channels, currencies, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
1495
+ export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelEndpoints, type ChannelMember, ChannelMemberRole, type ChannelMessage, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelParticipant, ChannelStatus, ChannelType, Client, type ClientOptions, ContentOrAttachmentsConstraint, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type ExchangeRates, type ExcludeBase, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type PublicUser, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, type WebhookEndpoints, auth, buildFileFormData, careers, channels, currencies, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- 'use strict';require('reflect-metadata');var classValidator=require('class-validator'),classTransformer=require('class-transformer'),Ii=require('redaxios'),pathcat=require('pathcat');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Ii__default=/*#__PURE__*/_interopDefault(Ii);var Go=Object.defineProperty;var n=(e,t)=>Go(e,"name",{value:t,configurable:true});var St="https://api.tonightpass.com";var c={EMAIL:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,NAME:/^[a-zA-ZÀ-ÿ0-9-\s]+$/,SLUG:/^[a-z0-9_.]+$/,USERNAME:/^(?!\.)(?!.*\.\.)(?!.*\.$)[a-z0-9_.]{3,48}$/,PHONE:/^\+(?:[0-9] ?){6,14}[0-9]$/,PASSWORD:/^(?=.*[A-Z])(?=.*[a-z])(?=.*[\d\W]).{8,}$/,PASSWORD_MIN_LENGTH:/^.{8,}$/,PASSWORD_UPPERCASE:/^(?=.*[A-Z])/,PASSWORD_LOWERCASE:/^(?=.*[a-z])/,PASSWORD_NUMBER_SPECIAL:/^(?=.*[\d\W])/,IMAGE_URL:/^(https:\/\/|http:\/\/)(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-z]{2,6}([-a-zA-Z0-9@:%_\+.~#?&//=]*)\.(jpg|jpeg|gif|png|bmp|tiff|tga|svg)$/i};function qo(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(qo,"_ts_decorate");function Vo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Vo,"_ts_metadata");var Ee=class{static{n(this,"AddParticipantDto");}username};qo([classValidator.IsString(),classValidator.Matches(c.USERNAME),Vo("design:type",String)],Ee.prototype,"username",void 0);var _e=function(e){return e.Dislike="dislike",e.HarassmentSelf="harassment_self",e.HarassmentOther="harassment_other",e.SexualHarassmentSelf="sexual_harassment_self",e.NudesSelf="nudes_self",e.SexualContent="sexual_content",e.ChildInvolved="child_involved",e.ThreatTarget="threat_target",e.ViolentContent="violent_content",e.HateSpeech="hate_speech",e.Terrorism="terrorism",e.DrugSale="drug_sale",e.WeaponSale="weapon_sale",e.SelfHarmConcern="self_harm_concern",e.SelfHarmPromotion="self_harm_promotion",e.Other="other",e}({});var te=function(e){return e.Private="private",e.Group="group",e}({}),Bi=function(e){return e.Member="member",e.Admin="admin",e}({}),Fi=function(e){return e.Sent="sent",e.Delivered="delivered",e.Read="read",e.Received="received",e.Opened="opened",e}({});var H=function(e){return e.EUR="EUR",e.USD="USD",e.GBP="GBP",e.BGN="BGN",e.CZK="CZK",e.DKK="DKK",e.HUF="HUF",e.PLN="PLN",e.RON="RON",e.SEK="SEK",e.CHF="CHF",e.NOK="NOK",e.ISK="ISK",e.TRY="TRY",e.RUB="RUB",e.UAH="UAH",e.BAM="BAM",e.MKD="MKD",e.ALL="ALL",e.RSD="RSD",e.MDL="MDL",e.GEL="GEL",e.BYN="BYN",e}({});var Vi=function(e){return e.AuthEmailAlreadyExists="auth.email-already-exists",e.AuthUsernameAlreadyExists="auth.username-already-exists",e.AuthPhoneNumberAlreadyExists="auth.phone-number-already-exists",e.AuthInvalidCredentials="auth.invalid-credentials",e.AuthUserNotFound="auth.user-not-found",e.AuthInvalidToken="auth.invalid-token",e.AuthTokenExpired="auth.token-expired",e.AuthUnauthorized="auth.unauthorized",e.AuthPasswordMismatch="auth.password-mismatch",e.AuthInvalidOAuth2Provider="auth.invalid-oauth2-provider",e.AuthOAuth2Error="auth.oauth2-error",e.UserNotFound="user.not-found",e.UserInvalidUsername="user.invalid-username",e.UserInvalidEmail="user.invalid-email",e.UserInvalidPhoneNumber="user.invalid-phone-number",e.UserInvalidPassword="user.invalid-password",e.UserInvalidBirthDate="user.invalid-birth-date",e.UserInvalidGender="user.invalid-gender",e.UserInvalidRole="user.invalid-role",e.UserInvalidPreferences="user.invalid-preferences",e.UserInvalidLocation="user.invalid-location",e.UserInvalidFile="user.invalid-file",e.UserFileTooLarge="user.file-too-large",e.UserUnsupportedFileType="user.unsupported-file-type",e.OrganizationNotFound="organization.not-found",e.OrganizationInvalidSlug="organization.invalid-slug",e.OrganizationInvalidName="organization.invalid-name",e.OrganizationInvalidDescription="organization.invalid-description",e.OrganizationInvalidLocation="organization.invalid-location",e.OrganizationInvalidSocialLink="organization.invalid-social-link",e.OrganizationAlreadyExists="organization.already-exists",e.OrganizationUnauthorized="organization.unauthorized",e.OrganizationMemberNotFound="organization.member-not-found",e.OrganizationMemberInvalidRole="organization.member-invalid-role",e.OrganizationMemberAlreadyExists="organization.member-already-exists",e.EventNotFound="event.not-found",e.EventInvalidTitle="event.invalid-title",e.EventInvalidDescription="event.invalid-description",e.EventInvalidLocation="event.invalid-location",e.EventInvalidDates="event.invalid-dates",e.EventInvalidTickets="event.invalid-tickets",e.EventInvalidStyles="event.invalid-styles",e.EventInvalidType="event.invalid-type",e.EventInvalidVisibility="event.invalid-visibility",e.EventUnavailable="event.unavailable",e.EventTicketNotFound="event.ticket-not-found",e.EventTicketUnavailable="event.ticket-unavailable",e.EventTicketInvalidQuantity="event.ticket-invalid-quantity",e.OrderNotFound="order.not-found",e.OrderInvalidStatus="order.invalid-status",e.OrderInvalidPayment="order.invalid-payment",e.OrderPaymentFailed="order.payment-failed",e.OrderAlreadyPaid="order.already-paid",e.OrderCancelled="order.cancelled",e.OrderRefunded="order.refunded",e.OrderExpired="order.expired",e.BookingNotFound="booking.not-found",e.BookingInvalidStatus="booking.invalid-status",e.BookingInvalidTickets="booking.invalid-tickets",e.BookingTicketNotFound="booking.ticket-not-found",e.BookingTicketInvalidToken="booking.ticket-invalid-token",e.BookingTicketExpired="booking.ticket-expired",e.BookingTicketUsed="booking.ticket-used",e.FileNotFound="file.not-found",e.FileInvalidType="file.invalid-type",e.FileTooLarge="file.too-large",e.FileUploadFailed="file.upload-failed",e.ValidationError="validation.error",e.DatabaseError="database.error",e.InternalServerError="server.internal-error",e.NotFound="not-found",e.BadRequest="bad-request",e.Unauthorized="unauthorized",e.Forbidden="forbidden",e.TooManyRequests="too-many-requests",e.ServiceUnavailable="service-unavailable",e.TooManyRequestsAuth="rate-limit.auth",e.TooManyRequestsApi="rate-limit.api",e.WebhookInvalidSignature="webhook.invalid-signature",e.WebhookInvalidEvent="webhook.invalid-event",e.WebhookProcessingFailed="webhook.processing-failed",e.PaymentRequired="payment.required",e.PaymentMethodRequired="payment.method-required",e.PaymentFailed="payment.failed",e.PaymentCancelled="payment.cancelled",e.PaymentRefunded="payment.refunded",e.BillingInvalidAccount="billing.invalid-account",e.BillingAccountRequired="billing.account-required",e.NotificationInvalidType="notification.invalid-type",e.NotificationSendingFailed="notification.sending-failed",e.CacheError="cache.error",e.CacheMiss="cache.miss",e.ExternalServiceError="external-service.error",e.ExternalServiceTimeout="external-service.timeout",e.ExternalServiceUnavailable="external-service.unavailable",e}({});var K=function(e){return e.ETicket="e-ticket",e.Other="other",e}({}),$=function(e){return e.Entry="entry",e.Package="package",e.Meal="meal",e.Drink="drink",e.Parking="parking",e.Accommodation="accommodation",e.Camping="camping",e.Locker="locker",e.Shuttle="shuttle",e.Other="other",e}({});var Ei=function(e){return e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art",e}({});var X=function(e){return e.Clubbing="clubbing",e.Concert="concert",e.Afterwork="afterwork",e.DancingLunch="dancing_lunch",e.Diner="diner",e.Garden="garden",e.AfterBeach="after_beach",e.Festival="festival",e.Spectacle="spectacle",e.Cruise="cruise",e.OutsideAnimation="outside_animation",e.Sport="sport",e.Match="match",e.Seminar="seminar",e.Conference="conference",e.WellnessDay="wellness_day",e.Workshop="workshop",e.TradeFair="trade_fair",e.ConsumerShow="consumer_show",e.Membership="membership",e}({}),Z=function(e){return e.Public="public",e.Unlisted="unlisted",e.Private="private",e}({}),Ki=function(e){return e.Flyer="flyer",e.Trailer="trailer",e}({});var Ji=function(e){return e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected",e}({}),Y=function(e){return e.Member="member",e.Manager="manager",e.Admin="admin",e.Owner="owner",e}({});var Ci=function(e){return e.Facebook="facebook",e.Twitter="twitter",e.Instagram="instagram",e.Linkedin="linkedin",e.Youtube="youtube",e.Website="website",e}({});var or=function(e){return e.Follow="follow",e}({});var ir=function(e){return e.Authentication="authentication",e.BookingTicket="booking_ticket",e.OrganizationInvite="organization_invite",e.PasswordRecovery="password_recovery",e.EmailValidation="email_validation",e.PhoneValidation="phone_validation",e}({});var ar=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),J=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),sr=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var fr=function(e){return e.User="user",e.Organization="organization",e}({});var mr=function(e){return e.FR="fr",e.EN="en",e}({});function Ke(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(Ke,"_ts_decorate");function $e(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n($e,"_ts_metadata");var ue=class{static{n(this,"CreateChannelDto");}type;participantUsernames;name};Ke([classValidator.IsEnum(te),$e("design:type",typeof te>"u"?Object:te)],ue.prototype,"type",void 0);Ke([classValidator.IsArray(),classValidator.ArrayMinSize(1),classValidator.ValidateIf(e=>e.type===te.Private),classValidator.ArrayMaxSize(2,{message:"Private channels can only have 2 participants"}),classValidator.ValidateIf(e=>e.type===te.Group),classValidator.ArrayMinSize(3,{message:"Group channels must have at least 3 participants"}),classValidator.ArrayMaxSize(50,{message:"Group channels can have at most 50 participants"}),classValidator.IsString({each:true}),classValidator.Matches(c.USERNAME,{each:true}),$e("design:type",Array)],ue.prototype,"participantUsernames",void 0);Ke([classValidator.IsOptional(),classValidator.ValidateIf(e=>e.type===te.Group),classValidator.IsString(),classValidator.Length(1,100),$e("design:type",String)],ue.prototype,"name",void 0);function Zo(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(Zo,"_ts_decorate");function Yo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Yo,"_ts_metadata");var Xe=class{static{n(this,"UpdateChannelDto");}name};Zo([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,100),Yo("design:type",String)],Xe.prototype,"name",void 0);function To(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(To,"_ts_decorate");function en(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(en,"_ts_metadata");var Ze=class{static{n(this,"AddReactionDto");}emoji};To([classValidator.IsString(),classValidator.Length(1,10),en("design:type",String)],Ze.prototype,"emoji",void 0);function ze(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(ze,"_ts_decorate");function Ye(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Ye,"_ts_metadata");exports.ContentOrAttachmentsConstraint=class me{static{n(this,"ContentOrAttachmentsConstraint");}validate(t,o){let i=o.object,a=!!(i.content&&i.content.trim().length>0),r=!!(i.attachments&&i.attachments.length>0);return a||r}defaultMessage(t){return "Either content or attachments must be provided"}};exports.ContentOrAttachmentsConstraint=ze([classValidator.ValidatorConstraint({name:"contentOrAttachments",async:false})],exports.ContentOrAttachmentsConstraint);var ge=class{static{n(this,"CreateChannelMessageDto");}content;attachments;replyToId};ze([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.content!==void 0),classValidator.Length(1,1024),Ye("design:type",String)],ge.prototype,"content",void 0);ze([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ArrayMaxSize(10),classValidator.Matches(/^channels\/[\w-]+\/messages\/[\w-]+\/private\/[\w-]+$/,{each:true}),classValidator.Validate(exports.ContentOrAttachmentsConstraint),Ye("design:type",Array)],ge.prototype,"attachments",void 0);ze([classValidator.IsOptional(),classValidator.IsMongoId(),Ye("design:type",String)],ge.prototype,"replyToId",void 0);function un(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(un,"_ts_decorate");function mn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(mn,"_ts_metadata");var Qe=class{static{n(this,"UpdateChannelMessageDto");}content};un([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,1024),mn("design:type",String)],Qe.prototype,"content",void 0);function Ot(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(Ot,"_ts_decorate");function jt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(jt,"_ts_metadata");var Pe=class{static{n(this,"ReportChannelMessageDto");}reason;description};Ot([classValidator.IsEnum(_e),jt("design:type",typeof _e>"u"?Object:_e)],Pe.prototype,"reason",void 0);Ot([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.description&&e.description.trim().length>0),classValidator.Length(1,500),jt("design:type",String)],Pe.prototype,"description",void 0);function F(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(F,"_ts_decorate");function Q(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Q,"_ts_metadata");var Ce=class{static{n(this,"CoordinatesRangeConstraint");}validate(t){if(!Array.isArray(t)||t.length!==2)return false;let[o,i]=t;return i>=-90&&i<=90&&o>=-180&&o<=180}defaultMessage(){return "Coordinates must be within valid geographic ranges"}};Ce=F([classValidator.ValidatorConstraint({name:"coordinatesRange",async:false})],Ce);var j=class{static{n(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point";}};F([classValidator.IsString(),classValidator.IsNotEmpty(),Q("design:type",String)],j.prototype,"type",void 0);F([classValidator.IsArray(),classValidator.IsNotEmpty(),classValidator.Validate(Ce),Q("design:type",Array)],j.prototype,"coordinates",void 0);var S=class{static{n(this,"CreateLocationDto");}name;address;zipCode;city;country;geometry};F([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),Q("design:type",String)],S.prototype,"name",void 0);F([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,256),Q("design:type",String)],S.prototype,"address",void 0);F([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),Q("design:type",String)],S.prototype,"zipCode",void 0);F([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),Q("design:type",String)],S.prototype,"city",void 0);F([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),Q("design:type",String)],S.prototype,"country",void 0);F([classValidator.ValidateNested(),classTransformer.Type(()=>j),classValidator.IsNotEmpty(),Q("design:type",typeof j>"u"?Object:j)],S.prototype,"geometry",void 0);function re(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(re,"_ts_decorate");function ae(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ae,"_ts_metadata");var I=class{static{n(this,"UpdateLocationDto");}name;address;zipCode;city;country;geometry};re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),ae("design:type",String)],I.prototype,"name",void 0);re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,256),ae("design:type",String)],I.prototype,"address",void 0);re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),ae("design:type",String)],I.prototype,"zipCode",void 0);re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),ae("design:type",String)],I.prototype,"city",void 0);re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),ae("design:type",String)],I.prototype,"country",void 0);re([classValidator.IsOptional(),classValidator.ValidateNested(),classTransformer.Type(()=>j),ae("design:type",typeof j>"u"?Object:j)],I.prototype,"geometry",void 0);function G(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(G,"_ts_decorate");function q(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(q,"_ts_metadata");var pe=class{static{n(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};G([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),q("design:type",String)],pe.prototype,"organizationSlug",void 0);G([classValidator.IsObject(),q("design:type",typeof M>"u"?Object:M)],pe.prototype,"identity",void 0);G([classValidator.IsArray(),q("design:type",Array)],pe.prototype,"members",void 0);G([classValidator.IsOptional(),classValidator.IsObject(),q("design:type",typeof Location>"u"?Object:Location)],pe.prototype,"location",void 0);var M=class{static{n(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};G([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),q("design:type",String)],M.prototype,"displayName",void 0);G([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),q("design:type",String)],M.prototype,"description",void 0);G([classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//),q("design:type",String)],M.prototype,"avatarUrl",void 0);G([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//),q("design:type",String)],M.prototype,"bannerUrl",void 0);G([classValidator.IsOptional(),classValidator.IsArray(),q("design:type",Array)],M.prototype,"socialLinks",void 0);function W(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(W,"_ts_decorate");function k(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(k,"_ts_metadata");var ce=class{static{n(this,"UpdateOrganizationDto");}slug;identity;members;location};W([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME),k("design:type",String)],ce.prototype,"slug",void 0);W([classValidator.IsObject(),classValidator.IsOptional(),k("design:type",typeof V>"u"?Object:V)],ce.prototype,"identity",void 0);W([classValidator.IsOptional(),classValidator.IsArray(),k("design:type",Array)],ce.prototype,"members",void 0);W([classValidator.IsOptional(),classValidator.IsObject(),k("design:type",typeof Location>"u"?Object:Location)],ce.prototype,"location",void 0);var V=class{static{n(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};W([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),k("design:type",String)],V.prototype,"displayName",void 0);W([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),k("design:type",String)],V.prototype,"description",void 0);W([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//),k("design:type",String)],V.prototype,"avatarUrl",void 0);W([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//),k("design:type",String)],V.prototype,"bannerUrl",void 0);W([classValidator.IsOptional(),classValidator.IsArray(),k("design:type",Array)],V.prototype,"socialLinks",void 0);function Bn(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(Bn,"_ts_decorate");function Fn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Fn,"_ts_metadata");var it=class{static{n(this,"CreateOrganizationEventOrderDto");}cart};Bn([classValidator.IsArray(),classValidator.IsString({each:true}),Fn("design:type",Array)],it.prototype,"cart",void 0);var De=class{static{n(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var Dt=class extends De{static{n(this,"UpdateOrganizationEventStyleDto");}};function w(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(w,"_ts_decorate");function A(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(A,"_ts_metadata");var d=class{static{n(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};w([classValidator.IsString(),classValidator.Length(1,128),A("design:type",String)],d.prototype,"name",void 0);w([classValidator.IsString(),classValidator.Length(0,1024),classValidator.IsOptional(),A("design:type",String)],d.prototype,"description",void 0);w([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),A("design:type",Number)],d.prototype,"price",void 0);w([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),A("design:type",Number)],d.prototype,"quantity",void 0);w([classValidator.IsEnum(K),A("design:type",typeof K>"u"?Object:K)],d.prototype,"type",void 0);w([classValidator.IsEnum($),A("design:type",typeof $>"u"?Object:$)],d.prototype,"category",void 0);w([classValidator.IsEnum(H),A("design:type",typeof H>"u"?Object:H)],d.prototype,"currency",void 0);w([classValidator.IsBoolean(),A("design:type",Boolean)],d.prototype,"isVisible",void 0);w([classValidator.IsBoolean(),A("design:type",Boolean)],d.prototype,"isFeesIncluded",void 0);w([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),A("design:type",typeof Date>"u"?Object:Date)],d.prototype,"startAt",void 0);w([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),A("design:type",typeof Date>"u"?Object:Date)],d.prototype,"endAt",void 0);function _(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(_,"_ts_decorate");function z(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(z,"_ts_metadata");var l=class{static{n(this,"UpdateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};_([classValidator.IsString(),classValidator.Length(1,128),classValidator.IsOptional(),z("design:type",String)],l.prototype,"name",void 0);_([classValidator.IsString(),classValidator.Length(0,1024),classValidator.IsOptional(),z("design:type",String)],l.prototype,"description",void 0);_([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),z("design:type",Number)],l.prototype,"price",void 0);_([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),z("design:type",Number)],l.prototype,"quantity",void 0);_([classValidator.IsEnum(K),classValidator.IsOptional(),z("design:type",typeof K>"u"?Object:K)],l.prototype,"type",void 0);_([classValidator.IsEnum($),classValidator.IsOptional(),z("design:type",typeof $>"u"?Object:$)],l.prototype,"category",void 0);_([classValidator.IsEnum(H),classValidator.IsOptional(),z("design:type",typeof H>"u"?Object:H)],l.prototype,"currency",void 0);_([classValidator.IsBoolean(),classValidator.IsOptional(),z("design:type",Boolean)],l.prototype,"isVisible",void 0);_([classValidator.IsBoolean(),classValidator.IsOptional(),z("design:type",Boolean)],l.prototype,"isFeesIncluded",void 0);_([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),z("design:type",typeof Date>"u"?Object:Date)],l.prototype,"startAt",void 0);_([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),z("design:type",typeof Date>"u"?Object:Date)],l.prototype,"endAt",void 0);function v(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(v,"_ts_decorate");function x(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(x,"_ts_metadata");exports.AtLeastOneMediaConstraint=class Se{static{n(this,"AtLeastOneMediaConstraint");}validate(t,o){let i=o.object,a=i.flyers||[],r=i.trailers||[];return a.length>0||r.length>0}defaultMessage(){return "At least one flyer or trailer must be provided"}};exports.AtLeastOneMediaConstraint=v([classValidator.ValidatorConstraint({name:"atLeastOneMedia",async:false})],exports.AtLeastOneMediaConstraint);function Kn(e){return function(t,o){classValidator.registerDecorator({target:t.constructor,propertyName:o,options:e,constraints:[],validator:exports.AtLeastOneMediaConstraint});}}n(Kn,"AtLeastOneMedia");var f=class{static{n(this,"BaseOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;styles;startAt;endAt};v([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,64),x("design:type",String)],f.prototype,"title",void 0);v([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.SLUG),x("design:type",String)],f.prototype,"slug",void 0);v([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(16,2048),x("design:type",String)],f.prototype,"description",void 0);v([classValidator.IsEnum(X),classValidator.IsNotEmpty(),x("design:type",typeof X>"u"?Object:X)],f.prototype,"type",void 0);v([classValidator.IsEnum(Z),classValidator.IsNotEmpty(),x("design:type",typeof Z>"u"?Object:Z)],f.prototype,"visibility",void 0);v([classValidator.IsArray(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/)/,{each:true}),Kn(),x("design:type",Array)],f.prototype,"flyers",void 0);v([classValidator.IsArray(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/)/,{each:true}),x("design:type",Array)],f.prototype,"trailers",void 0);v([classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>S),classValidator.IsNotEmpty(),x("design:type",typeof S>"u"?Object:S)],f.prototype,"location",void 0);v([classValidator.IsArray(),classValidator.IsString({each:true}),classValidator.ArrayMinSize(1),x("design:type",Array)],f.prototype,"styles",void 0);v([classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),classValidator.IsNotEmpty(),classValidator.MinDate(new Date),x("design:type",typeof Date>"u"?Object:Date)],f.prototype,"startAt",void 0);v([classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),classValidator.IsNotEmpty(),classValidator.MinDate(new Date),x("design:type",typeof Date>"u"?Object:Date)],f.prototype,"endAt",void 0);var pt=class extends f{static{n(this,"CreateOrganizationEventDto");}tickets};v([classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>d),classValidator.IsNotEmpty(),x("design:type",Array)],pt.prototype,"tickets",void 0);function b(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(b,"_ts_decorate");function R(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(R,"_ts_metadata");exports.AtLeastOneMediaOnUpdateConstraint=class Ie{static{n(this,"AtLeastOneMediaOnUpdateConstraint");}validate(t,o){let i=o.object;return i.flyers!==void 0&&i.trailers!==void 0?i.flyers.length>0||i.trailers.length>0:i.flyers!==void 0&&i.trailers===void 0?i.flyers.length>0:i.trailers!==void 0&&i.flyers===void 0?i.trailers.length>0:true}defaultMessage(){return "Cannot remove all media from event. At least one flyer or trailer must remain"}};exports.AtLeastOneMediaOnUpdateConstraint=b([classValidator.ValidatorConstraint({name:"atLeastOneMediaOnUpdate",async:false})],exports.AtLeastOneMediaOnUpdateConstraint);function Jn(e){return function(t,o){classValidator.registerDecorator({target:t.constructor,propertyName:o,options:e,constraints:[],validator:exports.AtLeastOneMediaOnUpdateConstraint});}}n(Jn,"AtLeastOneMediaOnUpdate");var u=class{static{n(this,"UpdateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;startAt;endAt};b([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,64),R("design:type",String)],u.prototype,"title",void 0);b([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.SLUG),R("design:type",String)],u.prototype,"slug",void 0);b([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(16,2048),R("design:type",String)],u.prototype,"description",void 0);b([classValidator.IsOptional(),classValidator.IsEnum(X),R("design:type",typeof X>"u"?Object:X)],u.prototype,"type",void 0);b([classValidator.IsOptional(),classValidator.IsEnum(Z),R("design:type",typeof Z>"u"?Object:Z)],u.prototype,"visibility",void 0);b([classValidator.IsOptional(),classValidator.IsArray(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/)/,{each:true}),Jn(),R("design:type",Array)],u.prototype,"flyers",void 0);b([classValidator.IsOptional(),classValidator.IsArray(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/)/,{each:true}),R("design:type",Array)],u.prototype,"trailers",void 0);b([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>I),R("design:type",typeof I>"u"?Object:I)],u.prototype,"location",void 0);b([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>l),R("design:type",Array)],u.prototype,"tickets",void 0);b([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsString({each:true}),R("design:type",Array)],u.prototype,"styles",void 0);b([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),classValidator.MinDate(new Date),R("design:type",typeof Date>"u"?Object:Date)],u.prototype,"startAt",void 0);b([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),classValidator.MinDate(new Date),R("design:type",typeof Date>"u"?Object:Date)],u.prototype,"endAt",void 0);function oo(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(oo,"_ts_decorate");function no(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(no,"_ts_metadata");var Ge=class{static{n(this,"CreateOrganizationMemberDto");}user;role};oo([classValidator.IsString(),classValidator.IsNotEmpty(),no("design:type",String)],Ge.prototype,"user",void 0);oo([classValidator.IsEnum(Y),classValidator.IsNotEmpty(),no("design:type",typeof Y>"u"?Object:Y)],Ge.prototype,"role",void 0);function Tn(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(Tn,"_ts_decorate");function ei(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ei,"_ts_metadata");var ut=class{static{n(this,"UpdateOrganizationMemberDto");}role};Tn([classValidator.IsEnum(Y),classValidator.IsNotEmpty(),ei("design:type",typeof Y>"u"?Object:Y)],ut.prototype,"role",void 0);function D(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(D,"_ts_decorate");function N(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(N,"_ts_metadata");var xe=class{static{n(this,"CreateUserDto");}identifier;identity;password};D([classValidator.ValidateNested(),classTransformer.Type(()=>de),N("design:type",typeof de>"u"?Object:de)],xe.prototype,"identifier",void 0);D([classValidator.ValidateNested(),classTransformer.Type(()=>U),N("design:type",typeof U>"u"?Object:U)],xe.prototype,"identity",void 0);D([classValidator.IsString(),classValidator.Matches(c.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(c.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(c.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(c.PASSWORD,{message:"Password must be secure."}),N("design:type",String)],xe.prototype,"password",void 0);var de=class{static{n(this,"CreateUserIdentifierDto");}email;phoneNumber;username};D([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),N("design:type",String)],de.prototype,"email",void 0);D([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),N("design:type",String)],de.prototype,"phoneNumber",void 0);D([classValidator.IsString(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME),N("design:type",String)],de.prototype,"username",void 0);var U=class{static{n(this,"CreateUserIdentityDto");}firstName;lastName;gender;avatarUrl;birthDate};D([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"First name must be composed of letters only"}),N("design:type",String)],U.prototype,"firstName",void 0);D([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"Last name must be composed of letters only"}),N("design:type",String)],U.prototype,"lastName",void 0);D([classValidator.IsEnum(J),N("design:type",typeof J>"u"?Object:J)],U.prototype,"gender",void 0);D([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/avatars\//),N("design:type",String)],U.prototype,"avatarUrl",void 0);D([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>{if(!e)return;let t=new Date(e);return isNaN(t.getTime())?e:t}),classValidator.IsDate(),N("design:type",typeof Date>"u"?Object:Date)],U.prototype,"birthDate",void 0);function ci(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(ci,"_ts_decorate");function di(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(di,"_ts_metadata");var gt=class{static{n(this,"RecoveryDto");}identifier};ci([classValidator.IsNotEmpty(),classValidator.IsString(),di("design:type",String)],gt.prototype,"identifier",void 0);function yt(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(yt,"_ts_decorate");function ht(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ht,"_ts_metadata");var Re=class{static{n(this,"RecoveryResetDto");}tokenId;tokenValue;password};yt([classValidator.IsString(),classValidator.IsNotEmpty(),ht("design:type",String)],Re.prototype,"tokenId",void 0);yt([classValidator.IsString(),classValidator.IsNotEmpty(),ht("design:type",String)],Re.prototype,"tokenValue",void 0);yt([classValidator.Matches(c.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(c.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(c.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(c.PASSWORD,{message:"Password must be secure."}),classValidator.IsNotEmpty({message:"Password is required"}),ht("design:type",String)],Re.prototype,"password",void 0);function po(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(po,"_ts_decorate");function co(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(co,"_ts_metadata");var Ve=class{static{n(this,"SignInUserDto");}identifier;password};po([classValidator.IsNotEmpty(),classValidator.IsString(),co("design:type",String)],Ve.prototype,"identifier",void 0);po([classValidator.IsNotEmpty(),classValidator.IsString(),co("design:type",String)],Ve.prototype,"password",void 0);function m(e,t,o,i){var a=arguments.length,r=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(a<3?s(r):a>3?s(t,o,r):s(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r}n(m,"_ts_decorate");function g(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(g,"_ts_metadata");var Oe=class{static{n(this,"UpdateUserDto");}identifier;identity;password};m([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>fe),g("design:type",typeof fe>"u"?Object:fe)],Oe.prototype,"identifier",void 0);m([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>L),g("design:type",typeof L>"u"?Object:L)],Oe.prototype,"identity",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(8),classValidator.MaxLength(128),g("design:type",String)],Oe.prototype,"password",void 0);var fe=class{static{n(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),g("design:type",String)],fe.prototype,"email",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),g("design:type",String)],fe.prototype,"phoneNumber",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME),g("design:type",String)],fe.prototype,"username",void 0);var L=class{static{n(this,"UpdateUserIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate};m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"First name must be composed of letters only"}),g("design:type",String)],L.prototype,"firstName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"Last name must be composed of letters only"}),g("design:type",String)],L.prototype,"lastName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),g("design:type",String)],L.prototype,"displayName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),g("design:type",String)],L.prototype,"description",void 0);m([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/avatars\//),g("design:type",Object)],L.prototype,"avatarUrl",void 0);m([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/banners\//),g("design:type",Object)],L.prototype,"bannerUrl",void 0);m([classValidator.IsOptional(),classValidator.IsEnum(J),g("design:type",typeof J>"u"?Object:J)],L.prototype,"gender",void 0);m([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),g("design:type",typeof Date>"u"?Object:Date)],L.prototype,"birthDate",void 0);var B=typeof window<"u";function Ae(e,t){let o=new FormData;return t instanceof File?o.append(e,t):t instanceof FileList?Array.from(t).forEach(i=>o.append(e,i)):t.forEach(i=>o.append(e,i)),o}n(Ae,"buildFileFormData");var xi=Ii__default.default.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!B&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[function(e,t){return e instanceof FormData?(t&&typeof t=="object"&&"Content-Type"in t&&delete t["Content-Type"],e):(t&&(t["Content-Type"]="application/json"),JSON.stringify(e))}],withCredentials:B}),yo=n(async(e,t)=>xi(e,{...t}).then(i=>i).catch(i=>{throw i.data||console.error(i),i.data}),"request");var bt=class extends Error{static{n(this,"TonightPassAPIError");}response;data;status;constructor(t,o){super(o.message),this.response=t,this.data=o,this.status=t.status;}},We=class{static{n(this,"Client");}options;url;constructor(t){this.options=t,this.url=(o,i)=>{let a=this.options.baseURL||St;return pathcat.pathcat(a,o,i)};}setOptions(t){this.options=t;}async get(t,o,i){return this.requester("GET",t,void 0,o,i)}async post(t,o,i,a){return this.requester("POST",t,o,i,a)}async put(t,o,i,a){return this.requester("PUT",t,o,i,a)}async patch(t,o,i,a){return this.requester("PATCH",t,o,i,a)}async delete(t,o,i,a){return this.requester("DELETE",t,o,i,a)}async requester(t,o,i,a={},r={}){let s=this.url(o,a);if(i!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let p=await yo(s,{method:t,data:i,...r}),ke=p.data;if(!ke.success)throw new bt(p,ke);return ke.data}};function h(e){return e}n(h,"sdk");var ho=e=>({signIn:n(async t=>e.post("/auth/sign-in",t),"signIn"),signUp:n(async t=>e.post("/auth/sign-up",t),"signUp"),signOut:n(async()=>e.post("/auth/sign-out",null),"signOut"),refreshToken:n(async()=>e.post("/auth/refresh-token",null),"refreshToken"),recovery:n(async t=>e.post("/auth/recovery",t),"recovery"),recoveryReset:n(async t=>e.post("/auth/recovery/reset",t),"recoveryReset"),oauth2:{google:{connect:n(t=>{if(B)window.location.href=e.url("/oauth2/google",t||{});else throw new Error("Google OAuth2 is only available in the browser")},"connect")},twitter:{connect:n(t=>{if(B)window.location.href=e.url("/oauth2/twitter",t||{});else throw new Error("Twitter OAuth2 is only available in the browser")},"connect")},facebook:{connect:n(t=>{if(B)window.location.href=e.url("/oauth2/facebook",t||{});else throw new Error("Facebook OAuth2 is only available in the browser")},"connect")}}});var vo=e=>({categories:{getAll:n(async t=>e.get("/careers/categories",t),"getAll")},employmentTypes:{getAll:n(async t=>e.get("/careers/employmentTypes",t),"getAll")},jobs:{getAll:n(async t=>e.get("/careers/jobs",t),"getAll"),get:n(async t=>e.get("/careers/jobs/:jobId",{jobId:t}),"get")},offices:{getAll:n(async t=>e.get("/careers/offices",t),"getAll")}});var bo=e=>({getAll:n(async(t,o)=>e.get("/channels/@me/:channelId/messages",{channelId:t,...o}),"getAll"),getAllByOrganization:n(async(t,o,i)=>e.get("/channels/:organizationSlug/:channelId/messages",{organizationSlug:t,channelId:o,...i}),"getAllByOrganization"),get:n(async(t,o)=>e.get("/channels/@me/:channelId/messages/:messageId",{channelId:t,messageId:o}),"get"),getByOrganization:n(async(t,o,i)=>e.get("/channels/:organizationSlug/:channelId/messages/:messageId",{organizationSlug:t,channelId:o,messageId:i}),"getByOrganization"),create:n(async(t,o)=>e.post("/channels/@me/:channelId/messages",o,{channelId:t}),"create"),createByOrganization:n(async(t,o,i)=>e.post("/channels/:organizationSlug/:channelId/messages",i,{organizationSlug:t,channelId:o}),"createByOrganization"),update:n(async(t,o,i)=>e.put("/channels/@me/:channelId/messages/:messageId",i,{channelId:t,messageId:o}),"update"),updateByOrganization:n(async(t,o,i,a)=>e.put("/channels/:organizationSlug/:channelId/messages/:messageId",a,{organizationSlug:t,channelId:o,messageId:i}),"updateByOrganization"),delete:n(async(t,o)=>e.delete("/channels/@me/:channelId/messages/:messageId",void 0,{channelId:t,messageId:o}),"delete"),deleteByOrganization:n(async(t,o,i)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId",void 0,{organizationSlug:t,channelId:o,messageId:i}),"deleteByOrganization"),addReaction:n(async(t,o,i)=>e.post("/channels/@me/:channelId/messages/:messageId/reactions",i,{channelId:t,messageId:o}),"addReaction"),addReactionByOrganization:n(async(t,o,i,a)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/reactions",a,{organizationSlug:t,channelId:o,messageId:i}),"addReactionByOrganization"),removeReaction:n(async(t,o,i)=>e.delete("/channels/@me/:channelId/messages/:messageId/reactions/:emoji",void 0,{channelId:t,messageId:o,emoji:i}),"removeReaction"),removeReactionByOrganization:n(async(t,o,i,a)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji",void 0,{organizationSlug:t,channelId:o,messageId:i,emoji:a}),"removeReactionByOrganization"),markAsRead:n(async(t,o)=>e.post("/channels/@me/:channelId/messages/:messageId/read",null,{channelId:t,messageId:o}),"markAsRead"),markAsReadByOrganization:n(async(t,o,i)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/read",null,{organizationSlug:t,channelId:o,messageId:i}),"markAsReadByOrganization"),uploadFile:n(async(t,o)=>e.post("/channels/@me/:channelId/files",o,{channelId:t}),"uploadFile"),uploadFileByOrganization:n(async(t,o,i)=>e.post("/channels/:organizationSlug/:channelId/files",i,{organizationSlug:t,channelId:o}),"uploadFileByOrganization"),report:n(async(t,o,i)=>e.post("/channels/@me/:channelId/messages/:messageId/report",i,{channelId:t,messageId:o}),"report"),reportByOrganization:n(async(t,o,i,a)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/report",a,{organizationSlug:t,channelId:o,messageId:i}),"reportByOrganization")});var So=e=>({me:n(async t=>e.get("/channels/@me",t),"me"),getByOrganization:n(async(t,o)=>e.get("/channels/:organizationSlug",{organizationSlug:t,...o}),"getByOrganization"),countMe:n(async t=>e.get("/users/@me/channels/count",t),"countMe"),countByOrganization:n(async(t,o)=>e.get("/users/:organizationSlug/channels/count",{organizationSlug:t,...o}),"countByOrganization"),get:n(async t=>e.get("/channels/@me/:channelId",{channelId:t}),"get"),getByOrganizationChannel:n(async(t,o)=>e.get("/channels/:organizationSlug/:channelId",{organizationSlug:t,channelId:o}),"getByOrganizationChannel"),create:n(async t=>e.post("/channels/@me",t),"create"),createByOrganization:n(async(t,o)=>e.post("/channels/:organizationSlug",o,{organizationSlug:t}),"createByOrganization"),update:n(async(t,o)=>e.put("/channels/@me/:channelId",o,{channelId:t}),"update"),updateByOrganization:n(async(t,o,i)=>e.put("/channels/:organizationSlug/:channelId",i,{organizationSlug:t,channelId:o}),"updateByOrganization"),delete:n(async t=>e.delete("/channels/@me/:channelId",void 0,{channelId:t}),"delete"),deleteByOrganization:n(async(t,o)=>e.delete("/channels/:organizationSlug/:channelId",void 0,{organizationSlug:t,channelId:o}),"deleteByOrganization"),addParticipant:n(async(t,o)=>e.post("/channels/@me/:channelId/participants",o,{channelId:t}),"addParticipant"),addParticipantByOrganization:n(async(t,o,i)=>e.post("/channels/:organizationSlug/:channelId/participants",i,{organizationSlug:t,channelId:o}),"addParticipantByOrganization"),removeParticipant:n(async(t,o)=>e.delete("/channels/@me/:channelId/participants/:username",void 0,{channelId:t,username:o}),"removeParticipant"),removeParticipantByOrganization:n(async(t,o,i)=>e.delete("/channels/:organizationSlug/:channelId/participants/:username",void 0,{organizationSlug:t,channelId:o,username:i}),"removeParticipantByOrganization"),getMembers:n(async(t,o)=>e.get("/channels/@me/:channelId/members",{channelId:t,...o}),"getMembers"),getMembersByOrganization:n(async(t,o,i)=>e.get("/channels/:organizationSlug/:channelId/members",{organizationSlug:t,channelId:o,...i}),"getMembersByOrganization"),messages:bo(e)});var tc=e=>({getRates:n(()=>e.get("/currencies/rates"),"getRates"),convert:n(t=>e.post("/currencies/convert",t),"convert"),convertAmount:n((t,o,i)=>e.post("/currencies/convert",{from:t,to:o,amount:i}),"convertAmount")});var Io=e=>({getAll:n(async()=>e.get("/health"),"getAll"),database:n(async()=>e.get("/health/database"),"database"),api:n(async()=>e.get("/health/api"),"api"),app:n(async()=>e.get("/health/app"),"app")});var xo=e=>({getAll:n(async t=>e.get("/orders",t),"getAll"),get:n(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var Ro=n(e=>({account:n(async t=>e.get("/organizations/:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:n(t=>{if(B)window.location.href=e.url("/organizations/:organizationSlug/billing/link",{organizationSlug:t});else throw new Error("Billing link is only available in the browser")},"link"),dashboard:n(t=>{if(B)window.location.href=e.url("/organizations/:organizationSlug/billing/dashboard",{organizationSlug:t});else throw new Error("Billing dashboard is only available in the browser")},"dashboard")}),"organizationsBilling");var Oo=n(e=>({create:n(async(t,o,i)=>e.post("/organizations/:organizationSlug/events/:eventSlug/orders",i,{organizationSlug:t,eventSlug:o}),"create")}),"organizationsEventsOrders");var jo=n(e=>({getAll:n(async()=>e.get("/organizations/events/styles"),"getAll"),get:n(async t=>e.get("/organizations/events/styles/:styleSlug",{styleSlug:t}),"get"),create:n(async t=>e.post("/organizations/events/styles",t),"create"),update:n(async(t,o)=>e.put("/organizations/events/styles/:styleSlug",o,{styleSlug:t}),"update"),delete:n(async t=>e.delete("/organizations/events/styles/:styleSlug",null,{styleSlug:t}),"delete")}),"organizationsEventsStyles");var wo=n(e=>({getAll:n(async(t,o)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:o}),"getAll"),get:n(async(t,o,i)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:o,ticketId:i}),"get"),create:n(async(t,o,i)=>e.post("/organizations/:organizationSlug/events/:eventSlug/tickets",i,{organizationSlug:t,eventSlug:o}),"create"),update:n(async(t,o,i,a)=>e.put("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",a,{organizationSlug:t,eventSlug:o,ticketId:i}),"update"),delete:n(async(t,o,i)=>e.delete("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:o,ticketId:i}),"delete")}),"organizationsEventsTickets");var Ao=n(e=>({record:n(async(t,o)=>e.post("/organizations/:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:o}),"record")}),"organizationsEventsViews");var _o=n(e=>({search:n(async(t,o)=>e.get("/organizations/events/search",{q:t,limit:o}),"search"),getAll:n(async(t,o)=>t?e.get("/organizations/:organizationSlug/events",{organizationSlug:t,...o}):e.get("/organizations/events",o),"getAll"),getSuggestions:n(async t=>e.get("/organizations/events/suggestions",t),"getSuggestions"),getNearby:n(async t=>e.get("/organizations/events/nearby",t),"getNearby"),getPast:n(async(t,o)=>e.get("/organizations/:organizationSlug/events/past",{organizationSlug:t,...o}),"getPast"),getUpcoming:n(async(t,o)=>e.get("/organizations/:organizationSlug/events/upcoming",{organizationSlug:t,...o}),"getUpcoming"),get:n(async(t,o)=>e.get("/organizations/:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:o}),"get"),create:n(async(t,o)=>e.post("/organizations/:organizationSlug/events",o,{organizationSlug:t}),"create"),update:n(async(t,o,i)=>e.put("/organizations/:organizationSlug/events/:eventSlug",i,{organizationSlug:t,eventSlug:o}),"update"),delete:n(async(t,o)=>e.delete("/organizations/:organizationSlug/events/:eventSlug",null,{organizationSlug:t,eventSlug:o}),"delete"),uploadFile:n(async(t,o)=>e.post("/events/files/:eventFileType",Ae("file",o),{eventFileType:t}),"uploadFile"),uploadOrganizationFile:n(async(t,o,i,a)=>e.post("/organizations/:organizationSlug/events/:eventSlug/files/:eventFileType",Ae("file",a),{organizationSlug:t,eventSlug:o,eventFileType:i}),"uploadOrganizationFile"),orders:Oo(e),styles:jo(e),tickets:wo(e),views:Ao(e)}),"organizationsEvents");var zo=n(e=>({me:n(async()=>e.get("/organizations/members/@me"),"me"),get:n(async t=>e.get("/organizations/:organizationSlug/members",{organizationSlug:t}),"get"),create:n(async(t,o)=>e.post("/organizations/:organizationSlug/members",o,{organizationSlug:t}),"create"),update:n(async(t,o,i)=>e.put("/organizations/:organizationSlug/members/:userId",i,{organizationSlug:t,userId:o}),"update"),delete:n(async(t,o)=>e.delete("/organizations/:organizationSlug/members/:userId",null,{organizationSlug:t,userId:o}),"delete")}),"organizationsMembers");var Po=e=>({search:n(async(t,o)=>e.get("/organizations/search",{q:t,limit:o}),"search"),getAll:n(async()=>e.get("/organizations"),"getAll"),get:n(async t=>e.get("/organizations/:organizationSlug",{organizationSlug:t}),"get"),create:n(async t=>e.post("/organizations",t),"create"),update:n(async(t,o)=>e.put("/organizations/:organizationSlug",o,{organizationSlug:t}),"update"),delete:n(async t=>e.delete("/organizations/:organizationSlug",null,{organizationSlug:t}),"delete"),billing:Ro(e),events:_o(e),members:zo(e)});var Do=e=>({follow:n(async t=>e.post("/profiles/:username/relationships/follow",null,{username:t}),"follow"),unfollow:n(async t=>e.post("/profiles/:username/relationships/unfollow",null,{username:t}),"unfollow"),getSuggestions:n(async t=>e.get("/profiles/@me/relationships/suggestions",t),"getSuggestions"),getFollowers:n(async(t,o)=>e.get("/profiles/:username/relationships/followers",{username:t,...o}),"getFollowers")});var No=e=>({get:n(async t=>e.get("/profiles/:username",{username:t}),"get"),relationships:Do(e)});var Lo=e=>({getAll:n(async()=>e.get("/users/bookings"),"getAll"),get:n(async t=>e.get("/users/bookings/:bookingId",{bookingId:t}),"get"),me:n(async()=>e.get("/users/@me/bookings"),"me")});var Uo=e=>({me:n(async()=>e.get("/users/@me/notifications"),"me"),count:n(async t=>e.get("/users/@me/notifications/count",t),"count")});var Bo=e=>({search:n(async(t,o)=>e.get("/users/search",{q:t,limit:o}),"search"),getAll:n(async()=>e.get("/users"),"getAll"),get:n(async t=>e.get("/users/:userId",{userId:t}),"get"),me:n(async()=>e.get("/users/@me"),"me"),check:n(async(t,o)=>e.get("/users/check/:identifier",{identifier:t,suggestions:o}),"check"),update:n(async(t,o)=>e.put("/users/:userId",o,{userId:t}),"update"),uploadFile:n(async(t,o,i)=>e.post("/users/:userId/files/:userFileType",Ae("file",i),{userId:t,userFileType:o}),"uploadFile"),bookings:Lo(e),notifications:Uo(e)});var Fo=e=>({registerToBeta:n(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var Mo=class{static{n(this,"TonightPass");}client;auth;careers;channels;health;orders;organizations;profiles;users;notifications;constructor(t){this.client=new We(t),this.auth=ho(this.client),this.careers=vo(this.client),this.channels=So(this.client),this.health=Io(this.client),this.orders=xo(this.client),this.organizations=Po(this.client),this.profiles=No(this.client),this.users=Bo(this.client),this.notifications=Fo(this.client);}};
2
- exports.AddParticipantDto=Ee;exports.AddReactionDto=Ze;exports.AtLeastOneMedia=Kn;exports.AtLeastOneMediaOnUpdate=Jn;exports.BaseOrganizationEventDto=f;exports.ChannelMemberRole=Bi;exports.ChannelMessageReportReason=_e;exports.ChannelStatus=Fi;exports.ChannelType=te;exports.Client=We;exports.CreateChannelDto=ue;exports.CreateChannelMessageDto=ge;exports.CreateLocationDto=S;exports.CreateOrganizationDto=pe;exports.CreateOrganizationEventDto=pt;exports.CreateOrganizationEventOrderDto=it;exports.CreateOrganizationEventStyleDto=De;exports.CreateOrganizationEventTicketDto=d;exports.CreateOrganizationIdentityDto=M;exports.CreateOrganizationMemberDto=Ge;exports.CreateUserDto=xe;exports.CreateUserIdentityDto=U;exports.Currency=H;exports.DEFAULT_API_URL=St;exports.ErrorType=Vi;exports.GeoPointDto=j;exports.Language=mr;exports.OrganizationEventFileType=Ki;exports.OrganizationEventStyleType=Ei;exports.OrganizationEventTicketCategory=$;exports.OrganizationEventTicketType=K;exports.OrganizationEventType=X;exports.OrganizationEventVisibilityType=Z;exports.OrganizationMemberRole=Y;exports.OrganizationMemberStatus=Ji;exports.OrganizationSocialType=Ci;exports.ProfileType=fr;exports.REGEX=c;exports.RecoveryDto=gt;exports.RecoveryResetDto=Re;exports.ReportChannelMessageDto=Pe;exports.SignInUserDto=Ve;exports.TonightPass=Mo;exports.TonightPassAPIError=bt;exports.UpdateChannelDto=Xe;exports.UpdateChannelMessageDto=Qe;exports.UpdateLocationDto=I;exports.UpdateOrganizationDto=ce;exports.UpdateOrganizationEventDto=u;exports.UpdateOrganizationEventStyleDto=Dt;exports.UpdateOrganizationEventTicketDto=l;exports.UpdateOrganizationIdentityDto=V;exports.UpdateOrganizationMemberDto=ut;exports.UpdateUserDto=Oe;exports.UserFileType=sr;exports.UserIdentityGender=J;exports.UserNotificationType=or;exports.UserRole=ar;exports.UserTokenType=ir;exports.auth=ho;exports.buildFileFormData=Ae;exports.careers=vo;exports.channels=So;exports.currencies=tc;exports.health=Io;exports.isBrowser=B;exports.notifications=Fo;exports.orders=xo;exports.organizations=Po;exports.profiles=No;exports.request=yo;exports.sdk=h;exports.users=Bo;//# sourceMappingURL=index.js.map
1
+ 'use strict';require('reflect-metadata');var classValidator=require('class-validator'),classTransformer=require('class-transformer'),Di=require('redaxios'),pathcat=require('pathcat');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Di__default=/*#__PURE__*/_interopDefault(Di);var Vo=Object.defineProperty;var n=(e,t)=>Vo(e,"name",{value:t,configurable:true});var xt="https://api.tonightpass.com";var c={EMAIL:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,NAME:/^[a-zA-ZÀ-ÿ0-9-\s]+$/,SLUG:/^[a-z0-9_.]+$/,USERNAME:/^(?!\.)(?!.*\.\.)(?!.*\.$)[a-z0-9_.]{3,48}$/,PHONE:/^\+(?:[0-9] ?){6,14}[0-9]$/,PASSWORD:/^(?=.*[A-Z])(?=.*[a-z])(?=.*[\d\W]).{8,}$/,PASSWORD_MIN_LENGTH:/^.{8,}$/,PASSWORD_UPPERCASE:/^(?=.*[A-Z])/,PASSWORD_LOWERCASE:/^(?=.*[a-z])/,PASSWORD_NUMBER_SPECIAL:/^(?=.*[\d\W])/,IMAGE_URL:/^(https:\/\/|http:\/\/)(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-z]{2,6}([-a-zA-Z0-9@:%_\+.~#?&//=]*)\.(jpg|jpeg|gif|png|bmp|tiff|tga|svg)$/i};function Wo(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(Wo,"_ts_decorate");function Eo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Eo,"_ts_metadata");var ke=class{static{n(this,"AddParticipantDto");}username};Wo([classValidator.IsString(),classValidator.Matches(c.USERNAME),Eo("design:type",String)],ke.prototype,"username",void 0);var Ae=function(e){return e.Dislike="dislike",e.HarassmentSelf="harassment_self",e.HarassmentOther="harassment_other",e.SexualHarassmentSelf="sexual_harassment_self",e.NudesSelf="nudes_self",e.SexualContent="sexual_content",e.ChildInvolved="child_involved",e.ThreatTarget="threat_target",e.ViolentContent="violent_content",e.HateSpeech="hate_speech",e.Terrorism="terrorism",e.DrugSale="drug_sale",e.WeaponSale="weapon_sale",e.SelfHarmConcern="self_harm_concern",e.SelfHarmPromotion="self_harm_promotion",e.Other="other",e}({});var te=function(e){return e.Private="private",e.Group="group",e}({}),Ki=function(e){return e.Member="member",e.Admin="admin",e}({}),$i=function(e){return e.Sent="sent",e.Delivered="delivered",e.Read="read",e.Received="received",e.Opened="opened",e}({});var K=function(e){return e.EUR="EUR",e.USD="USD",e.GBP="GBP",e.BGN="BGN",e.CZK="CZK",e.DKK="DKK",e.HUF="HUF",e.PLN="PLN",e.RON="RON",e.SEK="SEK",e.CHF="CHF",e.NOK="NOK",e.ISK="ISK",e.TRY="TRY",e.RUB="RUB",e.UAH="UAH",e.BAM="BAM",e.MKD="MKD",e.ALL="ALL",e.RSD="RSD",e.MDL="MDL",e.GEL="GEL",e.BYN="BYN",e}({});var Ji=function(e){return e.AuthEmailAlreadyExists="auth.email-already-exists",e.AuthUsernameAlreadyExists="auth.username-already-exists",e.AuthPhoneNumberAlreadyExists="auth.phone-number-already-exists",e.AuthInvalidCredentials="auth.invalid-credentials",e.AuthUserNotFound="auth.user-not-found",e.AuthInvalidToken="auth.invalid-token",e.AuthTokenExpired="auth.token-expired",e.AuthUnauthorized="auth.unauthorized",e.AuthPasswordMismatch="auth.password-mismatch",e.AuthInvalidOAuth2Provider="auth.invalid-oauth2-provider",e.AuthOAuth2Error="auth.oauth2-error",e.UserNotFound="user.not-found",e.UserInvalidUsername="user.invalid-username",e.UserInvalidEmail="user.invalid-email",e.UserInvalidPhoneNumber="user.invalid-phone-number",e.UserInvalidPassword="user.invalid-password",e.UserInvalidBirthDate="user.invalid-birth-date",e.UserInvalidGender="user.invalid-gender",e.UserInvalidRole="user.invalid-role",e.UserInvalidPreferences="user.invalid-preferences",e.UserInvalidLocation="user.invalid-location",e.UserInvalidFile="user.invalid-file",e.UserFileTooLarge="user.file-too-large",e.UserUnsupportedFileType="user.unsupported-file-type",e.OrganizationNotFound="organization.not-found",e.OrganizationInvalidSlug="organization.invalid-slug",e.OrganizationInvalidName="organization.invalid-name",e.OrganizationInvalidDescription="organization.invalid-description",e.OrganizationInvalidLocation="organization.invalid-location",e.OrganizationInvalidSocialLink="organization.invalid-social-link",e.OrganizationAlreadyExists="organization.already-exists",e.OrganizationUnauthorized="organization.unauthorized",e.OrganizationMemberNotFound="organization.member-not-found",e.OrganizationMemberInvalidRole="organization.member-invalid-role",e.OrganizationMemberAlreadyExists="organization.member-already-exists",e.EventNotFound="event.not-found",e.EventInvalidTitle="event.invalid-title",e.EventInvalidDescription="event.invalid-description",e.EventInvalidLocation="event.invalid-location",e.EventInvalidDates="event.invalid-dates",e.EventInvalidTickets="event.invalid-tickets",e.EventInvalidStyles="event.invalid-styles",e.EventInvalidType="event.invalid-type",e.EventInvalidVisibility="event.invalid-visibility",e.EventUnavailable="event.unavailable",e.EventTicketNotFound="event.ticket-not-found",e.EventTicketUnavailable="event.ticket-unavailable",e.EventTicketInvalidQuantity="event.ticket-invalid-quantity",e.OrderNotFound="order.not-found",e.OrderInvalidStatus="order.invalid-status",e.OrderInvalidPayment="order.invalid-payment",e.OrderPaymentFailed="order.payment-failed",e.OrderAlreadyPaid="order.already-paid",e.OrderCancelled="order.cancelled",e.OrderRefunded="order.refunded",e.OrderExpired="order.expired",e.BookingNotFound="booking.not-found",e.BookingInvalidStatus="booking.invalid-status",e.BookingInvalidTickets="booking.invalid-tickets",e.BookingTicketNotFound="booking.ticket-not-found",e.BookingTicketInvalidToken="booking.ticket-invalid-token",e.BookingTicketExpired="booking.ticket-expired",e.BookingTicketUsed="booking.ticket-used",e.FileNotFound="file.not-found",e.FileInvalidType="file.invalid-type",e.FileTooLarge="file.too-large",e.FileUploadFailed="file.upload-failed",e.ValidationError="validation.error",e.DatabaseError="database.error",e.InternalServerError="server.internal-error",e.NotFound="not-found",e.BadRequest="bad-request",e.Unauthorized="unauthorized",e.Forbidden="forbidden",e.TooManyRequests="too-many-requests",e.ServiceUnavailable="service-unavailable",e.TooManyRequestsAuth="rate-limit.auth",e.TooManyRequestsApi="rate-limit.api",e.WebhookInvalidSignature="webhook.invalid-signature",e.WebhookInvalidEvent="webhook.invalid-event",e.WebhookProcessingFailed="webhook.processing-failed",e.PaymentRequired="payment.required",e.PaymentMethodRequired="payment.method-required",e.PaymentFailed="payment.failed",e.PaymentCancelled="payment.cancelled",e.PaymentRefunded="payment.refunded",e.BillingInvalidAccount="billing.invalid-account",e.BillingAccountRequired="billing.account-required",e.NotificationInvalidType="notification.invalid-type",e.NotificationSendingFailed="notification.sending-failed",e.CacheError="cache.error",e.CacheMiss="cache.miss",e.ExternalServiceError="external-service.error",e.ExternalServiceTimeout="external-service.timeout",e.ExternalServiceUnavailable="external-service.unavailable",e}({});var $=function(e){return e.ETicket="e-ticket",e.Other="other",e}({}),X=function(e){return e.Entry="entry",e.Package="package",e.Meal="meal",e.Drink="drink",e.Parking="parking",e.Accommodation="accommodation",e.Camping="camping",e.Locker="locker",e.Shuttle="shuttle",e.Other="other",e}({});var Ti=function(e){return e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art",e}({});var Z=function(e){return e.Clubbing="clubbing",e.Concert="concert",e.Afterwork="afterwork",e.DancingLunch="dancing_lunch",e.Diner="diner",e.Garden="garden",e.AfterBeach="after_beach",e.Festival="festival",e.Spectacle="spectacle",e.Cruise="cruise",e.OutsideAnimation="outside_animation",e.Sport="sport",e.Match="match",e.Seminar="seminar",e.Conference="conference",e.WellnessDay="wellness_day",e.Workshop="workshop",e.TradeFair="trade_fair",e.ConsumerShow="consumer_show",e.Membership="membership",e}({}),Y=function(e){return e.Public="public",e.Unlisted="unlisted",e.Private="private",e}({}),tr=function(e){return e.Flyer="flyer",e.Trailer="trailer",e}({});var ar=function(e){return e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected",e}({}),I=function(e){return e.Member="member",e.Manager="manager",e.Admin="admin",e.Owner="owner",e}({});var pr=function(e){return e.InvitationLink="invitation_link",e}({});var dr=function(e){return e.Facebook="facebook",e.Twitter="twitter",e.Instagram="instagram",e.Linkedin="linkedin",e.Youtube="youtube",e.Website="website",e}({});var gr=function(e){return e.Follow="follow",e}({});var hr=function(e){return e.Authentication="authentication",e.BookingTicket="booking_ticket",e.OrganizationInvite="organization_invite",e.PasswordRecovery="password_recovery",e.EmailValidation="email_validation",e.PhoneValidation="phone_validation",e}({});var br=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),J=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),Ir=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var jr=function(e){return e.User="user",e.Organization="organization",e}({});var _r=function(e){return e.FR="fr",e.EN="en",e}({});function Ke(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(Ke,"_ts_decorate");function $e(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n($e,"_ts_metadata");var ue=class{static{n(this,"CreateChannelDto");}type;participantUsernames;name};Ke([classValidator.IsEnum(te),$e("design:type",typeof te>"u"?Object:te)],ue.prototype,"type",void 0);Ke([classValidator.IsArray(),classValidator.ArrayMinSize(1),classValidator.ValidateIf(e=>e.type===te.Private),classValidator.ArrayMaxSize(2,{message:"Private channels can only have 2 participants"}),classValidator.ValidateIf(e=>e.type===te.Group),classValidator.ArrayMinSize(3,{message:"Group channels must have at least 3 participants"}),classValidator.ArrayMaxSize(50,{message:"Group channels can have at most 50 participants"}),classValidator.IsString({each:true}),classValidator.Matches(c.USERNAME,{each:true}),$e("design:type",Array)],ue.prototype,"participantUsernames",void 0);Ke([classValidator.IsOptional(),classValidator.ValidateIf(e=>e.type===te.Group),classValidator.IsString(),classValidator.Length(1,100),$e("design:type",String)],ue.prototype,"name",void 0);function Jo(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(Jo,"_ts_decorate");function Qo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Qo,"_ts_metadata");var Xe=class{static{n(this,"UpdateChannelDto");}name};Jo([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,100),Qo("design:type",String)],Xe.prototype,"name",void 0);function tn(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(tn,"_ts_decorate");function on(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(on,"_ts_metadata");var Ze=class{static{n(this,"AddReactionDto");}emoji};tn([classValidator.IsString(),classValidator.Length(1,10),on("design:type",String)],Ze.prototype,"emoji",void 0);function ze(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(ze,"_ts_decorate");function Ye(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Ye,"_ts_metadata");exports.ContentOrAttachmentsConstraint=class me{static{n(this,"ContentOrAttachmentsConstraint");}validate(t,o){let r=o.object,a=!!(r.content&&r.content.trim().length>0),i=!!(r.attachments&&r.attachments.length>0);return a||i}defaultMessage(t){return "Either content or attachments must be provided"}};exports.ContentOrAttachmentsConstraint=ze([classValidator.ValidatorConstraint({name:"contentOrAttachments",async:false})],exports.ContentOrAttachmentsConstraint);var ge=class{static{n(this,"CreateChannelMessageDto");}content;attachments;replyToId};ze([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.content!==void 0),classValidator.Length(1,1024),Ye("design:type",String)],ge.prototype,"content",void 0);ze([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ArrayMaxSize(10),classValidator.Matches(/^channels\/[\w-]+\/messages\/[\w-]+\/private\/[\w-]+$/,{each:true}),classValidator.Validate(exports.ContentOrAttachmentsConstraint),Ye("design:type",Array)],ge.prototype,"attachments",void 0);ze([classValidator.IsOptional(),classValidator.IsMongoId(),Ye("design:type",String)],ge.prototype,"replyToId",void 0);function gn(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(gn,"_ts_decorate");function yn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(yn,"_ts_metadata");var Qe=class{static{n(this,"UpdateChannelMessageDto");}content};gn([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,1024),yn("design:type",String)],Qe.prototype,"content",void 0);function wt(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(wt,"_ts_decorate");function _t(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(_t,"_ts_metadata");var Pe=class{static{n(this,"ReportChannelMessageDto");}reason;description};wt([classValidator.IsEnum(Ae),_t("design:type",typeof Ae>"u"?Object:Ae)],Pe.prototype,"reason",void 0);wt([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.description&&e.description.trim().length>0),classValidator.Length(1,500),_t("design:type",String)],Pe.prototype,"description",void 0);function M(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(M,"_ts_decorate");function Q(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Q,"_ts_metadata");var Ce=class{static{n(this,"CoordinatesRangeConstraint");}validate(t){if(!Array.isArray(t)||t.length!==2)return false;let[o,r]=t;return r>=-90&&r<=90&&o>=-180&&o<=180}defaultMessage(){return "Coordinates must be within valid geographic ranges"}};Ce=M([classValidator.ValidatorConstraint({name:"coordinatesRange",async:false})],Ce);var w=class{static{n(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point";}};M([classValidator.IsString(),classValidator.IsNotEmpty(),Q("design:type",String)],w.prototype,"type",void 0);M([classValidator.IsArray(),classValidator.IsNotEmpty(),classValidator.Validate(Ce),Q("design:type",Array)],w.prototype,"coordinates",void 0);var S=class{static{n(this,"CreateLocationDto");}name;address;zipCode;city;country;geometry};M([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),Q("design:type",String)],S.prototype,"name",void 0);M([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,256),Q("design:type",String)],S.prototype,"address",void 0);M([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),Q("design:type",String)],S.prototype,"zipCode",void 0);M([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),Q("design:type",String)],S.prototype,"city",void 0);M([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),Q("design:type",String)],S.prototype,"country",void 0);M([classValidator.ValidateNested(),classTransformer.Type(()=>w),classValidator.IsNotEmpty(),Q("design:type",typeof w>"u"?Object:w)],S.prototype,"geometry",void 0);function re(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(re,"_ts_decorate");function ae(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ae,"_ts_metadata");var x=class{static{n(this,"UpdateLocationDto");}name;address;zipCode;city;country;geometry};re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),ae("design:type",String)],x.prototype,"name",void 0);re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,256),ae("design:type",String)],x.prototype,"address",void 0);re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),ae("design:type",String)],x.prototype,"zipCode",void 0);re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),ae("design:type",String)],x.prototype,"city",void 0);re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),ae("design:type",String)],x.prototype,"country",void 0);re([classValidator.IsOptional(),classValidator.ValidateNested(),classTransformer.Type(()=>w),ae("design:type",typeof w>"u"?Object:w)],x.prototype,"geometry",void 0);function q(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(q,"_ts_decorate");function V(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(V,"_ts_metadata");var pe=class{static{n(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};q([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),V("design:type",String)],pe.prototype,"organizationSlug",void 0);q([classValidator.IsObject(),V("design:type",typeof G>"u"?Object:G)],pe.prototype,"identity",void 0);q([classValidator.IsArray(),V("design:type",Array)],pe.prototype,"members",void 0);q([classValidator.IsOptional(),classValidator.IsObject(),V("design:type",typeof Location>"u"?Object:Location)],pe.prototype,"location",void 0);var G=class{static{n(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};q([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),V("design:type",String)],G.prototype,"displayName",void 0);q([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),V("design:type",String)],G.prototype,"description",void 0);q([classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//),V("design:type",String)],G.prototype,"avatarUrl",void 0);q([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//),V("design:type",String)],G.prototype,"bannerUrl",void 0);q([classValidator.IsOptional(),classValidator.IsArray(),V("design:type",Array)],G.prototype,"socialLinks",void 0);function E(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(E,"_ts_decorate");function k(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(k,"_ts_metadata");var ce=class{static{n(this,"UpdateOrganizationDto");}slug;identity;members;location};E([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME),k("design:type",String)],ce.prototype,"slug",void 0);E([classValidator.IsObject(),classValidator.IsOptional(),k("design:type",typeof W>"u"?Object:W)],ce.prototype,"identity",void 0);E([classValidator.IsOptional(),classValidator.IsArray(),k("design:type",Array)],ce.prototype,"members",void 0);E([classValidator.IsOptional(),classValidator.IsObject(),k("design:type",typeof Location>"u"?Object:Location)],ce.prototype,"location",void 0);var W=class{static{n(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};E([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),k("design:type",String)],W.prototype,"displayName",void 0);E([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),k("design:type",String)],W.prototype,"description",void 0);E([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//),k("design:type",String)],W.prototype,"avatarUrl",void 0);E([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//),k("design:type",String)],W.prototype,"bannerUrl",void 0);E([classValidator.IsOptional(),classValidator.IsArray(),k("design:type",Array)],W.prototype,"socialLinks",void 0);function Mn(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(Mn,"_ts_decorate");function Gn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Gn,"_ts_metadata");var it=class{static{n(this,"CreateOrganizationEventOrderDto");}cart};Mn([classValidator.IsArray(),classValidator.IsString({each:true}),Gn("design:type",Array)],it.prototype,"cart",void 0);var De=class{static{n(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var Lt=class extends De{static{n(this,"UpdateOrganizationEventStyleDto");}};function _(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(_,"_ts_decorate");function A(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(A,"_ts_metadata");var d=class{static{n(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};_([classValidator.IsString(),classValidator.Length(1,128),A("design:type",String)],d.prototype,"name",void 0);_([classValidator.IsString(),classValidator.Length(0,1024),classValidator.IsOptional(),A("design:type",String)],d.prototype,"description",void 0);_([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),A("design:type",Number)],d.prototype,"price",void 0);_([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),A("design:type",Number)],d.prototype,"quantity",void 0);_([classValidator.IsEnum($),A("design:type",typeof $>"u"?Object:$)],d.prototype,"type",void 0);_([classValidator.IsEnum(X),A("design:type",typeof X>"u"?Object:X)],d.prototype,"category",void 0);_([classValidator.IsEnum(K),A("design:type",typeof K>"u"?Object:K)],d.prototype,"currency",void 0);_([classValidator.IsBoolean(),A("design:type",Boolean)],d.prototype,"isVisible",void 0);_([classValidator.IsBoolean(),A("design:type",Boolean)],d.prototype,"isFeesIncluded",void 0);_([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),A("design:type",typeof Date>"u"?Object:Date)],d.prototype,"startAt",void 0);_([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),A("design:type",typeof Date>"u"?Object:Date)],d.prototype,"endAt",void 0);function z(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(z,"_ts_decorate");function P(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(P,"_ts_metadata");var l=class{static{n(this,"UpdateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};z([classValidator.IsString(),classValidator.Length(1,128),classValidator.IsOptional(),P("design:type",String)],l.prototype,"name",void 0);z([classValidator.IsString(),classValidator.Length(0,1024),classValidator.IsOptional(),P("design:type",String)],l.prototype,"description",void 0);z([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),P("design:type",Number)],l.prototype,"price",void 0);z([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),P("design:type",Number)],l.prototype,"quantity",void 0);z([classValidator.IsEnum($),classValidator.IsOptional(),P("design:type",typeof $>"u"?Object:$)],l.prototype,"type",void 0);z([classValidator.IsEnum(X),classValidator.IsOptional(),P("design:type",typeof X>"u"?Object:X)],l.prototype,"category",void 0);z([classValidator.IsEnum(K),classValidator.IsOptional(),P("design:type",typeof K>"u"?Object:K)],l.prototype,"currency",void 0);z([classValidator.IsBoolean(),classValidator.IsOptional(),P("design:type",Boolean)],l.prototype,"isVisible",void 0);z([classValidator.IsBoolean(),classValidator.IsOptional(),P("design:type",Boolean)],l.prototype,"isFeesIncluded",void 0);z([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),P("design:type",typeof Date>"u"?Object:Date)],l.prototype,"startAt",void 0);z([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),P("design:type",typeof Date>"u"?Object:Date)],l.prototype,"endAt",void 0);function v(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(v,"_ts_decorate");function R(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(R,"_ts_metadata");exports.AtLeastOneMediaConstraint=class Ie{static{n(this,"AtLeastOneMediaConstraint");}validate(t,o){let r=o.object,a=r.flyers||[],i=r.trailers||[];return a.length>0||i.length>0}defaultMessage(){return "At least one flyer or trailer must be provided"}};exports.AtLeastOneMediaConstraint=v([classValidator.ValidatorConstraint({name:"atLeastOneMedia",async:false})],exports.AtLeastOneMediaConstraint);function Xn(e){return function(t,o){classValidator.registerDecorator({target:t.constructor,propertyName:o,options:e,constraints:[],validator:exports.AtLeastOneMediaConstraint});}}n(Xn,"AtLeastOneMedia");var f=class{static{n(this,"BaseOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;styles;startAt;endAt};v([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,64),R("design:type",String)],f.prototype,"title",void 0);v([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.SLUG),R("design:type",String)],f.prototype,"slug",void 0);v([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(16,2048),R("design:type",String)],f.prototype,"description",void 0);v([classValidator.IsEnum(Z),classValidator.IsNotEmpty(),R("design:type",typeof Z>"u"?Object:Z)],f.prototype,"type",void 0);v([classValidator.IsEnum(Y),classValidator.IsNotEmpty(),R("design:type",typeof Y>"u"?Object:Y)],f.prototype,"visibility",void 0);v([classValidator.IsArray(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/)/,{each:true}),Xn(),R("design:type",Array)],f.prototype,"flyers",void 0);v([classValidator.IsArray(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/)/,{each:true}),R("design:type",Array)],f.prototype,"trailers",void 0);v([classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>S),classValidator.IsNotEmpty(),R("design:type",typeof S>"u"?Object:S)],f.prototype,"location",void 0);v([classValidator.IsArray(),classValidator.IsString({each:true}),classValidator.ArrayMinSize(1),R("design:type",Array)],f.prototype,"styles",void 0);v([classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),classValidator.IsNotEmpty(),classValidator.MinDate(new Date),R("design:type",typeof Date>"u"?Object:Date)],f.prototype,"startAt",void 0);v([classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),classValidator.IsNotEmpty(),classValidator.MinDate(new Date),R("design:type",typeof Date>"u"?Object:Date)],f.prototype,"endAt",void 0);var pt=class extends f{static{n(this,"CreateOrganizationEventDto");}tickets};v([classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>d),classValidator.IsNotEmpty(),R("design:type",Array)],pt.prototype,"tickets",void 0);function b(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(b,"_ts_decorate");function O(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(O,"_ts_metadata");exports.AtLeastOneMediaOnUpdateConstraint=class Se{static{n(this,"AtLeastOneMediaOnUpdateConstraint");}validate(t,o){let r=o.object;return r.flyers!==void 0&&r.trailers!==void 0?r.flyers.length>0||r.trailers.length>0:r.flyers!==void 0&&r.trailers===void 0?r.flyers.length>0:r.trailers!==void 0&&r.flyers===void 0?r.trailers.length>0:true}defaultMessage(){return "Cannot remove all media from event. At least one flyer or trailer must remain"}};exports.AtLeastOneMediaOnUpdateConstraint=b([classValidator.ValidatorConstraint({name:"atLeastOneMediaOnUpdate",async:false})],exports.AtLeastOneMediaOnUpdateConstraint);function Cn(e){return function(t,o){classValidator.registerDecorator({target:t.constructor,propertyName:o,options:e,constraints:[],validator:exports.AtLeastOneMediaOnUpdateConstraint});}}n(Cn,"AtLeastOneMediaOnUpdate");var u=class{static{n(this,"UpdateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;startAt;endAt};b([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,64),O("design:type",String)],u.prototype,"title",void 0);b([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.SLUG),O("design:type",String)],u.prototype,"slug",void 0);b([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(16,2048),O("design:type",String)],u.prototype,"description",void 0);b([classValidator.IsOptional(),classValidator.IsEnum(Z),O("design:type",typeof Z>"u"?Object:Z)],u.prototype,"type",void 0);b([classValidator.IsOptional(),classValidator.IsEnum(Y),O("design:type",typeof Y>"u"?Object:Y)],u.prototype,"visibility",void 0);b([classValidator.IsOptional(),classValidator.IsArray(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/)/,{each:true}),Cn(),O("design:type",Array)],u.prototype,"flyers",void 0);b([classValidator.IsOptional(),classValidator.IsArray(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/)/,{each:true}),O("design:type",Array)],u.prototype,"trailers",void 0);b([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>x),O("design:type",typeof x>"u"?Object:x)],u.prototype,"location",void 0);b([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>l),O("design:type",Array)],u.prototype,"tickets",void 0);b([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsString({each:true}),O("design:type",Array)],u.prototype,"styles",void 0);b([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),classValidator.MinDate(new Date),O("design:type",typeof Date>"u"?Object:Date)],u.prototype,"startAt",void 0);b([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),classValidator.MinDate(new Date),O("design:type",typeof Date>"u"?Object:Date)],u.prototype,"endAt",void 0);function io(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(io,"_ts_decorate");function ro(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ro,"_ts_metadata");var Ge=class{static{n(this,"CreateOrganizationMemberDto");}user;role};io([classValidator.IsString(),classValidator.IsNotEmpty(),ro("design:type",String)],Ge.prototype,"user",void 0);io([classValidator.IsEnum(I),classValidator.IsNotEmpty(),ro("design:type",typeof I>"u"?Object:I)],Ge.prototype,"role",void 0);function ti(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(ti,"_ts_decorate");function oi(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(oi,"_ts_metadata");var ut=class{static{n(this,"UpdateOrganizationMemberDto");}role};ti([classValidator.IsEnum(I),classValidator.IsNotEmpty(),oi("design:type",typeof I>"u"?Object:I)],ut.prototype,"role",void 0);function ri(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(ri,"_ts_decorate");function ai(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(ai,"_ts_metadata");var mt=class{static{n(this,"AcceptOrganizationMemberInvitationDto");}token};ri([classValidator.IsString(),classValidator.IsNotEmpty(),ai("design:type",String)],mt.prototype,"token",void 0);function ci(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(ci,"_ts_decorate");function di(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(di,"_ts_metadata");var gt=class{static{n(this,"CreateOrganizationMemberInvitationLinkDto");}role};ci([classValidator.IsEnum(I),classValidator.IsOptional(),di("design:type",typeof I>"u"?Object:I)],gt.prototype,"role",void 0);function N(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(N,"_ts_decorate");function L(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(L,"_ts_metadata");var xe=class{static{n(this,"CreateUserDto");}identifier;identity;password};N([classValidator.ValidateNested(),classTransformer.Type(()=>de),L("design:type",typeof de>"u"?Object:de)],xe.prototype,"identifier",void 0);N([classValidator.ValidateNested(),classTransformer.Type(()=>B),L("design:type",typeof B>"u"?Object:B)],xe.prototype,"identity",void 0);N([classValidator.IsString(),classValidator.Matches(c.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(c.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(c.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(c.PASSWORD,{message:"Password must be secure."}),L("design:type",String)],xe.prototype,"password",void 0);var de=class{static{n(this,"CreateUserIdentifierDto");}email;phoneNumber;username};N([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),L("design:type",String)],de.prototype,"email",void 0);N([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),L("design:type",String)],de.prototype,"phoneNumber",void 0);N([classValidator.IsString(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME),L("design:type",String)],de.prototype,"username",void 0);var B=class{static{n(this,"CreateUserIdentityDto");}firstName;lastName;gender;avatarUrl;birthDate};N([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"First name must be composed of letters only"}),L("design:type",String)],B.prototype,"firstName",void 0);N([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"Last name must be composed of letters only"}),L("design:type",String)],B.prototype,"lastName",void 0);N([classValidator.IsEnum(J),L("design:type",typeof J>"u"?Object:J)],B.prototype,"gender",void 0);N([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/avatars\//),L("design:type",String)],B.prototype,"avatarUrl",void 0);N([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>{if(!e)return;let t=new Date(e);return isNaN(t.getTime())?e:t}),classValidator.IsDate(),L("design:type",typeof Date>"u"?Object:Date)],B.prototype,"birthDate",void 0);function bi(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(bi,"_ts_decorate");function Ii(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(Ii,"_ts_metadata");var ht=class{static{n(this,"RecoveryDto");}identifier};bi([classValidator.IsNotEmpty(),classValidator.IsString(),Ii("design:type",String)],ht.prototype,"identifier",void 0);function vt(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(vt,"_ts_decorate");function bt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(bt,"_ts_metadata");var Re=class{static{n(this,"RecoveryResetDto");}tokenId;tokenValue;password};vt([classValidator.IsString(),classValidator.IsNotEmpty(),bt("design:type",String)],Re.prototype,"tokenId",void 0);vt([classValidator.IsString(),classValidator.IsNotEmpty(),bt("design:type",String)],Re.prototype,"tokenValue",void 0);vt([classValidator.Matches(c.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(c.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(c.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(c.PASSWORD,{message:"Password must be secure."}),classValidator.IsNotEmpty({message:"Password is required"}),bt("design:type",String)],Re.prototype,"password",void 0);function lo(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(lo,"_ts_decorate");function fo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(fo,"_ts_metadata");var Ve=class{static{n(this,"SignInUserDto");}identifier;password};lo([classValidator.IsNotEmpty(),classValidator.IsString(),fo("design:type",String)],Ve.prototype,"identifier",void 0);lo([classValidator.IsNotEmpty(),classValidator.IsString(),fo("design:type",String)],Ve.prototype,"password",void 0);function m(e,t,o,r){var a=arguments.length,i=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i}n(m,"_ts_decorate");function g(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}n(g,"_ts_metadata");var Oe=class{static{n(this,"UpdateUserDto");}identifier;identity;password};m([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>fe),g("design:type",typeof fe>"u"?Object:fe)],Oe.prototype,"identifier",void 0);m([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>U),g("design:type",typeof U>"u"?Object:U)],Oe.prototype,"identity",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(8),classValidator.MaxLength(128),g("design:type",String)],Oe.prototype,"password",void 0);var fe=class{static{n(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),g("design:type",String)],fe.prototype,"email",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),g("design:type",String)],fe.prototype,"phoneNumber",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME),g("design:type",String)],fe.prototype,"username",void 0);var U=class{static{n(this,"UpdateUserIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate};m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"First name must be composed of letters only"}),g("design:type",String)],U.prototype,"firstName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"Last name must be composed of letters only"}),g("design:type",String)],U.prototype,"lastName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),g("design:type",String)],U.prototype,"displayName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),g("design:type",String)],U.prototype,"description",void 0);m([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/avatars\//),g("design:type",Object)],U.prototype,"avatarUrl",void 0);m([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/banners\//),g("design:type",Object)],U.prototype,"bannerUrl",void 0);m([classValidator.IsOptional(),classValidator.IsEnum(J),g("design:type",typeof J>"u"?Object:J)],U.prototype,"gender",void 0);m([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),g("design:type",typeof Date>"u"?Object:Date)],U.prototype,"birthDate",void 0);var F=typeof window<"u";function _e(e,t){let o=new FormData;return t instanceof File?o.append(e,t):t instanceof FileList?Array.from(t).forEach(r=>o.append(e,r)):t.forEach(r=>o.append(e,r)),o}n(_e,"buildFileFormData");var Ni=Di__default.default.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!F&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[function(e,t){return e instanceof FormData?(t&&typeof t=="object"&&"Content-Type"in t&&delete t["Content-Type"],e):(t&&(t["Content-Type"]="application/json"),JSON.stringify(e))}],withCredentials:F}),vo=n(async(e,t)=>Ni(e,{...t}).then(r=>r).catch(r=>{throw r.data||console.error(r),r.data}),"request");var St=class extends Error{static{n(this,"TonightPassAPIError");}response;data;status;constructor(t,o){super(o.message),this.response=t,this.data=o,this.status=t.status;}},We=class{static{n(this,"Client");}options;url;constructor(t){this.options=t,this.url=(o,r)=>{let a=this.options.baseURL||xt;return pathcat.pathcat(a,o,r)};}setOptions(t){this.options=t;}async get(t,o,r){return this.requester("GET",t,void 0,o,r)}async post(t,o,r,a){return this.requester("POST",t,o,r,a)}async put(t,o,r,a){return this.requester("PUT",t,o,r,a)}async patch(t,o,r,a){return this.requester("PATCH",t,o,r,a)}async delete(t,o,r,a){return this.requester("DELETE",t,o,r,a)}async requester(t,o,r,a={},i={}){let s=this.url(o,a);if(r!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let p=await vo(s,{method:t,data:r,...i}),Ee=p.data;if(!Ee.success)throw new St(p,Ee);return Ee.data}};function h(e){return e}n(h,"sdk");var bo=e=>({signIn:n(async t=>e.post("/auth/sign-in",t),"signIn"),signUp:n(async t=>e.post("/auth/sign-up",t),"signUp"),signOut:n(async()=>e.post("/auth/sign-out",null),"signOut"),refreshToken:n(async()=>e.post("/auth/refresh-token",null),"refreshToken"),recovery:n(async t=>e.post("/auth/recovery",t),"recovery"),recoveryReset:n(async t=>e.post("/auth/recovery/reset",t),"recoveryReset"),oauth2:{google:{connect:n(t=>{if(F)window.location.href=e.url("/oauth2/google",t||{});else throw new Error("Google OAuth2 is only available in the browser")},"connect")},twitter:{connect:n(t=>{if(F)window.location.href=e.url("/oauth2/twitter",t||{});else throw new Error("Twitter OAuth2 is only available in the browser")},"connect")},facebook:{connect:n(t=>{if(F)window.location.href=e.url("/oauth2/facebook",t||{});else throw new Error("Facebook OAuth2 is only available in the browser")},"connect")}}});var Io=e=>({categories:{getAll:n(async t=>e.get("/careers/categories",t),"getAll")},employmentTypes:{getAll:n(async t=>e.get("/careers/employmentTypes",t),"getAll")},jobs:{getAll:n(async t=>e.get("/careers/jobs",t),"getAll"),get:n(async t=>e.get("/careers/jobs/:jobId",{jobId:t}),"get")},offices:{getAll:n(async t=>e.get("/careers/offices",t),"getAll")}});var So=e=>({getAll:n(async(t,o)=>e.get("/channels/@me/:channelId/messages",{channelId:t,...o}),"getAll"),getAllByOrganization:n(async(t,o,r)=>e.get("/channels/:organizationSlug/:channelId/messages",{organizationSlug:t,channelId:o,...r}),"getAllByOrganization"),get:n(async(t,o)=>e.get("/channels/@me/:channelId/messages/:messageId",{channelId:t,messageId:o}),"get"),getByOrganization:n(async(t,o,r)=>e.get("/channels/:organizationSlug/:channelId/messages/:messageId",{organizationSlug:t,channelId:o,messageId:r}),"getByOrganization"),create:n(async(t,o)=>e.post("/channels/@me/:channelId/messages",o,{channelId:t}),"create"),createByOrganization:n(async(t,o,r)=>e.post("/channels/:organizationSlug/:channelId/messages",r,{organizationSlug:t,channelId:o}),"createByOrganization"),update:n(async(t,o,r)=>e.put("/channels/@me/:channelId/messages/:messageId",r,{channelId:t,messageId:o}),"update"),updateByOrganization:n(async(t,o,r,a)=>e.put("/channels/:organizationSlug/:channelId/messages/:messageId",a,{organizationSlug:t,channelId:o,messageId:r}),"updateByOrganization"),delete:n(async(t,o)=>e.delete("/channels/@me/:channelId/messages/:messageId",void 0,{channelId:t,messageId:o}),"delete"),deleteByOrganization:n(async(t,o,r)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId",void 0,{organizationSlug:t,channelId:o,messageId:r}),"deleteByOrganization"),addReaction:n(async(t,o,r)=>e.post("/channels/@me/:channelId/messages/:messageId/reactions",r,{channelId:t,messageId:o}),"addReaction"),addReactionByOrganization:n(async(t,o,r,a)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/reactions",a,{organizationSlug:t,channelId:o,messageId:r}),"addReactionByOrganization"),removeReaction:n(async(t,o,r)=>e.delete("/channels/@me/:channelId/messages/:messageId/reactions/:emoji",void 0,{channelId:t,messageId:o,emoji:r}),"removeReaction"),removeReactionByOrganization:n(async(t,o,r,a)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji",void 0,{organizationSlug:t,channelId:o,messageId:r,emoji:a}),"removeReactionByOrganization"),markAsRead:n(async(t,o)=>e.post("/channels/@me/:channelId/messages/:messageId/read",null,{channelId:t,messageId:o}),"markAsRead"),markAsReadByOrganization:n(async(t,o,r)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/read",null,{organizationSlug:t,channelId:o,messageId:r}),"markAsReadByOrganization"),uploadFile:n(async(t,o)=>e.post("/channels/@me/:channelId/files",o,{channelId:t}),"uploadFile"),uploadFileByOrganization:n(async(t,o,r)=>e.post("/channels/:organizationSlug/:channelId/files",r,{organizationSlug:t,channelId:o}),"uploadFileByOrganization"),report:n(async(t,o,r)=>e.post("/channels/@me/:channelId/messages/:messageId/report",r,{channelId:t,messageId:o}),"report"),reportByOrganization:n(async(t,o,r,a)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/report",a,{organizationSlug:t,channelId:o,messageId:r}),"reportByOrganization")});var xo=e=>({me:n(async t=>e.get("/channels/@me",t),"me"),getByOrganization:n(async(t,o)=>e.get("/channels/:organizationSlug",{organizationSlug:t,...o}),"getByOrganization"),countMe:n(async t=>e.get("/users/@me/channels/count",t),"countMe"),countByOrganization:n(async(t,o)=>e.get("/users/:organizationSlug/channels/count",{organizationSlug:t,...o}),"countByOrganization"),get:n(async t=>e.get("/channels/@me/:channelId",{channelId:t}),"get"),getByOrganizationChannel:n(async(t,o)=>e.get("/channels/:organizationSlug/:channelId",{organizationSlug:t,channelId:o}),"getByOrganizationChannel"),create:n(async t=>e.post("/channels/@me",t),"create"),createByOrganization:n(async(t,o)=>e.post("/channels/:organizationSlug",o,{organizationSlug:t}),"createByOrganization"),update:n(async(t,o)=>e.put("/channels/@me/:channelId",o,{channelId:t}),"update"),updateByOrganization:n(async(t,o,r)=>e.put("/channels/:organizationSlug/:channelId",r,{organizationSlug:t,channelId:o}),"updateByOrganization"),delete:n(async t=>e.delete("/channels/@me/:channelId",void 0,{channelId:t}),"delete"),deleteByOrganization:n(async(t,o)=>e.delete("/channels/:organizationSlug/:channelId",void 0,{organizationSlug:t,channelId:o}),"deleteByOrganization"),addParticipant:n(async(t,o)=>e.post("/channels/@me/:channelId/participants",o,{channelId:t}),"addParticipant"),addParticipantByOrganization:n(async(t,o,r)=>e.post("/channels/:organizationSlug/:channelId/participants",r,{organizationSlug:t,channelId:o}),"addParticipantByOrganization"),removeParticipant:n(async(t,o)=>e.delete("/channels/@me/:channelId/participants/:username",void 0,{channelId:t,username:o}),"removeParticipant"),removeParticipantByOrganization:n(async(t,o,r)=>e.delete("/channels/:organizationSlug/:channelId/participants/:username",void 0,{organizationSlug:t,channelId:o,username:r}),"removeParticipantByOrganization"),getMembers:n(async(t,o)=>e.get("/channels/@me/:channelId/members",{channelId:t,...o}),"getMembers"),getMembersByOrganization:n(async(t,o,r)=>e.get("/channels/:organizationSlug/:channelId/members",{organizationSlug:t,channelId:o,...r}),"getMembersByOrganization"),messages:So(e)});var Rc=e=>({getRates:n(()=>e.get("/currencies/rates"),"getRates"),convert:n(t=>e.post("/currencies/convert",t),"convert"),convertAmount:n((t,o,r)=>e.post("/currencies/convert",{from:t,to:o,amount:r}),"convertAmount")});var Ro=e=>({getAll:n(async()=>e.get("/health"),"getAll"),database:n(async()=>e.get("/health/database"),"database"),api:n(async()=>e.get("/health/api"),"api"),app:n(async()=>e.get("/health/app"),"app")});var Oo=e=>({getAll:n(async t=>e.get("/orders",t),"getAll"),get:n(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var jo=n(e=>({account:n(async t=>e.get("/organizations/:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:n(t=>{if(F)window.location.href=e.url("/organizations/:organizationSlug/billing/link",{organizationSlug:t});else throw new Error("Billing link is only available in the browser")},"link"),dashboard:n(t=>{if(F)window.location.href=e.url("/organizations/:organizationSlug/billing/dashboard",{organizationSlug:t});else throw new Error("Billing dashboard is only available in the browser")},"dashboard")}),"organizationsBilling");var wo=n(e=>({create:n(async(t,o,r)=>e.post("/organizations/:organizationSlug/events/:eventSlug/orders",r,{organizationSlug:t,eventSlug:o}),"create")}),"organizationsEventsOrders");var _o=n(e=>({getAll:n(async()=>e.get("/organizations/events/styles"),"getAll"),get:n(async t=>e.get("/organizations/events/styles/:styleSlug",{styleSlug:t}),"get"),create:n(async t=>e.post("/organizations/events/styles",t),"create"),update:n(async(t,o)=>e.put("/organizations/events/styles/:styleSlug",o,{styleSlug:t}),"update"),delete:n(async t=>e.delete("/organizations/events/styles/:styleSlug",null,{styleSlug:t}),"delete")}),"organizationsEventsStyles");var Ao=n(e=>({getAll:n(async(t,o)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:o}),"getAll"),get:n(async(t,o,r)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:o,ticketId:r}),"get"),create:n(async(t,o,r)=>e.post("/organizations/:organizationSlug/events/:eventSlug/tickets",r,{organizationSlug:t,eventSlug:o}),"create"),update:n(async(t,o,r,a)=>e.put("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",a,{organizationSlug:t,eventSlug:o,ticketId:r}),"update"),delete:n(async(t,o,r)=>e.delete("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:o,ticketId:r}),"delete")}),"organizationsEventsTickets");var zo=n(e=>({record:n(async(t,o)=>e.post("/organizations/:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:o}),"record")}),"organizationsEventsViews");var Po=n(e=>({search:n(async(t,o)=>e.get("/organizations/events/search",{q:t,limit:o}),"search"),getAll:n(async(t,o)=>t?e.get("/organizations/:organizationSlug/events",{organizationSlug:t,...o}):e.get("/organizations/events",o),"getAll"),getSuggestions:n(async t=>e.get("/organizations/events/suggestions",t),"getSuggestions"),getNearby:n(async t=>e.get("/organizations/events/nearby",t),"getNearby"),getPast:n(async(t,o)=>e.get("/organizations/:organizationSlug/events/past",{organizationSlug:t,...o}),"getPast"),getUpcoming:n(async(t,o)=>e.get("/organizations/:organizationSlug/events/upcoming",{organizationSlug:t,...o}),"getUpcoming"),get:n(async(t,o)=>e.get("/organizations/:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:o}),"get"),create:n(async(t,o)=>e.post("/organizations/:organizationSlug/events",o,{organizationSlug:t}),"create"),update:n(async(t,o,r)=>e.put("/organizations/:organizationSlug/events/:eventSlug",r,{organizationSlug:t,eventSlug:o}),"update"),delete:n(async(t,o)=>e.delete("/organizations/:organizationSlug/events/:eventSlug",null,{organizationSlug:t,eventSlug:o}),"delete"),uploadFile:n(async(t,o)=>e.post("/events/files/:eventFileType",_e("file",o),{eventFileType:t}),"uploadFile"),uploadOrganizationFile:n(async(t,o,r,a)=>e.post("/organizations/:organizationSlug/events/:eventSlug/files/:eventFileType",_e("file",a),{organizationSlug:t,eventSlug:o,eventFileType:r}),"uploadOrganizationFile"),orders:wo(e),styles:_o(e),tickets:Ao(e),views:zo(e)}),"organizationsEvents");var Do=n(e=>({me:n(async()=>e.get("/organizations/members/@me"),"me"),get:n(async t=>e.get("/organizations/:organizationSlug/members",{organizationSlug:t}),"get"),create:n(async(t,o)=>e.post("/organizations/:organizationSlug/members",o,{organizationSlug:t}),"create"),update:n(async(t,o,r)=>e.put("/organizations/:organizationSlug/members/:userId",r,{organizationSlug:t,userId:o}),"update"),delete:n(async(t,o)=>e.delete("/organizations/:organizationSlug/members/:userId",null,{organizationSlug:t,userId:o}),"delete"),createInvitationLink:n(async(t,o={})=>e.post("/organizations/:organizationSlug/members/invitations/links",o,{organizationSlug:t}),"createInvitationLink"),acceptInvitation:n(async(t,o)=>e.post("/organizations/:organizationSlug/members/invitations/accept",o,{organizationSlug:t}),"acceptInvitation")}),"organizationsMembers");var No=e=>({search:n(async(t,o)=>e.get("/organizations/search",{q:t,limit:o}),"search"),getAll:n(async()=>e.get("/organizations"),"getAll"),get:n(async t=>e.get("/organizations/:organizationSlug",{organizationSlug:t}),"get"),create:n(async t=>e.post("/organizations",t),"create"),update:n(async(t,o)=>e.put("/organizations/:organizationSlug",o,{organizationSlug:t}),"update"),delete:n(async t=>e.delete("/organizations/:organizationSlug",null,{organizationSlug:t}),"delete"),billing:jo(e),events:Po(e),members:Do(e)});var Lo=e=>({follow:n(async t=>e.post("/profiles/:username/relationships/follow",null,{username:t}),"follow"),unfollow:n(async t=>e.post("/profiles/:username/relationships/unfollow",null,{username:t}),"unfollow"),getSuggestions:n(async t=>e.get("/profiles/@me/relationships/suggestions",t),"getSuggestions"),getFollowers:n(async(t,o)=>e.get("/profiles/:username/relationships/followers",{username:t,...o}),"getFollowers")});var Uo=e=>({get:n(async t=>e.get("/profiles/:username",{username:t}),"get"),relationships:Lo(e)});var Bo=e=>({getAll:n(async()=>e.get("/users/bookings"),"getAll"),get:n(async t=>e.get("/users/bookings/:bookingId",{bookingId:t}),"get"),me:n(async()=>e.get("/users/@me/bookings"),"me")});var Fo=e=>({me:n(async()=>e.get("/users/@me/notifications"),"me"),count:n(async t=>e.get("/users/@me/notifications/count",t),"count")});var Mo=e=>({search:n(async(t,o)=>e.get("/users/search",{q:t,limit:o}),"search"),getAll:n(async()=>e.get("/users"),"getAll"),get:n(async t=>e.get("/users/:userId",{userId:t}),"get"),me:n(async()=>e.get("/users/@me"),"me"),check:n(async(t,o)=>e.get("/users/check/:identifier",{identifier:t,suggestions:o}),"check"),update:n(async(t,o)=>e.put("/users/:userId",o,{userId:t}),"update"),uploadFile:n(async(t,o,r)=>e.post("/users/:userId/files/:userFileType",_e("file",r),{userId:t,userFileType:o}),"uploadFile"),bookings:Bo(e),notifications:Fo(e)});var Go=e=>({registerToBeta:n(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var qo=class{static{n(this,"TonightPass");}client;auth;careers;channels;health;orders;organizations;profiles;users;notifications;constructor(t){this.client=new We(t),this.auth=bo(this.client),this.careers=Io(this.client),this.channels=xo(this.client),this.health=Ro(this.client),this.orders=Oo(this.client),this.organizations=No(this.client),this.profiles=Uo(this.client),this.users=Mo(this.client),this.notifications=Go(this.client);}};
2
+ exports.AcceptOrganizationMemberInvitationDto=mt;exports.AddParticipantDto=ke;exports.AddReactionDto=Ze;exports.AtLeastOneMedia=Xn;exports.AtLeastOneMediaOnUpdate=Cn;exports.BaseOrganizationEventDto=f;exports.ChannelMemberRole=Ki;exports.ChannelMessageReportReason=Ae;exports.ChannelStatus=$i;exports.ChannelType=te;exports.Client=We;exports.CreateChannelDto=ue;exports.CreateChannelMessageDto=ge;exports.CreateLocationDto=S;exports.CreateOrganizationDto=pe;exports.CreateOrganizationEventDto=pt;exports.CreateOrganizationEventOrderDto=it;exports.CreateOrganizationEventStyleDto=De;exports.CreateOrganizationEventTicketDto=d;exports.CreateOrganizationIdentityDto=G;exports.CreateOrganizationMemberDto=Ge;exports.CreateOrganizationMemberInvitationLinkDto=gt;exports.CreateUserDto=xe;exports.CreateUserIdentityDto=B;exports.Currency=K;exports.DEFAULT_API_URL=xt;exports.ErrorType=Ji;exports.GeoPointDto=w;exports.Language=_r;exports.OrganizationEventFileType=tr;exports.OrganizationEventStyleType=Ti;exports.OrganizationEventTicketCategory=X;exports.OrganizationEventTicketType=$;exports.OrganizationEventType=Z;exports.OrganizationEventVisibilityType=Y;exports.OrganizationMemberRole=I;exports.OrganizationMemberStatus=ar;exports.OrganizationSocialType=dr;exports.OrganizationTokenType=pr;exports.ProfileType=jr;exports.REGEX=c;exports.RecoveryDto=ht;exports.RecoveryResetDto=Re;exports.ReportChannelMessageDto=Pe;exports.SignInUserDto=Ve;exports.TonightPass=qo;exports.TonightPassAPIError=St;exports.UpdateChannelDto=Xe;exports.UpdateChannelMessageDto=Qe;exports.UpdateLocationDto=x;exports.UpdateOrganizationDto=ce;exports.UpdateOrganizationEventDto=u;exports.UpdateOrganizationEventStyleDto=Lt;exports.UpdateOrganizationEventTicketDto=l;exports.UpdateOrganizationIdentityDto=W;exports.UpdateOrganizationMemberDto=ut;exports.UpdateUserDto=Oe;exports.UserFileType=Ir;exports.UserIdentityGender=J;exports.UserNotificationType=gr;exports.UserRole=br;exports.UserTokenType=hr;exports.auth=bo;exports.buildFileFormData=_e;exports.careers=Io;exports.channels=xo;exports.currencies=Rc;exports.health=Ro;exports.isBrowser=F;exports.notifications=Go;exports.orders=Oo;exports.organizations=No;exports.profiles=Uo;exports.request=vo;exports.sdk=h;exports.users=Mo;//# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map