@51eat/sdk 0.0.71 → 0.0.73

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 (94) 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 -4
  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.js +1 -2
  27. package/dist/cjs/api/resources/customer/resources/stands/types/CreatePaymentIntentStandsResponse.d.ts +4 -4
  28. package/dist/cjs/api/types/AppHttpResourcesApiV1BusinessCommerceProductResource.d.ts +1 -1
  29. package/dist/cjs/api/types/CartResource.d.ts +1 -1
  30. package/dist/cjs/api/types/InventoryLevelResource.d.ts +3 -3
  31. package/dist/cjs/api/types/OrderItemResource.d.ts +10 -0
  32. package/dist/cjs/api/types/OrderResource.d.ts +24 -9
  33. package/dist/cjs/api/types/PaginationResource.d.ts +4 -4
  34. package/dist/cjs/api/types/PriceListResource.d.ts +1 -1
  35. package/dist/cjs/api/types/PriceResource.d.ts +3 -3
  36. package/dist/cjs/api/types/ProductResource.d.ts +5 -6
  37. package/dist/cjs/api/types/Transaction.d.ts +6 -6
  38. package/dist/cjs/api/types/VariantResource.d.ts +3 -3
  39. package/dist/cjs/api/types/index.d.ts +1 -2
  40. package/dist/cjs/api/types/index.js +1 -2
  41. package/dist/cjs/version.d.ts +1 -1
  42. package/dist/cjs/version.js +1 -1
  43. package/dist/esm/BaseClient.mjs +2 -2
  44. package/dist/esm/api/resources/business/resources/stands/client/requests/UpdateStandRequest.d.mts +7 -0
  45. package/dist/esm/api/resources/customer/client/Client.d.mts +0 -1
  46. package/dist/esm/api/resources/customer/client/Client.mjs +1 -5
  47. package/dist/esm/api/resources/customer/resources/ads/client/Client.d.mts +2 -4
  48. package/dist/esm/api/resources/customer/resources/ads/client/Client.mjs +4 -12
  49. package/dist/esm/api/resources/customer/resources/businesses/client/Client.d.mts +27 -34
  50. package/dist/esm/api/resources/customer/resources/businesses/client/Client.mjs +83 -111
  51. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.mts +0 -1
  52. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.mjs +1 -5
  53. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.mts +0 -2
  54. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.mjs +2 -10
  55. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.d.mts +0 -3
  56. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.mjs +7 -19
  57. package/dist/esm/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.mts +4 -4
  58. package/dist/esm/api/resources/customer/resources/discovery/client/Client.d.mts +2 -14
  59. package/dist/esm/api/resources/customer/resources/discovery/client/Client.mjs +34 -82
  60. package/dist/esm/api/resources/customer/resources/editorials/client/Client.d.mts +3 -7
  61. package/dist/esm/api/resources/customer/resources/editorials/client/Client.mjs +14 -31
  62. package/dist/esm/api/resources/customer/resources/events/client/Client.d.mts +0 -1
  63. package/dist/esm/api/resources/customer/resources/events/client/Client.mjs +1 -5
  64. package/dist/esm/api/resources/customer/resources/explore/client/Client.d.mts +2 -3
  65. package/dist/esm/api/resources/customer/resources/explore/client/Client.mjs +3 -7
  66. package/dist/esm/api/resources/customer/resources/shop/client/Client.d.mts +2 -5
  67. package/dist/esm/api/resources/customer/resources/shop/client/Client.mjs +5 -17
  68. package/dist/esm/api/resources/customer/resources/stands/client/Client.mjs +1 -2
  69. package/dist/esm/api/resources/customer/resources/stands/types/CreatePaymentIntentStandsResponse.d.mts +4 -4
  70. package/dist/esm/api/types/AppHttpResourcesApiV1BusinessCommerceProductResource.d.mts +1 -1
  71. package/dist/esm/api/types/CartResource.d.mts +1 -1
  72. package/dist/esm/api/types/InventoryLevelResource.d.mts +3 -3
  73. package/dist/esm/api/types/OrderItemResource.d.mts +10 -0
  74. package/dist/esm/api/types/OrderResource.d.mts +24 -9
  75. package/dist/esm/api/types/PaginationResource.d.mts +4 -4
  76. package/dist/esm/api/types/PriceListResource.d.mts +1 -1
  77. package/dist/esm/api/types/PriceResource.d.mts +3 -3
  78. package/dist/esm/api/types/ProductResource.d.mts +5 -6
  79. package/dist/esm/api/types/Transaction.d.mts +6 -6
  80. package/dist/esm/api/types/VariantResource.d.mts +3 -3
  81. package/dist/esm/api/types/index.d.mts +1 -2
  82. package/dist/esm/api/types/index.mjs +1 -2
  83. package/dist/esm/version.d.mts +1 -1
  84. package/dist/esm/version.mjs +1 -1
  85. package/package.json +1 -1
  86. package/reference.md +19 -19
  87. package/dist/cjs/api/types/ImageResource.d.ts +0 -6
  88. package/dist/cjs/api/types/ProductCategoryResource.d.ts +0 -8
  89. package/dist/cjs/api/types/ProductCategoryResource.js +0 -3
  90. package/dist/esm/api/types/ImageResource.d.mts +0 -6
  91. package/dist/esm/api/types/ProductCategoryResource.d.mts +0 -8
  92. package/dist/esm/api/types/ProductCategoryResource.mjs +0 -2
  93. /package/dist/cjs/api/types/{ImageResource.js → OrderItemResource.js} +0 -0
  94. /package/dist/esm/api/types/{ImageResource.mjs → OrderItemResource.mjs} +0 -0
