tonightpass 0.0.121 → 0.0.122

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
@@ -226,6 +226,104 @@ type CareerEndpoints = Endpoint<"GET", "/careers/categories", CareersCategory[],
226
226
  cityNameLike?: string;
227
227
  }>;
228
228
 
229
+ declare enum ErrorType {
230
+ AuthEmailAlreadyExists = "auth.email-already-exists",
231
+ AuthUsernameAlreadyExists = "auth.username-already-exists",
232
+ AuthPhoneNumberAlreadyExists = "auth.phone-number-already-exists",
233
+ AuthInvalidCredentials = "auth.invalid-credentials",
234
+ AuthUserNotFound = "auth.user-not-found",
235
+ AuthInvalidToken = "auth.invalid-token",
236
+ AuthTokenExpired = "auth.token-expired",
237
+ AuthUnauthorized = "auth.unauthorized",
238
+ AuthPasswordMismatch = "auth.password-mismatch",
239
+ AuthInvalidOAuth2Provider = "auth.invalid-oauth2-provider",
240
+ AuthOAuth2Error = "auth.oauth2-error",
241
+ UserNotFound = "user.not-found",
242
+ UserInvalidUsername = "user.invalid-username",
243
+ UserInvalidEmail = "user.invalid-email",
244
+ UserInvalidPhoneNumber = "user.invalid-phone-number",
245
+ UserInvalidPassword = "user.invalid-password",
246
+ UserInvalidBirthDate = "user.invalid-birth-date",
247
+ UserInvalidGender = "user.invalid-gender",
248
+ UserInvalidRole = "user.invalid-role",
249
+ UserInvalidPreferences = "user.invalid-preferences",
250
+ UserInvalidLocation = "user.invalid-location",
251
+ UserInvalidFile = "user.invalid-file",
252
+ UserFileTooLarge = "user.file-too-large",
253
+ UserUnsupportedFileType = "user.unsupported-file-type",
254
+ OrganizationNotFound = "organization.not-found",
255
+ OrganizationInvalidSlug = "organization.invalid-slug",
256
+ OrganizationInvalidName = "organization.invalid-name",
257
+ OrganizationInvalidDescription = "organization.invalid-description",
258
+ OrganizationInvalidLocation = "organization.invalid-location",
259
+ OrganizationInvalidSocialLink = "organization.invalid-social-link",
260
+ OrganizationAlreadyExists = "organization.already-exists",
261
+ OrganizationUnauthorized = "organization.unauthorized",
262
+ OrganizationMemberNotFound = "organization.member-not-found",
263
+ OrganizationMemberInvalidRole = "organization.member-invalid-role",
264
+ OrganizationMemberAlreadyExists = "organization.member-already-exists",
265
+ EventNotFound = "event.not-found",
266
+ EventInvalidTitle = "event.invalid-title",
267
+ EventInvalidDescription = "event.invalid-description",
268
+ EventInvalidLocation = "event.invalid-location",
269
+ EventInvalidDates = "event.invalid-dates",
270
+ EventInvalidTickets = "event.invalid-tickets",
271
+ EventInvalidStyles = "event.invalid-styles",
272
+ EventInvalidType = "event.invalid-type",
273
+ EventInvalidVisibility = "event.invalid-visibility",
274
+ EventUnavailable = "event.unavailable",
275
+ EventTicketNotFound = "event.ticket-not-found",
276
+ EventTicketUnavailable = "event.ticket-unavailable",
277
+ EventTicketInvalidQuantity = "event.ticket-invalid-quantity",
278
+ OrderNotFound = "order.not-found",
279
+ OrderInvalidStatus = "order.invalid-status",
280
+ OrderInvalidPayment = "order.invalid-payment",
281
+ OrderPaymentFailed = "order.payment-failed",
282
+ OrderAlreadyPaid = "order.already-paid",
283
+ OrderCancelled = "order.cancelled",
284
+ OrderRefunded = "order.refunded",
285
+ OrderExpired = "order.expired",
286
+ BookingNotFound = "booking.not-found",
287
+ BookingInvalidStatus = "booking.invalid-status",
288
+ BookingInvalidTickets = "booking.invalid-tickets",
289
+ BookingTicketNotFound = "booking.ticket-not-found",
290
+ BookingTicketInvalidToken = "booking.ticket-invalid-token",
291
+ BookingTicketExpired = "booking.ticket-expired",
292
+ BookingTicketUsed = "booking.ticket-used",
293
+ FileNotFound = "file.not-found",
294
+ FileInvalidType = "file.invalid-type",
295
+ FileTooLarge = "file.too-large",
296
+ FileUploadFailed = "file.upload-failed",
297
+ ValidationError = "validation.error",
298
+ DatabaseError = "database.error",
299
+ InternalServerError = "server.internal-error",
300
+ NotFound = "not-found",
301
+ BadRequest = "bad-request",
302
+ Unauthorized = "unauthorized",
303
+ Forbidden = "forbidden",
304
+ TooManyRequests = "too-many-requests",
305
+ ServiceUnavailable = "service-unavailable",
306
+ TooManyRequestsAuth = "rate-limit.auth",
307
+ TooManyRequestsApi = "rate-limit.api",
308
+ WebhookInvalidSignature = "webhook.invalid-signature",
309
+ WebhookInvalidEvent = "webhook.invalid-event",
310
+ WebhookProcessingFailed = "webhook.processing-failed",
311
+ PaymentRequired = "payment.required",
312
+ PaymentMethodRequired = "payment.method-required",
313
+ PaymentFailed = "payment.failed",
314
+ PaymentCancelled = "payment.cancelled",
315
+ PaymentRefunded = "payment.refunded",
316
+ BillingInvalidAccount = "billing.invalid-account",
317
+ BillingAccountRequired = "billing.account-required",
318
+ NotificationInvalidType = "notification.invalid-type",
319
+ NotificationSendingFailed = "notification.sending-failed",
320
+ CacheError = "cache.error",
321
+ CacheMiss = "cache.miss",
322
+ ExternalServiceError = "external-service.error",
323
+ ExternalServiceTimeout = "external-service.timeout",
324
+ ExternalServiceUnavailable = "external-service.unavailable"
325
+ }
326
+
229
327
  interface Health<T extends string = string> extends HealthCheckResult {
230
328
  info?: Record<T, HealthIndicatorResult[T]>;
231
329
  error?: Record<T, HealthIndicatorResult[T]>;
@@ -1053,4 +1151,4 @@ declare class TonightPass {
1053
1151
  declare const isBrowser: boolean;
1054
1152
  declare function buildFileFormData(key: string, files: File | File[] | FileList): FormData;
1055
1153
 
1056
- export { type APIRequestOptions, type APIResponse, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type AuthEndpoints, type Base, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, CreateUserIdentityDto, Currency, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, type ErroredAPIResponse, type ExcludeBase, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, type WebhookEndpoints, auth, buildFileFormData, careers, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
1154
+ export { type APIRequestOptions, type APIResponse, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type AuthEndpoints, type Base, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, CreateUserIdentityDto, Currency, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type ExcludeBase, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, type WebhookEndpoints, auth, buildFileFormData, careers, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
package/dist/index.d.ts CHANGED
@@ -226,6 +226,104 @@ type CareerEndpoints = Endpoint<"GET", "/careers/categories", CareersCategory[],
226
226
  cityNameLike?: string;
227
227
  }>;
228
228
 
229
+ declare enum ErrorType {
230
+ AuthEmailAlreadyExists = "auth.email-already-exists",
231
+ AuthUsernameAlreadyExists = "auth.username-already-exists",
232
+ AuthPhoneNumberAlreadyExists = "auth.phone-number-already-exists",
233
+ AuthInvalidCredentials = "auth.invalid-credentials",
234
+ AuthUserNotFound = "auth.user-not-found",
235
+ AuthInvalidToken = "auth.invalid-token",
236
+ AuthTokenExpired = "auth.token-expired",
237
+ AuthUnauthorized = "auth.unauthorized",
238
+ AuthPasswordMismatch = "auth.password-mismatch",
239
+ AuthInvalidOAuth2Provider = "auth.invalid-oauth2-provider",
240
+ AuthOAuth2Error = "auth.oauth2-error",
241
+ UserNotFound = "user.not-found",
242
+ UserInvalidUsername = "user.invalid-username",
243
+ UserInvalidEmail = "user.invalid-email",
244
+ UserInvalidPhoneNumber = "user.invalid-phone-number",
245
+ UserInvalidPassword = "user.invalid-password",
246
+ UserInvalidBirthDate = "user.invalid-birth-date",
247
+ UserInvalidGender = "user.invalid-gender",
248
+ UserInvalidRole = "user.invalid-role",
249
+ UserInvalidPreferences = "user.invalid-preferences",
250
+ UserInvalidLocation = "user.invalid-location",
251
+ UserInvalidFile = "user.invalid-file",
252
+ UserFileTooLarge = "user.file-too-large",
253
+ UserUnsupportedFileType = "user.unsupported-file-type",
254
+ OrganizationNotFound = "organization.not-found",
255
+ OrganizationInvalidSlug = "organization.invalid-slug",
256
+ OrganizationInvalidName = "organization.invalid-name",
257
+ OrganizationInvalidDescription = "organization.invalid-description",
258
+ OrganizationInvalidLocation = "organization.invalid-location",
259
+ OrganizationInvalidSocialLink = "organization.invalid-social-link",
260
+ OrganizationAlreadyExists = "organization.already-exists",
261
+ OrganizationUnauthorized = "organization.unauthorized",
262
+ OrganizationMemberNotFound = "organization.member-not-found",
263
+ OrganizationMemberInvalidRole = "organization.member-invalid-role",
264
+ OrganizationMemberAlreadyExists = "organization.member-already-exists",
265
+ EventNotFound = "event.not-found",
266
+ EventInvalidTitle = "event.invalid-title",
267
+ EventInvalidDescription = "event.invalid-description",
268
+ EventInvalidLocation = "event.invalid-location",
269
+ EventInvalidDates = "event.invalid-dates",
270
+ EventInvalidTickets = "event.invalid-tickets",
271
+ EventInvalidStyles = "event.invalid-styles",
272
+ EventInvalidType = "event.invalid-type",
273
+ EventInvalidVisibility = "event.invalid-visibility",
274
+ EventUnavailable = "event.unavailable",
275
+ EventTicketNotFound = "event.ticket-not-found",
276
+ EventTicketUnavailable = "event.ticket-unavailable",
277
+ EventTicketInvalidQuantity = "event.ticket-invalid-quantity",
278
+ OrderNotFound = "order.not-found",
279
+ OrderInvalidStatus = "order.invalid-status",
280
+ OrderInvalidPayment = "order.invalid-payment",
281
+ OrderPaymentFailed = "order.payment-failed",
282
+ OrderAlreadyPaid = "order.already-paid",
283
+ OrderCancelled = "order.cancelled",
284
+ OrderRefunded = "order.refunded",
285
+ OrderExpired = "order.expired",
286
+ BookingNotFound = "booking.not-found",
287
+ BookingInvalidStatus = "booking.invalid-status",
288
+ BookingInvalidTickets = "booking.invalid-tickets",
289
+ BookingTicketNotFound = "booking.ticket-not-found",
290
+ BookingTicketInvalidToken = "booking.ticket-invalid-token",
291
+ BookingTicketExpired = "booking.ticket-expired",
292
+ BookingTicketUsed = "booking.ticket-used",
293
+ FileNotFound = "file.not-found",
294
+ FileInvalidType = "file.invalid-type",
295
+ FileTooLarge = "file.too-large",
296
+ FileUploadFailed = "file.upload-failed",
297
+ ValidationError = "validation.error",
298
+ DatabaseError = "database.error",
299
+ InternalServerError = "server.internal-error",
300
+ NotFound = "not-found",
301
+ BadRequest = "bad-request",
302
+ Unauthorized = "unauthorized",
303
+ Forbidden = "forbidden",
304
+ TooManyRequests = "too-many-requests",
305
+ ServiceUnavailable = "service-unavailable",
306
+ TooManyRequestsAuth = "rate-limit.auth",
307
+ TooManyRequestsApi = "rate-limit.api",
308
+ WebhookInvalidSignature = "webhook.invalid-signature",
309
+ WebhookInvalidEvent = "webhook.invalid-event",
310
+ WebhookProcessingFailed = "webhook.processing-failed",
311
+ PaymentRequired = "payment.required",
312
+ PaymentMethodRequired = "payment.method-required",
313
+ PaymentFailed = "payment.failed",
314
+ PaymentCancelled = "payment.cancelled",
315
+ PaymentRefunded = "payment.refunded",
316
+ BillingInvalidAccount = "billing.invalid-account",
317
+ BillingAccountRequired = "billing.account-required",
318
+ NotificationInvalidType = "notification.invalid-type",
319
+ NotificationSendingFailed = "notification.sending-failed",
320
+ CacheError = "cache.error",
321
+ CacheMiss = "cache.miss",
322
+ ExternalServiceError = "external-service.error",
323
+ ExternalServiceTimeout = "external-service.timeout",
324
+ ExternalServiceUnavailable = "external-service.unavailable"
325
+ }
326
+
229
327
  interface Health<T extends string = string> extends HealthCheckResult {
230
328
  info?: Record<T, HealthIndicatorResult[T]>;
231
329
  error?: Record<T, HealthIndicatorResult[T]>;
@@ -1053,4 +1151,4 @@ declare class TonightPass {
1053
1151
  declare const isBrowser: boolean;
1054
1152
  declare function buildFileFormData(key: string, files: File | File[] | FileList): FormData;
1055
1153
 
1056
- export { type APIRequestOptions, type APIResponse, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type AuthEndpoints, type Base, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, CreateUserIdentityDto, Currency, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, type ErroredAPIResponse, type ExcludeBase, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, type WebhookEndpoints, auth, buildFileFormData, careers, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
1154
+ export { type APIRequestOptions, type APIResponse, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type AuthEndpoints, type Base, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, CreateUserIdentityDto, Currency, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type ExcludeBase, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, type WebhookEndpoints, auth, buildFileFormData, careers, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- 'use strict';require('reflect-metadata');var classTransformer=require('class-transformer'),classValidator=require('class-validator'),Bo=require('redaxios'),pathcat=require('pathcat');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Bo__default=/*#__PURE__*/_interopDefault(Bo);var Tt=Object.defineProperty;var o=(e,t)=>Tt(e,"name",{value:t,configurable:!0});var We="https://api.tonightpass.com";var f={EMAIL:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,NAME:/^[a-zA-Z0-9 ]+$/,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_MAX_LENGTH:/^.{0,255}$/,PASSWORD_UPPERCASE:/^(?=.*[A-Z])/,PASSWORD_LOWERCASE:/^(?=.*[a-z])/,PASSWORD_NUMBER_SPECIAL:/^(?=.*[\d\W])/,IMAGE_URL:/^(https:\/\/|http:\/\/)(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-z]{2,6}([-a-zA-Z0-9@:%_\+.~#?&//=]*)\.(jpg|jpeg|gif|png|bmp|tiff|tga|svg)$/i};function F(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}o(F,"_ts_decorate");function A(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(A,"_ts_metadata");var h=class{static{o(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point";}validate(){let[t,r]=this.coordinates;return r>=-90&&r<=90&&t>=-180&&t<=180}};F([classValidator.IsString(),classValidator.IsNotEmpty(),A("design:type",String)],h.prototype,"type",void 0);F([classValidator.IsArray(),classValidator.IsNotEmpty(),classValidator.Length(2,2),classValidator.IsNumber({},{each:!0}),A("design:type",Array)],h.prototype,"coordinates",void 0);F([classValidator.ValidateNested(),A("design:type",Function),A("design:paramtypes",[]),A("design:returntype",Boolean)],h.prototype,"validate",null);var b=class{static{o(this,"CreateLocationDto");}name;address;zipCode;city;country;geometry};F([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),A("design:type",String)],b.prototype,"name",void 0);F([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,256),A("design:type",String)],b.prototype,"address",void 0);F([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),A("design:type",String)],b.prototype,"zipCode",void 0);F([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),A("design:type",String)],b.prototype,"city",void 0);F([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),A("design:type",String)],b.prototype,"country",void 0);F([classValidator.ValidateNested(),classTransformer.Type(()=>h),classValidator.IsNotEmpty(),A("design:type",typeof h>"u"?Object:h)],b.prototype,"geometry",void 0);function ie(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}o(ie,"_ts_decorate");function se(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(se,"_ts_metadata");var v=class{static{o(this,"UpdateLocationDto");}name;address;zipCode;city;country;geometry};ie([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),se("design:type",String)],v.prototype,"name",void 0);ie([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,256),se("design:type",String)],v.prototype,"address",void 0);ie([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),se("design:type",String)],v.prototype,"zipCode",void 0);ie([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),se("design:type",String)],v.prototype,"city",void 0);ie([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),se("design:type",String)],v.prototype,"country",void 0);ie([classValidator.IsOptional(),classValidator.ValidateNested(),classTransformer.Type(()=>h),se("design:type",typeof h>"u"?Object:h)],v.prototype,"geometry",void 0);function G(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}o(G,"_ts_decorate");function W(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(W,"_ts_metadata");var ae=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};G([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),W("design:type",String)],ae.prototype,"organizationSlug",void 0);G([classValidator.IsObject(),W("design:type",typeof B>"u"?Object:B)],ae.prototype,"identity",void 0);G([classValidator.IsArray(),W("design:type",Array)],ae.prototype,"members",void 0);G([classValidator.IsOptional(),classValidator.IsObject(),W("design:type",typeof Location>"u"?Object:Location)],ae.prototype,"location",void 0);var B=class{static{o(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};G([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),W("design:type",String)],B.prototype,"displayName",void 0);G([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),W("design:type",String)],B.prototype,"description",void 0);G([classValidator.IsUrl({protocols:["http","https"],host_whitelist:["cdn.tonightpass.com","cdn.staging.tonightpass.com"]}),W("design:type",String)],B.prototype,"avatarUrl",void 0);G([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"],host_whitelist:["cdn.tonightpass.com","cdn.staging.tonightpass.com"]}),W("design:type",String)],B.prototype,"bannerUrl",void 0);G([classValidator.IsOptional(),classValidator.IsArray(),W("design:type",Array)],B.prototype,"socialLinks",void 0);function V(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}o(V,"_ts_decorate");function C(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(C,"_ts_metadata");var fe=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};V([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(f.USERNAME),C("design:type",String)],fe.prototype,"slug",void 0);V([classValidator.IsObject(),classValidator.IsOptional(),C("design:type",typeof q>"u"?Object:q)],fe.prototype,"identity",void 0);V([classValidator.IsOptional(),classValidator.IsArray(),C("design:type",Array)],fe.prototype,"members",void 0);V([classValidator.IsOptional(),classValidator.IsObject(),C("design:type",typeof Location>"u"?Object:Location)],fe.prototype,"location",void 0);var q=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};V([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),C("design:type",String)],q.prototype,"displayName",void 0);V([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),C("design:type",String)],q.prototype,"description",void 0);V([classValidator.IsUrl({protocols:["http","https"]}),classValidator.IsOptional(),C("design:type",String)],q.prototype,"avatarUrl",void 0);V([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),C("design:type",String)],q.prototype,"bannerUrl",void 0);V([classValidator.IsOptional(),classValidator.IsArray(),C("design:type",Array)],q.prototype,"socialLinks",void 0);var Ze=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};var ve=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var Je=class extends ve{static{o(this,"UpdateOrganizationEventStyleDto");}};var H=function(e){return e.ETicket="e-ticket",e.Other="other",e}({}),k=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 Ar=function(e){return e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art",e}({});var Z=function(e){return e.Clubbing="clubbing",e.Concert="concert",e.Afterwork="afterwork",e.DancingLunch="dancing_lunch",e.Diner="diner",e.Garden="garden",e.AfterBeach="after_beach",e.Festival="festival",e.Spectacle="spectacle",e.Cruise="cruise",e.OutsideAnimation="outside_animation",e.Sport="sport",e.Match="match",e.Seminar="seminar",e.Conference="conference",e.WellnessDay="wellness_day",e.Workshop="workshop",e.TradeFair="trade_fair",e.ConsumerShow="consumer_show",e.Membership="membership",e}({}),J=function(e){return e.Public="public",e.Unlisted="unlisted",e.Private="private",e}({});var Pr=function(e){return e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected",e}({}),Y=function(e){return e.Member="member",e.Manager="manager",e.Admin="admin",e.Owner="owner",e}({});var Lr=function(e){return e.Facebook="facebook",e.Twitter="twitter",e.Instagram="instagram",e.Linkedin="linkedin",e.Youtube="youtube",e.Website="website",e}({});var Fr=function(e){return e.Follow="follow",e}({});var Gr=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 qr=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),K=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),Vr=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var kr=function(e){return e.User="user",e.Organization="organization",e}({});var Q=function(e){return e.EUR="EUR",e.USD="USD",e.GBP="GBP",e}({}),Jr=function(e){return e.FR="fr",e.EN="en",e}({});function I(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}o(I,"_ts_decorate");function _(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(_,"_ts_metadata");var c=class{static{o(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};I([classValidator.IsString(),classValidator.Length(1,128),_("design:type",String)],c.prototype,"name",void 0);I([classValidator.IsString(),classValidator.Length(1,1024),_("design:type",String)],c.prototype,"description",void 0);I([classValidator.IsNumber(),classValidator.Min(0),_("design:type",Number)],c.prototype,"price",void 0);I([classValidator.IsNumber(),classValidator.Min(0),_("design:type",Number)],c.prototype,"quantity",void 0);I([classValidator.IsEnum(H),_("design:type",typeof H>"u"?Object:H)],c.prototype,"type",void 0);I([classValidator.IsEnum(k),_("design:type",typeof k>"u"?Object:k)],c.prototype,"category",void 0);I([classValidator.IsEnum(Q),_("design:type",typeof Q>"u"?Object:Q)],c.prototype,"currency",void 0);I([classValidator.IsBoolean(),_("design:type",Boolean)],c.prototype,"isVisible",void 0);I([classValidator.IsBoolean(),_("design:type",Boolean)],c.prototype,"isFeesIncluded",void 0);I([classValidator.IsDateString(),classValidator.IsOptional(),_("design:type",typeof Date>"u"?Object:Date)],c.prototype,"startAt",void 0);I([classValidator.IsDateString(),classValidator.IsOptional(),_("design:type",typeof Date>"u"?Object:Date)],c.prototype,"endAt",void 0);function O(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}o(O,"_ts_decorate");function N(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(N,"_ts_metadata");var d=class{static{o(this,"UpdateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};O([classValidator.IsString(),classValidator.Length(1,128),classValidator.IsOptional(),N("design:type",String)],d.prototype,"name",void 0);O([classValidator.IsString(),classValidator.Length(1,1024),classValidator.IsOptional(),N("design:type",String)],d.prototype,"description",void 0);O([classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),N("design:type",Number)],d.prototype,"price",void 0);O([classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),N("design:type",Number)],d.prototype,"quantity",void 0);O([classValidator.IsEnum(H),classValidator.IsOptional(),N("design:type",typeof H>"u"?Object:H)],d.prototype,"type",void 0);O([classValidator.IsEnum(k),classValidator.IsOptional(),N("design:type",typeof k>"u"?Object:k)],d.prototype,"category",void 0);O([classValidator.IsEnum(Q),classValidator.IsOptional(),N("design:type",typeof Q>"u"?Object:Q)],d.prototype,"currency",void 0);O([classValidator.IsBoolean(),classValidator.IsOptional(),N("design:type",Boolean)],d.prototype,"isVisible",void 0);O([classValidator.IsBoolean(),classValidator.IsOptional(),N("design:type",Boolean)],d.prototype,"isFeesIncluded",void 0);O([classValidator.IsDateString(),classValidator.IsOptional(),N("design:type",typeof Date>"u"?Object:Date)],d.prototype,"startAt",void 0);O([classValidator.IsDateString(),classValidator.IsOptional(),N("design:type",typeof Date>"u"?Object:Date)],d.prototype,"endAt",void 0);function x(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}o(x,"_ts_decorate");function S(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(S,"_ts_metadata");var l=class{static{o(this,"CreateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;startAt;endAt};x([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,64),S("design:type",String)],l.prototype,"title",void 0);x([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(f.SLUG),S("design:type",String)],l.prototype,"slug",void 0);x([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(16,2048),S("design:type",String)],l.prototype,"description",void 0);x([classValidator.IsEnum(Z),classValidator.IsNotEmpty(),S("design:type",typeof Z>"u"?Object:Z)],l.prototype,"type",void 0);x([classValidator.IsEnum(J),classValidator.IsNotEmpty(),S("design:type",typeof J>"u"?Object:J)],l.prototype,"visibility",void 0);x([classValidator.IsArray(),classValidator.IsUrl({},{each:!0}),S("design:type",Array)],l.prototype,"flyers",void 0);x([classValidator.IsArray(),classValidator.IsUrl({},{each:!0}),S("design:type",Array)],l.prototype,"trailers",void 0);x([classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>b),classValidator.IsNotEmpty(),S("design:type",typeof b>"u"?Object:b)],l.prototype,"location",void 0);x([classValidator.IsArray(),classValidator.ValidateNested({each:!0}),classTransformer.Type(()=>c),classValidator.IsNotEmpty(),S("design:type",Array)],l.prototype,"tickets",void 0);x([classValidator.IsArray(),classValidator.IsString({each:!0}),classValidator.IsNotEmpty(),S("design:type",Array)],l.prototype,"styles",void 0);x([classValidator.IsDateString(),classValidator.IsNotEmpty(),S("design:type",typeof Date>"u"?Object:Date)],l.prototype,"startAt",void 0);x([classValidator.IsDateString(),classValidator.IsNotEmpty(),S("design:type",typeof Date>"u"?Object:Date)],l.prototype,"endAt",void 0);function R(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}o(R,"_ts_decorate");function j(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(j,"_ts_metadata");var y=class{static{o(this,"UpdateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;startAt;endAt};R([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,64),j("design:type",String)],y.prototype,"title",void 0);R([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(f.SLUG),j("design:type",String)],y.prototype,"slug",void 0);R([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(16,2048),j("design:type",String)],y.prototype,"description",void 0);R([classValidator.IsOptional(),classValidator.IsEnum(Z),j("design:type",typeof Z>"u"?Object:Z)],y.prototype,"type",void 0);R([classValidator.IsOptional(),classValidator.IsEnum(J),j("design:type",typeof J>"u"?Object:J)],y.prototype,"visibility",void 0);R([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:!0}),j("design:type",Array)],y.prototype,"flyers",void 0);R([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:!0}),j("design:type",Array)],y.prototype,"trailers",void 0);R([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>v),j("design:type",typeof v>"u"?Object:v)],y.prototype,"location",void 0);R([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ValidateNested({each:!0}),classTransformer.Type(()=>d),j("design:type",Array)],y.prototype,"tickets",void 0);R([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsString({each:!0}),j("design:type",Array)],y.prototype,"styles",void 0);R([classValidator.IsOptional(),classValidator.IsDateString(),j("design:type",typeof Date>"u"?Object:Date)],y.prototype,"startAt",void 0);R([classValidator.IsOptional(),classValidator.IsDateString(),j("design:type",typeof Date>"u"?Object:Date)],y.prototype,"endAt",void 0);function vt(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}o(vt,"_ts_decorate");function xt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(xt,"_ts_metadata");var we=class{static{o(this,"CreateOrganizationMemberDto");}user;role};vt([classValidator.IsString(),classValidator.IsNotEmpty(),xt("design:type",String)],we.prototype,"user",void 0);vt([classValidator.IsEnum(Y),classValidator.IsNotEmpty(),xt("design:type",typeof Y>"u"?Object:Y)],we.prototype,"role",void 0);function So(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}o(So,"_ts_decorate");function Ro(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ro,"_ts_metadata");var Me=class{static{o(this,"UpdateOrganizationMemberDto");}role};So([classValidator.IsEnum(Y),classValidator.IsNotEmpty(),Ro("design:type",typeof Y>"u"?Object:Y)],Me.prototype,"role",void 0);function P(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}o(P,"_ts_decorate");function E(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(E,"_ts_metadata");var ge=class{static{o(this,"CreateUserDto");}identifier;identity;password};P([classValidator.ValidateNested(),classTransformer.Type(()=>ce),E("design:type",typeof ce>"u"?Object:ce)],ge.prototype,"identifier",void 0);P([classValidator.ValidateNested(),classTransformer.Type(()=>U),E("design:type",typeof U>"u"?Object:U)],ge.prototype,"identity",void 0);P([classValidator.IsString(),classValidator.Matches(f.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(f.PASSWORD_MAX_LENGTH,{message:"Password must be at most 255 characters long."}),classValidator.Matches(f.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(f.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(f.PASSWORD,{message:"Password must be secure."}),E("design:type",String)],ge.prototype,"password",void 0);var ce=class{static{o(this,"CreateUserIdentifierDto");}email;phoneNumber;username};P([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),E("design:type",String)],ce.prototype,"email",void 0);P([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),E("design:type",String)],ce.prototype,"phoneNumber",void 0);P([classValidator.IsString(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(f.USERNAME),E("design:type",String)],ce.prototype,"username",void 0);var U=class{static{o(this,"CreateUserIdentityDto");}firstName;lastName;gender;avatarUrl;birthDate};P([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(f.NAME,{message:"First name must be composed of letters only"}),E("design:type",String)],U.prototype,"firstName",void 0);P([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(f.NAME,{message:"Last name must be composed of letters only"}),E("design:type",String)],U.prototype,"lastName",void 0);P([classValidator.IsEnum(K),E("design:type",typeof K>"u"?Object:K)],U.prototype,"gender",void 0);P([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),E("design:type",String)],U.prototype,"avatarUrl",void 0);P([classValidator.IsOptional(),classValidator.IsDateString(),E("design:type",typeof Date>"u"?Object:Date)],U.prototype,"birthDate",void 0);function wt(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}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,"SignInUserDto");}identifier;password};wt([classValidator.IsNotEmpty(),classValidator.IsString(),At("design:type",String)],Ae.prototype,"identifier",void 0);wt([classValidator.IsNotEmpty(),classValidator.IsString(),At("design:type",String)],Ae.prototype,"password",void 0);function u(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(n=(s<3?p(n):s>3?p(t,r,n):p(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}o(u,"_ts_decorate");function m(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(m,"_ts_metadata");var he=class{static{o(this,"UpdateUserDto");}identifier;identity;password};u([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>le),m("design:type",typeof le>"u"?Object:le)],he.prototype,"identifier",void 0);u([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>L),m("design:type",typeof L>"u"?Object:L)],he.prototype,"identity",void 0);u([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(8),classValidator.MaxLength(128),m("design:type",String)],he.prototype,"password",void 0);var le=class{static{o(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};u([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),m("design:type",String)],le.prototype,"email",void 0);u([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),m("design:type",String)],le.prototype,"phoneNumber",void 0);u([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(f.USERNAME),m("design:type",String)],le.prototype,"username",void 0);var L=class{static{o(this,"UpdateUserIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate};u([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(f.NAME,{message:"First name must be composed of letters only"}),m("design:type",String)],L.prototype,"firstName",void 0);u([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(f.NAME,{message:"Last name must be composed of letters only"}),m("design:type",String)],L.prototype,"lastName",void 0);u([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),m("design:type",String)],L.prototype,"displayName",void 0);u([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),m("design:type",String)],L.prototype,"description",void 0);u([classValidator.IsOptional(),classValidator.IsUrl(),m("design:type",Object)],L.prototype,"avatarUrl",void 0);u([classValidator.IsOptional(),classValidator.IsUrl(),m("design:type",Object)],L.prototype,"bannerUrl",void 0);u([classValidator.IsOptional(),classValidator.IsEnum(K),m("design:type",typeof K>"u"?Object:K)],L.prototype,"gender",void 0);u([classValidator.IsOptional(),classValidator.IsDateString(),m("design:type",typeof Date>"u"?Object:Date)],L.prototype,"birthDate",void 0);var M=typeof window<"u";function Et(e,t){let r=new FormData;return t instanceof File?r.append(e,t):t instanceof FileList?Array.from(t).forEach(i=>r.append(e,i)):t.forEach(i=>r.append(e,i)),r}o(Et,"buildFileFormData");var Go=Bo__default.default.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!M&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[function(e,t){return e instanceof FormData?(t&&typeof t=="object"&&"Content-Type"in t&&delete t["Content-Type"],e):(t&&(t["Content-Type"]="application/json"),JSON.stringify(e))}],withCredentials:M}),Lt=o(async(e,t)=>Go(e,{...t}).then(i=>i).catch(i=>{throw i.data||console.error(i),i.data}),"request");var Ge=class extends Error{static{o(this,"TonightPassAPIError");}response;data;status;constructor(t,r){super(r.message),this.response=t,this.data=r,this.status=t.status;}},Ie=class{static{o(this,"Client");}options;url;constructor(t){this.options=t,this.url=(r,i)=>{let s=this.options.baseURL||We;return pathcat.pathcat(s,r,i)};}setOptions(t){this.options=t;}async get(t,r,i){return this.requester("GET",t,void 0,r,i)}async post(t,r,i,s){return this.requester("POST",t,r,i,s)}async put(t,r,i,s){return this.requester("PUT",t,r,i,s)}async patch(t,r,i,s){return this.requester("PATCH",t,r,i,s)}async delete(t,r,i,s){return this.requester("DELETE",t,r,i,s)}async requester(t,r,i,s={},n={}){let p=this.url(r,s);if(i!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let a=await Lt(p,{method:t,data:i,...n}),_e=a.data;if(!_e.success)throw new Ge(a,_e);return _e.data}};function z(e){return e}o(z,"sdk");var zt=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"),oauth2:{google:{connect:o(t=>{if(M)window.location.href=e.url("/oauth2/google",t||{});else throw new Error("Google OAuth2 is only available in the browser")},"connect")},twitter:{connect:o(t=>{if(M)window.location.href=e.url("/oauth2/twitter",t||{});else throw new Error("Twitter OAuth2 is only available in the browser")},"connect")},facebook:{connect:o(t=>{if(M)window.location.href=e.url("/oauth2/facebook",t||{});else throw new Error("Facebook OAuth2 is only available in the browser")},"connect")}}});var Ut=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 Mt=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 Ft=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var Bt=o(e=>({account:o(async t=>e.get("/organizations/:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(M)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(M)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 Gt=o(e=>({create:o(async(t,r,i)=>e.post("/organizations/:organizationSlug/events/:eventSlug/orders",i,{organizationSlug:t,eventSlug:r}),"create")}),"organizationsEventsOrders");var Wt=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,r)=>e.put("/organizations/events/styles/:styleSlug",r,{styleSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/events/styles/:styleSlug",null,{styleSlug:t}),"delete")}),"organizationsEventsStyles");var qt=o(e=>({getAll:o(async(t,r)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:r}),"getAll"),get:o(async(t,r,i)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:r,ticketId:i}),"get"),create:o(async(t,r,i)=>e.post("/organizations/:organizationSlug/events/:eventSlug/tickets",i,{organizationSlug:t,eventSlug:r}),"create"),update:o(async(t,r,i,s)=>e.put("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",s,{organizationSlug:t,eventSlug:r,ticketId:i}),"update"),delete:o(async(t,r,i)=>e.delete("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:r,ticketId:i}),"delete")}),"organizationsEventsTickets");var Vt=o(e=>({record:o(async(t,r)=>e.post("/organizations/:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:r}),"record")}),"organizationsEventsViews");var Ct=o(e=>({getAll:o(async(t,r)=>t?e.get("/organizations/:organizationSlug/events",{organizationSlug:t,...r}):e.get("/organizations/events",r),"getAll"),getSuggestions:o(async t=>e.get("/organizations/events/suggestions",t),"getSuggestions"),getNearby:o(async t=>e.get("/organizations/events/nearby",t),"getNearby"),getPast:o(async(t,r)=>e.get("/organizations/:organizationSlug/events/past",{organizationSlug:t,...r}),"getPast"),getUpcoming:o(async(t,r)=>e.get("/organizations/:organizationSlug/events/upcoming",{organizationSlug:t,...r}),"getUpcoming"),get:o(async(t,r)=>e.get("/organizations/:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:r}),"get"),create:o(async(t,r)=>e.post("/organizations/:organizationSlug/events",r,{organizationSlug:t}),"create"),update:o(async(t,r,i)=>e.put("/organizations/:organizationSlug/events/:eventSlug",i,{organizationSlug:t,eventSlug:r}),"update"),delete:o(async(t,r)=>e.delete("/organizations/:organizationSlug/events/:eventSlug",null,{organizationSlug:t,eventSlug:r}),"delete"),orders:Gt(e),styles:Wt(e),tickets:qt(e),views:Vt(e)}),"organizationsEvents");var $t=o(e=>({getAll:o(async()=>e.get("/organizations/members"),"getAll"),delete:o(async t=>e.delete("/organizations/members/:memberId",null,{memberId:t}),"delete")}),"organizationsMembers");var Xt=e=>({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,r)=>e.put("/organizations/:organizationSlug",r,{organizationSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/:organizationSlug",null,{organizationSlug:t}),"delete"),billing:Bt(e),events:Ct(e),members:$t(e)});var Ht=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,r)=>e.get("/profiles/:username/relationships/followers",{username:t,...r}),"getFollowers")});var kt=e=>({get:o(async t=>e.get("/profiles/:username",{username:t}),"get"),relationships:Ht(e)});var Zt=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 Jt=e=>({me:o(async()=>e.get("/users/@me/notifications"),"me"),count:o(async t=>e.get("/users/@me/notifications/count",t),"count")});var Yt=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,r)=>e.get("/users/check/:identifier",{identifier:t,suggestions:r}),"check"),update:o(async(t,r)=>e.put("/users/:userId",r,{userId:t}),"update"),uploadFile:o(async(t,r,i)=>e.post("/users/:userId/files/:userFileType",Et("file",i),{userId:t,userFileType:r}),"uploadFile"),bookings:Zt(e),notifications:Jt(e)});var Kt=e=>({registerToBeta:o(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var Qt=class{static{o(this,"TonightPass");}client;auth;careers;health;orders;organizations;profiles;users;notifications;constructor(t){this.client=new Ie(t),this.auth=zt(this.client),this.careers=Ut(this.client),this.health=Mt(this.client),this.orders=Ft(this.client),this.organizations=Xt(this.client),this.profiles=kt(this.client),this.users=Yt(this.client),this.notifications=Kt(this.client);}};
2
- exports.Client=Ie;exports.CreateLocationDto=b;exports.CreateOrganizationDto=ae;exports.CreateOrganizationEventDto=l;exports.CreateOrganizationEventOrderDto=Ze;exports.CreateOrganizationEventStyleDto=ve;exports.CreateOrganizationEventTicketDto=c;exports.CreateOrganizationIdentityDto=B;exports.CreateOrganizationMemberDto=we;exports.CreateUserDto=ge;exports.CreateUserIdentityDto=U;exports.Currency=Q;exports.DEFAULT_API_URL=We;exports.GeoPointDto=h;exports.Language=Jr;exports.OrganizationEventStyleType=Ar;exports.OrganizationEventTicketCategory=k;exports.OrganizationEventTicketType=H;exports.OrganizationEventType=Z;exports.OrganizationEventVisibilityType=J;exports.OrganizationMemberRole=Y;exports.OrganizationMemberStatus=Pr;exports.OrganizationSocialType=Lr;exports.ProfileType=kr;exports.REGEX=f;exports.SignInUserDto=Ae;exports.TonightPass=Qt;exports.TonightPassAPIError=Ge;exports.UpdateLocationDto=v;exports.UpdateOrganizationDto=fe;exports.UpdateOrganizationEventDto=y;exports.UpdateOrganizationEventStyleDto=Je;exports.UpdateOrganizationEventTicketDto=d;exports.UpdateOrganizationIdentityDto=q;exports.UpdateOrganizationMemberDto=Me;exports.UpdateUserDto=he;exports.UserFileType=Vr;exports.UserIdentityGender=K;exports.UserNotificationType=Fr;exports.UserRole=qr;exports.UserTokenType=Gr;exports.auth=zt;exports.buildFileFormData=Et;exports.careers=Ut;exports.health=Mt;exports.isBrowser=M;exports.notifications=Kt;exports.orders=Ft;exports.organizations=Xt;exports.profiles=kt;exports.request=Lt;exports.sdk=z;exports.users=Yt;//# sourceMappingURL=index.js.map
1
+ 'use strict';require('reflect-metadata');var classTransformer=require('class-transformer'),classValidator=require('class-validator'),Bo=require('redaxios'),pathcat=require('pathcat');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Bo__default=/*#__PURE__*/_interopDefault(Bo);var Tt=Object.defineProperty;var o=(e,t)=>Tt(e,"name",{value:t,configurable:!0});var Ge="https://api.tonightpass.com";var d={EMAIL:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,NAME:/^[a-zA-Z0-9 ]+$/,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_MAX_LENGTH:/^.{0,255}$/,PASSWORD_UPPERCASE:/^(?=.*[A-Z])/,PASSWORD_LOWERCASE:/^(?=.*[a-z])/,PASSWORD_NUMBER_SPECIAL:/^(?=.*[\d\W])/,IMAGE_URL:/^(https:\/\/|http:\/\/)(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-z]{2,6}([-a-zA-Z0-9@:%_\+.~#?&//=]*)\.(jpg|jpeg|gif|png|bmp|tiff|tga|svg)$/i};function M(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(M,"_ts_decorate");function w(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(w,"_ts_metadata");var v=class{static{o(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point";}validate(){let[t,n]=this.coordinates;return n>=-90&&n<=90&&t>=-180&&t<=180}};M([classValidator.IsString(),classValidator.IsNotEmpty(),w("design:type",String)],v.prototype,"type",void 0);M([classValidator.IsArray(),classValidator.IsNotEmpty(),classValidator.Length(2,2),classValidator.IsNumber({},{each:!0}),w("design:type",Array)],v.prototype,"coordinates",void 0);M([classValidator.ValidateNested(),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",Boolean)],v.prototype,"validate",null);var h=class{static{o(this,"CreateLocationDto");}name;address;zipCode;city;country;geometry};M([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),w("design:type",String)],h.prototype,"name",void 0);M([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,256),w("design:type",String)],h.prototype,"address",void 0);M([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),w("design:type",String)],h.prototype,"zipCode",void 0);M([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),w("design:type",String)],h.prototype,"city",void 0);M([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,128),w("design:type",String)],h.prototype,"country",void 0);M([classValidator.ValidateNested(),classTransformer.Type(()=>v),classValidator.IsNotEmpty(),w("design:type",typeof v>"u"?Object:v)],h.prototype,"geometry",void 0);function re(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(re,"_ts_decorate");function se(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(se,"_ts_metadata");var b=class{static{o(this,"UpdateLocationDto");}name;address;zipCode;city;country;geometry};re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),se("design:type",String)],b.prototype,"name",void 0);re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,256),se("design:type",String)],b.prototype,"address",void 0);re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),se("design:type",String)],b.prototype,"zipCode",void 0);re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),se("design:type",String)],b.prototype,"city",void 0);re([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),se("design:type",String)],b.prototype,"country",void 0);re([classValidator.IsOptional(),classValidator.ValidateNested(),classTransformer.Type(()=>v),se("design:type",typeof v>"u"?Object:v)],b.prototype,"geometry",void 0);function q(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(q,"_ts_decorate");function G(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(G,"_ts_metadata");var pe=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};q([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),G("design:type",String)],pe.prototype,"organizationSlug",void 0);q([classValidator.IsObject(),G("design:type",typeof B>"u"?Object:B)],pe.prototype,"identity",void 0);q([classValidator.IsArray(),G("design:type",Array)],pe.prototype,"members",void 0);q([classValidator.IsOptional(),classValidator.IsObject(),G("design:type",typeof Location>"u"?Object:Location)],pe.prototype,"location",void 0);var B=class{static{o(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};q([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),G("design:type",String)],B.prototype,"displayName",void 0);q([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),G("design:type",String)],B.prototype,"description",void 0);q([classValidator.IsUrl({protocols:["http","https"],host_whitelist:["cdn.tonightpass.com","cdn.staging.tonightpass.com"]}),G("design:type",String)],B.prototype,"avatarUrl",void 0);q([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"],host_whitelist:["cdn.tonightpass.com","cdn.staging.tonightpass.com"]}),G("design:type",String)],B.prototype,"bannerUrl",void 0);q([classValidator.IsOptional(),classValidator.IsArray(),G("design:type",Array)],B.prototype,"socialLinks",void 0);function V(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(V,"_ts_decorate");function C(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(C,"_ts_metadata");var de=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};V([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(d.USERNAME),C("design:type",String)],de.prototype,"slug",void 0);V([classValidator.IsObject(),classValidator.IsOptional(),C("design:type",typeof W>"u"?Object:W)],de.prototype,"identity",void 0);V([classValidator.IsOptional(),classValidator.IsArray(),C("design:type",Array)],de.prototype,"members",void 0);V([classValidator.IsOptional(),classValidator.IsObject(),C("design:type",typeof Location>"u"?Object:Location)],de.prototype,"location",void 0);var W=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};V([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),C("design:type",String)],W.prototype,"displayName",void 0);V([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),C("design:type",String)],W.prototype,"description",void 0);V([classValidator.IsUrl({protocols:["http","https"]}),classValidator.IsOptional(),C("design:type",String)],W.prototype,"avatarUrl",void 0);V([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),C("design:type",String)],W.prototype,"bannerUrl",void 0);V([classValidator.IsOptional(),classValidator.IsArray(),C("design:type",Array)],W.prototype,"socialLinks",void 0);var Je=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};var be=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var Qe=class extends be{static{o(this,"UpdateOrganizationEventStyleDto");}};var wn=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 H=function(e){return e.ETicket="e-ticket",e.Other="other",e}({}),Z=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 _n=function(e){return e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art",e}({});var J=function(e){return e.Clubbing="clubbing",e.Concert="concert",e.Afterwork="afterwork",e.DancingLunch="dancing_lunch",e.Diner="diner",e.Garden="garden",e.AfterBeach="after_beach",e.Festival="festival",e.Spectacle="spectacle",e.Cruise="cruise",e.OutsideAnimation="outside_animation",e.Sport="sport",e.Match="match",e.Seminar="seminar",e.Conference="conference",e.WellnessDay="wellness_day",e.Workshop="workshop",e.TradeFair="trade_fair",e.ConsumerShow="consumer_show",e.Membership="membership",e}({}),Q=function(e){return e.Public="public",e.Unlisted="unlisted",e.Private="private",e}({});var Ln=function(e){return e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected",e}({}),Y=function(e){return e.Member="member",e.Manager="manager",e.Admin="admin",e.Owner="owner",e}({});var Fn=function(e){return e.Facebook="facebook",e.Twitter="twitter",e.Instagram="instagram",e.Linkedin="linkedin",e.Youtube="youtube",e.Website="website",e}({});var Gn=function(e){return e.Follow="follow",e}({});var Vn=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 $n=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),K=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),Xn=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Yn=function(e){return e.User="user",e.Organization="organization",e}({});var E=function(e){return e.EUR="EUR",e.USD="USD",e.GBP="GBP",e}({}),En=function(e){return e.FR="fr",e.EN="en",e}({});function j(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(j,"_ts_decorate");function O(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(O,"_ts_metadata");var l=class{static{o(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};j([classValidator.IsString(),classValidator.Length(1,128),O("design:type",String)],l.prototype,"name",void 0);j([classValidator.IsString(),classValidator.Length(1,1024),O("design:type",String)],l.prototype,"description",void 0);j([classValidator.IsNumber(),classValidator.Min(0),O("design:type",Number)],l.prototype,"price",void 0);j([classValidator.IsNumber(),classValidator.Min(0),O("design:type",Number)],l.prototype,"quantity",void 0);j([classValidator.IsEnum(H),O("design:type",typeof H>"u"?Object:H)],l.prototype,"type",void 0);j([classValidator.IsEnum(Z),O("design:type",typeof Z>"u"?Object:Z)],l.prototype,"category",void 0);j([classValidator.IsEnum(E),O("design:type",typeof E>"u"?Object:E)],l.prototype,"currency",void 0);j([classValidator.IsBoolean(),O("design:type",Boolean)],l.prototype,"isVisible",void 0);j([classValidator.IsBoolean(),O("design:type",Boolean)],l.prototype,"isFeesIncluded",void 0);j([classValidator.IsDateString(),classValidator.IsOptional(),O("design:type",typeof Date>"u"?Object:Date)],l.prototype,"startAt",void 0);j([classValidator.IsDateString(),classValidator.IsOptional(),O("design:type",typeof Date>"u"?Object:Date)],l.prototype,"endAt",void 0);function _(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(_,"_ts_decorate");function N(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(N,"_ts_metadata");var c=class{static{o(this,"UpdateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};_([classValidator.IsString(),classValidator.Length(1,128),classValidator.IsOptional(),N("design:type",String)],c.prototype,"name",void 0);_([classValidator.IsString(),classValidator.Length(1,1024),classValidator.IsOptional(),N("design:type",String)],c.prototype,"description",void 0);_([classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),N("design:type",Number)],c.prototype,"price",void 0);_([classValidator.IsNumber(),classValidator.Min(0),classValidator.IsOptional(),N("design:type",Number)],c.prototype,"quantity",void 0);_([classValidator.IsEnum(H),classValidator.IsOptional(),N("design:type",typeof H>"u"?Object:H)],c.prototype,"type",void 0);_([classValidator.IsEnum(Z),classValidator.IsOptional(),N("design:type",typeof Z>"u"?Object:Z)],c.prototype,"category",void 0);_([classValidator.IsEnum(E),classValidator.IsOptional(),N("design:type",typeof E>"u"?Object:E)],c.prototype,"currency",void 0);_([classValidator.IsBoolean(),classValidator.IsOptional(),N("design:type",Boolean)],c.prototype,"isVisible",void 0);_([classValidator.IsBoolean(),classValidator.IsOptional(),N("design:type",Boolean)],c.prototype,"isFeesIncluded",void 0);_([classValidator.IsDateString(),classValidator.IsOptional(),N("design:type",typeof Date>"u"?Object:Date)],c.prototype,"startAt",void 0);_([classValidator.IsDateString(),classValidator.IsOptional(),N("design:type",typeof Date>"u"?Object:Date)],c.prototype,"endAt",void 0);function x(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(x,"_ts_decorate");function S(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(S,"_ts_metadata");var f=class{static{o(this,"CreateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;startAt;endAt};x([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,64),S("design:type",String)],f.prototype,"title",void 0);x([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(d.SLUG),S("design:type",String)],f.prototype,"slug",void 0);x([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(16,2048),S("design:type",String)],f.prototype,"description",void 0);x([classValidator.IsEnum(J),classValidator.IsNotEmpty(),S("design:type",typeof J>"u"?Object:J)],f.prototype,"type",void 0);x([classValidator.IsEnum(Q),classValidator.IsNotEmpty(),S("design:type",typeof Q>"u"?Object:Q)],f.prototype,"visibility",void 0);x([classValidator.IsArray(),classValidator.IsUrl({},{each:!0}),S("design:type",Array)],f.prototype,"flyers",void 0);x([classValidator.IsArray(),classValidator.IsUrl({},{each:!0}),S("design:type",Array)],f.prototype,"trailers",void 0);x([classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>h),classValidator.IsNotEmpty(),S("design:type",typeof h>"u"?Object:h)],f.prototype,"location",void 0);x([classValidator.IsArray(),classValidator.ValidateNested({each:!0}),classTransformer.Type(()=>l),classValidator.IsNotEmpty(),S("design:type",Array)],f.prototype,"tickets",void 0);x([classValidator.IsArray(),classValidator.IsString({each:!0}),classValidator.IsNotEmpty(),S("design:type",Array)],f.prototype,"styles",void 0);x([classValidator.IsDateString(),classValidator.IsNotEmpty(),S("design:type",typeof Date>"u"?Object:Date)],f.prototype,"startAt",void 0);x([classValidator.IsDateString(),classValidator.IsNotEmpty(),S("design:type",typeof Date>"u"?Object:Date)],f.prototype,"endAt",void 0);function I(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(I,"_ts_decorate");function R(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(R,"_ts_metadata");var u=class{static{o(this,"UpdateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;startAt;endAt};I([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,64),R("design:type",String)],u.prototype,"title",void 0);I([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(d.SLUG),R("design:type",String)],u.prototype,"slug",void 0);I([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(16,2048),R("design:type",String)],u.prototype,"description",void 0);I([classValidator.IsOptional(),classValidator.IsEnum(J),R("design:type",typeof J>"u"?Object:J)],u.prototype,"type",void 0);I([classValidator.IsOptional(),classValidator.IsEnum(Q),R("design:type",typeof Q>"u"?Object:Q)],u.prototype,"visibility",void 0);I([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:!0}),R("design:type",Array)],u.prototype,"flyers",void 0);I([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsUrl({},{each:!0}),R("design:type",Array)],u.prototype,"trailers",void 0);I([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>b),R("design:type",typeof b>"u"?Object:b)],u.prototype,"location",void 0);I([classValidator.IsOptional(),classValidator.IsArray(),classValidator.ValidateNested({each:!0}),classTransformer.Type(()=>c),R("design:type",Array)],u.prototype,"tickets",void 0);I([classValidator.IsOptional(),classValidator.IsArray(),classValidator.IsString({each:!0}),R("design:type",Array)],u.prototype,"styles",void 0);I([classValidator.IsOptional(),classValidator.IsDateString(),R("design:type",typeof Date>"u"?Object:Date)],u.prototype,"startAt",void 0);I([classValidator.IsOptional(),classValidator.IsDateString(),R("design:type",typeof Date>"u"?Object:Date)],u.prototype,"endAt",void 0);function bt(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(bt,"_ts_decorate");function xt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(xt,"_ts_metadata");var Ae=class{static{o(this,"CreateOrganizationMemberDto");}user;role};bt([classValidator.IsString(),classValidator.IsNotEmpty(),xt("design:type",String)],Ae.prototype,"user",void 0);bt([classValidator.IsEnum(Y),classValidator.IsNotEmpty(),xt("design:type",typeof Y>"u"?Object:Y)],Ae.prototype,"role",void 0);function So(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(So,"_ts_decorate");function Io(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Io,"_ts_metadata");var Fe=class{static{o(this,"UpdateOrganizationMemberDto");}role};So([classValidator.IsEnum(Y),classValidator.IsNotEmpty(),Io("design:type",typeof Y>"u"?Object:Y)],Fe.prototype,"role",void 0);function z(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(z,"_ts_decorate");function D(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(D,"_ts_metadata");var ye=class{static{o(this,"CreateUserDto");}identifier;identity;password};z([classValidator.ValidateNested(),classTransformer.Type(()=>le),D("design:type",typeof le>"u"?Object:le)],ye.prototype,"identifier",void 0);z([classValidator.ValidateNested(),classTransformer.Type(()=>k),D("design:type",typeof k>"u"?Object:k)],ye.prototype,"identity",void 0);z([classValidator.IsString(),classValidator.Matches(d.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),classValidator.Matches(d.PASSWORD_MAX_LENGTH,{message:"Password must be at most 255 characters long."}),classValidator.Matches(d.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),classValidator.Matches(d.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),classValidator.Matches(d.PASSWORD,{message:"Password must be secure."}),D("design:type",String)],ye.prototype,"password",void 0);var le=class{static{o(this,"CreateUserIdentifierDto");}email;phoneNumber;username};z([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),D("design:type",String)],le.prototype,"email",void 0);z([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),D("design:type",String)],le.prototype,"phoneNumber",void 0);z([classValidator.IsString(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(d.USERNAME),D("design:type",String)],le.prototype,"username",void 0);var k=class{static{o(this,"CreateUserIdentityDto");}firstName;lastName;gender;avatarUrl;birthDate};z([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(d.NAME,{message:"First name must be composed of letters only"}),D("design:type",String)],k.prototype,"firstName",void 0);z([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(d.NAME,{message:"Last name must be composed of letters only"}),D("design:type",String)],k.prototype,"lastName",void 0);z([classValidator.IsEnum(K),D("design:type",typeof K>"u"?Object:K)],k.prototype,"gender",void 0);z([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),D("design:type",String)],k.prototype,"avatarUrl",void 0);z([classValidator.IsOptional(),classValidator.IsDateString(),D("design:type",typeof Date>"u"?Object:Date)],k.prototype,"birthDate",void 0);function At(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(At,"_ts_decorate");function wt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(wt,"_ts_metadata");var we=class{static{o(this,"SignInUserDto");}identifier;password};At([classValidator.IsNotEmpty(),classValidator.IsString(),wt("design:type",String)],we.prototype,"identifier",void 0);At([classValidator.IsNotEmpty(),classValidator.IsString(),wt("design:type",String)],we.prototype,"password",void 0);function m(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(i=(s<3?a(i):s>3?a(t,n,i):a(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}o(m,"_ts_decorate");function g(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(g,"_ts_metadata");var ve=class{static{o(this,"UpdateUserDto");}identifier;identity;password};m([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>fe),g("design:type",typeof fe>"u"?Object:fe)],ve.prototype,"identifier",void 0);m([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>U),g("design:type",typeof U>"u"?Object:U)],ve.prototype,"identity",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(8),classValidator.MaxLength(128),g("design:type",String)],ve.prototype,"password",void 0);var fe=class{static{o(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),g("design:type",String)],fe.prototype,"email",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),g("design:type",String)],fe.prototype,"phoneNumber",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(3,48),classValidator.Matches(d.USERNAME),g("design:type",String)],fe.prototype,"username",void 0);var U=class{static{o(this,"UpdateUserIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate};m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(d.NAME,{message:"First name must be composed of letters only"}),g("design:type",String)],U.prototype,"firstName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(d.NAME,{message:"Last name must be composed of letters only"}),g("design:type",String)],U.prototype,"lastName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),g("design:type",String)],U.prototype,"displayName",void 0);m([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),g("design:type",String)],U.prototype,"description",void 0);m([classValidator.IsOptional(),classValidator.IsUrl(),g("design:type",Object)],U.prototype,"avatarUrl",void 0);m([classValidator.IsOptional(),classValidator.IsUrl(),g("design:type",Object)],U.prototype,"bannerUrl",void 0);m([classValidator.IsOptional(),classValidator.IsEnum(K),g("design:type",typeof K>"u"?Object:K)],U.prototype,"gender",void 0);m([classValidator.IsOptional(),classValidator.IsDateString(),g("design:type",typeof Date>"u"?Object:Date)],U.prototype,"birthDate",void 0);var F=typeof window<"u";function Dt(e,t){let n=new FormData;return t instanceof File?n.append(e,t):t instanceof FileList?Array.from(t).forEach(r=>n.append(e,r)):t.forEach(r=>n.append(e,r)),n}o(Dt,"buildFileFormData");var qo=Bo__default.default.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!F&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[function(e,t){return e instanceof FormData?(t&&typeof t=="object"&&"Content-Type"in t&&delete t["Content-Type"],e):(t&&(t["Content-Type"]="application/json"),JSON.stringify(e))}],withCredentials:F}),Ut=o(async(e,t)=>qo(e,{...t}).then(r=>r).catch(r=>{throw r.data||console.error(r),r.data}),"request");var qe=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;}},je=class{static{o(this,"Client");}options;url;constructor(t){this.options=t,this.url=(n,r)=>{let s=this.options.baseURL||Ge;return pathcat.pathcat(s,n,r)};}setOptions(t){this.options=t;}async get(t,n,r){return this.requester("GET",t,void 0,n,r)}async post(t,n,r,s){return this.requester("POST",t,n,r,s)}async put(t,n,r,s){return this.requester("PUT",t,n,r,s)}async patch(t,n,r,s){return this.requester("PATCH",t,n,r,s)}async delete(t,n,r,s){return this.requester("DELETE",t,n,r,s)}async requester(t,n,r,s={},i={}){let a=this.url(n,s);if(r!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let p=await Ut(a,{method:t,data:r,...i}),Oe=p.data;if(!Oe.success)throw new qe(p,Oe);return Oe.data}};function L(e){return e}o(L,"sdk");var Lt=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"),oauth2:{google:{connect:o(t=>{if(F)window.location.href=e.url("/oauth2/google",t||{});else throw new Error("Google OAuth2 is only available in the browser")},"connect")},twitter:{connect:o(t=>{if(F)window.location.href=e.url("/oauth2/twitter",t||{});else throw new Error("Twitter OAuth2 is only available in the browser")},"connect")},facebook:{connect:o(t=>{if(F)window.location.href=e.url("/oauth2/facebook",t||{});else throw new Error("Facebook OAuth2 is only available in the browser")},"connect")}}});var kt=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 Ft=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 Mt=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var Bt=o(e=>({account:o(async t=>e.get("/organizations/:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(F)window.location.href=e.url("/organizations/:organizationSlug/billing/link",{organizationSlug:t});else throw new Error("Billing link is only available in the browser")},"link"),dashboard:o(t=>{if(F)window.location.href=e.url("/organizations/:organizationSlug/billing/dashboard",{organizationSlug:t});else throw new Error("Billing dashboard is only available in the browser")},"dashboard")}),"organizationsBilling");var qt=o(e=>({create:o(async(t,n,r)=>e.post("/organizations/:organizationSlug/events/:eventSlug/orders",r,{organizationSlug:t,eventSlug:n}),"create")}),"organizationsEventsOrders");var Gt=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 Wt=o(e=>({getAll:o(async(t,n)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:n}),"getAll"),get:o(async(t,n,r)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:n,ticketId:r}),"get"),create:o(async(t,n,r)=>e.post("/organizations/:organizationSlug/events/:eventSlug/tickets",r,{organizationSlug:t,eventSlug:n}),"create"),update:o(async(t,n,r,s)=>e.put("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",s,{organizationSlug:t,eventSlug:n,ticketId:r}),"update"),delete:o(async(t,n,r)=>e.delete("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:n,ticketId:r}),"delete")}),"organizationsEventsTickets");var Vt=o(e=>({record:o(async(t,n)=>e.post("/organizations/:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:n}),"record")}),"organizationsEventsViews");var Ct=o(e=>({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"),getPast:o(async(t,n)=>e.get("/organizations/:organizationSlug/events/past",{organizationSlug:t,...n}),"getPast"),getUpcoming:o(async(t,n)=>e.get("/organizations/:organizationSlug/events/upcoming",{organizationSlug:t,...n}),"getUpcoming"),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,r)=>e.put("/organizations/:organizationSlug/events/:eventSlug",r,{organizationSlug:t,eventSlug:n}),"update"),delete:o(async(t,n)=>e.delete("/organizations/:organizationSlug/events/:eventSlug",null,{organizationSlug:t,eventSlug:n}),"delete"),orders:qt(e),styles:Gt(e),tickets:Wt(e),views:Vt(e)}),"organizationsEvents");var $t=o(e=>({getAll:o(async()=>e.get("/organizations/members"),"getAll"),delete:o(async t=>e.delete("/organizations/members/:memberId",null,{memberId:t}),"delete")}),"organizationsMembers");var Xt=e=>({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"),billing:Bt(e),events:Ct(e),members:$t(e)});var Ht=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 Zt=e=>({get:o(async t=>e.get("/profiles/:username",{username:t}),"get"),relationships:Ht(e)});var Jt=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 Qt=e=>({me:o(async()=>e.get("/users/@me/notifications"),"me"),count:o(async t=>e.get("/users/@me/notifications/count",t),"count")});var Yt=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,r)=>e.post("/users/:userId/files/:userFileType",Dt("file",r),{userId:t,userFileType:n}),"uploadFile"),bookings:Jt(e),notifications:Qt(e)});var Kt=e=>({registerToBeta:o(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var Et=class{static{o(this,"TonightPass");}client;auth;careers;health;orders;organizations;profiles;users;notifications;constructor(t){this.client=new je(t),this.auth=Lt(this.client),this.careers=kt(this.client),this.health=Ft(this.client),this.orders=Mt(this.client),this.organizations=Xt(this.client),this.profiles=Zt(this.client),this.users=Yt(this.client),this.notifications=Kt(this.client);}};
2
+ exports.Client=je;exports.CreateLocationDto=h;exports.CreateOrganizationDto=pe;exports.CreateOrganizationEventDto=f;exports.CreateOrganizationEventOrderDto=Je;exports.CreateOrganizationEventStyleDto=be;exports.CreateOrganizationEventTicketDto=l;exports.CreateOrganizationIdentityDto=B;exports.CreateOrganizationMemberDto=Ae;exports.CreateUserDto=ye;exports.CreateUserIdentityDto=k;exports.Currency=E;exports.DEFAULT_API_URL=Ge;exports.ErrorType=wn;exports.GeoPointDto=v;exports.Language=En;exports.OrganizationEventStyleType=_n;exports.OrganizationEventTicketCategory=Z;exports.OrganizationEventTicketType=H;exports.OrganizationEventType=J;exports.OrganizationEventVisibilityType=Q;exports.OrganizationMemberRole=Y;exports.OrganizationMemberStatus=Ln;exports.OrganizationSocialType=Fn;exports.ProfileType=Yn;exports.REGEX=d;exports.SignInUserDto=we;exports.TonightPass=Et;exports.TonightPassAPIError=qe;exports.UpdateLocationDto=b;exports.UpdateOrganizationDto=de;exports.UpdateOrganizationEventDto=u;exports.UpdateOrganizationEventStyleDto=Qe;exports.UpdateOrganizationEventTicketDto=c;exports.UpdateOrganizationIdentityDto=W;exports.UpdateOrganizationMemberDto=Fe;exports.UpdateUserDto=ve;exports.UserFileType=Xn;exports.UserIdentityGender=K;exports.UserNotificationType=Gn;exports.UserRole=$n;exports.UserTokenType=Vn;exports.auth=Lt;exports.buildFileFormData=Dt;exports.careers=kt;exports.health=Ft;exports.isBrowser=F;exports.notifications=Kt;exports.orders=Mt;exports.organizations=Xt;exports.profiles=Zt;exports.request=Ut;exports.sdk=L;exports.users=Yt;//# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map