@51eat/sdk 0.0.48 → 0.0.50

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.
Files changed (72) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +13 -8
  4. package/dist/cjs/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.ts +1 -1
  5. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.d.ts +21 -22
  6. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.js +52 -62
  7. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest.d.ts +18 -2
  8. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/StoreTicketOrderRequest.d.ts +1 -3
  9. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.ts +14 -8
  10. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.ts +1 -1
  11. package/dist/cjs/api/resources/customerEvents/client/Client.d.ts +29 -0
  12. package/dist/cjs/api/resources/customerEvents/client/Client.js +111 -0
  13. package/dist/cjs/api/resources/customerEvents/client/index.d.ts +1 -0
  14. package/dist/cjs/api/resources/customerEvents/client/index.js +17 -0
  15. package/dist/cjs/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.d.ts +11 -0
  16. package/dist/cjs/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.js +3 -0
  17. package/dist/cjs/api/resources/customerEvents/client/requests/index.d.ts +1 -0
  18. package/dist/cjs/api/resources/customerEvents/client/requests/index.js +2 -0
  19. package/dist/cjs/api/resources/customerEvents/exports.d.ts +2 -0
  20. package/dist/cjs/api/resources/customerEvents/exports.js +21 -0
  21. package/dist/cjs/api/resources/customerEvents/index.d.ts +1 -0
  22. package/dist/cjs/api/resources/customerEvents/index.js +17 -0
  23. package/dist/cjs/api/resources/index.d.ts +2 -0
  24. package/dist/cjs/api/resources/index.js +3 -1
  25. package/dist/cjs/api/types/BusinessEventOrder.d.ts +2 -10
  26. package/dist/cjs/api/types/BusinessEventOrderDetail.d.ts +2 -12
  27. package/dist/cjs/api/types/BusinessProductOrder.d.ts +1 -9
  28. package/dist/cjs/api/types/CustomerProductOrder.d.ts +1 -5
  29. package/dist/cjs/api/types/TicketOrder.d.ts +1 -7
  30. package/dist/cjs/api/types/Transaction.d.ts +16 -0
  31. package/dist/cjs/api/types/Transaction.js +3 -0
  32. package/dist/cjs/api/types/index.d.ts +1 -0
  33. package/dist/cjs/api/types/index.js +1 -0
  34. package/dist/cjs/version.d.ts +1 -1
  35. package/dist/cjs/version.js +1 -1
  36. package/dist/esm/BaseClient.mjs +2 -2
  37. package/dist/esm/Client.d.mts +3 -0
  38. package/dist/esm/Client.mjs +5 -0
  39. package/dist/esm/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.mts +1 -1
  40. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.d.mts +21 -22
  41. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.mjs +52 -62
  42. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest.d.mts +18 -2
  43. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/StoreTicketOrderRequest.d.mts +1 -3
  44. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.mts +14 -8
  45. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.mts +1 -1
  46. package/dist/esm/api/resources/customerEvents/client/Client.d.mts +29 -0
  47. package/dist/esm/api/resources/customerEvents/client/Client.mjs +74 -0
  48. package/dist/esm/api/resources/customerEvents/client/index.d.mts +1 -0
  49. package/dist/esm/api/resources/customerEvents/client/index.mjs +1 -0
  50. package/dist/esm/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.d.mts +11 -0
  51. package/dist/esm/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.mjs +2 -0
  52. package/dist/esm/api/resources/customerEvents/client/requests/index.d.mts +1 -0
  53. package/dist/esm/api/resources/customerEvents/client/requests/index.mjs +1 -0
  54. package/dist/esm/api/resources/customerEvents/exports.d.mts +2 -0
  55. package/dist/esm/api/resources/customerEvents/exports.mjs +3 -0
  56. package/dist/esm/api/resources/customerEvents/index.d.mts +1 -0
  57. package/dist/esm/api/resources/customerEvents/index.mjs +1 -0
  58. package/dist/esm/api/resources/index.d.mts +2 -0
  59. package/dist/esm/api/resources/index.mjs +2 -0
  60. package/dist/esm/api/types/BusinessEventOrder.d.mts +2 -10
  61. package/dist/esm/api/types/BusinessEventOrderDetail.d.mts +2 -12
  62. package/dist/esm/api/types/BusinessProductOrder.d.mts +1 -9
  63. package/dist/esm/api/types/CustomerProductOrder.d.mts +1 -5
  64. package/dist/esm/api/types/TicketOrder.d.mts +1 -7
  65. package/dist/esm/api/types/Transaction.d.mts +16 -0
  66. package/dist/esm/api/types/Transaction.mjs +2 -0
  67. package/dist/esm/api/types/index.d.mts +1 -0
  68. package/dist/esm/api/types/index.mjs +1 -0
  69. package/dist/esm/version.d.mts +1 -1
  70. package/dist/esm/version.mjs +1 -1
  71. package/package.json +12 -1
  72. package/reference.md +97 -39
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -8,6 +8,8 @@ export * from "./businessProducts/types/index.js";
8
8
  export * from "./customer/client/requests/index.js";
