@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
|
@@ -73,12 +73,256 @@ export class StandsClient {
|
|
|
73
73
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/stand/{stand}");
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* The nearest stands that can take a payment right now, closest first:
|
|
78
|
+
* up to 20 within 50 km. `is_here` marks a stand within the arrival
|
|
79
|
+
* radius (`meta.arrival_radius_meters`), where the app offers its
|
|
80
|
+
* self-checkout without a QR scan. The coordinates are used for this
|
|
81
|
+
* lookup only and are never stored.
|
|
82
|
+
*
|
|
83
|
+
* @param {FiveOneEat.customer.NearbyStandsRequest} request
|
|
84
|
+
* @param {StandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
85
|
+
*
|
|
86
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* await client.customer.stands.nearby({
|
|
90
|
+
* latitude: 1.1,
|
|
91
|
+
* longitude: 1.1
|
|
92
|
+
* })
|
|
93
|
+
*/
|
|
94
|
+
nearby(request, requestOptions) {
|
|
95
|
+
return core.HttpResponsePromise.fromPromise(this.__nearby(request, requestOptions));
|
|
96
|
+
}
|
|
97
|
+
__nearby(request, requestOptions) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
100
|
+
const { latitude, longitude } = request;
|
|
101
|
+
const _queryParams = {
|
|
102
|
+
latitude,
|
|
103
|
+
longitude,
|
|
104
|
+
};
|
|
105
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
106
|
+
const _response = yield core.fetcher({
|
|
107
|
+
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/stands/nearby"),
|
|
108
|
+
method: "GET",
|
|
109
|
+
headers: _headers,
|
|
110
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
111
|
+
queryString: core.url
|
|
112
|
+
.queryBuilder()
|
|
113
|
+
.addMany(_queryParams)
|
|
114
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
115
|
+
.build(),
|
|
116
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
117
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
118
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
119
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
120
|
+
logging: this._options.logging,
|
|
121
|
+
});
|
|
122
|
+
if (_response.ok) {
|
|
123
|
+
return {
|
|
124
|
+
data: _response.body,
|
|
125
|
+
rawResponse: _response.rawResponse,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
if (_response.error.reason === "status-code") {
|
|
129
|
+
switch (_response.error.statusCode) {
|
|
130
|
+
case 422:
|
|
131
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
132
|
+
default:
|
|
133
|
+
throw new errors.FiveOneEatError({
|
|
134
|
+
statusCode: _response.error.statusCode,
|
|
135
|
+
body: _response.error.body,
|
|
136
|
+
rawResponse: _response.rawResponse,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/stands/nearby");
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @param {FiveOneEat.customer.GetCartStandsRequest} request
|
|
145
|
+
* @param {StandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
146
|
+
*
|
|
147
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
148
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* await client.customer.stands.getCart({
|
|
152
|
+
* stand: "stand"
|
|
153
|
+
* })
|
|
154
|
+
*/
|
|
155
|
+
getCart(request, requestOptions) {
|
|
156
|
+
return core.HttpResponsePromise.fromPromise(this.__getCart(request, requestOptions));
|
|
157
|
+
}
|
|
158
|
+
__getCart(request, requestOptions) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
161
|
+
const { stand } = request;
|
|
162
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
163
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
164
|
+
const _response = yield core.fetcher({
|
|
165
|
+
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/stands/${core.url.encodePathParam(stand)}/cart`),
|
|
166
|
+
method: "GET",
|
|
167
|
+
headers: _headers,
|
|
168
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
169
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
170
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
171
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
172
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
173
|
+
logging: this._options.logging,
|
|
174
|
+
});
|
|
175
|
+
if (_response.ok) {
|
|
176
|
+
return {
|
|
177
|
+
data: _response.body,
|
|
178
|
+
rawResponse: _response.rawResponse,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
if (_response.error.reason === "status-code") {
|
|
182
|
+
switch (_response.error.statusCode) {
|
|
183
|
+
case 401:
|
|
184
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
185
|
+
case 404:
|
|
186
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
187
|
+
default:
|
|
188
|
+
throw new errors.FiveOneEatError({
|
|
189
|
+
statusCode: _response.error.statusCode,
|
|
190
|
+
body: _response.error.body,
|
|
191
|
+
rawResponse: _response.rawResponse,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/stands/{stand}/cart");
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Only a variant this stand sells is accepted: its product is active,
|
|
200
|
+
* published and on the stand, and the variant has a stand price. Anything
|
|
201
|
+
* else is a 422 on `variant_id` ("That item isn't available here.").
|
|
202
|
+
*
|
|
203
|
+
* @param {FiveOneEat.customer.AddCartItemStandsRequest} request
|
|
204
|
+
* @param {StandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
205
|
+
*
|
|
206
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
207
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
208
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* await client.customer.stands.addCartItem({
|
|
212
|
+
* stand: "stand",
|
|
213
|
+
* body: {
|
|
214
|
+
* variant_id: "variant_id",
|
|
215
|
+
* quantity: 1
|
|
216
|
+
* }
|
|
217
|
+
* })
|
|
218
|
+
*/
|
|
219
|
+
addCartItem(request, requestOptions) {
|
|
220
|
+
return core.HttpResponsePromise.fromPromise(this.__addCartItem(request, requestOptions));
|
|
221
|
+
}
|
|
222
|
+
__addCartItem(request, requestOptions) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
225
|
+
const { stand, body: _body } = request;
|
|
226
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
227
|
+
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);
|
|
228
|
+
const _response = yield core.fetcher({
|
|
229
|
+
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/stands/${core.url.encodePathParam(stand)}/cart`),
|
|
230
|
+
method: "POST",
|
|
231
|
+
headers: _headers,
|
|
232
|
+
contentType: "application/json",
|
|
233
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
234
|
+
requestType: "json",
|
|
235
|
+
body: _body,
|
|
236
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
237
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
238
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
239
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
240
|
+
logging: this._options.logging,
|
|
241
|
+
});
|
|
242
|
+
if (_response.ok) {
|
|
243
|
+
return {
|
|
244
|
+
data: _response.body,
|
|
245
|
+
rawResponse: _response.rawResponse,
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
if (_response.error.reason === "status-code") {
|
|
249
|
+
switch (_response.error.statusCode) {
|
|
250
|
+
case 401:
|
|
251
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
252
|
+
case 404:
|
|
253
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
254
|
+
case 422:
|
|
255
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
256
|
+
default:
|
|
257
|
+
throw new errors.FiveOneEatError({
|
|
258
|
+
statusCode: _response.error.statusCode,
|
|
259
|
+
body: _response.error.body,
|
|
260
|
+
rawResponse: _response.rawResponse,
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/stands/{stand}/cart");
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* @param {FiveOneEat.customer.ClearCartStandsRequest} request
|
|
269
|
+
* @param {StandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
270
|
+
*
|
|
271
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
272
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* await client.customer.stands.clearCart({
|
|
276
|
+
* stand: "stand"
|
|
277
|
+
* })
|
|
278
|
+
*/
|
|
279
|
+
clearCart(request, requestOptions) {
|
|
280
|
+
return core.HttpResponsePromise.fromPromise(this.__clearCart(request, requestOptions));
|
|
281
|
+
}
|
|
282
|
+
__clearCart(request, requestOptions) {
|
|
283
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
284
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
285
|
+
const { stand } = request;
|
|
286
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
287
|
+
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);
|
|
288
|
+
const _response = yield core.fetcher({
|
|
289
|
+
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/stands/${core.url.encodePathParam(stand)}/cart`),
|
|
290
|
+
method: "DELETE",
|
|
291
|
+
headers: _headers,
|
|
292
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
293
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
294
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
295
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
296
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
297
|
+
logging: this._options.logging,
|
|
298
|
+
});
|
|
299
|
+
if (_response.ok) {
|
|
300
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
301
|
+
}
|
|
302
|
+
if (_response.error.reason === "status-code") {
|
|
303
|
+
switch (_response.error.statusCode) {
|
|
304
|
+
case 401:
|
|
305
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
306
|
+
case 404:
|
|
307
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
308
|
+
default:
|
|
309
|
+
throw new errors.FiveOneEatError({
|
|
310
|
+
statusCode: _response.error.statusCode,
|
|
311
|
+
body: _response.error.body,
|
|
312
|
+
rawResponse: _response.rawResponse,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/stands/{stand}/cart");
|
|
317
|
+
});
|
|
318
|
+
}
|
|
76
319
|
/**
|
|
77
320
|
* @param {FiveOneEat.customer.CreatePaymentIntentStandsRequest} request
|
|
78
321
|
* @param {StandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
322
|
*
|
|
80
323
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
81
324
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
325
|
+
* @throws {@link FiveOneEat.ConflictError}
|
|
82
326
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
83
327
|
*
|
|
84
328
|
* @example
|
|
@@ -118,6 +362,8 @@ export class StandsClient {
|
|
|
118
362
|
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
119
363
|
case 404:
|
|
120
364
|
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
365
|
+
case 409:
|
|
366
|
+
throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
|
|
121
367
|
case 422:
|
|
122
368
|
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
123
369
|
default:
|
|
@@ -137,6 +383,7 @@ export class StandsClient {
|
|
|
137
383
|
*
|
|
138
384
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
139
385
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
386
|
+
* @throws {@link FiveOneEat.ConflictError}
|
|
140
387
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
141
388
|
*
|
|
142
389
|
* @example
|
|
@@ -182,6 +429,8 @@ export class StandsClient {
|
|
|
182
429
|
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
183
430
|
case 404:
|
|
184
431
|
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
432
|
+
case 409:
|
|
433
|
+
throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
|
|
185
434
|
case 422:
|
|
186
435
|
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
187
436
|
default:
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* stand: "stand",
|
|
6
|
+
* body: {
|
|
7
|
+
* variant_id: "variant_id",
|
|
8
|
+
* quantity: 1
|
|
9
|
+
* }
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface AddCartItemStandsRequest {
|
|
13
|
+
/** The stand ID */
|
|
14
|
+
stand: string;
|
|
15
|
+
body: FiveOneEat.AddCartItemRequest;
|
|
16
|
+
}
|
package/dist/esm/api/resources/customer/resources/stands/client/requests/NearbyStandsRequest.d.mts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* latitude: 1.1,
|
|
5
|
+
* longitude: 1.1
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface NearbyStandsRequest {
|
|
9
|
+
/** The device's latitude. @example 42.6526 */
|
|
10
|
+
latitude: number;
|
|
11
|
+
/** The device's longitude. @example -73.7562 */
|
|
12
|
+
longitude: number;
|
|
13
|
+
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export type { AddCartItemStandsRequest } from "./AddCartItemStandsRequest.mjs";
|
|
1
2
|
export type { CheckoutStandsRequest } from "./CheckoutStandsRequest.mjs";
|
|
3
|
+
export type { ClearCartStandsRequest } from "./ClearCartStandsRequest.mjs";
|
|
2
4
|
export type { CreatePaymentIntentStandsRequest } from "./CreatePaymentIntentStandsRequest.mjs";
|
|
5
|
+
export type { GetCartStandsRequest } from "./GetCartStandsRequest.mjs";
|
|
6
|
+
export type { NearbyStandsRequest } from "./NearbyStandsRequest.mjs";
|
|
3
7
|
export type { ScanStandsRequest } from "./ScanStandsRequest.mjs";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../../../../../index.mjs";
|
|
2
|
+
export interface NearbyStandsResponse {
|
|
3
|
+
data: FiveOneEat.NearbyStand[];
|
|
4
|
+
meta: NearbyStandsResponse.Meta;
|
|
5
|
+
}
|
|
6
|
+
export declare namespace NearbyStandsResponse {
|
|
7
|
+
interface Meta {
|
|
8
|
+
arrival_radius_meters: number;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export * from "./AddCartItemStandsResponse.mjs";
|
|
1
2
|
export * from "./CheckoutStandsResponse.mjs";
|
|
2
3
|
export * from "./CreatePaymentIntentStandsResponse.mjs";
|
|
4
|
+
export * from "./GetCartStandsResponse.mjs";
|
|
5
|
+
export * from "./NearbyStandsResponse.mjs";
|
|
3
6
|
export * from "./ScanStandsResponse.mjs";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export * from "./AddCartItemStandsResponse.mjs";
|
|
1
2
|
export * from "./CheckoutStandsResponse.mjs";
|
|
2
3
|
export * from "./CreatePaymentIntentStandsResponse.mjs";
|
|
4
|
+
export * from "./GetCartStandsResponse.mjs";
|
|
5
|
+
export * from "./NearbyStandsResponse.mjs";
|
|
3
6
|
export * from "./ScanStandsResponse.mjs";
|
|
@@ -2,9 +2,6 @@ export * as business from "./business/index.mjs";
|
|
|
2
2
|
export * from "./customer/client/requests/index.mjs";
|
|
3
3
|
export * as customer from "./customer/index.mjs";
|
|
4
4
|
export * from "./customer/types/index.mjs";
|
|
5
|
-
export * from "./customerStands/client/requests/index.mjs";
|
|
6
|
-
export * as customerStands from "./customerStands/index.mjs";
|
|
7
|
-
export * from "./customerStands/types/index.mjs";
|
|
8
5
|
export * from "./publicLists/client/requests/index.mjs";
|
|
9
6
|
export * as publicLists from "./publicLists/index.mjs";
|
|
10
7
|
export * from "./publicLists/types/index.mjs";
|
|
@@ -2,9 +2,6 @@ export * as business from "./business/index.mjs";
|
|
|
2
2
|
export * from "./customer/client/requests/index.mjs";
|
|
3
3
|
export * as customer from "./customer/index.mjs";
|
|
4
4
|
export * from "./customer/types/index.mjs";
|
|
5
|
-
export * from "./customerStands/client/requests/index.mjs";
|
|
6
|
-
export * as customerStands from "./customerStands/index.mjs";
|
|
7
|
-
export * from "./customerStands/types/index.mjs";
|
|
8
5
|
export * from "./publicLists/client/requests/index.mjs";
|
|
9
6
|
export * as publicLists from "./publicLists/index.mjs";
|
|
10
7
|
export * from "./publicLists/types/index.mjs";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A variant to add to a storefront or stand cart. It must be one the shop or
|
|
3
|
+
* stand sells: its product active, published and on sale there, with a price
|
|
4
|
+
* there. Anything else is refused on `variant_id`.
|
|
5
|
+
*/
|
|
6
|
+
export interface AddCartItemRequest {
|
|
7
|
+
variant_id: string;
|
|
8
|
+
quantity: number;
|
|
9
|
+
}
|
|
@@ -21,6 +21,7 @@ export interface BusinessEvent {
|
|
|
21
21
|
published_at: string;
|
|
22
22
|
sort_order: string;
|
|
23
23
|
image?: (string | null) | undefined;
|
|
24
|
+
/** The event's ticket tiers. */
|
|
24
25
|
ticket_types?: FiveOneEat.BusinessEventTicketType[] | undefined;
|
|
25
26
|
rsvps_count?: number | undefined;
|
|
26
27
|
attendees_count?: number | undefined;
|
|
@@ -22,6 +22,11 @@ export interface BusinessProfile {
|
|
|
22
22
|
latitude: number | null;
|
|
23
23
|
longitude: number | null;
|
|
24
24
|
has_location: boolean;
|
|
25
|
+
billing_address: string | null;
|
|
26
|
+
billing_city: string | null;
|
|
27
|
+
billing_state: string | null;
|
|
28
|
+
billing_zipcode: string | null;
|
|
29
|
+
billing_country: string | null;
|
|
25
30
|
logo: string | null;
|
|
26
31
|
logo_url: string | null;
|
|
27
32
|
hours: BusinessProfile.Hours;
|
|
@@ -18,6 +18,11 @@ export declare namespace CartResource {
|
|
|
18
18
|
quantity: number;
|
|
19
19
|
unit_price_cents: number;
|
|
20
20
|
total_cents: number;
|
|
21
|
+
/**
|
|
22
|
+
* False once the shop or stand stopped selling this item (unpriced,
|
|
23
|
+
* taken off sale, or deactivated). Checkout is blocked until it is removed.
|
|
24
|
+
*/
|
|
25
|
+
available: boolean;
|
|
21
26
|
}
|
|
22
27
|
}
|
|
23
28
|
/**
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
export interface ConflictErrorBody {
|
|
2
|
-
|
|
3
|
-
message:
|
|
4
|
-
payment_intent_id: string;
|
|
5
|
-
}
|
|
6
|
-
export declare namespace ConflictErrorBody {
|
|
7
|
-
const Status: {
|
|
8
|
-
readonly Paid: "paid";
|
|
9
|
-
};
|
|
10
|
-
type Status = (typeof Status)[keyof typeof Status];
|
|
11
|
-
const Message: {
|
|
12
|
-
readonly YouveAlreadyPaidForTheseTicketsTheyllArriveByEmailShortly: "You've already paid for these tickets — they'll arrive by email shortly.";
|
|
13
|
-
};
|
|
14
|
-
type Message = (typeof Message)[keyof typeof Message];
|
|
2
|
+
/** Error overview. */
|
|
3
|
+
message: string;
|
|
15
4
|
}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export
|
|
3
|
-
(function (ConflictErrorBody) {
|
|
4
|
-
ConflictErrorBody.Status = {
|
|
5
|
-
Paid: "paid",
|
|
6
|
-
};
|
|
7
|
-
ConflictErrorBody.Message = {
|
|
8
|
-
YouveAlreadyPaidForTheseTicketsTheyllArriveByEmailShortly: "You've already paid for these tickets \u2014 they'll arrive by email shortly.",
|
|
9
|
-
};
|
|
10
|
-
})(ConflictErrorBody || (ConflictErrorBody = {}));
|
|
2
|
+
export {};
|
|
@@ -5,6 +5,12 @@ export interface CustomerEvent {
|
|
|
5
5
|
starts_at: string;
|
|
6
6
|
ends_at: string;
|
|
7
7
|
location: string | null;
|
|
8
|
+
address: string | null;
|
|
9
|
+
city: string | null;
|
|
10
|
+
state: string | null;
|
|
11
|
+
zipcode: string | null;
|
|
12
|
+
latitude: number | null;
|
|
13
|
+
longitude: number | null;
|
|
8
14
|
is_featured: boolean;
|
|
9
15
|
ticket_sales_enabled: boolean;
|
|
10
16
|
image: string | null;
|
|
@@ -6,6 +6,12 @@ export interface CustomerEventDetail {
|
|
|
6
6
|
starts_at: string;
|
|
7
7
|
ends_at: string;
|
|
8
8
|
location: string | null;
|
|
9
|
+
address: string | null;
|
|
10
|
+
city: string | null;
|
|
11
|
+
state: string | null;
|
|
12
|
+
zipcode: string | null;
|
|
13
|
+
latitude: number | null;
|
|
14
|
+
longitude: number | null;
|
|
9
15
|
is_featured: boolean;
|
|
10
16
|
ticket_sales_enabled: boolean;
|
|
11
17
|
image: string | null;
|
|
@@ -5,6 +5,12 @@ export interface EventFeedItem {
|
|
|
5
5
|
starts_at: string;
|
|
6
6
|
ends_at: string;
|
|
7
7
|
location: string | null;
|
|
8
|
+
address: string | null;
|
|
9
|
+
city: string | null;
|
|
10
|
+
state: string | null;
|
|
11
|
+
zipcode: string | null;
|
|
12
|
+
latitude: number | null;
|
|
13
|
+
longitude: number | null;
|
|
8
14
|
is_featured: boolean;
|
|
9
15
|
ticket_sales_enabled: boolean;
|
|
10
16
|
image: string | null;
|
|
@@ -3,6 +3,7 @@ export interface ExploreResponse {
|
|
|
3
3
|
businesses: FiveOneEat.ExploreBusiness[];
|
|
4
4
|
temporary_locations: FiveOneEat.ExploreTemporaryLocation[];
|
|
5
5
|
events: FiveOneEat.ExploreEvent[];
|
|
6
|
+
stands: FiveOneEat.ExploreStand[];
|
|
6
7
|
bounds: ExploreResponse.Bounds;
|
|
7
8
|
}
|
|
8
9
|
export declare namespace ExploreResponse {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ExploreStand {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
address: string | null;
|
|
5
|
+
city: string | null;
|
|
6
|
+
state: string | null;
|
|
7
|
+
latitude: number;
|
|
8
|
+
longitude: number;
|
|
9
|
+
business?: ExploreStand.Business | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace ExploreStand {
|
|
12
|
+
interface Business {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
handle: string;
|
|
16
|
+
logo: string | null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface NearbyStand {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
city: string | null;
|
|
5
|
+
latitude: number;
|
|
6
|
+
longitude: number;
|
|
7
|
+
/** Straight-line distance from the coordinates sent, in meters. */
|
|
8
|
+
distance_meters: number;
|
|
9
|
+
/** Within the arrival radius: the customer is at this stand. */
|
|
10
|
+
is_here: boolean;
|
|
11
|
+
business: NearbyStand.Business;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace NearbyStand {
|
|
14
|
+
interface Business {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
handle: string;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -5,6 +5,10 @@ export interface OrderResource {
|
|
|
5
5
|
status: string;
|
|
6
6
|
fulfillment_status: string;
|
|
7
7
|
fulfillment_method: string;
|
|
8
|
+
/** The buyer's pickup day (Y-m-d) for a pickup order, when they chose one. */
|
|
9
|
+
pickup_date: string | null;
|
|
10
|
+
/** The buyer's pickup time (H:i) for a pickup order, when they chose one. */
|
|
11
|
+
pickup_time: string | null;
|
|
8
12
|
subtotal_cents: number;
|
|
9
13
|
discount_cents: number;
|
|
10
14
|
shipping_cents: number;
|
|
@@ -35,6 +39,11 @@ export declare namespace OrderResource {
|
|
|
35
39
|
ulid: string;
|
|
36
40
|
status: string;
|
|
37
41
|
refunded_amount_cents: number;
|
|
42
|
+
/**
|
|
43
|
+
* What a refund can still return: the total less what's refunded and
|
|
44
|
+
* the customer-paid service fee and its tax, which are never refunded.
|
|
45
|
+
*/
|
|
46
|
+
refundable_amount_cents: number;
|
|
38
47
|
payment_completed_at: string;
|
|
39
48
|
refunded_at: string;
|
|
40
49
|
}
|
|
@@ -12,7 +12,13 @@ export declare namespace TicketOrder {
|
|
|
12
12
|
title: string;
|
|
13
13
|
starts_at: string;
|
|
14
14
|
ends_at: string;
|
|
15
|
-
location: string;
|
|
15
|
+
location: string | null;
|
|
16
|
+
address: string | null;
|
|
17
|
+
city: string | null;
|
|
18
|
+
state: string | null;
|
|
19
|
+
zipcode: string | null;
|
|
20
|
+
latitude: number | null;
|
|
21
|
+
longitude: number | null;
|
|
16
22
|
business: Event.Business | null;
|
|
17
23
|
}
|
|
18
24
|
namespace Event {
|