@51eat/sdk 0.0.32 → 0.0.34

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 (122) hide show
  1. package/README.md +12 -16
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +0 -3
  4. package/dist/cjs/Client.js +6 -11
  5. package/dist/cjs/api/resources/customer/resources/auth/client/Client.d.ts +1 -2
  6. package/dist/cjs/api/resources/customer/resources/auth/client/Client.js +5 -9
  7. package/dist/cjs/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.d.ts +2 -3
  8. package/dist/cjs/api/resources/customer/resources/events/resources/index.d.ts +1 -0
  9. package/dist/cjs/api/resources/customer/resources/events/resources/index.js +1 -0
  10. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.d.ts +55 -14
  11. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.js +171 -53
  12. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/ReleaseHoldTicketingRequest.d.ts +2 -2
  13. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/index.d.ts +4 -4
  14. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/index.js +1 -0
  16. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/CalculatePriceTicketingResponse.d.ts +11 -0
  17. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.ts +4 -0
  18. package/dist/cjs/api/resources/{customerEvents/types/CreatePaymentIntentResponse.d.ts → customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.ts} +3 -3
  19. package/dist/{esm/api/resources/customerEvents/types/HoldTicketsResponse.d.mts → cjs/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.ts} +3 -3
  20. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/index.d.ts +4 -0
  21. package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/types/index.js +4 -4
  22. package/dist/cjs/api/resources/index.d.ts +0 -3
  23. package/dist/cjs/api/resources/index.js +1 -4
  24. package/dist/cjs/version.d.ts +1 -1
  25. package/dist/cjs/version.js +1 -1
  26. package/dist/esm/BaseClient.mjs +2 -2
  27. package/dist/esm/Client.d.mts +0 -3
  28. package/dist/esm/Client.mjs +0 -5
  29. package/dist/esm/api/resources/customer/resources/auth/client/Client.d.mts +1 -2
  30. package/dist/esm/api/resources/customer/resources/auth/client/Client.mjs +6 -10
  31. package/dist/esm/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.d.mts +2 -3
  32. package/dist/esm/api/resources/customer/resources/events/resources/index.d.mts +1 -0
  33. package/dist/esm/api/resources/customer/resources/events/resources/index.mjs +1 -0
  34. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.d.mts +55 -14
  35. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.mjs +171 -53
  36. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/ReleaseHoldTicketingRequest.d.mts +2 -2
  37. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/index.d.mts +4 -4
  38. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/index.d.mts +1 -0
  39. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/index.mjs +1 -0
  40. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CalculatePriceTicketingResponse.d.mts +11 -0
  41. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.mts +4 -0
  42. package/dist/esm/api/resources/{customerEvents/types/CreatePaymentIntentResponse.d.mts → customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.mts} +3 -3
  43. package/dist/{cjs/api/resources/customerEvents/types/HoldTicketsResponse.d.ts → esm/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.mts} +3 -3
  44. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/index.d.mts +4 -0
  45. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/index.mjs +4 -0
  46. package/dist/esm/api/resources/index.d.mts +0 -3
  47. package/dist/esm/api/resources/index.mjs +0 -3
  48. package/dist/esm/version.d.mts +1 -1
  49. package/dist/esm/version.mjs +1 -1
  50. package/package.json +1 -12
  51. package/reference.md +97 -354
  52. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/CalculatePriceTicketingRequest.d.ts +0 -9
  53. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/ConfirmOrderTicketingRequest.d.ts +0 -9
  54. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/CreatePaymentIntentTicketingRequest.d.ts +0 -9
  55. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/HoldTicketsTicketingRequest.d.ts +0 -9
  56. package/dist/cjs/api/resources/customerEvents/client/Client.d.ts +0 -110
  57. package/dist/cjs/api/resources/customerEvents/client/Client.js +0 -384
  58. package/dist/cjs/api/resources/customerEvents/client/index.d.ts +0 -1
  59. package/dist/cjs/api/resources/customerEvents/client/index.js +0 -17
  60. package/dist/cjs/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.d.ts +0 -11
  61. package/dist/cjs/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.js +0 -3
  62. package/dist/cjs/api/resources/customerEvents/client/requests/index.d.ts +0 -5
  63. package/dist/cjs/api/resources/customerEvents/client/requests/index.js +0 -2
  64. package/dist/cjs/api/resources/customerEvents/exports.d.ts +0 -2
  65. package/dist/cjs/api/resources/customerEvents/exports.js +0 -21
  66. package/dist/cjs/api/resources/customerEvents/index.d.ts +0 -2
  67. package/dist/cjs/api/resources/customerEvents/index.js +0 -18
  68. package/dist/cjs/api/resources/customerEvents/types/CalculateTicketPriceResponse.d.ts +0 -11
  69. package/dist/cjs/api/resources/customerEvents/types/CalculateTicketPriceResponse.js +0 -3
  70. package/dist/cjs/api/resources/customerEvents/types/ConfirmTicketOrderResponse.d.ts +0 -4
  71. package/dist/cjs/api/resources/customerEvents/types/ConfirmTicketOrderResponse.js +0 -3
  72. package/dist/cjs/api/resources/customerEvents/types/CreatePaymentIntentResponse.js +0 -3
  73. package/dist/cjs/api/resources/customerEvents/types/HoldTicketsResponse.js +0 -3
  74. package/dist/cjs/api/resources/customerEvents/types/index.d.ts +0 -4
  75. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/CalculatePriceTicketingRequest.d.mts +0 -9
  76. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/ConfirmOrderTicketingRequest.d.mts +0 -9
  77. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/CreatePaymentIntentTicketingRequest.d.mts +0 -9
  78. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/HoldTicketsTicketingRequest.d.mts +0 -9
  79. package/dist/esm/api/resources/customerEvents/client/Client.d.mts +0 -110
  80. package/dist/esm/api/resources/customerEvents/client/Client.mjs +0 -347
  81. package/dist/esm/api/resources/customerEvents/client/index.d.mts +0 -1
  82. package/dist/esm/api/resources/customerEvents/client/index.mjs +0 -1
  83. package/dist/esm/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.d.mts +0 -11
  84. package/dist/esm/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.mjs +0 -2
  85. package/dist/esm/api/resources/customerEvents/client/requests/index.d.mts +0 -5
  86. package/dist/esm/api/resources/customerEvents/client/requests/index.mjs +0 -1
  87. package/dist/esm/api/resources/customerEvents/exports.d.mts +0 -2
  88. package/dist/esm/api/resources/customerEvents/exports.mjs +0 -3
  89. package/dist/esm/api/resources/customerEvents/index.d.mts +0 -2
  90. package/dist/esm/api/resources/customerEvents/index.mjs +0 -2
  91. package/dist/esm/api/resources/customerEvents/types/CalculateTicketPriceResponse.d.mts +0 -11
  92. package/dist/esm/api/resources/customerEvents/types/CalculateTicketPriceResponse.mjs +0 -2
  93. package/dist/esm/api/resources/customerEvents/types/ConfirmTicketOrderResponse.d.mts +0 -4
  94. package/dist/esm/api/resources/customerEvents/types/ConfirmTicketOrderResponse.mjs +0 -2
  95. package/dist/esm/api/resources/customerEvents/types/CreatePaymentIntentResponse.mjs +0 -2
  96. package/dist/esm/api/resources/customerEvents/types/HoldTicketsResponse.mjs +0 -2
  97. package/dist/esm/api/resources/customerEvents/types/index.d.mts +0 -4
  98. package/dist/esm/api/resources/customerEvents/types/index.mjs +0 -4
  99. /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CalculatePriceRequest.d.ts +0 -0
  100. /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CalculatePriceRequest.js +0 -0
  101. /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CreatePaymentIntentRequest.d.ts +0 -0
  102. /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CreatePaymentIntentRequest.js +0 -0
  103. /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketHoldRequest.d.ts +0 -0
  104. /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketHoldRequest.js +0 -0
  105. /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketOrderRequest.d.ts +0 -0
  106. /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketOrderRequest.js +0 -0
  107. /package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/{client/requests/CalculatePriceTicketingRequest.js → types/CalculatePriceTicketingResponse.js} +0 -0
  108. /package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/{client/requests/ConfirmOrderTicketingRequest.js → types/ConfirmOrderTicketingResponse.js} +0 -0
  109. /package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/{client/requests/CreatePaymentIntentTicketingRequest.js → types/CreatePaymentIntentTicketingResponse.js} +0 -0
  110. /package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/{client/requests/HoldTicketsTicketingRequest.js → types/HoldTicketsTicketingResponse.js} +0 -0
  111. /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CalculatePriceRequest.d.mts +0 -0
  112. /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CalculatePriceRequest.mjs +0 -0
  113. /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CreatePaymentIntentRequest.d.mts +0 -0
  114. /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CreatePaymentIntentRequest.mjs +0 -0
  115. /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketHoldRequest.d.mts +0 -0
  116. /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketHoldRequest.mjs +0 -0
  117. /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketOrderRequest.d.mts +0 -0
  118. /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketOrderRequest.mjs +0 -0
  119. /package/dist/esm/api/resources/customer/resources/events/resources/ticketing/{client/requests/CalculatePriceTicketingRequest.mjs → types/CalculatePriceTicketingResponse.mjs} +0 -0
  120. /package/dist/esm/api/resources/customer/resources/events/resources/ticketing/{client/requests/ConfirmOrderTicketingRequest.mjs → types/ConfirmOrderTicketingResponse.mjs} +0 -0
  121. /package/dist/esm/api/resources/customer/resources/events/resources/ticketing/{client/requests/CreatePaymentIntentTicketingRequest.mjs → types/CreatePaymentIntentTicketingResponse.mjs} +0 -0
  122. /package/dist/esm/api/resources/customer/resources/events/resources/ticketing/{client/requests/HoldTicketsTicketingRequest.mjs → types/HoldTicketsTicketingResponse.mjs} +0 -0
