@51eat/sdk 0.0.70 → 0.0.72

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/api/resources/business/resources/stands/client/requests/UpdateStandRequest.d.ts +7 -0
  3. package/dist/cjs/api/resources/customer/client/Client.d.ts +0 -1
  4. package/dist/cjs/api/resources/customer/client/Client.js +1 -5
  5. package/dist/cjs/api/resources/customer/resources/ads/client/Client.d.ts +2 -4
  6. package/dist/cjs/api/resources/customer/resources/ads/client/Client.js +3 -11
  7. package/dist/cjs/api/resources/customer/resources/businesses/client/Client.d.ts +27 -34
  8. package/dist/cjs/api/resources/customer/resources/businesses/client/Client.js +83 -111
  9. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.ts +0 -1
  10. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.js +1 -5
  11. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.ts +0 -2
  12. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.js +2 -10
  13. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.d.ts +0 -3
  14. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.js +7 -19
  15. package/dist/cjs/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.ts +4 -0
  16. package/dist/cjs/api/resources/customer/resources/discovery/client/Client.d.ts +2 -14
  17. package/dist/cjs/api/resources/customer/resources/discovery/client/Client.js +33 -81
  18. package/dist/cjs/api/resources/customer/resources/editorials/client/Client.d.ts +3 -7
  19. package/dist/cjs/api/resources/customer/resources/editorials/client/Client.js +13 -30
  20. package/dist/cjs/api/resources/customer/resources/events/client/Client.d.ts +0 -1
  21. package/dist/cjs/api/resources/customer/resources/events/client/Client.js +1 -5
  22. package/dist/cjs/api/resources/customer/resources/explore/client/Client.d.ts +2 -3
  23. package/dist/cjs/api/resources/customer/resources/explore/client/Client.js +2 -6
  24. package/dist/cjs/api/resources/customer/resources/shop/client/Client.d.ts +2 -5
  25. package/dist/cjs/api/resources/customer/resources/shop/client/Client.js +4 -16
  26. package/dist/cjs/api/resources/customer/resources/stands/client/Client.d.ts +19 -9
  27. package/dist/cjs/api/resources/customer/resources/stands/client/Client.js +64 -30
  28. package/dist/cjs/api/resources/customer/resources/stands/client/requests/CheckoutStandsRequest.d.ts +7 -1
  29. package/dist/cjs/api/resources/customer/resources/stands/client/requests/CreatePaymentIntentStandsRequest.d.ts +1 -0
  30. package/dist/cjs/api/resources/customer/resources/stands/types/CheckoutStandsResponse.d.ts +4 -0
  31. package/dist/cjs/api/resources/customer/resources/stands/types/CreatePaymentIntentStandsResponse.d.ts +16 -0
  32. package/dist/cjs/api/resources/customer/resources/stands/types/CreatePaymentIntentStandsResponse.js +10 -0
  33. package/dist/cjs/api/resources/customer/resources/stands/types/index.d.ts +2 -0
  34. package/dist/cjs/api/resources/customer/resources/stands/types/index.js +2 -0
  35. package/dist/cjs/api/resources/customerStands/client/Client.d.ts +0 -32
  36. package/dist/cjs/api/resources/customerStands/client/Client.js +0 -119
  37. package/dist/cjs/api/resources/customerStands/client/requests/index.d.ts +0 -2
  38. package/dist/cjs/api/resources/customerStands/types/index.d.ts +0 -2
  39. package/dist/cjs/api/resources/customerStands/types/index.js +0 -2
  40. package/dist/cjs/api/types/AppHttpResourcesApiV1BusinessCommerceProductResource.d.ts +1 -1
  41. package/dist/cjs/api/types/CartResource.d.ts +1 -1
  42. package/dist/cjs/api/types/InventoryLevelResource.d.ts +3 -3
  43. package/dist/cjs/api/types/OrderItemResource.d.ts +10 -0
  44. package/dist/cjs/api/types/OrderResource.d.ts +24 -9
  45. package/dist/cjs/api/types/PaginationResource.d.ts +4 -4
  46. package/dist/cjs/api/types/PriceListResource.d.ts +1 -1
  47. package/dist/cjs/api/types/PriceResource.d.ts +3 -3
  48. package/dist/cjs/api/types/ProductResource.d.ts +5 -6
  49. package/dist/cjs/api/types/Transaction.d.ts +6 -6
  50. package/dist/cjs/api/types/VariantResource.d.ts +3 -3
  51. package/dist/cjs/api/types/index.d.ts +1 -2
  52. package/dist/cjs/api/types/index.js +1 -2
  53. package/dist/cjs/version.d.ts +1 -1
  54. package/dist/cjs/version.js +1 -1
  55. package/dist/esm/BaseClient.mjs +2 -2
  56. package/dist/esm/api/resources/business/resources/stands/client/requests/UpdateStandRequest.d.mts +7 -0
  57. package/dist/esm/api/resources/customer/client/Client.d.mts +0 -1
  58. package/dist/esm/api/resources/customer/client/Client.mjs +1 -5
  59. package/dist/esm/api/resources/customer/resources/ads/client/Client.d.mts +2 -4
  60. package/dist/esm/api/resources/customer/resources/ads/client/Client.mjs +4 -12
  61. package/dist/esm/api/resources/customer/resources/businesses/client/Client.d.mts +27 -34
  62. package/dist/esm/api/resources/customer/resources/businesses/client/Client.mjs +83 -111
  63. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.mts +0 -1
  64. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.mjs +1 -5
  65. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.mts +0 -2
  66. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.mjs +2 -10
  67. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.d.mts +0 -3
  68. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.mjs +7 -19
  69. package/dist/esm/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.mts +4 -0
  70. package/dist/esm/api/resources/customer/resources/discovery/client/Client.d.mts +2 -14
  71. package/dist/esm/api/resources/customer/resources/discovery/client/Client.mjs +34 -82
  72. package/dist/esm/api/resources/customer/resources/editorials/client/Client.d.mts +3 -7
  73. package/dist/esm/api/resources/customer/resources/editorials/client/Client.mjs +14 -31
  74. package/dist/esm/api/resources/customer/resources/events/client/Client.d.mts +0 -1
  75. package/dist/esm/api/resources/customer/resources/events/client/Client.mjs +1 -5
  76. package/dist/esm/api/resources/customer/resources/explore/client/Client.d.mts +2 -3
  77. package/dist/esm/api/resources/customer/resources/explore/client/Client.mjs +3 -7
  78. package/dist/esm/api/resources/customer/resources/shop/client/Client.d.mts +2 -5
  79. package/dist/esm/api/resources/customer/resources/shop/client/Client.mjs +5 -17
  80. package/dist/esm/api/resources/customer/resources/stands/client/Client.d.mts +19 -9
  81. package/dist/esm/api/resources/customer/resources/stands/client/Client.mjs +64 -30
  82. package/dist/esm/api/resources/customer/resources/stands/client/requests/CheckoutStandsRequest.d.mts +7 -1
  83. package/dist/esm/api/resources/customer/resources/stands/client/requests/CreatePaymentIntentStandsRequest.d.mts +1 -0
  84. package/dist/esm/api/resources/customer/resources/stands/types/CheckoutStandsResponse.d.mts +4 -0
  85. package/dist/esm/api/resources/customer/resources/stands/types/CreatePaymentIntentStandsResponse.d.mts +16 -0
  86. package/dist/esm/api/resources/customer/resources/stands/types/CreatePaymentIntentStandsResponse.mjs +7 -0
  87. package/dist/esm/api/resources/customer/resources/stands/types/index.d.mts +2 -0
  88. package/dist/esm/api/resources/customer/resources/stands/types/index.mjs +2 -0
  89. package/dist/esm/api/resources/customerStands/client/Client.d.mts +0 -32
  90. package/dist/esm/api/resources/customerStands/client/Client.mjs +0 -119
  91. package/dist/esm/api/resources/customerStands/client/requests/index.d.mts +0 -2
  92. package/dist/esm/api/resources/customerStands/types/index.d.mts +0 -2
  93. package/dist/esm/api/resources/customerStands/types/index.mjs +0 -2
  94. package/dist/esm/api/types/AppHttpResourcesApiV1BusinessCommerceProductResource.d.mts +1 -1
  95. package/dist/esm/api/types/CartResource.d.mts +1 -1
  96. package/dist/esm/api/types/InventoryLevelResource.d.mts +3 -3
  97. package/dist/esm/api/types/OrderItemResource.d.mts +10 -0
  98. package/dist/esm/api/types/OrderResource.d.mts +24 -9
  99. package/dist/esm/api/types/PaginationResource.d.mts +4 -4
  100. package/dist/esm/api/types/PriceListResource.d.mts +1 -1
  101. package/dist/esm/api/types/PriceResource.d.mts +3 -3
  102. package/dist/esm/api/types/ProductResource.d.mts +5 -6
  103. package/dist/esm/api/types/Transaction.d.mts +6 -6
  104. package/dist/esm/api/types/VariantResource.d.mts +3 -3
  105. package/dist/esm/api/types/index.d.mts +1 -2
  106. package/dist/esm/api/types/index.mjs +1 -2
  107. package/dist/esm/version.d.mts +1 -1
  108. package/dist/esm/version.mjs +1 -1
  109. package/package.json +1 -1
  110. package/reference.md +29 -131
  111. package/dist/cjs/api/resources/customerStands/client/requests/CustomerStandCheckoutRequest.d.ts +0 -15
  112. package/dist/cjs/api/resources/customerStands/client/requests/CustomerStandPaymentIntentRequest.d.ts +0 -10
  113. package/dist/cjs/api/resources/customerStands/types/CustomerStandCheckoutResponse.d.ts +0 -4
  114. package/dist/cjs/api/resources/customerStands/types/CustomerStandCheckoutResponse.js +0 -3
  115. package/dist/cjs/api/resources/customerStands/types/CustomerStandPaymentIntentResponse.d.ts +0 -12
  116. package/dist/cjs/api/resources/customerStands/types/CustomerStandPaymentIntentResponse.js +0 -10
  117. package/dist/cjs/api/types/ImageResource.d.ts +0 -6
  118. package/dist/cjs/api/types/ImageResource.js +0 -3
  119. package/dist/cjs/api/types/ProductCategoryResource.d.ts +0 -8
  120. package/dist/cjs/api/types/ProductCategoryResource.js +0 -3
  121. package/dist/esm/api/resources/customerStands/client/requests/CustomerStandCheckoutRequest.d.mts +0 -15
  122. package/dist/esm/api/resources/customerStands/client/requests/CustomerStandPaymentIntentRequest.d.mts +0 -10
  123. package/dist/esm/api/resources/customerStands/types/CustomerStandCheckoutResponse.d.mts +0 -4
  124. package/dist/esm/api/resources/customerStands/types/CustomerStandCheckoutResponse.mjs +0 -2
  125. package/dist/esm/api/resources/customerStands/types/CustomerStandPaymentIntentResponse.d.mts +0 -12
  126. package/dist/esm/api/resources/customerStands/types/CustomerStandPaymentIntentResponse.mjs +0 -7
  127. package/dist/esm/api/types/ImageResource.d.mts +0 -6
  128. package/dist/esm/api/types/ImageResource.mjs +0 -2
  129. package/dist/esm/api/types/ProductCategoryResource.d.mts +0 -8
  130. package/dist/esm/api/types/ProductCategoryResource.mjs +0 -2
  131. /package/dist/cjs/api/resources/{customerStands/client/requests/CustomerStandCheckoutRequest.js → customer/resources/stands/types/CheckoutStandsResponse.js} +0 -0
  132. /package/dist/cjs/api/{resources/customerStands/client/requests/CustomerStandPaymentIntentRequest.js → types/OrderItemResource.js} +0 -0
  133. /package/dist/esm/api/resources/{customerStands/client/requests/CustomerStandCheckoutRequest.mjs → customer/resources/stands/types/CheckoutStandsResponse.mjs} +0 -0
  134. /package/dist/esm/api/{resources/customerStands/client/requests/CustomerStandPaymentIntentRequest.mjs → types/OrderItemResource.mjs} +0 -0
