@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
|
@@ -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 ExploreClient {
|
|
19
19
|
constructor(options = {}) {
|
|
20
|
-
this._options =
|
|
20
|
+
this._options = normalizeClientOptions(options);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Retrieve businesses within the specified map bounds for map view.
|
|
@@ -26,7 +26,6 @@ export class ExploreClient {
|
|
|
26
26
|
* @param {FiveOneEat.customer.BusinessesExploreRequest} request
|
|
27
27
|
* @param {ExploreClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
30
29
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
31
30
|
*
|
|
32
31
|
* @example
|
|
@@ -47,8 +46,7 @@ export class ExploreClient {
|
|
|
47
46
|
zoom_level: zoomLevel,
|
|
48
47
|
categories,
|
|
49
48
|
};
|
|
50
|
-
const
|
|
51
|
-
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);
|
|
49
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
52
50
|
const _response = yield core.fetcher({
|
|
53
51
|
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"),
|
|
54
52
|
method: "GET",
|
|
@@ -73,8 +71,6 @@ export class ExploreClient {
|
|
|
73
71
|
}
|
|
74
72
|
if (_response.error.reason === "status-code") {
|
|
75
73
|
switch (_response.error.statusCode) {
|
|
76
|
-
case 401:
|
|
77
|
-
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
78
74
|
case 422:
|
|
79
75
|
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
80
76
|
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 ShopClient {
|
|
@@ -8,13 +8,12 @@ export declare namespace ShopClient {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
export declare class ShopClient {
|
|
11
|
-
protected readonly _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
|
|
@@ -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,13 +17,12 @@ import * as errors from "../../../../../../errors/index.mjs";
|
|
|
17
17
|
import * as FiveOneEat from "../../../../../index.mjs";
|
|
18
18
|
export class ShopClient {
|
|
19
19
|
constructor(options = {}) {
|
|
20
|
-
this._options =
|
|
20
|
+
this._options = normalizeClientOptions(options);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* @param {FiveOneEat.customer.ListProductsShopRequest} request
|
|
24
24
|
* @param {ShopClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
25
|
*
|
|
26
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
27
26
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
28
27
|
*
|
|
29
28
|
* @example
|
|
@@ -41,8 +40,7 @@ export class ShopClient {
|
|
|
41
40
|
const _queryParams = {
|
|
42
41
|
category,
|
|
43
42
|
};
|
|
44
|
-
const
|
|
45
|
-
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);
|
|
43
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
46
44
|
const _response = yield core.fetcher({
|
|
47
45
|
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)}/shop`),
|
|
48
46
|
method: "GET",
|
|
@@ -67,8 +65,6 @@ export class ShopClient {
|
|
|
67
65
|
}
|
|
68
66
|
if (_response.error.reason === "status-code") {
|
|
69
67
|
switch (_response.error.statusCode) {
|
|
70
|
-
case 401:
|
|
71
|
-
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
72
68
|
case 404:
|
|
73
69
|
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
74
70
|
default:
|
|
@@ -86,7 +82,6 @@ export class ShopClient {
|
|
|
86
82
|
* @param {FiveOneEat.customer.GetProductShopRequest} request
|
|
87
83
|
* @param {ShopClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
88
84
|
*
|
|
89
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
90
85
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
91
86
|
*
|
|
92
87
|
* @example
|
|
@@ -102,8 +97,7 @@ export class ShopClient {
|
|
|
102
97
|
return __awaiter(this, void 0, void 0, function* () {
|
|
103
98
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
104
99
|
const { business, product } = request;
|
|
105
|
-
const
|
|
106
|
-
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);
|
|
100
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
107
101
|
const _response = yield core.fetcher({
|
|
108
102
|
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)}/shop/products/${core.url.encodePathParam(product)}`),
|
|
109
103
|
method: "GET",
|
|
@@ -123,8 +117,6 @@ export class ShopClient {
|
|
|
123
117
|
}
|
|
124
118
|
if (_response.error.reason === "status-code") {
|
|
125
119
|
switch (_response.error.statusCode) {
|
|
126
|
-
case 401:
|
|
127
|
-
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
128
120
|
case 404:
|
|
129
121
|
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
130
122
|
default:
|
|
@@ -142,7 +134,6 @@ export class ShopClient {
|
|
|
142
134
|
* @param {FiveOneEat.customer.ListCategoriesShopRequest} request
|
|
143
135
|
* @param {ShopClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
144
136
|
*
|
|
145
|
-
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
146
137
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
147
138
|
*
|
|
148
139
|
* @example
|
|
@@ -157,8 +148,7 @@ export class ShopClient {
|
|
|
157
148
|
return __awaiter(this, void 0, void 0, function* () {
|
|
158
149
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
159
150
|
const { business } = request;
|
|
160
|
-
const
|
|
161
|
-
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);
|
|
151
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
162
152
|
const _response = yield core.fetcher({
|
|
163
153
|
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)}/shop/categories`),
|
|
164
154
|
method: "GET",
|
|
@@ -178,8 +168,6 @@ export class ShopClient {
|
|
|
178
168
|
}
|
|
179
169
|
if (_response.error.reason === "status-code") {
|
|
180
170
|
switch (_response.error.statusCode) {
|
|
181
|
-
case 401:
|
|
182
|
-
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
183
171
|
case 404:
|
|
184
172
|
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
185
173
|
default:
|
|
@@ -40,8 +40,7 @@ export class StandsClient {
|
|
|
40
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
42
42
|
const { stand } = request;
|
|
43
|
-
const
|
|
44
|
-
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);
|
|
43
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
45
44
|
const _response = yield core.fetcher({
|
|
46
45
|
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, `stand/${core.url.encodePathParam(stand)}`),
|
|
47
46
|
method: "GET",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export interface CreatePaymentIntentStandsResponse {
|
|
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: CreatePaymentIntentStandsResponse.Currency;
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ export interface AppHttpResourcesApiV1BusinessCommerceProductResource {
|
|
|
4
4
|
name: string;
|
|
5
5
|
slug: string;
|
|
6
6
|
description: string;
|
|
7
|
-
is_active:
|
|
7
|
+
is_active: boolean;
|
|
8
8
|
published_at: string;
|
|
9
9
|
variants?: FiveOneEat.VariantResource[] | undefined;
|
|
10
10
|
default_variant?: FiveOneEat.VariantResource | undefined;
|
|
@@ -1,27 +1,42 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../index.mjs";
|
|
1
2
|
export interface OrderResource {
|
|
2
3
|
id: string;
|
|
3
4
|
order_number: string;
|
|
4
5
|
status: string;
|
|
5
6
|
fulfillment_status: string;
|
|
6
7
|
fulfillment_method: string;
|
|
7
|
-
subtotal_cents:
|
|
8
|
-
discount_cents:
|
|
9
|
-
shipping_cents:
|
|
10
|
-
tax_cents:
|
|
11
|
-
platform_fee_cents:
|
|
12
|
-
total_cents:
|
|
8
|
+
subtotal_cents: number;
|
|
9
|
+
discount_cents: number;
|
|
10
|
+
shipping_cents: number;
|
|
11
|
+
tax_cents: number;
|
|
12
|
+
platform_fee_cents: number;
|
|
13
|
+
total_cents: number;
|
|
13
14
|
currency: string;
|
|
14
|
-
shipping_address: string;
|
|
15
|
+
shipping_address: Record<string, unknown> | null;
|
|
15
16
|
notes: string;
|
|
16
17
|
fulfilled_at: string;
|
|
17
18
|
refunded_at: string;
|
|
19
|
+
business?: OrderResource.Business | undefined;
|
|
20
|
+
transaction?: (OrderResource.Transaction | null) | undefined;
|
|
18
21
|
tracking_number?: (string | null) | undefined;
|
|
22
|
+
tracking_url?: (string | null) | undefined;
|
|
19
23
|
shipments: OrderResource.Shipments;
|
|
20
|
-
items
|
|
24
|
+
items?: FiveOneEat.OrderItemResource[] | undefined;
|
|
21
25
|
created_at: string;
|
|
22
26
|
updated_at: string;
|
|
23
27
|
}
|
|
24
28
|
export declare namespace OrderResource {
|
|
25
|
-
|
|
29
|
+
interface Business {
|
|
30
|
+
id: string;
|
|
31
|
+
handle: string;
|
|
32
|
+
name: string;
|
|
33
|
+
}
|
|
34
|
+
interface Transaction {
|
|
35
|
+
ulid: string;
|
|
36
|
+
status: string;
|
|
37
|
+
refunded_amount_cents: number;
|
|
38
|
+
payment_completed_at: string;
|
|
39
|
+
refunded_at: string;
|
|
40
|
+
}
|
|
26
41
|
type Shipments = string | string[];
|
|
27
42
|
}
|
|
@@ -3,8 +3,8 @@ export interface PriceResource {
|
|
|
3
3
|
id: string;
|
|
4
4
|
price_list_id: string;
|
|
5
5
|
price_list?: FiveOneEat.PriceListResource | undefined;
|
|
6
|
-
amount_cents:
|
|
7
|
-
compare_at_cents:
|
|
6
|
+
amount_cents: number;
|
|
7
|
+
compare_at_cents: number | null;
|
|
8
8
|
currency: string;
|
|
9
|
-
min_quantity:
|
|
9
|
+
min_quantity: number;
|
|
10
10
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import type * as FiveOneEat from "../index.mjs";
|
|
2
1
|
export interface ProductResource {
|
|
3
2
|
id: string;
|
|
4
3
|
name: string;
|
|
5
4
|
slug: string;
|
|
6
5
|
description: string;
|
|
7
|
-
is_active:
|
|
6
|
+
is_active: boolean;
|
|
8
7
|
published_at: string;
|
|
9
|
-
metadata: string;
|
|
8
|
+
metadata: Record<string, unknown> | null;
|
|
10
9
|
product_category_id: string;
|
|
11
|
-
category?:
|
|
12
|
-
images?:
|
|
10
|
+
category?: unknown[] | undefined;
|
|
11
|
+
images?: unknown[] | undefined;
|
|
13
12
|
variants?: unknown[] | undefined;
|
|
14
|
-
default_variant?:
|
|
13
|
+
default_variant?: unknown[] | undefined;
|
|
15
14
|
created_at: string;
|
|
16
15
|
updated_at: string;
|
|
17
16
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export interface Transaction {
|
|
2
2
|
ulid: string;
|
|
3
3
|
status: string;
|
|
4
|
-
subtotal:
|
|
5
|
-
tax_amount:
|
|
6
|
-
shipping_amount:
|
|
7
|
-
platform_fee:
|
|
8
|
-
total_amount:
|
|
9
|
-
refunded_amount:
|
|
4
|
+
subtotal: number;
|
|
5
|
+
tax_amount: number;
|
|
6
|
+
shipping_amount: number;
|
|
7
|
+
platform_fee: number;
|
|
8
|
+
total_amount: number;
|
|
9
|
+
refunded_amount: number;
|
|
10
10
|
customer_name: string | null;
|
|
11
11
|
customer_email: string;
|
|
12
12
|
stripe_payment_intent_id: string | null;
|
|
@@ -3,10 +3,10 @@ export interface VariantResource {
|
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
sku: string;
|
|
6
|
-
is_default:
|
|
7
|
-
weight:
|
|
6
|
+
is_default: boolean;
|
|
7
|
+
weight: number | null;
|
|
8
8
|
weight_unit: string;
|
|
9
|
-
sort_order:
|
|
9
|
+
sort_order: number;
|
|
10
10
|
prices?: FiveOneEat.PriceResource[] | undefined;
|
|
11
11
|
inventory_levels?: FiveOneEat.InventoryLevelResource[] | undefined;
|
|
12
12
|
created_at: string;
|
|
@@ -118,18 +118,17 @@ export * from "./ExploreTemporaryLocation.mjs";
|
|
|
118
118
|
export * from "./FavoriteResponse.mjs";
|
|
119
119
|
export * from "./ForbiddenErrorBody.mjs";
|
|
120
120
|
export * from "./Image.mjs";
|
|
121
|
-
export * from "./ImageResource.mjs";
|
|
122
121
|
export * from "./InternalServerErrorBody.mjs";
|
|
123
122
|
export * from "./InventoryLevelResource.mjs";
|
|
124
123
|
export * from "./MenuItemSearchResult.mjs";
|
|
125
124
|
export * from "./Message.mjs";
|
|
126
125
|
export * from "./NotFoundErrorBody.mjs";
|
|
126
|
+
export * from "./OrderItemResource.mjs";
|
|
127
127
|
export * from "./OrderResource.mjs";
|
|
128
128
|
export * from "./PaginationResource.mjs";
|
|
129
129
|
export * from "./PaymentMethod.mjs";
|
|
130
130
|
export * from "./PriceListResource.mjs";
|
|
131
131
|
export * from "./PriceResource.mjs";
|
|
132
|
-
export * from "./ProductCategoryResource.mjs";
|
|
133
132
|
export * from "./ProductResource.mjs";
|
|
134
133
|
export * from "./ProductSearchResult.mjs";
|
|
135
134
|
export * from "./RsvpEvent.mjs";
|
|
@@ -118,18 +118,17 @@ export * from "./ExploreTemporaryLocation.mjs";
|
|
|
118
118
|
export * from "./FavoriteResponse.mjs";
|
|
119
119
|
export * from "./ForbiddenErrorBody.mjs";
|
|
120
120
|
export * from "./Image.mjs";
|
|
121
|
-
export * from "./ImageResource.mjs";
|
|
122
121
|
export * from "./InternalServerErrorBody.mjs";
|
|
123
122
|
export * from "./InventoryLevelResource.mjs";
|
|
124
123
|
export * from "./MenuItemSearchResult.mjs";
|
|
125
124
|
export * from "./Message.mjs";
|
|
126
125
|
export * from "./NotFoundErrorBody.mjs";
|
|
126
|
+
export * from "./OrderItemResource.mjs";
|
|
127
127
|
export * from "./OrderResource.mjs";
|
|
128
128
|
export * from "./PaginationResource.mjs";
|
|
129
129
|
export * from "./PaymentMethod.mjs";
|
|
130
130
|
export * from "./PriceListResource.mjs";
|
|
131
131
|
export * from "./PriceResource.mjs";
|
|
132
|
-
export * from "./ProductCategoryResource.mjs";
|
|
133
132
|
export * from "./ProductResource.mjs";
|
|
134
133
|
export * from "./ProductSearchResult.mjs";
|
|
135
134
|
export * from "./RsvpEvent.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.72";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.72";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -10332,7 +10332,7 @@ await client.customer.businesses.photos({
|
|
|
10332
10332
|
</dl>
|
|
10333
10333
|
</details>
|
|
10334
10334
|
|
|
10335
|
-
<details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">
|
|
10335
|
+
<details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">listTemporaryLocations</a>({ ...params }) -> FiveOneEat.ListTemporaryLocationsBusinessesResponse</code></summary>
|
|
10336
10336
|
<dl>
|
|
10337
10337
|
<dd>
|
|
10338
10338
|
|
|
@@ -10344,7 +10344,7 @@ await client.customer.businesses.photos({
|
|
|
10344
10344
|
<dl>
|
|
10345
10345
|
<dd>
|
|
10346
10346
|
|
|
10347
|
-
|
|
10347
|
+
Retrieve active and upcoming temporary locations for a business.
|
|
10348
10348
|
</dd>
|
|
10349
10349
|
</dl>
|
|
10350
10350
|
</dd>
|
|
@@ -10359,7 +10359,7 @@ Add a business to the authenticated user's favorites.
|
|
|
10359
10359
|
<dd>
|
|
10360
10360
|
|
|
10361
10361
|
```typescript
|
|
10362
|
-
await client.customer.businesses.
|
|
10362
|
+
await client.customer.businesses.listTemporaryLocations({
|
|
10363
10363
|
business: "katzs-deli"
|
|
10364
10364
|
});
|
|
10365
10365
|
|
|
@@ -10377,7 +10377,7 @@ await client.customer.businesses.favorite({
|
|
|
10377
10377
|
<dl>
|
|
10378
10378
|
<dd>
|
|
10379
10379
|
|
|
10380
|
-
**request:** `FiveOneEat.customer.
|
|
10380
|
+
**request:** `FiveOneEat.customer.ListTemporaryLocationsBusinessesRequest`
|
|
10381
10381
|
|
|
10382
10382
|
</dd>
|
|
10383
10383
|
</dl>
|
|
@@ -10397,7 +10397,7 @@ await client.customer.businesses.favorite({
|
|
|
10397
10397
|
</dl>
|
|
10398
10398
|
</details>
|
|
10399
10399
|
|
|
10400
|
-
<details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">
|
|
10400
|
+
<details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">getPickupTimeslots</a>({ ...params }) -> FiveOneEat.GetPickupTimeslotsBusinessesResponse</code></summary>
|
|
10401
10401
|
<dl>
|
|
10402
10402
|
<dd>
|
|
10403
10403
|
|
|
@@ -10409,7 +10409,7 @@ await client.customer.businesses.favorite({
|
|
|
10409
10409
|
<dl>
|
|
10410
10410
|
<dd>
|
|
10411
10411
|
|
|
10412
|
-
|
|
10412
|
+
Returns available pickup timeslots for a business on a given date.
|
|
10413
10413
|
</dd>
|
|
10414
10414
|
</dl>
|
|
10415
10415
|
</dd>
|
|
@@ -10424,8 +10424,9 @@ Remove a business from the authenticated user's favorites.
|
|
|
10424
10424
|
<dd>
|
|
10425
10425
|
|
|
10426
10426
|
```typescript
|
|
10427
|
-
await client.customer.businesses.
|
|
10428
|
-
|
|
10427
|
+
await client.customer.businesses.getPickupTimeslots({
|
|
10428
|
+
handle: "katzs-deli",
|
|
10429
|
+
date: "2023-01-15"
|
|
10429
10430
|
});
|
|
10430
10431
|
|
|
10431
10432
|
```
|
|
@@ -10442,7 +10443,7 @@ await client.customer.businesses.unfavorite({
|
|
|
10442
10443
|
<dl>
|
|
10443
10444
|
<dd>
|
|
10444
10445
|
|
|
10445
|
-
**request:** `FiveOneEat.customer.
|
|
10446
|
+
**request:** `FiveOneEat.customer.GetPickupTimeslotsBusinessesRequest`
|
|
10446
10447
|
|
|
10447
10448
|
</dd>
|
|
10448
10449
|
</dl>
|
|
@@ -10462,7 +10463,7 @@ await client.customer.businesses.unfavorite({
|
|
|
10462
10463
|
</dl>
|
|
10463
10464
|
</details>
|
|
10464
10465
|
|
|
10465
|
-
<details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">
|
|
10466
|
+
<details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">favorite</a>({ ...params }) -> FiveOneEat.FavoriteBusinessesResponse</code></summary>
|
|
10466
10467
|
<dl>
|
|
10467
10468
|
<dd>
|
|
10468
10469
|
|
|
@@ -10474,7 +10475,7 @@ await client.customer.businesses.unfavorite({
|
|
|
10474
10475
|
<dl>
|
|
10475
10476
|
<dd>
|
|
10476
10477
|
|
|
10477
|
-
|
|
10478
|
+
Add a business to the authenticated user's favorites.
|
|
10478
10479
|
</dd>
|
|
10479
10480
|
</dl>
|
|
10480
10481
|
</dd>
|
|
@@ -10489,7 +10490,7 @@ Retrieve active and upcoming temporary locations for a business.
|
|
|
10489
10490
|
<dd>
|
|
10490
10491
|
|
|
10491
10492
|
```typescript
|
|
10492
|
-
await client.customer.businesses.
|
|
10493
|
+
await client.customer.businesses.favorite({
|
|
10493
10494
|
business: "katzs-deli"
|
|
10494
10495
|
});
|
|
10495
10496
|
|
|
@@ -10507,7 +10508,7 @@ await client.customer.businesses.listTemporaryLocations({
|
|
|
10507
10508
|
<dl>
|
|
10508
10509
|
<dd>
|
|
10509
10510
|
|
|
10510
|
-
**request:** `FiveOneEat.customer.
|
|
10511
|
+
**request:** `FiveOneEat.customer.FavoriteBusinessesRequest`
|
|
10511
10512
|
|
|
10512
10513
|
</dd>
|
|
10513
10514
|
</dl>
|
|
@@ -10527,7 +10528,7 @@ await client.customer.businesses.listTemporaryLocations({
|
|
|
10527
10528
|
</dl>
|
|
10528
10529
|
</details>
|
|
10529
10530
|
|
|
10530
|
-
<details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">
|
|
10531
|
+
<details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">unfavorite</a>({ ...params }) -> void</code></summary>
|
|
10531
10532
|
<dl>
|
|
10532
10533
|
<dd>
|
|
10533
10534
|
|
|
@@ -10539,7 +10540,7 @@ await client.customer.businesses.listTemporaryLocations({
|
|
|
10539
10540
|
<dl>
|
|
10540
10541
|
<dd>
|
|
10541
10542
|
|
|
10542
|
-
|
|
10543
|
+
Remove a business from the authenticated user's favorites.
|
|
10543
10544
|
</dd>
|
|
10544
10545
|
</dl>
|
|
10545
10546
|
</dd>
|
|
@@ -10554,9 +10555,8 @@ Returns available pickup timeslots for a business on a given date.
|
|
|
10554
10555
|
<dd>
|
|
10555
10556
|
|
|
10556
10557
|
```typescript
|
|
10557
|
-
await client.customer.businesses.
|
|
10558
|
-
|
|
10559
|
-
date: "2023-01-15"
|
|
10558
|
+
await client.customer.businesses.unfavorite({
|
|
10559
|
+
business: "katzs-deli"
|
|
10560
10560
|
});
|
|
10561
10561
|
|
|
10562
10562
|
```
|
|
@@ -10573,7 +10573,7 @@ await client.customer.businesses.getPickupTimeslots({
|
|
|
10573
10573
|
<dl>
|
|
10574
10574
|
<dd>
|
|
10575
10575
|
|
|
10576
|
-
**request:** `FiveOneEat.customer.
|
|
10576
|
+
**request:** `FiveOneEat.customer.UnfavoriteBusinessesRequest`
|
|
10577
10577
|
|
|
10578
10578
|
</dd>
|
|
10579
10579
|
</dl>
|