package/README.md CHANGED
@@ -45,12 +45,8 @@ Instantiate and use the client with the following:
45
45
  import { FiveOneEatClient } from "@51eat/sdk";
46
46
 
47
47
  const client = new FiveOneEatClient({ token: "YOUR_TOKEN" });
48
- await client.customerEvents.holdTickets({
49
- eventId: "eventId",
50
- tickets: [{
51
- ticket_type_id: "ticket_type_id",
52
- quantity: 1
53
- }]
48
+ await client.recordClick.adsRecordClick({
49
+ advertisement: "advertisement"
54
50
  });
55
51
  ```
56
52
 
@@ -74,7 +70,7 @@ following namespace:
74
70
  ```typescript
75
71
  import { FiveOneEat } from "@51eat/sdk";
76
72
 
77
- const request: FiveOneEat.StoreTicketHoldRequest = {
73
+ const request: FiveOneEat.GetMyTicketRequest = {
78
74
  ...
79
75
  };
80
76
  ```
@@ -88,7 +84,7 @@ will be thrown.
88
84
  import { FiveOneEatError } from "@51eat/sdk";
89
85
 
90
86
  try {
91
- await client.customerEvents.holdTickets(...);
87
+ await client.recordClick.adsRecordClick(...);
92
88
  } catch (err) {
93
89
  if (err instanceof FiveOneEatError) {
94
90
  console.log(err.statusCode);
@@ -151,9 +147,9 @@ For example, `fs.ReadStream` has a `path` property which the SDK uses to retriev
151
147
  This SDK supports direct imports of subpackage clients, which allows JavaScript bundlers to tree-shake and include only the imported subpackage code. This results in much smaller bundle sizes.
152
148
 
153
149
  ```typescript
154
- import { CustomerEventsClient } from '@51eat/sdk/customerEvents';
150
+ import { CustomerMyAccountClient } from '@51eat/sdk/customerMyAccount';
155
151
 
156
- const client = new CustomerEventsClient({...});
152
+ const client = new CustomerMyAccountClient({...});
157
153
  ```
158
154
 
159
155
  ### Additional Headers
@@ -170,7 +166,7 @@ const client = new FiveOneEatClient({
170
166
  }
171
167
  });
172
168
 
173
- const response = await client.customerEvents.holdTickets(..., {
169
+ const response = await client.recordClick.adsRecordClick(..., {
174
170
  headers: {
175
171
  'X-Custom-Header': 'custom value'
176
172
  }
@@ -182,7 +178,7 @@ const response = await client.customerEvents.holdTickets(..., {
182
178
  If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
183
179
 
184
180
  ```typescript
185
- const response = await client.customerEvents.holdTickets(..., {
181
+ const response = await client.recordClick.adsRecordClick(..., {
186
182
  queryParams: {
187
183
  'customQueryParamKey': 'custom query param value'
188
184
  }
@@ -204,7 +200,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
204
200
  Use the `maxRetries` request option to configure this behavior.
205
201
 
206
202
  ```typescript
207
- const response = await client.customerEvents.holdTickets(..., {
203
+ const response = await client.recordClick.adsRecordClick(..., {
208
204
  maxRetries: 0 // override maxRetries at the request level
209
205
  });
210
206
  ```
@@ -214,7 +210,7 @@ const response = await client.customerEvents.holdTickets(..., {
214
210
  The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
215
211
 
216
212
  ```typescript
217
- const response = await client.customerEvents.holdTickets(..., {
213
+ const response = await client.recordClick.adsRecordClick(..., {
218
214
  timeoutInSeconds: 30 // override timeout to 30s
219
215
  });
220
216
  ```
@@ -225,7 +221,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
225
221
 
226
222
  ```typescript
227
223
  const controller = new AbortController();
228
- const response = await client.customerEvents.holdTickets(..., {
224
+ const response = await client.recordClick.adsRecordClick(..., {
229
225
  abortSignal: controller.signal
230
226
  });
231
227
  controller.abort(); // aborts the request
@@ -237,7 +233,7 @@ The SDK provides access to raw response data, including headers, through the `.w
237
233
  The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
238
234
 
239
235
  ```typescript
240
- const { data, rawResponse } = await client.customerEvents.holdTickets(...).withRawResponse();
236
+ const { data, rawResponse } = await client.recordClick.adsRecordClick(...).withRawResponse();
241
237
 
242
238
  console.log(data);
243
239
  console.log(rawResponse.headers['X-My-Header']);
@@ -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.32",
47
- "User-Agent": "@51eat/sdk/0.0.32",
46
+ "X-Fern-SDK-Version": "0.0.34",
47
+ "User-Agent": "@51eat/sdk/0.0.34",
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);
@@ -1,6 +1,5 @@
1
1
  import { BusinessClient } from "./api/resources/business/client/Client.js";
2
2
  import { CustomerClient } from "./api/resources/customer/client/Client.js";
3
- import { CustomerEventsClient } from "./api/resources/customerEvents/client/Client.js";
4
3
  import { CustomerMyAccountClient } from "./api/resources/customerMyAccount/client/Client.js";
5
4
  import { RecordClickClient } from "./api/resources/recordClick/client/Client.js";
6
5
  import { ServeAdClient } from "./api/resources/serveAd/client/Client.js";
@@ -14,14 +13,12 @@ export declare namespace FiveOneEatClient {
14
13
  }
15
14
  export declare class FiveOneEatClient {
16
15
  protected readonly _options: NormalizedClientOptionsWithAuth<FiveOneEatClient.Options>;
17
- protected _customerEvents: CustomerEventsClient | undefined;
18
16
  protected _customerMyAccount: CustomerMyAccountClient | undefined;
19
17
  protected _customer: CustomerClient | undefined;
20
18
  protected _recordClick: RecordClickClient | undefined;
21
19
  protected _serveAd: ServeAdClient | undefined;
22
20
  protected _business: BusinessClient | undefined;
23
21
  constructor(options?: FiveOneEatClient.Options);
24
- get customerEvents(): CustomerEventsClient;
25
22
  get customerMyAccount(): CustomerMyAccountClient;
26
23
  get customer(): CustomerClient;
27
24
  get recordClick(): RecordClickClient;
@@ -46,23 +46,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
46
46
  exports.FiveOneEatClient = void 0;
47
47
  const Client_js_1 = require("./api/resources/business/client/Client.js");
48
48
  const Client_js_2 = require("./api/resources/customer/client/Client.js");
49
- const Client_js_3 = require("./api/resources/customerEvents/client/Client.js");
50
- const Client_js_4 = require("./api/resources/customerMyAccount/client/Client.js");
51
- const Client_js_5 = require("./api/resources/recordClick/client/Client.js");
52
- const Client_js_6 = require("./api/resources/serveAd/client/Client.js");
49
+ const Client_js_3 = require("./api/resources/customerMyAccount/client/Client.js");
50
+ const Client_js_4 = require("./api/resources/recordClick/client/Client.js");
51
+ const Client_js_5 = require("./api/resources/serveAd/client/Client.js");
53
52
  const BaseClient_js_1 = require("./BaseClient.js");
54
53
  const core = __importStar(require("./core/index.js"));
55
54
  class FiveOneEatClient {
56
55
  constructor(options = {}) {
57
56
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
58
57
  }
59
- get customerEvents() {
60
- var _a;
61
- return ((_a = this._customerEvents) !== null && _a !== void 0 ? _a : (this._customerEvents = new Client_js_3.CustomerEventsClient(this._options)));
62
- }
63
58
  get customerMyAccount() {
64
59
  var _a;
65
- return ((_a = this._customerMyAccount) !== null && _a !== void 0 ? _a : (this._customerMyAccount = new Client_js_4.CustomerMyAccountClient(this._options)));
60
+ return ((_a = this._customerMyAccount) !== null && _a !== void 0 ? _a : (this._customerMyAccount = new Client_js_3.CustomerMyAccountClient(this._options)));
66
61
  }
67
62
  get customer() {
68
63
  var _a;
@@ -70,11 +65,11 @@ class FiveOneEatClient {
70
65
  }
71
66
  get recordClick() {
72
67
  var _a;
73
- return ((_a = this._recordClick) !== null && _a !== void 0 ? _a : (this._recordClick = new Client_js_5.RecordClickClient(this._options)));
68
+ return ((_a = this._recordClick) !== null && _a !== void 0 ? _a : (this._recordClick = new Client_js_4.RecordClickClient(this._options)));
74
69
  }
75
70
  get serveAd() {
76
71
  var _a;
77
- return ((_a = this._serveAd) !== null && _a !== void 0 ? _a : (this._serveAd = new Client_js_6.ServeAdClient(this._options)));
72
+ return ((_a = this._serveAd) !== null && _a !== void 0 ? _a : (this._serveAd = new Client_js_5.ServeAdClient(this._options)));
78
73
  }
79
74
  get business() {
80
75
  var _a;
@@ -121,9 +121,8 @@ export declare class AuthClient {
121
121
  * @throws {@link FiveOneEat.UnprocessableEntityError}
122
122
  *
123
123
  * @example
124
- * import { createReadStream } from "fs";
125
124
  * await client.customer.auth.uploadAvatar({
126
- * avatar: fs.createReadStream("/path/to/your/file")
125
+ * avatar: "avatar"
127
126
  * })
128
127
  */
129
128
  uploadAvatar(request: FiveOneEat.customer.UploadAvatarRequest, requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.UploadAvatarAuthResponse>;
@@ -406,9 +406,8 @@ class AuthClient {
406
406
  * @throws {@link FiveOneEat.UnprocessableEntityError}
407
407
  *
408
408
  * @example
409
- * import { createReadStream } from "fs";
410
409
  * await client.customer.auth.uploadAvatar({
411
- * avatar: fs.createReadStream("/path/to/your/file")
410
+ * avatar: "avatar"
412
411
  * })
413
412
  */
414
413
  uploadAvatar(request, requestOptions) {
@@ -417,19 +416,16 @@ class AuthClient {
417
416
  __uploadAvatar(request, requestOptions) {
418
417
  return __awaiter(this, void 0, void 0, function* () {
419
418
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
420
- const _body = yield core.newFormData();
421
- yield _body.appendFile("avatar", request.avatar);
422
- const _maybeEncodedRequest = yield _body.getRequest();
423
419
  const _authRequest = yield this._options.authProvider.getAuthRequest();
424
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
420
+ 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);
425
421
  const _response = yield core.fetcher({
426
422
  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/user/avatar"),
427
423
  method: "POST",
428
424
  headers: _headers,
425
+ contentType: "application/json",
429
426
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
430
- requestType: "file",
431
- duplex: _maybeEncodedRequest.duplex,
432
- body: _maybeEncodedRequest.body,
427
+ requestType: "json",
428
+ body: request,
433
429
  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,
434
430
  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,
435
431
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -1,10 +1,9 @@
1
- import type * as core from "../../../../../../../core/index.js";
2
1
  /**
3
2
  * @example
4
3
  * {
5
- * avatar: fs.createReadStream("/path/to/your/file")
4
+ * avatar: "avatar"
6
5
  * }
7
6
  */
8
7
  export interface UploadAvatarRequest {
9
- avatar: core.file.Uploadable;
8
+ avatar: string;
10
9
  }
@@ -1,2 +1,3 @@
1
1
  export * from "./ticketing/client/requests/index.js";
2
2
  export * as ticketing from "./ticketing/index.js";
3
+ export * from "./ticketing/types/index.js";
@@ -39,3 +39,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.ticketing = void 0;
40
40
  __exportStar(require("./ticketing/client/requests/index.js"), exports);
41
41
  exports.ticketing = __importStar(require("./ticketing/index.js"));
42
+ __exportStar(require("./ticketing/types/index.js"), exports);
@@ -1,7 +1,7 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../BaseClient.js";
3
3
  import * as core from "../../../../../../../../core/index.js";
4
- import type * as FiveOneEat from "../../../../../../../index.js";
4
+ import * as FiveOneEat from "../../../../../../../index.js";
5
5
  export declare namespace TicketingClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
@@ -11,59 +11,100 @@ export declare class TicketingClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<TicketingClient.Options>;
12
12
  constructor(options?: TicketingClient.Options);
13
13
  /**
14
- * @param {FiveOneEat.customer.events.HoldTicketsTicketingRequest} request
14
+ * Place a temporary hold on tickets for the specified event. Holds expire after 10 minutes.
15
+ *
16
+ * @param {FiveOneEat.customer.events.StoreTicketHoldRequest} request
15
17
  * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
16
18
  *
19
+ * @throws {@link FiveOneEat.UnauthorizedError}
20
+ * @throws {@link FiveOneEat.NotFoundError}
21
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
22
+ *
17
23
  * @example
18
24
  * await client.customer.events.ticketing.holdTickets({
19
- * event: "event"
25
+ * eventId: "eventId",
26
+ * tickets: [{
27
+ * ticket_type_id: "ticket_type_id",
28
+ * quantity: 1
29
+ * }]
20
30
  * })
21
31
  */
22
- holdTickets(request: FiveOneEat.customer.events.HoldTicketsTicketingRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<void>;
32
+ holdTickets(request: FiveOneEat.customer.events.StoreTicketHoldRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.HoldTicketsTicketingResponse>;
23
33
  private __holdTickets;
24
34
  /**
35
+ * Release all active holds for the given session, freeing the tickets for others.
36
+ *
25
37
  * @param {FiveOneEat.customer.events.ReleaseHoldTicketingRequest} request
26
38
  * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
27
39
  *
40
+ * @throws {@link FiveOneEat.UnauthorizedError}
41
+ * @throws {@link FiveOneEat.NotFoundError}
42
+ *
28
43
  * @example
29
44
  * await client.customer.events.ticketing.releaseHold({
30
- * event: "event",
45
+ * eventId: "eventId",
31
46
  * sessionId: "sessionId"
32
47
  * })
33
48
  */
34
49
  releaseHold(request: FiveOneEat.customer.events.ReleaseHoldTicketingRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<void>;
35
50
  private __releaseHold;
36
51
  /**
37
- * @param {FiveOneEat.customer.events.CalculatePriceTicketingRequest} request
52
+ * Preview the subtotal, platform fee, and total for a given ticket selection.
53
+ *
54
+ * @param {FiveOneEat.customer.events.CalculatePriceRequest} request
38
55
  * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
39
56
  *
57
+ * @throws {@link FiveOneEat.UnauthorizedError}
58
+ * @throws {@link FiveOneEat.NotFoundError}
59
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
60
+ *
40
61
  * @example
41
62
  * await client.customer.events.ticketing.calculatePrice({
42
- * event: "event"
63
+ * eventId: "eventId",
64
+ * tickets: [{
65
+ * ticket_type_id: "ticket_type_id",
66
+ * quantity: 1
67
+ * }]
43
68
  * })
44
69
  */
45
- calculatePrice(request: FiveOneEat.customer.events.CalculatePriceTicketingRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<void>;
70
+ calculatePrice(request: FiveOneEat.customer.events.CalculatePriceRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.CalculatePriceTicketingResponse>;
46
71
  private __calculatePrice;
47
72
  /**
48
- * @param {FiveOneEat.customer.events.CreatePaymentIntentTicketingRequest} request
73
+ * Create a Stripe payment intent for the tickets held in the given session.
74
+ * Returns a client_secret for the mobile app to confirm payment with Stripe.
75
+ *
76
+ * @param {FiveOneEat.customer.events.CreatePaymentIntentRequest} request
49
77
  * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
50
78
  *
79
+ * @throws {@link FiveOneEat.UnauthorizedError}
80
+ * @throws {@link FiveOneEat.NotFoundError}
81
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
82
+ *
51
83
  * @example
52
84
  * await client.customer.events.ticketing.createPaymentIntent({
53
- * event: "event"
85
+ * eventId: "eventId",
86
+ * session_id: "session_id"
54
87
  * })
55
88
  */
56
- createPaymentIntent(request: FiveOneEat.customer.events.CreatePaymentIntentTicketingRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<void>;
89
+ createPaymentIntent(request: FiveOneEat.customer.events.CreatePaymentIntentRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.CreatePaymentIntentTicketingResponse>;
57
90
  private __createPaymentIntent;
58
91
  /**
59
- * @param {FiveOneEat.customer.events.ConfirmOrderTicketingRequest} request
92
+ * Confirm a completed Stripe payment and create the ticket order.
93
+ * The payment must have succeeded before calling this endpoint.
94
+ *
95
+ * @param {FiveOneEat.customer.events.StoreTicketOrderRequest} request
60
96
  * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
61
97
  *
98
+ * @throws {@link FiveOneEat.UnauthorizedError}
99
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
100
+ *
62
101
  * @example
63
102
  * await client.customer.events.ticketing.confirmOrder({
64
- * event: "event"
103
+ * eventId: "eventId",
104
+ * payment_intent_id: "payment_intent_id",
105
+ * session_id: "session_id"
65
106
  * })
66
107
  */
67
- confirmOrder(request: FiveOneEat.customer.events.ConfirmOrderTicketingRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<void>;
108
+ confirmOrder(request: FiveOneEat.customer.events.StoreTicketOrderRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.ConfirmOrderTicketingResponse>;
68
109
  private __confirmOrder;
69
110
  }