@51eat/sdk 0.0.48 → 0.0.49

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 +15 -23
  6. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.js +46 -63
  7. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest.d.ts +2 -3
  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 +15 -23
  41. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.mjs +46 -63
  42. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest.d.mts +2 -3
  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 +91 -40
@@ -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.49";
@@ -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.49";
@@ -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.49",
10
+ "User-Agent": "@51eat/sdk/0.0.49",
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,18 @@ 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
- * eventId: "eventId",
86
- * session_id: "session_id"
67
+ * eventId: "eventId"
87
68
  * })
88
69
  */
89
70
  createPaymentIntent(request: FiveOneEat.customer.events.AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.CreatePaymentIntentTicketingResponse>;
@@ -101,10 +82,21 @@ export declare class TicketingClient {
101
82
  * @example
102
83
  * await client.customer.events.ticketing.confirmOrder({
103
84
  * eventId: "eventId",
104
- * payment_intent_id: "payment_intent_id",
105
- * session_id: "session_id"
85
+ * payment_intent_id: "payment_intent_id"
106
86
  * })
107
87
  */
108
88
  confirmOrder(request: FiveOneEat.customer.events.StoreTicketOrderRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.ConfirmOrderTicketingResponse>;
109
89
  private __confirmOrder;
90
+ /**
91
+ * @param {FiveOneEat.customer.events.ReleaseHoldTicketingRequest} request
92
+ * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
93
+ *
94
+ * @example
95
+ * await client.customer.events.ticketing.releaseHold({
96
+ * eventId: "eventId",
97
+ * sessionId: "sessionId"
98
+ * })
99
+ */
100
+ releaseHold(request: FiveOneEat.customer.events.ReleaseHoldTicketingRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<void>;
101
+ private __releaseHold;
110
102
  }
@@ -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,18 @@ 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
- * eventId: "eventId",
236
- * session_id: "session_id"
179
+ * eventId: "eventId"
237
180
  * })
238
181
  */
239
182
  createPaymentIntent(request, requestOptions) {
@@ -269,8 +212,6 @@ export class TicketingClient {
269
212
  switch (_response.error.statusCode) {
270
213
  case 401:
271
214
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
272
- case 404:
273
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
274
215
  case 422:
275
216
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
276
217
  default:
@@ -297,8 +238,7 @@ export class TicketingClient {
297
238
  * @example
298
239
  * await client.customer.events.ticketing.confirmOrder({
299
240
  * eventId: "eventId",
300
- * payment_intent_id: "payment_intent_id",
301
- * session_id: "session_id"
241
+ * payment_intent_id: "payment_intent_id"
302
242
  * })
303
243
  */
304
244
  confirmOrder(request, requestOptions) {
@@ -347,4 +287,47 @@ export class TicketingClient {
347
287
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/events/{eventId}/ticket-orders");
348
288
  });
349
289
  }
290
+ /**
291
+ * @param {FiveOneEat.customer.events.ReleaseHoldTicketingRequest} request
292
+ * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
293
+ *
294
+ * @example
295
+ * await client.customer.events.ticketing.releaseHold({
296
+ * eventId: "eventId",
297
+ * sessionId: "sessionId"
298
+ * })
299
+ */
300
+ releaseHold(request, requestOptions) {
301
+ return core.HttpResponsePromise.fromPromise(this.__releaseHold(request, requestOptions));
302
+ }
303
+ __releaseHold(request, requestOptions) {
304
+ return __awaiter(this, void 0, void 0, function* () {
305
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
306
+ const { eventId, sessionId } = request;
307
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
308
+ 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);
309
+ const _response = yield core.fetcher({
310
+ 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)}`),
311
+ method: "DELETE",
312
+ headers: _headers,
313
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
314
+ 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,
315
+ 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,
316
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
317
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
318
+ logging: this._options.logging,
319
+ });
320
+ if (_response.ok) {
321
+ return { data: undefined, rawResponse: _response.rawResponse };
322
+ }
323
+ if (_response.error.reason === "status-code") {
324
+ throw new errors.FiveOneEatError({
325
+ statusCode: _response.error.statusCode,
326
+ body: _response.error.body,
327
+ rawResponse: _response.rawResponse,
328
+ });
329
+ }
330
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/events/{eventId}/ticket-holds/{sessionId}");
331
+ });
332
+ }
350
333
  }
@@ -1,11 +1,10 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * eventId: "eventId",
5
- * session_id: "session_id"
4
+ * eventId: "eventId"
6
5
  * }
7
6
  */
8
7
  export interface AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest {
9
8
  eventId: string;
10
- session_id: string;
9
+ payment_method_id?: string | null;
11
10
  }
@@ -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
+ }
@@ -0,0 +1,74 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
+ import { mergeHeaders } from "../../../../core/headers.mjs";
13
+ import * as core from "../../../../core/index.mjs";
14
+ import * as environments from "../../../../environments.mjs";
15
+ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
+ import * as errors from "../../../../errors/index.mjs";
17
+ import * as FiveOneEat from "../../../index.mjs";
18
+ export class CustomerEventsClient {
19
+ constructor(options = {}) {
20
+ this._options = normalizeClientOptionsWithAuth(options);
21
+ }
22
+ /**
23
+ * Release the TicketCart holds for the authenticated user and event.
24
+ *
25
+ * @param {FiveOneEat.ReleaseTicketHoldRequest} request
26
+ * @param {CustomerEventsClient.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link FiveOneEat.UnauthorizedError}
29
+ *
30
+ * @example
31
+ * await client.customerEvents.releaseTicketHold({
32
+ * eventId: "eventId",
33
+ * cartId: "cartId"
34
+ * })
35
+ */
36
+ releaseTicketHold(request, requestOptions) {
37
+ return core.HttpResponsePromise.fromPromise(this.__releaseTicketHold(request, requestOptions));
38
+ }
39
+ __releaseTicketHold(request, requestOptions) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
42
+ const { eventId, cartId } = request;
43
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
44
+ 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);
45
+ const _response = yield core.fetcher({
46
+ 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(cartId)}`),
47
+ method: "DELETE",
48
+ headers: _headers,
49
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
50
+ 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,
51
+ 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,
52
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
53
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
54
+ logging: this._options.logging,
55
+ });
56
+ if (_response.ok) {
57
+ return { data: undefined, rawResponse: _response.rawResponse };
58
+ }
59
+ if (_response.error.reason === "status-code") {
60
+ switch (_response.error.statusCode) {
61
+ case 401:
62
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
63
+ default:
64
+ throw new errors.FiveOneEatError({
65
+ statusCode: _response.error.statusCode,
66
+ body: _response.error.body,
67
+ rawResponse: _response.rawResponse,
68
+ });
69
+ }
70
+ }
71
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/events/{eventId}/ticket-holds/{cartId}");
72
+ });
73
+ }
74
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";