tonightpass 0.0.207 → 0.0.208

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
@@ -295,10 +295,7 @@ declare enum OAuth2Provider {
295
295
  type RecoveryResponse = {
296
296
  to: string;
297
297
  };
298
- type OAuth2ProviderParams = {
299
- provider: OAuth2Provider;
300
- };
301
- type AuthEndpoints = Endpoint<"POST", "/auth/sign-up", User, CreateUserDto> | Endpoint<"POST", "/auth/sign-in", User, SignInUserDto> | Endpoint<"POST", "/auth/sign-out", null, null> | Endpoint<"POST", "/auth/refresh-token", null, null> | Endpoint<"POST", "/auth/recovery", RecoveryResponse, RecoveryDto> | Endpoint<"POST", "/auth/recovery/reset", null, RecoveryResetDto> | Endpoint<"GET", "/oauth2/:provider", void, OAuth2ProviderParams> | Endpoint<"GET", "/oauth2/:provider/callback", void, OAuth2ProviderParams> | Endpoint<"DELETE", "/oauth2/:provider", void>;
298
+ type AuthEndpoints = Endpoint<"POST", "/auth/sign-up", User, CreateUserDto> | Endpoint<"POST", "/auth/sign-in", User, SignInUserDto> | Endpoint<"POST", "/auth/sign-out", null, null> | Endpoint<"POST", "/auth/refresh-token", null, null> | Endpoint<"POST", "/auth/recovery", RecoveryResponse, RecoveryDto> | Endpoint<"POST", "/auth/recovery/reset", null, RecoveryResetDto> | Endpoint<"GET", "/oauth2/:provider", void> | Endpoint<"GET", "/oauth2/:provider/callback", void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Google}`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Google}/callback`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Facebook}`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Facebook}/callback`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Twitter}`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Twitter}/callback`, void> | Endpoint<"DELETE", "/oauth2/:provider", void>;
302
299
 
303
300
  type CareersOffice = {
304
301
  id: number | null;
@@ -1295,8 +1292,8 @@ declare const auth: (client: Client) => {
1295
1292
  recovery: (data: RecoveryDto) => Promise<RecoveryResponse>;
1296
1293
  recoveryReset: (data: RecoveryResetDto) => Promise<null>;
1297
1294
  oauth2: {
1298
- disconnect: (provider: OAuth2Provider) => Promise<void>;
1299
1295
  connect: (provider: OAuth2Provider, params?: Record<string, ParamValue>) => void;
1296
+ disconnect: (provider: OAuth2Provider) => Promise<void>;
1300
1297
  };
1301
1298
  };
1302
1299
 
@@ -1530,8 +1527,8 @@ declare class TonightPass {
1530
1527
  recovery: (data: RecoveryDto) => Promise<RecoveryResponse>;
1531
1528
  recoveryReset: (data: RecoveryResetDto) => Promise<null>;
1532
1529
  oauth2: {
1533
- disconnect: (provider: OAuth2Provider) => Promise<void>;
1534
1530
  connect: (provider: OAuth2Provider, params?: Record<string, pathcat.ParamValue>) => void;
1531
+ disconnect: (provider: OAuth2Provider) => Promise<void>;
1535
1532
  };
1536
1533
  };
1537
1534
  readonly careers: {
@@ -1897,4 +1894,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
1897
1894
  client: ChannelWebSocketClient;
1898
1895
  };
1899
1896
 
1900
- export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, 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 ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, type CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type FeedEndpoints, type FeedPost, FeedType, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, OAuth2Provider, type OAuth2ProviderParams, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, type UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, UpdateUserPostCommentDto, UpdateUserPostDto, 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 UserOAuthProvider, type UserPost, type UserPostComment, type UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, type UserPostViewEndpoints, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, auth, buildFileFormData, careers, channels, channelsWS, currencies, feed, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
1897
+ export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, 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 ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, type CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type FeedEndpoints, type FeedPost, FeedType, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, OAuth2Provider, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, type UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, UpdateUserPostCommentDto, UpdateUserPostDto, 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 UserOAuthProvider, type UserPost, type UserPostComment, type UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, type UserPostViewEndpoints, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, auth, buildFileFormData, careers, channels, channelsWS, currencies, feed, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
package/dist/index.d.ts CHANGED
@@ -295,10 +295,7 @@ declare enum OAuth2Provider {
295
295
  type RecoveryResponse = {
296
296
  to: string;
297
297
  };
298
- type OAuth2ProviderParams = {
299
- provider: OAuth2Provider;
300
- };
301
- type AuthEndpoints = Endpoint<"POST", "/auth/sign-up", User, CreateUserDto> | Endpoint<"POST", "/auth/sign-in", User, SignInUserDto> | Endpoint<"POST", "/auth/sign-out", null, null> | Endpoint<"POST", "/auth/refresh-token", null, null> | Endpoint<"POST", "/auth/recovery", RecoveryResponse, RecoveryDto> | Endpoint<"POST", "/auth/recovery/reset", null, RecoveryResetDto> | Endpoint<"GET", "/oauth2/:provider", void, OAuth2ProviderParams> | Endpoint<"GET", "/oauth2/:provider/callback", void, OAuth2ProviderParams> | Endpoint<"DELETE", "/oauth2/:provider", void>;
298
+ type AuthEndpoints = Endpoint<"POST", "/auth/sign-up", User, CreateUserDto> | Endpoint<"POST", "/auth/sign-in", User, SignInUserDto> | Endpoint<"POST", "/auth/sign-out", null, null> | Endpoint<"POST", "/auth/refresh-token", null, null> | Endpoint<"POST", "/auth/recovery", RecoveryResponse, RecoveryDto> | Endpoint<"POST", "/auth/recovery/reset", null, RecoveryResetDto> | Endpoint<"GET", "/oauth2/:provider", void> | Endpoint<"GET", "/oauth2/:provider/callback", void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Google}`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Google}/callback`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Facebook}`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Facebook}/callback`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Twitter}`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Twitter}/callback`, void> | Endpoint<"DELETE", "/oauth2/:provider", void>;
302
299
 
303
300
  type CareersOffice = {
304
301
  id: number | null;
@@ -1295,8 +1292,8 @@ declare const auth: (client: Client) => {
1295
1292
  recovery: (data: RecoveryDto) => Promise<RecoveryResponse>;
1296
1293
  recoveryReset: (data: RecoveryResetDto) => Promise<null>;
1297
1294
  oauth2: {
1298
- disconnect: (provider: OAuth2Provider) => Promise<void>;
1299
1295
  connect: (provider: OAuth2Provider, params?: Record<string, ParamValue>) => void;
1296
+ disconnect: (provider: OAuth2Provider) => Promise<void>;
1300
1297
  };
1301
1298
  };
1302
1299
 
@@ -1530,8 +1527,8 @@ declare class TonightPass {
1530
1527
  recovery: (data: RecoveryDto) => Promise<RecoveryResponse>;
1531
1528
  recoveryReset: (data: RecoveryResetDto) => Promise<null>;
1532
1529
  oauth2: {
1533
- disconnect: (provider: OAuth2Provider) => Promise<void>;
1534
1530
  connect: (provider: OAuth2Provider, params?: Record<string, pathcat.ParamValue>) => void;
1531
+ disconnect: (provider: OAuth2Provider) => Promise<void>;
1535
1532
  };
1536
1533
  };
1537
1534
  readonly careers: {
@@ -1897,4 +1894,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
1897
1894
  client: ChannelWebSocketClient;
1898
1895
  };
1899
1896
 
1900
- export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, 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 ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, type CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type FeedEndpoints, type FeedPost, FeedType, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, OAuth2Provider, type OAuth2ProviderParams, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, type UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, UpdateUserPostCommentDto, UpdateUserPostDto, 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 UserOAuthProvider, type UserPost, type UserPostComment, type UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, type UserPostViewEndpoints, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, auth, buildFileFormData, careers, channels, channelsWS, currencies, feed, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
1897
+ export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, 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 ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, type CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type FeedEndpoints, type FeedPost, FeedType, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, OAuth2Provider, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, type UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, UpdateUserPostCommentDto, UpdateUserPostDto, 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 UserOAuthProvider, type UserPost, type UserPostComment, type UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, type UserPostViewEndpoints, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, auth, buildFileFormData, careers, channels, channelsWS, currencies, feed, 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'),Ns=require('redaxios'),pathcat=require('pathcat'),Bs=require('ws');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Ns__default=/*#__PURE__*/_interopDefault(Ns);var Bs__default=/*#__PURE__*/_interopDefault(Bs);var mo=Object.defineProperty;var o=(e,t)=>mo(e,"name",{value:t,configurable:true});var Nt="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 uo(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(uo,"_ts_decorate");function go(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(go,"_ts_metadata");var Ze=class{static{o(this,"AddParticipantDto");}username};uo([classValidator.IsString(),classValidator.Matches(c.USERNAME,{message:"user.username.format"}),go("design:type",String)],Ze.prototype,"username",void 0);var Zs=function(e){return e.PUBLIC="public",e.BUILD="build",e.PREMIUM="premium",e.INTERNAL="internal",e}({});var Ys=function(e){return e.Google="google",e.Facebook="facebook",e.Apple="apple",e.Twitter="twitter",e}({});var De=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 se=function(e){return e.Private="private",e.Group="group",e}({}),ei=function(e){return e.Member="member",e.Admin="admin",e}({}),ti=function(e){return e.Sent="sent",e.Delivered="delivered",e.Read="read",e.Received="received",e.Opened="opened",e}({});var C=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 si=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 ai=function(e){return e.Following="following",e.Discover="discover",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 li=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.Festival="festival",e.HouseParty="house_party",e.FriendsParty="friends_party",e.Afterwork="afterwork",e.DancingLunch="dancing_lunch",e.Diner="diner",e.Garden="garden",e.AfterBeach="after_beach",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}({}),fi=function(e){return e.Flyer="flyer",e.Trailer="trailer",e}({}),mi=function(e){return e.Upcoming="upcoming",e.Ongoing="ongoing",e.Ended="ended",e}({});var vi=function(e){return e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected",e}({}),x=function(e){return e.Owner="owner",e.Admin="admin",e.Manager="manager",e.Member="member",e}({});var xi=function(e){return e.InvitationLink="invitation_link",e}({});var Ii=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Ai=function(e){return e.Follow="follow",e}({});var Pi=function(e){return e.Image="image",e.Video="video",e}({});var J=function(e){return e.Public="public",e.Followers="followers",e.Private="private",e}({});var Fi=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 Gi=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),Y=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),Hi=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var ki=function(e){return e.User="user",e.Organization="organization",e}({});var Xi=function(e){return e.FR="fr",e.EN="en",e}({});function Ye(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ye,"_ts_decorate");function Qe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Qe,"_ts_metadata");var he=class{static{o(this,"CreateChannelDto");}type;participantUsernames;name};Ye([classValidator.IsEnum(se),Qe("design:type",typeof se>"u"?Object:se)],he.prototype,"type",void 0);Ye([classValidator.IsArray(),classValidator.ArrayMinSize(1),classValidator.ValidateIf(e=>e.type===se.Private),classValidator.ArrayMaxSize(2,{message:"Private channels can only have 2 participants"}),classValidator.ValidateIf(e=>e.type===se.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,message:"user.username.format"}),Qe("design:type",Array)],he.prototype,"participantUsernames",void 0);Ye([classValidator.IsOptional(),classValidator.ValidateIf(e=>e.type===se.Group),classValidator.IsString(),classValidator.Length(1,100),Qe("design:type",String)],he.prototype,"name",void 0);function Ro(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ro,"_ts_decorate");function Oo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Oo,"_ts_metadata");var Te=class{static{o(this,"UpdateChannelDto");}name};Ro([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,100),Oo("design:type",String)],Te.prototype,"name",void 0);function Ao(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ao,"_ts_decorate");function zo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(zo,"_ts_metadata");var et=class{static{o(this,"AddReactionDto");}emoji};Ao([classValidator.IsString(),classValidator.Length(1,10),zo("design:type",String)],et.prototype,"emoji",void 0);function Ne(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ne,"_ts_decorate");function tt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(tt,"_ts_metadata");exports.ContentOrAttachmentsConstraint=class ve{static{o(this,"ContentOrAttachmentsConstraint");}validate(t,n){let s=n.object,i=!!(s.content&&s.content.trim().length>0),r=!!(s.attachments&&s.attachments.length>0);return i||r}defaultMessage(t){return "Either content or attachments must be provided"}};exports.ContentOrAttachmentsConstraint=Ne([classValidator.ValidatorConstraint({name:"contentOrAttachments",async:false})],exports.ContentOrAttachmentsConstraint);var be=class{static{o(this,"CreateChannelMessageDto");}content;attachments;replyToId};Ne([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.content!==void 0),classValidator.Length(1,1024),tt("design:type",String)],be.prototype,"content",void 0);Ne([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ArrayMaxSize(10),classValidator.Matches(/^channels\/[\w-]+\/messages\/[\w-]+\/private\/[\w-]+$/,{each:true}),classValidator.Validate(exports.ContentOrAttachmentsConstraint),tt("design:type",Array)],be.prototype,"attachments",void 0);Ne([classValidator.IsOptional(),classValidator.IsMongoId(),tt("design:type",String)],be.prototype,"replyToId",void 0);function Eo(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Eo,"_ts_decorate");function qo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(qo,"_ts_metadata");var ot=class{static{o(this,"UpdateChannelMessageDto");}content};Eo([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,1024),qo("design:type",String)],ot.prototype,"content",void 0);function Bt(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Bt,"_ts_decorate");function Ft(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ft,"_ts_metadata");var Ue=class{static{o(this,"ReportChannelMessageDto");}reason;description};Bt([classValidator.IsEnum(De),Ft("design:type",typeof De>"u"?Object:De)],Ue.prototype,"reason",void 0);Bt([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.description&&e.description.trim().length>0),classValidator.Length(1,500),Ft("design:type",String)],Ue.prototype,"description",void 0);function B(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(B,"_ts_decorate");function Q(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Q,"_ts_metadata");var rt=class{static{o(this,"CoordinatesRangeConstraint");}validate(t){if(!Array.isArray(t)||t.length!==2)return false;let[n,s]=t;return s>=-90&&s<=90&&n>=-180&&n<=180}defaultMessage(){return "Coordinates must be within valid geographic ranges"}};rt=B([classValidator.ValidatorConstraint({name:"coordinatesRange",async:false})],rt);var z=class{static{o(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point";}};B([classValidator.IsString(),classValidator.IsNotEmpty(),Q("design:type",String)],z.prototype,"type",void 0);B([classValidator.IsArray(),classValidator.IsNotEmpty(),classValidator.Validate(rt),Q("design:type",Array)],z.prototype,"coordinates",void 0);var S=class{static{o(this,"CreateLocationDto");}name;address;zipCode;city;country;geometry};B([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),Q("design:type",String)],S.prototype,"name",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,256),Q("design:type",String)],S.prototype,"address",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),Q("design:type",String)],S.prototype,"zipCode",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),Q("design:type",String)],S.prototype,"city",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),Q("design:type",String)],S.prototype,"country",void 0);B([classValidator.ValidateNested(),classTransformer.Type(()=>z),classValidator.IsNotEmpty(),Q("design:type",typeof z>"u"?Object:z)],S.prototype,"geometry",void 0);function le(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(le,"_ts_decorate");function de(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(de,"_ts_metadata");var I=class{static{o(this,"UpdateLocationDto");}name;address;zipCode;city;country;geometry};le([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),de("design:type",String)],I.prototype,"name",void 0);le([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,256),de("design:type",String)],I.prototype,"address",void 0);le([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),de("design:type",String)],I.prototype,"zipCode",void 0);le([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),de("design:type",String)],I.prototype,"city",void 0);le([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),de("design:type",String)],I.prototype,"country",void 0);le([classValidator.IsOptional(),classValidator.ValidateNested(),classTransformer.Type(()=>z),de("design:type",typeof z>"u"?Object:z)],I.prototype,"geometry",void 0);function W(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(W,"_ts_decorate");function G(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(G,"_ts_metadata");var me=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};W([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),G("design:type",String)],me.prototype,"organizationSlug",void 0);W([classValidator.IsObject(),G("design:type",typeof F>"u"?Object:F)],me.prototype,"identity",void 0);W([classValidator.IsArray(),G("design:type",Array)],me.prototype,"members",void 0);W([classValidator.IsOptional(),classValidator.IsObject(),G("design:type",typeof Location>"u"?Object:Location)],me.prototype,"location",void 0);var F=class{static{o(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};W([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),G("design:type",String)],F.prototype,"displayName",void 0);W([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),G("design:type",String)],F.prototype,"description",void 0);W([classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//,{message:"organization.avatar.url.invalid"}),G("design:type",String)],F.prototype,"avatarUrl",void 0);W([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//,{message:"organization.banner.url.invalid"}),G("design:type",String)],F.prototype,"bannerUrl",void 0);W([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),G("design:type",Array)],F.prototype,"links",void 0);function E(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(E,"_ts_decorate");function q(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(q,"_ts_metadata");var ue=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};E([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME,{message:"organization.slug.format"}),q("design:type",String)],ue.prototype,"slug",void 0);E([classValidator.IsObject(),classValidator.IsOptional(),q("design:type",typeof H>"u"?Object:H)],ue.prototype,"identity",void 0);E([classValidator.IsOptional(),classValidator.IsArray(),q("design:type",Array)],ue.prototype,"members",void 0);E([classValidator.IsOptional(),classValidator.IsObject(),q("design:type",typeof Location>"u"?Object:Location)],ue.prototype,"location",void 0);var H=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};E([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),q("design:type",String)],H.prototype,"displayName",void 0);E([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),q("design:type",String)],H.prototype,"description",void 0);E([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//),q("design:type",String)],H.prototype,"avatarUrl",void 0);E([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//),q("design:type",String)],H.prototype,"bannerUrl",void 0);E([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),q("design:type",Array)],H.prototype,"links",void 0);function mr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(mr,"_ts_decorate");function ur(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ur,"_ts_metadata");var lt=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};mr([classValidator.IsArray(),classValidator.IsString({each:true}),ur("design:type",Array)],lt.prototype,"cart",void 0);var Le=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var Vt=class extends Le{static{o(this,"UpdateOrganizationEventStyleDto");}};function P(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(P,"_ts_decorate");function D(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(D,"_ts_metadata");var d=class{static{o(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};P([classValidator.IsString(),classValidator.Length(1,128),D("design:type",String)],d.prototype,"name",void 0);P([classValidator.IsString(),classValidator.Length(0,1024),classValidator.IsOptional(),D("design:type",String)],d.prototype,"description",void 0);P([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),D("design:type",Number)],d.prototype,"price",void 0);P([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),D("design:type",Number)],d.prototype,"quantity",void 0);P([classValidator.IsEnum(k),D("design:type",typeof k>"u"?Object:k)],d.prototype,"type",void 0);P([classValidator.IsEnum($),D("design:type",typeof $>"u"?Object:$)],d.prototype,"category",void 0);P([classValidator.IsEnum(C),D("design:type",typeof C>"u"?Object:C)],d.prototype,"currency",void 0);P([classValidator.IsBoolean(),D("design:type",Boolean)],d.prototype,"isVisible",void 0);P([classValidator.IsBoolean(),D("design:type",Boolean)],d.prototype,"isFeesIncluded",void 0);P([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),D("design:type",typeof Date>"u"?Object:Date)],d.prototype,"startAt",void 0);P([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),D("design:type",typeof Date>"u"?Object:Date)],d.prototype,"endAt",void 0);function N(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(N,"_ts_decorate");function U(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(U,"_ts_metadata");var f=class{static{o(this,"UpdateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};N([classValidator.IsString(),classValidator.Length(1,128),classValidator.IsOptional(),U("design:type",String)],f.prototype,"name",void 0);N([classValidator.IsString(),classValidator.Length(0,1024),classValidator.IsOptional(),U("design:type",String)],f.prototype,"description",void 0);N([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),U("design:type",Number)],f.prototype,"price",void 0);N([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),U("design:type",Number)],f.prototype,"quantity",void 0);N([classValidator.IsEnum(k),classValidator.IsOptional(),U("design:type",typeof k>"u"?Object:k)],f.prototype,"type",void 0);N([classValidator.IsEnum($),classValidator.IsOptional(),U("design:type",typeof $>"u"?Object:$)],f.prototype,"category",void 0);N([classValidator.IsEnum(C),classValidator.IsOptional(),U("design:type",typeof C>"u"?Object:C)],f.prototype,"currency",void 0);N([classValidator.IsBoolean(),classValidator.IsOptional(),U("design:type",Boolean)],f.prototype,"isVisible",void 0);N([classValidator.IsBoolean(),classValidator.IsOptional(),U("design:type",Boolean)],f.prototype,"isFeesIncluded",void 0);N([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),U("design:type",typeof Date>"u"?Object:Date)],f.prototype,"startAt",void 0);N([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),U("design:type",typeof Date>"u"?Object:Date)],f.prototype,"endAt",void 0);function v(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(v,"_ts_decorate");function R(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(R,"_ts_metadata");exports.AtLeastOneMediaConstraint=class Oe{static{o(this,"AtLeastOneMediaConstraint");}validate(t,n){let s=n.object,i=s.flyers||[],r=s.trailers||[];return i.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 Rr(e){return function(t,n){classValidator.registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:exports.AtLeastOneMediaConstraint});}}o(Rr,"AtLeastOneMedia");var y=class{static{o(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)],y.prototype,"title",void 0);v([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.SLUG,{message:"organization.event.slug.format"}),R("design:type",String)],y.prototype,"slug",void 0);v([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(16,2048),R("design:type",String)],y.prototype,"description",void 0);v([classValidator.IsEnum(X),classValidator.IsNotEmpty(),R("design:type",typeof X>"u"?Object:X)],y.prototype,"type",void 0);v([classValidator.IsEnum(Z),classValidator.IsNotEmpty(),R("design:type",typeof Z>"u"?Object:Z)],y.prototype,"visibility",void 0);v([classValidator.IsArray(),classValidator.ArrayMaxSize(25),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/)/,{each:true,message:"organization.event.flyers.url.invalid"}),Rr(),R("design:type",Array)],y.prototype,"flyers",void 0);v([classValidator.IsArray(),classValidator.ArrayMaxSize(25),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/)/,{each:true,message:"organization.event.trailers.url.invalid"}),R("design:type",Array)],y.prototype,"trailers",void 0);v([classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>S),classValidator.IsNotEmpty(),R("design:type",typeof S>"u"?Object:S)],y.prototype,"location",void 0);v([classValidator.IsArray(),classValidator.IsString({each:true}),classValidator.ArrayMinSize(1),R("design:type",Array)],y.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)],y.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)],y.prototype,"endAt",void 0);var ut=class extends y{static{o(this,"CreateOrganizationEventDto");}tickets};v([classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>d),classValidator.IsNotEmpty(),R("design:type",Array)],ut.prototype,"tickets",void 0);function b(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(b,"_ts_decorate");function O(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(O,"_ts_metadata");exports.AtLeastOneMediaOnUpdateConstraint=class _e{static{o(this,"AtLeastOneMediaOnUpdateConstraint");}validate(t,n){let s=n.object;return s.flyers!==void 0&&s.trailers!==void 0?s.flyers.length>0||s.trailers.length>0:s.flyers!==void 0&&s.trailers===void 0?s.flyers.length>0:s.trailers!==void 0&&s.flyers===void 0?s.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 Ar(e){return function(t,n){classValidator.registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:exports.AtLeastOneMediaOnUpdateConstraint});}}o(Ar,"AtLeastOneMediaOnUpdate");var h=class{static{o(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)],h.prototype,"title",void 0);b([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.SLUG,{message:"organization.event.slug.format"}),O("design:type",String)],h.prototype,"slug",void 0);b([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(16,2048),O("design:type",String)],h.prototype,"description",void 0);b([classValidator.IsOptional(),classValidator.IsEnum(X),O("design:type",typeof X>"u"?Object:X)],h.prototype,"type",void 0);b([classValidator.IsOptional(),classValidator.IsEnum(Z),O("design:type",typeof Z>"u"?Object:Z)],h.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,message:"organization.event.flyers.url.invalid"}),Ar(),O("design:type",Array)],h.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,message:"organization.event.trailers.url.invalid"}),O("design:type",Array)],h.prototype,"trailers",void 0);b([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>I),O("design:type",typeof I>"u"?Object:I)],h.prototype,"location",void 0);b([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>f),O("design:type",Array)],h.prototype,"tickets",void 0);b([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsString({each:true}),O("design:type",Array)],h.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)],h.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)],h.prototype,"endAt",void 0);function yn(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(yn,"_ts_decorate");function hn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(hn,"_ts_metadata");var Ee=class{static{o(this,"CreateOrganizationMemberDto");}user;role};yn([classValidator.IsString(),classValidator.IsNotEmpty(),hn("design:type",String)],Ee.prototype,"user",void 0);yn([classValidator.IsEnum(x),classValidator.IsNotEmpty(),hn("design:type",typeof x>"u"?Object:x)],Ee.prototype,"role",void 0);function Dr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Dr,"_ts_decorate");function Nr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Nr,"_ts_metadata");var bt=class{static{o(this,"UpdateOrganizationMemberDto");}role};Dr([classValidator.IsEnum(x),classValidator.IsNotEmpty(),Nr("design:type",typeof x>"u"?Object:x)],bt.prototype,"role",void 0);function Mr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Mr,"_ts_decorate");function Br(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Br,"_ts_metadata");var xt=class{static{o(this,"AcceptOrganizationMemberInvitationDto");}token};Mr([classValidator.IsString(),classValidator.IsNotEmpty(),Br("design:type",String)],xt.prototype,"token",void 0);function Gr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Gr,"_ts_decorate");function Hr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Hr,"_ts_metadata");var St=class{static{o(this,"CreateOrganizationMemberInvitationLinkDto");}role};Gr([classValidator.IsEnum(x),classValidator.IsOptional(),Hr("design:type",typeof x>"u"?Object:x)],St.prototype,"role",void 0);function j(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(j,"_ts_decorate");function w(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(w,"_ts_metadata");var je=class{static{o(this,"CreateUserDto");}identifier;identity;password};j([classValidator.ValidateNested(),classTransformer.Type(()=>ge),w("design:type",typeof ge>"u"?Object:ge)],je.prototype,"identifier",void 0);j([classValidator.ValidateNested(),classTransformer.Type(()=>M),w("design:type",typeof M>"u"?Object:M)],je.prototype,"identity",void 0);j([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."}),w("design:type",String)],je.prototype,"password",void 0);var ge=class{static{o(this,"CreateUserIdentifierDto");}email;phoneNumber;username};j([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),w("design:type",String)],ge.prototype,"email",void 0);j([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),w("design:type",String)],ge.prototype,"phoneNumber",void 0);j([classValidator.IsString(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME,{message:"user.username.format"}),w("design:type",String)],ge.prototype,"username",void 0);var M=class{static{o(this,"CreateUserIdentityDto");}firstName;lastName;gender;avatarUrl;birthDate;links};j([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"First name must be composed of letters only"}),w("design:type",String)],M.prototype,"firstName",void 0);j([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"Last name must be composed of letters only"}),w("design:type",String)],M.prototype,"lastName",void 0);j([classValidator.IsEnum(Y),w("design:type",typeof Y>"u"?Object:Y)],M.prototype,"gender",void 0);j([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(users\/[\w-]+\/avatars\/|temp\/users\/avatars\/)/,{message:"user.avatar.url.invalid"}),w("design:type",String)],M.prototype,"avatarUrl",void 0);j([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>{if(!e)return;let t=new Date(e);return isNaN(t.getTime())?e:t}),classValidator.IsDate(),w("design:type",typeof Date>"u"?Object:Date)],M.prototype,"birthDate",void 0);j([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),w("design:type",Array)],M.prototype,"links",void 0);function Qr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Qr,"_ts_decorate");function Tr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Tr,"_ts_metadata");var Rt=class{static{o(this,"RecoveryDto");}identifier};Qr([classValidator.IsNotEmpty(),classValidator.IsString(),Tr("design:type",String)],Rt.prototype,"identifier",void 0);function Ot(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ot,"_ts_decorate");function _t(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(_t,"_ts_metadata");var we=class{static{o(this,"RecoveryResetDto");}tokenId;tokenValue;password};Ot([classValidator.IsString(),classValidator.IsNotEmpty(),_t("design:type",String)],we.prototype,"tokenId",void 0);Ot([classValidator.IsString(),classValidator.IsNotEmpty(),_t("design:type",String)],we.prototype,"tokenValue",void 0);Ot([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"}),_t("design:type",String)],we.prototype,"password",void 0);function In(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(In,"_ts_decorate");function Rn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Rn,"_ts_metadata");var Ve=class{static{o(this,"SignInUserDto");}identifier;password};In([classValidator.IsNotEmpty(),classValidator.IsString(),Rn("design:type",String)],Ve.prototype,"identifier",void 0);In([classValidator.IsNotEmpty(),classValidator.IsString(),Rn("design:type",String)],Ve.prototype,"password",void 0);function m(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(m,"_ts_decorate");function u(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(u,"_ts_metadata");var Ae=class{static{o(this,"UpdateUserDto");}identifier;identity;password};m([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>ye),u("design:type",typeof ye>"u"?Object:ye)],Ae.prototype,"identifier",void 0);m([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>A),u("design:type",typeof A>"u"?Object:A)],Ae.prototype,"identity",void 0);m([classValidator.IsOptional(),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."}),u("design:type",String)],Ae.prototype,"password",void 0);var ye=class{static{o(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),u("design:type",String)],ye.prototype,"email",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),u("design:type",String)],ye.prototype,"phoneNumber",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME,{message:"user.username.format"}),u("design:type",String)],ye.prototype,"username",void 0);var A=class{static{o(this,"UpdateUserIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate;links};m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"First name must be composed of letters only"}),u("design:type",String)],A.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"}),u("design:type",String)],A.prototype,"lastName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),u("design:type",String)],A.prototype,"displayName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),u("design:type",String)],A.prototype,"description",void 0);m([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/avatars\//),u("design:type",Object)],A.prototype,"avatarUrl",void 0);m([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/banners\//),u("design:type",Object)],A.prototype,"bannerUrl",void 0);m([classValidator.IsOptional(),classValidator.IsEnum(Y),u("design:type",typeof Y>"u"?Object:Y)],A.prototype,"gender",void 0);m([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),u("design:type",typeof Date>"u"?Object:Date)],A.prototype,"birthDate",void 0);m([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),u("design:type",Array)],A.prototype,"links",void 0);function wt(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(wt,"_ts_decorate");function At(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(At,"_ts_metadata");var Pe=class{static{o(this,"CreateUserPostDto");}content;mediaUrls;visibility};wt([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,512),At("design:type",String)],Pe.prototype,"content",void 0);wt([classValidator.IsArray(),classValidator.ArrayMinSize(1),classValidator.ArrayMaxSize(10),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/posts\/media\/|users\/[\w-]+\/posts\/[\w-]+\/media\/)/,{each:true}),At("design:type",Array)],Pe.prototype,"mediaUrls",void 0);wt([classValidator.IsOptional(),classValidator.IsEnum(J),At("design:type",typeof J>"u"?Object:J)],Pe.prototype,"visibility",void 0);function Pn(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Pn,"_ts_decorate");function Dn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Dn,"_ts_metadata");var Ke=class{static{o(this,"UpdateUserPostDto");}content;visibility};Pn([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,512),Dn("design:type",String)],Ke.prototype,"content",void 0);Pn([classValidator.IsOptional(),classValidator.IsEnum(J),Dn("design:type",typeof J>"u"?Object:J)],Ke.prototype,"visibility",void 0);function Un(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Un,"_ts_decorate");function Ln(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ln,"_ts_metadata");var Ce=class{static{o(this,"CreateUserPostCommentDto");}content;replyToId};Un([classValidator.IsString(),classValidator.Length(1,280),Ln("design:type",String)],Ce.prototype,"content",void 0);Un([classValidator.IsOptional(),classValidator.IsString(),Ln("design:type",String)],Ce.prototype,"replyToId",void 0);function Rs(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Rs,"_ts_decorate");function Os(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Os,"_ts_metadata");var zt=class{static{o(this,"UpdateUserPostCommentDto");}content};Rs([classValidator.IsString(),classValidator.Length(1,280),Os("design:type",String)],zt.prototype,"content",void 0);function ws(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(ws,"_ts_decorate");function As(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(As,"_ts_metadata");var Pt=class{static{o(this,"CreateUserPostRepostDto");}comment};ws([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,280),As("design:type",String)],Pt.prototype,"comment",void 0);var ne=typeof window<"u";function oe(e,t){let n=new FormData;return t instanceof File?n.append(e,t):t instanceof FileList?Array.from(t).forEach(s=>n.append(e,s)):t.forEach(s=>n.append(e,s)),n}o(oe,"buildFileFormData");var Us=Ns__default.default.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!ne&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[function(e,t){if(e instanceof FormData){if(t&&typeof t=="object"){let n={};for(let[s,i]of Object.entries(t)){let r=s.toLowerCase();r!=="content-type"&&(n[r]=i);}Object.keys(t).forEach(s=>delete t[s]),Object.assign(t,n);}return e}else return t&&(t["Content-Type"]="application/json"),JSON.stringify(e)}],withCredentials:ne}),Bn=o(async(e,t)=>{let{apiKey:n,...s}=t||{},i={...s.headers,...n&&{"X-API-Key":n}};return Us(e,{...s,headers:i}).then(a=>a).catch(a=>{throw a.data||console.error(a),a.data})},"request");var Dt=class extends Error{static{o(this,"TonightPassAPIError");}response;data;status;constructor(t,n){super(n.message),this.response=t,this.data=n,this.status=t.status;}},ke=class{static{o(this,"Client");}options;apiKey;url;constructor(t){this.options=t,this.apiKey=t.apiKey,this.url=(n,s)=>{let i=this.options.baseURL||Nt;return pathcat.pathcat(i,n,s)};}setOptions(t){this.options=t,this.apiKey=t.apiKey;}async get(t,n,s){return this.requester("GET",t,void 0,n,s)}async post(t,n,s,i){return this.requester("POST",t,n,s,i)}async put(t,n,s,i){return this.requester("PUT",t,n,s,i)}async patch(t,n,s,i){return this.requester("PATCH",t,n,s,i)}async delete(t,n,s,i){return this.requester("DELETE",t,n,s,i)}async requester(t,n,s,i={},r={}){let a=this.url(n,i);if(s!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let p=await Bn(a,{method:t,data:s,apiKey:this.apiKey,...r}),re=p.data;if(!re.success)throw new Dt(p,re);return re.data}};function l(e){return e}o(l,"sdk");var Fn=e=>({getAll:o(async()=>e.get("/api-keys"),"getAll"),get:o(async t=>e.get("/api-keys/:apiKeyId",{apiKeyId:t}),"get"),create:o(async t=>e.post("/api-keys",t),"create"),update:o(async(t,n)=>e.put("/api-keys/:apiKeyId",n,{apiKeyId:t}),"update"),delete:o(async t=>e.delete("/api-keys/:apiKeyId",void 0,{apiKeyId:t}),"delete")});var Wn=e=>({signIn:o(async t=>e.post("/auth/sign-in",t),"signIn"),signUp:o(async t=>e.post("/auth/sign-up",t),"signUp"),signOut:o(async()=>e.post("/auth/sign-out",null),"signOut"),refreshToken:o(async()=>e.post("/auth/refresh-token",null),"refreshToken"),recovery:o(async t=>e.post("/auth/recovery",t),"recovery"),recoveryReset:o(async t=>e.post("/auth/recovery/reset",t),"recoveryReset"),oauth2:{disconnect:o(async t=>e.delete("/oauth2/:provider",void 0,{provider:t}),"disconnect"),connect:o((t,n)=>{if(ne)window.location.href=e.url(`/oauth2/${t}`,n||{});else throw new Error(`${t} OAuth2 is only available in the browser`)},"connect")}});var Gn=e=>({categories:{getAll:o(async t=>e.get("/careers/categories",t),"getAll")},employmentTypes:{getAll:o(async t=>e.get("/careers/employmentTypes",t),"getAll")},jobs:{getAll:o(async t=>e.get("/careers/jobs",t),"getAll"),get:o(async t=>e.get("/careers/jobs/:jobId",{jobId:t}),"get")},offices:{getAll:o(async t=>e.get("/careers/offices",t),"getAll")}});var Hn=e=>({getAll:o(async(t,n)=>e.get("/channels/@me/:channelId/messages",{channelId:t,...n}),"getAll"),getAllByOrganization:o(async(t,n,s)=>e.get("/channels/:organizationSlug/:channelId/messages",{organizationSlug:t,channelId:n,...s}),"getAllByOrganization"),get:o(async(t,n)=>e.get("/channels/@me/:channelId/messages/:messageId",{channelId:t,messageId:n}),"get"),getByOrganization:o(async(t,n,s)=>e.get("/channels/:organizationSlug/:channelId/messages/:messageId",{organizationSlug:t,channelId:n,messageId:s}),"getByOrganization"),create:o(async(t,n)=>e.post("/channels/@me/:channelId/messages",n,{channelId:t}),"create"),createByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/messages",s,{organizationSlug:t,channelId:n}),"createByOrganization"),update:o(async(t,n,s)=>e.put("/channels/@me/:channelId/messages/:messageId",s,{channelId:t,messageId:n}),"update"),updateByOrganization:o(async(t,n,s,i)=>e.put("/channels/:organizationSlug/:channelId/messages/:messageId",i,{organizationSlug:t,channelId:n,messageId:s}),"updateByOrganization"),delete:o(async(t,n)=>e.delete("/channels/@me/:channelId/messages/:messageId",void 0,{channelId:t,messageId:n}),"delete"),deleteByOrganization:o(async(t,n,s)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId",void 0,{organizationSlug:t,channelId:n,messageId:s}),"deleteByOrganization"),addReaction:o(async(t,n,s)=>e.post("/channels/@me/:channelId/messages/:messageId/reactions",s,{channelId:t,messageId:n}),"addReaction"),addReactionByOrganization:o(async(t,n,s,i)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/reactions",i,{organizationSlug:t,channelId:n,messageId:s}),"addReactionByOrganization"),removeReaction:o(async(t,n,s)=>e.delete("/channels/@me/:channelId/messages/:messageId/reactions/:emoji",void 0,{channelId:t,messageId:n,emoji:s}),"removeReaction"),removeReactionByOrganization:o(async(t,n,s,i)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji",void 0,{organizationSlug:t,channelId:n,messageId:s,emoji:i}),"removeReactionByOrganization"),markAsRead:o(async(t,n)=>e.post("/channels/@me/:channelId/messages/:messageId/read",null,{channelId:t,messageId:n}),"markAsRead"),markAsReadByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/read",null,{organizationSlug:t,channelId:n,messageId:s}),"markAsReadByOrganization"),uploadFile:o(async(t,n)=>e.post("/channels/@me/:channelId/files",n,{channelId:t}),"uploadFile"),uploadFileByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/files",s,{organizationSlug:t,channelId:n}),"uploadFileByOrganization"),report:o(async(t,n,s)=>e.post("/channels/@me/:channelId/messages/:messageId/report",s,{channelId:t,messageId:n}),"report"),reportByOrganization:o(async(t,n,s,i)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/report",i,{organizationSlug:t,channelId:n,messageId:s}),"reportByOrganization")});var En=e=>({me:o(async t=>e.get("/channels/@me",t),"me"),getByOrganization:o(async(t,n)=>e.get("/channels/:organizationSlug",{organizationSlug:t,...n}),"getByOrganization"),countMe:o(async t=>e.get("/users/@me/channels/count",t),"countMe"),countByOrganization:o(async(t,n)=>e.get("/users/:organizationSlug/channels/count",{organizationSlug:t,...n}),"countByOrganization"),get:o(async t=>e.get("/channels/@me/:channelId",{channelId:t}),"get"),getByOrganizationChannel:o(async(t,n)=>e.get("/channels/:organizationSlug/:channelId",{organizationSlug:t,channelId:n}),"getByOrganizationChannel"),create:o(async t=>e.post("/channels/@me",t),"create"),createByOrganization:o(async(t,n)=>e.post("/channels/:organizationSlug",n,{organizationSlug:t}),"createByOrganization"),update:o(async(t,n)=>e.put("/channels/@me/:channelId",n,{channelId:t}),"update"),updateByOrganization:o(async(t,n,s)=>e.put("/channels/:organizationSlug/:channelId",s,{organizationSlug:t,channelId:n}),"updateByOrganization"),delete:o(async t=>e.delete("/channels/@me/:channelId",void 0,{channelId:t}),"delete"),deleteByOrganization:o(async(t,n)=>e.delete("/channels/:organizationSlug/:channelId",void 0,{organizationSlug:t,channelId:n}),"deleteByOrganization"),addParticipant:o(async(t,n)=>e.post("/channels/@me/:channelId/participants",n,{channelId:t}),"addParticipant"),addParticipantByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/participants",s,{organizationSlug:t,channelId:n}),"addParticipantByOrganization"),removeParticipant:o(async(t,n)=>e.delete("/channels/@me/:channelId/participants/:username",void 0,{channelId:t,username:n}),"removeParticipant"),removeParticipantByOrganization:o(async(t,n,s)=>e.delete("/channels/:organizationSlug/:channelId/participants/:username",void 0,{organizationSlug:t,channelId:n,username:s}),"removeParticipantByOrganization"),getMembers:o(async(t,n)=>e.get("/channels/@me/:channelId/members",{channelId:t,...n}),"getMembers"),getMembersByOrganization:o(async(t,n,s)=>e.get("/channels/:organizationSlug/:channelId/members",{organizationSlug:t,channelId:n,...s}),"getMembersByOrganization"),messages:Hn(e)});var qn=e=>({getRates:o(()=>e.get("/currencies/rates"),"getRates"),convert:o(t=>e.post("/currencies/convert",t),"convert"),convertAmount:o((t,n,s)=>e.post("/currencies/convert",{from:t,to:n,amount:s}),"convertAmount")});var Vn=e=>({getFollowing:o(async t=>e.get("/feed/following",t),"getFollowing"),getDiscover:o(async t=>e.get("/feed/discover",t),"getDiscover")});var Kn=e=>({getAll:o(async()=>e.get("/health"),"getAll"),database:o(async()=>e.get("/health/database"),"database"),api:o(async()=>e.get("/health/api"),"api"),app:o(async()=>e.get("/health/app"),"app")});var Cn=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var kn=o(e=>({account:o(async t=>e.get("/organizations/:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(ne)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:o(t=>{if(ne)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 $n=o(e=>({create:o(async(t,n,s)=>e.post("/organizations/:organizationSlug/events/:eventSlug/orders",s,{organizationSlug:t,eventSlug:n}),"create")}),"organizationsEventsOrders");var Xn=o(e=>({getAll:o(async()=>e.get("/organizations/events/styles"),"getAll"),get:o(async t=>e.get("/organizations/events/styles/:styleSlug",{styleSlug:t}),"get"),create:o(async t=>e.post("/organizations/events/styles",t),"create"),update:o(async(t,n)=>e.put("/organizations/events/styles/:styleSlug",n,{styleSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/events/styles/:styleSlug",null,{styleSlug:t}),"delete")}),"organizationsEventsStyles");var Zn=o(e=>({getAll:o(async(t,n)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:n}),"getAll"),get:o(async(t,n,s)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:n,ticketId:s}),"get"),create:o(async(t,n,s)=>e.post("/organizations/:organizationSlug/events/:eventSlug/tickets",s,{organizationSlug:t,eventSlug:n}),"create"),update:o(async(t,n,s,i)=>e.put("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",i,{organizationSlug:t,eventSlug:n,ticketId:s}),"update"),delete:o(async(t,n,s)=>e.delete("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:n,ticketId:s}),"delete")}),"organizationsEventsTickets");var Jn=o(e=>({record:o(async(t,n)=>e.post("/organizations/:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:n}),"record")}),"organizationsEventsViews");var Yn=o(e=>({search:o(async(t,n)=>e.get("/organizations/events/search",{q:t,limit:n}),"search"),getAll:o(async(t,n)=>t?e.get("/organizations/:organizationSlug/events",{organizationSlug:t,...n}):e.get("/organizations/events",n),"getAll"),getSuggestions:o(async t=>e.get("/organizations/events/suggestions",t),"getSuggestions"),getNearby:o(async t=>e.get("/organizations/events/nearby",t),"getNearby"),get:o(async(t,n)=>e.get("/organizations/:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:n}),"get"),create:o(async(t,n)=>e.post("/organizations/:organizationSlug/events",n,{organizationSlug:t}),"create"),update:o(async(t,n,s)=>e.put("/organizations/:organizationSlug/events/:eventSlug",s,{organizationSlug:t,eventSlug:n}),"update"),delete:o(async(t,n)=>e.delete("/organizations/:organizationSlug/events/:eventSlug",null,{organizationSlug:t,eventSlug:n}),"delete"),uploadFile:o(async(t,n)=>e.post("/events/files/:eventFileType",oe("file",n),{eventFileType:t}),"uploadFile"),uploadOrganizationFile:o(async(t,n,s,i)=>e.post("/organizations/:organizationSlug/events/:eventSlug/files/:eventFileType",oe("file",i),{organizationSlug:t,eventSlug:n,eventFileType:s}),"uploadOrganizationFile"),orders:$n(e),styles:Xn(e),tickets:Zn(e),views:Jn(e)}),"organizationsEvents");var Qn=o(e=>({getLinks:o(async t=>e.get("/organizations/:organizationSlug/members/invitations/links",{organizationSlug:t}),"getLinks"),createLink:o(async(t,n={})=>e.post("/organizations/:organizationSlug/members/invitations/links",n,{organizationSlug:t}),"createLink"),accept:o(async(t,n)=>e.post("/organizations/:organizationSlug/members/invitations/accept",n,{organizationSlug:t}),"accept")}),"invitations");var Tn=o(e=>({me:o(async()=>e.get("/organizations/members/@me"),"me"),get:o(async t=>e.get("/organizations/:organizationSlug/members",{organizationSlug:t}),"get"),create:o(async(t,n)=>e.post("/organizations/:organizationSlug/members",n,{organizationSlug:t}),"create"),update:o(async(t,n,s)=>e.put("/organizations/:organizationSlug/members/:username",s,{organizationSlug:t,username:n}),"update"),delete:o(async(t,n)=>e.delete("/organizations/:organizationSlug/members/:username",null,{organizationSlug:t,username:n}),"delete"),invitations:Qn(e),accept:o(async t=>e.put("/organizations/:organizationSlug/members/@me/accept",null,{organizationSlug:t}),"accept"),reject:o(async t=>e.delete("/organizations/:organizationSlug/members/@me/reject",null,{organizationSlug:t}),"reject"),leave:o(async t=>e.delete("/organizations/:organizationSlug/members/@me",null,{organizationSlug:t}),"leave")}),"organizationsMembers");var eo=e=>({search:o(async(t,n)=>e.get("/organizations/search",{q:t,limit:n}),"search"),getAll:o(async()=>e.get("/organizations"),"getAll"),get:o(async t=>e.get("/organizations/:organizationSlug",{organizationSlug:t}),"get"),create:o(async t=>e.post("/organizations",t),"create"),update:o(async(t,n)=>e.put("/organizations/:organizationSlug",n,{organizationSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/:organizationSlug",null,{organizationSlug:t}),"delete"),uploadFile:o(async(t,n,s)=>e.post("/organizations/:organizationSlug/files/:organizationFileType",oe("file",s),{organizationSlug:t,organizationFileType:n}),"uploadFile"),billing:kn(e),events:Yn(e),members:Tn(e)});var to=e=>({follow:o(async t=>e.post("/profiles/:username/relationships/follow",null,{username:t}),"follow"),unfollow:o(async t=>e.post("/profiles/:username/relationships/unfollow",null,{username:t}),"unfollow"),getSuggestions:o(async t=>e.get("/profiles/@me/relationships/suggestions",t),"getSuggestions"),getFollowers:o(async(t,n)=>e.get("/profiles/:username/relationships/followers",{username:t,...n}),"getFollowers")});var no=e=>({get:o(async t=>e.get("/profiles/:username",{username:t}),"get"),relationships:to(e)});var oo=e=>({getAll:o(async()=>e.get("/users/bookings"),"getAll"),get:o(async t=>e.get("/users/bookings/:bookingId",{bookingId:t}),"get"),me:o(async()=>e.get("/users/@me/bookings"),"me")});var ro=e=>({me:o(async()=>e.get("/users/@me/notifications"),"me"),count:o(async t=>e.get("/users/@me/notifications/count",t),"count"),read:o(async()=>e.put("/users/@me/notifications/read",null),"read")});var so=o(e=>({record:o(async(t,n)=>e.post("/users/:username/posts/:postId/views",null,{username:t,postId:n}),"record")}),"usersPostsViews");var io=e=>({getByUsername:o(async(t,n)=>e.get("/users/:username/posts",{username:t,...n}),"getByUsername"),getByUsernameAndId:o(async(t,n)=>e.get("/users/:username/posts/:postId",{username:t,postId:n}),"getByUsernameAndId"),create:o(async t=>e.post("/users/@me/posts",t),"create"),update:o(async(t,n)=>e.put("/users/@me/posts/:postId",n,{postId:t}),"update"),delete:o(async t=>e.delete("/users/@me/posts/:postId",void 0,{postId:t}),"delete"),uploadMedia:o(async t=>e.post("/users/@me/posts/media",t),"uploadMedia"),views:so(e)});var ao=e=>({getByPost:o(async(t,n,s)=>e.get("/users/:username/posts/:postId/comments",{username:t,postId:n,...s}),"getByPost"),create:o(async(t,n)=>e.post("/users/@me/posts/:postId/comments",n,{postId:t}),"create"),update:o(async(t,n,s)=>e.put("/users/@me/posts/:postId/comments/:commentId",s,{postId:t,commentId:n}),"update"),delete:o(async(t,n)=>e.delete("/users/@me/posts/:postId/comments/:commentId",void 0,{postId:t,commentId:n}),"delete")});var po=e=>({getByUsername:o(async(t,n)=>e.get("/users/:username/reposts",{username:t,...n}),"getByUsername"),getByPost:o(async(t,n,s)=>e.get("/users/:username/posts/:postId/reposts",{username:t,postId:n,...s}),"getByPost"),create:o(async(t,n)=>e.post("/users/@me/posts/:postId/reposts",n||{},{postId:t}),"create"),delete:o(async t=>e.delete("/users/@me/posts/:postId/reposts",void 0,{postId:t}),"delete")});var co=e=>({getAll:o(async()=>e.get("/users"),"getAll"),get:o(async t=>e.get("/users/:userId",{userId:t}),"get"),me:o(async()=>e.get("/users/@me"),"me"),check:o(async(t,n)=>e.get("/users/check/:identifier",{identifier:t,suggestions:n}),"check"),update:o(async(t,n)=>e.put("/users/:userId",n,{userId:t}),"update"),uploadFile:o(async(t,n,s)=>e.post("/users/:userId/files/:userFileType",oe("file",s),{userId:t,userFileType:n}),"uploadFile"),uploadTempFile:o(async(t,n)=>e.post("/users/files/:userFileType",oe("file",n),{userFileType:t}),"uploadTempFile"),bookings:oo(e),notifications:ro(e),posts:io(e),postsComments:ao(e),postsReposts:po(e)});var lo=e=>({registerToBeta:o(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var fo=class{static{o(this,"TonightPass");}client;apiKeys;auth;careers;channels;currencies;feed;health;orders;organizations;profiles;users;notifications;constructor(t){this.client=new ke(t),this.apiKeys=Fn(this.client),this.auth=Wn(this.client),this.careers=Gn(this.client),this.channels=En(this.client),this.currencies=qn(this.client),this.feed=Vn(this.client),this.health=Kn(this.client),this.orders=Cn(this.client),this.organizations=eo(this.client),this.profiles=no(this.client),this.users=co(this.client),this.notifications=lo(this.client);}};var $e=class{static{o(this,"WebSocketClient");}ws;options;reconnectAttempts=0;reconnectTimer;eventHandlers=new Map;isConnected=false;isReconnecting=false;constructor(t={}){this.options={baseURL:"wss://api.tonightpass.com",maxReconnectAttempts:3,reconnectInterval:1e3,debug:false,...t};}log(t,...n){this.options.debug&&console.log(`[WebSocketClient] ${t}`,...n);}getWebSocketURL(t,n){let s={};Object.entries(n).forEach(([r,a])=>{typeof a=="string"&&r!=="token"&&(s[r]=a);});let i=pathcat.pathcat(t,s);return `${this.options.baseURL}${i}`}async connect(t,n){return new Promise((s,i)=>{try{let r=this.getWebSocketURL(t,n);this.log("Connecting to",r);let a={};"token"in n&&typeof n.token=="string"&&(a.Authorization=`Bearer ${n.token}`),this.ws=new Bs__default.default(r,{headers:a}),this.ws.on("open",()=>{this.log("Connected successfully"),this.isConnected=!0,this.isReconnecting=!1,this.reconnectAttempts=0,s();}),this.ws.on("message",p=>{try{let re=JSON.parse(p.toString());this.handleEvent(re);}catch(re){this.log("Error parsing message:",re);}}),this.ws.on("close",p=>{this.log("Connection closed",p),this.isConnected=!1,this.options.maxReconnectAttempts&&!this.isReconnecting&&this.handleReconnect(t,n);}),this.ws.on("error",p=>{this.log("WebSocket error:",p),this.isConnected=!1,i(p);});}catch(r){i(r);}})}handleReconnect(t,n){if(this.reconnectAttempts>=this.options.maxReconnectAttempts){this.log("Max reconnect attempts reached");return}this.isReconnecting=true,this.reconnectAttempts++,this.log(`Attempting to reconnect (${this.reconnectAttempts}/${this.options.maxReconnectAttempts})`),this.reconnectTimer=setTimeout(()=>{this.connect(t,n).catch(s=>{this.log("Reconnection failed:",s);});},this.options.reconnectInterval);}handleEvent(t){this.log("Received event:",t.type);let n=this.eventHandlers.get(t.type);n&&n.forEach(i=>i(t));let s=this.eventHandlers.get("*");s&&s.forEach(i=>i(t));}on(t,n){this.eventHandlers.has(t)||this.eventHandlers.set(t,new Set);let s=o(i=>{n(i);},"wrappedHandler");return this.eventHandlers.get(t).add(s),()=>{let i=this.eventHandlers.get(t);i&&(i.delete(s),i.size===0&&this.eventHandlers.delete(t));}}off(t,n){let s=this.eventHandlers.get(t);s&&(s.clear(),this.eventHandlers.delete(t));}send(t){this.ws&&this.isConnected?this.ws.send(JSON.stringify(t)):this.log("Cannot send data: WebSocket not connected");}disconnect(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.ws&&(this.isConnected=false,this.isReconnecting=false,this.ws.close()),this.eventHandlers.clear();}get connected(){return this.isConnected}get reconnecting(){return this.isReconnecting}};var Xe=class extends $e{static{o(this,"ChannelWebSocketClient");}async connectToChannel(t,n={}){return this.connect("/channels/@me/:channelId/ws",{...n,channelId:t})}async connectToOrganizationChannel(t,n,s={}){return this.connect("/channels/:organizationSlug/:channelId/ws",{...s,organizationSlug:t,channelId:n})}async connectToUserChannels(t={}){return this.connect("/channels/@me/ws",t)}async connectToOrganizationChannels(t,n={}){return this.connect("/channels/:organizationSlug/ws",{...n,organizationSlug:t})}onMessageCreate(t){return this.on("channel_message_create",t)}onMessageUpdate(t){return this.on("channel_message_update",t)}onMessageDelete(t){return this.on("channel_message_delete",t)}onChannelUpdate(t){return this.on("channel_update",t)}onChannelDelete(t){return this.on("channel_delete",t)}onMemberJoin(t){return this.on("channel_member_join",t)}onMemberLeave(t){return this.on("channel_member_leave",t)}onTypingStart(t){return this.on("typing_start",t)}onTypingStop(t){return this.on("typing_stop",t)}startTyping(t){this.send({type:"typing_start",data:{channelId:t}});}stopTyping(t){this.send({type:"typing_stop",data:{channelId:t}});}subscribeToChannel(t){this.send({type:"subscribe",data:{channelId:t}});}unsubscribeFromChannel(t){this.send({type:"unsubscribe",data:{channelId:t}});}};function Im(e){let t=new Xe(e);return {connect:o((n,s)=>t.connectToChannel(n,{token:s}),"connect"),connectToOrganization:o((n,s,i)=>t.connectToOrganizationChannel(n,s,{token:i}),"connectToOrganization"),connectToUserChannels:o(n=>t.connectToUserChannels({token:n}),"connectToUserChannels"),connectToOrganizationChannels:o((n,s)=>t.connectToOrganizationChannels(n,{token:s}),"connectToOrganizationChannels"),onMessageCreate:o(n=>t.onMessageCreate(n),"onMessageCreate"),onMessageUpdate:o(n=>t.onMessageUpdate(n),"onMessageUpdate"),onMessageDelete:o(n=>t.onMessageDelete(n),"onMessageDelete"),onChannelUpdate:o(n=>t.onChannelUpdate(n),"onChannelUpdate"),onChannelDelete:o(n=>t.onChannelDelete(n),"onChannelDelete"),onMemberJoin:o(n=>t.onMemberJoin(n),"onMemberJoin"),onMemberLeave:o(n=>t.onMemberLeave(n),"onMemberLeave"),onTypingStart:o(n=>t.onTypingStart(n),"onTypingStart"),onTypingStop:o(n=>t.onTypingStop(n),"onTypingStop"),onAny:o(n=>t.on("*",n),"onAny"),startTyping:o(n=>t.startTyping(n),"startTyping"),stopTyping:o(n=>t.stopTyping(n),"stopTyping"),subscribeToChannel:o(n=>t.subscribeToChannel(n),"subscribeToChannel"),unsubscribeFromChannel:o(n=>t.unsubscribeFromChannel(n),"unsubscribeFromChannel"),disconnect:o(()=>t.disconnect(),"disconnect"),get connected(){return t.connected},get reconnecting(){return t.reconnecting},client:t}}o(Im,"channelsWS");
1
+ 'use strict';require('reflect-metadata');var classValidator=require('class-validator'),classTransformer=require('class-transformer'),Ns=require('redaxios'),pathcat=require('pathcat'),Bs=require('ws');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Ns__default=/*#__PURE__*/_interopDefault(Ns);var Bs__default=/*#__PURE__*/_interopDefault(Bs);var mo=Object.defineProperty;var o=(e,t)=>mo(e,"name",{value:t,configurable:true});var Nt="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 uo(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(uo,"_ts_decorate");function go(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(go,"_ts_metadata");var Ze=class{static{o(this,"AddParticipantDto");}username};uo([classValidator.IsString(),classValidator.Matches(c.USERNAME,{message:"user.username.format"}),go("design:type",String)],Ze.prototype,"username",void 0);var Zs=function(e){return e.PUBLIC="public",e.BUILD="build",e.PREMIUM="premium",e.INTERNAL="internal",e}({});var Ys=function(e){return e.Google="google",e.Facebook="facebook",e.Apple="apple",e.Twitter="twitter",e}({});var De=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 se=function(e){return e.Private="private",e.Group="group",e}({}),ei=function(e){return e.Member="member",e.Admin="admin",e}({}),ti=function(e){return e.Sent="sent",e.Delivered="delivered",e.Read="read",e.Received="received",e.Opened="opened",e}({});var C=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 si=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 ai=function(e){return e.Following="following",e.Discover="discover",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 li=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.Festival="festival",e.HouseParty="house_party",e.FriendsParty="friends_party",e.Afterwork="afterwork",e.DancingLunch="dancing_lunch",e.Diner="diner",e.Garden="garden",e.AfterBeach="after_beach",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}({}),fi=function(e){return e.Flyer="flyer",e.Trailer="trailer",e}({}),mi=function(e){return e.Upcoming="upcoming",e.Ongoing="ongoing",e.Ended="ended",e}({});var vi=function(e){return e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected",e}({}),x=function(e){return e.Owner="owner",e.Admin="admin",e.Manager="manager",e.Member="member",e}({});var xi=function(e){return e.InvitationLink="invitation_link",e}({});var Ii=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Ai=function(e){return e.Follow="follow",e}({});var Pi=function(e){return e.Image="image",e.Video="video",e}({});var J=function(e){return e.Public="public",e.Followers="followers",e.Private="private",e}({});var Fi=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 Gi=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),Y=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),Hi=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var ki=function(e){return e.User="user",e.Organization="organization",e}({});var Xi=function(e){return e.FR="fr",e.EN="en",e}({});function Ye(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ye,"_ts_decorate");function Qe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Qe,"_ts_metadata");var he=class{static{o(this,"CreateChannelDto");}type;participantUsernames;name};Ye([classValidator.IsEnum(se),Qe("design:type",typeof se>"u"?Object:se)],he.prototype,"type",void 0);Ye([classValidator.IsArray(),classValidator.ArrayMinSize(1),classValidator.ValidateIf(e=>e.type===se.Private),classValidator.ArrayMaxSize(2,{message:"Private channels can only have 2 participants"}),classValidator.ValidateIf(e=>e.type===se.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,message:"user.username.format"}),Qe("design:type",Array)],he.prototype,"participantUsernames",void 0);Ye([classValidator.IsOptional(),classValidator.ValidateIf(e=>e.type===se.Group),classValidator.IsString(),classValidator.Length(1,100),Qe("design:type",String)],he.prototype,"name",void 0);function Ro(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ro,"_ts_decorate");function Oo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Oo,"_ts_metadata");var Te=class{static{o(this,"UpdateChannelDto");}name};Ro([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,100),Oo("design:type",String)],Te.prototype,"name",void 0);function Ao(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ao,"_ts_decorate");function zo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(zo,"_ts_metadata");var et=class{static{o(this,"AddReactionDto");}emoji};Ao([classValidator.IsString(),classValidator.Length(1,10),zo("design:type",String)],et.prototype,"emoji",void 0);function Ne(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ne,"_ts_decorate");function tt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(tt,"_ts_metadata");exports.ContentOrAttachmentsConstraint=class ve{static{o(this,"ContentOrAttachmentsConstraint");}validate(t,n){let s=n.object,i=!!(s.content&&s.content.trim().length>0),r=!!(s.attachments&&s.attachments.length>0);return i||r}defaultMessage(t){return "Either content or attachments must be provided"}};exports.ContentOrAttachmentsConstraint=Ne([classValidator.ValidatorConstraint({name:"contentOrAttachments",async:false})],exports.ContentOrAttachmentsConstraint);var be=class{static{o(this,"CreateChannelMessageDto");}content;attachments;replyToId};Ne([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.content!==void 0),classValidator.Length(1,1024),tt("design:type",String)],be.prototype,"content",void 0);Ne([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ArrayMaxSize(10),classValidator.Matches(/^channels\/[\w-]+\/messages\/[\w-]+\/private\/[\w-]+$/,{each:true}),classValidator.Validate(exports.ContentOrAttachmentsConstraint),tt("design:type",Array)],be.prototype,"attachments",void 0);Ne([classValidator.IsOptional(),classValidator.IsMongoId(),tt("design:type",String)],be.prototype,"replyToId",void 0);function Eo(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Eo,"_ts_decorate");function qo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(qo,"_ts_metadata");var ot=class{static{o(this,"UpdateChannelMessageDto");}content};Eo([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,1024),qo("design:type",String)],ot.prototype,"content",void 0);function Bt(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Bt,"_ts_decorate");function Ft(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ft,"_ts_metadata");var Ue=class{static{o(this,"ReportChannelMessageDto");}reason;description};Bt([classValidator.IsEnum(De),Ft("design:type",typeof De>"u"?Object:De)],Ue.prototype,"reason",void 0);Bt([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.description&&e.description.trim().length>0),classValidator.Length(1,500),Ft("design:type",String)],Ue.prototype,"description",void 0);function B(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(B,"_ts_decorate");function Q(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Q,"_ts_metadata");var rt=class{static{o(this,"CoordinatesRangeConstraint");}validate(t){if(!Array.isArray(t)||t.length!==2)return false;let[n,s]=t;return s>=-90&&s<=90&&n>=-180&&n<=180}defaultMessage(){return "Coordinates must be within valid geographic ranges"}};rt=B([classValidator.ValidatorConstraint({name:"coordinatesRange",async:false})],rt);var z=class{static{o(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point";}};B([classValidator.IsString(),classValidator.IsNotEmpty(),Q("design:type",String)],z.prototype,"type",void 0);B([classValidator.IsArray(),classValidator.IsNotEmpty(),classValidator.Validate(rt),Q("design:type",Array)],z.prototype,"coordinates",void 0);var S=class{static{o(this,"CreateLocationDto");}name;address;zipCode;city;country;geometry};B([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),Q("design:type",String)],S.prototype,"name",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,256),Q("design:type",String)],S.prototype,"address",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),Q("design:type",String)],S.prototype,"zipCode",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),Q("design:type",String)],S.prototype,"city",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),Q("design:type",String)],S.prototype,"country",void 0);B([classValidator.ValidateNested(),classTransformer.Type(()=>z),classValidator.IsNotEmpty(),Q("design:type",typeof z>"u"?Object:z)],S.prototype,"geometry",void 0);function le(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(le,"_ts_decorate");function de(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(de,"_ts_metadata");var I=class{static{o(this,"UpdateLocationDto");}name;address;zipCode;city;country;geometry};le([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),de("design:type",String)],I.prototype,"name",void 0);le([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,256),de("design:type",String)],I.prototype,"address",void 0);le([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),de("design:type",String)],I.prototype,"zipCode",void 0);le([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),de("design:type",String)],I.prototype,"city",void 0);le([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),de("design:type",String)],I.prototype,"country",void 0);le([classValidator.IsOptional(),classValidator.ValidateNested(),classTransformer.Type(()=>z),de("design:type",typeof z>"u"?Object:z)],I.prototype,"geometry",void 0);function W(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(W,"_ts_decorate");function G(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(G,"_ts_metadata");var me=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};W([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),G("design:type",String)],me.prototype,"organizationSlug",void 0);W([classValidator.IsObject(),G("design:type",typeof F>"u"?Object:F)],me.prototype,"identity",void 0);W([classValidator.IsArray(),G("design:type",Array)],me.prototype,"members",void 0);W([classValidator.IsOptional(),classValidator.IsObject(),G("design:type",typeof Location>"u"?Object:Location)],me.prototype,"location",void 0);var F=class{static{o(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};W([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),G("design:type",String)],F.prototype,"displayName",void 0);W([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),G("design:type",String)],F.prototype,"description",void 0);W([classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//,{message:"organization.avatar.url.invalid"}),G("design:type",String)],F.prototype,"avatarUrl",void 0);W([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//,{message:"organization.banner.url.invalid"}),G("design:type",String)],F.prototype,"bannerUrl",void 0);W([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),G("design:type",Array)],F.prototype,"links",void 0);function E(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(E,"_ts_decorate");function q(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(q,"_ts_metadata");var ue=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};E([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME,{message:"organization.slug.format"}),q("design:type",String)],ue.prototype,"slug",void 0);E([classValidator.IsObject(),classValidator.IsOptional(),q("design:type",typeof H>"u"?Object:H)],ue.prototype,"identity",void 0);E([classValidator.IsOptional(),classValidator.IsArray(),q("design:type",Array)],ue.prototype,"members",void 0);E([classValidator.IsOptional(),classValidator.IsObject(),q("design:type",typeof Location>"u"?Object:Location)],ue.prototype,"location",void 0);var H=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};E([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),q("design:type",String)],H.prototype,"displayName",void 0);E([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),q("design:type",String)],H.prototype,"description",void 0);E([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//),q("design:type",String)],H.prototype,"avatarUrl",void 0);E([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//),q("design:type",String)],H.prototype,"bannerUrl",void 0);E([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),q("design:type",Array)],H.prototype,"links",void 0);function mr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(mr,"_ts_decorate");function ur(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ur,"_ts_metadata");var lt=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};mr([classValidator.IsArray(),classValidator.IsString({each:true}),ur("design:type",Array)],lt.prototype,"cart",void 0);var Le=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var Vt=class extends Le{static{o(this,"UpdateOrganizationEventStyleDto");}};function P(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(P,"_ts_decorate");function D(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(D,"_ts_metadata");var d=class{static{o(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};P([classValidator.IsString(),classValidator.Length(1,128),D("design:type",String)],d.prototype,"name",void 0);P([classValidator.IsString(),classValidator.Length(0,1024),classValidator.IsOptional(),D("design:type",String)],d.prototype,"description",void 0);P([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),D("design:type",Number)],d.prototype,"price",void 0);P([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),D("design:type",Number)],d.prototype,"quantity",void 0);P([classValidator.IsEnum(k),D("design:type",typeof k>"u"?Object:k)],d.prototype,"type",void 0);P([classValidator.IsEnum($),D("design:type",typeof $>"u"?Object:$)],d.prototype,"category",void 0);P([classValidator.IsEnum(C),D("design:type",typeof C>"u"?Object:C)],d.prototype,"currency",void 0);P([classValidator.IsBoolean(),D("design:type",Boolean)],d.prototype,"isVisible",void 0);P([classValidator.IsBoolean(),D("design:type",Boolean)],d.prototype,"isFeesIncluded",void 0);P([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),D("design:type",typeof Date>"u"?Object:Date)],d.prototype,"startAt",void 0);P([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),D("design:type",typeof Date>"u"?Object:Date)],d.prototype,"endAt",void 0);function N(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(N,"_ts_decorate");function U(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(U,"_ts_metadata");var f=class{static{o(this,"UpdateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};N([classValidator.IsString(),classValidator.Length(1,128),classValidator.IsOptional(),U("design:type",String)],f.prototype,"name",void 0);N([classValidator.IsString(),classValidator.Length(0,1024),classValidator.IsOptional(),U("design:type",String)],f.prototype,"description",void 0);N([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),U("design:type",Number)],f.prototype,"price",void 0);N([classTransformer.Transform(({value:e})=>Number(e)),classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),U("design:type",Number)],f.prototype,"quantity",void 0);N([classValidator.IsEnum(k),classValidator.IsOptional(),U("design:type",typeof k>"u"?Object:k)],f.prototype,"type",void 0);N([classValidator.IsEnum($),classValidator.IsOptional(),U("design:type",typeof $>"u"?Object:$)],f.prototype,"category",void 0);N([classValidator.IsEnum(C),classValidator.IsOptional(),U("design:type",typeof C>"u"?Object:C)],f.prototype,"currency",void 0);N([classValidator.IsBoolean(),classValidator.IsOptional(),U("design:type",Boolean)],f.prototype,"isVisible",void 0);N([classValidator.IsBoolean(),classValidator.IsOptional(),U("design:type",Boolean)],f.prototype,"isFeesIncluded",void 0);N([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),U("design:type",typeof Date>"u"?Object:Date)],f.prototype,"startAt",void 0);N([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),U("design:type",typeof Date>"u"?Object:Date)],f.prototype,"endAt",void 0);function v(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(v,"_ts_decorate");function R(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(R,"_ts_metadata");exports.AtLeastOneMediaConstraint=class Oe{static{o(this,"AtLeastOneMediaConstraint");}validate(t,n){let s=n.object,i=s.flyers||[],r=s.trailers||[];return i.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 Rr(e){return function(t,n){classValidator.registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:exports.AtLeastOneMediaConstraint});}}o(Rr,"AtLeastOneMedia");var y=class{static{o(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)],y.prototype,"title",void 0);v([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.SLUG,{message:"organization.event.slug.format"}),R("design:type",String)],y.prototype,"slug",void 0);v([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(16,2048),R("design:type",String)],y.prototype,"description",void 0);v([classValidator.IsEnum(X),classValidator.IsNotEmpty(),R("design:type",typeof X>"u"?Object:X)],y.prototype,"type",void 0);v([classValidator.IsEnum(Z),classValidator.IsNotEmpty(),R("design:type",typeof Z>"u"?Object:Z)],y.prototype,"visibility",void 0);v([classValidator.IsArray(),classValidator.ArrayMaxSize(25),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/)/,{each:true,message:"organization.event.flyers.url.invalid"}),Rr(),R("design:type",Array)],y.prototype,"flyers",void 0);v([classValidator.IsArray(),classValidator.ArrayMaxSize(25),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/)/,{each:true,message:"organization.event.trailers.url.invalid"}),R("design:type",Array)],y.prototype,"trailers",void 0);v([classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>S),classValidator.IsNotEmpty(),R("design:type",typeof S>"u"?Object:S)],y.prototype,"location",void 0);v([classValidator.IsArray(),classValidator.IsString({each:true}),classValidator.ArrayMinSize(1),R("design:type",Array)],y.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)],y.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)],y.prototype,"endAt",void 0);var ut=class extends y{static{o(this,"CreateOrganizationEventDto");}tickets};v([classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>d),classValidator.IsNotEmpty(),R("design:type",Array)],ut.prototype,"tickets",void 0);function b(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(b,"_ts_decorate");function O(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(O,"_ts_metadata");exports.AtLeastOneMediaOnUpdateConstraint=class _e{static{o(this,"AtLeastOneMediaOnUpdateConstraint");}validate(t,n){let s=n.object;return s.flyers!==void 0&&s.trailers!==void 0?s.flyers.length>0||s.trailers.length>0:s.flyers!==void 0&&s.trailers===void 0?s.flyers.length>0:s.trailers!==void 0&&s.flyers===void 0?s.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 Ar(e){return function(t,n){classValidator.registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:exports.AtLeastOneMediaOnUpdateConstraint});}}o(Ar,"AtLeastOneMediaOnUpdate");var h=class{static{o(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)],h.prototype,"title",void 0);b([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.SLUG,{message:"organization.event.slug.format"}),O("design:type",String)],h.prototype,"slug",void 0);b([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(16,2048),O("design:type",String)],h.prototype,"description",void 0);b([classValidator.IsOptional(),classValidator.IsEnum(X),O("design:type",typeof X>"u"?Object:X)],h.prototype,"type",void 0);b([classValidator.IsOptional(),classValidator.IsEnum(Z),O("design:type",typeof Z>"u"?Object:Z)],h.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,message:"organization.event.flyers.url.invalid"}),Ar(),O("design:type",Array)],h.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,message:"organization.event.trailers.url.invalid"}),O("design:type",Array)],h.prototype,"trailers",void 0);b([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>I),O("design:type",typeof I>"u"?Object:I)],h.prototype,"location",void 0);b([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>f),O("design:type",Array)],h.prototype,"tickets",void 0);b([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsString({each:true}),O("design:type",Array)],h.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)],h.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)],h.prototype,"endAt",void 0);function yn(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(yn,"_ts_decorate");function hn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(hn,"_ts_metadata");var Ee=class{static{o(this,"CreateOrganizationMemberDto");}user;role};yn([classValidator.IsString(),classValidator.IsNotEmpty(),hn("design:type",String)],Ee.prototype,"user",void 0);yn([classValidator.IsEnum(x),classValidator.IsNotEmpty(),hn("design:type",typeof x>"u"?Object:x)],Ee.prototype,"role",void 0);function Dr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Dr,"_ts_decorate");function Nr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Nr,"_ts_metadata");var bt=class{static{o(this,"UpdateOrganizationMemberDto");}role};Dr([classValidator.IsEnum(x),classValidator.IsNotEmpty(),Nr("design:type",typeof x>"u"?Object:x)],bt.prototype,"role",void 0);function Mr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Mr,"_ts_decorate");function Br(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Br,"_ts_metadata");var xt=class{static{o(this,"AcceptOrganizationMemberInvitationDto");}token};Mr([classValidator.IsString(),classValidator.IsNotEmpty(),Br("design:type",String)],xt.prototype,"token",void 0);function Gr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Gr,"_ts_decorate");function Hr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Hr,"_ts_metadata");var St=class{static{o(this,"CreateOrganizationMemberInvitationLinkDto");}role};Gr([classValidator.IsEnum(x),classValidator.IsOptional(),Hr("design:type",typeof x>"u"?Object:x)],St.prototype,"role",void 0);function j(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(j,"_ts_decorate");function w(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(w,"_ts_metadata");var je=class{static{o(this,"CreateUserDto");}identifier;identity;password};j([classValidator.ValidateNested(),classTransformer.Type(()=>ge),w("design:type",typeof ge>"u"?Object:ge)],je.prototype,"identifier",void 0);j([classValidator.ValidateNested(),classTransformer.Type(()=>M),w("design:type",typeof M>"u"?Object:M)],je.prototype,"identity",void 0);j([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."}),w("design:type",String)],je.prototype,"password",void 0);var ge=class{static{o(this,"CreateUserIdentifierDto");}email;phoneNumber;username};j([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),w("design:type",String)],ge.prototype,"email",void 0);j([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),w("design:type",String)],ge.prototype,"phoneNumber",void 0);j([classValidator.IsString(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME,{message:"user.username.format"}),w("design:type",String)],ge.prototype,"username",void 0);var M=class{static{o(this,"CreateUserIdentityDto");}firstName;lastName;gender;avatarUrl;birthDate;links};j([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"First name must be composed of letters only"}),w("design:type",String)],M.prototype,"firstName",void 0);j([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"Last name must be composed of letters only"}),w("design:type",String)],M.prototype,"lastName",void 0);j([classValidator.IsEnum(Y),w("design:type",typeof Y>"u"?Object:Y)],M.prototype,"gender",void 0);j([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(users\/[\w-]+\/avatars\/|temp\/users\/avatars\/)/,{message:"user.avatar.url.invalid"}),w("design:type",String)],M.prototype,"avatarUrl",void 0);j([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>{if(!e)return;let t=new Date(e);return isNaN(t.getTime())?e:t}),classValidator.IsDate(),w("design:type",typeof Date>"u"?Object:Date)],M.prototype,"birthDate",void 0);j([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),w("design:type",Array)],M.prototype,"links",void 0);function Qr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Qr,"_ts_decorate");function Tr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Tr,"_ts_metadata");var Rt=class{static{o(this,"RecoveryDto");}identifier};Qr([classValidator.IsNotEmpty(),classValidator.IsString(),Tr("design:type",String)],Rt.prototype,"identifier",void 0);function Ot(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ot,"_ts_decorate");function _t(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(_t,"_ts_metadata");var we=class{static{o(this,"RecoveryResetDto");}tokenId;tokenValue;password};Ot([classValidator.IsString(),classValidator.IsNotEmpty(),_t("design:type",String)],we.prototype,"tokenId",void 0);Ot([classValidator.IsString(),classValidator.IsNotEmpty(),_t("design:type",String)],we.prototype,"tokenValue",void 0);Ot([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"}),_t("design:type",String)],we.prototype,"password",void 0);function In(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(In,"_ts_decorate");function Rn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Rn,"_ts_metadata");var Ve=class{static{o(this,"SignInUserDto");}identifier;password};In([classValidator.IsNotEmpty(),classValidator.IsString(),Rn("design:type",String)],Ve.prototype,"identifier",void 0);In([classValidator.IsNotEmpty(),classValidator.IsString(),Rn("design:type",String)],Ve.prototype,"password",void 0);function m(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(m,"_ts_decorate");function u(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(u,"_ts_metadata");var Ae=class{static{o(this,"UpdateUserDto");}identifier;identity;password};m([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>ye),u("design:type",typeof ye>"u"?Object:ye)],Ae.prototype,"identifier",void 0);m([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>A),u("design:type",typeof A>"u"?Object:A)],Ae.prototype,"identity",void 0);m([classValidator.IsOptional(),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."}),u("design:type",String)],Ae.prototype,"password",void 0);var ye=class{static{o(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),u("design:type",String)],ye.prototype,"email",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),u("design:type",String)],ye.prototype,"phoneNumber",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(c.USERNAME,{message:"user.username.format"}),u("design:type",String)],ye.prototype,"username",void 0);var A=class{static{o(this,"UpdateUserIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate;links};m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(c.NAME,{message:"First name must be composed of letters only"}),u("design:type",String)],A.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"}),u("design:type",String)],A.prototype,"lastName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),u("design:type",String)],A.prototype,"displayName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),u("design:type",String)],A.prototype,"description",void 0);m([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/avatars\//),u("design:type",Object)],A.prototype,"avatarUrl",void 0);m([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/banners\//),u("design:type",Object)],A.prototype,"bannerUrl",void 0);m([classValidator.IsOptional(),classValidator.IsEnum(Y),u("design:type",typeof Y>"u"?Object:Y)],A.prototype,"gender",void 0);m([classValidator.IsOptional(),classTransformer.Transform(({value:e})=>e instanceof Date?e:new Date(e)),classValidator.IsDate(),u("design:type",typeof Date>"u"?Object:Date)],A.prototype,"birthDate",void 0);m([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),u("design:type",Array)],A.prototype,"links",void 0);function wt(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(wt,"_ts_decorate");function At(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(At,"_ts_metadata");var Pe=class{static{o(this,"CreateUserPostDto");}content;mediaUrls;visibility};wt([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,512),At("design:type",String)],Pe.prototype,"content",void 0);wt([classValidator.IsArray(),classValidator.ArrayMinSize(1),classValidator.ArrayMaxSize(10),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/posts\/media\/|users\/[\w-]+\/posts\/[\w-]+\/media\/)/,{each:true}),At("design:type",Array)],Pe.prototype,"mediaUrls",void 0);wt([classValidator.IsOptional(),classValidator.IsEnum(J),At("design:type",typeof J>"u"?Object:J)],Pe.prototype,"visibility",void 0);function Pn(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Pn,"_ts_decorate");function Dn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Dn,"_ts_metadata");var Ke=class{static{o(this,"UpdateUserPostDto");}content;visibility};Pn([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,512),Dn("design:type",String)],Ke.prototype,"content",void 0);Pn([classValidator.IsOptional(),classValidator.IsEnum(J),Dn("design:type",typeof J>"u"?Object:J)],Ke.prototype,"visibility",void 0);function Un(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Un,"_ts_decorate");function Ln(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ln,"_ts_metadata");var Ce=class{static{o(this,"CreateUserPostCommentDto");}content;replyToId};Un([classValidator.IsString(),classValidator.Length(1,280),Ln("design:type",String)],Ce.prototype,"content",void 0);Un([classValidator.IsOptional(),classValidator.IsString(),Ln("design:type",String)],Ce.prototype,"replyToId",void 0);function Rs(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Rs,"_ts_decorate");function Os(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Os,"_ts_metadata");var zt=class{static{o(this,"UpdateUserPostCommentDto");}content};Rs([classValidator.IsString(),classValidator.Length(1,280),Os("design:type",String)],zt.prototype,"content",void 0);function ws(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(ws,"_ts_decorate");function As(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(As,"_ts_metadata");var Pt=class{static{o(this,"CreateUserPostRepostDto");}comment};ws([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,280),As("design:type",String)],Pt.prototype,"comment",void 0);var ne=typeof window<"u";function oe(e,t){let n=new FormData;return t instanceof File?n.append(e,t):t instanceof FileList?Array.from(t).forEach(s=>n.append(e,s)):t.forEach(s=>n.append(e,s)),n}o(oe,"buildFileFormData");var Us=Ns__default.default.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!ne&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[function(e,t){if(e instanceof FormData){if(t&&typeof t=="object"){let n={};for(let[s,i]of Object.entries(t)){let r=s.toLowerCase();r!=="content-type"&&(n[r]=i);}Object.keys(t).forEach(s=>delete t[s]),Object.assign(t,n);}return e}else return t&&(t["Content-Type"]="application/json"),JSON.stringify(e)}],withCredentials:ne}),Bn=o(async(e,t)=>{let{apiKey:n,...s}=t||{},i={...s.headers,...n&&{"X-API-Key":n}};return Us(e,{...s,headers:i}).then(a=>a).catch(a=>{throw a.data||console.error(a),a.data})},"request");var Dt=class extends Error{static{o(this,"TonightPassAPIError");}response;data;status;constructor(t,n){super(n.message),this.response=t,this.data=n,this.status=t.status;}},ke=class{static{o(this,"Client");}options;apiKey;url;constructor(t){this.options=t,this.apiKey=t.apiKey,this.url=(n,s)=>{let i=this.options.baseURL||Nt;return pathcat.pathcat(i,n,s)};}setOptions(t){this.options=t,this.apiKey=t.apiKey;}async get(t,n,s){return this.requester("GET",t,void 0,n,s)}async post(t,n,s,i){return this.requester("POST",t,n,s,i)}async put(t,n,s,i){return this.requester("PUT",t,n,s,i)}async patch(t,n,s,i){return this.requester("PATCH",t,n,s,i)}async delete(t,n,s,i){return this.requester("DELETE",t,n,s,i)}async requester(t,n,s,i={},r={}){let a=this.url(n,i);if(s!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let p=await Bn(a,{method:t,data:s,apiKey:this.apiKey,...r}),re=p.data;if(!re.success)throw new Dt(p,re);return re.data}};function l(e){return e}o(l,"sdk");var Fn=e=>({getAll:o(async()=>e.get("/api-keys"),"getAll"),get:o(async t=>e.get("/api-keys/:apiKeyId",{apiKeyId:t}),"get"),create:o(async t=>e.post("/api-keys",t),"create"),update:o(async(t,n)=>e.put("/api-keys/:apiKeyId",n,{apiKeyId:t}),"update"),delete:o(async t=>e.delete("/api-keys/:apiKeyId",void 0,{apiKeyId:t}),"delete")});var Wn=e=>({signIn:o(async t=>e.post("/auth/sign-in",t),"signIn"),signUp:o(async t=>e.post("/auth/sign-up",t),"signUp"),signOut:o(async()=>e.post("/auth/sign-out",null),"signOut"),refreshToken:o(async()=>e.post("/auth/refresh-token",null),"refreshToken"),recovery:o(async t=>e.post("/auth/recovery",t),"recovery"),recoveryReset:o(async t=>e.post("/auth/recovery/reset",t),"recoveryReset"),oauth2:{connect:o((t,n)=>{if(ne)window.location.href=e.url("/oauth2/:provider",{provider:t,...n});else throw new Error(`${t} OAuth2 is only available in the browser`)},"connect"),disconnect:o(async t=>e.delete("/oauth2/:provider",void 0,{provider:t}),"disconnect")}});var Gn=e=>({categories:{getAll:o(async t=>e.get("/careers/categories",t),"getAll")},employmentTypes:{getAll:o(async t=>e.get("/careers/employmentTypes",t),"getAll")},jobs:{getAll:o(async t=>e.get("/careers/jobs",t),"getAll"),get:o(async t=>e.get("/careers/jobs/:jobId",{jobId:t}),"get")},offices:{getAll:o(async t=>e.get("/careers/offices",t),"getAll")}});var Hn=e=>({getAll:o(async(t,n)=>e.get("/channels/@me/:channelId/messages",{channelId:t,...n}),"getAll"),getAllByOrganization:o(async(t,n,s)=>e.get("/channels/:organizationSlug/:channelId/messages",{organizationSlug:t,channelId:n,...s}),"getAllByOrganization"),get:o(async(t,n)=>e.get("/channels/@me/:channelId/messages/:messageId",{channelId:t,messageId:n}),"get"),getByOrganization:o(async(t,n,s)=>e.get("/channels/:organizationSlug/:channelId/messages/:messageId",{organizationSlug:t,channelId:n,messageId:s}),"getByOrganization"),create:o(async(t,n)=>e.post("/channels/@me/:channelId/messages",n,{channelId:t}),"create"),createByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/messages",s,{organizationSlug:t,channelId:n}),"createByOrganization"),update:o(async(t,n,s)=>e.put("/channels/@me/:channelId/messages/:messageId",s,{channelId:t,messageId:n}),"update"),updateByOrganization:o(async(t,n,s,i)=>e.put("/channels/:organizationSlug/:channelId/messages/:messageId",i,{organizationSlug:t,channelId:n,messageId:s}),"updateByOrganization"),delete:o(async(t,n)=>e.delete("/channels/@me/:channelId/messages/:messageId",void 0,{channelId:t,messageId:n}),"delete"),deleteByOrganization:o(async(t,n,s)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId",void 0,{organizationSlug:t,channelId:n,messageId:s}),"deleteByOrganization"),addReaction:o(async(t,n,s)=>e.post("/channels/@me/:channelId/messages/:messageId/reactions",s,{channelId:t,messageId:n}),"addReaction"),addReactionByOrganization:o(async(t,n,s,i)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/reactions",i,{organizationSlug:t,channelId:n,messageId:s}),"addReactionByOrganization"),removeReaction:o(async(t,n,s)=>e.delete("/channels/@me/:channelId/messages/:messageId/reactions/:emoji",void 0,{channelId:t,messageId:n,emoji:s}),"removeReaction"),removeReactionByOrganization:o(async(t,n,s,i)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji",void 0,{organizationSlug:t,channelId:n,messageId:s,emoji:i}),"removeReactionByOrganization"),markAsRead:o(async(t,n)=>e.post("/channels/@me/:channelId/messages/:messageId/read",null,{channelId:t,messageId:n}),"markAsRead"),markAsReadByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/read",null,{organizationSlug:t,channelId:n,messageId:s}),"markAsReadByOrganization"),uploadFile:o(async(t,n)=>e.post("/channels/@me/:channelId/files",n,{channelId:t}),"uploadFile"),uploadFileByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/files",s,{organizationSlug:t,channelId:n}),"uploadFileByOrganization"),report:o(async(t,n,s)=>e.post("/channels/@me/:channelId/messages/:messageId/report",s,{channelId:t,messageId:n}),"report"),reportByOrganization:o(async(t,n,s,i)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/report",i,{organizationSlug:t,channelId:n,messageId:s}),"reportByOrganization")});var En=e=>({me:o(async t=>e.get("/channels/@me",t),"me"),getByOrganization:o(async(t,n)=>e.get("/channels/:organizationSlug",{organizationSlug:t,...n}),"getByOrganization"),countMe:o(async t=>e.get("/users/@me/channels/count",t),"countMe"),countByOrganization:o(async(t,n)=>e.get("/users/:organizationSlug/channels/count",{organizationSlug:t,...n}),"countByOrganization"),get:o(async t=>e.get("/channels/@me/:channelId",{channelId:t}),"get"),getByOrganizationChannel:o(async(t,n)=>e.get("/channels/:organizationSlug/:channelId",{organizationSlug:t,channelId:n}),"getByOrganizationChannel"),create:o(async t=>e.post("/channels/@me",t),"create"),createByOrganization:o(async(t,n)=>e.post("/channels/:organizationSlug",n,{organizationSlug:t}),"createByOrganization"),update:o(async(t,n)=>e.put("/channels/@me/:channelId",n,{channelId:t}),"update"),updateByOrganization:o(async(t,n,s)=>e.put("/channels/:organizationSlug/:channelId",s,{organizationSlug:t,channelId:n}),"updateByOrganization"),delete:o(async t=>e.delete("/channels/@me/:channelId",void 0,{channelId:t}),"delete"),deleteByOrganization:o(async(t,n)=>e.delete("/channels/:organizationSlug/:channelId",void 0,{organizationSlug:t,channelId:n}),"deleteByOrganization"),addParticipant:o(async(t,n)=>e.post("/channels/@me/:channelId/participants",n,{channelId:t}),"addParticipant"),addParticipantByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/participants",s,{organizationSlug:t,channelId:n}),"addParticipantByOrganization"),removeParticipant:o(async(t,n)=>e.delete("/channels/@me/:channelId/participants/:username",void 0,{channelId:t,username:n}),"removeParticipant"),removeParticipantByOrganization:o(async(t,n,s)=>e.delete("/channels/:organizationSlug/:channelId/participants/:username",void 0,{organizationSlug:t,channelId:n,username:s}),"removeParticipantByOrganization"),getMembers:o(async(t,n)=>e.get("/channels/@me/:channelId/members",{channelId:t,...n}),"getMembers"),getMembersByOrganization:o(async(t,n,s)=>e.get("/channels/:organizationSlug/:channelId/members",{organizationSlug:t,channelId:n,...s}),"getMembersByOrganization"),messages:Hn(e)});var qn=e=>({getRates:o(()=>e.get("/currencies/rates"),"getRates"),convert:o(t=>e.post("/currencies/convert",t),"convert"),convertAmount:o((t,n,s)=>e.post("/currencies/convert",{from:t,to:n,amount:s}),"convertAmount")});var Vn=e=>({getFollowing:o(async t=>e.get("/feed/following",t),"getFollowing"),getDiscover:o(async t=>e.get("/feed/discover",t),"getDiscover")});var Kn=e=>({getAll:o(async()=>e.get("/health"),"getAll"),database:o(async()=>e.get("/health/database"),"database"),api:o(async()=>e.get("/health/api"),"api"),app:o(async()=>e.get("/health/app"),"app")});var Cn=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var kn=o(e=>({account:o(async t=>e.get("/organizations/:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(ne)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:o(t=>{if(ne)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 $n=o(e=>({create:o(async(t,n,s)=>e.post("/organizations/:organizationSlug/events/:eventSlug/orders",s,{organizationSlug:t,eventSlug:n}),"create")}),"organizationsEventsOrders");var Xn=o(e=>({getAll:o(async()=>e.get("/organizations/events/styles"),"getAll"),get:o(async t=>e.get("/organizations/events/styles/:styleSlug",{styleSlug:t}),"get"),create:o(async t=>e.post("/organizations/events/styles",t),"create"),update:o(async(t,n)=>e.put("/organizations/events/styles/:styleSlug",n,{styleSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/events/styles/:styleSlug",null,{styleSlug:t}),"delete")}),"organizationsEventsStyles");var Zn=o(e=>({getAll:o(async(t,n)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:n}),"getAll"),get:o(async(t,n,s)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:n,ticketId:s}),"get"),create:o(async(t,n,s)=>e.post("/organizations/:organizationSlug/events/:eventSlug/tickets",s,{organizationSlug:t,eventSlug:n}),"create"),update:o(async(t,n,s,i)=>e.put("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",i,{organizationSlug:t,eventSlug:n,ticketId:s}),"update"),delete:o(async(t,n,s)=>e.delete("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:n,ticketId:s}),"delete")}),"organizationsEventsTickets");var Jn=o(e=>({record:o(async(t,n)=>e.post("/organizations/:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:n}),"record")}),"organizationsEventsViews");var Yn=o(e=>({search:o(async(t,n)=>e.get("/organizations/events/search",{q:t,limit:n}),"search"),getAll:o(async(t,n)=>t?e.get("/organizations/:organizationSlug/events",{organizationSlug:t,...n}):e.get("/organizations/events",n),"getAll"),getSuggestions:o(async t=>e.get("/organizations/events/suggestions",t),"getSuggestions"),getNearby:o(async t=>e.get("/organizations/events/nearby",t),"getNearby"),get:o(async(t,n)=>e.get("/organizations/:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:n}),"get"),create:o(async(t,n)=>e.post("/organizations/:organizationSlug/events",n,{organizationSlug:t}),"create"),update:o(async(t,n,s)=>e.put("/organizations/:organizationSlug/events/:eventSlug",s,{organizationSlug:t,eventSlug:n}),"update"),delete:o(async(t,n)=>e.delete("/organizations/:organizationSlug/events/:eventSlug",null,{organizationSlug:t,eventSlug:n}),"delete"),uploadFile:o(async(t,n)=>e.post("/events/files/:eventFileType",oe("file",n),{eventFileType:t}),"uploadFile"),uploadOrganizationFile:o(async(t,n,s,i)=>e.post("/organizations/:organizationSlug/events/:eventSlug/files/:eventFileType",oe("file",i),{organizationSlug:t,eventSlug:n,eventFileType:s}),"uploadOrganizationFile"),orders:$n(e),styles:Xn(e),tickets:Zn(e),views:Jn(e)}),"organizationsEvents");var Qn=o(e=>({getLinks:o(async t=>e.get("/organizations/:organizationSlug/members/invitations/links",{organizationSlug:t}),"getLinks"),createLink:o(async(t,n={})=>e.post("/organizations/:organizationSlug/members/invitations/links",n,{organizationSlug:t}),"createLink"),accept:o(async(t,n)=>e.post("/organizations/:organizationSlug/members/invitations/accept",n,{organizationSlug:t}),"accept")}),"invitations");var Tn=o(e=>({me:o(async()=>e.get("/organizations/members/@me"),"me"),get:o(async t=>e.get("/organizations/:organizationSlug/members",{organizationSlug:t}),"get"),create:o(async(t,n)=>e.post("/organizations/:organizationSlug/members",n,{organizationSlug:t}),"create"),update:o(async(t,n,s)=>e.put("/organizations/:organizationSlug/members/:username",s,{organizationSlug:t,username:n}),"update"),delete:o(async(t,n)=>e.delete("/organizations/:organizationSlug/members/:username",null,{organizationSlug:t,username:n}),"delete"),invitations:Qn(e),accept:o(async t=>e.put("/organizations/:organizationSlug/members/@me/accept",null,{organizationSlug:t}),"accept"),reject:o(async t=>e.delete("/organizations/:organizationSlug/members/@me/reject",null,{organizationSlug:t}),"reject"),leave:o(async t=>e.delete("/organizations/:organizationSlug/members/@me",null,{organizationSlug:t}),"leave")}),"organizationsMembers");var eo=e=>({search:o(async(t,n)=>e.get("/organizations/search",{q:t,limit:n}),"search"),getAll:o(async()=>e.get("/organizations"),"getAll"),get:o(async t=>e.get("/organizations/:organizationSlug",{organizationSlug:t}),"get"),create:o(async t=>e.post("/organizations",t),"create"),update:o(async(t,n)=>e.put("/organizations/:organizationSlug",n,{organizationSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/:organizationSlug",null,{organizationSlug:t}),"delete"),uploadFile:o(async(t,n,s)=>e.post("/organizations/:organizationSlug/files/:organizationFileType",oe("file",s),{organizationSlug:t,organizationFileType:n}),"uploadFile"),billing:kn(e),events:Yn(e),members:Tn(e)});var to=e=>({follow:o(async t=>e.post("/profiles/:username/relationships/follow",null,{username:t}),"follow"),unfollow:o(async t=>e.post("/profiles/:username/relationships/unfollow",null,{username:t}),"unfollow"),getSuggestions:o(async t=>e.get("/profiles/@me/relationships/suggestions",t),"getSuggestions"),getFollowers:o(async(t,n)=>e.get("/profiles/:username/relationships/followers",{username:t,...n}),"getFollowers")});var no=e=>({get:o(async t=>e.get("/profiles/:username",{username:t}),"get"),relationships:to(e)});var oo=e=>({getAll:o(async()=>e.get("/users/bookings"),"getAll"),get:o(async t=>e.get("/users/bookings/:bookingId",{bookingId:t}),"get"),me:o(async()=>e.get("/users/@me/bookings"),"me")});var ro=e=>({me:o(async()=>e.get("/users/@me/notifications"),"me"),count:o(async t=>e.get("/users/@me/notifications/count",t),"count"),read:o(async()=>e.put("/users/@me/notifications/read",null),"read")});var so=o(e=>({record:o(async(t,n)=>e.post("/users/:username/posts/:postId/views",null,{username:t,postId:n}),"record")}),"usersPostsViews");var io=e=>({getByUsername:o(async(t,n)=>e.get("/users/:username/posts",{username:t,...n}),"getByUsername"),getByUsernameAndId:o(async(t,n)=>e.get("/users/:username/posts/:postId",{username:t,postId:n}),"getByUsernameAndId"),create:o(async t=>e.post("/users/@me/posts",t),"create"),update:o(async(t,n)=>e.put("/users/@me/posts/:postId",n,{postId:t}),"update"),delete:o(async t=>e.delete("/users/@me/posts/:postId",void 0,{postId:t}),"delete"),uploadMedia:o(async t=>e.post("/users/@me/posts/media",t),"uploadMedia"),views:so(e)});var ao=e=>({getByPost:o(async(t,n,s)=>e.get("/users/:username/posts/:postId/comments",{username:t,postId:n,...s}),"getByPost"),create:o(async(t,n)=>e.post("/users/@me/posts/:postId/comments",n,{postId:t}),"create"),update:o(async(t,n,s)=>e.put("/users/@me/posts/:postId/comments/:commentId",s,{postId:t,commentId:n}),"update"),delete:o(async(t,n)=>e.delete("/users/@me/posts/:postId/comments/:commentId",void 0,{postId:t,commentId:n}),"delete")});var po=e=>({getByUsername:o(async(t,n)=>e.get("/users/:username/reposts",{username:t,...n}),"getByUsername"),getByPost:o(async(t,n,s)=>e.get("/users/:username/posts/:postId/reposts",{username:t,postId:n,...s}),"getByPost"),create:o(async(t,n)=>e.post("/users/@me/posts/:postId/reposts",n||{},{postId:t}),"create"),delete:o(async t=>e.delete("/users/@me/posts/:postId/reposts",void 0,{postId:t}),"delete")});var co=e=>({getAll:o(async()=>e.get("/users"),"getAll"),get:o(async t=>e.get("/users/:userId",{userId:t}),"get"),me:o(async()=>e.get("/users/@me"),"me"),check:o(async(t,n)=>e.get("/users/check/:identifier",{identifier:t,suggestions:n}),"check"),update:o(async(t,n)=>e.put("/users/:userId",n,{userId:t}),"update"),uploadFile:o(async(t,n,s)=>e.post("/users/:userId/files/:userFileType",oe("file",s),{userId:t,userFileType:n}),"uploadFile"),uploadTempFile:o(async(t,n)=>e.post("/users/files/:userFileType",oe("file",n),{userFileType:t}),"uploadTempFile"),bookings:oo(e),notifications:ro(e),posts:io(e),postsComments:ao(e),postsReposts:po(e)});var lo=e=>({registerToBeta:o(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var fo=class{static{o(this,"TonightPass");}client;apiKeys;auth;careers;channels;currencies;feed;health;orders;organizations;profiles;users;notifications;constructor(t){this.client=new ke(t),this.apiKeys=Fn(this.client),this.auth=Wn(this.client),this.careers=Gn(this.client),this.channels=En(this.client),this.currencies=qn(this.client),this.feed=Vn(this.client),this.health=Kn(this.client),this.orders=Cn(this.client),this.organizations=eo(this.client),this.profiles=no(this.client),this.users=co(this.client),this.notifications=lo(this.client);}};var $e=class{static{o(this,"WebSocketClient");}ws;options;reconnectAttempts=0;reconnectTimer;eventHandlers=new Map;isConnected=false;isReconnecting=false;constructor(t={}){this.options={baseURL:"wss://api.tonightpass.com",maxReconnectAttempts:3,reconnectInterval:1e3,debug:false,...t};}log(t,...n){this.options.debug&&console.log(`[WebSocketClient] ${t}`,...n);}getWebSocketURL(t,n){let s={};Object.entries(n).forEach(([r,a])=>{typeof a=="string"&&r!=="token"&&(s[r]=a);});let i=pathcat.pathcat(t,s);return `${this.options.baseURL}${i}`}async connect(t,n){return new Promise((s,i)=>{try{let r=this.getWebSocketURL(t,n);this.log("Connecting to",r);let a={};"token"in n&&typeof n.token=="string"&&(a.Authorization=`Bearer ${n.token}`),this.ws=new Bs__default.default(r,{headers:a}),this.ws.on("open",()=>{this.log("Connected successfully"),this.isConnected=!0,this.isReconnecting=!1,this.reconnectAttempts=0,s();}),this.ws.on("message",p=>{try{let re=JSON.parse(p.toString());this.handleEvent(re);}catch(re){this.log("Error parsing message:",re);}}),this.ws.on("close",p=>{this.log("Connection closed",p),this.isConnected=!1,this.options.maxReconnectAttempts&&!this.isReconnecting&&this.handleReconnect(t,n);}),this.ws.on("error",p=>{this.log("WebSocket error:",p),this.isConnected=!1,i(p);});}catch(r){i(r);}})}handleReconnect(t,n){if(this.reconnectAttempts>=this.options.maxReconnectAttempts){this.log("Max reconnect attempts reached");return}this.isReconnecting=true,this.reconnectAttempts++,this.log(`Attempting to reconnect (${this.reconnectAttempts}/${this.options.maxReconnectAttempts})`),this.reconnectTimer=setTimeout(()=>{this.connect(t,n).catch(s=>{this.log("Reconnection failed:",s);});},this.options.reconnectInterval);}handleEvent(t){this.log("Received event:",t.type);let n=this.eventHandlers.get(t.type);n&&n.forEach(i=>i(t));let s=this.eventHandlers.get("*");s&&s.forEach(i=>i(t));}on(t,n){this.eventHandlers.has(t)||this.eventHandlers.set(t,new Set);let s=o(i=>{n(i);},"wrappedHandler");return this.eventHandlers.get(t).add(s),()=>{let i=this.eventHandlers.get(t);i&&(i.delete(s),i.size===0&&this.eventHandlers.delete(t));}}off(t,n){let s=this.eventHandlers.get(t);s&&(s.clear(),this.eventHandlers.delete(t));}send(t){this.ws&&this.isConnected?this.ws.send(JSON.stringify(t)):this.log("Cannot send data: WebSocket not connected");}disconnect(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.ws&&(this.isConnected=false,this.isReconnecting=false,this.ws.close()),this.eventHandlers.clear();}get connected(){return this.isConnected}get reconnecting(){return this.isReconnecting}};var Xe=class extends $e{static{o(this,"ChannelWebSocketClient");}async connectToChannel(t,n={}){return this.connect("/channels/@me/:channelId/ws",{...n,channelId:t})}async connectToOrganizationChannel(t,n,s={}){return this.connect("/channels/:organizationSlug/:channelId/ws",{...s,organizationSlug:t,channelId:n})}async connectToUserChannels(t={}){return this.connect("/channels/@me/ws",t)}async connectToOrganizationChannels(t,n={}){return this.connect("/channels/:organizationSlug/ws",{...n,organizationSlug:t})}onMessageCreate(t){return this.on("channel_message_create",t)}onMessageUpdate(t){return this.on("channel_message_update",t)}onMessageDelete(t){return this.on("channel_message_delete",t)}onChannelUpdate(t){return this.on("channel_update",t)}onChannelDelete(t){return this.on("channel_delete",t)}onMemberJoin(t){return this.on("channel_member_join",t)}onMemberLeave(t){return this.on("channel_member_leave",t)}onTypingStart(t){return this.on("typing_start",t)}onTypingStop(t){return this.on("typing_stop",t)}startTyping(t){this.send({type:"typing_start",data:{channelId:t}});}stopTyping(t){this.send({type:"typing_stop",data:{channelId:t}});}subscribeToChannel(t){this.send({type:"subscribe",data:{channelId:t}});}unsubscribeFromChannel(t){this.send({type:"unsubscribe",data:{channelId:t}});}};function Im(e){let t=new Xe(e);return {connect:o((n,s)=>t.connectToChannel(n,{token:s}),"connect"),connectToOrganization:o((n,s,i)=>t.connectToOrganizationChannel(n,s,{token:i}),"connectToOrganization"),connectToUserChannels:o(n=>t.connectToUserChannels({token:n}),"connectToUserChannels"),connectToOrganizationChannels:o((n,s)=>t.connectToOrganizationChannels(n,{token:s}),"connectToOrganizationChannels"),onMessageCreate:o(n=>t.onMessageCreate(n),"onMessageCreate"),onMessageUpdate:o(n=>t.onMessageUpdate(n),"onMessageUpdate"),onMessageDelete:o(n=>t.onMessageDelete(n),"onMessageDelete"),onChannelUpdate:o(n=>t.onChannelUpdate(n),"onChannelUpdate"),onChannelDelete:o(n=>t.onChannelDelete(n),"onChannelDelete"),onMemberJoin:o(n=>t.onMemberJoin(n),"onMemberJoin"),onMemberLeave:o(n=>t.onMemberLeave(n),"onMemberLeave"),onTypingStart:o(n=>t.onTypingStart(n),"onTypingStart"),onTypingStop:o(n=>t.onTypingStop(n),"onTypingStop"),onAny:o(n=>t.on("*",n),"onAny"),startTyping:o(n=>t.startTyping(n),"startTyping"),stopTyping:o(n=>t.stopTyping(n),"stopTyping"),subscribeToChannel:o(n=>t.subscribeToChannel(n),"subscribeToChannel"),unsubscribeFromChannel:o(n=>t.unsubscribeFromChannel(n),"unsubscribeFromChannel"),disconnect:o(()=>t.disconnect(),"disconnect"),get connected(){return t.connected},get reconnecting(){return t.reconnecting},client:t}}o(Im,"channelsWS");
2
2
  exports.AcceptOrganizationMemberInvitationDto=xt;exports.AddParticipantDto=Ze;exports.AddReactionDto=et;exports.ApiKeyTier=Zs;exports.AtLeastOneMedia=Rr;exports.AtLeastOneMediaOnUpdate=Ar;exports.BaseOrganizationEventDto=y;exports.ChannelMemberRole=ei;exports.ChannelMessageReportReason=De;exports.ChannelStatus=ti;exports.ChannelType=se;exports.ChannelWebSocketClient=Xe;exports.Client=ke;exports.CreateChannelDto=he;exports.CreateChannelMessageDto=be;exports.CreateLocationDto=S;exports.CreateOrganizationDto=me;exports.CreateOrganizationEventDto=ut;exports.CreateOrganizationEventOrderDto=lt;exports.CreateOrganizationEventStyleDto=Le;exports.CreateOrganizationEventTicketDto=d;exports.CreateOrganizationIdentityDto=F;exports.CreateOrganizationMemberDto=Ee;exports.CreateOrganizationMemberInvitationLinkDto=St;exports.CreateUserDto=je;exports.CreateUserIdentityDto=M;exports.CreateUserPostCommentDto=Ce;exports.CreateUserPostDto=Pe;exports.CreateUserPostRepostDto=Pt;exports.Currency=C;exports.DEFAULT_API_URL=Nt;exports.ErrorType=si;exports.FeedType=ai;exports.GeoPointDto=z;exports.Language=Xi;exports.OAuth2Provider=Ys;exports.OrganizationEventFileType=fi;exports.OrganizationEventStatus=mi;exports.OrganizationEventStyleType=li;exports.OrganizationEventTicketCategory=$;exports.OrganizationEventTicketType=k;exports.OrganizationEventType=X;exports.OrganizationEventVisibilityType=Z;exports.OrganizationFileType=Ii;exports.OrganizationMemberRole=x;exports.OrganizationMemberStatus=vi;exports.OrganizationTokenType=xi;exports.ProfileType=ki;exports.REGEX=c;exports.RecoveryDto=Rt;exports.RecoveryResetDto=we;exports.ReportChannelMessageDto=Ue;exports.SignInUserDto=Ve;exports.TonightPass=fo;exports.TonightPassAPIError=Dt;exports.UpdateChannelDto=Te;exports.UpdateChannelMessageDto=ot;exports.UpdateLocationDto=I;exports.UpdateOrganizationDto=ue;exports.UpdateOrganizationEventDto=h;exports.UpdateOrganizationEventStyleDto=Vt;exports.UpdateOrganizationEventTicketDto=f;exports.UpdateOrganizationIdentityDto=H;exports.UpdateOrganizationMemberDto=bt;exports.UpdateUserDto=Ae;exports.UpdateUserPostCommentDto=zt;exports.UpdateUserPostDto=Ke;exports.UserFileType=Hi;exports.UserIdentityGender=Y;exports.UserNotificationType=Ai;exports.UserPostMediaType=Pi;exports.UserPostVisibility=J;exports.UserRole=Gi;exports.UserTokenType=Fi;exports.WebSocketClient=$e;exports.apiKeys=Fn;exports.auth=Wn;exports.buildFileFormData=oe;exports.careers=Gn;exports.channels=En;exports.channelsWS=Im;exports.currencies=qn;exports.feed=Vn;exports.health=Kn;exports.isBrowser=ne;exports.notifications=lo;exports.orders=Cn;exports.organizations=eo;exports.profiles=no;exports.request=Bn;exports.sdk=l;exports.users=co;//# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map