tonightpass 0.0.216 → 0.0.218

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
@@ -426,6 +426,20 @@ type UserNotificationEndpoints = Endpoint<"GET", "/users/@me/notifications", Arr
426
426
  unseen?: boolean;
427
427
  }> | Endpoint<"PUT", "/users/@me/notifications/read", void>;
428
428
 
429
+ type UserBookingTicket = Base & {
430
+ booking: UserBookingWithoutTickets;
431
+ ticket: OrganizationEventTicket;
432
+ token: UserToken;
433
+ useCount: number;
434
+ };
435
+ type UserBookingTicketEndpoints = Endpoint<"GET", "/users/bookings/tickets/:ticketId", UserBookingTicket, {
436
+ tokenId: string;
437
+ tokenValue: string;
438
+ }> | Endpoint<"PUT", "/users/bookings/tickets/:ticketId/use", UserBookingTicket, {
439
+ tokenId: string;
440
+ tokenValue: string;
441
+ }>;
442
+
429
443
  type Order = Base & {
430
444
  invoice: Stripe__default.Invoice;
431
445
  user: User;
@@ -433,25 +447,75 @@ type Order = Base & {
433
447
  type OrderEndpoints = Endpoint<"GET", "/orders", ArrayResult<Order>, ArrayOptions<Order>> | Endpoint<"GET", "/orders/:orderId", Order>;
434
448
 
435
449
  type UserBookingWithoutTickets = Omit<UserBooking, "tickets">;
436
- type UserBookingTicket = Base & {
437
- booking: UserBookingWithoutTickets;
438
- ticket: OrganizationEventTicket;
439
- token: UserToken;
440
- useCount: number;
441
- };
442
450
  type UserBooking = Base & {
443
451
  tickets: UserBookingTicket[];
444
452
  order: Order;
445
453
  user: User;
446
454
  event: OrganizationEvent;
447
455
  };
448
- type UserBookingEndpoints = Endpoint<"GET", "/users/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/@me/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/:userId/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/bookings/:bookingId", UserBooking> | Endpoint<"GET", "/users/@me/bookings/:bookingId", UserBooking> | Endpoint<"GET", "/users/bookings/tickets/:ticketId", UserBookingTicket, {
449
- tokenId: string;
450
- tokenValue: string;
451
- }> | Endpoint<"PUT", "/users/bookings/tickets/:ticketId/use", UserBookingTicket, {
452
- tokenId: string;
453
- tokenValue: string;
454
- }>;
456
+ type UserBookingEndpoints = Endpoint<"GET", "/users/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/@me/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/:userId/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/bookings/:bookingId", UserBooking> | Endpoint<"GET", "/users/@me/bookings/:bookingId", UserBooking> | UserBookingTicketEndpoints;
457
+
458
+ declare enum ProfileType {
459
+ User = "user",
460
+ Organization = "organization"
461
+ }
462
+ type BaseProfile = {
463
+ type: ProfileType;
464
+ slug: string;
465
+ displayName: string;
466
+ description?: string;
467
+ avatarUrl?: string;
468
+ bannerUrl?: string;
469
+ links: string[];
470
+ metadata: ProfileMetadata;
471
+ createdAt: Date;
472
+ };
473
+ type UserProfile = BaseProfile & {
474
+ type: ProfileType.User;
475
+ metadata: UserProfileMetadata;
476
+ };
477
+ type OrganizationProfile = BaseProfile & {
478
+ type: ProfileType.Organization;
479
+ metadata: OrganizationProfileMetadata;
480
+ };
481
+ type Profile = UserProfile | OrganizationProfile;
482
+ type BaseProfileMetadata = {
483
+ followersCount: number;
484
+ isFollower: boolean;
485
+ isFollowing: boolean;
486
+ isBlocked: boolean;
487
+ hasBlocked: boolean;
488
+ canDM: boolean;
489
+ isOfficial: boolean;
490
+ };
491
+ type UserProfileMetadata = BaseProfileMetadata & {
492
+ hasPassPlus: boolean;
493
+ };
494
+ type OrganizationProfileMetadata = BaseProfileMetadata & {
495
+ eventsCount: number;
496
+ viewsCount: number;
497
+ membersCount: number;
498
+ };
499
+ type ProfileMetadata = UserProfileMetadata | OrganizationProfileMetadata;
500
+ type SearchProfilesOptions = ArrayOptions<Profile> & {
501
+ q: string;
502
+ };
503
+ type ProfileEndpoints = Endpoint<"GET", "/profiles", ArrayResult<Profile>, ArrayOptions<Profile>> | Endpoint<"GET", "/profiles/search", ArrayResult<Profile>, SearchProfilesOptions> | Endpoint<"GET", "/profiles/:username", Profile> | Endpoint<"GET", "/profiles/@me/relationships/suggestions", ArrayResult<Profile>, ArrayOptions<OrganizationProfile | UserProfile>> | Endpoint<"GET", "/profiles/:username/relationships/followers", ArrayResult<UserProfile>, ArrayOptions<UserProfile>> | Endpoint<"POST", "/profiles/:username/relationships/follow", boolean, null> | Endpoint<"POST", "/profiles/:username/relationships/unfollow", boolean, null>;
504
+
505
+ type UserCustomer = UserProfile & {
506
+ email?: string;
507
+ phoneNumber?: string;
508
+ firstName: string;
509
+ lastName: string;
510
+ fullName: string;
511
+ metadata: UserCustomerMetadata;
512
+ };
513
+ type UserCustomerMetadata = UserProfileMetadata & {
514
+ bookingsCount: number;
515
+ eventsAttendedCount: number;
516
+ totalSpent: number;
517
+ lastBookingAt?: Date;
518
+ };
455
519
 
456
520
  type UserToken = Omit<Base, "updatedAt"> & {
457
521
  type: UserTokenType;
@@ -1124,53 +1188,6 @@ type OrganizationEndpoints = Endpoint<"GET", "/organizations/search", Organizati
1124
1188
  limit?: number;
1125
1189
  }> | Endpoint<"GET", "/organizations", ArrayResult<Organization>, ArrayOptions<Organization>> | Endpoint<"GET", "/organizations/:organizationSlug", Organization> | Endpoint<"POST", "/organizations", Organization, CreateOrganizationDto> | Endpoint<"PUT", "/organizations/:organizationSlug", Organization, UpdateOrganizationDto> | Endpoint<"DELETE", "/organizations/:organizationSlug", Organization, null> | Endpoint<"POST", "/organizations/:organizationSlug/files/:organizationFileType", string, FormData> | Endpoint<"GET", "/organizations/:organizationSlug/billing/account", OrganizationBillingAccount> | Endpoint<"GET", "/organizations/:organizationSlug/billing/link", void> | Endpoint<"GET", "/organizations/:organizationSlug/billing/dashboard", void> | OrganizationEventEndpoints | OrganizationMembersEndpoints | OrganizationAnalyticsEndpoints;
1126
1190
 
1127
- declare enum ProfileType {
1128
- User = "user",
1129
- Organization = "organization"
1130
- }
1131
- type BaseProfile = {
1132
- type: ProfileType;
1133
- slug: string;
1134
- displayName: string;
1135
- description?: string;
1136
- avatarUrl?: string;
1137
- bannerUrl?: string;
1138
- links: string[];
1139
- metadata: ProfileMetadata;
1140
- createdAt: Date;
1141
- };
1142
- type UserProfile = BaseProfile & {
1143
- type: ProfileType.User;
1144
- metadata: UserProfileMetadata;
1145
- };
1146
- type OrganizationProfile = BaseProfile & {
1147
- type: ProfileType.Organization;
1148
- metadata: OrganizationProfileMetadata;
1149
- };
1150
- type Profile = UserProfile | OrganizationProfile;
1151
- type BaseProfileMetadata = {
1152
- followersCount: number;
1153
- isFollower: boolean;
1154
- isFollowing: boolean;
1155
- isBlocked: boolean;
1156
- hasBlocked: boolean;
1157
- canDM: boolean;
1158
- isOfficial: boolean;
1159
- };
1160
- type UserProfileMetadata = BaseProfileMetadata & {
1161
- hasPassPlus: boolean;
1162
- };
1163
- type OrganizationProfileMetadata = BaseProfileMetadata & {
1164
- eventsCount: number;
1165
- viewsCount: number;
1166
- membersCount: number;
1167
- };
1168
- type ProfileMetadata = UserProfileMetadata | OrganizationProfileMetadata;
1169
- type SearchProfilesOptions = ArrayOptions<Profile> & {
1170
- q: string;
1171
- };
1172
- type ProfileEndpoints = Endpoint<"GET", "/profiles", ArrayResult<Profile>, ArrayOptions<Profile>> | Endpoint<"GET", "/profiles/search", ArrayResult<Profile>, SearchProfilesOptions> | Endpoint<"GET", "/profiles/:username", Profile> | Endpoint<"GET", "/profiles/@me/relationships/suggestions", ArrayResult<Profile>, ArrayOptions<OrganizationProfile | UserProfile>> | Endpoint<"GET", "/profiles/:username/relationships/followers", ArrayResult<UserProfile>, ArrayOptions<UserProfile>> | Endpoint<"POST", "/profiles/:username/relationships/follow", boolean, null> | Endpoint<"POST", "/profiles/:username/relationships/unfollow", boolean, null>;
1173
-
1174
1191
  type WebhookEndpoints = Endpoint<"POST", "/webhooks/stripe", boolean, Stripe__default.Event>;
1175
1192
 
1176
1193
  type NotificationEndpoints = Endpoint<"POST", "/notifications/subscribe/beta", null, {
@@ -1523,6 +1540,7 @@ declare const users: (client: Client) => {
1523
1540
  get: (bookingId: string) => Promise<UserBooking>;
1524
1541
  me: () => Promise<ArrayResult<UserBooking>>;
1525
1542
  tickets: {
1543
+ get: (ticketId: string) => Promise<UserBookingTicket>;
1526
1544
  use: (ticketId: string, tokenId: string, tokenValue: string) => Promise<UserBookingTicket>;
1527
1545
  };
1528
1546
  };
@@ -1754,6 +1772,7 @@ declare class TonightPass {
1754
1772
  get: (bookingId: string) => Promise<UserBooking>;
1755
1773
  me: () => Promise<ArrayResult<UserBooking>>;
1756
1774
  tickets: {
1775
+ get: (ticketId: string) => Promise<UserBookingTicket>;
1757
1776
  use: (ticketId: string, tokenId: string, tokenValue: string) => Promise<UserBookingTicket>;
1758
1777
  };
1759
1778
  };
@@ -1953,4 +1972,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
1953
1972
  client: ChannelWebSocketClient;
1954
1973
  };
1955
1974
 
1956
- export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, type AuthMethod, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CacheEntry, CacheManager, type CacheOptions, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, type CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type FeedEndpoints, type FeedPost, FeedType, type GeoPoint, GeoPointDto, type GeoSearchAggregation, GoogleOneTapDto, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, OAuth2Provider, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventCalendar, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, type SearchOrganizationEventsOptions, type SearchProfilesOptions, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, type UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, UpdateUserPostCommentDto, UpdateUserPostDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserOAuthProvider, type UserPost, type UserPostComment, type UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, type UserPostViewEndpoints, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, auth, buildFileFormData, careers, channels, channelsWS, currencies, feed, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
1975
+ export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, type AuthMethod, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CacheEntry, CacheManager, type CacheOptions, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, type CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type FeedEndpoints, type FeedPost, FeedType, type GeoPoint, GeoPointDto, type GeoSearchAggregation, GoogleOneTapDto, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, OAuth2Provider, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventCalendar, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, type SearchOrganizationEventsOptions, type SearchProfilesOptions, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, type UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, UpdateUserPostCommentDto, UpdateUserPostDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingTicketEndpoints, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserCustomer, type UserCustomerMetadata, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserOAuthProvider, type UserPost, type UserPostComment, type UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, type UserPostViewEndpoints, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, auth, buildFileFormData, careers, channels, channelsWS, currencies, feed, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
package/dist/index.d.ts CHANGED
@@ -426,6 +426,20 @@ type UserNotificationEndpoints = Endpoint<"GET", "/users/@me/notifications", Arr
426
426
  unseen?: boolean;
427
427
  }> | Endpoint<"PUT", "/users/@me/notifications/read", void>;
428
428
 
429
+ type UserBookingTicket = Base & {
430
+ booking: UserBookingWithoutTickets;
431
+ ticket: OrganizationEventTicket;
432
+ token: UserToken;
433
+ useCount: number;
434
+ };
435
+ type UserBookingTicketEndpoints = Endpoint<"GET", "/users/bookings/tickets/:ticketId", UserBookingTicket, {
436
+ tokenId: string;
437
+ tokenValue: string;
438
+ }> | Endpoint<"PUT", "/users/bookings/tickets/:ticketId/use", UserBookingTicket, {
439
+ tokenId: string;
440
+ tokenValue: string;
441
+ }>;
442
+
429
443
  type Order = Base & {
430
444
  invoice: Stripe__default.Invoice;
431
445
  user: User;
@@ -433,25 +447,75 @@ type Order = Base & {
433
447
  type OrderEndpoints = Endpoint<"GET", "/orders", ArrayResult<Order>, ArrayOptions<Order>> | Endpoint<"GET", "/orders/:orderId", Order>;
434
448
 
435
449
  type UserBookingWithoutTickets = Omit<UserBooking, "tickets">;
436
- type UserBookingTicket = Base & {
437
- booking: UserBookingWithoutTickets;
438
- ticket: OrganizationEventTicket;
439
- token: UserToken;
440
- useCount: number;
441
- };
442
450
  type UserBooking = Base & {
443
451
  tickets: UserBookingTicket[];
444
452
  order: Order;
445
453
  user: User;
446
454
  event: OrganizationEvent;
447
455
  };
448
- type UserBookingEndpoints = Endpoint<"GET", "/users/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/@me/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/:userId/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/bookings/:bookingId", UserBooking> | Endpoint<"GET", "/users/@me/bookings/:bookingId", UserBooking> | Endpoint<"GET", "/users/bookings/tickets/:ticketId", UserBookingTicket, {
449
- tokenId: string;
450
- tokenValue: string;
451
- }> | Endpoint<"PUT", "/users/bookings/tickets/:ticketId/use", UserBookingTicket, {
452
- tokenId: string;
453
- tokenValue: string;
454
- }>;
456
+ type UserBookingEndpoints = Endpoint<"GET", "/users/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/@me/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/:userId/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/bookings/:bookingId", UserBooking> | Endpoint<"GET", "/users/@me/bookings/:bookingId", UserBooking> | UserBookingTicketEndpoints;
457
+
458
+ declare enum ProfileType {
459
+ User = "user",
460
+ Organization = "organization"
461
+ }
462
+ type BaseProfile = {
463
+ type: ProfileType;
464
+ slug: string;
465
+ displayName: string;
466
+ description?: string;
467
+ avatarUrl?: string;
468
+ bannerUrl?: string;
469
+ links: string[];
470
+ metadata: ProfileMetadata;
471
+ createdAt: Date;
472
+ };
473
+ type UserProfile = BaseProfile & {
474
+ type: ProfileType.User;
475
+ metadata: UserProfileMetadata;
476
+ };
477
+ type OrganizationProfile = BaseProfile & {
478
+ type: ProfileType.Organization;
479
+ metadata: OrganizationProfileMetadata;
480
+ };
481
+ type Profile = UserProfile | OrganizationProfile;
482
+ type BaseProfileMetadata = {
483
+ followersCount: number;
484
+ isFollower: boolean;
485
+ isFollowing: boolean;
486
+ isBlocked: boolean;
487
+ hasBlocked: boolean;
488
+ canDM: boolean;
489
+ isOfficial: boolean;
490
+ };
491
+ type UserProfileMetadata = BaseProfileMetadata & {
492
+ hasPassPlus: boolean;
493
+ };
494
+ type OrganizationProfileMetadata = BaseProfileMetadata & {
495
+ eventsCount: number;
496
+ viewsCount: number;
497
+ membersCount: number;
498
+ };
499
+ type ProfileMetadata = UserProfileMetadata | OrganizationProfileMetadata;
500
+ type SearchProfilesOptions = ArrayOptions<Profile> & {
501
+ q: string;
502
+ };
503
+ type ProfileEndpoints = Endpoint<"GET", "/profiles", ArrayResult<Profile>, ArrayOptions<Profile>> | Endpoint<"GET", "/profiles/search", ArrayResult<Profile>, SearchProfilesOptions> | Endpoint<"GET", "/profiles/:username", Profile> | Endpoint<"GET", "/profiles/@me/relationships/suggestions", ArrayResult<Profile>, ArrayOptions<OrganizationProfile | UserProfile>> | Endpoint<"GET", "/profiles/:username/relationships/followers", ArrayResult<UserProfile>, ArrayOptions<UserProfile>> | Endpoint<"POST", "/profiles/:username/relationships/follow", boolean, null> | Endpoint<"POST", "/profiles/:username/relationships/unfollow", boolean, null>;
504
+
505
+ type UserCustomer = UserProfile & {
506
+ email?: string;
507
+ phoneNumber?: string;
508
+ firstName: string;
509
+ lastName: string;
510
+ fullName: string;
511
+ metadata: UserCustomerMetadata;
512
+ };
513
+ type UserCustomerMetadata = UserProfileMetadata & {
514
+ bookingsCount: number;
515
+ eventsAttendedCount: number;
516
+ totalSpent: number;
517
+ lastBookingAt?: Date;
518
+ };
455
519
 
456
520
  type UserToken = Omit<Base, "updatedAt"> & {
457
521
  type: UserTokenType;
@@ -1124,53 +1188,6 @@ type OrganizationEndpoints = Endpoint<"GET", "/organizations/search", Organizati
1124
1188
  limit?: number;
1125
1189
  }> | Endpoint<"GET", "/organizations", ArrayResult<Organization>, ArrayOptions<Organization>> | Endpoint<"GET", "/organizations/:organizationSlug", Organization> | Endpoint<"POST", "/organizations", Organization, CreateOrganizationDto> | Endpoint<"PUT", "/organizations/:organizationSlug", Organization, UpdateOrganizationDto> | Endpoint<"DELETE", "/organizations/:organizationSlug", Organization, null> | Endpoint<"POST", "/organizations/:organizationSlug/files/:organizationFileType", string, FormData> | Endpoint<"GET", "/organizations/:organizationSlug/billing/account", OrganizationBillingAccount> | Endpoint<"GET", "/organizations/:organizationSlug/billing/link", void> | Endpoint<"GET", "/organizations/:organizationSlug/billing/dashboard", void> | OrganizationEventEndpoints | OrganizationMembersEndpoints | OrganizationAnalyticsEndpoints;
1126
1190
 
1127
- declare enum ProfileType {
1128
- User = "user",
1129
- Organization = "organization"
1130
- }
1131
- type BaseProfile = {
1132
- type: ProfileType;
1133
- slug: string;
1134
- displayName: string;
1135
- description?: string;
1136
- avatarUrl?: string;
1137
- bannerUrl?: string;
1138
- links: string[];
1139
- metadata: ProfileMetadata;
1140
- createdAt: Date;
1141
- };
1142
- type UserProfile = BaseProfile & {
1143
- type: ProfileType.User;
1144
- metadata: UserProfileMetadata;
1145
- };
1146
- type OrganizationProfile = BaseProfile & {
1147
- type: ProfileType.Organization;
1148
- metadata: OrganizationProfileMetadata;
1149
- };
1150
- type Profile = UserProfile | OrganizationProfile;
1151
- type BaseProfileMetadata = {
1152
- followersCount: number;
1153
- isFollower: boolean;
1154
- isFollowing: boolean;
1155
- isBlocked: boolean;
1156
- hasBlocked: boolean;
1157
- canDM: boolean;
1158
- isOfficial: boolean;
1159
- };
1160
- type UserProfileMetadata = BaseProfileMetadata & {
1161
- hasPassPlus: boolean;
1162
- };
1163
- type OrganizationProfileMetadata = BaseProfileMetadata & {
1164
- eventsCount: number;
1165
- viewsCount: number;
1166
- membersCount: number;
1167
- };
1168
- type ProfileMetadata = UserProfileMetadata | OrganizationProfileMetadata;
1169
- type SearchProfilesOptions = ArrayOptions<Profile> & {
1170
- q: string;
1171
- };
1172
- type ProfileEndpoints = Endpoint<"GET", "/profiles", ArrayResult<Profile>, ArrayOptions<Profile>> | Endpoint<"GET", "/profiles/search", ArrayResult<Profile>, SearchProfilesOptions> | Endpoint<"GET", "/profiles/:username", Profile> | Endpoint<"GET", "/profiles/@me/relationships/suggestions", ArrayResult<Profile>, ArrayOptions<OrganizationProfile | UserProfile>> | Endpoint<"GET", "/profiles/:username/relationships/followers", ArrayResult<UserProfile>, ArrayOptions<UserProfile>> | Endpoint<"POST", "/profiles/:username/relationships/follow", boolean, null> | Endpoint<"POST", "/profiles/:username/relationships/unfollow", boolean, null>;
1173
-
1174
1191
  type WebhookEndpoints = Endpoint<"POST", "/webhooks/stripe", boolean, Stripe__default.Event>;
1175
1192
 
1176
1193
  type NotificationEndpoints = Endpoint<"POST", "/notifications/subscribe/beta", null, {
@@ -1523,6 +1540,7 @@ declare const users: (client: Client) => {
1523
1540
  get: (bookingId: string) => Promise<UserBooking>;
1524
1541
  me: () => Promise<ArrayResult<UserBooking>>;
1525
1542
  tickets: {
1543
+ get: (ticketId: string) => Promise<UserBookingTicket>;
1526
1544
  use: (ticketId: string, tokenId: string, tokenValue: string) => Promise<UserBookingTicket>;
1527
1545
  };
1528
1546
  };
@@ -1754,6 +1772,7 @@ declare class TonightPass {
1754
1772
  get: (bookingId: string) => Promise<UserBooking>;
1755
1773
  me: () => Promise<ArrayResult<UserBooking>>;
1756
1774
  tickets: {
1775
+ get: (ticketId: string) => Promise<UserBookingTicket>;
1757
1776
  use: (ticketId: string, tokenId: string, tokenValue: string) => Promise<UserBookingTicket>;
1758
1777
  };
1759
1778
  };
@@ -1953,4 +1972,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
1953
1972
  client: ChannelWebSocketClient;
1954
1973
  };
1955
1974
 
1956
- export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, type AuthMethod, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CacheEntry, CacheManager, type CacheOptions, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, type CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type FeedEndpoints, type FeedPost, FeedType, type GeoPoint, GeoPointDto, type GeoSearchAggregation, GoogleOneTapDto, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, OAuth2Provider, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventCalendar, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, type SearchOrganizationEventsOptions, type SearchProfilesOptions, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, type UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, UpdateUserPostCommentDto, UpdateUserPostDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserOAuthProvider, type UserPost, type UserPostComment, type UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, type UserPostViewEndpoints, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, auth, buildFileFormData, careers, channels, channelsWS, currencies, feed, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
1975
+ export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, type AuthMethod, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CacheEntry, CacheManager, type CacheOptions, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, type CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type FeedEndpoints, type FeedPost, FeedType, type GeoPoint, GeoPointDto, type GeoSearchAggregation, GoogleOneTapDto, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, OAuth2Provider, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventCalendar, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, type SearchOrganizationEventsOptions, type SearchProfilesOptions, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, type UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, UpdateUserPostCommentDto, UpdateUserPostDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingTicketEndpoints, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserCustomer, type UserCustomerMetadata, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserOAuthProvider, type UserPost, type UserPostComment, type UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, type UserPostViewEndpoints, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, auth, buildFileFormData, careers, channels, channelsWS, currencies, feed, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };