@51eat/sdk 0.0.47 → 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 (134) 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/client/requests/CreatePaymentIntentRequest.d.ts +1 -0
  5. package/dist/cjs/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.ts +2 -1
  6. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.d.ts +15 -23
  7. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.js +46 -63
  8. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest.d.ts +2 -3
  9. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/StoreTicketOrderRequest.d.ts +1 -3
  10. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.ts +14 -8
  11. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.ts +1 -1
  12. package/dist/cjs/api/resources/customer/resources/me/client/Client.d.ts +3 -0
  13. package/dist/cjs/api/resources/customer/resources/me/client/Client.js +9 -4
  14. package/dist/cjs/api/resources/customer/resources/me/resources/index.d.ts +3 -0
  15. package/dist/cjs/api/resources/customer/resources/me/resources/index.js +4 -1
  16. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/Client.d.ts +88 -0
  17. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/Client.js +329 -0
  18. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/index.js +17 -0
  20. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/DeletePaymentMethodsRequest.d.ts +9 -0
  21. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/DeletePaymentMethodsRequest.js +3 -0
  22. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/SetDefaultPaymentMethodsRequest.d.ts +9 -0
  23. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/SetDefaultPaymentMethodsRequest.js +3 -0
  24. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/StorePaymentMethodRequest.d.ts +10 -0
  25. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/StorePaymentMethodRequest.js +3 -0
  26. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/index.d.ts +3 -0
  27. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/index.js +2 -0
  28. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/exports.d.ts +2 -0
  29. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/exports.js +21 -0
  30. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/index.d.ts +2 -0
  31. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/index.js +18 -0
  32. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/AddPaymentMethodsResponse.d.ts +4 -0
  33. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/AddPaymentMethodsResponse.js +3 -0
  34. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/SetDefaultPaymentMethodsResponse.d.ts +4 -0
  35. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/SetDefaultPaymentMethodsResponse.js +3 -0
  36. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/SetupIntentPaymentMethodsResponse.d.ts +3 -0
  37. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/SetupIntentPaymentMethodsResponse.js +3 -0
  38. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/index.d.ts +3 -0
  39. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/index.js +19 -0
  40. package/dist/cjs/api/resources/customerEvents/client/Client.d.ts +29 -0
  41. package/dist/cjs/api/resources/customerEvents/client/Client.js +111 -0
  42. package/dist/cjs/api/resources/customerEvents/client/index.d.ts +1 -0
  43. package/dist/cjs/api/resources/customerEvents/client/index.js +17 -0
  44. package/dist/cjs/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.d.ts +11 -0
  45. package/dist/cjs/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.js +3 -0
  46. package/dist/cjs/api/resources/customerEvents/client/requests/index.d.ts +1 -0
  47. package/dist/cjs/api/resources/customerEvents/client/requests/index.js +2 -0
  48. package/dist/cjs/api/resources/customerEvents/exports.d.ts +2 -0
  49. package/dist/cjs/api/resources/customerEvents/exports.js +21 -0
  50. package/dist/cjs/api/resources/customerEvents/index.d.ts +1 -0
  51. package/dist/cjs/api/resources/customerEvents/index.js +17 -0
  52. package/dist/cjs/api/resources/index.d.ts +2 -0
  53. package/dist/cjs/api/resources/index.js +3 -1
  54. package/dist/cjs/api/types/BusinessEventOrder.d.ts +2 -10
  55. package/dist/cjs/api/types/BusinessEventOrderDetail.d.ts +2 -12
  56. package/dist/cjs/api/types/BusinessProductOrder.d.ts +1 -9
  57. package/dist/cjs/api/types/CustomerProductOrder.d.ts +1 -5
  58. package/dist/cjs/api/types/PaymentMethod.d.ts +8 -0
  59. package/dist/cjs/api/types/PaymentMethod.js +3 -0
  60. package/dist/cjs/api/types/TicketOrder.d.ts +1 -7
  61. package/dist/cjs/api/types/Transaction.d.ts +16 -0
  62. package/dist/cjs/api/types/Transaction.js +3 -0
  63. package/dist/cjs/api/types/index.d.ts +2 -0
  64. package/dist/cjs/api/types/index.js +2 -0
  65. package/dist/cjs/version.d.ts +1 -1
  66. package/dist/cjs/version.js +1 -1
  67. package/dist/esm/BaseClient.mjs +2 -2
  68. package/dist/esm/Client.d.mts +3 -0
  69. package/dist/esm/Client.mjs +5 -0
  70. package/dist/esm/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.d.mts +1 -0
  71. package/dist/esm/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.mts +2 -1
  72. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.d.mts +15 -23
  73. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.mjs +46 -63
  74. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest.d.mts +2 -3
  75. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/StoreTicketOrderRequest.d.mts +1 -3
  76. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.mts +14 -8
  77. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.mts +1 -1
  78. package/dist/esm/api/resources/customer/resources/me/client/Client.d.mts +3 -0
  79. package/dist/esm/api/resources/customer/resources/me/client/Client.mjs +5 -0
  80. package/dist/esm/api/resources/customer/resources/me/resources/index.d.mts +3 -0
  81. package/dist/esm/api/resources/customer/resources/me/resources/index.mjs +3 -0
  82. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/Client.d.mts +88 -0
  83. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/Client.mjs +292 -0
  84. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/index.d.mts +1 -0
  85. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/index.mjs +1 -0
  86. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/DeletePaymentMethodsRequest.d.mts +9 -0
  87. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/DeletePaymentMethodsRequest.mjs +2 -0
  88. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/SetDefaultPaymentMethodsRequest.d.mts +9 -0
  89. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/SetDefaultPaymentMethodsRequest.mjs +2 -0
  90. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/StorePaymentMethodRequest.d.mts +10 -0
  91. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/StorePaymentMethodRequest.mjs +2 -0
  92. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/index.d.mts +3 -0
  93. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/index.mjs +1 -0
  94. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/exports.d.mts +2 -0
  95. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/exports.mjs +3 -0
  96. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/index.d.mts +2 -0
  97. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/index.mjs +2 -0
  98. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/AddPaymentMethodsResponse.d.mts +4 -0
  99. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/AddPaymentMethodsResponse.mjs +2 -0
  100. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/SetDefaultPaymentMethodsResponse.d.mts +4 -0
  101. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/SetDefaultPaymentMethodsResponse.mjs +2 -0
  102. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/SetupIntentPaymentMethodsResponse.d.mts +3 -0
  103. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/SetupIntentPaymentMethodsResponse.mjs +2 -0
  104. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/index.d.mts +3 -0
  105. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/index.mjs +3 -0
  106. package/dist/esm/api/resources/customerEvents/client/Client.d.mts +29 -0
  107. package/dist/esm/api/resources/customerEvents/client/Client.mjs +74 -0
  108. package/dist/esm/api/resources/customerEvents/client/index.d.mts +1 -0
  109. package/dist/esm/api/resources/customerEvents/client/index.mjs +1 -0
  110. package/dist/esm/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.d.mts +11 -0
  111. package/dist/esm/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.mjs +2 -0
  112. package/dist/esm/api/resources/customerEvents/client/requests/index.d.mts +1 -0
  113. package/dist/esm/api/resources/customerEvents/client/requests/index.mjs +1 -0
  114. package/dist/esm/api/resources/customerEvents/exports.d.mts +2 -0
  115. package/dist/esm/api/resources/customerEvents/exports.mjs +3 -0
  116. package/dist/esm/api/resources/customerEvents/index.d.mts +1 -0
  117. package/dist/esm/api/resources/customerEvents/index.mjs +1 -0
  118. package/dist/esm/api/resources/index.d.mts +2 -0
  119. package/dist/esm/api/resources/index.mjs +2 -0
  120. package/dist/esm/api/types/BusinessEventOrder.d.mts +2 -10
  121. package/dist/esm/api/types/BusinessEventOrderDetail.d.mts +2 -12
  122. package/dist/esm/api/types/BusinessProductOrder.d.mts +1 -9
  123. package/dist/esm/api/types/CustomerProductOrder.d.mts +1 -5
  124. package/dist/esm/api/types/PaymentMethod.d.mts +8 -0
  125. package/dist/esm/api/types/PaymentMethod.mjs +2 -0
  126. package/dist/esm/api/types/TicketOrder.d.mts +1 -7
  127. package/dist/esm/api/types/Transaction.d.mts +16 -0
  128. package/dist/esm/api/types/Transaction.mjs +2 -0
  129. package/dist/esm/api/types/index.d.mts +2 -0
  130. package/dist/esm/api/types/index.mjs +2 -0
  131. package/dist/esm/version.d.mts +1 -1
  132. package/dist/esm/version.mjs +1 -1
  133. package/package.json +23 -1
  134. package/reference.md +400 -40
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@51eat/sdk",
46
- "X-Fern-SDK-Version": "0.0.47",
47
- "User-Agent": "@51eat/sdk/0.0.47",
46
+ "X-Fern-SDK-Version": "0.0.49",
47
+ "User-Agent": "@51eat/sdk/0.0.49",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -2,6 +2,7 @@ import { BusinessClient } from "./api/resources/business/client/Client.js";
2
2
  import { BusinessMessagingClient } from "./api/resources/businessMessaging/client/Client.js";
3
3
  import { BusinessProductsClient } from "./api/resources/businessProducts/client/Client.js";
4
4
  import { CustomerClient } from "./api/resources/customer/client/Client.js";
5
+ import { CustomerEventsClient } from "./api/resources/customerEvents/client/Client.js";
5
6
  import { CustomerMessagingClient } from "./api/resources/customerMessaging/client/Client.js";
6
7
  import { CustomerMyAccountClient } from "./api/resources/customerMyAccount/client/Client.js";
7
8
  import { RecordClickClient } from "./api/resources/recordClick/client/Client.js";
@@ -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;
@@ -48,10 +48,11 @@ const Client_js_1 = require("./api/resources/business/client/Client.js");
48
48
  const Client_js_2 = require("./api/resources/businessMessaging/client/Client.js");
49
49
  const Client_js_3 = require("./api/resources/businessProducts/client/Client.js");
50
50
  const Client_js_4 = require("./api/resources/customer/client/Client.js");
51
- const Client_js_5 = require("./api/resources/customerMessaging/client/Client.js");
52
- const Client_js_6 = require("./api/resources/customerMyAccount/client/Client.js");
53
- const Client_js_7 = require("./api/resources/recordClick/client/Client.js");
54
- const Client_js_8 = require("./api/resources/serveAd/client/Client.js");
51
+ const Client_js_5 = require("./api/resources/customerEvents/client/Client.js");
52
+ const Client_js_6 = require("./api/resources/customerMessaging/client/Client.js");
53
+ const Client_js_7 = require("./api/resources/customerMyAccount/client/Client.js");
54
+ const Client_js_8 = require("./api/resources/recordClick/client/Client.js");
55
+ const Client_js_9 = require("./api/resources/serveAd/client/Client.js");
55
56
  const BaseClient_js_1 = require("./BaseClient.js");
56
57
  const core = __importStar(require("./core/index.js"));
57
58
  class FiveOneEatClient {
@@ -66,13 +67,17 @@ class FiveOneEatClient {
66
67
  var _a;
67
68
  return ((_a = this._businessProducts) !== null && _a !== void 0 ? _a : (this._businessProducts = new Client_js_3.BusinessProductsClient(this._options)));
68
69
  }
70
+ get customerEvents() {
71
+ var _a;
72
+ return ((_a = this._customerEvents) !== null && _a !== void 0 ? _a : (this._customerEvents = new Client_js_5.CustomerEventsClient(this._options)));
73
+ }
69
74
  get customerMessaging() {
70
75
  var _a;
71
- return ((_a = this._customerMessaging) !== null && _a !== void 0 ? _a : (this._customerMessaging = new Client_js_5.CustomerMessagingClient(this._options)));
76
+ return ((_a = this._customerMessaging) !== null && _a !== void 0 ? _a : (this._customerMessaging = new Client_js_6.CustomerMessagingClient(this._options)));
72
77
  }
73
78
  get customerMyAccount() {
74
79
  var _a;
75
- return ((_a = this._customerMyAccount) !== null && _a !== void 0 ? _a : (this._customerMyAccount = new Client_js_6.CustomerMyAccountClient(this._options)));
80
+ return ((_a = this._customerMyAccount) !== null && _a !== void 0 ? _a : (this._customerMyAccount = new Client_js_7.CustomerMyAccountClient(this._options)));
76
81
  }
77
82
  get customer() {
78
83
  var _a;
@@ -80,11 +85,11 @@ class FiveOneEatClient {
80
85
  }
81
86
  get recordClick() {
82
87
  var _a;
83
- return ((_a = this._recordClick) !== null && _a !== void 0 ? _a : (this._recordClick = new Client_js_7.RecordClickClient(this._options)));
88
+ return ((_a = this._recordClick) !== null && _a !== void 0 ? _a : (this._recordClick = new Client_js_8.RecordClickClient(this._options)));
84
89
  }
85
90
  get serveAd() {
86
91
  var _a;
87
- return ((_a = this._serveAd) !== null && _a !== void 0 ? _a : (this._serveAd = new Client_js_8.ServeAdClient(this._options)));
92
+ return ((_a = this._serveAd) !== null && _a !== void 0 ? _a : (this._serveAd = new Client_js_9.ServeAdClient(this._options)));
88
93
  }
89
94
  get business() {
90
95
  var _a;
@@ -17,6 +17,7 @@ export interface CreatePaymentIntentRequest {
17
17
  fulfillment_method?: CreatePaymentIntentRequest.FulfillmentMethod | null;
18
18
  pickup_date?: CreatePaymentIntentRequest.PickupDate | null;
19
19
  pickup_time?: string | null;
20
+ payment_method_id?: string | null;
20
21
  billing_address: CreatePaymentIntentRequest.BillingAddress;
21
22
  shipping_address?: CreatePaymentIntentRequest.ShippingAddress;
22
23
  }
@@ -1,11 +1,12 @@
1
1
  export interface CreatePaymentIntentCartResponse {
2
+ status: string;
2
3
  client_secret: string;
3
4
  payment_intent_id: string;
4
5
  subtotal: string;
5
6
  tax_amount: string;
6
7
  tax_calculation: CreatePaymentIntentCartResponse.TaxCalculation | null;
7
8
  shipping_amount: string;
8
- shipping_method: string;
9
+ shipping_method: unknown | null;
9
10
  platform_fee: string;
10
11
  total_amount: string;
11
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
  }
@@ -133,61 +133,6 @@ class TicketingClient {
133
133
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/events/{eventId}/ticket-holds");
134
134
  });
135
135
  }
136
- /**
137
- * Release all active holds for the given session, freeing the tickets for others.
138
- *
139
- * @param {FiveOneEat.customer.events.ReleaseHoldTicketingRequest} request
140
- * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
141
- *
142
- * @throws {@link FiveOneEat.UnauthorizedError}
143
- * @throws {@link FiveOneEat.NotFoundError}
144
- *
145
- * @example
146
- * await client.customer.events.ticketing.releaseHold({
147
- * eventId: "eventId",
148
- * sessionId: "sessionId"
149
- * })
150
- */
151
- releaseHold(request, requestOptions) {
152
- return core.HttpResponsePromise.fromPromise(this.__releaseHold(request, requestOptions));
153
- }
154
- __releaseHold(request, requestOptions) {
155
- return __awaiter(this, void 0, void 0, function* () {
156
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
157
- const { eventId, sessionId } = request;
158
- const _authRequest = yield this._options.authProvider.getAuthRequest();
159
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
160
- const _response = yield core.fetcher({
161
- 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)}`),
162
- method: "DELETE",
163
- headers: _headers,
164
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
165
- 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,
166
- 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,
167
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
168
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
169
- logging: this._options.logging,
170
- });
171
- if (_response.ok) {
172
- return { data: undefined, rawResponse: _response.rawResponse };
173
- }
174
- if (_response.error.reason === "status-code") {
175
- switch (_response.error.statusCode) {
176
- case 401:
177
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
178
- case 404:
179
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
180
- default:
181
- throw new errors.FiveOneEatError({
182
- statusCode: _response.error.statusCode,
183
- body: _response.error.body,
184
- rawResponse: _response.rawResponse,
185
- });
186
- }
187
- }
188
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/customer/events/{eventId}/ticket-holds/{sessionId}");
189
- });
190
- }
191
136
  /**
192
137
  * Preview the subtotal, platform fee, and total for a given ticket selection.
193
138
  *
@@ -256,20 +201,18 @@ class TicketingClient {
256
201
  });
257
202
  }
258
203
  /**
259
- * Create a Stripe payment intent for the tickets held in the given session.
204
+ * Create a Stripe payment intent for the tickets held in the cart for the given event.
260
205
  * Returns a client_secret for the mobile app to confirm payment with Stripe.
261
206
  *
262
207
  * @param {FiveOneEat.customer.events.AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest} request
263
208
  * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
264
209
  *
265
210
  * @throws {@link FiveOneEat.UnauthorizedError}
266
- * @throws {@link FiveOneEat.NotFoundError}
267
211
  * @throws {@link FiveOneEat.UnprocessableEntityError}
268
212
  *
269
213
  * @example
270
214
  * await client.customer.events.ticketing.createPaymentIntent({
271
- * eventId: "eventId",
272
- * session_id: "session_id"
215
+ * eventId: "eventId"
273
216
  * })
274
217
  */
275
218
  createPaymentIntent(request, requestOptions) {
@@ -305,8 +248,6 @@ class TicketingClient {
305
248
  switch (_response.error.statusCode) {
306
249
  case 401:
307
250
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
308
- case 404:
309
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
310
251
  case 422:
311
252
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
312
253
  default:
@@ -333,8 +274,7 @@ class TicketingClient {
333
274
  * @example
334
275
  * await client.customer.events.ticketing.confirmOrder({
335
276
  * eventId: "eventId",
336
- * payment_intent_id: "payment_intent_id",
337
- * session_id: "session_id"
277
+ * payment_intent_id: "payment_intent_id"
338
278
  * })
339
279
  */
340
280
  confirmOrder(request, requestOptions) {
@@ -383,5 +323,48 @@ class TicketingClient {
383
323
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/events/{eventId}/ticket-orders");
384
324
  });
385
325
  }
326
+ /**
327
+ * @param {FiveOneEat.customer.events.ReleaseHoldTicketingRequest} request
328
+ * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
329
+ *
330
+ * @example
331
+ * await client.customer.events.ticketing.releaseHold({
332
+ * eventId: "eventId",
333
+ * sessionId: "sessionId"
334
+ * })
335
+ */
336
+ releaseHold(request, requestOptions) {
337
+ return core.HttpResponsePromise.fromPromise(this.__releaseHold(request, requestOptions));
338
+ }
339
+ __releaseHold(request, requestOptions) {
340
+ return __awaiter(this, void 0, void 0, function* () {
341
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
342
+ const { eventId, sessionId } = request;
343
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
344
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
345
+ const _response = yield core.fetcher({
346
+ 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)}`),
347
+ method: "DELETE",
348
+ headers: _headers,
349
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
350
+ 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,
351
+ 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,
352
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
353
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
354
+ logging: this._options.logging,
355
+ });
356
+ if (_response.ok) {
357
+ return { data: undefined, rawResponse: _response.rawResponse };
358
+ }
359
+ if (_response.error.reason === "status-code") {
360
+ throw new errors.FiveOneEatError({
361
+ statusCode: _response.error.statusCode,
362
+ body: _response.error.body,
363
+ rawResponse: _response.rawResponse,
364
+ });
365
+ }
366
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/customer/events/{eventId}/ticket-holds/{sessionId}");
367
+ });
368
+ }
386
369
  }
387
370
  exports.TicketingClient = TicketingClient;
@@ -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;
@@ -3,6 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClie
3
3
  import * as core from "../../../../../../core/index.js";
4
4
  import * as FiveOneEat from "../../../../../index.js";
5
5
  import { AddressesClient } from "../resources/addresses/client/Client.js";
6
+ import { PaymentMethodsClient } from "../resources/paymentMethods/client/Client.js";
6
7
  import { TicketOrdersClient } from "../resources/ticketOrders/client/Client.js";
7
8
  import { TicketsClient } from "../resources/tickets/client/Client.js";
8
9
  export declare namespace MeClient {
@@ -15,10 +16,12 @@ export declare class MeClient {
15
16
  protected _tickets: TicketsClient | undefined;
16
17
  protected _ticketOrders: TicketOrdersClient | undefined;
17
18
  protected _addresses: AddressesClient | undefined;
19
+ protected _paymentMethods: PaymentMethodsClient | undefined;
18
20
  constructor(options?: MeClient.Options);
19
21
  get tickets(): TicketsClient;
20
22
  get ticketOrders(): TicketOrdersClient;
21
23
  get addresses(): AddressesClient;
24
+ get paymentMethods(): PaymentMethodsClient;
22
25
  /**
23
26
  * Retrieve the authenticated user's favorited businesses with pagination.
24
27
  *
@@ -52,24 +52,29 @@ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNo
52
52
  const errors = __importStar(require("../../../../../../errors/index.js"));
53
53
  const FiveOneEat = __importStar(require("../../../../../index.js"));
54
54
  const Client_js_1 = require("../resources/addresses/client/Client.js");
55
- const Client_js_2 = require("../resources/ticketOrders/client/Client.js");
56
- const Client_js_3 = require("../resources/tickets/client/Client.js");
55
+ const Client_js_2 = require("../resources/paymentMethods/client/Client.js");
56
+ const Client_js_3 = require("../resources/ticketOrders/client/Client.js");
57
+ const Client_js_4 = require("../resources/tickets/client/Client.js");
57
58
  class MeClient {
58
59
  constructor(options = {}) {
59
60
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
60
61
  }
61
62
  get tickets() {
62
63
  var _a;
63
- return ((_a = this._tickets) !== null && _a !== void 0 ? _a : (this._tickets = new Client_js_3.TicketsClient(this._options)));
64
+ return ((_a = this._tickets) !== null && _a !== void 0 ? _a : (this._tickets = new Client_js_4.TicketsClient(this._options)));
64
65
  }
65
66
  get ticketOrders() {
66
67
  var _a;
67
- return ((_a = this._ticketOrders) !== null && _a !== void 0 ? _a : (this._ticketOrders = new Client_js_2.TicketOrdersClient(this._options)));
68
+ return ((_a = this._ticketOrders) !== null && _a !== void 0 ? _a : (this._ticketOrders = new Client_js_3.TicketOrdersClient(this._options)));
68
69
  }
69
70
  get addresses() {
70
71
  var _a;
71
72
  return ((_a = this._addresses) !== null && _a !== void 0 ? _a : (this._addresses = new Client_js_1.AddressesClient(this._options)));
72
73
  }
74
+ get paymentMethods() {
75
+ var _a;
76
+ return ((_a = this._paymentMethods) !== null && _a !== void 0 ? _a : (this._paymentMethods = new Client_js_2.PaymentMethodsClient(this._options)));
77
+ }
73
78
  /**
74
79
  * Retrieve the authenticated user's favorited businesses with pagination.
75
80
  *
@@ -1,6 +1,9 @@
1
1
  export * from "./addresses/client/requests/index.js";
2
2
  export * as addresses from "./addresses/index.js";
3
3
  export * from "./addresses/types/index.js";
4
+ export * from "./paymentMethods/client/requests/index.js";
5
+ export * as paymentMethods from "./paymentMethods/index.js";
6
+ export * from "./paymentMethods/types/index.js";
4
7
  export * from "./ticketOrders/client/requests/index.js";
5
8
  export * as ticketOrders from "./ticketOrders/index.js";
6
9
  export * from "./ticketOrders/types/index.js";
@@ -36,10 +36,13 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.tickets = exports.ticketOrders = exports.addresses = void 0;
39
+ exports.tickets = exports.ticketOrders = exports.paymentMethods = exports.addresses = void 0;
40
40
  __exportStar(require("./addresses/client/requests/index.js"), exports);
41
41
  exports.addresses = __importStar(require("./addresses/index.js"));
42
42
  __exportStar(require("./addresses/types/index.js"), exports);
43
+ __exportStar(require("./paymentMethods/client/requests/index.js"), exports);
44
+ exports.paymentMethods = __importStar(require("./paymentMethods/index.js"));
45
+ __exportStar(require("./paymentMethods/types/index.js"), exports);
43
46
  __exportStar(require("./ticketOrders/client/requests/index.js"), exports);
44
47
  exports.ticketOrders = __importStar(require("./ticketOrders/index.js"));
45
48
  __exportStar(require("./ticketOrders/types/index.js"), exports);
@@ -0,0 +1,88 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../BaseClient.js";
3
+ import * as core from "../../../../../../../../core/index.js";
4
+ import * as FiveOneEat from "../../../../../../../index.js";
5
+ export declare namespace PaymentMethodsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class PaymentMethodsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<PaymentMethodsClient.Options>;
12
+ constructor(options?: PaymentMethodsClient.Options);
13
+ /**
14
+ * Returns a Stripe SetupIntent client_secret. Use this with the Stripe mobile SDK
15
+ * to present the payment sheet and collect card details. Once confirmed, pass the
16
+ * resulting payment method ID to the store endpoint.
17
+ *
18
+ * @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
19
+ *
20
+ * @throws {@link FiveOneEat.UnauthorizedError}
21
+ *
22
+ * @example
23
+ * await client.customer.me.paymentMethods.setupIntent()
24
+ */
25
+ setupIntent(requestOptions?: PaymentMethodsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.me.SetupIntentPaymentMethodsResponse>;
26
+ private __setupIntent;
27
+ /**
28
+ * Returns all saved cards for the authenticated user.
29
+ *
30
+ * @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
31
+ *
32
+ * @throws {@link FiveOneEat.UnauthorizedError}
33
+ *
34
+ * @example
35
+ * await client.customer.me.paymentMethods.list()
36
+ */
37
+ list(requestOptions?: PaymentMethodsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.PaymentMethod[]>;
38
+ private __list;
39
+ /**
40
+ * Attaches a confirmed payment method to the customer's account. If `is_default` is
41
+ * true, or this is the first card saved, it becomes the default payment method.
42
+ *
43
+ * @param {FiveOneEat.customer.me.StorePaymentMethodRequest} request
44
+ * @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
45
+ *
46
+ * @throws {@link FiveOneEat.UnauthorizedError}
47
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
48
+ *
49
+ * @example
50
+ * await client.customer.me.paymentMethods.add({
51
+ * payment_method: "payment_method"
52
+ * })
53
+ */
54
+ add(request: FiveOneEat.customer.me.StorePaymentMethodRequest, requestOptions?: PaymentMethodsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.me.AddPaymentMethodsResponse>;
55
+ private __add;
56
+ /**
57
+ * Marks an existing saved payment method as the default.
58
+ *
59
+ * @param {FiveOneEat.customer.me.SetDefaultPaymentMethodsRequest} request
60
+ * @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
61
+ *
62
+ * @throws {@link FiveOneEat.UnauthorizedError}
63
+ * @throws {@link FiveOneEat.NotFoundError}
64
+ *
65
+ * @example
66
+ * await client.customer.me.paymentMethods.setDefault({
67
+ * paymentMethod: "paymentMethod"
68
+ * })
69
+ */
70
+ setDefault(request: FiveOneEat.customer.me.SetDefaultPaymentMethodsRequest, requestOptions?: PaymentMethodsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.me.SetDefaultPaymentMethodsResponse>;
71
+ private __setDefault;
72
+ /**
73
+ * Removes a saved payment method from the customer's account.
74
+ *
75
+ * @param {FiveOneEat.customer.me.DeletePaymentMethodsRequest} request
76
+ * @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
77
+ *
78
+ * @throws {@link FiveOneEat.UnauthorizedError}
79
+ * @throws {@link FiveOneEat.NotFoundError}
80
+ *
81
+ * @example
82
+ * await client.customer.me.paymentMethods.delete({
83
+ * paymentMethod: "paymentMethod"
84
+ * })
85
+ */
86
+ delete(request: FiveOneEat.customer.me.DeletePaymentMethodsRequest, requestOptions?: PaymentMethodsClient.RequestOptions): core.HttpResponsePromise<void>;
87
+ private __delete;
88
+ }