9
9
  export * as customer from "./customer/index.js";
10
10
  export * from "./customer/types/index.js";
11
+ export * from "./customerEvents/client/requests/index.js";
12
+ export * as customerEvents from "./customerEvents/index.js";
11
13
  export * from "./customerMessaging/client/requests/index.js";
12
14
  export * as customerMessaging from "./customerMessaging/index.js";
13
15
  export * from "./customerMessaging/types/index.js";
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.serveAd = exports.recordClick = exports.customerMyAccount = exports.customerMessaging = exports.customer = exports.businessProducts = exports.businessMessaging = exports.business = void 0;
39
+ exports.serveAd = exports.recordClick = exports.customerMyAccount = exports.customerMessaging = exports.customerEvents = exports.customer = exports.businessProducts = exports.businessMessaging = exports.business = void 0;
40
40
  exports.business = __importStar(require("./business/index.js"));
41
41
  __exportStar(require("./businessMessaging/client/requests/index.js"), exports);
42
42
  exports.businessMessaging = __importStar(require("./businessMessaging/index.js"));
@@ -47,6 +47,8 @@ __exportStar(require("./businessProducts/types/index.js"), exports);
47
47
  __exportStar(require("./customer/client/requests/index.js"), exports);
48
48
  exports.customer = __importStar(require("./customer/index.js"));
49
49
  __exportStar(require("./customer/types/index.js"), exports);
50
+ __exportStar(require("./customerEvents/client/requests/index.js"), exports);
51
+ exports.customerEvents = __importStar(require("./customerEvents/index.js"));
50
52
  __exportStar(require("./customerMessaging/client/requests/index.js"), exports);
51
53
  exports.customerMessaging = __importStar(require("./customerMessaging/index.js"));
52
54
  __exportStar(require("./customerMessaging/types/index.js"), exports);