@@ -1,5 +1,5 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptions } from "../../../../../../BaseClient.js";
3
3
  import * as core from "../../../../../../core/index.js";
4
4
  import * as FiveOneEat from "../../../../../index.js";
5
5
  export declare namespace DiscoveryClient {
@@ -8,7 +8,7 @@ export declare namespace DiscoveryClient {
8
8
  }
9
9
  }
10
10
  export declare class DiscoveryClient {
11
- protected readonly _options: NormalizedClientOptionsWithAuth<DiscoveryClient.Options>;
11
+ protected readonly _options: NormalizedClientOptions<DiscoveryClient.Options>;
12
12
  constructor(options?: DiscoveryClient.Options);
13
13
  /**
14
14
  * Returns a paginated list of populated business categories, each with up to 10 businesses
@@ -18,7 +18,6 @@ export declare class DiscoveryClient {
18
18
  * @param {FiveOneEat.customer.FeedDiscoveryRequest} request
19
19
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
20
20
  *
21
- * @throws {@link FiveOneEat.UnauthorizedError}
22
21
  * @throws {@link FiveOneEat.UnprocessableEntityError}
23
22
  *
24
23
  * @example
@@ -35,8 +34,6 @@ export declare class DiscoveryClient {
35
34
  *
36
35
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
37
36
  *
38
- * @throws {@link FiveOneEat.UnauthorizedError}
39
- *
40
37
  * @example
41
38
  * await client.customer.discovery.highlights()
42
39
  */
@@ -49,8 +46,6 @@ export declare class DiscoveryClient {
49
46
  * @param {FiveOneEat.customer.CategoriesDiscoveryRequest} request
50
47
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
51
48
  *
52
- * @throws {@link FiveOneEat.UnauthorizedError}
53
- *
54
49
  * @example
55
50
  * await client.customer.discovery.categories()
56
51
  */
@@ -62,8 +57,6 @@ export declare class DiscoveryClient {
62
57
  *
63
58
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
64
59
  *
65
- * @throws {@link FiveOneEat.UnauthorizedError}
66
- *
67
60
  * @example
68
61
  * await client.customer.discovery.cuisines()
69
62
  */
@@ -75,8 +68,6 @@ export declare class DiscoveryClient {
75
68
  *
76
69
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
77
70
  *
78
- * @throws {@link FiveOneEat.UnauthorizedError}
79
- *
80
71
  * @example
81
72
  * await client.customer.discovery.certifications()
82
73
  */
@@ -88,8 +79,6 @@ export declare class DiscoveryClient {
88
79
  *
89
80
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
90
81
  *
91
- * @throws {@link FiveOneEat.UnauthorizedError}
92
- *
93
82
  * @example
94
83
  * await client.customer.discovery.allergens()
95
84
  */
@@ -102,7 +91,6 @@ export declare class DiscoveryClient {
102
91
  * @param {FiveOneEat.customer.CategoryBusinessesDiscoveryRequest} request
103
92
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
104
93
  *
105
- * @throws {@link FiveOneEat.UnauthorizedError}
106
94
  * @throws {@link FiveOneEat.UnprocessableEntityError}
107
95
  *
108
96
  * @example
@@ -53,7 +53,7 @@ const errors = __importStar(require("../../../../../../errors/index.js"));
53
53
  const FiveOneEat = __importStar(require("../../../../../index.js"));
54
54
  class DiscoveryClient {
55
55
  constructor(options = {}) {
56
- this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptions)(options);
57
57
  }
58
58
  /**
59
59
  * Returns a paginated list of populated business categories, each with up to 10 businesses
@@ -63,7 +63,6 @@ class DiscoveryClient {
63
63
  * @param {FiveOneEat.customer.FeedDiscoveryRequest} request
64
64
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
65
65
  *
66
- * @throws {@link FiveOneEat.UnauthorizedError}
67
66
  * @throws {@link FiveOneEat.UnprocessableEntityError}
68
67
  *
69
68
  * @example
@@ -85,8 +84,7 @@ class DiscoveryClient {
85
84
  "cuisine_ids[]": cuisineIdsArray,
86
85
  "certification_ids[]": certificationIdsArray,
87
86
  };
88
- const _authRequest = yield this._options.authProvider.getAuthRequest();
89
- 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);
87
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
90
88
  const _response = yield core.fetcher({
91
89
  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/discovery"),
92
90
  method: "GET",
@@ -108,8 +106,6 @@ class DiscoveryClient {
108
106
  }
109
107
  if (_response.error.reason === "status-code") {
110
108
  switch (_response.error.statusCode) {
111
- case 401:
112
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
113
109
  case 422:
114
110
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
115
111
  default:
@@ -130,8 +126,6 @@ class DiscoveryClient {
130
126
  *
131
127
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
132
128
  *
133
- * @throws {@link FiveOneEat.UnauthorizedError}
134
- *
135
129
  * @example
136
130
  * await client.customer.discovery.highlights()
137
131
  */
@@ -141,8 +135,7 @@ class DiscoveryClient {
141
135
  __highlights(requestOptions) {
142
136
  return __awaiter(this, void 0, void 0, function* () {
143
137
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
144
- const _authRequest = yield this._options.authProvider.getAuthRequest();
145
- 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);
138
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
146
139
  const _response = yield core.fetcher({
147
140
  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/discovery/highlights"),
148
141
  method: "GET",
@@ -158,16 +151,11 @@ class DiscoveryClient {
158
151
  return { data: _response.body, rawResponse: _response.rawResponse };
159
152
  }
160
153
  if (_response.error.reason === "status-code") {
161
- switch (_response.error.statusCode) {
162
- case 401:
163
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
164
- default:
165
- throw new errors.FiveOneEatError({
166
- statusCode: _response.error.statusCode,
167
- body: _response.error.body,
168
- rawResponse: _response.rawResponse,
169
- });
170
- }
154
+ throw new errors.FiveOneEatError({
155
+ statusCode: _response.error.statusCode,
156
+ body: _response.error.body,
157
+ rawResponse: _response.rawResponse,
158
+ });
171
159
  }
172
160
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/discovery/highlights");
173
161
  });
@@ -179,8 +167,6 @@ class DiscoveryClient {
179
167
  * @param {FiveOneEat.customer.CategoriesDiscoveryRequest} request
180
168
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
181
169
  *
182
- * @throws {@link FiveOneEat.UnauthorizedError}
183
- *
184
170
  * @example
185
171
  * await client.customer.discovery.categories()
186
172
  */
@@ -194,8 +180,7 @@ class DiscoveryClient {
194
180
  const _queryParams = {
195
181
  with_businesses: withBusinesses,
196
182
  };
197
- const _authRequest = yield this._options.authProvider.getAuthRequest();
198
- 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);
183
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
199
184
  const _response = yield core.fetcher({
200
185
  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/discovery/categories"),
201
186
  method: "GET",
@@ -219,16 +204,11 @@ class DiscoveryClient {
219
204
  };
220
205
  }
221
206
  if (_response.error.reason === "status-code") {
222
- switch (_response.error.statusCode) {
223
- case 401:
224
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
225
- default:
226
- throw new errors.FiveOneEatError({
227
- statusCode: _response.error.statusCode,
228
- body: _response.error.body,
229
- rawResponse: _response.rawResponse,
230
- });
231
- }
207
+ throw new errors.FiveOneEatError({
208
+ statusCode: _response.error.statusCode,
209
+ body: _response.error.body,
210
+ rawResponse: _response.rawResponse,
211
+ });
232
212
  }
233
213
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/discovery/categories");
234
214
  });
@@ -239,8 +219,6 @@ class DiscoveryClient {
239
219
  *
240
220
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
241
221
  *
242
- * @throws {@link FiveOneEat.UnauthorizedError}
243
- *
244
222
  * @example
245
223
  * await client.customer.discovery.cuisines()
246
224
  */
@@ -250,8 +228,7 @@ class DiscoveryClient {
250
228
  __cuisines(requestOptions) {
251
229
  return __awaiter(this, void 0, void 0, function* () {
252
230
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
253
- const _authRequest = yield this._options.authProvider.getAuthRequest();
254
- 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);
231
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
255
232
  const _response = yield core.fetcher({
256
233
  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/discovery/cuisines"),
257
234
  method: "GET",
@@ -270,16 +247,11 @@ class DiscoveryClient {
270
247
  };
271
248
  }
272
249
  if (_response.error.reason === "status-code") {
273
- switch (_response.error.statusCode) {
274
- case 401:
275
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
276
- default:
277
- throw new errors.FiveOneEatError({
278
- statusCode: _response.error.statusCode,
279
- body: _response.error.body,
280
- rawResponse: _response.rawResponse,
281
- });
282
- }
250
+ throw new errors.FiveOneEatError({
251
+ statusCode: _response.error.statusCode,
252
+ body: _response.error.body,
253
+ rawResponse: _response.rawResponse,
254
+ });
283
255
  }
284
256
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/discovery/cuisines");
285
257
  });
@@ -290,8 +262,6 @@ class DiscoveryClient {
290
262
  *
291
263
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
292
264
  *
293
- * @throws {@link FiveOneEat.UnauthorizedError}
294
- *
295
265
  * @example
296
266
  * await client.customer.discovery.certifications()
297
267
  */
@@ -301,8 +271,7 @@ class DiscoveryClient {
301
271
  __certifications(requestOptions) {
302
272
  return __awaiter(this, void 0, void 0, function* () {
303
273
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
304
- const _authRequest = yield this._options.authProvider.getAuthRequest();
305
- 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);
274
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
306
275
  const _response = yield core.fetcher({
307
276
  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/discovery/certifications"),
308
277
  method: "GET",
@@ -321,16 +290,11 @@ class DiscoveryClient {
321
290
  };
322
291
  }
323
292
  if (_response.error.reason === "status-code") {
324
- switch (_response.error.statusCode) {
325
- case 401:
326
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
327
- default:
328
- throw new errors.FiveOneEatError({
329
- statusCode: _response.error.statusCode,
330
- body: _response.error.body,
331
- rawResponse: _response.rawResponse,
332
- });
333
- }
293
+ throw new errors.FiveOneEatError({
294
+ statusCode: _response.error.statusCode,
295
+ body: _response.error.body,
296
+ rawResponse: _response.rawResponse,
297
+ });
334
298
  }
335
299
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/discovery/certifications");
336
300
  });
@@ -341,8 +305,6 @@ class DiscoveryClient {
341
305
  *
342
306
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
343
307
  *
344
- * @throws {@link FiveOneEat.UnauthorizedError}
345
- *
346
308
  * @example
347
309
  * await client.customer.discovery.allergens()
348
310
  */
@@ -352,8 +314,7 @@ class DiscoveryClient {
352
314
  __allergens(requestOptions) {
353
315
  return __awaiter(this, void 0, void 0, function* () {
354
316
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
355
- const _authRequest = yield this._options.authProvider.getAuthRequest();
356
- 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);
317
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
357
318
  const _response = yield core.fetcher({
358
319
  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/discovery/allergens"),
359
320
  method: "GET",
@@ -372,16 +333,11 @@ class DiscoveryClient {
372
333
  };
373
334
  }
374
335
  if (_response.error.reason === "status-code") {
375
- switch (_response.error.statusCode) {
376
- case 401:
377
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
378
- default:
379
- throw new errors.FiveOneEatError({
380
- statusCode: _response.error.statusCode,
381
- body: _response.error.body,
382
- rawResponse: _response.rawResponse,
383
- });
384
- }
336
+ throw new errors.FiveOneEatError({
337
+ statusCode: _response.error.statusCode,
338
+ body: _response.error.body,
339
+ rawResponse: _response.rawResponse,
340
+ });
385
341
  }
386
342
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/discovery/allergens");
387
343
  });
@@ -393,7 +349,6 @@ class DiscoveryClient {
393
349
  * @param {FiveOneEat.customer.CategoryBusinessesDiscoveryRequest} request
394
350
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
395
351
  *
396
- * @throws {@link FiveOneEat.UnauthorizedError}
397
352
  * @throws {@link FiveOneEat.UnprocessableEntityError}
398
353
  *
399
354
  * @example
@@ -414,8 +369,7 @@ class DiscoveryClient {
414
369
  per_page: perPage,
415
370
  search,
416
371
  };
417
- const _authRequest = yield this._options.authProvider.getAuthRequest();
418
- 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);
372
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
419
373
  const _response = yield core.fetcher({
420
374
  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/discovery/category/${core.url.encodePathParam(category)}/businesses`),
421
375
  method: "GET",
@@ -440,8 +394,6 @@ class DiscoveryClient {
440
394
  }
441
395
  if (_response.error.reason === "status-code") {
442
396
  switch (_response.error.statusCode) {
443
- case 401:
444
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
445
397
  case 422:
446
398
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
447
399
  default:
@@ -1,22 +1,20 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptions } from "../../../../../../BaseClient.js";
3
3
  import * as core from "../../../../../../core/index.js";
4
- import * as FiveOneEat from "../../../../../index.js";
4
+ import type * as FiveOneEat from "../../../../../index.js";
5
5
  export declare namespace EditorialsClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
9
  }
10
10
  export declare class EditorialsClient {
11
- protected readonly _options: NormalizedClientOptionsWithAuth<EditorialsClient.Options>;
11
+ protected readonly _options: NormalizedClientOptions<EditorialsClient.Options>;
12
12
  constructor(options?: EditorialsClient.Options);
13
13
  /**
14
14
  * Returns a paginated list of published editorials with basic business info.
15
15
  *
16
16
  * @param {EditorialsClient.RequestOptions} requestOptions - Request-specific configuration.
17
17
  *
18
- * @throws {@link FiveOneEat.UnauthorizedError}
19
- *
20
18
  * @example
21
19
  * await client.customer.editorials.list()
22
20
  */
@@ -29,8 +27,6 @@ export declare class EditorialsClient {
29
27
  * @param {FiveOneEat.customer.GetEditorialsRequest} request
30
28
  * @param {EditorialsClient.RequestOptions} requestOptions - Request-specific configuration.
31
29
  *
32
- * @throws {@link FiveOneEat.UnauthorizedError}
33
- *
34
30
  * @example
35
31
  * await client.customer.editorials.get({
36
32
  * slug: "slug"
@@ -50,18 +50,15 @@ const core = __importStar(require("../../../../../../core/index.js"));
50
50
  const environments = __importStar(require("../../../../../../environments.js"));
51
51
  const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
52
52
  const errors = __importStar(require("../../../../../../errors/index.js"));
53
- const FiveOneEat = __importStar(require("../../../../../index.js"));
54
53
  class EditorialsClient {
55
54
  constructor(options = {}) {
56
- this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
55
+ this._options = (0, BaseClient_js_1.normalizeClientOptions)(options);
57
56
  }
58
57
  /**
59
58
  * Returns a paginated list of published editorials with basic business info.
60
59
  *
61
60
  * @param {EditorialsClient.RequestOptions} requestOptions - Request-specific configuration.
62
61
  *
63
- * @throws {@link FiveOneEat.UnauthorizedError}
64
- *
65
62
  * @example
66
63
  * await client.customer.editorials.list()
67
64
  */
@@ -71,8 +68,7 @@ class EditorialsClient {
71
68
  __list(requestOptions) {
72
69
  return __awaiter(this, void 0, void 0, function* () {
73
70
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
74
- const _authRequest = yield this._options.authProvider.getAuthRequest();
75
- 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);
71
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
76
72
  const _response = yield core.fetcher({
77
73
  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/editorials"),
78
74
  method: "GET",
@@ -91,16 +87,11 @@ class EditorialsClient {
91
87
  };
92
88
  }
93
89
  if (_response.error.reason === "status-code") {
94
- switch (_response.error.statusCode) {
95
- case 401:
96
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
97
- default:
98
- throw new errors.FiveOneEatError({
99
- statusCode: _response.error.statusCode,
100
- body: _response.error.body,
101
- rawResponse: _response.rawResponse,
102
- });
103
- }
90
+ throw new errors.FiveOneEatError({
91
+ statusCode: _response.error.statusCode,
92
+ body: _response.error.body,
93
+ rawResponse: _response.rawResponse,
94
+ });
104
95
  }
105
96
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/editorials");
106
97
  });
@@ -112,8 +103,6 @@ class EditorialsClient {
112
103
  * @param {FiveOneEat.customer.GetEditorialsRequest} request
113
104
  * @param {EditorialsClient.RequestOptions} requestOptions - Request-specific configuration.
114
105
  *
115
- * @throws {@link FiveOneEat.UnauthorizedError}
116
- *
117
106
  * @example
118
107
  * await client.customer.editorials.get({
119
108
  * slug: "slug"
@@ -126,8 +115,7 @@ class EditorialsClient {
126
115
  return __awaiter(this, void 0, void 0, function* () {
127
116
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
128
117
  const { slug } = request;
129
- const _authRequest = yield this._options.authProvider.getAuthRequest();
130
- 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);
118
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
131
119
  const _response = yield core.fetcher({
132
120
  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/editorials/${core.url.encodePathParam(slug)}`),
133
121
  method: "GET",
@@ -146,16 +134,11 @@ class EditorialsClient {
146
134
  };
147
135
  }
148
136
  if (_response.error.reason === "status-code") {
149
- switch (_response.error.statusCode) {
150
- case 401:
151
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
152
- default:
153
- throw new errors.FiveOneEatError({
154
- statusCode: _response.error.statusCode,
155
- body: _response.error.body,
156
- rawResponse: _response.rawResponse,
157
- });
158
- }
137
+ throw new errors.FiveOneEatError({
138
+ statusCode: _response.error.statusCode,
139
+ body: _response.error.body,
140
+ rawResponse: _response.rawResponse,
141
+ });
159
142
  }
160
143
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/editorials/{slug}");
161
144
  });
@@ -21,7 +21,6 @@ export declare class EventsClient {
21
21
  * @param {FiveOneEat.customer.FeedEventsRequest} request
22
22
  * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
23
23
  *
24
- * @throws {@link FiveOneEat.UnauthorizedError}
25
24
  * @throws {@link FiveOneEat.UnprocessableEntityError}
26
25
  *
27
26
  * @example
@@ -68,7 +68,6 @@ class EventsClient {
68
68
  * @param {FiveOneEat.customer.FeedEventsRequest} request
69
69
  * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
70
70
  *
71
- * @throws {@link FiveOneEat.UnauthorizedError}
72
71
  * @throws {@link FiveOneEat.UnprocessableEntityError}
73
72
  *
74
73
  * @example
@@ -90,8 +89,7 @@ class EventsClient {
90
89
  per_page: perPage,
91
90
  page,
92
91
  };
93
- const _authRequest = yield this._options.authProvider.getAuthRequest();
94
- 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);
92
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
95
93
  const _response = yield core.fetcher({
96
94
  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"),
97
95
  method: "GET",
@@ -116,8 +114,6 @@ class EventsClient {
116
114
  }
117
115
  if (_response.error.reason === "status-code") {
118
116
  switch (_response.error.statusCode) {
119
- case 401:
120
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
121
117
  case 422:
122
118
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
123
119
  default:
@@ -1,5 +1,5 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptions } from "../../../../../../BaseClient.js";
3
3
  import * as core from "../../../../../../core/index.js";
4
4
  import * as FiveOneEat from "../../../../../index.js";
5
5
  export declare namespace ExploreClient {
@@ -8,7 +8,7 @@ export declare namespace ExploreClient {
8
8
  }
9
9
  }
10
10
  export declare class ExploreClient {
11
- protected readonly _options: NormalizedClientOptionsWithAuth<ExploreClient.Options>;
11
+ protected readonly _options: NormalizedClientOptions<ExploreClient.Options>;
12
12
  constructor(options?: ExploreClient.Options);
13
13
  /**
14
14
  * Retrieve businesses within the specified map bounds for map view.
@@ -17,7 +17,6 @@ export declare class ExploreClient {
17
17
  * @param {FiveOneEat.customer.BusinessesExploreRequest} request
18
18
  * @param {ExploreClient.RequestOptions} requestOptions - Request-specific configuration.
19
19
  *
20
- * @throws {@link FiveOneEat.UnauthorizedError}
21
20
  * @throws {@link FiveOneEat.UnprocessableEntityError}
22
21
  *
23
22
  * @example
@@ -53,7 +53,7 @@ const errors = __importStar(require("../../../../../../errors/index.js"));
53
53
  const FiveOneEat = __importStar(require("../../../../../index.js"));
54
54
  class ExploreClient {
55
55
  constructor(options = {}) {
56
- this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptions)(options);
57
57
  }
58
58
  /**
59
59
  * Retrieve businesses within the specified map bounds for map view.
@@ -62,7 +62,6 @@ class ExploreClient {
62
62
  * @param {FiveOneEat.customer.BusinessesExploreRequest} request
63
63
  * @param {ExploreClient.RequestOptions} requestOptions - Request-specific configuration.
64
64
  *
65
- * @throws {@link FiveOneEat.UnauthorizedError}
66
65
  * @throws {@link FiveOneEat.UnprocessableEntityError}
67
66
  *
68
67
  * @example
@@ -83,8 +82,7 @@ class ExploreClient {
83
82
  zoom_level: zoomLevel,
84
83
  categories,
85
84
  };
86
- const _authRequest = yield this._options.authProvider.getAuthRequest();
87
- 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);
85
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
88
86
  const _response = yield core.fetcher({
89
87
  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/explore/businesses"),
90
88
  method: "GET",
@@ -109,8 +107,6 @@ class ExploreClient {
109
107
  }
110
108
  if (_response.error.reason === "status-code") {
111
109
  switch (_response.error.statusCode) {
112
- case 401:
113
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
114
110
  case 422:
115
111
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
116
112
  default:
@@ -1,5 +1,5 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptions } from "../../../../../../BaseClient.js";
3
3
  import * as core from "../../../../../../core/index.js";
4
4
  import * as FiveOneEat from "../../../../../index.js";
5
5
  export declare namespace ShopClient {
@@ -8,13 +8,12 @@ export declare namespace ShopClient {
8
8
  }
9
9
  }
10
10
  export declare class ShopClient {
11
- protected readonly _options: NormalizedClientOptionsWithAuth<ShopClient.Options>;
11
+ protected readonly _options: NormalizedClientOptions<ShopClient.Options>;
12
12
  constructor(options?: ShopClient.Options);
13
13
  /**
14
14
  * @param {FiveOneEat.customer.ListProductsShopRequest} request
15
15
  * @param {ShopClient.RequestOptions} requestOptions - Request-specific configuration.
16
16
  *
17
- * @throws {@link FiveOneEat.UnauthorizedError}
18
17
  * @throws {@link FiveOneEat.NotFoundError}
19
18
  *
20
19
  * @example
@@ -28,7 +27,6 @@ export declare class ShopClient {
28
27
  * @param {FiveOneEat.customer.GetProductShopRequest} request
29
28
  * @param {ShopClient.RequestOptions} requestOptions - Request-specific configuration.
30
29
  *
31
- * @throws {@link FiveOneEat.UnauthorizedError}
32
30
  * @throws {@link FiveOneEat.NotFoundError}
33
31
  *
34
32
  * @example
@@ -43,7 +41,6 @@ export declare class ShopClient {
43
41
  * @param {FiveOneEat.customer.ListCategoriesShopRequest} request
44
42
  * @param {ShopClient.RequestOptions} requestOptions - Request-specific configuration.
45
43
  *
46
- * @throws {@link FiveOneEat.UnauthorizedError}
47
44
  * @throws {@link FiveOneEat.NotFoundError}
48
45
  *
49
46
  * @example