@51eat/sdk 0.0.71 → 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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/business/resources/stands/client/requests/UpdateStandRequest.d.ts +7 -0
- package/dist/cjs/api/resources/customer/client/Client.d.ts +0 -1
- package/dist/cjs/api/resources/customer/client/Client.js +1 -5
- package/dist/cjs/api/resources/customer/resources/ads/client/Client.d.ts +2 -4
- package/dist/cjs/api/resources/customer/resources/ads/client/Client.js +3 -11
- package/dist/cjs/api/resources/customer/resources/businesses/client/Client.d.ts +27 -34
- package/dist/cjs/api/resources/customer/resources/businesses/client/Client.js +83 -111
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.ts +0 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.js +1 -5
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.ts +0 -2
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.js +2 -10
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.d.ts +0 -3
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.js +7 -19
- package/dist/cjs/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.ts +4 -4
- package/dist/cjs/api/resources/customer/resources/discovery/client/Client.d.ts +2 -14
- package/dist/cjs/api/resources/customer/resources/discovery/client/Client.js +33 -81
- package/dist/cjs/api/resources/customer/resources/editorials/client/Client.d.ts +3 -7
- package/dist/cjs/api/resources/customer/resources/editorials/client/Client.js +13 -30
- package/dist/cjs/api/resources/customer/resources/events/client/Client.d.ts +0 -1
- package/dist/cjs/api/resources/customer/resources/events/client/Client.js +1 -5
- package/dist/cjs/api/resources/customer/resources/explore/client/Client.d.ts +2 -3
- package/dist/cjs/api/resources/customer/resources/explore/client/Client.js +2 -6
- package/dist/cjs/api/resources/customer/resources/shop/client/Client.d.ts +2 -5
- package/dist/cjs/api/resources/customer/resources/shop/client/Client.js +4 -16
- package/dist/cjs/api/resources/customer/resources/stands/client/Client.js +1 -2
- package/dist/cjs/api/resources/customer/resources/stands/types/CreatePaymentIntentStandsResponse.d.ts +4 -4
- package/dist/cjs/api/types/AppHttpResourcesApiV1BusinessCommerceProductResource.d.ts +1 -1
- package/dist/cjs/api/types/CartResource.d.ts +1 -1
- package/dist/cjs/api/types/InventoryLevelResource.d.ts +3 -3
- package/dist/cjs/api/types/OrderItemResource.d.ts +10 -0
- package/dist/cjs/api/types/OrderResource.d.ts +24 -9
- package/dist/cjs/api/types/PaginationResource.d.ts +4 -4
- package/dist/cjs/api/types/PriceListResource.d.ts +1 -1
- package/dist/cjs/api/types/PriceResource.d.ts +3 -3
- package/dist/cjs/api/types/ProductResource.d.ts +5 -6
- package/dist/cjs/api/types/Transaction.d.ts +6 -6
- package/dist/cjs/api/types/VariantResource.d.ts +3 -3
- package/dist/cjs/api/types/index.d.ts +1 -2
- package/dist/cjs/api/types/index.js +1 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/business/resources/stands/client/requests/UpdateStandRequest.d.mts +7 -0
- package/dist/esm/api/resources/customer/client/Client.d.mts +0 -1
- package/dist/esm/api/resources/customer/client/Client.mjs +1 -5
- package/dist/esm/api/resources/customer/resources/ads/client/Client.d.mts +2 -4
- package/dist/esm/api/resources/customer/resources/ads/client/Client.mjs +4 -12
- package/dist/esm/api/resources/customer/resources/businesses/client/Client.d.mts +27 -34
- package/dist/esm/api/resources/customer/resources/businesses/client/Client.mjs +83 -111
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.mts +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.mjs +1 -5
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.mts +0 -2
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.mjs +2 -10
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.d.mts +0 -3
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.mjs +7 -19
- package/dist/esm/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.mts +4 -4
- package/dist/esm/api/resources/customer/resources/discovery/client/Client.d.mts +2 -14
- package/dist/esm/api/resources/customer/resources/discovery/client/Client.mjs +34 -82
- package/dist/esm/api/resources/customer/resources/editorials/client/Client.d.mts +3 -7
- package/dist/esm/api/resources/customer/resources/editorials/client/Client.mjs +14 -31
- package/dist/esm/api/resources/customer/resources/events/client/Client.d.mts +0 -1
- package/dist/esm/api/resources/customer/resources/events/client/Client.mjs +1 -5
- package/dist/esm/api/resources/customer/resources/explore/client/Client.d.mts +2 -3
- package/dist/esm/api/resources/customer/resources/explore/client/Client.mjs +3 -7
- package/dist/esm/api/resources/customer/resources/shop/client/Client.d.mts +2 -5
- package/dist/esm/api/resources/customer/resources/shop/client/Client.mjs +5 -17
- package/dist/esm/api/resources/customer/resources/stands/client/Client.mjs +1 -2
- package/dist/esm/api/resources/customer/resources/stands/types/CreatePaymentIntentStandsResponse.d.mts +4 -4
- package/dist/esm/api/types/AppHttpResourcesApiV1BusinessCommerceProductResource.d.mts +1 -1
- package/dist/esm/api/types/CartResource.d.mts +1 -1
- package/dist/esm/api/types/InventoryLevelResource.d.mts +3 -3
- package/dist/esm/api/types/OrderItemResource.d.mts +10 -0
- package/dist/esm/api/types/OrderResource.d.mts +24 -9
- package/dist/esm/api/types/PaginationResource.d.mts +4 -4
- package/dist/esm/api/types/PriceListResource.d.mts +1 -1
- package/dist/esm/api/types/PriceResource.d.mts +3 -3
- package/dist/esm/api/types/ProductResource.d.mts +5 -6
- package/dist/esm/api/types/Transaction.d.mts +6 -6
- package/dist/esm/api/types/VariantResource.d.mts +3 -3
- package/dist/esm/api/types/index.d.mts +1 -2
- package/dist/esm/api/types/index.mjs +1 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +19 -19
- package/dist/cjs/api/types/ImageResource.d.ts +0 -6
- package/dist/cjs/api/types/ProductCategoryResource.d.ts +0 -8
- package/dist/cjs/api/types/ProductCategoryResource.js +0 -3
- package/dist/esm/api/types/ImageResource.d.mts +0 -6
- package/dist/esm/api/types/ProductCategoryResource.d.mts +0 -8
- package/dist/esm/api/types/ProductCategoryResource.mjs +0 -2
- /package/dist/cjs/api/types/{ImageResource.js → OrderItemResource.js} +0 -0
- /package/dist/esm/api/types/{ImageResource.mjs → OrderItemResource.mjs} +0 -0
package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.mjs
CHANGED
|
@@ -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
|
|
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
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
});
|
package/dist/esm/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export interface CreatePaymentIntentCartResponse {
|
|
2
2
|
client_secret: string;
|
|
3
3
|
payment_intent_id: string;
|
|
4
|
-
subtotal:
|
|
5
|
-
tax_amount:
|
|
6
|
-
platform_fee:
|
|
7
|
-
total_amount:
|
|
4
|
+
subtotal: number;
|
|
5
|
+
tax_amount: number;
|
|
6
|
+
platform_fee: number;
|
|
7
|
+
total_amount: number;
|
|
8
8
|
amount: number;
|
|
9
9
|
currency: CreatePaymentIntentCartResponse.Currency;
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
-
import { type
|
|
2
|
+
import { type NormalizedClientOptions } from "../../../../../../BaseClient.mjs";
|
|
3
3
|
import * as core from "../../../../../../core/index.mjs";
|
|
4
4
|
import * as FiveOneEat from "../../../../../index.mjs";
|
|
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:
|
|
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
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import {
|
|
11
|
+
import { normalizeClientOptions } from "../../../../../../BaseClient.mjs";
|
|
12
12
|
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
@@ -17,7 +17,7 @@ import * as errors from "../../../../../../errors/index.mjs";
|
|
|
17
17
|
import * as FiveOneEat from "../../../../../index.mjs";
|
|
18
18
|
export class DiscoveryClient {
|
|
19
19
|
constructor(options = {}) {
|
|
20
|
-
this._options =
|
|
20
|
+
this._options = normalizeClientOptions(options);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Returns a paginated list of populated business categories, each with up to 10 businesses
|
|
@@ -27,7 +27,6 @@ export class DiscoveryClient {
|
|
|
27
27
|
* @param {FiveOneEat.customer.FeedDiscoveryRequest} request
|
|
28
28
|
* @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
29
|
*
|
|
30
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
31
30
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
32
31
|
*
|
|
33
32
|
* @example
|
|
@@ -49,8 +48,7 @@ export class DiscoveryClient {
|
|
|
49
48
|
"cuisine_ids[]": cuisineIdsArray,
|
|
50
49
|
"certification_ids[]": certificationIdsArray,
|
|
51
50
|
};
|
|
52
|
-
const
|
|
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/discovery"),
|
|
56
54
|
method: "GET",
|
|
@@ -72,8 +70,6 @@ export class DiscoveryClient {
|
|
|
72
70
|
}
|
|
73
71
|
if (_response.error.reason === "status-code") {
|
|
74
72
|
switch (_response.error.statusCode) {
|
|
75
|
-
case 401:
|
|
76
|
-
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
77
73
|
case 422:
|
|
78
74
|
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
79
75
|
default:
|
|
@@ -94,8 +90,6 @@ export class DiscoveryClient {
|
|
|
94
90
|
*
|
|
95
91
|
* @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
96
92
|
*
|
|
97
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
98
|
-
*
|
|
99
93
|
* @example
|
|
100
94
|
* await client.customer.discovery.highlights()
|
|
101
95
|
*/
|
|
@@ -105,8 +99,7 @@ export class DiscoveryClient {
|
|
|
105
99
|
__highlights(requestOptions) {
|
|
106
100
|
return __awaiter(this, void 0, void 0, function* () {
|
|
107
101
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
108
|
-
const
|
|
109
|
-
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);
|
|
110
103
|
const _response = yield core.fetcher({
|
|
111
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/discovery/highlights"),
|
|
112
105
|
method: "GET",
|
|
@@ -122,16 +115,11 @@ export class DiscoveryClient {
|
|
|
122
115
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
123
116
|
}
|
|
124
117
|
if (_response.error.reason === "status-code") {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
statusCode: _response.error.statusCode,
|
|
131
|
-
body: _response.error.body,
|
|
132
|
-
rawResponse: _response.rawResponse,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
118
|
+
throw new errors.FiveOneEatError({
|
|
119
|
+
statusCode: _response.error.statusCode,
|
|
120
|
+
body: _response.error.body,
|
|
121
|
+
rawResponse: _response.rawResponse,
|
|
122
|
+
});
|
|
135
123
|
}
|
|
136
124
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/discovery/highlights");
|
|
137
125
|
});
|
|
@@ -143,8 +131,6 @@ export class DiscoveryClient {
|
|
|
143
131
|
* @param {FiveOneEat.customer.CategoriesDiscoveryRequest} request
|
|
144
132
|
* @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
145
133
|
*
|
|
146
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
147
|
-
*
|
|
148
134
|
* @example
|
|
149
135
|
* await client.customer.discovery.categories()
|
|
150
136
|
*/
|
|
@@ -158,8 +144,7 @@ export class DiscoveryClient {
|
|
|
158
144
|
const _queryParams = {
|
|
159
145
|
with_businesses: withBusinesses,
|
|
160
146
|
};
|
|
161
|
-
const
|
|
162
|
-
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);
|
|
147
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
163
148
|
const _response = yield core.fetcher({
|
|
164
149
|
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"),
|
|
165
150
|
method: "GET",
|
|
@@ -183,16 +168,11 @@ export class DiscoveryClient {
|
|
|
183
168
|
};
|
|
184
169
|
}
|
|
185
170
|
if (_response.error.reason === "status-code") {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
statusCode: _response.error.statusCode,
|
|
192
|
-
body: _response.error.body,
|
|
193
|
-
rawResponse: _response.rawResponse,
|
|
194
|
-
});
|
|
195
|
-
}
|
|
171
|
+
throw new errors.FiveOneEatError({
|
|
172
|
+
statusCode: _response.error.statusCode,
|
|
173
|
+
body: _response.error.body,
|
|
174
|
+
rawResponse: _response.rawResponse,
|
|
175
|
+
});
|
|
196
176
|
}
|
|
197
177
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/discovery/categories");
|
|
198
178
|
});
|
|
@@ -203,8 +183,6 @@ export class DiscoveryClient {
|
|
|
203
183
|
*
|
|
204
184
|
* @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
205
185
|
*
|
|
206
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
207
|
-
*
|
|
208
186
|
* @example
|
|
209
187
|
* await client.customer.discovery.cuisines()
|
|
210
188
|
*/
|
|
@@ -214,8 +192,7 @@ export class DiscoveryClient {
|
|
|
214
192
|
__cuisines(requestOptions) {
|
|
215
193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
216
194
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
217
|
-
const
|
|
218
|
-
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);
|
|
195
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
219
196
|
const _response = yield core.fetcher({
|
|
220
197
|
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"),
|
|
221
198
|
method: "GET",
|
|
@@ -234,16 +211,11 @@ export class DiscoveryClient {
|
|
|
234
211
|
};
|
|
235
212
|
}
|
|
236
213
|
if (_response.error.reason === "status-code") {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
statusCode: _response.error.statusCode,
|
|
243
|
-
body: _response.error.body,
|
|
244
|
-
rawResponse: _response.rawResponse,
|
|
245
|
-
});
|
|
246
|
-
}
|
|
214
|
+
throw new errors.FiveOneEatError({
|
|
215
|
+
statusCode: _response.error.statusCode,
|
|
216
|
+
body: _response.error.body,
|
|
217
|
+
rawResponse: _response.rawResponse,
|
|
218
|
+
});
|
|
247
219
|
}
|
|
248
220
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/discovery/cuisines");
|
|
249
221
|
});
|
|
@@ -254,8 +226,6 @@ export class DiscoveryClient {
|
|
|
254
226
|
*
|
|
255
227
|
* @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
256
228
|
*
|
|
257
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
258
|
-
*
|
|
259
229
|
* @example
|
|
260
230
|
* await client.customer.discovery.certifications()
|
|
261
231
|
*/
|
|
@@ -265,8 +235,7 @@ export class DiscoveryClient {
|
|
|
265
235
|
__certifications(requestOptions) {
|
|
266
236
|
return __awaiter(this, void 0, void 0, function* () {
|
|
267
237
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
268
|
-
const
|
|
269
|
-
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);
|
|
238
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
270
239
|
const _response = yield core.fetcher({
|
|
271
240
|
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"),
|
|
272
241
|
method: "GET",
|
|
@@ -285,16 +254,11 @@ export class DiscoveryClient {
|
|
|
285
254
|
};
|
|
286
255
|
}
|
|
287
256
|
if (_response.error.reason === "status-code") {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
statusCode: _response.error.statusCode,
|
|
294
|
-
body: _response.error.body,
|
|
295
|
-
rawResponse: _response.rawResponse,
|
|
296
|
-
});
|
|
297
|
-
}
|
|
257
|
+
throw new errors.FiveOneEatError({
|
|
258
|
+
statusCode: _response.error.statusCode,
|
|
259
|
+
body: _response.error.body,
|
|
260
|
+
rawResponse: _response.rawResponse,
|
|
261
|
+
});
|
|
298
262
|
}
|
|
299
263
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/discovery/certifications");
|
|
300
264
|
});
|
|
@@ -305,8 +269,6 @@ export class DiscoveryClient {
|
|
|
305
269
|
*
|
|
306
270
|
* @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
307
271
|
*
|
|
308
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
309
|
-
*
|
|
310
272
|
* @example
|
|
311
273
|
* await client.customer.discovery.allergens()
|
|
312
274
|
*/
|
|
@@ -316,8 +278,7 @@ export class DiscoveryClient {
|
|
|
316
278
|
__allergens(requestOptions) {
|
|
317
279
|
return __awaiter(this, void 0, void 0, function* () {
|
|
318
280
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
319
|
-
const
|
|
320
|
-
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);
|
|
281
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
321
282
|
const _response = yield core.fetcher({
|
|
322
283
|
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"),
|
|
323
284
|
method: "GET",
|
|
@@ -336,16 +297,11 @@ export class DiscoveryClient {
|
|
|
336
297
|
};
|
|
337
298
|
}
|
|
338
299
|
if (_response.error.reason === "status-code") {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
statusCode: _response.error.statusCode,
|
|
345
|
-
body: _response.error.body,
|
|
346
|
-
rawResponse: _response.rawResponse,
|
|
347
|
-
});
|
|
348
|
-
}
|
|
300
|
+
throw new errors.FiveOneEatError({
|
|
301
|
+
statusCode: _response.error.statusCode,
|
|
302
|
+
body: _response.error.body,
|
|
303
|
+
rawResponse: _response.rawResponse,
|
|
304
|
+
});
|
|
349
305
|
}
|
|
350
306
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/discovery/allergens");
|
|
351
307
|
});
|
|
@@ -357,7 +313,6 @@ export class DiscoveryClient {
|
|
|
357
313
|
* @param {FiveOneEat.customer.CategoryBusinessesDiscoveryRequest} request
|
|
358
314
|
* @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
359
315
|
*
|
|
360
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
361
316
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
362
317
|
*
|
|
363
318
|
* @example
|
|
@@ -378,8 +333,7 @@ export class DiscoveryClient {
|
|
|
378
333
|
per_page: perPage,
|
|
379
334
|
search,
|
|
380
335
|
};
|
|
381
|
-
const
|
|
382
|
-
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);
|
|
336
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
383
337
|
const _response = yield core.fetcher({
|
|
384
338
|
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`),
|
|
385
339
|
method: "GET",
|
|
@@ -404,8 +358,6 @@ export class DiscoveryClient {
|
|
|
404
358
|
}
|
|
405
359
|
if (_response.error.reason === "status-code") {
|
|
406
360
|
switch (_response.error.statusCode) {
|
|
407
|
-
case 401:
|
|
408
|
-
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
409
361
|
case 422:
|
|
410
362
|
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
411
363
|
default:
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
-
import { type
|
|
2
|
+
import { type NormalizedClientOptions } from "../../../../../../BaseClient.mjs";
|
|
3
3
|
import * as core from "../../../../../../core/index.mjs";
|
|
4
|
-
import * as FiveOneEat from "../../../../../index.mjs";
|
|
4
|
+
import type * as FiveOneEat from "../../../../../index.mjs";
|
|
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:
|
|
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"
|
|
@@ -8,24 +8,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import {
|
|
11
|
+
import { normalizeClientOptions } from "../../../../../../BaseClient.mjs";
|
|
12
12
|
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
16
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
-
import * as FiveOneEat from "../../../../../index.mjs";
|
|
18
17
|
export class EditorialsClient {
|
|
19
18
|
constructor(options = {}) {
|
|
20
|
-
this._options =
|
|
19
|
+
this._options = normalizeClientOptions(options);
|
|
21
20
|
}
|
|
22
21
|
/**
|
|
23
22
|
* Returns a paginated list of published editorials with basic business info.
|
|
24
23
|
*
|
|
25
24
|
* @param {EditorialsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
25
|
*
|
|
27
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
28
|
-
*
|
|
29
26
|
* @example
|
|
30
27
|
* await client.customer.editorials.list()
|
|
31
28
|
*/
|
|
@@ -35,8 +32,7 @@ export class EditorialsClient {
|
|
|
35
32
|
__list(requestOptions) {
|
|
36
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
34
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
38
|
-
const
|
|
39
|
-
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);
|
|
35
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
40
36
|
const _response = yield core.fetcher({
|
|
41
37
|
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"),
|
|
42
38
|
method: "GET",
|
|
@@ -55,16 +51,11 @@ export class EditorialsClient {
|
|
|
55
51
|
};
|
|
56
52
|
}
|
|
57
53
|
if (_response.error.reason === "status-code") {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
statusCode: _response.error.statusCode,
|
|
64
|
-
body: _response.error.body,
|
|
65
|
-
rawResponse: _response.rawResponse,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
54
|
+
throw new errors.FiveOneEatError({
|
|
55
|
+
statusCode: _response.error.statusCode,
|
|
56
|
+
body: _response.error.body,
|
|
57
|
+
rawResponse: _response.rawResponse,
|
|
58
|
+
});
|
|
68
59
|
}
|
|
69
60
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/editorials");
|
|
70
61
|
});
|
|
@@ -76,8 +67,6 @@ export class EditorialsClient {
|
|
|
76
67
|
* @param {FiveOneEat.customer.GetEditorialsRequest} request
|
|
77
68
|
* @param {EditorialsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
69
|
*
|
|
79
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
80
|
-
*
|
|
81
70
|
* @example
|
|
82
71
|
* await client.customer.editorials.get({
|
|
83
72
|
* slug: "slug"
|
|
@@ -90,8 +79,7 @@ export class EditorialsClient {
|
|
|
90
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
91
80
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
92
81
|
const { slug } = request;
|
|
93
|
-
const
|
|
94
|
-
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);
|
|
82
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
95
83
|
const _response = yield core.fetcher({
|
|
96
84
|
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)}`),
|
|
97
85
|
method: "GET",
|
|
@@ -110,16 +98,11 @@ export class EditorialsClient {
|
|
|
110
98
|
};
|
|
111
99
|
}
|
|
112
100
|
if (_response.error.reason === "status-code") {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
statusCode: _response.error.statusCode,
|
|
119
|
-
body: _response.error.body,
|
|
120
|
-
rawResponse: _response.rawResponse,
|
|
121
|
-
});
|
|
122
|
-
}
|
|
101
|
+
throw new errors.FiveOneEatError({
|
|
102
|
+
statusCode: _response.error.statusCode,
|
|
103
|
+
body: _response.error.body,
|
|
104
|
+
rawResponse: _response.rawResponse,
|
|
105
|
+
});
|
|
123
106
|
}
|
|
124
107
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/editorials/{slug}");
|
|
125
108
|
});
|
|
@@ -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
|
|
@@ -32,7 +32,6 @@ export class EventsClient {
|
|
|
32
32
|
* @param {FiveOneEat.customer.FeedEventsRequest} request
|
|
33
33
|
* @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
34
|
*
|
|
35
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
36
35
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
37
36
|
*
|
|
38
37
|
* @example
|
|
@@ -54,8 +53,7 @@ export class EventsClient {
|
|
|
54
53
|
per_page: perPage,
|
|
55
54
|
page,
|
|
56
55
|
};
|
|
57
|
-
const
|
|
58
|
-
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);
|
|
56
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
59
57
|
const _response = yield core.fetcher({
|
|
60
58
|
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"),
|
|
61
59
|
method: "GET",
|
|
@@ -80,8 +78,6 @@ export class EventsClient {
|
|
|
80
78
|
}
|
|
81
79
|
if (_response.error.reason === "status-code") {
|
|
82
80
|
switch (_response.error.statusCode) {
|
|
83
|
-
case 401:
|
|
84
|
-
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
85
81
|
case 422:
|
|
86
82
|
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
87
83
|
default:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
-
import { type
|
|
2
|
+
import { type NormalizedClientOptions } from "../../../../../../BaseClient.mjs";
|
|
3
3
|
import * as core from "../../../../../../core/index.mjs";
|
|
4
4
|
import * as FiveOneEat from "../../../../../index.mjs";
|
|
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:
|
|
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
|