@@ -1,17 +1,9 @@
1
+ import type * as FiveOneEat from "../index.js";
1
2
  export interface BusinessEventOrder {
2
3
  id: string;
3
4
  event_id: string;
4
5
  order_number: string;
5
- status: string;
6
- subtotal: string;
7
- fees: string;
8
- total_amount: string;
9
- refunded_amount: string;
10
- remaining_refundable_amount: string;
11
- customer_name: string;
12
- customer_email: string;
13
- payment_completed_at: string;
14
- refunded_at: string;
6
+ transaction?: FiveOneEat.Transaction | undefined;
15
7
  tickets_count?: number | undefined;
16
8
  user?: BusinessEventOrder.User | undefined;
17
9
  created_at: string;
@@ -1,19 +1,9 @@
1
+ import type * as FiveOneEat from "../index.js";
1
2
  export interface BusinessEventOrderDetail {
2
3
  id: string;
3
4
  event_id: string;
4
5
  order_number: string;
5
- status: string;
6
- subtotal: string;
7
- fees: string;
8
- total_amount: string;
9
- refunded_amount: string;
10
- remaining_refundable_amount: string;
11
- customer_name: string;
12
- customer_email: string;
13
- stripe_payment_intent_id: string;
14
- payment_completed_at: string;
15
- refunded_at: string;
16
- refund_reason: string;
6
+ transaction?: FiveOneEat.Transaction | undefined;
17
7
  user?: BusinessEventOrderDetail.User | undefined;
18
8
  tickets?: string | undefined;
19
9
  created_at: string;
@@ -6,14 +6,8 @@ export interface BusinessProductOrder {
6
6
  fulfillment_status: string;
7
7
  fulfillment_method: string | null;
8
8
  fulfillment_type: string | null;
9
- subtotal: number;
10
- tax_amount: number;
11
- shipping_amount: number;
12
9
  discount_amount: number;
13
- total_amount: number;
14
- refunded_amount: number;
15
- customer_email: string;
16
- customer_name: string;
10
+ transaction?: FiveOneEat.Transaction | undefined;
17
11
  customer_phone: string | null;
18
12
  shipping_address: Record<string, unknown> | null;
19
13
  billing_address: Record<string, unknown> | null;
@@ -24,10 +18,8 @@ export interface BusinessProductOrder {
24
18
  user?: BusinessProductOrder.User | undefined;
25
19
  items?: FiveOneEat.BusinessProductOrderItem[] | undefined;
26
20
  shipment?: (BusinessProductOrder.Shipment | null) | undefined;
27
- payment_completed_at: string | null;
28
21
  fulfilled_at: string | null;
29
22
  picked_up_at: string | null;
30
- refunded_at: string | null;
31
23
  created_at: string | null;
32
24
  updated_at: string | null;
33
25
  }
@@ -5,18 +5,14 @@ export interface CustomerProductOrder {
5
5
  status: string;
6
6
  fulfillment_status: string;
7
7
  fulfillment_method: string;
8
- subtotal: string;
9
- tax_amount: string;
10
- shipping_amount: string;
11
8
  discount_amount: string;
12
- total_amount: string;
9
+ transaction?: FiveOneEat.Transaction | undefined;
13
10
  tracking_number: string | null;
14
11
  tracking_url: string | null;
15
12
  shipping_address: unknown[] | null;
16
13
  billing_address: unknown[] | null;
17
14
  business?: CustomerProductOrder.Business | undefined;
18
15
  items?: FiveOneEat.CustomerProductOrderItem[] | undefined;
19
- payment_completed_at: string | null;
20
16
  fulfilled_at: string | null;
21
17
  created_at: string | null;
22
18
  }
@@ -2,12 +2,6 @@ import type * as FiveOneEat from "../index.js";
2
2
  export interface TicketOrder {
3
3
  id: string;
4
4
  order_number: string;
5
- status: string;
6
- subtotal: string;
7
- fees: string;
8
- total_amount: string;
9
- customer_name: string;
10
- customer_email: string;
11
- payment_completed_at: string;
5
+ transaction?: FiveOneEat.Transaction | undefined;
12
6
  tickets?: FiveOneEat.Ticket[] | undefined;
13
7
  }
@@ -0,0 +1,16 @@
1
+ export interface Transaction {
2
+ ulid: string;
3
+ status: string;
4
+ subtotal: string;
5
+ tax_amount: string;
6
+ shipping_amount: string;
7
+ platform_fee: string;
8
+ total_amount: string;
9
+ refunded_amount: string;
10
+ customer_name: string | null;
11
+ customer_email: string;
12
+ stripe_payment_intent_id: string | null;
13
+ payment_completed_at: string | null;
14
+ refunded_at: string | null;
15
+ refund_reason: string | null;
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -138,5 +138,6 @@ export * from "./Ticket.js";
138
138
  export * from "./TicketOrder.js";
139
139
  export * from "./TicketOrderResponse.js";
140
140
  export * from "./TicketResponse.js";
141
+ export * from "./Transaction.js";
141
142
  export * from "./UnauthorizedErrorBody.js";
142
143
  export * from "./UnprocessableEntityErrorBody.js";
@@ -154,5 +154,6 @@ __exportStar(require("./Ticket.js"), exports);
154
154
  __exportStar(require("./TicketOrder.js"), exports);
155
155
  __exportStar(require("./TicketOrderResponse.js"), exports);
156
156
  __exportStar(require("./TicketResponse.js"), exports);
157
+ __exportStar(require("./Transaction.js"), exports);
157
158
  __exportStar(require("./UnauthorizedErrorBody.js"), exports);
158
159
  __exportStar(require("./UnprocessableEntityErrorBody.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.48";
1
+ export declare const SDK_VERSION = "0.0.50";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.48";
4
+ exports.SDK_VERSION = "0.0.50";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@51eat/sdk",
9
- "X-Fern-SDK-Version": "0.0.48",
10
- "User-Agent": "@51eat/sdk/0.0.48",
9
+ "X-Fern-SDK-Version": "0.0.50",
10
+ "User-Agent": "@51eat/sdk/0.0.50",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -2,6 +2,7 @@ import { BusinessClient } from "./api/resources/business/client/Client.mjs";
2
2
  import { BusinessMessagingClient } from "./api/resources/businessMessaging/client/Client.mjs";
3
3
  import { BusinessProductsClient } from "./api/resources/businessProducts/client/Client.mjs";
4
4
  import { CustomerClient } from "./api/resources/customer/client/Client.mjs";
5
+ import { CustomerEventsClient } from "./api/resources/customerEvents/client/Client.mjs";
5
6
  import { CustomerMessagingClient } from "./api/resources/customerMessaging/client/Client.mjs";
6
7
  import { CustomerMyAccountClient } from "./api/resources/customerMyAccount/client/Client.mjs";
7
8
  import { RecordClickClient } from "./api/resources/recordClick/client/Client.mjs";
@@ -18,6 +19,7 @@ export declare class FiveOneEatClient {
18
19
  protected readonly _options: NormalizedClientOptionsWithAuth<FiveOneEatClient.Options>;
19
20
  protected _businessMessaging: BusinessMessagingClient | undefined;
20
21
  protected _businessProducts: BusinessProductsClient | undefined;
22
+ protected _customerEvents: CustomerEventsClient | undefined;
21
23
  protected _customerMessaging: CustomerMessagingClient | undefined;
22
24
  protected _customerMyAccount: CustomerMyAccountClient | undefined;
23
25
  protected _customer: CustomerClient | undefined;
@@ -27,6 +29,7 @@ export declare class FiveOneEatClient {
27
29
  constructor(options?: FiveOneEatClient.Options);
28
30
  get businessMessaging(): BusinessMessagingClient;
29
31
  get businessProducts(): BusinessProductsClient;
32
+ get customerEvents(): CustomerEventsClient;
30
33
  get customerMessaging(): CustomerMessagingClient;
31
34
  get customerMyAccount(): CustomerMyAccountClient;
32
35
  get customer(): CustomerClient;
@@ -12,6 +12,7 @@ import { BusinessClient } from "./api/resources/business/client/Client.mjs";
12
12
  import { BusinessMessagingClient } from "./api/resources/businessMessaging/client/Client.mjs";
13
13
  import { BusinessProductsClient } from "./api/resources/businessProducts/client/Client.mjs";
14
14
  import { CustomerClient } from "./api/resources/customer/client/Client.mjs";
15
+ import { CustomerEventsClient } from "./api/resources/customerEvents/client/Client.mjs";
15
16
  import { CustomerMessagingClient } from "./api/resources/customerMessaging/client/Client.mjs";
16
17
  import { CustomerMyAccountClient } from "./api/resources/customerMyAccount/client/Client.mjs";
17
18
  import { RecordClickClient } from "./api/resources/recordClick/client/Client.mjs";
@@ -30,6 +31,10 @@ export class FiveOneEatClient {
30
31
  var _a;
31
32
  return ((_a = this._businessProducts) !== null && _a !== void 0 ? _a : (this._businessProducts = new BusinessProductsClient(this._options)));
32
33
  }
34
+ get customerEvents() {
35
+ var _a;
36
+ return ((_a = this._customerEvents) !== null && _a !== void 0 ? _a : (this._customerEvents = new CustomerEventsClient(this._options)));
37
+ }
33
38
  get customerMessaging() {
34
39
  var _a;
35
40
  return ((_a = this._customerMessaging) !== null && _a !== void 0 ? _a : (this._customerMessaging = new CustomerMessagingClient(this._options)));
@@ -6,7 +6,7 @@ export interface CreatePaymentIntentCartResponse {
6
6
  tax_amount: string;
7
7
  tax_calculation: CreatePaymentIntentCartResponse.TaxCalculation | null;
8
8
  shipping_amount: string;
9
- shipping_method: string;
9
+ shipping_method: unknown | null;
10
10
  platform_fee: string;
11
11
  total_amount: string;
12
12
  }
@@ -31,23 +31,6 @@ export declare class TicketingClient {
31
31
  */
32
32
  holdTickets(request: FiveOneEat.customer.events.StoreTicketHoldRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.HoldTicketsTicketingResponse>;
33
33
  private __holdTickets;
34
- /**
35
- * Release all active holds for the given session, freeing the tickets for others.
36
- *
37
- * @param {FiveOneEat.customer.events.ReleaseHoldTicketingRequest} request
38
- * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
39
- *
40
- * @throws {@link FiveOneEat.UnauthorizedError}
41
- * @throws {@link FiveOneEat.NotFoundError}
42
- *
43
- * @example
44
- * await client.customer.events.ticketing.releaseHold({
45
- * eventId: "eventId",
46
- * sessionId: "sessionId"
47
- * })
48
- */
49
- releaseHold(request: FiveOneEat.customer.events.ReleaseHoldTicketingRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<void>;
50
- private __releaseHold;
51
34
  /**
52
35
  * Preview the subtotal, platform fee, and total for a given ticket selection.
53
36
  *
@@ -70,20 +53,25 @@ export declare class TicketingClient {
70
53
  calculatePrice(request: FiveOneEat.customer.events.CalculatePriceRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.CalculatePriceTicketingResponse>;
71
54
  private __calculatePrice;
72
55
  /**
73
- * Create a Stripe payment intent for the tickets held in the given session.
56
+ * Create a Stripe payment intent for the tickets held in the cart for the given event.
74
57
  * Returns a client_secret for the mobile app to confirm payment with Stripe.
75
58
  *
76
59
  * @param {FiveOneEat.customer.events.AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest} request
77
60
  * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
78
61
  *
79
62
  * @throws {@link FiveOneEat.UnauthorizedError}
80
- * @throws {@link FiveOneEat.NotFoundError}
81
63
  * @throws {@link FiveOneEat.UnprocessableEntityError}
82
64
  *
83
65
  * @example
84
66
  * await client.customer.events.ticketing.createPaymentIntent({
85
67
  * eventId: "eventId",
86
- * session_id: "session_id"
68
+ * billing_address: {
69
+ * line1: "line1",
70
+ * city: "city",
71
+ * state: "state",
72
+ * postal_code: "postal_code",
73
+ * country: "country"
74
+ * }
87
75
  * })
88
76
  */
89
77
  createPaymentIntent(request: FiveOneEat.customer.events.AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.CreatePaymentIntentTicketingResponse>;
@@ -101,10 +89,21 @@ export declare class TicketingClient {
101
89
  * @example
102
90
  * await client.customer.events.ticketing.confirmOrder({
103
91
  * eventId: "eventId",
104
- * payment_intent_id: "payment_intent_id",
105
- * session_id: "session_id"
92
+ * payment_intent_id: "payment_intent_id"
106
93
  * })
107
94
  */
108
95
  confirmOrder(request: FiveOneEat.customer.events.StoreTicketOrderRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.ConfirmOrderTicketingResponse>;
109
96
  private __confirmOrder;
97
+ /**
98
+ * @param {FiveOneEat.customer.events.ReleaseHoldTicketingRequest} request
99
+ * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
100
+ *
101
+ * @example
102
+ * await client.customer.events.ticketing.releaseHold({
103
+ * eventId: "eventId",
104
+ * sessionId: "sessionId"
105
+ * })
106
+ */
107
+ releaseHold(request: FiveOneEat.customer.events.ReleaseHoldTicketingRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<void>;
108
+ private __releaseHold;
110
109
  }
@@ -97,61 +97,6 @@ export class TicketingClient {
97
97
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/events/{eventId}/ticket-holds");
98
98
  });
99
99
  }
100
- /**
101
- * Release all active holds for the given session, freeing the tickets for others.
102
- *
103
- * @param {FiveOneEat.customer.events.ReleaseHoldTicketingRequest} request
104
- * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
105
- *
106
- * @throws {@link FiveOneEat.UnauthorizedError}
107
- * @throws {@link FiveOneEat.NotFoundError}
108
- *
109
- * @example
110
- * await client.customer.events.ticketing.releaseHold({
111
- * eventId: "eventId",
112
- * sessionId: "sessionId"
113
- * })
114
- */
115
- releaseHold(request, requestOptions) {
116
- return core.HttpResponsePromise.fromPromise(this.__releaseHold(request, requestOptions));
117
- }
118
- __releaseHold(request, requestOptions) {
119
- return __awaiter(this, void 0, void 0, function* () {
120
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
121
- const { eventId, sessionId } = request;
122
- const _authRequest = yield this._options.authProvider.getAuthRequest();
123
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
124
- const _response = yield core.fetcher({
125
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/events/${core.url.encodePathParam(eventId)}/ticket-holds/${core.url.encodePathParam(sessionId)}`),
126
- method: "DELETE",
127
- headers: _headers,
128
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
129
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
130
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
131
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
132
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
133
- logging: this._options.logging,
134
- });
135
- if (_response.ok) {
136
- return { data: undefined, rawResponse: _response.rawResponse };
137
- }
138
- if (_response.error.reason === "status-code") {
139
- switch (_response.error.statusCode) {
140
- case 401:
141
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
142
- case 404:
143
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
144
- default:
145
- throw new errors.FiveOneEatError({
146
- statusCode: _response.error.statusCode,
147
- body: _response.error.body,
148
- rawResponse: _response.rawResponse,
149
- });
150
- }
151
- }
152
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/events/{eventId}/ticket-holds/{sessionId}");
153
- });
154
- }
155
100
  /**
156
101
  * Preview the subtotal, platform fee, and total for a given ticket selection.
157
102
  *
@@ -220,20 +165,25 @@ export class TicketingClient {
220
165
  });
221
166
  }
222
167
  /**
223
- * Create a Stripe payment intent for the tickets held in the given session.
168
+ * Create a Stripe payment intent for the tickets held in the cart for the given event.
224
169
  * Returns a client_secret for the mobile app to confirm payment with Stripe.
225
170
  *
226
171
  * @param {FiveOneEat.customer.events.AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest} request
227
172
  * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
228
173
  *
229
174
  * @throws {@link FiveOneEat.UnauthorizedError}
230
- * @throws {@link FiveOneEat.NotFoundError}
231
175
  * @throws {@link FiveOneEat.UnprocessableEntityError}
232
176
  *
233
177
  * @example
234
178
  * await client.customer.events.ticketing.createPaymentIntent({
235
179
  * eventId: "eventId",
236
- * session_id: "session_id"
180
+ * billing_address: {
181
+ * line1: "line1",
182
+ * city: "city",
183
+ * state: "state",
184
+ * postal_code: "postal_code",
185
+ * country: "country"
186
+ * }
237
187
  * })
238
188
  */
239
189
  createPaymentIntent(request, requestOptions) {
@@ -269,8 +219,6 @@ export class TicketingClient {
269
219
  switch (_response.error.statusCode) {
270
220
  case 401:
271
221
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
272
- case 404:
273
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
274
222
  case 422:
275
223
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
276
224
  default:
@@ -297,8 +245,7 @@ export class TicketingClient {
297
245
  * @example
298
246
  * await client.customer.events.ticketing.confirmOrder({
299
247
  * eventId: "eventId",
300
- * payment_intent_id: "payment_intent_id",
301
- * session_id: "session_id"
248
+ * payment_intent_id: "payment_intent_id"
302
249
  * })
303
250
  */
304
251
  confirmOrder(request, requestOptions) {
@@ -347,4 +294,47 @@ export class TicketingClient {
347
294
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/events/{eventId}/ticket-orders");
348
295
  });
349
296
  }
297
+ /**
298
+ * @param {FiveOneEat.customer.events.ReleaseHoldTicketingRequest} request
299
+ * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
300
+ *
301
+ * @example
302
+ * await client.customer.events.ticketing.releaseHold({
303
+ * eventId: "eventId",
304
+ * sessionId: "sessionId"
305
+ * })
306
+ */
307
+ releaseHold(request, requestOptions) {
308
+ return core.HttpResponsePromise.fromPromise(this.__releaseHold(request, requestOptions));
309
+ }
310
+ __releaseHold(request, requestOptions) {
311
+ return __awaiter(this, void 0, void 0, function* () {
312
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
313
+ const { eventId, sessionId } = request;
314
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
315
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
316
+ const _response = yield core.fetcher({
317
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/events/${core.url.encodePathParam(eventId)}/ticket-holds/${core.url.encodePathParam(sessionId)}`),
318
+ method: "DELETE",
319
+ headers: _headers,
320
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
321
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
322
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
323
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
324
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
325
+ logging: this._options.logging,
326
+ });
327
+ if (_response.ok) {
328
+ return { data: undefined, rawResponse: _response.rawResponse };
329
+ }
330
+ if (_response.error.reason === "status-code") {
331
+ throw new errors.FiveOneEatError({
332
+ statusCode: _response.error.statusCode,
333
+ body: _response.error.body,
334
+ rawResponse: _response.rawResponse,
335
+ });
336
+ }
337
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/events/{eventId}/ticket-holds/{sessionId}");
338
+ });
339
+ }
350
340
  }
@@ -2,10 +2,26 @@
2
2
  * @example
3
3
  * {
4
4
  * eventId: "eventId",
5
- * session_id: "session_id"
5
+ * billing_address: {
6
+ * line1: "line1",
7
+ * city: "city",
8
+ * state: "state",
9
+ * postal_code: "postal_code",
10
+ * country: "country"
11
+ * }
6
12
  * }
7
13
  */
8
14
  export interface AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest {
9
15
  eventId: string;
10
- session_id: string;
16
+ payment_method_id?: string | null;
17
+ billing_address: AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest.BillingAddress;
18
+ }
19
+ export declare namespace AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest {
20
+ interface BillingAddress {
21
+ line1: string;
22
+ city: string;
23
+ state: string;
24
+ postal_code: string;
25
+ country: string;
26
+ }
11
27
  }
@@ -2,12 +2,10 @@
2
2
  * @example
3
3
  * {
4
4
  * eventId: "eventId",
5
- * payment_intent_id: "payment_intent_id",
6
- * session_id: "session_id"
5
+ * payment_intent_id: "payment_intent_id"
7
6
  * }
8
7
  */
9
8
  export interface StoreTicketOrderRequest {
10
9
  eventId: string;
11
10
  payment_intent_id: string;
12
- session_id: string;
13
11
  }
@@ -1,13 +1,19 @@
1
1
  export interface CreatePaymentIntentTicketingResponse {
2
- data: CreatePaymentIntentTicketingResponse.Data;
2
+ status: string;
3
+ client_secret: string;
4
+ payment_intent_id: string;
5
+ subtotal: string;
6
+ tax_amount: string;
7
+ tax_calculation: CreatePaymentIntentTicketingResponse.TaxCalculation | null;
8
+ shipping_amount: string;
9
+ shipping_method: unknown | null;
10
+ platform_fee: string;
11
+ total_amount: string;
3
12
  }
4
13
  export declare namespace CreatePaymentIntentTicketingResponse {
5
- interface Data {
6
- payment_intent_id: string;
7
- client_secret: string;
8
- session_id: string;
9
- subtotal: string;
10
- platform_fee: string;
11
- total_amount: string;
14
+ interface TaxCalculation {
15
+ id: string;
16
+ amount_total: string;
17
+ tax_amount_exclusive: string;
12
18
  }
13
19
  }
@@ -3,7 +3,7 @@ export interface HoldTicketsTicketingResponse {
3
3
  }
4
4
  export declare namespace HoldTicketsTicketingResponse {
5
5
  interface Data {
6
- session_id: string | null;
6
+ ticket_cart_id: string;
7
7
  expires_at: string;
8
8
  time_remaining_seconds: string;
9
9
  holds: string;
@@ -0,0 +1,29 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
+ import * as core from "../../../../core/index.mjs";
4
+ import * as FiveOneEat from "../../../index.mjs";
5
+ export declare namespace CustomerEventsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class CustomerEventsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<CustomerEventsClient.Options>;
12
+ constructor(options?: CustomerEventsClient.Options);
13
+ /**
14
+ * Release the TicketCart holds for the authenticated user and event.
15
+ *
16
+ * @param {FiveOneEat.ReleaseTicketHoldRequest} request
17
+ * @param {CustomerEventsClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link FiveOneEat.UnauthorizedError}
20
+ *
21
+ * @example
22
+ * await client.customerEvents.releaseTicketHold({
23
+ * eventId: "eventId",
24
+ * cartId: "cartId"
25
+ * })
26
+ */
27
+ releaseTicketHold(request: FiveOneEat.ReleaseTicketHoldRequest, requestOptions?: CustomerEventsClient.RequestOptions): core.HttpResponsePromise<void>;
28
+ private __releaseTicketHold;
29
+ }