tonightpass 0.0.214 → 0.0.215

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
@@ -558,9 +558,9 @@ type UserEndpoints = Endpoint<"GET", "/users", User[]> | Endpoint<"GET", "/users
558
558
  declare enum OAuth2Provider {
559
559
  Google = "google",
560
560
  Facebook = "facebook",
561
- Twitter = "twitter",
562
- TikTok = "tiktok"
561
+ Twitter = "twitter"
563
562
  }
563
+ type AuthMethod = OAuth2Provider | "password";
564
564
  type RecoveryResponse = {
565
565
  to: string;
566
566
  };
@@ -1944,4 +1944,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
1944
1944
  client: ChannelWebSocketClient;
1945
1945
  };
1946
1946
 
1947
- 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 CacheEntry, CacheManager, type CacheOptions, 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, GoogleOneTapDto, 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 OrganizationEventCalendar, 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, type SearchOrganizationEventsOptions, type SearchProfilesOptions, 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 };
1947
+ 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 AuthMethod, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CacheEntry, CacheManager, type CacheOptions, 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, GoogleOneTapDto, 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 OrganizationEventCalendar, 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, type SearchOrganizationEventsOptions, type SearchProfilesOptions, 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
@@ -558,9 +558,9 @@ type UserEndpoints = Endpoint<"GET", "/users", User[]> | Endpoint<"GET", "/users
558
558
  declare enum OAuth2Provider {
559
559
  Google = "google",
560
560
  Facebook = "facebook",
561
- Twitter = "twitter",
562
- TikTok = "tiktok"
561
+ Twitter = "twitter"
563
562
  }
563
+ type AuthMethod = OAuth2Provider | "password";
564
564
  type RecoveryResponse = {
565
565
  to: string;
566
566
  };
@@ -1944,4 +1944,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
1944
1944
  client: ChannelWebSocketClient;
1945
1945
  };
1946
1946
 
