tonightpass 0.0.253 → 0.0.255

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
@@ -182,6 +182,30 @@ type CurrencyConversionResult = {
182
182
  };
183
183
  type CurrenciesEndpoints = Endpoint<"GET", "/currencies/rates", ExchangeRates> | Endpoint<"POST", "/currencies/convert", CurrencyConversionResult, CurrencyConversion>;
184
184
 
185
+ type OrganizationEventPromoCode = Base & {
186
+ code: string;
187
+ type: OrganizationEventPromoCodeType;
188
+ value: number;
189
+ maxUses?: number;
190
+ usedCount: number;
191
+ isActive: boolean;
192
+ minCartAmount?: number;
193
+ expiresAt?: Date;
194
+ ticketIds?: string[];
195
+ };
196
+ declare enum OrganizationEventPromoCodeType {
197
+ Percentage = "percentage",
198
+ Fixed = "fixed"
199
+ }
200
+ type OrganizationEventPromoCodeValidation = {
201
+ valid: boolean;
202
+ promoCode?: OrganizationEventPromoCode;
203
+ message?: string;
204
+ };
205
+ type OrganizationEventPromoCodeEndpoints = Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug/promo-codes", ArrayResult<OrganizationEventPromoCode>, ArrayOptions<OrganizationEventPromoCode>> | Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/promo-codes", OrganizationEventPromoCode, CreateOrganizationEventPromoCodeDto> | Endpoint<"PUT", "/organizations/@:organizationSlug/events/:eventSlug/promo-codes/:promoCodeId", OrganizationEventPromoCode, UpdateOrganizationEventPromoCodeDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug/events/:eventSlug/promo-codes/:promoCodeId", OrganizationEventPromoCode, null> | Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/promo-codes/validate", OrganizationEventPromoCodeValidation, {
206
+ code: string;
207
+ }>;
208
+
185
209
  type OrderItem = {
186
210
  ticketId: string;
187
211
  ticketName: string;
@@ -194,11 +218,18 @@ declare enum OrderTransferStatus {
194
218
  Pending = "pending",
195
219
  Transferred = "transferred"
196
220
  }
221
+ type OrderDiscount = {
222
+ code: string;
223
+ type: OrganizationEventPromoCodeType;
224
+ value: number;
225
+ amount: number;
226
+ };
197
227
  type Order = Base & {
198
228
  paymentIntent: Stripe__default.PaymentIntent;
199
229
  items: OrderItem[];
200
230
  currency: Currency;
201
231
  subtotal: number;
232
+ discount?: OrderDiscount;
202
233
  fee: number;
203
234
  total: number;
204
235
  transferStatus: OrderTransferStatus;
@@ -895,7 +926,7 @@ type SearchOrganizationEventsOptions = ArrayOptions<OrganizationEvent> & {
895
926
  type OrganizationEventCalendar = {
896
927
  [date: string]: OrganizationEvent[];
897
928
  };
898
- type OrganizationEventEndpoints = Endpoint<"GET", "/organizations/events/search", ArrayResult<OrganizationEvent>, SearchOrganizationEventsOptions> | Endpoint<"GET", "/organizations/events/calendar/:year/:month", OrganizationEventCalendar> | Endpoint<"GET", "/organizations/events", ArrayResult<OrganizationEvent>, OrganizationEventArrayOptions> | Endpoint<"GET", "/organizations/events/suggestions", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/events/nearby", ArrayResult<OrganizationEvent>, OrganizationEventNearbyOptions> | Endpoint<"GET", "/organizations/@:organizationSlug/events", ArrayResult<OrganizationEvent>, OrganizationEventArrayOptions> | Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug", OrganizationEvent> | Endpoint<"POST", "/organizations/@:organizationSlug/events", OrganizationEvent, CreateOrganizationEventDto> | Endpoint<"PUT", "/organizations/@:organizationSlug/events/:eventSlug", OrganizationEvent, UpdateOrganizationEventDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug/events/:eventSlug", OrganizationEvent, null> | Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/files/:eventFileType", string, FormData> | Endpoint<"POST", "/events/files/:eventFileType", string, FormData> | Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/request", OrganizationEventRequestResponse> | OrganizationEventOrderEndpoints | OrganizationEventStyleEndpoints | OrganizationEventTicketEndpoints | OrganizationEventViewEndpoints;
929
+ type OrganizationEventEndpoints = Endpoint<"GET", "/organizations/events/search", ArrayResult<OrganizationEvent>, SearchOrganizationEventsOptions> | Endpoint<"GET", "/organizations/events/calendar/:year/:month", OrganizationEventCalendar> | Endpoint<"GET", "/organizations/events", ArrayResult<OrganizationEvent>, OrganizationEventArrayOptions> | Endpoint<"GET", "/organizations/events/suggestions", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/events/nearby", ArrayResult<OrganizationEvent>, OrganizationEventNearbyOptions> | Endpoint<"GET", "/organizations/@:organizationSlug/events", ArrayResult<OrganizationEvent>, OrganizationEventArrayOptions> | Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug", OrganizationEvent> | Endpoint<"POST", "/organizations/@:organizationSlug/events", OrganizationEvent, CreateOrganizationEventDto> | Endpoint<"PUT", "/organizations/@:organizationSlug/events/:eventSlug", OrganizationEvent, UpdateOrganizationEventDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug/events/:eventSlug", OrganizationEvent, null> | Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/files/:eventFileType", string, FormData> | Endpoint<"POST", "/events/files/:eventFileType", string, FormData> | Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/request", OrganizationEventRequestResponse> | OrganizationEventOrderEndpoints | OrganizationEventPromoCodeEndpoints | OrganizationEventStyleEndpoints | OrganizationEventTicketEndpoints | OrganizationEventViewEndpoints;
899
930
 
900
931
  type OrganizationAnalyticsOverview = {
901
932
  metrics: {
@@ -965,7 +996,7 @@ type OrganizationCustomersEndpoints = Endpoint<"GET", "/organizations/@:organiza
965
996
  type OrganizationOrder = Omit<Order, "user"> & {
966
997
  customer: OrganizationCustomer;
967
998
  };
968
- type OrganizationOrdersEndpoints = Endpoint<"GET", "/organizations/@:organizationSlug/orders", ArrayResult<OrganizationOrder>, ArrayOptions<OrganizationOrder>> | Endpoint<"GET", "/organizations/@:organizationSlug/orders/:orderId", OrganizationOrder> | Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug/orders", ArrayResult<OrganizationOrder>, ArrayOptions<OrganizationOrder>>;
999
+ type OrganizationOrdersEndpoints = Endpoint<"GET", "/organizations/@:organizationSlug/orders", ArrayResult<OrganizationOrder>, ArrayOptions<OrganizationOrder>> | Endpoint<"GET", "/organizations/@:organizationSlug/orders/:orderId", OrganizationOrder> | Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug/orders", ArrayResult<OrganizationOrder>, ArrayOptions<OrganizationOrder>> | Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug/participants", ArrayResult<OrganizationCustomer>, ArrayOptions<OrganizationCustomer>>;
969
1000
 
970
1001
  type OrganizationToken = Omit<Base, "updatedAt"> & {
971
1002
  type: OrganizationTokenType;
@@ -1360,6 +1391,7 @@ declare class CreateOrganizationEventTicketDto implements CreateOrganizationEven
1360
1391
  }
1361
1392
 
1362
1393
  declare class UpdateOrganizationEventTicketDto implements DeepPartial<CreateOrganizationEventTicketInput> {
1394
+ id?: string;
1363
1395
  name?: string;
1364
1396
  description?: string;
1365
1397
  price?: number;
@@ -1402,6 +1434,29 @@ declare class CreateOrganizationEventDto extends BaseOrganizationEventDto implem
1402
1434
 
1403
1435
  declare class CreateOrganizationEventOrderDto {
1404
1436
  cart: string[];
1437
+ promoCode?: string;
1438
+ }
1439
+
1440
+ declare class CreateOrganizationEventPromoCodeDto {
1441
+ code: string;
1442
+ type: OrganizationEventPromoCodeType;
1443
+ value: number;
1444
+ maxUses?: number;
1445
+ isActive?: boolean;
1446
+ minCartAmount?: number;
1447
+ expiresAt?: Date;
1448
+ ticketIds?: string[];
1449
+ }
1450
+
1451
+ declare class UpdateOrganizationEventPromoCodeDto {
1452
+ code?: string;
1453
+ type?: OrganizationEventPromoCodeType;
1454
+ value?: number;
1455
+ maxUses?: number;
1456
+ isActive?: boolean;
1457
+ minCartAmount?: number;
1458
+ expiresAt?: Date;
1459
+ ticketIds?: string[];
1405
1460
  }
1406
1461
 
1407
1462
  declare class AtLeastOneMediaOnUpdateConstraint implements ValidatorConstraintInterface {
@@ -1786,7 +1841,57 @@ declare const orders: (client: Client) => {
1786
1841
  get: (orderId: string) => Promise<Order>;
1787
1842
  };
1788
1843
 
1844
+ type StripeFees = {
1845
+ transactionFee: number;
1846
+ europeRate: number;
1847
+ nonEuropeRate: number;
1848
+ connectRate: number;
1849
+ };
1850
+ type TonightPassFees = {
1851
+ percentage: number;
1852
+ minimumCommission: number;
1853
+ };
1854
+ declare enum BillingLocality {
1855
+ Europe = "Europe",
1856
+ NonEurope = "Non Europe"
1857
+ }
1858
+ type BillingParameters = {
1859
+ locality: BillingLocality;
1860
+ };
1861
+ /**
1862
+ * Minimum commission TonightPass charges per ticket (in euros).
1863
+ */
1864
+ declare const MINIMUM_COMMISSION = 0.95;
1865
+ /**
1866
+ * Minimum amount (in cents) that can be charged via Stripe.
1867
+ * Below this threshold, the order total is rounded up to this value
1868
+ * so the platform fee is always covered.
1869
+ * Derived from MINIMUM_COMMISSION.
1870
+ */
1871
+ declare const MINIMUM_CHARGEABLE_AMOUNT: number;
1872
+ declare const DEFAULT_STRIPE_FEES: StripeFees;
1873
+ declare const DEFAULT_TONIGHTPASS_FEES: TonightPassFees;
1874
+ declare const DEFAULT_BILLING_PARAMETERS: BillingParameters;
1875
+ /**
1876
+ * Calculate the platform fee for a ticket (in cents).
1877
+ * @param ticketPrice - Ticket price in cents
1878
+ * @param isFeesIncluded - Whether fees are included in the ticket price
1879
+ * @param stripeFees - Stripe fee configuration
1880
+ * @param tonightPassFees - TonightPass fee configuration
1881
+ * @param params - Billing parameters (locality)
1882
+ * @returns Fee amount in cents
1883
+ */
1884
+ declare function calculateTicketFee(ticketPrice: number, isFeesIncluded: boolean, stripeFees?: StripeFees, tonightPassFees?: TonightPassFees, params?: BillingParameters): number;
1885
+ /**
1886
+ * Applies the minimum chargeable amount rule after a discount.
1887
+ * - If total is 0 → stays 0 (free order)
1888
+ * - If total is between 1 and MINIMUM_CHARGEABLE_AMOUNT-1 → rounds up to MINIMUM_CHARGEABLE_AMOUNT
1889
+ * - Otherwise → unchanged
1890
+ */
1891
+ declare function applyMinimumChargeableAmount(total: number): number;
1892
+
1789
1893
  declare const isBrowser: boolean;
1894
+
1790
1895
  /**
1791
1896
  * File object with uri/name/type structure
1792
1897
  */
@@ -1802,6 +1907,7 @@ type FileObject = {
1802
1907
  * @returns FormData object with the file(s) appended
1803
1908
  */
1804
1909
  declare function buildFileFormData(key: string, files: File | File[] | FileList | FileObject | FileObject[]): FormData;
1910
+
1805
1911
  /**
1806
1912
  * Check if a member role has at least the specified minimum role level
1807
1913
  * @param memberRole - The member's current role
@@ -1841,6 +1947,13 @@ declare const organizations: (client: Client) => {
1841
1947
  orders: {
1842
1948
  create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventOrderDto) => Promise<Order>;
1843
1949
  };
1950
+ promoCodes: {
1951
+ getAll: (organizationSlug: string, eventSlug: string, options?: ArrayOptions<OrganizationEventPromoCode>) => Promise<ArrayResult<OrganizationEventPromoCode>>;
1952
+ create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventPromoCodeDto) => Promise<OrganizationEventPromoCode>;
1953
+ update: (organizationSlug: string, eventSlug: string, promoCodeId: string, data: UpdateOrganizationEventPromoCodeDto) => Promise<OrganizationEventPromoCode>;
1954
+ delete: (organizationSlug: string, eventSlug: string, promoCodeId: string) => Promise<OrganizationEventPromoCode>;
1955
+ validate: (organizationSlug: string, eventSlug: string, code: string) => Promise<OrganizationEventPromoCodeValidation>;
1956
+ };
1844
1957
  styles: {
1845
1958
  getAll: (query?: pathcat.Query<"/organizations/events/styles">) => Promise<ArrayResult<OrganizationEventStyle>>;
1846
1959
  get: (styleSlug: string) => Promise<OrganizationEventStyle>;
@@ -1880,9 +1993,11 @@ declare const organizations: (client: Client) => {
1880
1993
  get: (organizationSlug: string, username: string) => Promise<OrganizationCustomer>;
1881
1994
  };
1882
1995
  orders: {
1883
- getAll: (organizationSlug: string) => Promise<ArrayResult<OrganizationOrder>>;
1884
- get: (organizationSlug: string, orderId: string) => Promise<OrganizationOrder>;
1885
- getAllByEvent: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<OrganizationOrder>>;
1996
+ getAll: (query?: pathcat.Query<"/organizations/@:organizationSlug/orders">) => Promise<ArrayResult<OrganizationOrder>>;
1997
+ get: (query: pathcat.Query<"/organizations/@:organizationSlug/orders/:orderId">) => Promise<OrganizationOrder>;
1998
+ getAllByEvent: (query?: pathcat.Query<"/organizations/@:organizationSlug/events/:eventSlug/orders">) => Promise<ArrayResult<OrganizationOrder>>;
1999
+ getBookingsByEvent: (query?: pathcat.Query<"/organizations/@:organizationSlug/events/:eventSlug/bookings">) => Promise<ArrayResult<UserBooking>>;
2000
+ getParticipantsByEvent: (query?: pathcat.Query<"/organizations/@:organizationSlug/events/:eventSlug/participants">) => Promise<ArrayResult<OrganizationCustomer>>;
1886
2001
  };
1887
2002
  };
1888
2003
 
@@ -2112,6 +2227,13 @@ declare class TonightPass {
2112
2227
  orders: {
2113
2228
  create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventOrderDto) => Promise<Order>;
2114
2229
  };
2230
+ promoCodes: {
2231
+ getAll: (organizationSlug: string, eventSlug: string, options?: ArrayOptions<OrganizationEventPromoCode>) => Promise<ArrayResult<OrganizationEventPromoCode>>;
2232
+ create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventPromoCodeDto) => Promise<OrganizationEventPromoCode>;
2233
+ update: (organizationSlug: string, eventSlug: string, promoCodeId: string, data: UpdateOrganizationEventPromoCodeDto) => Promise<OrganizationEventPromoCode>;
2234
+ delete: (organizationSlug: string, eventSlug: string, promoCodeId: string) => Promise<OrganizationEventPromoCode>;
2235
+ validate: (organizationSlug: string, eventSlug: string, code: string) => Promise<OrganizationEventPromoCodeValidation>;
2236
+ };
2115
2237
  styles: {
2116
2238
  getAll: (query?: pathcat.Query<"/organizations/events/styles">) => Promise<ArrayResult<OrganizationEventStyle>>;
2117
2239
  get: (styleSlug: string) => Promise<OrganizationEventStyle>;
@@ -2151,9 +2273,11 @@ declare class TonightPass {
2151
2273
  get: (organizationSlug: string, username: string) => Promise<OrganizationCustomer>;
2152
2274
  };
2153
2275
  orders: {
2154
- getAll: (organizationSlug: string) => Promise<ArrayResult<OrganizationOrder>>;
2155
- get: (organizationSlug: string, orderId: string) => Promise<OrganizationOrder>;
2156
- getAllByEvent: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<OrganizationOrder>>;
2276
+ getAll: (query?: pathcat.Query<"/organizations/@:organizationSlug/orders">) => Promise<ArrayResult<OrganizationOrder>>;
2277
+ get: (query: pathcat.Query<"/organizations/@:organizationSlug/orders/:orderId">) => Promise<OrganizationOrder>;
2278
+ getAllByEvent: (query?: pathcat.Query<"/organizations/@:organizationSlug/events/:eventSlug/orders">) => Promise<ArrayResult<OrganizationOrder>>;
2279
+ getBookingsByEvent: (query?: pathcat.Query<"/organizations/@:organizationSlug/events/:eventSlug/bookings">) => Promise<ArrayResult<UserBooking>>;
2280
+ getParticipantsByEvent: (query?: pathcat.Query<"/organizations/@:organizationSlug/events/:eventSlug/participants">) => Promise<ArrayResult<OrganizationCustomer>>;
2157
2281
  };
2158
2282
  };
2159
2283
  readonly places: {
@@ -2405,4 +2529,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
2405
2529
  client: ChannelWebSocketClient;
2406
2530
  };
2407
2531
 
2408
- export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AddRoadmapReactionBody, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, ApiKeyType, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, AuthFlow, type AuthMethod, type AuthResponse, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CacheEntry, CacheManager, type CacheOptions, type CacheStore, type CareerEndpoints, type CareersCategoriesOptions, type CareersCategory, type CareersEmploymentType, type CareersEmploymentTypesOptions, type CareersJob, CareersJobStatus, type CareersJobsOptions, type CareersOffice, type CareersOfficesOptions, CareersRemoteType, CareersWorkplaceType, 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, 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 ExternalContact, type ExternalOffer, type ExternalSource, type FeedEndpoints, type FeedPost, FeedType, type FileObject, type GeoPoint, GeoPointDto, type GeoSearchAggregation, GoogleOneTapDto, type Health, type HealthEndpoints, type HealthMemory, Language, type Location$1 as Location, MemoryCacheStore, type MemorySnapshot, type NearbyCitiesOptions, type NotificationEndpoints, OAuth2Provider, type Order, type OrderEndpoints, type OrderItem, OrderTransferStatus, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationBillingBalance, type OrganizationBillingPendingRevenue, type OrganizationCustomer, type OrganizationCustomerMetadata, type OrganizationCustomersEndpoints, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventCalendar, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventNearbyOptions, type OrganizationEventOrderEndpoints, type OrganizationEventRequestResponse, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, type OrganizationEventViewEndpoints, type OrganizationEventViewOptions, type OrganizationEventViewResult, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberRolePower, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationOrder, type OrganizationOrdersEndpoints, OrganizationPayoutStatus, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type PlaceCity, type PlaceCountry, type PlaceEndpoints, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type ProxyEndpoints, type ProxyMediaOptions, type ProxyMediaResponse, type QueryParams, REGEX, ROADMAP_REACTIONS, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, type RoadmapEndpoints, type RoadmapFeature, RoadmapFeatureStatus, type RoadmapReaction, type RoadmapReactionCounts, type SSEEndpoints, type SearchOrganizationEventsOptions, type SearchPlacesOptions, type SearchProfilesOptions, SignInUserDto, type SitemapCounts, type SitemapEndpoints, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, 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, type UserPostViewOptions, type UserPostViewResult, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, UserRolePower, type UserToken, UserTokenType, VerifyEmailConfirmDto, type VerifyEmailResponse, 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, isMemberRoleAtLeast, normalizeAddress, notifications, orders, organizations, places, profiles, request, roadmap, sdk, sitemaps, users };
2532
+ export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AddRoadmapReactionBody, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, ApiKeyType, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, AuthFlow, type AuthMethod, type AuthResponse, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, BillingLocality, type BillingParameters, type Body, type CacheEntry, CacheManager, type CacheOptions, type CacheStore, type CareerEndpoints, type CareersCategoriesOptions, type CareersCategory, type CareersEmploymentType, type CareersEmploymentTypesOptions, type CareersJob, CareersJobStatus, type CareersJobsOptions, type CareersOffice, type CareersOfficesOptions, CareersRemoteType, CareersWorkplaceType, 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, CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventPromoCodeDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, DEFAULT_BILLING_PARAMETERS, DEFAULT_STRIPE_FEES, DEFAULT_TONIGHTPASS_FEES, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type ExternalContact, type ExternalOffer, type ExternalSource, type FeedEndpoints, type FeedPost, FeedType, type FileObject, type GeoPoint, GeoPointDto, type GeoSearchAggregation, GoogleOneTapDto, type Health, type HealthEndpoints, type HealthMemory, Language, type Location$1 as Location, MINIMUM_CHARGEABLE_AMOUNT, MINIMUM_COMMISSION, MemoryCacheStore, type MemorySnapshot, type NearbyCitiesOptions, type NotificationEndpoints, OAuth2Provider, type Order, type OrderDiscount, type OrderEndpoints, type OrderItem, OrderTransferStatus, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationBillingBalance, type OrganizationBillingPendingRevenue, type OrganizationCustomer, type OrganizationCustomerMetadata, type OrganizationCustomersEndpoints, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventCalendar, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventNearbyOptions, type OrganizationEventOrderEndpoints, type OrganizationEventPromoCode, type OrganizationEventPromoCodeEndpoints, OrganizationEventPromoCodeType, type OrganizationEventPromoCodeValidation, type OrganizationEventRequestResponse, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, type OrganizationEventViewEndpoints, type OrganizationEventViewOptions, type OrganizationEventViewResult, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberRolePower, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationOrder, type OrganizationOrdersEndpoints, OrganizationPayoutStatus, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type PlaceCity, type PlaceCountry, type PlaceEndpoints, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type ProxyEndpoints, type ProxyMediaOptions, type ProxyMediaResponse, type QueryParams, REGEX, ROADMAP_REACTIONS, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, type RoadmapEndpoints, type RoadmapFeature, RoadmapFeatureStatus, type RoadmapReaction, type RoadmapReactionCounts, type SSEEndpoints, type SearchOrganizationEventsOptions, type SearchPlacesOptions, type SearchProfilesOptions, SignInUserDto, type SitemapCounts, type SitemapEndpoints, type StringifiedQuery, type StringifiedQueryValue, type StripeFees, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TonightPassFees, type TypingStartEvent, type TypingStopEvent, UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventPromoCodeDto, 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, type UserPostViewOptions, type UserPostViewResult, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, UserRolePower, type UserToken, UserTokenType, VerifyEmailConfirmDto, type VerifyEmailResponse, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, applyMinimumChargeableAmount, auth, buildFileFormData, calculateTicketFee, careers, channels, channelsWS, currencies, feed, health, isBrowser, isMemberRoleAtLeast, normalizeAddress, notifications, orders, organizations, places, profiles, request, roadmap, sdk, sitemaps, users };
package/dist/index.d.ts CHANGED
@@ -182,6 +182,30 @@ type CurrencyConversionResult = {
182
182
  };
183
183
  type CurrenciesEndpoints = Endpoint<"GET", "/currencies/rates", ExchangeRates> | Endpoint<"POST", "/currencies/convert", CurrencyConversionResult, CurrencyConversion>;
184
184
 
185
+ type OrganizationEventPromoCode = Base & {
186
+ code: string;
187
+ type: OrganizationEventPromoCodeType;
188
+ value: number;
189
+ maxUses?: number;
190
+ usedCount: number;
191
+ isActive: boolean;
192
+ minCartAmount?: number;
193
+ expiresAt?: Date;
194
+ ticketIds?: string[];
195
+ };
196
+ declare enum OrganizationEventPromoCodeType {
197
+ Percentage = "percentage",
198
+ Fixed = "fixed"
199
+ }
200
+ type OrganizationEventPromoCodeValidation = {
201
+ valid: boolean;
202
+ promoCode?: OrganizationEventPromoCode;
203
+ message?: string;
204
+ };
205
+ type OrganizationEventPromoCodeEndpoints = Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug/promo-codes", ArrayResult<OrganizationEventPromoCode>, ArrayOptions<OrganizationEventPromoCode>> | Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/promo-codes", OrganizationEventPromoCode, CreateOrganizationEventPromoCodeDto> | Endpoint<"PUT", "/organizations/@:organizationSlug/events/:eventSlug/promo-codes/:promoCodeId", OrganizationEventPromoCode, UpdateOrganizationEventPromoCodeDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug/events/:eventSlug/promo-codes/:promoCodeId", OrganizationEventPromoCode, null> | Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/promo-codes/validate", OrganizationEventPromoCodeValidation, {
206
+ code: string;
207
+ }>;
208
+
185
209
  type OrderItem = {
186
210
  ticketId: string;
187
211
  ticketName: string;
@@ -194,11 +218,18 @@ declare enum OrderTransferStatus {
194
218
  Pending = "pending",
195
219
  Transferred = "transferred"
196
220
  }
221
+ type OrderDiscount = {
222
+ code: string;
223
+ type: OrganizationEventPromoCodeType;
224
+ value: number;
225
+ amount: number;
226
+ };
197
227
  type Order = Base & {
198
228
  paymentIntent: Stripe__default.PaymentIntent;
199
229
  items: OrderItem[];
200
230
  currency: Currency;
201
231
  subtotal: number;
232
+ discount?: OrderDiscount;
202
233
  fee: number;
203
234
  total: number;
204
235
  transferStatus: OrderTransferStatus;
@@ -895,7 +926,7 @@ type SearchOrganizationEventsOptions = ArrayOptions<OrganizationEvent> & {
895
926
  type OrganizationEventCalendar = {
896
927
  [date: string]: OrganizationEvent[];
897
928
  };
898
- type OrganizationEventEndpoints = Endpoint<"GET", "/organizations/events/search", ArrayResult<OrganizationEvent>, SearchOrganizationEventsOptions> | Endpoint<"GET", "/organizations/events/calendar/:year/:month", OrganizationEventCalendar> | Endpoint<"GET", "/organizations/events", ArrayResult<OrganizationEvent>, OrganizationEventArrayOptions> | Endpoint<"GET", "/organizations/events/suggestions", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/events/nearby", ArrayResult<OrganizationEvent>, OrganizationEventNearbyOptions> | Endpoint<"GET", "/organizations/@:organizationSlug/events", ArrayResult<OrganizationEvent>, OrganizationEventArrayOptions> | Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug", OrganizationEvent> | Endpoint<"POST", "/organizations/@:organizationSlug/events", OrganizationEvent, CreateOrganizationEventDto> | Endpoint<"PUT", "/organizations/@:organizationSlug/events/:eventSlug", OrganizationEvent, UpdateOrganizationEventDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug/events/:eventSlug", OrganizationEvent, null> | Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/files/:eventFileType", string, FormData> | Endpoint<"POST", "/events/files/:eventFileType", string, FormData> | Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/request", OrganizationEventRequestResponse> | OrganizationEventOrderEndpoints | OrganizationEventStyleEndpoints | OrganizationEventTicketEndpoints | OrganizationEventViewEndpoints;
929
+ type OrganizationEventEndpoints = Endpoint<"GET", "/organizations/events/search", ArrayResult<OrganizationEvent>, SearchOrganizationEventsOptions> | Endpoint<"GET", "/organizations/events/calendar/:year/:month", OrganizationEventCalendar> | Endpoint<"GET", "/organizations/events", ArrayResult<OrganizationEvent>, OrganizationEventArrayOptions> | Endpoint<"GET", "/organizations/events/suggestions", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/events/nearby", ArrayResult<OrganizationEvent>, OrganizationEventNearbyOptions> | Endpoint<"GET", "/organizations/@:organizationSlug/events", ArrayResult<OrganizationEvent>, OrganizationEventArrayOptions> | Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug", OrganizationEvent> | Endpoint<"POST", "/organizations/@:organizationSlug/events", OrganizationEvent, CreateOrganizationEventDto> | Endpoint<"PUT", "/organizations/@:organizationSlug/events/:eventSlug", OrganizationEvent, UpdateOrganizationEventDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug/events/:eventSlug", OrganizationEvent, null> | Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/files/:eventFileType", string, FormData> | Endpoint<"POST", "/events/files/:eventFileType", string, FormData> | Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/request", OrganizationEventRequestResponse> | OrganizationEventOrderEndpoints | OrganizationEventPromoCodeEndpoints | OrganizationEventStyleEndpoints | OrganizationEventTicketEndpoints | OrganizationEventViewEndpoints;
899
930
 
900
931
  type OrganizationAnalyticsOverview = {
901
932
  metrics: {
@@ -965,7 +996,7 @@ type OrganizationCustomersEndpoints = Endpoint<"GET", "/organizations/@:organiza
965
996
  type OrganizationOrder = Omit<Order, "user"> & {
966
997
  customer: OrganizationCustomer;
967
998
  };
968
- type OrganizationOrdersEndpoints = Endpoint<"GET", "/organizations/@:organizationSlug/orders", ArrayResult<OrganizationOrder>, ArrayOptions<OrganizationOrder>> | Endpoint<"GET", "/organizations/@:organizationSlug/orders/:orderId", OrganizationOrder> | Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug/orders", ArrayResult<OrganizationOrder>, ArrayOptions<OrganizationOrder>>;
999
+ type OrganizationOrdersEndpoints = Endpoint<"GET", "/organizations/@:organizationSlug/orders", ArrayResult<OrganizationOrder>, ArrayOptions<OrganizationOrder>> | Endpoint<"GET", "/organizations/@:organizationSlug/orders/:orderId", OrganizationOrder> | Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug/orders", ArrayResult<OrganizationOrder>, ArrayOptions<OrganizationOrder>> | Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/organizations/@:organizationSlug/events/:eventSlug/participants", ArrayResult<OrganizationCustomer>, ArrayOptions<OrganizationCustomer>>;
969
1000
 
970
1001
  type OrganizationToken = Omit<Base, "updatedAt"> & {
971
1002
  type: OrganizationTokenType;
@@ -1360,6 +1391,7 @@ declare class CreateOrganizationEventTicketDto implements CreateOrganizationEven
1360
1391
  }
1361
1392
 
1362
1393
  declare class UpdateOrganizationEventTicketDto implements DeepPartial<CreateOrganizationEventTicketInput> {
1394
+ id?: string;
1363
1395
  name?: string;
1364
1396
  description?: string;
1365
1397
  price?: number;
@@ -1402,6 +1434,29 @@ declare class CreateOrganizationEventDto extends BaseOrganizationEventDto implem
1402
1434
 
1403
1435
  declare class CreateOrganizationEventOrderDto {
1404
1436
  cart: string[];
1437
+ promoCode?: string;
1438
+ }
1439
+
1440
+ declare class CreateOrganizationEventPromoCodeDto {
1441
+ code: string;
1442
+ type: OrganizationEventPromoCodeType;
1443
+ value: number;
1444
+ maxUses?: number;
1445
+ isActive?: boolean;
1446
+ minCartAmount?: number;
1447
+ expiresAt?: Date;
1448
+ ticketIds?: string[];
1449
+ }
1450
+
1451
+ declare class UpdateOrganizationEventPromoCodeDto {
1452
+ code?: string;
1453
+ type?: OrganizationEventPromoCodeType;
1454
+ value?: number;
1455
+ maxUses?: number;
1456
+ isActive?: boolean;
1457
+ minCartAmount?: number;
1458
+ expiresAt?: Date;
1459
+ ticketIds?: string[];
1405
1460
  }
1406
1461
 
1407
1462
  declare class AtLeastOneMediaOnUpdateConstraint implements ValidatorConstraintInterface {
@@ -1786,7 +1841,57 @@ declare const orders: (client: Client) => {
1786
1841
  get: (orderId: string) => Promise<Order>;
1787
1842
  };
1788
1843
 
1844
+ type StripeFees = {
1845
+ transactionFee: number;
1846
+ europeRate: number;
1847
+ nonEuropeRate: number;
1848
+ connectRate: number;
1849
+ };
1850
+ type TonightPassFees = {
1851
+ percentage: number;
1852
+ minimumCommission: number;
1853
+ };
1854
+ declare enum BillingLocality {
1855
+ Europe = "Europe",
1856
+ NonEurope = "Non Europe"
1857
+ }
1858
+ type BillingParameters = {
1859
+ locality: BillingLocality;
1860
+ };
1861
+ /**
1862
+ * Minimum commission TonightPass charges per ticket (in euros).
1863
+ */
1864
+ declare const MINIMUM_COMMISSION = 0.95;
1865
+ /**
1866
+ * Minimum amount (in cents) that can be charged via Stripe.
1867
+ * Below this threshold, the order total is rounded up to this value
1868
+ * so the platform fee is always covered.
1869
+ * Derived from MINIMUM_COMMISSION.
1870
+ */
1871
+ declare const MINIMUM_CHARGEABLE_AMOUNT: number;
1872
+ declare const DEFAULT_STRIPE_FEES: StripeFees;
1873
+ declare const DEFAULT_TONIGHTPASS_FEES: TonightPassFees;
1874
+ declare const DEFAULT_BILLING_PARAMETERS: BillingParameters;
1875
+ /**
1876
+ * Calculate the platform fee for a ticket (in cents).
1877
+ * @param ticketPrice - Ticket price in cents
1878
+ * @param isFeesIncluded - Whether fees are included in the ticket price
1879
+ * @param stripeFees - Stripe fee configuration
1880
+ * @param tonightPassFees - TonightPass fee configuration
1881
+ * @param params - Billing parameters (locality)
1882
+ * @returns Fee amount in cents
1883
+ */
1884
+ declare function calculateTicketFee(ticketPrice: number, isFeesIncluded: boolean, stripeFees?: StripeFees, tonightPassFees?: TonightPassFees, params?: BillingParameters): number;
1885
+ /**
1886
+ * Applies the minimum chargeable amount rule after a discount.
1887
+ * - If total is 0 → stays 0 (free order)
1888
+ * - If total is between 1 and MINIMUM_CHARGEABLE_AMOUNT-1 → rounds up to MINIMUM_CHARGEABLE_AMOUNT
1889
+ * - Otherwise → unchanged
1890
+ */
1891
+ declare function applyMinimumChargeableAmount(total: number): number;
1892
+
1789
1893
  declare const isBrowser: boolean;
1894
+
1790
1895
  /**
1791
1896
  * File object with uri/name/type structure
1792
1897
  */
@@ -1802,6 +1907,7 @@ type FileObject = {
1802
1907
  * @returns FormData object with the file(s) appended
1803
1908
  */
1804
1909
  declare function buildFileFormData(key: string, files: File | File[] | FileList | FileObject | FileObject[]): FormData;
1910
+
1805
1911
  /**
1806
1912
  * Check if a member role has at least the specified minimum role level
1807
1913
  * @param memberRole - The member's current role
@@ -1841,6 +1947,13 @@ declare const organizations: (client: Client) => {
1841
1947
  orders: {
1842
1948
  create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventOrderDto) => Promise<Order>;
1843
1949
  };
1950
+ promoCodes: {
1951
+ getAll: (organizationSlug: string, eventSlug: string, options?: ArrayOptions<OrganizationEventPromoCode>) => Promise<ArrayResult<OrganizationEventPromoCode>>;
1952
+ create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventPromoCodeDto) => Promise<OrganizationEventPromoCode>;
1953
+ update: (organizationSlug: string, eventSlug: string, promoCodeId: string, data: UpdateOrganizationEventPromoCodeDto) => Promise<OrganizationEventPromoCode>;
1954
+ delete: (organizationSlug: string, eventSlug: string, promoCodeId: string) => Promise<OrganizationEventPromoCode>;
1955
+ validate: (organizationSlug: string, eventSlug: string, code: string) => Promise<OrganizationEventPromoCodeValidation>;
1956
+ };
1844
1957
  styles: {
1845
1958
  getAll: (query?: pathcat.Query<"/organizations/events/styles">) => Promise<ArrayResult<OrganizationEventStyle>>;
1846
1959
  get: (styleSlug: string) => Promise<OrganizationEventStyle>;
@@ -1880,9 +1993,11 @@ declare const organizations: (client: Client) => {
1880
1993
  get: (organizationSlug: string, username: string) => Promise<OrganizationCustomer>;
1881
1994
  };
1882
1995
  orders: {
1883
- getAll: (organizationSlug: string) => Promise<ArrayResult<OrganizationOrder>>;
1884
- get: (organizationSlug: string, orderId: string) => Promise<OrganizationOrder>;
1885
- getAllByEvent: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<OrganizationOrder>>;
1996
+ getAll: (query?: pathcat.Query<"/organizations/@:organizationSlug/orders">) => Promise<ArrayResult<OrganizationOrder>>;
1997
+ get: (query: pathcat.Query<"/organizations/@:organizationSlug/orders/:orderId">) => Promise<OrganizationOrder>;
1998
+ getAllByEvent: (query?: pathcat.Query<"/organizations/@:organizationSlug/events/:eventSlug/orders">) => Promise<ArrayResult<OrganizationOrder>>;
1999
+ getBookingsByEvent: (query?: pathcat.Query<"/organizations/@:organizationSlug/events/:eventSlug/bookings">) => Promise<ArrayResult<UserBooking>>;
2000
+ getParticipantsByEvent: (query?: pathcat.Query<"/organizations/@:organizationSlug/events/:eventSlug/participants">) => Promise<ArrayResult<OrganizationCustomer>>;
1886
2001
  };
1887
2002
  };
1888
2003
 
@@ -2112,6 +2227,13 @@ declare class TonightPass {
2112
2227
  orders: {
2113
2228
  create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventOrderDto) => Promise<Order>;
2114
2229
  };
2230
+ promoCodes: {
2231
+ getAll: (organizationSlug: string, eventSlug: string, options?: ArrayOptions<OrganizationEventPromoCode>) => Promise<ArrayResult<OrganizationEventPromoCode>>;
2232
+ create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventPromoCodeDto) => Promise<OrganizationEventPromoCode>;
2233
+ update: (organizationSlug: string, eventSlug: string, promoCodeId: string, data: UpdateOrganizationEventPromoCodeDto) => Promise<OrganizationEventPromoCode>;
2234
+ delete: (organizationSlug: string, eventSlug: string, promoCodeId: string) => Promise<OrganizationEventPromoCode>;
2235
+ validate: (organizationSlug: string, eventSlug: string, code: string) => Promise<OrganizationEventPromoCodeValidation>;
2236
+ };
2115
2237
  styles: {
2116
2238
  getAll: (query?: pathcat.Query<"/organizations/events/styles">) => Promise<ArrayResult<OrganizationEventStyle>>;
2117
2239
  get: (styleSlug: string) => Promise<OrganizationEventStyle>;
@@ -2151,9 +2273,11 @@ declare class TonightPass {
2151
2273
  get: (organizationSlug: string, username: string) => Promise<OrganizationCustomer>;
2152
2274
  };
2153
2275
  orders: {
2154
- getAll: (organizationSlug: string) => Promise<ArrayResult<OrganizationOrder>>;
2155
- get: (organizationSlug: string, orderId: string) => Promise<OrganizationOrder>;
2156
- getAllByEvent: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<OrganizationOrder>>;
2276
+ getAll: (query?: pathcat.Query<"/organizations/@:organizationSlug/orders">) => Promise<ArrayResult<OrganizationOrder>>;
2277
+ get: (query: pathcat.Query<"/organizations/@:organizationSlug/orders/:orderId">) => Promise<OrganizationOrder>;
2278
+ getAllByEvent: (query?: pathcat.Query<"/organizations/@:organizationSlug/events/:eventSlug/orders">) => Promise<ArrayResult<OrganizationOrder>>;
2279
+ getBookingsByEvent: (query?: pathcat.Query<"/organizations/@:organizationSlug/events/:eventSlug/bookings">) => Promise<ArrayResult<UserBooking>>;
2280
+ getParticipantsByEvent: (query?: pathcat.Query<"/organizations/@:organizationSlug/events/:eventSlug/participants">) => Promise<ArrayResult<OrganizationCustomer>>;
2157
2281
  };
2158
2282
  };
2159
2283
  readonly places: {
@@ -2405,4 +2529,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
2405
2529
  client: ChannelWebSocketClient;
2406
2530
  };
2407
2531
 
2408
- export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AddRoadmapReactionBody, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, ApiKeyType, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, AuthFlow, type AuthMethod, type AuthResponse, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CacheEntry, CacheManager, type CacheOptions, type CacheStore, type CareerEndpoints, type CareersCategoriesOptions, type CareersCategory, type CareersEmploymentType, type CareersEmploymentTypesOptions, type CareersJob, CareersJobStatus, type CareersJobsOptions, type CareersOffice, type CareersOfficesOptions, CareersRemoteType, CareersWorkplaceType, 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, 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 ExternalContact, type ExternalOffer, type ExternalSource, type FeedEndpoints, type FeedPost, FeedType, type FileObject, type GeoPoint, GeoPointDto, type GeoSearchAggregation, GoogleOneTapDto, type Health, type HealthEndpoints, type HealthMemory, Language, type Location$1 as Location, MemoryCacheStore, type MemorySnapshot, type NearbyCitiesOptions, type NotificationEndpoints, OAuth2Provider, type Order, type OrderEndpoints, type OrderItem, OrderTransferStatus, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationBillingBalance, type OrganizationBillingPendingRevenue, type OrganizationCustomer, type OrganizationCustomerMetadata, type OrganizationCustomersEndpoints, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventCalendar, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventNearbyOptions, type OrganizationEventOrderEndpoints, type OrganizationEventRequestResponse, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, type OrganizationEventViewEndpoints, type OrganizationEventViewOptions, type OrganizationEventViewResult, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberRolePower, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationOrder, type OrganizationOrdersEndpoints, OrganizationPayoutStatus, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type PlaceCity, type PlaceCountry, type PlaceEndpoints, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type ProxyEndpoints, type ProxyMediaOptions, type ProxyMediaResponse, type QueryParams, REGEX, ROADMAP_REACTIONS, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, type RoadmapEndpoints, type RoadmapFeature, RoadmapFeatureStatus, type RoadmapReaction, type RoadmapReactionCounts, type SSEEndpoints, type SearchOrganizationEventsOptions, type SearchPlacesOptions, type SearchProfilesOptions, SignInUserDto, type SitemapCounts, type SitemapEndpoints, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, 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, type UserPostViewOptions, type UserPostViewResult, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, UserRolePower, type UserToken, UserTokenType, VerifyEmailConfirmDto, type VerifyEmailResponse, 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, isMemberRoleAtLeast, normalizeAddress, notifications, orders, organizations, places, profiles, request, roadmap, sdk, sitemaps, users };
2532
+ export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AddRoadmapReactionBody, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, ApiKeyType, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, AuthFlow, type AuthMethod, type AuthResponse, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, BillingLocality, type BillingParameters, type Body, type CacheEntry, CacheManager, type CacheOptions, type CacheStore, type CareerEndpoints, type CareersCategoriesOptions, type CareersCategory, type CareersEmploymentType, type CareersEmploymentTypesOptions, type CareersJob, CareersJobStatus, type CareersJobsOptions, type CareersOffice, type CareersOfficesOptions, CareersRemoteType, CareersWorkplaceType, 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, CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventPromoCodeDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, DEFAULT_BILLING_PARAMETERS, DEFAULT_STRIPE_FEES, DEFAULT_TONIGHTPASS_FEES, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type ExternalContact, type ExternalOffer, type ExternalSource, type FeedEndpoints, type FeedPost, FeedType, type FileObject, type GeoPoint, GeoPointDto, type GeoSearchAggregation, GoogleOneTapDto, type Health, type HealthEndpoints, type HealthMemory, Language, type Location$1 as Location, MINIMUM_CHARGEABLE_AMOUNT, MINIMUM_COMMISSION, MemoryCacheStore, type MemorySnapshot, type NearbyCitiesOptions, type NotificationEndpoints, OAuth2Provider, type Order, type OrderDiscount, type OrderEndpoints, type OrderItem, OrderTransferStatus, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationBillingBalance, type OrganizationBillingPendingRevenue, type OrganizationCustomer, type OrganizationCustomerMetadata, type OrganizationCustomersEndpoints, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventCalendar, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventNearbyOptions, type OrganizationEventOrderEndpoints, type OrganizationEventPromoCode, type OrganizationEventPromoCodeEndpoints, OrganizationEventPromoCodeType, type OrganizationEventPromoCodeValidation, type OrganizationEventRequestResponse, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, type OrganizationEventViewEndpoints, type OrganizationEventViewOptions, type OrganizationEventViewResult, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberRolePower, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationOrder, type OrganizationOrdersEndpoints, OrganizationPayoutStatus, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type PlaceCity, type PlaceCountry, type PlaceEndpoints, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type ProxyEndpoints, type ProxyMediaOptions, type ProxyMediaResponse, type QueryParams, REGEX, ROADMAP_REACTIONS, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, type RoadmapEndpoints, type RoadmapFeature, RoadmapFeatureStatus, type RoadmapReaction, type RoadmapReactionCounts, type SSEEndpoints, type SearchOrganizationEventsOptions, type SearchPlacesOptions, type SearchProfilesOptions, SignInUserDto, type SitemapCounts, type SitemapEndpoints, type StringifiedQuery, type StringifiedQueryValue, type StripeFees, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TonightPassFees, type TypingStartEvent, type TypingStopEvent, UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventPromoCodeDto, 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, type UserPostViewOptions, type UserPostViewResult, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, UserRolePower, type UserToken, UserTokenType, VerifyEmailConfirmDto, type VerifyEmailResponse, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, applyMinimumChargeableAmount, auth, buildFileFormData, calculateTicketFee, careers, channels, channelsWS, currencies, feed, health, isBrowser, isMemberRoleAtLeast, normalizeAddress, notifications, orders, organizations, places, profiles, request, roadmap, sdk, sitemaps, users };