@51eat/sdk 0.0.77 → 0.0.79
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/README.md +13 -11
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +0 -3
- package/dist/cjs/Client.js +2 -7
- package/dist/cjs/api/resources/business/resources/productOrders/client/Client.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/productOrders/client/Client.js +13 -0
- package/dist/cjs/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.ts +9 -0
- package/dist/cjs/api/resources/customer/resources/businesses/types/GetPickupTimeslotsBusinessesResponse.d.ts +2 -5
- package/dist/cjs/api/resources/customer/resources/cart/client/Client.d.ts +15 -5
- package/dist/cjs/api/resources/customer/resources/cart/client/Client.js +15 -5
- package/dist/cjs/api/resources/customer/resources/cart/client/requests/AddItemCartRequest.d.ts +6 -4
- package/dist/cjs/api/resources/customer/resources/cart/client/requests/{UpdateItemCartRequest.d.ts → UpdateCartItemRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/customer/resources/cart/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.js +4 -0
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.ts +6 -1
- package/dist/cjs/api/resources/customer/resources/shop/client/requests/GetProductShopRequest.d.ts +1 -1
- package/dist/cjs/api/resources/customer/resources/shop/client/requests/ListCategoriesShopRequest.d.ts +1 -1
- package/dist/cjs/api/resources/customer/resources/shop/client/requests/ListProductsShopRequest.d.ts +1 -1
- package/dist/cjs/api/resources/customer/resources/stands/client/Client.d.ts +73 -0
- package/dist/cjs/api/resources/customer/resources/stands/client/Client.js +249 -0
- package/dist/cjs/api/resources/customer/resources/stands/client/requests/AddCartItemStandsRequest.d.ts +16 -0
- package/dist/{esm/api/resources/customerStands/client/requests/CustomerGetStandCartRequest.d.mts → cjs/api/resources/customer/resources/stands/client/requests/ClearCartStandsRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/{customerStands/client/requests/CustomerGetStandCartRequest.d.ts → customer/resources/stands/client/requests/GetCartStandsRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/customer/resources/stands/client/requests/NearbyStandsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/customer/resources/stands/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/stands/types/AddCartItemStandsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/stands/types/GetCartStandsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/stands/types/GetCartStandsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/stands/types/NearbyStandsResponse.d.ts +10 -0
- package/dist/cjs/api/resources/customer/resources/stands/types/NearbyStandsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/stands/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/stands/types/index.js +3 -0
- package/dist/cjs/api/resources/index.d.ts +0 -3
- package/dist/cjs/api/resources/index.js +1 -4
- package/dist/cjs/api/types/AddCartItemRequest.d.ts +9 -0
- package/dist/cjs/api/types/AddCartItemRequest.js +3 -0
- package/dist/cjs/api/types/BusinessEvent.d.ts +1 -0
- package/dist/cjs/api/types/BusinessProfile.d.ts +5 -0
- package/dist/cjs/api/types/CartResource.d.ts +5 -0
- package/dist/cjs/api/types/ConflictErrorBody.d.ts +2 -13
- package/dist/cjs/api/types/ConflictErrorBody.js +0 -10
- package/dist/cjs/api/types/CustomerEvent.d.ts +6 -0
- package/dist/cjs/api/types/CustomerEventDetail.d.ts +6 -0
- package/dist/cjs/api/types/EventFeedItem.d.ts +6 -0
- package/dist/cjs/api/types/ExploreResponse.d.ts +1 -0
- package/dist/cjs/api/types/ExploreStand.d.ts +18 -0
- package/dist/cjs/api/types/ExploreStand.js +3 -0
- package/dist/cjs/api/types/NearbyStand.d.ts +19 -0
- package/dist/cjs/api/types/NearbyStand.js +3 -0
- package/dist/cjs/api/types/OrderResource.d.ts +9 -0
- package/dist/cjs/api/types/TicketOrder.d.ts +7 -1
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- 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/Client.d.mts +0 -3
- package/dist/esm/Client.mjs +0 -5
- package/dist/esm/api/resources/business/resources/productOrders/client/Client.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/productOrders/client/Client.mjs +13 -0
- package/dist/esm/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.mts +9 -0
- package/dist/esm/api/resources/customer/resources/businesses/types/GetPickupTimeslotsBusinessesResponse.d.mts +2 -5
- package/dist/esm/api/resources/customer/resources/cart/client/Client.d.mts +15 -5
- package/dist/esm/api/resources/customer/resources/cart/client/Client.mjs +15 -5
- package/dist/esm/api/resources/customer/resources/cart/client/requests/AddItemCartRequest.d.mts +6 -4
- package/dist/esm/api/resources/customer/resources/cart/client/requests/{UpdateItemCartRequest.d.mts → UpdateCartItemRequest.d.mts} +1 -1
- package/dist/esm/api/resources/customer/resources/cart/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.mjs +4 -0
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.mts +6 -1
- package/dist/esm/api/resources/customer/resources/shop/client/requests/GetProductShopRequest.d.mts +1 -1
- package/dist/esm/api/resources/customer/resources/shop/client/requests/ListCategoriesShopRequest.d.mts +1 -1
- package/dist/esm/api/resources/customer/resources/shop/client/requests/ListProductsShopRequest.d.mts +1 -1
- package/dist/esm/api/resources/customer/resources/stands/client/Client.d.mts +73 -0
- package/dist/esm/api/resources/customer/resources/stands/client/Client.mjs +249 -0
- package/dist/esm/api/resources/customer/resources/stands/client/requests/AddCartItemStandsRequest.d.mts +16 -0
- package/dist/esm/api/resources/{customerStands/client/requests/CustomerClearStandCartRequest.d.mts → customer/resources/stands/client/requests/ClearCartStandsRequest.d.mts} +1 -1
- package/dist/{cjs/api/resources/customerStands/client/requests/CustomerClearStandCartRequest.d.ts → esm/api/resources/customer/resources/stands/client/requests/GetCartStandsRequest.d.mts} +1 -1
- package/dist/esm/api/resources/customer/resources/stands/client/requests/NearbyStandsRequest.d.mts +13 -0
- package/dist/esm/api/resources/customer/resources/stands/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/stands/types/AddCartItemStandsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/stands/types/GetCartStandsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/stands/types/GetCartStandsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/stands/types/NearbyStandsResponse.d.mts +10 -0
- package/dist/esm/api/resources/customer/resources/stands/types/NearbyStandsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/stands/types/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/stands/types/index.mjs +3 -0
- package/dist/esm/api/resources/index.d.mts +0 -3
- package/dist/esm/api/resources/index.mjs +0 -3
- package/dist/esm/api/types/AddCartItemRequest.d.mts +9 -0
- package/dist/esm/api/types/AddCartItemRequest.mjs +2 -0
- package/dist/esm/api/types/BusinessEvent.d.mts +1 -0
- package/dist/esm/api/types/BusinessProfile.d.mts +5 -0
- package/dist/esm/api/types/CartResource.d.mts +5 -0
- package/dist/esm/api/types/ConflictErrorBody.d.mts +2 -13
- package/dist/esm/api/types/ConflictErrorBody.mjs +1 -9
- package/dist/esm/api/types/CustomerEvent.d.mts +6 -0
- package/dist/esm/api/types/CustomerEventDetail.d.mts +6 -0
- package/dist/esm/api/types/EventFeedItem.d.mts +6 -0
- package/dist/esm/api/types/ExploreResponse.d.mts +1 -0
- package/dist/esm/api/types/ExploreStand.d.mts +18 -0
- package/dist/esm/api/types/ExploreStand.mjs +2 -0
- package/dist/esm/api/types/NearbyStand.d.mts +19 -0
- package/dist/esm/api/types/NearbyStand.mjs +2 -0
- package/dist/esm/api/types/OrderResource.d.mts +9 -0
- package/dist/esm/api/types/TicketOrder.d.mts +7 -1
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -12
- package/reference.md +316 -160
- package/dist/cjs/api/resources/customerStands/client/Client.d.ts +0 -58
- package/dist/cjs/api/resources/customerStands/client/Client.js +0 -240
- package/dist/cjs/api/resources/customerStands/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/customerStands/client/index.js +0 -17
- package/dist/cjs/api/resources/customerStands/client/requests/CustomerAddStandCartItemRequest.d.ts +0 -14
- package/dist/cjs/api/resources/customerStands/client/requests/index.d.ts +0 -3
- package/dist/cjs/api/resources/customerStands/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/customerStands/exports.d.ts +0 -2
- package/dist/cjs/api/resources/customerStands/exports.js +0 -21
- package/dist/cjs/api/resources/customerStands/index.d.ts +0 -2
- package/dist/cjs/api/resources/customerStands/index.js +0 -18
- package/dist/cjs/api/resources/customerStands/types/CustomerAddStandCartItemResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerStands/types/CustomerGetStandCartResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerStands/types/index.d.ts +0 -2
- package/dist/cjs/api/resources/customerStands/types/index.js +0 -18
- package/dist/esm/api/resources/customerStands/client/Client.d.mts +0 -58
- package/dist/esm/api/resources/customerStands/client/Client.mjs +0 -203
- package/dist/esm/api/resources/customerStands/client/index.d.mts +0 -1
- package/dist/esm/api/resources/customerStands/client/index.mjs +0 -1
- package/dist/esm/api/resources/customerStands/client/requests/CustomerAddStandCartItemRequest.d.mts +0 -14
- package/dist/esm/api/resources/customerStands/client/requests/index.d.mts +0 -3
- package/dist/esm/api/resources/customerStands/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/customerStands/exports.d.mts +0 -2
- package/dist/esm/api/resources/customerStands/exports.mjs +0 -3
- package/dist/esm/api/resources/customerStands/index.d.mts +0 -2
- package/dist/esm/api/resources/customerStands/index.mjs +0 -2
- package/dist/esm/api/resources/customerStands/types/CustomerAddStandCartItemResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerStands/types/CustomerGetStandCartResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerStands/types/index.d.mts +0 -2
- package/dist/esm/api/resources/customerStands/types/index.mjs +0 -2
- /package/dist/cjs/api/resources/customer/resources/cart/client/requests/{UpdateItemCartRequest.js → UpdateCartItemRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customerStands/client/requests/CustomerAddStandCartItemRequest.js → customer/resources/stands/client/requests/AddCartItemStandsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customerStands/client/requests/CustomerClearStandCartRequest.js → customer/resources/stands/client/requests/ClearCartStandsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customerStands/client/requests/CustomerGetStandCartRequest.js → customer/resources/stands/client/requests/GetCartStandsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customerStands/types/CustomerAddStandCartItemResponse.js → customer/resources/stands/client/requests/NearbyStandsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customerStands/types/CustomerGetStandCartResponse.js → customer/resources/stands/types/AddCartItemStandsResponse.js} +0 -0
- /package/dist/esm/api/resources/customer/resources/cart/client/requests/{UpdateItemCartRequest.mjs → UpdateCartItemRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customerStands/client/requests/CustomerAddStandCartItemRequest.mjs → customer/resources/stands/client/requests/AddCartItemStandsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customerStands/client/requests/CustomerClearStandCartRequest.mjs → customer/resources/stands/client/requests/ClearCartStandsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customerStands/client/requests/CustomerGetStandCartRequest.mjs → customer/resources/stands/client/requests/GetCartStandsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customerStands/types/CustomerAddStandCartItemResponse.mjs → customer/resources/stands/client/requests/NearbyStandsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customerStands/types/CustomerGetStandCartResponse.mjs → customer/resources/stands/types/AddCartItemStandsResponse.mjs} +0 -0
package/README.md
CHANGED
|
@@ -45,10 +45,12 @@ Instantiate and use the client with the following:
|
|
|
45
45
|
import { FiveOneEatClient } from "@51eat/sdk";
|
|
46
46
|
|
|
47
47
|
const client = new FiveOneEatClient({ token: "YOUR_TOKEN" });
|
|
48
|
-
await client.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
await client.business.auth.register({
|
|
49
|
+
name: "name",
|
|
50
|
+
email: "email",
|
|
51
|
+
password: "password",
|
|
52
|
+
device_name: "device_name",
|
|
53
|
+
password_confirmation: "password_confirmation"
|
|
52
54
|
});
|
|
53
55
|
```
|
|
54
56
|
|
|
@@ -86,7 +88,7 @@ will be thrown.
|
|
|
86
88
|
import { FiveOneEatError } from "@51eat/sdk";
|
|
87
89
|
|
|
88
90
|
try {
|
|
89
|
-
await client.
|
|
91
|
+
await client.business.auth.register(...);
|
|
90
92
|
} catch (err) {
|
|
91
93
|
if (err instanceof FiveOneEatError) {
|
|
92
94
|
console.log(err.statusCode);
|
|
@@ -168,7 +170,7 @@ const client = new FiveOneEatClient({
|
|
|
168
170
|
}
|
|
169
171
|
});
|
|
170
172
|
|
|
171
|
-
const response = await client.
|
|
173
|
+
const response = await client.business.auth.register(..., {
|
|
172
174
|
headers: {
|
|
173
175
|
'X-Custom-Header': 'custom value'
|
|
174
176
|
}
|
|
@@ -180,7 +182,7 @@ const response = await client.customerStands.customerAddStandCartItem(..., {
|
|
|
180
182
|
If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
|
|
181
183
|
|
|
182
184
|
```typescript
|
|
183
|
-
const response = await client.
|
|
185
|
+
const response = await client.business.auth.register(..., {
|
|
184
186
|
queryParams: {
|
|
185
187
|
'customQueryParamKey': 'custom query param value'
|
|
186
188
|
}
|
|
@@ -202,7 +204,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
|
|
|
202
204
|
Use the `maxRetries` request option to configure this behavior.
|
|
203
205
|
|
|
204
206
|
```typescript
|
|
205
|
-
const response = await client.
|
|
207
|
+
const response = await client.business.auth.register(..., {
|
|
206
208
|
maxRetries: 0 // override maxRetries at the request level
|
|
207
209
|
});
|
|
208
210
|
```
|
|
@@ -212,7 +214,7 @@ const response = await client.customerStands.customerAddStandCartItem(..., {
|
|
|
212
214
|
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
213
215
|
|
|
214
216
|
```typescript
|
|
215
|
-
const response = await client.
|
|
217
|
+
const response = await client.business.auth.register(..., {
|
|
216
218
|
timeoutInSeconds: 30 // override timeout to 30s
|
|
217
219
|
});
|
|
218
220
|
```
|
|
@@ -223,7 +225,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
|
|
|
223
225
|
|
|
224
226
|
```typescript
|
|
225
227
|
const controller = new AbortController();
|
|
226
|
-
const response = await client.
|
|
228
|
+
const response = await client.business.auth.register(..., {
|
|
227
229
|
abortSignal: controller.signal
|
|
228
230
|
});
|
|
229
231
|
controller.abort(); // aborts the request
|
|
@@ -235,7 +237,7 @@ The SDK provides access to raw response data, including headers, through the `.w
|
|
|
235
237
|
The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
|
|
236
238
|
|
|
237
239
|
```typescript
|
|
238
|
-
const { data, rawResponse } = await client.
|
|
240
|
+
const { data, rawResponse } = await client.business.auth.register(...).withRawResponse();
|
|
239
241
|
|
|
240
242
|
console.log(data);
|
|
241
243
|
console.log(rawResponse.headers['X-My-Header']);
|
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@51eat/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "0.0.
|
|
47
|
-
"User-Agent": "@51eat/sdk/0.0.
|
|
46
|
+
"X-Fern-SDK-Version": "0.0.79",
|
|
47
|
+
"User-Agent": "@51eat/sdk/0.0.79",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BusinessClient } from "./api/resources/business/client/Client.js";
|
|
2
2
|
import { CustomerClient } from "./api/resources/customer/client/Client.js";
|
|
3
|
-
import { CustomerStandsClient } from "./api/resources/customerStands/client/Client.js";
|
|
4
3
|
import { PublicListsClient } from "./api/resources/publicLists/client/Client.js";
|
|
5
4
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
6
5
|
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
|
|
@@ -13,12 +12,10 @@ export declare namespace FiveOneEatClient {
|
|
|
13
12
|
export declare class FiveOneEatClient {
|
|
14
13
|
protected readonly _options: NormalizedClientOptionsWithAuth<FiveOneEatClient.Options>;
|
|
15
14
|
protected _customer: CustomerClient | undefined;
|
|
16
|
-
protected _customerStands: CustomerStandsClient | undefined;
|
|
17
15
|
protected _publicLists: PublicListsClient | undefined;
|
|
18
16
|
protected _business: BusinessClient | undefined;
|
|
19
17
|
constructor(options?: FiveOneEatClient.Options);
|
|
20
18
|
get customer(): CustomerClient;
|
|
21
|
-
get customerStands(): CustomerStandsClient;
|
|
22
19
|
get publicLists(): PublicListsClient;
|
|
23
20
|
get business(): BusinessClient;
|
|
24
21
|
/**
|
package/dist/cjs/Client.js
CHANGED
|
@@ -46,8 +46,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
46
46
|
exports.FiveOneEatClient = void 0;
|
|
47
47
|
const Client_js_1 = require("./api/resources/business/client/Client.js");
|
|
48
48
|
const Client_js_2 = require("./api/resources/customer/client/Client.js");
|
|
49
|
-
const Client_js_3 = require("./api/resources/
|
|
50
|
-
const Client_js_4 = require("./api/resources/publicLists/client/Client.js");
|
|
49
|
+
const Client_js_3 = require("./api/resources/publicLists/client/Client.js");
|
|
51
50
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
52
51
|
const core = __importStar(require("./core/index.js"));
|
|
53
52
|
class FiveOneEatClient {
|
|
@@ -58,13 +57,9 @@ class FiveOneEatClient {
|
|
|
58
57
|
var _a;
|
|
59
58
|
return ((_a = this._customer) !== null && _a !== void 0 ? _a : (this._customer = new Client_js_2.CustomerClient(this._options)));
|
|
60
59
|
}
|
|
61
|
-
get customerStands() {
|
|
62
|
-
var _a;
|
|
63
|
-
return ((_a = this._customerStands) !== null && _a !== void 0 ? _a : (this._customerStands = new Client_js_3.CustomerStandsClient(this._options)));
|
|
64
|
-
}
|
|
65
60
|
get publicLists() {
|
|
66
61
|
var _a;
|
|
67
|
-
return ((_a = this._publicLists) !== null && _a !== void 0 ? _a : (this._publicLists = new
|
|
62
|
+
return ((_a = this._publicLists) !== null && _a !== void 0 ? _a : (this._publicLists = new Client_js_3.PublicListsClient(this._options)));
|
|
68
63
|
}
|
|
69
64
|
get business() {
|
|
70
65
|
var _a;
|
|
@@ -37,12 +37,18 @@ export declare class ProductOrdersClient {
|
|
|
37
37
|
get(request: FiveOneEat.business.GetProductOrdersRequest, requestOptions?: ProductOrdersClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.GetProductOrdersResponse>;
|
|
38
38
|
private __get;
|
|
39
39
|
/**
|
|
40
|
+
* The business's part is done, and the customer is told. A shipped order
|
|
41
|
+
* becomes `fulfilled` (on its way); a pickup order becomes
|
|
42
|
+
* `ready_for_pickup`, and `mark-picked-up` completes it once collected.
|
|
43
|
+
* A farm-stand order is fulfilled at checkout and is refused here.
|
|
44
|
+
*
|
|
40
45
|
* @param {FiveOneEat.business.FulfillProductOrdersRequest} request
|
|
41
46
|
* @param {ProductOrdersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
42
47
|
*
|
|
43
48
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
44
49
|
* @throws {@link FiveOneEat.ForbiddenError}
|
|
45
50
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
51
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
46
52
|
*
|
|
47
53
|
* @example
|
|
48
54
|
* await client.business.productOrders.fulfill({
|
|
@@ -52,12 +58,15 @@ export declare class ProductOrdersClient {
|
|
|
52
58
|
fulfill(request: FiveOneEat.business.FulfillProductOrdersRequest, requestOptions?: ProductOrdersClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.FulfillProductOrdersResponse>;
|
|
53
59
|
private __fulfill;
|
|
54
60
|
/**
|
|
61
|
+
* Only a pickup order, `unfulfilled` or `ready_for_pickup`; it becomes `fulfilled`.
|
|
62
|
+
*
|
|
55
63
|
* @param {FiveOneEat.business.MarkPickedUpProductOrdersRequest} request
|
|
56
64
|
* @param {ProductOrdersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
65
|
*
|
|
58
66
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
59
67
|
* @throws {@link FiveOneEat.ForbiddenError}
|
|
60
68
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
69
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
61
70
|
*
|
|
62
71
|
* @example
|
|
63
72
|
* await client.business.productOrders.markPickedUp({
|
|
@@ -184,12 +184,18 @@ class ProductOrdersClient {
|
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
/**
|
|
187
|
+
* The business's part is done, and the customer is told. A shipped order
|
|
188
|
+
* becomes `fulfilled` (on its way); a pickup order becomes
|
|
189
|
+
* `ready_for_pickup`, and `mark-picked-up` completes it once collected.
|
|
190
|
+
* A farm-stand order is fulfilled at checkout and is refused here.
|
|
191
|
+
*
|
|
187
192
|
* @param {FiveOneEat.business.FulfillProductOrdersRequest} request
|
|
188
193
|
* @param {ProductOrdersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
189
194
|
*
|
|
190
195
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
191
196
|
* @throws {@link FiveOneEat.ForbiddenError}
|
|
192
197
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
198
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
193
199
|
*
|
|
194
200
|
* @example
|
|
195
201
|
* await client.business.productOrders.fulfill({
|
|
@@ -230,6 +236,8 @@ class ProductOrdersClient {
|
|
|
230
236
|
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
231
237
|
case 404:
|
|
232
238
|
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
239
|
+
case 422:
|
|
240
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
233
241
|
default:
|
|
234
242
|
throw new errors.FiveOneEatError({
|
|
235
243
|
statusCode: _response.error.statusCode,
|
|
@@ -242,12 +250,15 @@ class ProductOrdersClient {
|
|
|
242
250
|
});
|
|
243
251
|
}
|
|
244
252
|
/**
|
|
253
|
+
* Only a pickup order, `unfulfilled` or `ready_for_pickup`; it becomes `fulfilled`.
|
|
254
|
+
*
|
|
245
255
|
* @param {FiveOneEat.business.MarkPickedUpProductOrdersRequest} request
|
|
246
256
|
* @param {ProductOrdersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
247
257
|
*
|
|
248
258
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
249
259
|
* @throws {@link FiveOneEat.ForbiddenError}
|
|
250
260
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
261
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
251
262
|
*
|
|
252
263
|
* @example
|
|
253
264
|
* await client.business.productOrders.markPickedUp({
|
|
@@ -288,6 +299,8 @@ class ProductOrdersClient {
|
|
|
288
299
|
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
289
300
|
case 404:
|
|
290
301
|
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
302
|
+
case 422:
|
|
303
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
291
304
|
default:
|
|
292
305
|
throw new errors.FiveOneEatError({
|
|
293
306
|
statusCode: _response.error.statusCode,
|
|
@@ -31,6 +31,15 @@ export interface UpdateBusinessProfileRequest {
|
|
|
31
31
|
pickup_hours?: string[] | null;
|
|
32
32
|
same_day_cutoff?: string | null;
|
|
33
33
|
pickup_instructions?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Where Pro is billed, when different from the business address.
|
|
36
|
+
* Send all five together, or all null to clear.
|
|
37
|
+
*/
|
|
38
|
+
billing_address?: string | null;
|
|
39
|
+
billing_city?: string | null;
|
|
40
|
+
billing_state?: string | null;
|
|
41
|
+
billing_zipcode?: string | null;
|
|
42
|
+
billing_country?: string | null;
|
|
34
43
|
}
|
|
35
44
|
export declare namespace UpdateBusinessProfileRequest {
|
|
36
45
|
type OperatingMonths = OperatingMonths.Item[];
|
|
@@ -25,6 +25,10 @@ export declare class CartClient {
|
|
|
25
25
|
get(request: FiveOneEat.customer.GetCartRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.GetCartResponse>;
|
|
26
26
|
private __get;
|
|
27
27
|
/**
|
|
28
|
+
* Only a variant this shop sells is accepted: its product is active,
|
|
29
|
+
* published and on the storefront, and the variant has a storefront price.
|
|
30
|
+
* Anything else is a 422 on `variant_id` ("That item isn't available here.").
|
|
31
|
+
*
|
|
28
32
|
* @param {FiveOneEat.customer.AddItemCartRequest} request
|
|
29
33
|
* @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
34
|
*
|
|
@@ -35,8 +39,10 @@ export declare class CartClient {
|
|
|
35
39
|
* @example
|
|
36
40
|
* await client.customer.cart.addItem({
|
|
37
41
|
* business: "business",
|
|
38
|
-
*
|
|
39
|
-
*
|
|
42
|
+
* body: {
|
|
43
|
+
* variant_id: "variant_id",
|
|
44
|
+
* quantity: 1
|
|
45
|
+
* }
|
|
40
46
|
* })
|
|
41
47
|
*/
|
|
42
48
|
addItem(request: FiveOneEat.customer.AddItemCartRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.AddItemCartResponse>;
|
|
@@ -56,7 +62,10 @@ export declare class CartClient {
|
|
|
56
62
|
clear(request: FiveOneEat.customer.ClearCartRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
57
63
|
private __clear;
|
|
58
64
|
/**
|
|
59
|
-
*
|
|
65
|
+
* An item this shop no longer sells can't be changed, only removed: 422 on
|
|
66
|
+
* `variant_id` ("That item isn't available here.").
|
|
67
|
+
*
|
|
68
|
+
* @param {FiveOneEat.customer.UpdateCartItemRequest} request
|
|
60
69
|
* @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
70
|
*
|
|
62
71
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
@@ -70,7 +79,7 @@ export declare class CartClient {
|
|
|
70
79
|
* quantity: 1
|
|
71
80
|
* })
|
|
72
81
|
*/
|
|
73
|
-
updateItem(request: FiveOneEat.customer.
|
|
82
|
+
updateItem(request: FiveOneEat.customer.UpdateCartItemRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.UpdateItemCartResponse>;
|
|
74
83
|
private __updateItem;
|
|
75
84
|
/**
|
|
76
85
|
* @param {FiveOneEat.customer.RemoveItemCartRequest} request
|
|
@@ -95,7 +104,8 @@ export declare class CartClient {
|
|
|
95
104
|
*
|
|
96
105
|
* A 409 `{status: "paid", message, payment_intent_id}` means the cart's
|
|
97
106
|
* payment already went through (never a second payment): finish checkout
|
|
98
|
-
* with that id. A 409
|
|
107
|
+
* with that id. A 409 `{status: "processing", message}` means the payment
|
|
108
|
+
* is still in flight: don't pay again, check back later.
|
|
99
109
|
*
|
|
100
110
|
* @param {FiveOneEat.customer.CreatePaymentIntentCartRequest} request
|
|
101
111
|
* @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -119,6 +119,10 @@ class CartClient {
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
|
+
* Only a variant this shop sells is accepted: its product is active,
|
|
123
|
+
* published and on the storefront, and the variant has a storefront price.
|
|
124
|
+
* Anything else is a 422 on `variant_id` ("That item isn't available here.").
|
|
125
|
+
*
|
|
122
126
|
* @param {FiveOneEat.customer.AddItemCartRequest} request
|
|
123
127
|
* @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
124
128
|
*
|
|
@@ -129,8 +133,10 @@ class CartClient {
|
|
|
129
133
|
* @example
|
|
130
134
|
* await client.customer.cart.addItem({
|
|
131
135
|
* business: "business",
|
|
132
|
-
*
|
|
133
|
-
*
|
|
136
|
+
* body: {
|
|
137
|
+
* variant_id: "variant_id",
|
|
138
|
+
* quantity: 1
|
|
139
|
+
* }
|
|
134
140
|
* })
|
|
135
141
|
*/
|
|
136
142
|
addItem(request, requestOptions) {
|
|
@@ -139,7 +145,7 @@ class CartClient {
|
|
|
139
145
|
__addItem(request, requestOptions) {
|
|
140
146
|
return __awaiter(this, void 0, void 0, function* () {
|
|
141
147
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
142
|
-
const { business
|
|
148
|
+
const { business, body: _body } = request;
|
|
143
149
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
144
150
|
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);
|
|
145
151
|
const _response = yield core.fetcher({
|
|
@@ -234,7 +240,10 @@ class CartClient {
|
|
|
234
240
|
});
|
|
235
241
|
}
|
|
236
242
|
/**
|
|
237
|
-
*
|
|
243
|
+
* An item this shop no longer sells can't be changed, only removed: 422 on
|
|
244
|
+
* `variant_id` ("That item isn't available here.").
|
|
245
|
+
*
|
|
246
|
+
* @param {FiveOneEat.customer.UpdateCartItemRequest} request
|
|
238
247
|
* @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
239
248
|
*
|
|
240
249
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
@@ -364,7 +373,8 @@ class CartClient {
|
|
|
364
373
|
*
|
|
365
374
|
* A 409 `{status: "paid", message, payment_intent_id}` means the cart's
|
|
366
375
|
* payment already went through (never a second payment): finish checkout
|
|
367
|
-
* with that id. A 409
|
|
376
|
+
* with that id. A 409 `{status: "processing", message}` means the payment
|
|
377
|
+
* is still in flight: don't pay again, check back later.
|
|
368
378
|
*
|
|
369
379
|
* @param {FiveOneEat.customer.CreatePaymentIntentCartRequest} request
|
|
370
380
|
* @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
|
package/dist/cjs/api/resources/customer/resources/cart/client/requests/AddItemCartRequest.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../../../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
4
5
|
* business: "business",
|
|
5
|
-
*
|
|
6
|
-
*
|
|
6
|
+
* body: {
|
|
7
|
+
* variant_id: "variant_id",
|
|
8
|
+
* quantity: 1
|
|
9
|
+
* }
|
|
7
10
|
* }
|
|
8
11
|
*/
|
|
9
12
|
export interface AddItemCartRequest {
|
|
10
13
|
/** The business handle */
|
|
11
14
|
business: string;
|
|
12
|
-
|
|
13
|
-
quantity: number;
|
|
15
|
+
body: FiveOneEat.AddCartItemRequest;
|
|
14
16
|
}
|
|
@@ -9,4 +9,4 @@ export type { RefreshCartPaymentRequest } from "./RefreshCartPaymentRequest.js";
|
|
|
9
9
|
export type { RemoveItemCartRequest } from "./RemoveItemCartRequest.js";
|
|
10
10
|
export type { SelectShippingRateRequest } from "./SelectShippingRateRequest.js";
|
|
11
11
|
export type { ShippingAddressRequest } from "./ShippingAddressRequest.js";
|
|
12
|
-
export type {
|
|
12
|
+
export type { UpdateCartItemRequest } from "./UpdateCartItemRequest.js";
|
package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.d.ts
CHANGED
|
@@ -72,6 +72,10 @@ export declare class TicketingClient {
|
|
|
72
72
|
* Create a Stripe payment intent for the tickets held in the cart for the given event.
|
|
73
73
|
* Returns a client_secret for the mobile app to confirm payment with Stripe.
|
|
74
74
|
*
|
|
75
|
+
* A 409 `{status: "paid", message, payment_intent_id}` means these tickets
|
|
76
|
+
* are already paid for (the webhook issues them; never pay twice). A 409
|
|
77
|
+
* `{status: "processing", message}` means the payment is still in flight.
|
|
78
|
+
*
|
|
75
79
|
* @param {FiveOneEat.customer.events.CreatePaymentIntentRequest} request
|
|
76
80
|
* @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
81
|
*
|
package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.js
CHANGED
|
@@ -256,6 +256,10 @@ class TicketingClient {
|
|
|
256
256
|
* Create a Stripe payment intent for the tickets held in the cart for the given event.
|
|
257
257
|
* Returns a client_secret for the mobile app to confirm payment with Stripe.
|
|
258
258
|
*
|
|
259
|
+
* A 409 `{status: "paid", message, payment_intent_id}` means these tickets
|
|
260
|
+
* are already paid for (the webhook issues them; never pay twice). A 409
|
|
261
|
+
* `{status: "processing", message}` means the payment is still in flight.
|
|
262
|
+
*
|
|
259
263
|
* @param {FiveOneEat.customer.events.CreatePaymentIntentRequest} request
|
|
260
264
|
* @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
261
265
|
*
|
|
@@ -15,7 +15,12 @@ export interface CreatePaymentIntentTicketingResponse {
|
|
|
15
15
|
* tell whether the price the buyer is about to pay just moved.
|
|
16
16
|
*/
|
|
17
17
|
previous_payment_intent_id: string | null;
|
|
18
|
-
previous_amount_cents:
|
|
18
|
+
previous_amount_cents: number | null;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the stored intent was pinned to another method or tax
|
|
21
|
+
* address, even at the same price (e.g. a flat-rate address change).
|
|
22
|
+
*/
|
|
23
|
+
previous_destination_changed: boolean;
|
|
19
24
|
}
|
|
20
25
|
export declare namespace CreatePaymentIntentTicketingResponse {
|
|
21
26
|
interface TaxCalculation {
|
|
@@ -26,12 +26,84 @@ export declare class StandsClient {
|
|
|
26
26
|
*/
|
|
27
27
|
scan(request: FiveOneEat.customer.ScanStandsRequest, requestOptions?: StandsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.ScanStandsResponse>;
|
|
28
28
|
private __scan;
|
|
29
|
+
/**
|
|
30
|
+
* The nearest stands that can take a payment right now, closest first:
|
|
31
|
+
* up to 20 within 50 km. `is_here` marks a stand within the arrival
|
|
32
|
+
* radius (`meta.arrival_radius_meters`), where the app offers its
|
|
33
|
+
* self-checkout without a QR scan. The coordinates are used for this
|
|
34
|
+
* lookup only and are never stored.
|
|
35
|
+
*
|
|
36
|
+
* @param {FiveOneEat.customer.NearbyStandsRequest} request
|
|
37
|
+
* @param {StandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.customer.stands.nearby({
|
|
43
|
+
* latitude: 1.1,
|
|
44
|
+
* longitude: 1.1
|
|
45
|
+
* })
|
|
46
|
+
*/
|
|
47
|
+
nearby(request: FiveOneEat.customer.NearbyStandsRequest, requestOptions?: StandsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.NearbyStandsResponse>;
|
|
48
|
+
private __nearby;
|
|
49
|
+
/**
|
|
50
|
+
* @param {FiveOneEat.customer.GetCartStandsRequest} request
|
|
51
|
+
* @param {StandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
52
|
+
*
|
|
53
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
54
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await client.customer.stands.getCart({
|
|
58
|
+
* stand: "stand"
|
|
59
|
+
* })
|
|
60
|
+
*/
|
|
61
|
+
getCart(request: FiveOneEat.customer.GetCartStandsRequest, requestOptions?: StandsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.GetCartStandsResponse>;
|
|
62
|
+
private __getCart;
|
|
63
|
+
/**
|
|
64
|
+
* Only a variant this stand sells is accepted: its product is active,
|
|
65
|
+
* published and on the stand, and the variant has a stand price. Anything
|
|
66
|
+
* else is a 422 on `variant_id` ("That item isn't available here.").
|
|
67
|
+
*
|
|
68
|
+
* @param {FiveOneEat.customer.AddCartItemStandsRequest} request
|
|
69
|
+
* @param {StandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
72
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
73
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.customer.stands.addCartItem({
|
|
77
|
+
* stand: "stand",
|
|
78
|
+
* body: {
|
|
79
|
+
* variant_id: "variant_id",
|
|
80
|
+
* quantity: 1
|
|
81
|
+
* }
|
|
82
|
+
* })
|
|
83
|
+
*/
|
|
84
|
+
addCartItem(request: FiveOneEat.customer.AddCartItemStandsRequest, requestOptions?: StandsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.AddCartItemStandsResponse>;
|
|
85
|
+
private __addCartItem;
|
|
86
|
+
/**
|
|
87
|
+
* @param {FiveOneEat.customer.ClearCartStandsRequest} request
|
|
88
|
+
* @param {StandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
91
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* await client.customer.stands.clearCart({
|
|
95
|
+
* stand: "stand"
|
|
96
|
+
* })
|
|
97
|
+
*/
|
|
98
|
+
clearCart(request: FiveOneEat.customer.ClearCartStandsRequest, requestOptions?: StandsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
99
|
+
private __clearCart;
|
|
29
100
|
/**
|
|
30
101
|
* @param {FiveOneEat.customer.CreatePaymentIntentStandsRequest} request
|
|
31
102
|
* @param {StandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
103
|
*
|
|
33
104
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
34
105
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
106
|
+
* @throws {@link FiveOneEat.ConflictError}
|
|
35
107
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
36
108
|
*
|
|
37
109
|
* @example
|
|
@@ -47,6 +119,7 @@ export declare class StandsClient {
|
|
|
47
119
|
*
|
|
48
120
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
49
121
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
122
|
+
* @throws {@link FiveOneEat.ConflictError}
|
|
50
123
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
51
124
|
*
|
|
52
125
|
* @example
|