1947
- 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 CacheEntry, CacheManager, type CacheOptions, 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, GoogleOneTapDto, 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 OrganizationEventCalendar, 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, type SearchOrganizationEventsOptions, type SearchProfilesOptions, 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 };
1947
+ 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 AuthMethod, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CacheEntry, CacheManager, type CacheOptions, 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, GoogleOneTapDto, 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 OrganizationEventCalendar, 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, type SearchOrganizationEventsOptions, type SearchProfilesOptions, 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';var pathcat=require('pathcat'),ho=require('redaxios');require('reflect-metadata');var classValidator=require('class-validator'),classTransformer=require('class-transformer'),qs=require('ws');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ho__default=/*#__PURE__*/_interopDefault(ho);var qs__default=/*#__PURE__*/_interopDefault(qs);var yo=Object.defineProperty;var o=(e,t)=>yo(e,"name",{value:t,configurable:true});var Mt="https://api.tonightpass.com";var p={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};var he=class{static{o(this,"CacheManager");}cache=new Map;options;constructor(t){this.options={enabled:t.enabled,ttl:t.ttl??6e4,methods:t.methods??["GET"]};}generateKey(t,n){return `${t}:${n}`}shouldCache(t){return this.options.enabled&&this.options.methods.includes(t)}isValid(t){return Date.now()-t.timestamp<this.options.ttl}get(t,n){if(!this.shouldCache(t))return null;let s=this.generateKey(t,n),i=this.cache.get(s);return i?this.isValid(i)?i.data:(this.cache.delete(s),null):null}set(t,n,s){if(!this.shouldCache(t))return;let i=this.generateKey(t,n);this.cache.set(i,{data:s,timestamp:Date.now()});}clear(){this.cache.clear();}stats(){return {size:this.cache.size,keys:Array.from(this.cache.keys())}}};var k=typeof window<"u";function $(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($,"buildFileFormData");var vo=ho__default.default.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!k&&{"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:k}),Bt=o(async(e,t)=>{let{apiKey:n,...s}=t||{},i={...s.headers,...n&&{"X-API-Key":n}};return vo(e,{...s,headers:i}).then(a=>a).catch(a=>{throw a.data||console.error(a),a.data})},"request");var Je=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;}},Ne=class{static{o(this,"Client");}options;apiKey;cacheManager;url;constructor(t){this.options=t,this.apiKey=t.apiKey,this.url=(n,s)=>{let i=this.options.baseURL||Mt;return pathcat.pathcat(i,n,s)},t.cache?.enabled&&(this.cacheManager=new he(t.cache));}setOptions(t){this.options=t,this.apiKey=t.apiKey,t.cache?.enabled?this.cacheManager=new he(t.cache):this.cacheManager=void 0;}clearCache(){this.cacheManager?.clear();}getCacheStats(){return this.cacheManager?.stats()}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");if(this.cacheManager){let Lt=this.cacheManager.get(t,a);if(Lt!==null)return Lt}let c=await Bt(a,{method:t,data:s,apiKey:this.apiKey,...r}),C=c.data;if(!C.success)throw new Je(c,C);return this.cacheManager&&this.cacheManager.set(t,a,C.data),C.data}};function xo(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(xo,"_ts_decorate");function So(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(So,"_ts_metadata");var Ye=class{static{o(this,"AddParticipantDto");}username};xo([classValidator.IsString(),classValidator.Matches(p.USERNAME,{message:"user.username.format"}),So("design:type",String)],Ye.prototype,"username",void 0);var vi=function(e){return e.PUBLIC="public",e.BUILD="build",e.PREMIUM="premium",e.INTERNAL="internal",e}({});var xi=function(e){return e.Google="google",e.Facebook="facebook",e.Twitter="twitter",e.TikTok="tiktok",e}({});var Ue=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}({}),Ri=function(e){return e.Member="member",e.Admin="admin",e}({}),Oi=function(e){return e.Sent="sent",e.Delivered="delivered",e.Read="read",e.Received="received",e.Opened="opened",e}({});var X=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 Ai=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 Pi=function(e){return e.Following="following",e.Discover="discover",e}({});var Z=function(e){return e.ETicket="e-ticket",e.Other="other",e}({}),J=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 Ui=function(e){return e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art",e}({});var Y=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}({}),Q=function(e){return e.Public="public",e.Unlisted="unlisted",e.Private="private",e}({}),Mi=function(e){return e.Flyer="flyer",e.Trailer="trailer",e}({}),Bi=function(e){return e.Upcoming="upcoming",e.Ongoing="ongoing",e.Ended="ended",e}({});var Hi=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 qi=function(e){return e.InvitationLink="invitation_link",e}({});var Ci=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Yi=function(e){return e.Follow="follow",e}({});var Ti=function(e){return e.Image="image",e.Video="video",e}({});var T=function(e){return e.Public="public",e.Followers="followers",e.Private="private",e}({});var ia=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 ca=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),ee=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),pa=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var ga=function(e){return e.User="user",e.Organization="organization",e}({});var ha=function(e){return e.FR="fr",e.EN="en",e}({});function Te(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Te,"_ts_decorate");function et(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(et,"_ts_metadata");var ve=class{static{o(this,"CreateChannelDto");}type;participantUsernames;name};Te([classValidator.IsEnum(se),et("design:type",typeof se>"u"?Object:se)],ve.prototype,"type",void 0);Te([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(p.USERNAME,{each:true,message:"user.username.format"}),et("design:type",Array)],ve.prototype,"participantUsernames",void 0);Te([classValidator.IsOptional(),classValidator.ValidateIf(e=>e.type===se.Group),classValidator.IsString(),classValidator.Length(1,100),et("design:type",String)],ve.prototype,"name",void 0);function zo(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(zo,"_ts_decorate");function Po(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Po,"_ts_metadata");var tt=class{static{o(this,"UpdateChannelDto");}name};zo([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,100),Po("design:type",String)],tt.prototype,"name",void 0);function Lo(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Lo,"_ts_decorate");function Mo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Mo,"_ts_metadata");var nt=class{static{o(this,"AddReactionDto");}emoji};Lo([classValidator.IsString(),classValidator.Length(1,10),Mo("design:type",String)],nt.prototype,"emoji",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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 ot(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ot,"_ts_metadata");exports.ContentOrAttachmentsConstraint=class be{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=Le([classValidator.ValidatorConstraint({name:"contentOrAttachments",async:false})],exports.ContentOrAttachmentsConstraint);var xe=class{static{o(this,"CreateChannelMessageDto");}content;attachments;replyToId};Le([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.content!==void 0),classValidator.Length(1,1024),ot("design:type",String)],xe.prototype,"content",void 0);Le([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ArrayMaxSize(10),classValidator.Matches(/^channels\/[\w-]+\/messages\/[\w-]+\/private\/[\w-]+$/,{each:true}),classValidator.Validate(exports.ContentOrAttachmentsConstraint),ot("design:type",Array)],xe.prototype,"attachments",void 0);Le([classValidator.IsOptional(),classValidator.IsMongoId(),ot("design:type",String)],xe.prototype,"replyToId",void 0);function $o(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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($o,"_ts_decorate");function Xo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Xo,"_ts_metadata");var st=class{static{o(this,"UpdateChannelMessageDto");}content};$o([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,1024),Xo("design:type",String)],st.prototype,"content",void 0);function Gt(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Gt,"_ts_decorate");function Ht(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ht,"_ts_metadata");var Me=class{static{o(this,"ReportChannelMessageDto");}reason;description};Gt([classValidator.IsEnum(Ue),Ht("design:type",typeof Ue>"u"?Object:Ue)],Me.prototype,"reason",void 0);Gt([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.description&&e.description.trim().length>0),classValidator.Length(1,500),Ht("design:type",String)],Me.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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 te(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(te,"_ts_metadata");var it=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"}};it=B([classValidator.ValidatorConstraint({name:"coordinatesRange",async:false})],it);var z=class{static{o(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point";}};B([classValidator.IsString(),classValidator.IsNotEmpty(),te("design:type",String)],z.prototype,"type",void 0);B([classValidator.IsArray(),classValidator.IsNotEmpty(),classValidator.Validate(it),te("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),te("design:type",String)],S.prototype,"name",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,256),te("design:type",String)],S.prototype,"address",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),te("design:type",String)],S.prototype,"zipCode",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),te("design:type",String)],S.prototype,"city",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),te("design:type",String)],S.prototype,"country",void 0);B([classValidator.ValidateNested(),classTransformer.Type(()=>z),classValidator.IsNotEmpty(),te("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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 E(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(E,"_ts_metadata");var me=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};W([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),E("design:type",String)],me.prototype,"organizationSlug",void 0);W([classValidator.IsObject(),E("design:type",typeof F>"u"?Object:F)],me.prototype,"identity",void 0);W([classValidator.IsArray(),E("design:type",Array)],me.prototype,"members",void 0);W([classValidator.IsOptional(),classValidator.IsObject(),E("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),E("design:type",String)],F.prototype,"displayName",void 0);W([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),E("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"}),E("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"}),E("design:type",String)],F.prototype,"bannerUrl",void 0);W([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),E("design:type",Array)],F.prototype,"links",void 0);function H(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(H,"_ts_decorate");function V(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(V,"_ts_metadata");var ue=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};H([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(p.USERNAME,{message:"organization.slug.format"}),V("design:type",String)],ue.prototype,"slug",void 0);H([classValidator.IsObject(),classValidator.IsOptional(),V("design:type",typeof G>"u"?Object:G)],ue.prototype,"identity",void 0);H([classValidator.IsOptional(),classValidator.IsArray(),V("design:type",Array)],ue.prototype,"members",void 0);H([classValidator.IsOptional(),classValidator.IsObject(),V("design:type",typeof Location>"u"?Object:Location)],ue.prototype,"location",void 0);var G=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};H([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),V("design:type",String)],G.prototype,"displayName",void 0);H([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),V("design:type",String)],G.prototype,"description",void 0);H([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//),V("design:type",String)],G.prototype,"avatarUrl",void 0);H([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//),V("design:type",String)],G.prototype,"bannerUrl",void 0);H([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),V("design:type",Array)],G.prototype,"links",void 0);function br(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(br,"_ts_decorate");function xr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(xr,"_ts_metadata");var ft=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};br([classValidator.IsArray(),classValidator.IsString({each:true}),xr("design:type",Array)],ft.prototype,"cart",void 0);var Be=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var $t=class extends Be{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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Z),D("design:type",typeof Z>"u"?Object:Z)],d.prototype,"type",void 0);P([classValidator.IsEnum(J),D("design:type",typeof J>"u"?Object:J)],d.prototype,"category",void 0);P([classValidator.IsEnum(X),D("design:type",typeof X>"u"?Object:X)],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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Z),classValidator.IsOptional(),U("design:type",typeof Z>"u"?Object:Z)],f.prototype,"type",void 0);N([classValidator.IsEnum(J),classValidator.IsOptional(),U("design:type",typeof J>"u"?Object:J)],f.prototype,"category",void 0);N([classValidator.IsEnum(X),classValidator.IsOptional(),U("design:type",typeof X>"u"?Object:X)],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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 _e{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 zr(e){return function(t,n){classValidator.registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:exports.AtLeastOneMediaConstraint});}}o(zr,"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(p.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(Y),classValidator.IsNotEmpty(),R("design:type",typeof Y>"u"?Object:Y)],y.prototype,"type",void 0);v([classValidator.IsEnum(Q),classValidator.IsNotEmpty(),R("design:type",typeof Q>"u"?Object:Q)],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"}),zr(),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 yt=class extends y{static{o(this,"CreateOrganizationEventDto");}tickets};v([classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>d),classValidator.IsNotEmpty(),R("design:type",Array)],yt.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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 je{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 Lr(e){return function(t,n){classValidator.registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:exports.AtLeastOneMediaOnUpdateConstraint});}}o(Lr,"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(p.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(Y),O("design:type",typeof Y>"u"?Object:Y)],h.prototype,"type",void 0);b([classValidator.IsOptional(),classValidator.IsEnum(Q),O("design:type",typeof Q>"u"?Object:Q)],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"}),Lr(),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 xn(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(xn,"_ts_decorate");function Sn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Sn,"_ts_metadata");var qe=class{static{o(this,"CreateOrganizationMemberDto");}user;role};xn([classValidator.IsString(),classValidator.IsNotEmpty(),Sn("design:type",String)],qe.prototype,"user",void 0);xn([classValidator.IsEnum(x),classValidator.IsNotEmpty(),Sn("design:type",typeof x>"u"?Object:x)],qe.prototype,"role",void 0);function Fr(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Fr,"_ts_decorate");function Wr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Wr,"_ts_metadata");var St=class{static{o(this,"UpdateOrganizationMemberDto");}role};Fr([classValidator.IsEnum(x),classValidator.IsNotEmpty(),Wr("design:type",typeof x>"u"?Object:x)],St.prototype,"role",void 0);function Hr(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Hr,"_ts_decorate");function Vr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Vr,"_ts_metadata");var It=class{static{o(this,"AcceptOrganizationMemberInvitationDto");}token};Hr([classValidator.IsString(),classValidator.IsNotEmpty(),Vr("design:type",String)],It.prototype,"token",void 0);function Cr(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Cr,"_ts_decorate");function kr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(kr,"_ts_metadata");var Rt=class{static{o(this,"CreateOrganizationMemberInvitationLinkDto");}role};Cr([classValidator.IsEnum(x),classValidator.IsOptional(),kr("design:type",typeof x>"u"?Object:x)],Rt.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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 we=class{static{o(this,"CreateUserDto");}identifier;identity;password};j([classValidator.ValidateNested(),classTransformer.Type(()=>ge),w("design:type",typeof ge>"u"?Object:ge)],we.prototype,"identifier",void 0);j([classValidator.ValidateNested(),classTransformer.Type(()=>M),w("design:type",typeof M>"u"?Object:M)],we.prototype,"identity",void 0);j([classValidator.IsString(),classValidator.Matches(p.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(p.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(p.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(p.PASSWORD,{message:"Password must be secure."}),w("design:type",String)],we.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(p.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(p.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(p.NAME,{message:"Last name must be composed of letters only"}),w("design:type",String)],M.prototype,"lastName",void 0);j([classValidator.IsEnum(ee),w("design:type",typeof ee>"u"?Object:ee)],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 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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 ss(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ss,"_ts_metadata");var _t=class{static{o(this,"GoogleOneTapDto");}credential};rs([classValidator.IsNotEmpty(),classValidator.IsString(),ss("design:type",String)],_t.prototype,"credential",void 0);function cs(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(cs,"_ts_decorate");function ps(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ps,"_ts_metadata");var jt=class{static{o(this,"RecoveryDto");}identifier};cs([classValidator.IsNotEmpty(),classValidator.IsString(),ps("design:type",String)],jt.prototype,"identifier",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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 Ae=class{static{o(this,"RecoveryResetDto");}tokenId;tokenValue;password};wt([classValidator.IsString(),classValidator.IsNotEmpty(),At("design:type",String)],Ae.prototype,"tokenId",void 0);wt([classValidator.IsString(),classValidator.IsNotEmpty(),At("design:type",String)],Ae.prototype,"tokenValue",void 0);wt([classValidator.Matches(p.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(p.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(p.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(p.PASSWORD,{message:"Password must be secure."}),classValidator.IsNotEmpty({message:"Password is required"}),At("design:type",String)],Ae.prototype,"password",void 0);function jn(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(jn,"_ts_decorate");function wn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(wn,"_ts_metadata");var Ce=class{static{o(this,"SignInUserDto");}identifier;password};jn([classValidator.IsNotEmpty(),classValidator.IsString(),wn("design:type",String)],Ce.prototype,"identifier",void 0);jn([classValidator.IsNotEmpty(),classValidator.IsString(),wn("design:type",String)],Ce.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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 ze=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)],ze.prototype,"identifier",void 0);m([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>A),u("design:type",typeof A>"u"?Object:A)],ze.prototype,"identity",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Matches(p.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(p.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(p.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(p.PASSWORD,{message:"Password must be secure."}),u("design:type",String)],ze.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(p.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(p.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(p.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(ee),u("design:type",typeof ee>"u"?Object:ee)],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 Pt(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Pt,"_ts_decorate");function Dt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Dt,"_ts_metadata");var De=class{static{o(this,"CreateUserPostDto");}content;mediaUrls;visibility};Pt([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,512),Dt("design:type",String)],De.prototype,"content",void 0);Pt([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}),Dt("design:type",Array)],De.prototype,"mediaUrls",void 0);Pt([classValidator.IsOptional(),classValidator.IsEnum(T),Dt("design:type",typeof T>"u"?Object:T)],De.prototype,"visibility",void 0);function Ln(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Ln,"_ts_decorate");function Mn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Mn,"_ts_metadata");var ke=class{static{o(this,"UpdateUserPostDto");}content;visibility};Ln([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,512),Mn("design:type",String)],ke.prototype,"content",void 0);Ln([classValidator.IsOptional(),classValidator.IsEnum(T),Mn("design:type",typeof T>"u"?Object:T)],ke.prototype,"visibility",void 0);function Fn(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Fn,"_ts_decorate");function Wn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Wn,"_ts_metadata");var $e=class{static{o(this,"CreateUserPostCommentDto");}content;replyToId};Fn([classValidator.IsString(),classValidator.Length(1,280),Wn("design:type",String)],$e.prototype,"content",void 0);Fn([classValidator.IsOptional(),classValidator.IsString(),Wn("design:type",String)],$e.prototype,"replyToId",void 0);function Us(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Us,"_ts_decorate");function Ls(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ls,"_ts_metadata");var Nt=class{static{o(this,"UpdateUserPostCommentDto");}content};Us([classValidator.IsString(),classValidator.Length(1,280),Ls("design:type",String)],Nt.prototype,"content",void 0);function Fs(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Fs,"_ts_decorate");function Ws(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ws,"_ts_metadata");var Ut=class{static{o(this,"CreateUserPostRepostDto");}comment};Fs([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,280),Ws("design:type",String)],Ut.prototype,"comment",void 0);function l(e){return e}o(l,"sdk");var Gn=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 Hn=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(k)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"),googleOneTap:o(async t=>e.post("/oauth2/google/one-tap",t),"googleOneTap")}});var Vn=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 qn=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 Kn=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:qn(e)});var Cn=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 kn=e=>({getFollowing:o(async t=>e.get("/feed/following",t),"getFollowing"),getDiscover:o(async t=>e.get("/feed/discover",t),"getDiscover")});var $n=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 Xn=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var Zn=o(e=>({account:o(async t=>e.get("/organizations/:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(k)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(k)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 Jn=o(e=>({create:o(async(t,n,s)=>e.post("/organizations/:organizationSlug/events/:eventSlug/orders",s,{organizationSlug:t,eventSlug:n}),"create")}),"organizationsEventsOrders");var Yn=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 Qn=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 Tn=o(e=>({record:o(async(t,n)=>e.post("/organizations/:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:n}),"record")}),"organizationsEventsViews");var eo=o(e=>({search:o(async(t,n)=>e.get("/organizations/events/search",{q:t,...n}),"search"),getCalendar:o(async(t,n)=>e.get("/organizations/events/calendar/:year/:month",{year:t.toString(),month:n.toString()}),"getCalendar"),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",$("file",n),{eventFileType:t}),"uploadFile"),uploadOrganizationFile:o(async(t,n,s,i)=>e.post("/organizations/:organizationSlug/events/:eventSlug/files/:eventFileType",$("file",i),{organizationSlug:t,eventSlug:n,eventFileType:s}),"uploadOrganizationFile"),orders:Jn(e),styles:Yn(e),tickets:Qn(e),views:Tn(e)}),"organizationsEvents");var to=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 no=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:to(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 oo=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",$("file",s),{organizationSlug:t,organizationFileType:n}),"uploadFile"),billing:Zn(e),events:eo(e),members:no(e)});var ro=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 so=e=>({getAll:o(async t=>e.get("/profiles",t),"getAll"),search:o(async(t,n)=>e.get("/profiles/search",{q:t,...n}),"search"),get:o(async t=>e.get("/profiles/:username",{username:t}),"get"),relationships:ro(e)});var io=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 ao=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 co=o(e=>({record:o(async(t,n)=>e.post("/users/:username/posts/:postId/views",null,{username:t,postId:n}),"record")}),"usersPostsViews");var po=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:co(e)});var lo=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 fo=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 mo=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",$("file",s),{userId:t,userFileType:n}),"uploadFile"),uploadTempFile:o(async(t,n)=>e.post("/users/files/:userFileType",$("file",n),{userFileType:t}),"uploadTempFile"),bookings:io(e),notifications:ao(e),posts:po(e),postsComments:lo(e),postsReposts:fo(e)});var uo=e=>({registerToBeta:o(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var go=class{static{o(this,"TonightPass");}client;apiKeys;auth;careers;channels;currencies;feed;health;orders;organizations;profiles;users;notifications;constructor(t){this.client=new Ne(t),this.apiKeys=Gn(this.client),this.auth=Hn(this.client),this.careers=Vn(this.client),this.channels=Kn(this.client),this.currencies=Cn(this.client),this.feed=kn(this.client),this.health=$n(this.client),this.orders=Xn(this.client),this.organizations=oo(this.client),this.profiles=so(this.client),this.users=mo(this.client),this.notifications=uo(this.client);}};var Xe=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 qs__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",c=>{try{let C=JSON.parse(c.toString());this.handleEvent(C);}catch(C){this.log("Error parsing message:",C);}}),this.ws.on("close",c=>{this.log("Connection closed",c),this.isConnected=!1,this.options.maxReconnectAttempts&&!this.isReconnecting&&this.handleReconnect(t,n);}),this.ws.on("error",c=>{this.log("WebSocket error:",c),this.isConnected=!1,i(c);});}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 Ze=class extends Xe{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 Fm(e){let t=new Ze(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(Fm,"channelsWS");
1
+ 'use strict';var pathcat=require('pathcat'),ho=require('redaxios');require('reflect-metadata');var classValidator=require('class-validator'),classTransformer=require('class-transformer'),qs=require('ws');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ho__default=/*#__PURE__*/_interopDefault(ho);var qs__default=/*#__PURE__*/_interopDefault(qs);var yo=Object.defineProperty;var o=(e,t)=>yo(e,"name",{value:t,configurable:true});var Mt="https://api.tonightpass.com";var p={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};var he=class{static{o(this,"CacheManager");}cache=new Map;options;constructor(t){this.options={enabled:t.enabled,ttl:t.ttl??6e4,methods:t.methods??["GET"]};}generateKey(t,n){return `${t}:${n}`}shouldCache(t){return this.options.enabled&&this.options.methods.includes(t)}isValid(t){return Date.now()-t.timestamp<this.options.ttl}get(t,n){if(!this.shouldCache(t))return null;let s=this.generateKey(t,n),i=this.cache.get(s);return i?this.isValid(i)?i.data:(this.cache.delete(s),null):null}set(t,n,s){if(!this.shouldCache(t))return;let i=this.generateKey(t,n);this.cache.set(i,{data:s,timestamp:Date.now()});}clear(){this.cache.clear();}stats(){return {size:this.cache.size,keys:Array.from(this.cache.keys())}}};var k=typeof window<"u";function $(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($,"buildFileFormData");var vo=ho__default.default.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!k&&{"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:k}),Bt=o(async(e,t)=>{let{apiKey:n,...s}=t||{},i={...s.headers,...n&&{"X-API-Key":n}};return vo(e,{...s,headers:i}).then(a=>a).catch(a=>{throw a.data||console.error(a),a.data})},"request");var Je=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;}},Ne=class{static{o(this,"Client");}options;apiKey;cacheManager;url;constructor(t){this.options=t,this.apiKey=t.apiKey,this.url=(n,s)=>{let i=this.options.baseURL||Mt;return pathcat.pathcat(i,n,s)},t.cache?.enabled&&(this.cacheManager=new he(t.cache));}setOptions(t){this.options=t,this.apiKey=t.apiKey,t.cache?.enabled?this.cacheManager=new he(t.cache):this.cacheManager=void 0;}clearCache(){this.cacheManager?.clear();}getCacheStats(){return this.cacheManager?.stats()}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");if(this.cacheManager){let Lt=this.cacheManager.get(t,a);if(Lt!==null)return Lt}let c=await Bt(a,{method:t,data:s,apiKey:this.apiKey,...r}),C=c.data;if(!C.success)throw new Je(c,C);return this.cacheManager&&this.cacheManager.set(t,a,C.data),C.data}};function xo(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(xo,"_ts_decorate");function So(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(So,"_ts_metadata");var Ye=class{static{o(this,"AddParticipantDto");}username};xo([classValidator.IsString(),classValidator.Matches(p.USERNAME,{message:"user.username.format"}),So("design:type",String)],Ye.prototype,"username",void 0);var vi=function(e){return e.PUBLIC="public",e.BUILD="build",e.PREMIUM="premium",e.INTERNAL="internal",e}({});var xi=function(e){return e.Google="google",e.Facebook="facebook",e.Twitter="twitter",e}({});var Ue=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}({}),Ri=function(e){return e.Member="member",e.Admin="admin",e}({}),Oi=function(e){return e.Sent="sent",e.Delivered="delivered",e.Read="read",e.Received="received",e.Opened="opened",e}({});var X=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 Ai=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 Pi=function(e){return e.Following="following",e.Discover="discover",e}({});var Z=function(e){return e.ETicket="e-ticket",e.Other="other",e}({}),J=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 Ui=function(e){return e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art",e}({});var Y=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}({}),Q=function(e){return e.Public="public",e.Unlisted="unlisted",e.Private="private",e}({}),Mi=function(e){return e.Flyer="flyer",e.Trailer="trailer",e}({}),Bi=function(e){return e.Upcoming="upcoming",e.Ongoing="ongoing",e.Ended="ended",e}({});var Hi=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 qi=function(e){return e.InvitationLink="invitation_link",e}({});var Ci=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Yi=function(e){return e.Follow="follow",e}({});var Ti=function(e){return e.Image="image",e.Video="video",e}({});var T=function(e){return e.Public="public",e.Followers="followers",e.Private="private",e}({});var ia=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 ca=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),ee=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),pa=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var ga=function(e){return e.User="user",e.Organization="organization",e}({});var ha=function(e){return e.FR="fr",e.EN="en",e}({});function Te(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Te,"_ts_decorate");function et(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(et,"_ts_metadata");var ve=class{static{o(this,"CreateChannelDto");}type;participantUsernames;name};Te([classValidator.IsEnum(se),et("design:type",typeof se>"u"?Object:se)],ve.prototype,"type",void 0);Te([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(p.USERNAME,{each:true,message:"user.username.format"}),et("design:type",Array)],ve.prototype,"participantUsernames",void 0);Te([classValidator.IsOptional(),classValidator.ValidateIf(e=>e.type===se.Group),classValidator.IsString(),classValidator.Length(1,100),et("design:type",String)],ve.prototype,"name",void 0);function zo(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(zo,"_ts_decorate");function Po(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Po,"_ts_metadata");var tt=class{static{o(this,"UpdateChannelDto");}name};zo([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,100),Po("design:type",String)],tt.prototype,"name",void 0);function Lo(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Lo,"_ts_decorate");function Mo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Mo,"_ts_metadata");var nt=class{static{o(this,"AddReactionDto");}emoji};Lo([classValidator.IsString(),classValidator.Length(1,10),Mo("design:type",String)],nt.prototype,"emoji",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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 ot(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ot,"_ts_metadata");exports.ContentOrAttachmentsConstraint=class be{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=Le([classValidator.ValidatorConstraint({name:"contentOrAttachments",async:false})],exports.ContentOrAttachmentsConstraint);var xe=class{static{o(this,"CreateChannelMessageDto");}content;attachments;replyToId};Le([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.content!==void 0),classValidator.Length(1,1024),ot("design:type",String)],xe.prototype,"content",void 0);Le([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ArrayMaxSize(10),classValidator.Matches(/^channels\/[\w-]+\/messages\/[\w-]+\/private\/[\w-]+$/,{each:true}),classValidator.Validate(exports.ContentOrAttachmentsConstraint),ot("design:type",Array)],xe.prototype,"attachments",void 0);Le([classValidator.IsOptional(),classValidator.IsMongoId(),ot("design:type",String)],xe.prototype,"replyToId",void 0);function $o(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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($o,"_ts_decorate");function Xo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Xo,"_ts_metadata");var st=class{static{o(this,"UpdateChannelMessageDto");}content};$o([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,1024),Xo("design:type",String)],st.prototype,"content",void 0);function Gt(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Gt,"_ts_decorate");function Ht(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ht,"_ts_metadata");var Me=class{static{o(this,"ReportChannelMessageDto");}reason;description};Gt([classValidator.IsEnum(Ue),Ht("design:type",typeof Ue>"u"?Object:Ue)],Me.prototype,"reason",void 0);Gt([classValidator.IsOptional(),classValidator.IsString(),classValidator.ValidateIf(e=>e.description&&e.description.trim().length>0),classValidator.Length(1,500),Ht("design:type",String)],Me.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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 te(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(te,"_ts_metadata");var it=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"}};it=B([classValidator.ValidatorConstraint({name:"coordinatesRange",async:false})],it);var z=class{static{o(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point";}};B([classValidator.IsString(),classValidator.IsNotEmpty(),te("design:type",String)],z.prototype,"type",void 0);B([classValidator.IsArray(),classValidator.IsNotEmpty(),classValidator.Validate(it),te("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),te("design:type",String)],S.prototype,"name",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,256),te("design:type",String)],S.prototype,"address",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),te("design:type",String)],S.prototype,"zipCode",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),te("design:type",String)],S.prototype,"city",void 0);B([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),te("design:type",String)],S.prototype,"country",void 0);B([classValidator.ValidateNested(),classTransformer.Type(()=>z),classValidator.IsNotEmpty(),te("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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 E(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(E,"_ts_metadata");var me=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};W([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),E("design:type",String)],me.prototype,"organizationSlug",void 0);W([classValidator.IsObject(),E("design:type",typeof F>"u"?Object:F)],me.prototype,"identity",void 0);W([classValidator.IsArray(),E("design:type",Array)],me.prototype,"members",void 0);W([classValidator.IsOptional(),classValidator.IsObject(),E("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),E("design:type",String)],F.prototype,"displayName",void 0);W([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),E("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"}),E("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"}),E("design:type",String)],F.prototype,"bannerUrl",void 0);W([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),E("design:type",Array)],F.prototype,"links",void 0);function H(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(H,"_ts_decorate");function V(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(V,"_ts_metadata");var ue=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};H([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(p.USERNAME,{message:"organization.slug.format"}),V("design:type",String)],ue.prototype,"slug",void 0);H([classValidator.IsObject(),classValidator.IsOptional(),V("design:type",typeof G>"u"?Object:G)],ue.prototype,"identity",void 0);H([classValidator.IsOptional(),classValidator.IsArray(),V("design:type",Array)],ue.prototype,"members",void 0);H([classValidator.IsOptional(),classValidator.IsObject(),V("design:type",typeof Location>"u"?Object:Location)],ue.prototype,"location",void 0);var G=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};H([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),V("design:type",String)],G.prototype,"displayName",void 0);H([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),V("design:type",String)],G.prototype,"description",void 0);H([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//),V("design:type",String)],G.prototype,"avatarUrl",void 0);H([classValidator.IsOptional(),classValidator.Matches(/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//),V("design:type",String)],G.prototype,"bannerUrl",void 0);H([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:true}),classValidator.ArrayMaxSize(5),V("design:type",Array)],G.prototype,"links",void 0);function br(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(br,"_ts_decorate");function xr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(xr,"_ts_metadata");var ft=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};br([classValidator.IsArray(),classValidator.IsString({each:true}),xr("design:type",Array)],ft.prototype,"cart",void 0);var Be=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var $t=class extends Be{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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Z),D("design:type",typeof Z>"u"?Object:Z)],d.prototype,"type",void 0);P([classValidator.IsEnum(J),D("design:type",typeof J>"u"?Object:J)],d.prototype,"category",void 0);P([classValidator.IsEnum(X),D("design:type",typeof X>"u"?Object:X)],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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Z),classValidator.IsOptional(),U("design:type",typeof Z>"u"?Object:Z)],f.prototype,"type",void 0);N([classValidator.IsEnum(J),classValidator.IsOptional(),U("design:type",typeof J>"u"?Object:J)],f.prototype,"category",void 0);N([classValidator.IsEnum(X),classValidator.IsOptional(),U("design:type",typeof X>"u"?Object:X)],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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 _e{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 zr(e){return function(t,n){classValidator.registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:exports.AtLeastOneMediaConstraint});}}o(zr,"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(p.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(Y),classValidator.IsNotEmpty(),R("design:type",typeof Y>"u"?Object:Y)],y.prototype,"type",void 0);v([classValidator.IsEnum(Q),classValidator.IsNotEmpty(),R("design:type",typeof Q>"u"?Object:Q)],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"}),zr(),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 yt=class extends y{static{o(this,"CreateOrganizationEventDto");}tickets};v([classValidator.IsArray(),classValidator.ValidateNested({each:true}),classTransformer.Type(()=>d),classValidator.IsNotEmpty(),R("design:type",Array)],yt.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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 je{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 Lr(e){return function(t,n){classValidator.registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:exports.AtLeastOneMediaOnUpdateConstraint});}}o(Lr,"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(p.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(Y),O("design:type",typeof Y>"u"?Object:Y)],h.prototype,"type",void 0);b([classValidator.IsOptional(),classValidator.IsEnum(Q),O("design:type",typeof Q>"u"?Object:Q)],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"}),Lr(),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 xn(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(xn,"_ts_decorate");function Sn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Sn,"_ts_metadata");var qe=class{static{o(this,"CreateOrganizationMemberDto");}user;role};xn([classValidator.IsString(),classValidator.IsNotEmpty(),Sn("design:type",String)],qe.prototype,"user",void 0);xn([classValidator.IsEnum(x),classValidator.IsNotEmpty(),Sn("design:type",typeof x>"u"?Object:x)],qe.prototype,"role",void 0);function Fr(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Fr,"_ts_decorate");function Wr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Wr,"_ts_metadata");var St=class{static{o(this,"UpdateOrganizationMemberDto");}role};Fr([classValidator.IsEnum(x),classValidator.IsNotEmpty(),Wr("design:type",typeof x>"u"?Object:x)],St.prototype,"role",void 0);function Hr(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Hr,"_ts_decorate");function Vr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Vr,"_ts_metadata");var It=class{static{o(this,"AcceptOrganizationMemberInvitationDto");}token};Hr([classValidator.IsString(),classValidator.IsNotEmpty(),Vr("design:type",String)],It.prototype,"token",void 0);function Cr(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Cr,"_ts_decorate");function kr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(kr,"_ts_metadata");var Rt=class{static{o(this,"CreateOrganizationMemberInvitationLinkDto");}role};Cr([classValidator.IsEnum(x),classValidator.IsOptional(),kr("design:type",typeof x>"u"?Object:x)],Rt.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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 we=class{static{o(this,"CreateUserDto");}identifier;identity;password};j([classValidator.ValidateNested(),classTransformer.Type(()=>ge),w("design:type",typeof ge>"u"?Object:ge)],we.prototype,"identifier",void 0);j([classValidator.ValidateNested(),classTransformer.Type(()=>M),w("design:type",typeof M>"u"?Object:M)],we.prototype,"identity",void 0);j([classValidator.IsString(),classValidator.Matches(p.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(p.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(p.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(p.PASSWORD,{message:"Password must be secure."}),w("design:type",String)],we.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(p.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(p.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(p.NAME,{message:"Last name must be composed of letters only"}),w("design:type",String)],M.prototype,"lastName",void 0);j([classValidator.IsEnum(ee),w("design:type",typeof ee>"u"?Object:ee)],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 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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 ss(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ss,"_ts_metadata");var _t=class{static{o(this,"GoogleOneTapDto");}credential};rs([classValidator.IsNotEmpty(),classValidator.IsString(),ss("design:type",String)],_t.prototype,"credential",void 0);function cs(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(cs,"_ts_decorate");function ps(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ps,"_ts_metadata");var jt=class{static{o(this,"RecoveryDto");}identifier};cs([classValidator.IsNotEmpty(),classValidator.IsString(),ps("design:type",String)],jt.prototype,"identifier",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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 Ae=class{static{o(this,"RecoveryResetDto");}tokenId;tokenValue;password};wt([classValidator.IsString(),classValidator.IsNotEmpty(),At("design:type",String)],Ae.prototype,"tokenId",void 0);wt([classValidator.IsString(),classValidator.IsNotEmpty(),At("design:type",String)],Ae.prototype,"tokenValue",void 0);wt([classValidator.Matches(p.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(p.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(p.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(p.PASSWORD,{message:"Password must be secure."}),classValidator.IsNotEmpty({message:"Password is required"}),At("design:type",String)],Ae.prototype,"password",void 0);function jn(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(jn,"_ts_decorate");function wn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(wn,"_ts_metadata");var Ce=class{static{o(this,"SignInUserDto");}identifier;password};jn([classValidator.IsNotEmpty(),classValidator.IsString(),wn("design:type",String)],Ce.prototype,"identifier",void 0);jn([classValidator.IsNotEmpty(),classValidator.IsString(),wn("design:type",String)],Ce.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 c=e.length-1;c>=0;c--)(a=e[c])&&(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 ze=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)],ze.prototype,"identifier",void 0);m([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>A),u("design:type",typeof A>"u"?Object:A)],ze.prototype,"identity",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Matches(p.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(p.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(p.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(p.PASSWORD,{message:"Password must be secure."}),u("design:type",String)],ze.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(p.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(p.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(p.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(ee),u("design:type",typeof ee>"u"?Object:ee)],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 Pt(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Pt,"_ts_decorate");function Dt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Dt,"_ts_metadata");var De=class{static{o(this,"CreateUserPostDto");}content;mediaUrls;visibility};Pt([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,512),Dt("design:type",String)],De.prototype,"content",void 0);Pt([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}),Dt("design:type",Array)],De.prototype,"mediaUrls",void 0);Pt([classValidator.IsOptional(),classValidator.IsEnum(T),Dt("design:type",typeof T>"u"?Object:T)],De.prototype,"visibility",void 0);function Ln(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Ln,"_ts_decorate");function Mn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Mn,"_ts_metadata");var ke=class{static{o(this,"UpdateUserPostDto");}content;visibility};Ln([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,512),Mn("design:type",String)],ke.prototype,"content",void 0);Ln([classValidator.IsOptional(),classValidator.IsEnum(T),Mn("design:type",typeof T>"u"?Object:T)],ke.prototype,"visibility",void 0);function Fn(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Fn,"_ts_decorate");function Wn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Wn,"_ts_metadata");var $e=class{static{o(this,"CreateUserPostCommentDto");}content;replyToId};Fn([classValidator.IsString(),classValidator.Length(1,280),Wn("design:type",String)],$e.prototype,"content",void 0);Fn([classValidator.IsOptional(),classValidator.IsString(),Wn("design:type",String)],$e.prototype,"replyToId",void 0);function Us(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Us,"_ts_decorate");function Ls(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ls,"_ts_metadata");var Nt=class{static{o(this,"UpdateUserPostCommentDto");}content};Us([classValidator.IsString(),classValidator.Length(1,280),Ls("design:type",String)],Nt.prototype,"content",void 0);function Fs(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 c=e.length-1;c>=0;c--)(a=e[c])&&(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(Fs,"_ts_decorate");function Ws(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ws,"_ts_metadata");var Ut=class{static{o(this,"CreateUserPostRepostDto");}comment};Fs([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,280),Ws("design:type",String)],Ut.prototype,"comment",void 0);function l(e){return e}o(l,"sdk");var Gn=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 Hn=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(k)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"),googleOneTap:o(async t=>e.post("/oauth2/google/one-tap",t),"googleOneTap")}});var Vn=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 qn=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 Kn=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:qn(e)});var Cn=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 kn=e=>({getFollowing:o(async t=>e.get("/feed/following",t),"getFollowing"),getDiscover:o(async t=>e.get("/feed/discover",t),"getDiscover")});var $n=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 Xn=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var Zn=o(e=>({account:o(async t=>e.get("/organizations/:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(k)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(k)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 Jn=o(e=>({create:o(async(t,n,s)=>e.post("/organizations/:organizationSlug/events/:eventSlug/orders",s,{organizationSlug:t,eventSlug:n}),"create")}),"organizationsEventsOrders");var Yn=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 Qn=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 Tn=o(e=>({record:o(async(t,n)=>e.post("/organizations/:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:n}),"record")}),"organizationsEventsViews");var eo=o(e=>({search:o(async(t,n)=>e.get("/organizations/events/search",{q:t,...n}),"search"),getCalendar:o(async(t,n)=>e.get("/organizations/events/calendar/:year/:month",{year:t.toString(),month:n.toString()}),"getCalendar"),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",$("file",n),{eventFileType:t}),"uploadFile"),uploadOrganizationFile:o(async(t,n,s,i)=>e.post("/organizations/:organizationSlug/events/:eventSlug/files/:eventFileType",$("file",i),{organizationSlug:t,eventSlug:n,eventFileType:s}),"uploadOrganizationFile"),orders:Jn(e),styles:Yn(e),tickets:Qn(e),views:Tn(e)}),"organizationsEvents");var to=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 no=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:to(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 oo=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",$("file",s),{organizationSlug:t,organizationFileType:n}),"uploadFile"),billing:Zn(e),events:eo(e),members:no(e)});var ro=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 so=e=>({getAll:o(async t=>e.get("/profiles",t),"getAll"),search:o(async(t,n)=>e.get("/profiles/search",{q:t,...n}),"search"),get:o(async t=>e.get("/profiles/:username",{username:t}),"get"),relationships:ro(e)});var io=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 ao=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 co=o(e=>({record:o(async(t,n)=>e.post("/users/:username/posts/:postId/views",null,{username:t,postId:n}),"record")}),"usersPostsViews");var po=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:co(e)});var lo=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 fo=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 mo=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",$("file",s),{userId:t,userFileType:n}),"uploadFile"),uploadTempFile:o(async(t,n)=>e.post("/users/files/:userFileType",$("file",n),{userFileType:t}),"uploadTempFile"),bookings:io(e),notifications:ao(e),posts:po(e),postsComments:lo(e),postsReposts:fo(e)});var uo=e=>({registerToBeta:o(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var go=class{static{o(this,"TonightPass");}client;apiKeys;auth;careers;channels;currencies;feed;health;orders;organizations;profiles;users;notifications;constructor(t){this.client=new Ne(t),this.apiKeys=Gn(this.client),this.auth=Hn(this.client),this.careers=Vn(this.client),this.channels=Kn(this.client),this.currencies=Cn(this.client),this.feed=kn(this.client),this.health=$n(this.client),this.orders=Xn(this.client),this.organizations=oo(this.client),this.profiles=so(this.client),this.users=mo(this.client),this.notifications=uo(this.client);}};var Xe=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 qs__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",c=>{try{let C=JSON.parse(c.toString());this.handleEvent(C);}catch(C){this.log("Error parsing message:",C);}}),this.ws.on("close",c=>{this.log("Connection closed",c),this.isConnected=!1,this.options.maxReconnectAttempts&&!this.isReconnecting&&this.handleReconnect(t,n);}),this.ws.on("error",c=>{this.log("WebSocket error:",c),this.isConnected=!1,i(c);});}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 Ze=class extends Xe{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 Fm(e){let t=new Ze(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(Fm,"channelsWS");
2
2
  exports.AcceptOrganizationMemberInvitationDto=It;exports.AddParticipantDto=Ye;exports.AddReactionDto=nt;exports.ApiKeyTier=vi;exports.AtLeastOneMedia=zr;exports.AtLeastOneMediaOnUpdate=Lr;exports.BaseOrganizationEventDto=y;exports.CacheManager=he;exports.ChannelMemberRole=Ri;exports.ChannelMessageReportReason=Ue;exports.ChannelStatus=Oi;exports.ChannelType=se;exports.ChannelWebSocketClient=Ze;exports.Client=Ne;exports.CreateChannelDto=ve;exports.CreateChannelMessageDto=xe;exports.CreateLocationDto=S;exports.CreateOrganizationDto=me;exports.CreateOrganizationEventDto=yt;exports.CreateOrganizationEventOrderDto=ft;exports.CreateOrganizationEventStyleDto=Be;exports.CreateOrganizationEventTicketDto=d;exports.CreateOrganizationIdentityDto=F;exports.CreateOrganizationMemberDto=qe;exports.CreateOrganizationMemberInvitationLinkDto=Rt;exports.CreateUserDto=we;exports.CreateUserIdentityDto=M;exports.CreateUserPostCommentDto=$e;exports.CreateUserPostDto=De;exports.CreateUserPostRepostDto=Ut;exports.Currency=X;exports.DEFAULT_API_URL=Mt;exports.ErrorType=Ai;exports.FeedType=Pi;exports.GeoPointDto=z;exports.GoogleOneTapDto=_t;exports.Language=ha;exports.OAuth2Provider=xi;exports.OrganizationEventFileType=Mi;exports.OrganizationEventStatus=Bi;exports.OrganizationEventStyleType=Ui;exports.OrganizationEventTicketCategory=J;exports.OrganizationEventTicketType=Z;exports.OrganizationEventType=Y;exports.OrganizationEventVisibilityType=Q;exports.OrganizationFileType=Ci;exports.OrganizationMemberRole=x;exports.OrganizationMemberStatus=Hi;exports.OrganizationTokenType=qi;exports.ProfileType=ga;exports.REGEX=p;exports.RecoveryDto=jt;exports.RecoveryResetDto=Ae;exports.ReportChannelMessageDto=Me;exports.SignInUserDto=Ce;exports.TonightPass=go;exports.TonightPassAPIError=Je;exports.UpdateChannelDto=tt;exports.UpdateChannelMessageDto=st;exports.UpdateLocationDto=I;exports.UpdateOrganizationDto=ue;exports.UpdateOrganizationEventDto=h;exports.UpdateOrganizationEventStyleDto=$t;exports.UpdateOrganizationEventTicketDto=f;exports.UpdateOrganizationIdentityDto=G;exports.UpdateOrganizationMemberDto=St;exports.UpdateUserDto=ze;exports.UpdateUserPostCommentDto=Nt;exports.UpdateUserPostDto=ke;exports.UserFileType=pa;exports.UserIdentityGender=ee;exports.UserNotificationType=Yi;exports.UserPostMediaType=Ti;exports.UserPostVisibility=T;exports.UserRole=ca;exports.UserTokenType=ia;exports.WebSocketClient=Xe;exports.apiKeys=Gn;exports.auth=Hn;exports.buildFileFormData=$;exports.careers=Vn;exports.channels=Kn;exports.channelsWS=Fm;exports.currencies=Cn;exports.feed=kn;exports.health=$n;exports.isBrowser=k;exports.notifications=uo;exports.orders=Xn;exports.organizations=oo;exports.profiles=so;exports.request=Bt;exports.sdk=l;exports.users=mo;//# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map