@bookitive/js 0.1.6 → 0.1.7

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.ts CHANGED
@@ -75,6 +75,24 @@ interface DtoPublicCheckoutTheme {
75
75
  */
76
76
  radius?: string;
77
77
  }
78
+ interface DtoPublicDiscount {
79
+ /**
80
+ * Code is the normalized (uppercase) promo code.
81
+ * @example "EARLYBIRD"
82
+ */
83
+ code?: string;
84
+ /**
85
+ * Kind is how the discount applies: "percent" of the items subtotal, or a
86
+ * "fixed" amount in the event currency's minor units.
87
+ * @example "percent"
88
+ */
89
+ kind?: 'percent' | 'fixed';
90
+ /**
91
+ * Value is 1-100 for percent, minor units for fixed.
92
+ * @example 10
93
+ */
94
+ value?: number;
95
+ }
78
96
  interface DtoPublicEvent {
79
97
  /** Event is the event's public identity: name, times, venue, currency. */
80
98
  event?: DtoPublicEventInfo;
@@ -266,6 +284,11 @@ interface DtoPublicOrder {
266
284
  * @example "CZK"
267
285
  */
268
286
  currency?: string;
287
+ /**
288
+ * DiscountCents is what the redeemed promo code took off the total.
289
+ * @example 14900
290
+ */
291
+ discountCents?: number;
269
292
  /**
270
293
  * ExpiresAt is when the held seats and this order expire (RFC 3339).
271
294
  * @example "2026-06-20T18:15:00Z"
@@ -340,6 +363,14 @@ interface DtoPublicOrderRequest {
340
363
  captchaToken?: string;
341
364
  /** Customer is the buyer's contact details. */
342
365
  customer: DtoPublicOrderCustomer;
366
+ /**
367
+ * DiscountCode redeems a promo code (case-insensitive); the discount is
368
+ * applied to the items subtotal and enforced against the code's limits.
369
+ * @minLength 2
370
+ * @maxLength 40
371
+ * @example "EARLYBIRD"
372
+ */
373
+ discountCode?: string;
343
374
  /**
344
375
  * Items are the order lines; at least one is required.
345
376
  * @minItems 1
@@ -660,6 +691,13 @@ declare class BookitiveClient {
660
691
  seating(): Promise<DtoPublicSeating>;
661
692
  /** Live sellability snapshot (poll it, or use live() for push updates). */
662
693
  availability(): Promise<DtoPublicAvailability>;
694
+ /**
695
+ * Previews a promo code: what applying it would do. Throws a
696
+ * BookitiveError with status 404 for unknown/paused/out-of-window codes
697
+ * and 409 (error.isConflict) when the code is fully redeemed. The order
698
+ * endpoint re-validates on submit.
699
+ */
700
+ discount(code: string): Promise<DtoPublicDiscount>;
663
701
  /**
664
702
  * Places a bank-transfer reservation: seats are held atomically for the
665
703
  * event's hold TTL and payment instructions are emailed (and returned).
@@ -675,4 +713,4 @@ declare class BookitiveClient {
675
713
  live(handlers: LiveHandlers): LiveSubscription;
676
714
  }
677
715
 
678
- export { BookitiveClient, type BookitiveClientOptions, BookitiveError, type DtoAPIError, DtoErrorCode, type DtoPublicAvailability, type DtoPublicCheckoutTheme, type DtoPublicEvent, type DtoPublicEventInfo, type DtoPublicFloor, type DtoPublicFloorInfo, type DtoPublicGAArea, type DtoPublicOrder, type DtoPublicOrderCustomer, type DtoPublicOrderItem, type DtoPublicOrderRequest, type DtoPublicOrg, type DtoPublicPaymentDetail, type DtoPublicSeat, type DtoPublicSeating, type DtoPublicSection, type DtoPublicTable, type DtoPublicTicketType, type LiveHandlers, LiveSubscription, type SeatDelta };
716
+ export { BookitiveClient, type BookitiveClientOptions, BookitiveError, type DtoAPIError, DtoErrorCode, type DtoPublicAvailability, type DtoPublicCheckoutTheme, type DtoPublicDiscount, type DtoPublicEvent, type DtoPublicEventInfo, type DtoPublicFloor, type DtoPublicFloorInfo, type DtoPublicGAArea, type DtoPublicOrder, type DtoPublicOrderCustomer, type DtoPublicOrderItem, type DtoPublicOrderRequest, type DtoPublicOrg, type DtoPublicPaymentDetail, type DtoPublicSeat, type DtoPublicSeating, type DtoPublicSection, type DtoPublicTable, type DtoPublicTicketType, type LiveHandlers, LiveSubscription, type SeatDelta };
package/dist/index.js CHANGED
@@ -98,6 +98,15 @@ var BookitiveClient = class {
98
98
  availability() {
99
99
  return this.#get("/availability");
100
100
  }
101
+ /**
102
+ * Previews a promo code: what applying it would do. Throws a
103
+ * BookitiveError with status 404 for unknown/paused/out-of-window codes
104
+ * and 409 (error.isConflict) when the code is fully redeemed. The order
105
+ * endpoint re-validates on submit.
106
+ */
107
+ discount(code) {
108
+ return this.#get(`/discount?code=${encodeURIComponent(code)}`);
109
+ }
101
110
  /**
102
111
  * Places a bank-transfer reservation: seats are held atomically for the
103
112
  * event's hold TTL and payment instructions are emailed (and returned).
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/generated/api.ts","../src/live.ts","../src/client.ts"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\n// @ts-nocheck\n/*\n * ---------------------------------------------------------------\n * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##\n * ## ##\n * ## AUTHOR: acacode ##\n * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##\n * ---------------------------------------------------------------\n */\n\n/**\n * Type is the stable, machine-readable error code.\n * @example \"CONFLICT\"\n */\nexport enum DtoErrorCode {\n\tErrInvalidPayload = 'INVALID_PAYLOAD',\n\tErrValidationFailed = 'VALIDATION_FAILED',\n\tErrNotFound = 'NOT_FOUND',\n\tErrConflict = 'CONFLICT',\n\tErrForbidden = 'FORBIDDEN',\n\tErrInternal = 'INTERNAL_ERROR',\n}\n\nexport interface DtoAPIError {\n\t/** Data carries optional structured context for the error. */\n\tdata?: any;\n\t/** Fields maps a request field to a validation message, when applicable. */\n\tfields?: Record<string, string>;\n\t/**\n\t * Msg is a human-readable description of what went wrong.\n\t * @example \"seat is no longer available\"\n\t */\n\tmsg?: string;\n\t/**\n\t * Timestamp is when the error was produced (RFC 3339).\n\t * @example \"2026-06-20T18:00:00Z\"\n\t */\n\ttimestamp?: string;\n\t/**\n\t * TraceID identifies this request in our logs; include it in support asks.\n\t * @example \"01JABCDoftraceZ\"\n\t */\n\ttraceId?: string;\n\t/** Type is the stable, machine-readable error code. */\n\ttype?: DtoErrorCode;\n}\n\nexport interface DtoPublicAvailability {\n\t/** GARemaining maps a standing area id to its remaining capacity. */\n\tgaRemaining?: Record<string, number>;\n\t/**\n\t * ReservedSeats marks which unavailable seats are merely reserved and may\n\t * free up again — present only when the event shares reserved status.\n\t * @uniqueItems false\n\t * @example [\"1810000000000000502\"]\n\t */\n\treservedSeats?: string[];\n\t/** TicketTypeRemaining maps a ticket type id to its remaining capacity. */\n\tticketTypeRemaining?: Record<string, number>;\n\t/**\n\t * UnavailableSeats lists the ids of seats that cannot currently be bought.\n\t * @uniqueItems false\n\t * @example [\"1810000000000000501\",\"1810000000000000502\"]\n\t */\n\tunavailableSeats?: string[];\n}\n\n/** CheckoutTheme customises the hosted checkout; null = Bookitive defaults. */\nexport interface DtoPublicCheckoutTheme {\n\t/**\n\t * ButtonLabel overrides the submit button text.\n\t * @example \"Objednat\"\n\t */\n\tbuttonLabel?: string;\n\t/**\n\t * FontFamily is an allowlisted font key (self-hosted by Bookitive).\n\t * @example \"inter\"\n\t */\n\tfontFamily?: string;\n\t/**\n\t * Mode is the colour scheme: \"light\" or \"dark\".\n\t * @example \"light\"\n\t */\n\tmode?: 'light' | 'dark';\n\t/**\n\t * Radius is the corner radius for fields and buttons.\n\t * @example \"12px\"\n\t */\n\tradius?: string;\n}\n\nexport interface DtoPublicEvent {\n\t/** Event is the event's public identity: name, times, venue, currency. */\n\tevent?: DtoPublicEventInfo;\n\t/**\n\t * Floors lets a host page render its floor tabs without loading the full\n\t * seating payload; ids match the seating endpoint's floors.\n\t * @uniqueItems false\n\t */\n\tfloors?: DtoPublicFloorInfo[];\n\t/** Org is the organizer's public branding (name, logo, accent colour). */\n\torg?: DtoPublicOrg;\n\t/**\n\t * TicketTypes are the sellable ticket categories with prices and limits.\n\t * @uniqueItems false\n\t */\n\tticketTypes?: DtoPublicTicketType[];\n}\n\n/** Event is the event's public identity: name, times, venue, currency. */\nexport interface DtoPublicEventInfo {\n\t/**\n\t * Currency is the ISO 4217 code all prices are quoted in.\n\t * @example \"CZK\"\n\t */\n\tcurrency?: string;\n\t/**\n\t * EndTime is when the event ends (RFC 3339), when known.\n\t * @example \"2026-06-20T23:00:00Z\"\n\t */\n\tendTime?: string;\n\t/**\n\t * HoldTTLSeconds is how long a checkout holds selected seats before expiry.\n\t * @example 900\n\t */\n\tholdTtlSeconds?: number;\n\t/**\n\t * LocationName is the venue's display name, when set.\n\t * @example \"Výstaviště Praha\"\n\t */\n\tlocationName?: string;\n\t/**\n\t * Name is the event's public display name.\n\t * @example \"Rockfest 2026\"\n\t */\n\tname?: string;\n\t/**\n\t * Slug is the event's URL identifier (the {eventSlug} path parameter).\n\t * @example \"rockfest-2026\"\n\t */\n\tslug?: string;\n\t/**\n\t * StartTime is when doors/the event begins (RFC 3339).\n\t * @example \"2026-06-20T18:00:00Z\"\n\t */\n\tstartTime?: string;\n}\n\nexport interface DtoPublicFloor {\n\t/**\n\t * Cons are short caveats for this floor, shown alongside the pros.\n\t * @uniqueItems false\n\t * @example [\"Standing only\"]\n\t */\n\tcons?: string[];\n\t/**\n\t * Description is optional customer-facing copy shown on the floor's tab.\n\t * @example \"Standing area in front of the main stage\"\n\t */\n\tdescription?: string;\n\t/**\n\t * ID is the floor's stable id; it matches PublicFloorInfo.id.\n\t * @example \"1810000000000000101\"\n\t */\n\tid?: string;\n\t/**\n\t * Mode is \"single\" (one open space) or \"sections\" (subdivided blocks).\n\t * @example \"sections\"\n\t */\n\tmode?: 'single' | 'sections';\n\t/**\n\t * Name is the floor's display label.\n\t * @example \"Ground floor\"\n\t */\n\tname?: string;\n\t/**\n\t * Position is the 1-based tab order among the event's floors.\n\t * @example 1\n\t */\n\tposition?: number;\n\t/**\n\t * Pros are short selling points for this floor, shown as a checklist.\n\t * @uniqueItems false\n\t * @example [\"Closest to the stage\",\"Great atmosphere\"]\n\t */\n\tpros?: string[];\n\t/**\n\t * Sections are the floor's blocks; a single-mode floor has exactly one.\n\t * @uniqueItems false\n\t */\n\tsections?: DtoPublicSection[];\n}\n\nexport interface DtoPublicFloorInfo {\n\t/**\n\t * Cons are short caveats for this floor, shown alongside the pros.\n\t * @uniqueItems false\n\t * @example [\"Standing only\"]\n\t */\n\tcons?: string[];\n\t/**\n\t * Description is optional customer-facing copy shown on the floor's tab.\n\t * @example \"Standing area in front of the main stage\"\n\t */\n\tdescription?: string;\n\t/**\n\t * ID is the floor's stable id; it matches a floor in the seating endpoint.\n\t * @example \"1810000000000000101\"\n\t */\n\tid?: string;\n\t/**\n\t * Mode is \"single\" (one open space) or \"sections\" (subdivided blocks).\n\t * @example \"sections\"\n\t */\n\tmode?: 'single' | 'sections';\n\t/**\n\t * Name is the floor's display label.\n\t * @example \"Ground floor\"\n\t */\n\tname?: string;\n\t/**\n\t * Position is the 1-based tab order among the event's floors.\n\t * @example 1\n\t */\n\tposition?: number;\n\t/**\n\t * Pros are short selling points for this floor, shown as a checklist.\n\t * @uniqueItems false\n\t * @example [\"Closest to the stage\",\"Great atmosphere\"]\n\t */\n\tpros?: string[];\n}\n\nexport interface DtoPublicGAArea {\n\t/**\n\t * Capacity is the total number of standing tickets this area can sell.\n\t * @example 500\n\t */\n\tcapacity?: number;\n\t/**\n\t * H is the area's height on the floor canvas.\n\t * @example 200\n\t */\n\th?: number;\n\t/**\n\t * ID is the standing area's stable id, referenced by availability/orders.\n\t * @example \"1810000000000000601\"\n\t */\n\tid?: string;\n\t/**\n\t * Label is the standing area's display name.\n\t * @example \"Pit\"\n\t */\n\tlabel?: string;\n\t/**\n\t * Rotation is the area's rotation in degrees.\n\t * @example 0\n\t */\n\trotation?: number;\n\t/**\n\t * TicketTypeID is the standing ticket type mapped to this area, when priced.\n\t * @example \"1810000000000000201\"\n\t */\n\tticketTypeId?: string;\n\t/**\n\t * W is the area's width on the floor canvas.\n\t * @example 600\n\t */\n\tw?: number;\n\t/**\n\t * X is the area's left offset on the floor canvas.\n\t * @example 100\n\t */\n\tx?: number;\n\t/**\n\t * Y is the area's top offset on the floor canvas.\n\t * @example 400\n\t */\n\ty?: number;\n}\n\nexport interface DtoPublicOrder {\n\t/**\n\t * Currency is the ISO 4217 code the total is quoted in.\n\t * @example \"CZK\"\n\t */\n\tcurrency?: string;\n\t/**\n\t * ExpiresAt is when the held seats and this order expire (RFC 3339).\n\t * @example \"2026-06-20T18:15:00Z\"\n\t */\n\texpiresAt?: string;\n\t/** Payment carries the bank-transfer instructions for pending orders. */\n\tpayment?: DtoPublicPaymentDetail;\n\t/**\n\t * Reference is the order's human-facing reference (also the payment symbol).\n\t * @example \"RF26-000142\"\n\t */\n\treference?: string;\n\t/**\n\t * Status is the order lifecycle state at creation time.\n\t * @example \"pending\"\n\t */\n\tstatus?: 'pending' | 'paid' | 'cancelled' | 'expired';\n\t/**\n\t * TotalCents is the amount due in the event currency's minor units.\n\t * @example 149000\n\t */\n\ttotalCents?: number;\n}\n\n/** Customer is the buyer's contact details. */\nexport interface DtoPublicOrderCustomer {\n\t/**\n\t * Email is where the payment instructions and tickets are sent.\n\t * @example \"jana@example.com\"\n\t */\n\temail: string;\n\t/**\n\t * Name is the buyer's full name.\n\t * @maxLength 200\n\t * @example \"Jana Nováková\"\n\t */\n\tname: string;\n\t/**\n\t * Phone is an optional contact number.\n\t * @maxLength 50\n\t * @example \"+420123456789\"\n\t */\n\tphone?: string;\n}\n\nexport interface DtoPublicOrderItem {\n\t/**\n\t * GAAreaID is the standing area's id for standing ticket types.\n\t * @example \"1810000000000000601\"\n\t */\n\tgaAreaId?: string;\n\t/**\n\t * Quantity is how many to buy — always 1 for a seat, 1+ for standing.\n\t * @min 1\n\t * @example 1\n\t */\n\tquantity: number;\n\t/**\n\t * SeatID is the chosen seat's id for seated ticket types.\n\t * @example \"1810000000000000501\"\n\t */\n\tseatId?: string;\n\t/**\n\t * TicketTypeID is the ticket type being bought (from the event endpoint).\n\t * @example \"1810000000000000201\"\n\t */\n\tticketTypeId: string;\n}\n\nexport interface DtoPublicOrderRequest {\n\t/**\n\t * CaptchaToken is the client-side captcha solution, verified server-side.\n\t * @example \"03AGdBq26…\"\n\t */\n\tcaptchaToken?: string;\n\t/** Customer is the buyer's contact details. */\n\tcustomer: DtoPublicOrderCustomer;\n\t/**\n\t * Items are the order lines; at least one is required.\n\t * @minItems 1\n\t * @uniqueItems false\n\t */\n\titems: DtoPublicOrderItem[];\n}\n\n/** Org is the organizer's public branding (name, logo, accent colour). */\nexport interface DtoPublicOrg {\n\t/**\n\t * AccentColor is the organizer's brand colour as a hex string, if set.\n\t * @example \"#E5482F\"\n\t */\n\taccentColor?: string;\n\t/** CheckoutTheme customises the hosted checkout; null = Bookitive defaults. */\n\tcheckoutTheme?: DtoPublicCheckoutTheme;\n\t/**\n\t * LogoURL is an absolute URL to the organizer's logo, if set.\n\t * @example \"https://cdn.bookitive.com/orgs/rockfest/logo.png\"\n\t */\n\tlogoUrl?: string;\n\t/**\n\t * Name is the organizer's public display name.\n\t * @example \"Rockfest Productions\"\n\t */\n\tname?: string;\n\t/**\n\t * Slug is the organizer's URL identifier (the {orgSlug} path parameter).\n\t * @example \"rockfest\"\n\t */\n\tslug?: string;\n}\n\n/** Payment carries the bank-transfer instructions for pending orders. */\nexport interface DtoPublicPaymentDetail {\n\t/**\n\t * BankAccount is the organizer's free-form payment destination.\n\t * @example \"123456789/0100\"\n\t */\n\tbankAccount?: string;\n\t/**\n\t * VariableSymbol identifies the payment — it equals the order reference.\n\t * @example \"26000142\"\n\t */\n\tvariableSymbol?: string;\n}\n\nexport interface DtoPublicSeat {\n\t/**\n\t * Code is the human-facing seat label (section prefix + table + seat).\n\t * @example \"L12-3\"\n\t */\n\tcode?: string;\n\t/**\n\t * ID is the seat's stable id; availability and orders reference it.\n\t * @example \"1810000000000000501\"\n\t */\n\tid?: string;\n\t/**\n\t * TableID is the owning table's id, when the seat belongs to a table.\n\t * @example \"1810000000000000401\"\n\t */\n\ttableId?: string;\n\t/**\n\t * TicketTypeID is the ticket type mapped to this seat, when priced.\n\t * @example \"1810000000000000201\"\n\t */\n\tticketTypeId?: string;\n\t/**\n\t * X is the seat centre's x on the floor canvas.\n\t * @example 245\n\t */\n\tx?: number;\n\t/**\n\t * Y is the seat centre's y on the floor canvas.\n\t * @example 158\n\t */\n\ty?: number;\n}\n\nexport interface DtoPublicSeating {\n\t/**\n\t * Floors are the chart's floors in tab order, each with its geometry.\n\t * @uniqueItems false\n\t */\n\tfloors?: DtoPublicFloor[];\n}\n\nexport interface DtoPublicSection {\n\t/** Decorations is opaque visual scenery (stage, walls, doors) — never sold. */\n\tdecorations?: object;\n\t/**\n\t * GAAreas are the standing areas (sold by quantity) in this section.\n\t * @uniqueItems false\n\t */\n\tgaAreas?: DtoPublicGAArea[];\n\t/**\n\t * H is the section's height on the floor canvas, if sized.\n\t * @example 300\n\t */\n\th?: number;\n\t/**\n\t * ID is the section's stable id.\n\t * @example \"1810000000000000301\"\n\t */\n\tid?: string;\n\t/**\n\t * Name is the section's display label.\n\t * @example \"Left block\"\n\t */\n\tname?: string;\n\t/** Polygon is the section's outline as an array of {x,y} points, if shaped. */\n\tpolygon?: object;\n\t/**\n\t * Prefix is prepended to seat codes in this section (e.g. \"L\" → \"L12-3\").\n\t * @example \"L\"\n\t */\n\tprefix?: string;\n\t/**\n\t * Seats are the individually sellable seats in this section.\n\t * @uniqueItems false\n\t */\n\tseats?: DtoPublicSeat[];\n\t/** Settings is opaque render config (chair gap/size, label typography). */\n\tsettings?: object;\n\t/**\n\t * Tables are the seated tables in this section.\n\t * @uniqueItems false\n\t */\n\ttables?: DtoPublicTable[];\n\t/**\n\t * W is the section's width on the floor canvas, if sized.\n\t * @example 400\n\t */\n\tw?: number;\n\t/**\n\t * X is the section's left offset on the floor canvas, if positioned.\n\t * @example 120\n\t */\n\tx?: number;\n\t/**\n\t * Y is the section's top offset on the floor canvas, if positioned.\n\t * @example 80\n\t */\n\ty?: number;\n}\n\nexport interface DtoPublicTable {\n\t/**\n\t * Curve is the arc for row tables, in degrees (0 = straight row).\n\t * @example 0\n\t */\n\tcurve?: number;\n\t/**\n\t * H is the height for rect tables, in canvas units.\n\t * @example 60\n\t */\n\th?: number;\n\t/**\n\t * ID is the table's stable id, referenced by PublicSeat.tableId.\n\t * @example \"1810000000000000401\"\n\t */\n\tid?: string;\n\t/**\n\t * Number is the table's display number within its section.\n\t * @example 12\n\t */\n\tnumber?: number;\n\t/**\n\t * Radius is the radius for round tables, in canvas units.\n\t * @example 45\n\t */\n\tradius?: number;\n\t/**\n\t * Rotation is the table's rotation in degrees.\n\t * @example 0\n\t */\n\trotation?: number;\n\t/**\n\t * Shape is the table outline: \"round\", \"rect\", or \"row\".\n\t * @example \"round\"\n\t */\n\tshape?: 'round' | 'rect' | 'row';\n\t/**\n\t * Sides is the seat count per edge for rect tables [top,right,bottom,left].\n\t * @uniqueItems false\n\t */\n\tsides?: number[];\n\t/**\n\t * Spacing is the gap between seats on a row table, in canvas units.\n\t * @example 24\n\t */\n\tspacing?: number;\n\t/**\n\t * W is the width for rect tables, in canvas units.\n\t * @example 120\n\t */\n\tw?: number;\n\t/**\n\t * X is the table centre's x on the floor canvas.\n\t * @example 240.5\n\t */\n\tx?: number;\n\t/**\n\t * Y is the table centre's y on the floor canvas.\n\t * @example 160\n\t */\n\ty?: number;\n}\n\nexport interface DtoPublicTicketType {\n\t/**\n\t * Color is the swatch used to tint seats/areas of this type, as hex.\n\t * @example \"#E5482F\"\n\t */\n\tcolor?: string;\n\t/**\n\t * Cons are short caveats for this ticket type, shown alongside the pros.\n\t * @uniqueItems false\n\t * @example [\"No seating\"]\n\t */\n\tcons?: string[];\n\t/**\n\t * Description is optional customer-facing copy for this ticket type.\n\t * @example \"Front-stage standing with a dedicated bar\"\n\t */\n\tdescription?: string;\n\t/**\n\t * ID is the ticket type's stable id, referenced by order items and seats.\n\t * @example \"1810000000000000201\"\n\t */\n\tid?: string;\n\t/**\n\t * Kind is \"seated\" (maps to a seat) or \"standing\" (sold by quantity).\n\t * @example \"standing\"\n\t */\n\tkind?: 'seated' | 'standing';\n\t/**\n\t * MaxPerOrder caps how many of this type a single order may contain.\n\t * @example 6\n\t */\n\tmaxPerOrder?: number;\n\t/**\n\t * MinPerOrder appears only when it is a real constraint (> 1) — the\n\t * limit applies to orders that include this type at all.\n\t * @example 1\n\t */\n\tminPerOrder?: number;\n\t/**\n\t * Name is the ticket type's display label.\n\t * @example \"VIP\"\n\t */\n\tname?: string;\n\t/**\n\t * PriceCents is the unit price in the event's currency's minor units.\n\t * @example 149000\n\t */\n\tpriceCents?: number;\n\t/**\n\t * Pros are short selling points for this ticket type, shown as a checklist.\n\t * @uniqueItems false\n\t * @example [\"Best view\",\"Dedicated bar\",\"Fast-track entry\"]\n\t */\n\tpros?: string[];\n\t/**\n\t * SaleEndTime is when this type stops selling (RFC 3339), if scheduled.\n\t * @example \"2026-06-20T16:00:00Z\"\n\t */\n\tsaleEndTime?: string;\n\t/**\n\t * SaleStartTime is when this type goes on sale (RFC 3339), if scheduled.\n\t * @example \"2026-01-15T10:00:00Z\"\n\t */\n\tsaleStartTime?: string;\n}\n","// Live availability over websocket: {\"event\":\"startstate\"|\"seat\", data}.\n// Startstate re-fires on every reconnect, so consumers treat it as the\n// resync point and apply deltas on top.\nimport type { DtoPublicAvailability } from './generated/api.js';\n\n/** One seat changing state. \"reserved\" appears only when the event shares\n * reserved status publicly — a reserved seat may free up again. */\nexport interface SeatDelta {\n\tseatId: string;\n\ttaken: boolean;\n\tstatus: 'free' | 'reserved' | 'taken';\n}\n\nexport interface LiveHandlers {\n\t/** Full snapshot — on connect and on every reconnect. */\n\tonStartstate?: (availability: DtoPublicAvailability) => void;\n\t/** One seat changed. */\n\tonSeat?: (delta: SeatDelta) => void;\n\t/** Connection state changes (drive a \"live\" indicator if you like). */\n\tonConnectionChange?: (connected: boolean) => void;\n}\n\nconst INITIAL_BACKOFF_MS = 1000;\nconst MAX_BACKOFF_MS = 15000;\n\nexport class LiveSubscription {\n\t#url: string;\n\t#handlers: LiveHandlers;\n\t#ws: WebSocket | null = null;\n\t#backoff = INITIAL_BACKOFF_MS;\n\t#retry: ReturnType<typeof setTimeout> | null = null;\n\t#closed = false;\n\n\tconstructor(url: string, handlers: LiveHandlers) {\n\t\tthis.#url = url.replace(/^http/, 'ws');\n\t\tthis.#handlers = handlers;\n\t\tthis.#connect();\n\t}\n\n\tclose(): void {\n\t\tthis.#closed = true;\n\t\tif (this.#retry) clearTimeout(this.#retry);\n\t\tthis.#ws?.close();\n\t}\n\n\t#connect(): void {\n\t\tif (this.#closed) return;\n\t\tconst ws = new WebSocket(this.#url);\n\t\tthis.#ws = ws;\n\t\tws.onopen = () => {\n\t\t\tthis.#backoff = INITIAL_BACKOFF_MS;\n\t\t\tthis.#handlers.onConnectionChange?.(true);\n\t\t};\n\t\tws.onmessage = (event) => {\n\t\t\tlet message: { event?: string; data?: unknown };\n\t\t\ttry {\n\t\t\t\tmessage = JSON.parse(event.data as string);\n\t\t\t} catch {\n\t\t\t\treturn; // ignore malformed / non-JSON frames rather than throwing\n\t\t\t}\n\t\t\tif (message.event === 'startstate') {\n\t\t\t\tthis.#handlers.onStartstate?.(message.data as DtoPublicAvailability);\n\t\t\t} else if (message.event === 'seat') {\n\t\t\t\tthis.#handlers.onSeat?.(message.data as SeatDelta);\n\t\t\t}\n\t\t};\n\t\tws.onclose = () => {\n\t\t\tthis.#handlers.onConnectionChange?.(false);\n\t\t\tif (this.#closed) return;\n\t\t\t// Equal-jitter backoff: reconnect somewhere in [backoff/2, backoff) so a\n\t\t\t// mass disconnect doesn't produce a synchronized reconnect thundering herd.\n\t\t\tconst delay = this.#backoff / 2 + Math.random() * (this.#backoff / 2);\n\t\t\tthis.#retry = setTimeout(() => this.#connect(), delay);\n\t\t\tthis.#backoff = Math.min(this.#backoff * 2, MAX_BACKOFF_MS);\n\t\t};\n\t}\n}\n","// The typed core of @bookitive/js: a thin fetch wrapper over the public\n// checkout API, addressed by org + event slug. All response and payload types\n// are generated from the backend's public swagger — they cannot drift.\nimport { DtoErrorCode } from './generated/api.js';\nimport type {\n\tDtoAPIError,\n\tDtoPublicAvailability,\n\tDtoPublicEvent,\n\tDtoPublicOrder,\n\tDtoPublicOrderRequest,\n\tDtoPublicSeating,\n} from './generated/api.js';\nimport { LiveSubscription, type LiveHandlers } from './live.js';\n\nexport interface BookitiveClientOptions {\n\t/** API origin, e.g. \"https://api.bookitive.com\" (no trailing slash). */\n\tbaseUrl: string;\n\t/** Organization slug — the {org} in events.bookitive.com/{org}/{event}. */\n\torg: string;\n\t/** Event slug. */\n\tevent: string;\n\t/** Custom fetch (SSR frameworks pass their own). Defaults to global fetch. */\n\tfetch?: typeof fetch;\n}\n\n/** API failure with the backend's error envelope attached. */\nexport class BookitiveError extends Error {\n\treadonly status: number;\n\t/** The backend error code (e.g. DtoErrorCode.ErrConflict), or \"UNKNOWN\" when\n\t * the response carried no JSON envelope. */\n\treadonly type: DtoErrorCode | 'UNKNOWN';\n\n\tconstructor(status: number, body: DtoAPIError | undefined, fallback: string) {\n\t\tsuper(body?.msg ?? fallback);\n\t\tthis.name = 'BookitiveError';\n\t\tthis.status = status;\n\t\tthis.type = body?.type ?? 'UNKNOWN';\n\t}\n\n\t/** The selection raced another buyer — refresh availability and reselect. */\n\tget isConflict(): boolean {\n\t\treturn this.type === DtoErrorCode.ErrConflict || this.status === 409;\n\t}\n}\n\nexport class BookitiveClient {\n\treadonly #base: string;\n\treadonly #fetch: typeof fetch;\n\n\tconstructor(options: BookitiveClientOptions) {\n\t\tthis.#base = `${options.baseUrl.replace(/\\/$/, '')}/public/v1/orgs/${encodeURIComponent(\n\t\t\toptions.org\n\t\t)}/events/${encodeURIComponent(options.event)}`;\n\t\t// bind, or a browser's fetch throws \"Illegal invocation\" when called\n\t\t// detached from window\n\t\tthis.#fetch = options.fetch ?? ((...args) => fetch(...args));\n\t}\n\n\t/** Event identity, org branding, priced ticket types, and floor tabs. */\n\tevent(): Promise<DtoPublicEvent> {\n\t\treturn this.#get<DtoPublicEvent>('');\n\t}\n\n\t/** Static chart geometry: floors → sections → tables, seats, GA areas. */\n\tseating(): Promise<DtoPublicSeating> {\n\t\treturn this.#get<DtoPublicSeating>('/seating');\n\t}\n\n\t/** Live sellability snapshot (poll it, or use live() for push updates). */\n\tavailability(): Promise<DtoPublicAvailability> {\n\t\treturn this.#get<DtoPublicAvailability>('/availability');\n\t}\n\n\t/**\n\t * Places a bank-transfer reservation: seats are held atomically for the\n\t * event's hold TTL and payment instructions are emailed (and returned).\n\t * A 409 (error.isConflict) means a seat was just taken — refresh and\n\t * reselect.\n\t */\n\tasync checkout(order: DtoPublicOrderRequest): Promise<DtoPublicOrder> {\n\t\tconst res = await this.#fetch(`${this.#base}/orders`, {\n\t\t\tmethod: 'POST',\n\t\t\theaders: { 'Content-Type': 'application/json' },\n\t\t\tbody: JSON.stringify(order),\n\t\t});\n\t\treturn this.#parse<DtoPublicOrder>(res, 'checkout failed');\n\t}\n\n\t/**\n\t * Subscribes to live availability over websocket: `startstate` fires with\n\t * the full snapshot on every (re)connect, then `seat` deltas stream in.\n\t * Reconnects automatically with backoff; call close() when done.\n\t */\n\tlive(handlers: LiveHandlers): LiveSubscription {\n\t\treturn new LiveSubscription(`${this.#base}/live`, handlers);\n\t}\n\n\tasync #get<T>(path: string): Promise<T> {\n\t\tconst res = await this.#fetch(`${this.#base}${path}`);\n\t\treturn this.#parse<T>(res, `request failed: ${path || '/'}`);\n\t}\n\n\tasync #parse<T>(res: Response, fallback: string): Promise<T> {\n\t\tif (!res.ok) {\n\t\t\tlet body: DtoAPIError | undefined;\n\t\t\ttry {\n\t\t\t\tbody = (await res.json()) as DtoAPIError;\n\t\t\t} catch {\n\t\t\t\t// non-JSON error body — the fallback message covers it\n\t\t\t}\n\t\t\tthrow new BookitiveError(res.status, body, fallback);\n\t\t}\n\t\t// 204/205 never carry a body. Otherwise read the text and parse only\n\t\t// when it's non-empty — this avoids res.headers.get('content-length'),\n\t\t// which throws under SvelteKit's SSR fetch (response headers aren't\n\t\t// serialized by default) and would otherwise 500 any server-side load.\n\t\tif (res.status === 204 || res.status === 205) {\n\t\t\treturn undefined as T;\n\t\t}\n\t\tconst text = await res.text();\n\t\treturn (text ? JSON.parse(text) : undefined)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AC;AACD,WAAO,KAAK,OAAuB,KAAK,iBAAiB;AAAA,EAC1D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,KAAK,UAA0C;AAC9C,WAAO,IAAI,iBAAiB,GAAG,KAAK,KAAK,SAAS,QAAQ;AAAA,EAC3D;AAAA,EAEA,MAAM,KAAQ,MAA0B;AACvC,UAAM,MAAM,MAAM,KAAK,OAAO,GAAG,KAAK,KAAK,GAAG,IAAI,EAAE;AACpD,WAAO,KAAK,OAAU,KAAK,mBAAmB,QAAQ,GAAG,EAAE;AAAA,EAC5D;AAAA,EAEA,MAAM,OAAU,KAAe,UAA8B;AAC5D,QAAI,CAAC,IAAI,IAAI;AACZ,UAAI;AACJ,UAAI;AACH,eAAQ,MAAM,IAAI,KAAK;AAAA,MACxB,QAAQ;AAAA,MAER;AACA,YAAM,IAAI,eAAe,IAAI,QAAQ,MAAM,QAAQ;AAAA,IACpD;AAKA,QAAI,IAAI,WAAW,OAAO,IAAI,WAAW,KAAK;AAC7C,aAAO;AAAA,IACR;AACA,UAAM,OAAO,MAAM,IAAI,KAAK;AAC5B,WAAQ,OAAO,KAAK,MAAM,IAAI,IAAI;AAAA,EACnC;AACD;","names":["DtoErrorCode"]}
1
+ {"version":3,"sources":["../src/generated/api.ts","../src/live.ts","../src/client.ts"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\n// @ts-nocheck\n/*\n * ---------------------------------------------------------------\n * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##\n * ## ##\n * ## AUTHOR: acacode ##\n * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##\n * ---------------------------------------------------------------\n */\n\n/**\n * Type is the stable, machine-readable error code.\n * @example \"CONFLICT\"\n */\nexport enum DtoErrorCode {\n\tErrInvalidPayload = 'INVALID_PAYLOAD',\n\tErrValidationFailed = 'VALIDATION_FAILED',\n\tErrNotFound = 'NOT_FOUND',\n\tErrConflict = 'CONFLICT',\n\tErrForbidden = 'FORBIDDEN',\n\tErrInternal = 'INTERNAL_ERROR',\n}\n\nexport interface DtoAPIError {\n\t/** Data carries optional structured context for the error. */\n\tdata?: any;\n\t/** Fields maps a request field to a validation message, when applicable. */\n\tfields?: Record<string, string>;\n\t/**\n\t * Msg is a human-readable description of what went wrong.\n\t * @example \"seat is no longer available\"\n\t */\n\tmsg?: string;\n\t/**\n\t * Timestamp is when the error was produced (RFC 3339).\n\t * @example \"2026-06-20T18:00:00Z\"\n\t */\n\ttimestamp?: string;\n\t/**\n\t * TraceID identifies this request in our logs; include it in support asks.\n\t * @example \"01JABCDoftraceZ\"\n\t */\n\ttraceId?: string;\n\t/** Type is the stable, machine-readable error code. */\n\ttype?: DtoErrorCode;\n}\n\nexport interface DtoPublicAvailability {\n\t/** GARemaining maps a standing area id to its remaining capacity. */\n\tgaRemaining?: Record<string, number>;\n\t/**\n\t * ReservedSeats marks which unavailable seats are merely reserved and may\n\t * free up again — present only when the event shares reserved status.\n\t * @uniqueItems false\n\t * @example [\"1810000000000000502\"]\n\t */\n\treservedSeats?: string[];\n\t/** TicketTypeRemaining maps a ticket type id to its remaining capacity. */\n\tticketTypeRemaining?: Record<string, number>;\n\t/**\n\t * UnavailableSeats lists the ids of seats that cannot currently be bought.\n\t * @uniqueItems false\n\t * @example [\"1810000000000000501\",\"1810000000000000502\"]\n\t */\n\tunavailableSeats?: string[];\n}\n\n/** CheckoutTheme customises the hosted checkout; null = Bookitive defaults. */\nexport interface DtoPublicCheckoutTheme {\n\t/**\n\t * ButtonLabel overrides the submit button text.\n\t * @example \"Objednat\"\n\t */\n\tbuttonLabel?: string;\n\t/**\n\t * FontFamily is an allowlisted font key (self-hosted by Bookitive).\n\t * @example \"inter\"\n\t */\n\tfontFamily?: string;\n\t/**\n\t * Mode is the colour scheme: \"light\" or \"dark\".\n\t * @example \"light\"\n\t */\n\tmode?: 'light' | 'dark';\n\t/**\n\t * Radius is the corner radius for fields and buttons.\n\t * @example \"12px\"\n\t */\n\tradius?: string;\n}\n\nexport interface DtoPublicDiscount {\n\t/**\n\t * Code is the normalized (uppercase) promo code.\n\t * @example \"EARLYBIRD\"\n\t */\n\tcode?: string;\n\t/**\n\t * Kind is how the discount applies: \"percent\" of the items subtotal, or a\n\t * \"fixed\" amount in the event currency's minor units.\n\t * @example \"percent\"\n\t */\n\tkind?: 'percent' | 'fixed';\n\t/**\n\t * Value is 1-100 for percent, minor units for fixed.\n\t * @example 10\n\t */\n\tvalue?: number;\n}\n\nexport interface DtoPublicEvent {\n\t/** Event is the event's public identity: name, times, venue, currency. */\n\tevent?: DtoPublicEventInfo;\n\t/**\n\t * Floors lets a host page render its floor tabs without loading the full\n\t * seating payload; ids match the seating endpoint's floors.\n\t * @uniqueItems false\n\t */\n\tfloors?: DtoPublicFloorInfo[];\n\t/** Org is the organizer's public branding (name, logo, accent colour). */\n\torg?: DtoPublicOrg;\n\t/**\n\t * TicketTypes are the sellable ticket categories with prices and limits.\n\t * @uniqueItems false\n\t */\n\tticketTypes?: DtoPublicTicketType[];\n}\n\n/** Event is the event's public identity: name, times, venue, currency. */\nexport interface DtoPublicEventInfo {\n\t/**\n\t * Currency is the ISO 4217 code all prices are quoted in.\n\t * @example \"CZK\"\n\t */\n\tcurrency?: string;\n\t/**\n\t * EndTime is when the event ends (RFC 3339), when known.\n\t * @example \"2026-06-20T23:00:00Z\"\n\t */\n\tendTime?: string;\n\t/**\n\t * HoldTTLSeconds is how long a checkout holds selected seats before expiry.\n\t * @example 900\n\t */\n\tholdTtlSeconds?: number;\n\t/**\n\t * LocationName is the venue's display name, when set.\n\t * @example \"Výstaviště Praha\"\n\t */\n\tlocationName?: string;\n\t/**\n\t * Name is the event's public display name.\n\t * @example \"Rockfest 2026\"\n\t */\n\tname?: string;\n\t/**\n\t * Slug is the event's URL identifier (the {eventSlug} path parameter).\n\t * @example \"rockfest-2026\"\n\t */\n\tslug?: string;\n\t/**\n\t * StartTime is when doors/the event begins (RFC 3339).\n\t * @example \"2026-06-20T18:00:00Z\"\n\t */\n\tstartTime?: string;\n}\n\nexport interface DtoPublicFloor {\n\t/**\n\t * Cons are short caveats for this floor, shown alongside the pros.\n\t * @uniqueItems false\n\t * @example [\"Standing only\"]\n\t */\n\tcons?: string[];\n\t/**\n\t * Description is optional customer-facing copy shown on the floor's tab.\n\t * @example \"Standing area in front of the main stage\"\n\t */\n\tdescription?: string;\n\t/**\n\t * ID is the floor's stable id; it matches PublicFloorInfo.id.\n\t * @example \"1810000000000000101\"\n\t */\n\tid?: string;\n\t/**\n\t * Mode is \"single\" (one open space) or \"sections\" (subdivided blocks).\n\t * @example \"sections\"\n\t */\n\tmode?: 'single' | 'sections';\n\t/**\n\t * Name is the floor's display label.\n\t * @example \"Ground floor\"\n\t */\n\tname?: string;\n\t/**\n\t * Position is the 1-based tab order among the event's floors.\n\t * @example 1\n\t */\n\tposition?: number;\n\t/**\n\t * Pros are short selling points for this floor, shown as a checklist.\n\t * @uniqueItems false\n\t * @example [\"Closest to the stage\",\"Great atmosphere\"]\n\t */\n\tpros?: string[];\n\t/**\n\t * Sections are the floor's blocks; a single-mode floor has exactly one.\n\t * @uniqueItems false\n\t */\n\tsections?: DtoPublicSection[];\n}\n\nexport interface DtoPublicFloorInfo {\n\t/**\n\t * Cons are short caveats for this floor, shown alongside the pros.\n\t * @uniqueItems false\n\t * @example [\"Standing only\"]\n\t */\n\tcons?: string[];\n\t/**\n\t * Description is optional customer-facing copy shown on the floor's tab.\n\t * @example \"Standing area in front of the main stage\"\n\t */\n\tdescription?: string;\n\t/**\n\t * ID is the floor's stable id; it matches a floor in the seating endpoint.\n\t * @example \"1810000000000000101\"\n\t */\n\tid?: string;\n\t/**\n\t * Mode is \"single\" (one open space) or \"sections\" (subdivided blocks).\n\t * @example \"sections\"\n\t */\n\tmode?: 'single' | 'sections';\n\t/**\n\t * Name is the floor's display label.\n\t * @example \"Ground floor\"\n\t */\n\tname?: string;\n\t/**\n\t * Position is the 1-based tab order among the event's floors.\n\t * @example 1\n\t */\n\tposition?: number;\n\t/**\n\t * Pros are short selling points for this floor, shown as a checklist.\n\t * @uniqueItems false\n\t * @example [\"Closest to the stage\",\"Great atmosphere\"]\n\t */\n\tpros?: string[];\n}\n\nexport interface DtoPublicGAArea {\n\t/**\n\t * Capacity is the total number of standing tickets this area can sell.\n\t * @example 500\n\t */\n\tcapacity?: number;\n\t/**\n\t * H is the area's height on the floor canvas.\n\t * @example 200\n\t */\n\th?: number;\n\t/**\n\t * ID is the standing area's stable id, referenced by availability/orders.\n\t * @example \"1810000000000000601\"\n\t */\n\tid?: string;\n\t/**\n\t * Label is the standing area's display name.\n\t * @example \"Pit\"\n\t */\n\tlabel?: string;\n\t/**\n\t * Rotation is the area's rotation in degrees.\n\t * @example 0\n\t */\n\trotation?: number;\n\t/**\n\t * TicketTypeID is the standing ticket type mapped to this area, when priced.\n\t * @example \"1810000000000000201\"\n\t */\n\tticketTypeId?: string;\n\t/**\n\t * W is the area's width on the floor canvas.\n\t * @example 600\n\t */\n\tw?: number;\n\t/**\n\t * X is the area's left offset on the floor canvas.\n\t * @example 100\n\t */\n\tx?: number;\n\t/**\n\t * Y is the area's top offset on the floor canvas.\n\t * @example 400\n\t */\n\ty?: number;\n}\n\nexport interface DtoPublicOrder {\n\t/**\n\t * Currency is the ISO 4217 code the total is quoted in.\n\t * @example \"CZK\"\n\t */\n\tcurrency?: string;\n\t/**\n\t * DiscountCents is what the redeemed promo code took off the total.\n\t * @example 14900\n\t */\n\tdiscountCents?: number;\n\t/**\n\t * ExpiresAt is when the held seats and this order expire (RFC 3339).\n\t * @example \"2026-06-20T18:15:00Z\"\n\t */\n\texpiresAt?: string;\n\t/** Payment carries the bank-transfer instructions for pending orders. */\n\tpayment?: DtoPublicPaymentDetail;\n\t/**\n\t * Reference is the order's human-facing reference (also the payment symbol).\n\t * @example \"RF26-000142\"\n\t */\n\treference?: string;\n\t/**\n\t * Status is the order lifecycle state at creation time.\n\t * @example \"pending\"\n\t */\n\tstatus?: 'pending' | 'paid' | 'cancelled' | 'expired';\n\t/**\n\t * TotalCents is the amount due in the event currency's minor units.\n\t * @example 149000\n\t */\n\ttotalCents?: number;\n}\n\n/** Customer is the buyer's contact details. */\nexport interface DtoPublicOrderCustomer {\n\t/**\n\t * Email is where the payment instructions and tickets are sent.\n\t * @example \"jana@example.com\"\n\t */\n\temail: string;\n\t/**\n\t * Name is the buyer's full name.\n\t * @maxLength 200\n\t * @example \"Jana Nováková\"\n\t */\n\tname: string;\n\t/**\n\t * Phone is an optional contact number.\n\t * @maxLength 50\n\t * @example \"+420123456789\"\n\t */\n\tphone?: string;\n}\n\nexport interface DtoPublicOrderItem {\n\t/**\n\t * GAAreaID is the standing area's id for standing ticket types.\n\t * @example \"1810000000000000601\"\n\t */\n\tgaAreaId?: string;\n\t/**\n\t * Quantity is how many to buy — always 1 for a seat, 1+ for standing.\n\t * @min 1\n\t * @example 1\n\t */\n\tquantity: number;\n\t/**\n\t * SeatID is the chosen seat's id for seated ticket types.\n\t * @example \"1810000000000000501\"\n\t */\n\tseatId?: string;\n\t/**\n\t * TicketTypeID is the ticket type being bought (from the event endpoint).\n\t * @example \"1810000000000000201\"\n\t */\n\tticketTypeId: string;\n}\n\nexport interface DtoPublicOrderRequest {\n\t/**\n\t * CaptchaToken is the client-side captcha solution, verified server-side.\n\t * @example \"03AGdBq26…\"\n\t */\n\tcaptchaToken?: string;\n\t/** Customer is the buyer's contact details. */\n\tcustomer: DtoPublicOrderCustomer;\n\t/**\n\t * DiscountCode redeems a promo code (case-insensitive); the discount is\n\t * applied to the items subtotal and enforced against the code's limits.\n\t * @minLength 2\n\t * @maxLength 40\n\t * @example \"EARLYBIRD\"\n\t */\n\tdiscountCode?: string;\n\t/**\n\t * Items are the order lines; at least one is required.\n\t * @minItems 1\n\t * @uniqueItems false\n\t */\n\titems: DtoPublicOrderItem[];\n}\n\n/** Org is the organizer's public branding (name, logo, accent colour). */\nexport interface DtoPublicOrg {\n\t/**\n\t * AccentColor is the organizer's brand colour as a hex string, if set.\n\t * @example \"#E5482F\"\n\t */\n\taccentColor?: string;\n\t/** CheckoutTheme customises the hosted checkout; null = Bookitive defaults. */\n\tcheckoutTheme?: DtoPublicCheckoutTheme;\n\t/**\n\t * LogoURL is an absolute URL to the organizer's logo, if set.\n\t * @example \"https://cdn.bookitive.com/orgs/rockfest/logo.png\"\n\t */\n\tlogoUrl?: string;\n\t/**\n\t * Name is the organizer's public display name.\n\t * @example \"Rockfest Productions\"\n\t */\n\tname?: string;\n\t/**\n\t * Slug is the organizer's URL identifier (the {orgSlug} path parameter).\n\t * @example \"rockfest\"\n\t */\n\tslug?: string;\n}\n\n/** Payment carries the bank-transfer instructions for pending orders. */\nexport interface DtoPublicPaymentDetail {\n\t/**\n\t * BankAccount is the organizer's free-form payment destination.\n\t * @example \"123456789/0100\"\n\t */\n\tbankAccount?: string;\n\t/**\n\t * VariableSymbol identifies the payment — it equals the order reference.\n\t * @example \"26000142\"\n\t */\n\tvariableSymbol?: string;\n}\n\nexport interface DtoPublicSeat {\n\t/**\n\t * Code is the human-facing seat label (section prefix + table + seat).\n\t * @example \"L12-3\"\n\t */\n\tcode?: string;\n\t/**\n\t * ID is the seat's stable id; availability and orders reference it.\n\t * @example \"1810000000000000501\"\n\t */\n\tid?: string;\n\t/**\n\t * TableID is the owning table's id, when the seat belongs to a table.\n\t * @example \"1810000000000000401\"\n\t */\n\ttableId?: string;\n\t/**\n\t * TicketTypeID is the ticket type mapped to this seat, when priced.\n\t * @example \"1810000000000000201\"\n\t */\n\tticketTypeId?: string;\n\t/**\n\t * X is the seat centre's x on the floor canvas.\n\t * @example 245\n\t */\n\tx?: number;\n\t/**\n\t * Y is the seat centre's y on the floor canvas.\n\t * @example 158\n\t */\n\ty?: number;\n}\n\nexport interface DtoPublicSeating {\n\t/**\n\t * Floors are the chart's floors in tab order, each with its geometry.\n\t * @uniqueItems false\n\t */\n\tfloors?: DtoPublicFloor[];\n}\n\nexport interface DtoPublicSection {\n\t/** Decorations is opaque visual scenery (stage, walls, doors) — never sold. */\n\tdecorations?: object;\n\t/**\n\t * GAAreas are the standing areas (sold by quantity) in this section.\n\t * @uniqueItems false\n\t */\n\tgaAreas?: DtoPublicGAArea[];\n\t/**\n\t * H is the section's height on the floor canvas, if sized.\n\t * @example 300\n\t */\n\th?: number;\n\t/**\n\t * ID is the section's stable id.\n\t * @example \"1810000000000000301\"\n\t */\n\tid?: string;\n\t/**\n\t * Name is the section's display label.\n\t * @example \"Left block\"\n\t */\n\tname?: string;\n\t/** Polygon is the section's outline as an array of {x,y} points, if shaped. */\n\tpolygon?: object;\n\t/**\n\t * Prefix is prepended to seat codes in this section (e.g. \"L\" → \"L12-3\").\n\t * @example \"L\"\n\t */\n\tprefix?: string;\n\t/**\n\t * Seats are the individually sellable seats in this section.\n\t * @uniqueItems false\n\t */\n\tseats?: DtoPublicSeat[];\n\t/** Settings is opaque render config (chair gap/size, label typography). */\n\tsettings?: object;\n\t/**\n\t * Tables are the seated tables in this section.\n\t * @uniqueItems false\n\t */\n\ttables?: DtoPublicTable[];\n\t/**\n\t * W is the section's width on the floor canvas, if sized.\n\t * @example 400\n\t */\n\tw?: number;\n\t/**\n\t * X is the section's left offset on the floor canvas, if positioned.\n\t * @example 120\n\t */\n\tx?: number;\n\t/**\n\t * Y is the section's top offset on the floor canvas, if positioned.\n\t * @example 80\n\t */\n\ty?: number;\n}\n\nexport interface DtoPublicTable {\n\t/**\n\t * Curve is the arc for row tables, in degrees (0 = straight row).\n\t * @example 0\n\t */\n\tcurve?: number;\n\t/**\n\t * H is the height for rect tables, in canvas units.\n\t * @example 60\n\t */\n\th?: number;\n\t/**\n\t * ID is the table's stable id, referenced by PublicSeat.tableId.\n\t * @example \"1810000000000000401\"\n\t */\n\tid?: string;\n\t/**\n\t * Number is the table's display number within its section.\n\t * @example 12\n\t */\n\tnumber?: number;\n\t/**\n\t * Radius is the radius for round tables, in canvas units.\n\t * @example 45\n\t */\n\tradius?: number;\n\t/**\n\t * Rotation is the table's rotation in degrees.\n\t * @example 0\n\t */\n\trotation?: number;\n\t/**\n\t * Shape is the table outline: \"round\", \"rect\", or \"row\".\n\t * @example \"round\"\n\t */\n\tshape?: 'round' | 'rect' | 'row';\n\t/**\n\t * Sides is the seat count per edge for rect tables [top,right,bottom,left].\n\t * @uniqueItems false\n\t */\n\tsides?: number[];\n\t/**\n\t * Spacing is the gap between seats on a row table, in canvas units.\n\t * @example 24\n\t */\n\tspacing?: number;\n\t/**\n\t * W is the width for rect tables, in canvas units.\n\t * @example 120\n\t */\n\tw?: number;\n\t/**\n\t * X is the table centre's x on the floor canvas.\n\t * @example 240.5\n\t */\n\tx?: number;\n\t/**\n\t * Y is the table centre's y on the floor canvas.\n\t * @example 160\n\t */\n\ty?: number;\n}\n\nexport interface DtoPublicTicketType {\n\t/**\n\t * Color is the swatch used to tint seats/areas of this type, as hex.\n\t * @example \"#E5482F\"\n\t */\n\tcolor?: string;\n\t/**\n\t * Cons are short caveats for this ticket type, shown alongside the pros.\n\t * @uniqueItems false\n\t * @example [\"No seating\"]\n\t */\n\tcons?: string[];\n\t/**\n\t * Description is optional customer-facing copy for this ticket type.\n\t * @example \"Front-stage standing with a dedicated bar\"\n\t */\n\tdescription?: string;\n\t/**\n\t * ID is the ticket type's stable id, referenced by order items and seats.\n\t * @example \"1810000000000000201\"\n\t */\n\tid?: string;\n\t/**\n\t * Kind is \"seated\" (maps to a seat) or \"standing\" (sold by quantity).\n\t * @example \"standing\"\n\t */\n\tkind?: 'seated' | 'standing';\n\t/**\n\t * MaxPerOrder caps how many of this type a single order may contain.\n\t * @example 6\n\t */\n\tmaxPerOrder?: number;\n\t/**\n\t * MinPerOrder appears only when it is a real constraint (> 1) — the\n\t * limit applies to orders that include this type at all.\n\t * @example 1\n\t */\n\tminPerOrder?: number;\n\t/**\n\t * Name is the ticket type's display label.\n\t * @example \"VIP\"\n\t */\n\tname?: string;\n\t/**\n\t * PriceCents is the unit price in the event's currency's minor units.\n\t * @example 149000\n\t */\n\tpriceCents?: number;\n\t/**\n\t * Pros are short selling points for this ticket type, shown as a checklist.\n\t * @uniqueItems false\n\t * @example [\"Best view\",\"Dedicated bar\",\"Fast-track entry\"]\n\t */\n\tpros?: string[];\n\t/**\n\t * SaleEndTime is when this type stops selling (RFC 3339), if scheduled.\n\t * @example \"2026-06-20T16:00:00Z\"\n\t */\n\tsaleEndTime?: string;\n\t/**\n\t * SaleStartTime is when this type goes on sale (RFC 3339), if scheduled.\n\t * @example \"2026-01-15T10:00:00Z\"\n\t */\n\tsaleStartTime?: string;\n}\n","// Live availability over websocket: {\"event\":\"startstate\"|\"seat\", data}.\n// Startstate re-fires on every reconnect, so consumers treat it as the\n// resync point and apply deltas on top.\nimport type { DtoPublicAvailability } from './generated/api.js';\n\n/** One seat changing state. \"reserved\" appears only when the event shares\n * reserved status publicly — a reserved seat may free up again. */\nexport interface SeatDelta {\n\tseatId: string;\n\ttaken: boolean;\n\tstatus: 'free' | 'reserved' | 'taken';\n}\n\nexport interface LiveHandlers {\n\t/** Full snapshot — on connect and on every reconnect. */\n\tonStartstate?: (availability: DtoPublicAvailability) => void;\n\t/** One seat changed. */\n\tonSeat?: (delta: SeatDelta) => void;\n\t/** Connection state changes (drive a \"live\" indicator if you like). */\n\tonConnectionChange?: (connected: boolean) => void;\n}\n\nconst INITIAL_BACKOFF_MS = 1000;\nconst MAX_BACKOFF_MS = 15000;\n\nexport class LiveSubscription {\n\t#url: string;\n\t#handlers: LiveHandlers;\n\t#ws: WebSocket | null = null;\n\t#backoff = INITIAL_BACKOFF_MS;\n\t#retry: ReturnType<typeof setTimeout> | null = null;\n\t#closed = false;\n\n\tconstructor(url: string, handlers: LiveHandlers) {\n\t\tthis.#url = url.replace(/^http/, 'ws');\n\t\tthis.#handlers = handlers;\n\t\tthis.#connect();\n\t}\n\n\tclose(): void {\n\t\tthis.#closed = true;\n\t\tif (this.#retry) clearTimeout(this.#retry);\n\t\tthis.#ws?.close();\n\t}\n\n\t#connect(): void {\n\t\tif (this.#closed) return;\n\t\tconst ws = new WebSocket(this.#url);\n\t\tthis.#ws = ws;\n\t\tws.onopen = () => {\n\t\t\tthis.#backoff = INITIAL_BACKOFF_MS;\n\t\t\tthis.#handlers.onConnectionChange?.(true);\n\t\t};\n\t\tws.onmessage = (event) => {\n\t\t\tlet message: { event?: string; data?: unknown };\n\t\t\ttry {\n\t\t\t\tmessage = JSON.parse(event.data as string);\n\t\t\t} catch {\n\t\t\t\treturn; // ignore malformed / non-JSON frames rather than throwing\n\t\t\t}\n\t\t\tif (message.event === 'startstate') {\n\t\t\t\tthis.#handlers.onStartstate?.(message.data as DtoPublicAvailability);\n\t\t\t} else if (message.event === 'seat') {\n\t\t\t\tthis.#handlers.onSeat?.(message.data as SeatDelta);\n\t\t\t}\n\t\t};\n\t\tws.onclose = () => {\n\t\t\tthis.#handlers.onConnectionChange?.(false);\n\t\t\tif (this.#closed) return;\n\t\t\t// Equal-jitter backoff: reconnect somewhere in [backoff/2, backoff) so a\n\t\t\t// mass disconnect doesn't produce a synchronized reconnect thundering herd.\n\t\t\tconst delay = this.#backoff / 2 + Math.random() * (this.#backoff / 2);\n\t\t\tthis.#retry = setTimeout(() => this.#connect(), delay);\n\t\t\tthis.#backoff = Math.min(this.#backoff * 2, MAX_BACKOFF_MS);\n\t\t};\n\t}\n}\n","// The typed core of @bookitive/js: a thin fetch wrapper over the public\n// checkout API, addressed by org + event slug. All response and payload types\n// are generated from the backend's public swagger — they cannot drift.\nimport { DtoErrorCode } from './generated/api.js';\nimport type {\n\tDtoAPIError,\n\tDtoPublicAvailability,\n\tDtoPublicDiscount,\n\tDtoPublicEvent,\n\tDtoPublicOrder,\n\tDtoPublicOrderRequest,\n\tDtoPublicSeating,\n} from './generated/api.js';\nimport { LiveSubscription, type LiveHandlers } from './live.js';\n\nexport interface BookitiveClientOptions {\n\t/** API origin, e.g. \"https://api.bookitive.com\" (no trailing slash). */\n\tbaseUrl: string;\n\t/** Organization slug — the {org} in events.bookitive.com/{org}/{event}. */\n\torg: string;\n\t/** Event slug. */\n\tevent: string;\n\t/** Custom fetch (SSR frameworks pass their own). Defaults to global fetch. */\n\tfetch?: typeof fetch;\n}\n\n/** API failure with the backend's error envelope attached. */\nexport class BookitiveError extends Error {\n\treadonly status: number;\n\t/** The backend error code (e.g. DtoErrorCode.ErrConflict), or \"UNKNOWN\" when\n\t * the response carried no JSON envelope. */\n\treadonly type: DtoErrorCode | 'UNKNOWN';\n\n\tconstructor(status: number, body: DtoAPIError | undefined, fallback: string) {\n\t\tsuper(body?.msg ?? fallback);\n\t\tthis.name = 'BookitiveError';\n\t\tthis.status = status;\n\t\tthis.type = body?.type ?? 'UNKNOWN';\n\t}\n\n\t/** The selection raced another buyer — refresh availability and reselect. */\n\tget isConflict(): boolean {\n\t\treturn this.type === DtoErrorCode.ErrConflict || this.status === 409;\n\t}\n}\n\nexport class BookitiveClient {\n\treadonly #base: string;\n\treadonly #fetch: typeof fetch;\n\n\tconstructor(options: BookitiveClientOptions) {\n\t\tthis.#base = `${options.baseUrl.replace(/\\/$/, '')}/public/v1/orgs/${encodeURIComponent(\n\t\t\toptions.org\n\t\t)}/events/${encodeURIComponent(options.event)}`;\n\t\t// bind, or a browser's fetch throws \"Illegal invocation\" when called\n\t\t// detached from window\n\t\tthis.#fetch = options.fetch ?? ((...args) => fetch(...args));\n\t}\n\n\t/** Event identity, org branding, priced ticket types, and floor tabs. */\n\tevent(): Promise<DtoPublicEvent> {\n\t\treturn this.#get<DtoPublicEvent>('');\n\t}\n\n\t/** Static chart geometry: floors → sections → tables, seats, GA areas. */\n\tseating(): Promise<DtoPublicSeating> {\n\t\treturn this.#get<DtoPublicSeating>('/seating');\n\t}\n\n\t/** Live sellability snapshot (poll it, or use live() for push updates). */\n\tavailability(): Promise<DtoPublicAvailability> {\n\t\treturn this.#get<DtoPublicAvailability>('/availability');\n\t}\n\n\t/**\n\t * Previews a promo code: what applying it would do. Throws a\n\t * BookitiveError with status 404 for unknown/paused/out-of-window codes\n\t * and 409 (error.isConflict) when the code is fully redeemed. The order\n\t * endpoint re-validates on submit.\n\t */\n\tdiscount(code: string): Promise<DtoPublicDiscount> {\n\t\treturn this.#get<DtoPublicDiscount>(`/discount?code=${encodeURIComponent(code)}`);\n\t}\n\n\t/**\n\t * Places a bank-transfer reservation: seats are held atomically for the\n\t * event's hold TTL and payment instructions are emailed (and returned).\n\t * A 409 (error.isConflict) means a seat was just taken — refresh and\n\t * reselect.\n\t */\n\tasync checkout(order: DtoPublicOrderRequest): Promise<DtoPublicOrder> {\n\t\tconst res = await this.#fetch(`${this.#base}/orders`, {\n\t\t\tmethod: 'POST',\n\t\t\theaders: { 'Content-Type': 'application/json' },\n\t\t\tbody: JSON.stringify(order),\n\t\t});\n\t\treturn this.#parse<DtoPublicOrder>(res, 'checkout failed');\n\t}\n\n\t/**\n\t * Subscribes to live availability over websocket: `startstate` fires with\n\t * the full snapshot on every (re)connect, then `seat` deltas stream in.\n\t * Reconnects automatically with backoff; call close() when done.\n\t */\n\tlive(handlers: LiveHandlers): LiveSubscription {\n\t\treturn new LiveSubscription(`${this.#base}/live`, handlers);\n\t}\n\n\tasync #get<T>(path: string): Promise<T> {\n\t\tconst res = await this.#fetch(`${this.#base}${path}`);\n\t\treturn this.#parse<T>(res, `request failed: ${path || '/'}`);\n\t}\n\n\tasync #parse<T>(res: Response, fallback: string): Promise<T> {\n\t\tif (!res.ok) {\n\t\t\tlet body: DtoAPIError | undefined;\n\t\t\ttry {\n\t\t\t\tbody = (await res.json()) as DtoAPIError;\n\t\t\t} catch {\n\t\t\t\t// non-JSON error body — the fallback message covers it\n\t\t\t}\n\t\t\tthrow new BookitiveError(res.status, body, fallback);\n\t\t}\n\t\t// 204/205 never carry a body. Otherwise read the text and parse only\n\t\t// when it's non-empty — this avoids res.headers.get('content-length'),\n\t\t// which throws under SvelteKit's SSR fetch (response headers aren't\n\t\t// serialized by default) and would otherwise 500 any server-side load.\n\t\tif (res.status === 204 || res.status === 205) {\n\t\t\treturn undefined as T;\n\t\t}\n\t\tconst text = await res.text();\n\t\treturn (text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MAAM,KAAK,OAAO,GAAG,KAAK,KAAK,WAAW;AAAA,MACrD,QAAQ;AAAA,MACR,SAAS,EAAE,gBAAgB,mBAAmB;AAAA,MAC9C,MAAM,KAAK,UAAU,KAAK;AAAA,IAC3B,CAAC;AACD,WAAO,KAAK,OAAuB,KAAK,iBAAiB;AAAA,EAC1D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,KAAK,UAA0C;AAC9C,WAAO,IAAI,iBAAiB,GAAG,KAAK,KAAK,SAAS,QAAQ;AAAA,EAC3D;AAAA,EAEA,MAAM,KAAQ,MAA0B;AACvC,UAAM,MAAM,MAAM,KAAK,OAAO,GAAG,KAAK,KAAK,GAAG,IAAI,EAAE;AACpD,WAAO,KAAK,OAAU,KAAK,mBAAmB,QAAQ,GAAG,EAAE;AAAA,EAC5D;AAAA,EAEA,MAAM,OAAU,KAAe,UAA8B;AAC5D,QAAI,CAAC,IAAI,IAAI;AACZ,UAAI;AACJ,UAAI;AACH,eAAQ,MAAM,IAAI,KAAK;AAAA,MACxB,QAAQ;AAAA,MAER;AACA,YAAM,IAAI,eAAe,IAAI,QAAQ,MAAM,QAAQ;AAAA,IACpD;AAKA,QAAI,IAAI,WAAW,OAAO,IAAI,WAAW,KAAK;AAC7C,aAAO;AAAA,IACR;AACA,UAAM,OAAO,MAAM,IAAI,KAAK;AAC5B,WAAQ,OAAO,KAAK,MAAM,IAAI,IAAI;AAAA,EACnC;AACD;","names":["DtoErrorCode"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bookitive/js",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Typed client for the Bookitive public checkout API — event info, seating, live availability, and orders.",
5
5
  "license": "MIT",
6
6
  "type": "module",