@@ -35,8 +35,6 @@ export class BusinessesClient {
35
35
  * @param {FiveOneEat.customer.ProfileBusinessesRequest} request
36
36
  * @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
37
37
  *
38
- * @throws {@link FiveOneEat.UnauthorizedError}
39
- *
40
38
  * @example
41
39
  * await client.customer.businesses.profile({
42
40
  * business: "katzs-deli"
@@ -49,8 +47,7 @@ export class BusinessesClient {
49
47
  return __awaiter(this, void 0, void 0, function* () {
50
48
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
51
49
  const { business } = request;
52
- const _authRequest = yield this._options.authProvider.getAuthRequest();
53
- 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);
50
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
54
51
  const _response = yield core.fetcher({
55
52
  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/businesses/${core.url.encodePathParam(business)}`),
56
53
  method: "GET",
@@ -69,16 +66,11 @@ export class BusinessesClient {
69
66
  };
70
67
  }
71
68
  if (_response.error.reason === "status-code") {
72
- switch (_response.error.statusCode) {
73
- case 401:
74
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
75
- default:
76
- throw new errors.FiveOneEatError({
77
- statusCode: _response.error.statusCode,
78
- body: _response.error.body,
79
- rawResponse: _response.rawResponse,
80
- });
81
- }
69
+ throw new errors.FiveOneEatError({
70
+ statusCode: _response.error.statusCode,
71
+ body: _response.error.body,
72
+ rawResponse: _response.rawResponse,
73
+ });
82
74
  }
83
75
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}");
84
76
  });
@@ -89,7 +81,6 @@ export class BusinessesClient {
89
81
  * @param {FiveOneEat.customer.MenusBusinessesRequest} request
90
82
  * @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
91
83
  *
92
- * @throws {@link FiveOneEat.UnauthorizedError}
93
84
  * @throws {@link FiveOneEat.UnprocessableEntityError}
94
85
  *
95
86
  * @example
@@ -108,8 +99,7 @@ export class BusinessesClient {
108
99
  page,
109
100
  per_page: perPage,
110
101
  };
111
- const _authRequest = yield this._options.authProvider.getAuthRequest();
112
- 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);
102
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
113
103
  const _response = yield core.fetcher({
114
104
  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/businesses/${core.url.encodePathParam(business)}/menus`),
115
105
  method: "GET",
@@ -134,8 +124,6 @@ export class BusinessesClient {
134
124
  }
135
125
  if (_response.error.reason === "status-code") {
136
126
  switch (_response.error.statusCode) {
137
- case 401:
138
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
139
127
  case 422:
140
128
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
141
129
  default:
@@ -155,7 +143,6 @@ export class BusinessesClient {
155
143
  * @param {FiveOneEat.customer.PhotosBusinessesRequest} request
156
144
  * @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
157
145
  *
158
- * @throws {@link FiveOneEat.UnauthorizedError}
159
146
  * @throws {@link FiveOneEat.UnprocessableEntityError}
160
147
  *
161
148
  * @example
@@ -174,8 +161,7 @@ export class BusinessesClient {
174
161
  page,
175
162
  per_page: perPage,
176
163
  };
177
- const _authRequest = yield this._options.authProvider.getAuthRequest();
178
- 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);
164
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
179
165
  const _response = yield core.fetcher({
180
166
  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/businesses/${core.url.encodePathParam(business)}/photos`),
181
167
  method: "GET",
@@ -200,8 +186,6 @@ export class BusinessesClient {
200
186
  }
201
187
  if (_response.error.reason === "status-code") {
202
188
  switch (_response.error.statusCode) {
203
- case 401:
204
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
205
189
  case 422:
206
190
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
207
191
  default:
@@ -216,32 +200,27 @@ export class BusinessesClient {
216
200
  });
217
201
  }
218
202
  /**
219
- * Add a business to the authenticated user's favorites.
203
+ * Retrieve active and upcoming temporary locations for a business.
220
204
  *
221
- * @param {FiveOneEat.customer.FavoriteBusinessesRequest} request
205
+ * @param {FiveOneEat.customer.ListTemporaryLocationsBusinessesRequest} request
222
206
  * @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
223
207
  *
224
- * @throws {@link FiveOneEat.UnauthorizedError}
225
- * @throws {@link FiveOneEat.NotFoundError}
226
- * @throws {@link FiveOneEat.ConflictError}
227
- *
228
208
  * @example
229
- * await client.customer.businesses.favorite({
209
+ * await client.customer.businesses.listTemporaryLocations({
230
210
  * business: "katzs-deli"
231
211
  * })
232
212
  */
233
- favorite(request, requestOptions) {
234
- return core.HttpResponsePromise.fromPromise(this.__favorite(request, requestOptions));
213
+ listTemporaryLocations(request, requestOptions) {
214
+ return core.HttpResponsePromise.fromPromise(this.__listTemporaryLocations(request, requestOptions));
235
215
  }
236
- __favorite(request, requestOptions) {
216
+ __listTemporaryLocations(request, requestOptions) {
237
217
  return __awaiter(this, void 0, void 0, function* () {
238
218
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
239
219
  const { business } = request;
240
- const _authRequest = yield this._options.authProvider.getAuthRequest();
241
- 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);
220
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
242
221
  const _response = yield core.fetcher({
243
- 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/businesses/${core.url.encodePathParam(business)}/favorite`),
244
- method: "POST",
222
+ 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/businesses/${core.url.encodePathParam(business)}/temporary-locations`),
223
+ method: "GET",
245
224
  headers: _headers,
246
225
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
247
226
  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,
@@ -257,52 +236,50 @@ export class BusinessesClient {
257
236
  };
258
237
  }
259
238
  if (_response.error.reason === "status-code") {
260
- switch (_response.error.statusCode) {
261
- case 401:
262
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
263
- case 404:
264
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
265
- case 409:
266
- throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
267
- default:
268
- throw new errors.FiveOneEatError({
269
- statusCode: _response.error.statusCode,
270
- body: _response.error.body,
271
- rawResponse: _response.rawResponse,
272
- });
273
- }
239
+ throw new errors.FiveOneEatError({
240
+ statusCode: _response.error.statusCode,
241
+ body: _response.error.body,
242
+ rawResponse: _response.rawResponse,
243
+ });
274
244
  }
275
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/businesses/{business}/favorite");
245
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}/temporary-locations");
276
246
  });
277
247
  }
278
248
  /**
279
- * Remove a business from the authenticated user's favorites.
249
+ * Returns available pickup timeslots for a business on a given date.
280
250
  *
281
- * @param {FiveOneEat.customer.UnfavoriteBusinessesRequest} request
251
+ * @param {FiveOneEat.customer.GetPickupTimeslotsBusinessesRequest} request
282
252
  * @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
283
253
  *
284
- * @throws {@link FiveOneEat.UnauthorizedError}
285
- * @throws {@link FiveOneEat.NotFoundError}
254
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
286
255
  *
287
256
  * @example
288
- * await client.customer.businesses.unfavorite({
289
- * business: "katzs-deli"
257
+ * await client.customer.businesses.getPickupTimeslots({
258
+ * handle: "katzs-deli",
259
+ * date: "2023-01-15"
290
260
  * })
291
261
  */
292
- unfavorite(request, requestOptions) {
293
- return core.HttpResponsePromise.fromPromise(this.__unfavorite(request, requestOptions));
262
+ getPickupTimeslots(request, requestOptions) {
263
+ return core.HttpResponsePromise.fromPromise(this.__getPickupTimeslots(request, requestOptions));
294
264
  }
295
- __unfavorite(request, requestOptions) {
265
+ __getPickupTimeslots(request, requestOptions) {
296
266
  return __awaiter(this, void 0, void 0, function* () {
297
267
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
298
- const { business } = request;
299
- const _authRequest = yield this._options.authProvider.getAuthRequest();
300
- 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);
268
+ const { handle, date } = request;
269
+ const _queryParams = {
270
+ date,
271
+ };
272
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
301
273
  const _response = yield core.fetcher({
302
- 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/businesses/${core.url.encodePathParam(business)}/favorite`),
303
- method: "DELETE",
274
+ 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/businesses/${core.url.encodePathParam(handle)}/pickup-timeslots`),
275
+ method: "GET",
304
276
  headers: _headers,
305
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
277
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
278
+ queryString: core.url
279
+ .queryBuilder()
280
+ .addMany(_queryParams)
281
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
282
+ .build(),
306
283
  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,
307
284
  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,
308
285
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -310,14 +287,15 @@ export class BusinessesClient {
310
287
  logging: this._options.logging,
311
288
  });
312
289
  if (_response.ok) {
313
- return { data: undefined, rawResponse: _response.rawResponse };
290
+ return {
291
+ data: _response.body,
292
+ rawResponse: _response.rawResponse,
293
+ };
314
294
  }
315
295
  if (_response.error.reason === "status-code") {
316
296
  switch (_response.error.statusCode) {
317
- case 401:
318
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
319
- case 404:
320
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
297
+ case 422:
298
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
321
299
  default:
322
300
  throw new errors.FiveOneEatError({
323
301
  statusCode: _response.error.statusCode,
@@ -326,34 +304,36 @@ export class BusinessesClient {
326
304
  });
327
305
  }
328
306
  }
329
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/businesses/{business}/favorite");
307
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/pickup-timeslots");
330
308
  });
331
309
  }
332
310
  /**
333
- * Retrieve active and upcoming temporary locations for a business.
311
+ * Add a business to the authenticated user's favorites.
334
312
  *
335
- * @param {FiveOneEat.customer.ListTemporaryLocationsBusinessesRequest} request
313
+ * @param {FiveOneEat.customer.FavoriteBusinessesRequest} request
336
314
  * @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
337
315
  *
338
316
  * @throws {@link FiveOneEat.UnauthorizedError}
317
+ * @throws {@link FiveOneEat.NotFoundError}
318
+ * @throws {@link FiveOneEat.ConflictError}
339
319
  *
340
320
  * @example
341
- * await client.customer.businesses.listTemporaryLocations({
321
+ * await client.customer.businesses.favorite({
342
322
  * business: "katzs-deli"
343
323
  * })
344
324
  */
345
- listTemporaryLocations(request, requestOptions) {
346
- return core.HttpResponsePromise.fromPromise(this.__listTemporaryLocations(request, requestOptions));
325
+ favorite(request, requestOptions) {
326
+ return core.HttpResponsePromise.fromPromise(this.__favorite(request, requestOptions));
347
327
  }
348
- __listTemporaryLocations(request, requestOptions) {
328
+ __favorite(request, requestOptions) {
349
329
  return __awaiter(this, void 0, void 0, function* () {
350
330
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
351
331
  const { business } = request;
352
332
  const _authRequest = yield this._options.authProvider.getAuthRequest();
353
333
  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);
354
334
  const _response = yield core.fetcher({
355
- 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/businesses/${core.url.encodePathParam(business)}/temporary-locations`),
356
- method: "GET",
335
+ 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/businesses/${core.url.encodePathParam(business)}/favorite`),
336
+ method: "POST",
357
337
  headers: _headers,
358
338
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
359
339
  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,
@@ -372,6 +352,10 @@ export class BusinessesClient {
372
352
  switch (_response.error.statusCode) {
373
353
  case 401:
374
354
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
355
+ case 404:
356
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
357
+ case 409:
358
+ throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
375
359
  default:
376
360
  throw new errors.FiveOneEatError({
377
361
  statusCode: _response.error.statusCode,
@@ -380,46 +364,37 @@ export class BusinessesClient {
380
364
  });
381
365
  }
382
366
  }
383
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}/temporary-locations");
367
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/businesses/{business}/favorite");
384
368
  });
385
369
  }
386
370
  /**
387
- * Returns available pickup timeslots for a business on a given date.
371
+ * Remove a business from the authenticated user's favorites.
388
372
  *
389
- * @param {FiveOneEat.customer.GetPickupTimeslotsBusinessesRequest} request
373
+ * @param {FiveOneEat.customer.UnfavoriteBusinessesRequest} request
390
374
  * @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
391
375
  *
392
376
  * @throws {@link FiveOneEat.UnauthorizedError}
393
- * @throws {@link FiveOneEat.UnprocessableEntityError}
377
+ * @throws {@link FiveOneEat.NotFoundError}
394
378
  *
395
379
  * @example
396
- * await client.customer.businesses.getPickupTimeslots({
397
- * handle: "katzs-deli",
398
- * date: "2023-01-15"
380
+ * await client.customer.businesses.unfavorite({
381
+ * business: "katzs-deli"
399
382
  * })
400
383
  */
401
- getPickupTimeslots(request, requestOptions) {
402
- return core.HttpResponsePromise.fromPromise(this.__getPickupTimeslots(request, requestOptions));
384
+ unfavorite(request, requestOptions) {
385
+ return core.HttpResponsePromise.fromPromise(this.__unfavorite(request, requestOptions));
403
386
  }
404
- __getPickupTimeslots(request, requestOptions) {
387
+ __unfavorite(request, requestOptions) {
405
388
  return __awaiter(this, void 0, void 0, function* () {
406
389
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
407
- const { handle, date } = request;
408
- const _queryParams = {
409
- date,
410
- };
390
+ const { business } = request;
411
391
  const _authRequest = yield this._options.authProvider.getAuthRequest();
412
392
  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);
413
393
  const _response = yield core.fetcher({
414
- 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/businesses/${core.url.encodePathParam(handle)}/pickup-timeslots`),
415
- method: "GET",
394
+ 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/businesses/${core.url.encodePathParam(business)}/favorite`),
395
+ method: "DELETE",
416
396
  headers: _headers,
417
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
418
- queryString: core.url
419
- .queryBuilder()
420
- .addMany(_queryParams)
421
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
422
- .build(),
397
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
423
398
  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,
424
399
  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,
425
400
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -427,17 +402,14 @@ export class BusinessesClient {
427
402
  logging: this._options.logging,
428
403
  });
429
404
  if (_response.ok) {
430
- return {
431
- data: _response.body,
432
- rawResponse: _response.rawResponse,
433
- };
405
+ return { data: undefined, rawResponse: _response.rawResponse };
434
406
  }
435
407
  if (_response.error.reason === "status-code") {
436
408
  switch (_response.error.statusCode) {
437
409
  case 401:
438
410
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
439
- case 422:
440
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
411
+ case 404:
412
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
441
413
  default:
442
414
  throw new errors.FiveOneEatError({
443
415
  statusCode: _response.error.statusCode,
@@ -446,7 +418,7 @@ export class BusinessesClient {
446
418
  });
447
419
  }
448
420
  }
449
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/pickup-timeslots");
421
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/businesses/{business}/favorite");
450
422
  });
451
423
  }
452
424
  }
@@ -19,7 +19,6 @@ export declare class BulletinsClient {
19
19
  * @param {FiveOneEat.customer.businesses.ListBulletinsRequest} request
20
20
  * @param {BulletinsClient.RequestOptions} requestOptions - Request-specific configuration.
21
21
  *
22
- * @throws {@link FiveOneEat.UnauthorizedError}
23
22
  * @throws {@link FiveOneEat.UnprocessableEntityError}
24
23
  *
25
24
  * @example
@@ -30,7 +30,6 @@ export class BulletinsClient {
30
30
  * @param {FiveOneEat.customer.businesses.ListBulletinsRequest} request
31
31
  * @param {BulletinsClient.RequestOptions} requestOptions - Request-specific configuration.
32
32
  *
33
- * @throws {@link FiveOneEat.UnauthorizedError}
34
33
  * @throws {@link FiveOneEat.UnprocessableEntityError}
35
34
  *
36
35
  * @example
@@ -49,8 +48,7 @@ export class BulletinsClient {
49
48
  page,
50
49
  per_page: perPage,
51
50
  };
52
- const _authRequest = yield this._options.authProvider.getAuthRequest();
53
- 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);
51
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
54
52
  const _response = yield core.fetcher({
55
53
  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/businesses/${core.url.encodePathParam(business)}/bulletins`),
56
54
  method: "GET",
@@ -75,8 +73,6 @@ export class BulletinsClient {
75
73
  }
76
74
  if (_response.error.reason === "status-code") {
77
75
  switch (_response.error.statusCode) {
78
- case 401:
79
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
80
76
  case 422:
81
77
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
82
78
  default:
@@ -16,7 +16,6 @@ export declare class CommentsClient {
16
16
  * @param {FiveOneEat.customer.businesses.bulletins.ListCommentsRequest} request
17
17
  * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
18
18
  *
19
- * @throws {@link FiveOneEat.UnauthorizedError}
20
19
  * @throws {@link FiveOneEat.NotFoundError}
21
20
  * @throws {@link FiveOneEat.UnprocessableEntityError}
22
21
  *
@@ -53,7 +52,6 @@ export declare class CommentsClient {
53
52
  * @param {FiveOneEat.customer.businesses.bulletins.ListRepliesCommentsRequest} request
54
53
  * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
55
54
  *
56
- * @throws {@link FiveOneEat.UnauthorizedError}
57
55
  * @throws {@link FiveOneEat.NotFoundError}
58
56
  * @throws {@link FiveOneEat.UnprocessableEntityError}
59
57
  *
@@ -36,7 +36,6 @@ export class CommentsClient {
36
36
  * @param {FiveOneEat.customer.businesses.bulletins.ListCommentsRequest} request
37
37
  * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
38
38
  *
39
- * @throws {@link FiveOneEat.UnauthorizedError}
40
39
  * @throws {@link FiveOneEat.NotFoundError}
41
40
  * @throws {@link FiveOneEat.UnprocessableEntityError}
42
41
  *
@@ -57,8 +56,7 @@ export class CommentsClient {
57
56
  page,
58
57
  per_page: perPage,
59
58
  };
60
- const _authRequest = yield this._options.authProvider.getAuthRequest();
61
- 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);
59
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
62
60
  const _response = yield core.fetcher({
63
61
  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/businesses/${core.url.encodePathParam(business)}/bulletins/${core.url.encodePathParam(bulletin)}/comments`),
64
62
  method: "GET",
@@ -83,8 +81,6 @@ export class CommentsClient {
83
81
  }
84
82
  if (_response.error.reason === "status-code") {
85
83
  switch (_response.error.statusCode) {
86
- case 401:
87
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
88
84
  case 404:
89
85
  throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
90
86
  case 422:
@@ -171,7 +167,6 @@ export class CommentsClient {
171
167
  * @param {FiveOneEat.customer.businesses.bulletins.ListRepliesCommentsRequest} request
172
168
  * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
173
169
  *
174
- * @throws {@link FiveOneEat.UnauthorizedError}
175
170
  * @throws {@link FiveOneEat.NotFoundError}
176
171
  * @throws {@link FiveOneEat.UnprocessableEntityError}
177
172
  *
@@ -193,8 +188,7 @@ export class CommentsClient {
193
188
  page,
194
189
  per_page: perPage,
195
190
  };
196
- const _authRequest = yield this._options.authProvider.getAuthRequest();
197
- 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);
191
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
198
192
  const _response = yield core.fetcher({
199
193
  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/businesses/${core.url.encodePathParam(business)}/bulletins/${core.url.encodePathParam(bulletin)}/comments/${core.url.encodePathParam(comment)}/replies`),
200
194
  method: "GET",
@@ -219,8 +213,6 @@ export class CommentsClient {
219
213
  }
220
214
  if (_response.error.reason === "status-code") {
221
215
  switch (_response.error.statusCode) {
222
- case 401:
223
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
224
216
  case 404:
225
217
  throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
226
218
  case 422:
@@ -16,7 +16,6 @@ export declare class EventsClient {
16
16
  * @param {FiveOneEat.customer.businesses.ListEventsRequest} request
17
17
  * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
18
18
  *
19
- * @throws {@link FiveOneEat.UnauthorizedError}
20
19
  * @throws {@link FiveOneEat.UnprocessableEntityError}
21
20
  *
22
21
  * @example
@@ -32,8 +31,6 @@ export declare class EventsClient {
32
31
  * @param {FiveOneEat.customer.businesses.GetEventsRequest} request
33
32
  * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
34
33
  *
35
- * @throws {@link FiveOneEat.UnauthorizedError}
36
- *
37
34
  * @example
38
35
  * await client.customer.businesses.events.get({
39
36
  * business: "katzs-deli",
@@ -36,7 +36,6 @@ export class EventsClient {
36
36
  * @param {FiveOneEat.customer.businesses.ListEventsRequest} request
37
37
  * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
38
38
  *
39
- * @throws {@link FiveOneEat.UnauthorizedError}
40
39
  * @throws {@link FiveOneEat.UnprocessableEntityError}
41
40
  *
42
41
  * @example
@@ -55,8 +54,7 @@ export class EventsClient {
55
54
  page,
56
55
  per_page: perPage,
57
56
  };
58
- const _authRequest = yield this._options.authProvider.getAuthRequest();
59
- 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);
57
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
60
58
  const _response = yield core.fetcher({
61
59
  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/businesses/${core.url.encodePathParam(business)}/events`),
62
60
  method: "GET",
@@ -81,8 +79,6 @@ export class EventsClient {
81
79
  }
82
80
  if (_response.error.reason === "status-code") {
83
81
  switch (_response.error.statusCode) {
84
- case 401:
85
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
86
82
  case 422:
87
83
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
88
84
  default:
@@ -102,8 +98,6 @@ export class EventsClient {
102
98
  * @param {FiveOneEat.customer.businesses.GetEventsRequest} request
103
99
  * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
104
100
  *
105
- * @throws {@link FiveOneEat.UnauthorizedError}
106
- *
107
101
  * @example
108
102
  * await client.customer.businesses.events.get({
109
103
  * business: "katzs-deli",
@@ -117,8 +111,7 @@ export class EventsClient {
117
111
  return __awaiter(this, void 0, void 0, function* () {
118
112
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
119
113
  const { business, event } = request;
120
- const _authRequest = yield this._options.authProvider.getAuthRequest();
121
- 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);
114
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
122
115
  const _response = yield core.fetcher({
123
116
  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/businesses/${core.url.encodePathParam(business)}/events/${core.url.encodePathParam(event)}`),
124
117
  method: "GET",
@@ -137,16 +130,11 @@ export class EventsClient {
137
130
  };
138
131
  }
139
132
  if (_response.error.reason === "status-code") {
140
- switch (_response.error.statusCode) {
141
- case 401:
142
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
143
- default:
144
- throw new errors.FiveOneEatError({
145
- statusCode: _response.error.statusCode,
146
- body: _response.error.body,
147
- rawResponse: _response.rawResponse,
148
- });
149
- }
133
+ throw new errors.FiveOneEatError({
134
+ statusCode: _response.error.statusCode,
135
+ body: _response.error.body,
136
+ rawResponse: _response.rawResponse,
137
+ });
150
138
  }
151
139
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}/events/{event}");
152
140
  });
@@ -1,6 +1,10 @@
1
1
  export interface CreatePaymentIntentCartResponse {
2
2
  client_secret: string;
3
3
  payment_intent_id: string;
4
+ subtotal: number;
5
+ tax_amount: number;
6
+ platform_fee: number;
7
+ total_amount: number;
4
8
  amount: number;
5
9
  currency: CreatePaymentIntentCartResponse.Currency;
6
10
  }