@51eat/sdk 0.0.22 → 0.0.24
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/client/Client.d.ts +12 -0
- package/dist/cjs/api/resources/business/client/Client.js +30 -10
- package/dist/cjs/api/resources/business/resources/businesses/client/Client.d.ts +103 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/Client.js +383 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/DeleteBusinessesRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/DeleteBusinessesRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/GetBusinessesRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/GetBusinessesRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/ListBusinessesRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/ListBusinessesRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.d.ts +50 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.js +24 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.ts +62 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.js +24 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/index.js +7 -0
- package/dist/cjs/api/resources/business/resources/businesses/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/businesses/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/businesses/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/businesses/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/businesses/types/GetBusinessesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/businesses/types/GetBusinessesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/businesses/types/ListBusinessesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/businesses/types/ListBusinessesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/businesses/types/UpdateBusinessesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/businesses/types/UpdateBusinessesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/businesses/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/businesses/types/index.js +19 -0
- package/dist/cjs/api/resources/business/resources/categories/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/business/resources/categories/client/Client.js +110 -0
- package/dist/cjs/api/resources/business/resources/categories/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/categories/client/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/categories/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/categories/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/categories/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/categories/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/categories/types/ListCategoriesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/categories/types/ListCategoriesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/categories/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/categories/types/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/certifications/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/business/resources/certifications/client/Client.js +110 -0
- package/dist/cjs/api/resources/business/resources/certifications/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/certifications/client/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/certifications/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/certifications/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/certifications/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/certifications/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/certifications/types/ListCertificationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/certifications/types/ListCertificationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/certifications/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/certifications/types/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/cuisines/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/business/resources/cuisines/client/Client.js +110 -0
- package/dist/cjs/api/resources/business/resources/cuisines/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/cuisines/client/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/cuisines/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/cuisines/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/cuisines/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/cuisines/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/cuisines/types/ListCuisinesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/cuisines/types/ListCuisinesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/cuisines/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/cuisines/types/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/index.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/index.js +10 -1
- package/dist/cjs/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.ts +1 -1
- package/dist/cjs/api/resources/customer/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/customer/client/Client.js +3 -3
- package/dist/cjs/api/resources/customer/client/requests/SearchCustomerRequest.d.ts +3 -3
- package/dist/cjs/api/resources/customer/resources/discovery/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/customer/resources/discovery/client/Client.js +1 -1
- package/dist/cjs/api/types/BusinessCategory.d.ts +9 -0
- package/dist/cjs/api/types/BusinessCategory.js +3 -0
- package/dist/cjs/api/types/BusinessCertification.d.ts +7 -0
- package/dist/cjs/api/types/BusinessCertification.js +3 -0
- package/dist/cjs/api/types/BusinessCuisine.d.ts +6 -0
- package/dist/cjs/api/types/BusinessCuisine.js +3 -0
- package/dist/cjs/api/types/BusinessProfile.d.ts +1 -1
- package/dist/cjs/api/types/BusinessSearchResult.d.ts +2 -1
- package/dist/cjs/api/types/BusinessSummary.d.ts +2 -1
- package/dist/cjs/api/types/CustomerBusinessProfile.d.ts +1 -1
- package/dist/cjs/api/types/DiscoveryBusiness.d.ts +2 -1
- package/dist/cjs/api/types/DiscoveryCategory.d.ts +6 -2
- package/dist/cjs/api/types/ExploreBusiness.d.ts +2 -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/api/resources/business/client/Client.d.mts +12 -0
- package/dist/esm/api/resources/business/client/Client.mjs +20 -0
- package/dist/esm/api/resources/business/resources/businesses/client/Client.d.mts +103 -0
- package/dist/esm/api/resources/business/resources/businesses/client/Client.mjs +346 -0
- package/dist/esm/api/resources/business/resources/businesses/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/businesses/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/DeleteBusinessesRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/DeleteBusinessesRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/GetBusinessesRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/GetBusinessesRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/ListBusinessesRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/ListBusinessesRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.d.mts +50 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.mjs +21 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.mts +62 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.mjs +21 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/businesses/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/businesses/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/businesses/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/businesses/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/businesses/types/GetBusinessesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/businesses/types/GetBusinessesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/businesses/types/ListBusinessesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/businesses/types/ListBusinessesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/businesses/types/UpdateBusinessesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/businesses/types/UpdateBusinessesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/businesses/types/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/businesses/types/index.mjs +3 -0
- package/dist/esm/api/resources/business/resources/categories/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/business/resources/categories/client/Client.mjs +73 -0
- package/dist/esm/api/resources/business/resources/categories/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/categories/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/categories/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/categories/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/categories/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/categories/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/categories/types/ListCategoriesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/categories/types/ListCategoriesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/categories/types/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/categories/types/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/certifications/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/business/resources/certifications/client/Client.mjs +73 -0
- package/dist/esm/api/resources/business/resources/certifications/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/certifications/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/certifications/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/certifications/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/certifications/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/certifications/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/certifications/types/ListCertificationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/certifications/types/ListCertificationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/certifications/types/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/certifications/types/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/cuisines/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/business/resources/cuisines/client/Client.mjs +73 -0
- package/dist/esm/api/resources/business/resources/cuisines/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/cuisines/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/cuisines/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/cuisines/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/cuisines/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/cuisines/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/cuisines/types/ListCuisinesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/cuisines/types/ListCuisinesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/cuisines/types/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/cuisines/types/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/index.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/index.mjs +9 -0
- package/dist/esm/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.mts +1 -1
- package/dist/esm/api/resources/customer/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/customer/client/Client.mjs +3 -3
- package/dist/esm/api/resources/customer/client/requests/SearchCustomerRequest.d.mts +3 -3
- package/dist/esm/api/resources/customer/resources/discovery/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/customer/resources/discovery/client/Client.mjs +1 -1
- package/dist/esm/api/types/BusinessCategory.d.mts +9 -0
- package/dist/esm/api/types/BusinessCategory.mjs +2 -0
- package/dist/esm/api/types/BusinessCertification.d.mts +7 -0
- package/dist/esm/api/types/BusinessCertification.mjs +2 -0
- package/dist/esm/api/types/BusinessCuisine.d.mts +6 -0
- package/dist/esm/api/types/BusinessCuisine.mjs +2 -0
- package/dist/esm/api/types/BusinessProfile.d.mts +1 -1
- package/dist/esm/api/types/BusinessSearchResult.d.mts +2 -1
- package/dist/esm/api/types/BusinessSummary.d.mts +2 -1
- package/dist/esm/api/types/CustomerBusinessProfile.d.mts +1 -1
- package/dist/esm/api/types/DiscoveryBusiness.d.mts +2 -1
- package/dist/esm/api/types/DiscoveryCategory.d.mts +6 -2
- package/dist/esm/api/types/ExploreBusiness.d.mts +2 -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 +45 -1
- package/reference.md +504 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
14
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
import * as FiveOneEat from "../../../../../index.mjs";
|
|
18
|
+
export class CuisinesClient {
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Retrieve a list of all cuisines, ordered alphabetically. Use these IDs to
|
|
24
|
+
* populate the `cuisine_ids` field when updating a business profile.
|
|
25
|
+
*
|
|
26
|
+
* @param {CuisinesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.business.cuisines.list()
|
|
32
|
+
*/
|
|
33
|
+
list(requestOptions) {
|
|
34
|
+
return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
|
|
35
|
+
}
|
|
36
|
+
__list(requestOptions) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
39
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
40
|
+
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);
|
|
41
|
+
const _response = yield core.fetcher({
|
|
42
|
+
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, "business/cuisines"),
|
|
43
|
+
method: "GET",
|
|
44
|
+
headers: _headers,
|
|
45
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
46
|
+
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,
|
|
47
|
+
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,
|
|
48
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
49
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
50
|
+
logging: this._options.logging,
|
|
51
|
+
});
|
|
52
|
+
if (_response.ok) {
|
|
53
|
+
return {
|
|
54
|
+
data: _response.body,
|
|
55
|
+
rawResponse: _response.rawResponse,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
if (_response.error.reason === "status-code") {
|
|
59
|
+
switch (_response.error.statusCode) {
|
|
60
|
+
case 401:
|
|
61
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
62
|
+
default:
|
|
63
|
+
throw new errors.FiveOneEatError({
|
|
64
|
+
statusCode: _response.error.statusCode,
|
|
65
|
+
body: _response.error.body,
|
|
66
|
+
rawResponse: _response.rawResponse,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/cuisines");
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ListCuisinesResponse.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ListCuisinesResponse.mjs";
|
|
@@ -4,6 +4,15 @@ export * from "./auth/types/index.mjs";
|
|
|
4
4
|
export * from "./bulletins/client/requests/index.mjs";
|
|
5
5
|
export * as bulletins from "./bulletins/index.mjs";
|
|
6
6
|
export * from "./bulletins/types/index.mjs";
|
|
7
|
+
export * from "./businesses/client/requests/index.mjs";
|
|
8
|
+
export * as businesses from "./businesses/index.mjs";
|
|
9
|
+
export * from "./businesses/types/index.mjs";
|
|
10
|
+
export * as categories from "./categories/index.mjs";
|
|
11
|
+
export * from "./categories/types/index.mjs";
|
|
12
|
+
export * as certifications from "./certifications/index.mjs";
|
|
13
|
+
export * from "./certifications/types/index.mjs";
|
|
14
|
+
export * as cuisines from "./cuisines/index.mjs";
|
|
15
|
+
export * from "./cuisines/types/index.mjs";
|
|
7
16
|
export * from "./gallery/client/requests/index.mjs";
|
|
8
17
|
export * as gallery from "./gallery/index.mjs";
|
|
9
18
|
export * from "./gallery/types/index.mjs";
|
|
@@ -4,6 +4,15 @@ export * from "./auth/types/index.mjs";
|
|
|
4
4
|
export * from "./bulletins/client/requests/index.mjs";
|
|
5
5
|
export * as bulletins from "./bulletins/index.mjs";
|
|
6
6
|
export * from "./bulletins/types/index.mjs";
|
|
7
|
+
export * from "./businesses/client/requests/index.mjs";
|
|
8
|
+
export * as businesses from "./businesses/index.mjs";
|
|
9
|
+
export * from "./businesses/types/index.mjs";
|
|
10
|
+
export * as categories from "./categories/index.mjs";
|
|
11
|
+
export * from "./categories/types/index.mjs";
|
|
12
|
+
export * as certifications from "./certifications/index.mjs";
|
|
13
|
+
export * from "./certifications/types/index.mjs";
|
|
14
|
+
export * as cuisines from "./cuisines/index.mjs";
|
|
15
|
+
export * from "./cuisines/types/index.mjs";
|
|
7
16
|
export * from "./gallery/client/requests/index.mjs";
|
|
8
17
|
export * as gallery from "./gallery/index.mjs";
|
|
9
18
|
export * from "./gallery/types/index.mjs";
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
export interface UpdateBusinessProfileRequest {
|
|
6
6
|
name?: string;
|
|
7
7
|
handle?: string;
|
|
8
|
-
category?: string | null;
|
|
9
8
|
phone?: string | null;
|
|
10
9
|
email?: string | null;
|
|
11
10
|
website?: string | null;
|
|
@@ -32,6 +31,7 @@ export interface UpdateBusinessProfileRequest {
|
|
|
32
31
|
pickup_instructions?: string | null;
|
|
33
32
|
ownership?: string[] | null;
|
|
34
33
|
badges?: string[] | null;
|
|
34
|
+
category_ids?: number[];
|
|
35
35
|
hours?: UpdateBusinessProfileRequest.Hours.Item[] | null;
|
|
36
36
|
operating_months?: number[] | null;
|
|
37
37
|
}
|
|
@@ -50,7 +50,7 @@ export declare class CustomerClient {
|
|
|
50
50
|
* @example
|
|
51
51
|
* await client.customer.search({
|
|
52
52
|
* q: "wings",
|
|
53
|
-
*
|
|
53
|
+
* categories: "restaurant,bakery",
|
|
54
54
|
* city: "Buffalo",
|
|
55
55
|
* cuisines: "italian,mexican",
|
|
56
56
|
* certifications: "kosher,halal"
|
|
@@ -78,7 +78,7 @@ export class CustomerClient {
|
|
|
78
78
|
* @example
|
|
79
79
|
* await client.customer.search({
|
|
80
80
|
* q: "wings",
|
|
81
|
-
*
|
|
81
|
+
* categories: "restaurant,bakery",
|
|
82
82
|
* city: "Buffalo",
|
|
83
83
|
* cuisines: "italian,mexican",
|
|
84
84
|
* certifications: "kosher,halal"
|
|
@@ -90,10 +90,10 @@ export class CustomerClient {
|
|
|
90
90
|
__search(request, requestOptions) {
|
|
91
91
|
return __awaiter(this, void 0, void 0, function* () {
|
|
92
92
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
93
|
-
const { q,
|
|
93
|
+
const { q, categories, city, cuisines, certifications, radius_km: radiusKm, per_type: perType, lat, lng, } = request;
|
|
94
94
|
const _queryParams = {
|
|
95
95
|
q,
|
|
96
|
-
|
|
96
|
+
categories,
|
|
97
97
|
city,
|
|
98
98
|
cuisines,
|
|
99
99
|
certifications,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* q: "wings",
|
|
5
|
-
*
|
|
5
|
+
* categories: "restaurant,bakery",
|
|
6
6
|
* city: "Buffalo",
|
|
7
7
|
* cuisines: "italian,mexican",
|
|
8
8
|
* certifications: "kosher,halal"
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
export interface SearchCustomerRequest {
|
|
12
12
|
/** Search query */
|
|
13
13
|
q: string;
|
|
14
|
-
/**
|
|
15
|
-
|
|
14
|
+
/** Comma-separated category slugs to filter businesses by */
|
|
15
|
+
categories?: string;
|
|
16
16
|
/** Filter by city */
|
|
17
17
|
city?: string;
|
|
18
18
|
/** Comma-separated cuisine slugs to filter businesses by */
|
|
@@ -43,7 +43,7 @@ export declare class DiscoveryClient {
|
|
|
43
43
|
highlights(requestOptions?: DiscoveryClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.DiscoveryHighlights>;
|
|
44
44
|
private __highlights;
|
|
45
45
|
/**
|
|
46
|
-
* Retrieve a list of all business categories
|
|
46
|
+
* Retrieve a list of all business categories with their business counts.
|
|
47
47
|
* This endpoint is used to populate category filters and navigation.
|
|
48
48
|
*
|
|
49
49
|
* @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -137,7 +137,7 @@ export class DiscoveryClient {
|
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
|
-
* Retrieve a list of all business categories
|
|
140
|
+
* Retrieve a list of all business categories with their business counts.
|
|
141
141
|
* This endpoint is used to populate category filters and navigation.
|
|
142
142
|
*
|
|
143
143
|
* @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -3,7 +3,6 @@ export interface BusinessProfile {
|
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
handle: string;
|
|
6
|
-
category: string | null;
|
|
7
6
|
description: string | null;
|
|
8
7
|
bio: string | null;
|
|
9
8
|
email: string | null;
|
|
@@ -37,6 +36,7 @@ export interface BusinessProfile {
|
|
|
37
36
|
founding_partner: boolean;
|
|
38
37
|
staff_pick: boolean;
|
|
39
38
|
favorites_count: number;
|
|
39
|
+
categories?: FiveOneEat.BusinessCategory[] | undefined;
|
|
40
40
|
cuisines?: BusinessProfile.Cuisines.Item[] | undefined;
|
|
41
41
|
certifications?: BusinessProfile.Certifications.Item[] | undefined;
|
|
42
42
|
active_temporary_locations?: FiveOneEat.CustomerTemporaryLocation[] | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../index.mjs";
|
|
1
2
|
export interface BusinessSearchResult {
|
|
2
3
|
id: string;
|
|
3
4
|
name: string;
|
|
4
5
|
handle: string;
|
|
5
|
-
|
|
6
|
+
categories?: FiveOneEat.BusinessCategory[] | undefined;
|
|
6
7
|
city: string | null;
|
|
7
8
|
state: string | null;
|
|
8
9
|
logo: string | null;
|
|
@@ -5,7 +5,6 @@ export interface CustomerBusinessProfile {
|
|
|
5
5
|
handle: string;
|
|
6
6
|
description: string | null;
|
|
7
7
|
bio: string | null;
|
|
8
|
-
category: string | null;
|
|
9
8
|
email: string | null;
|
|
10
9
|
phone: string | null;
|
|
11
10
|
website: string | null;
|
|
@@ -35,6 +34,7 @@ export interface CustomerBusinessProfile {
|
|
|
35
34
|
staff_pick: boolean;
|
|
36
35
|
favorites_count: number;
|
|
37
36
|
is_favorited: boolean;
|
|
37
|
+
categories?: FiveOneEat.BusinessCategory[] | undefined;
|
|
38
38
|
cuisines?: CustomerBusinessProfile.Cuisines.Item[] | undefined;
|
|
39
39
|
certifications?: CustomerBusinessProfile.Certifications.Item[] | undefined;
|
|
40
40
|
temporary_locations?: FiveOneEat.CustomerTemporaryLocation[] | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../index.mjs";
|
|
1
2
|
export interface DiscoveryBusiness {
|
|
2
3
|
id: string;
|
|
3
4
|
name: string;
|
|
4
5
|
handle: string;
|
|
5
|
-
|
|
6
|
+
categories?: FiveOneEat.BusinessCategory[] | undefined;
|
|
6
7
|
description: string | null;
|
|
7
8
|
bio: string | null;
|
|
8
9
|
location: DiscoveryBusiness.Location;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../index.mjs";
|
|
1
2
|
export interface ExploreBusiness {
|
|
2
3
|
id: string;
|
|
3
4
|
name: string;
|
|
4
5
|
handle: string;
|
|
5
|
-
|
|
6
|
+
categories?: FiveOneEat.BusinessCategory[] | undefined;
|
|
6
7
|
latitude: number | null;
|
|
7
8
|
longitude: number | null;
|
|
8
9
|
logo: string | null;
|
|
@@ -21,7 +21,10 @@ export * from "./BardSetNode.mjs";
|
|
|
21
21
|
export * from "./BardSetValues.mjs";
|
|
22
22
|
export * from "./BardTextNode.mjs";
|
|
23
23
|
export * from "./BusinessBulletin.mjs";
|
|
24
|
+
export * from "./BusinessCategory.mjs";
|
|
25
|
+
export * from "./BusinessCertification.mjs";
|
|
24
26
|
export * from "./BusinessConversation.mjs";
|
|
27
|
+
export * from "./BusinessCuisine.mjs";
|
|
25
28
|
export * from "./BusinessLoginResponse.mjs";
|
|
26
29
|
export * from "./BusinessMe.mjs";
|
|
27
30
|
export * from "./BusinessMenu.mjs";
|
|
@@ -21,7 +21,10 @@ export * from "./BardSetNode.mjs";
|
|
|
21
21
|
export * from "./BardSetValues.mjs";
|
|
22
22
|
export * from "./BardTextNode.mjs";
|
|
23
23
|
export * from "./BusinessBulletin.mjs";
|
|
24
|
+
export * from "./BusinessCategory.mjs";
|
|
25
|
+
export * from "./BusinessCertification.mjs";
|
|
24
26
|
export * from "./BusinessConversation.mjs";
|
|
27
|
+
export * from "./BusinessCuisine.mjs";
|
|
25
28
|
export * from "./BusinessLoginResponse.mjs";
|
|
26
29
|
export * from "./BusinessMe.mjs";
|
|
27
30
|
export * from "./BusinessMenu.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.24";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.24";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@51eat/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -110,6 +110,17 @@
|
|
|
110
110
|
},
|
|
111
111
|
"default": "./dist/cjs/api/resources/business/resources/bulletins/exports.js"
|
|
112
112
|
},
|
|
113
|
+
"./business/businesses": {
|
|
114
|
+
"import": {
|
|
115
|
+
"types": "./dist/esm/api/resources/business/resources/businesses/exports.d.mts",
|
|
116
|
+
"default": "./dist/esm/api/resources/business/resources/businesses/exports.mjs"
|
|
117
|
+
},
|
|
118
|
+
"require": {
|
|
119
|
+
"types": "./dist/cjs/api/resources/business/resources/businesses/exports.d.ts",
|
|
120
|
+
"default": "./dist/cjs/api/resources/business/resources/businesses/exports.js"
|
|
121
|
+
},
|
|
122
|
+
"default": "./dist/cjs/api/resources/business/resources/businesses/exports.js"
|
|
123
|
+
},
|
|
113
124
|
"./business/gallery": {
|
|
114
125
|
"import": {
|
|
115
126
|
"types": "./dist/esm/api/resources/business/resources/gallery/exports.d.mts",
|
|
@@ -165,6 +176,39 @@
|
|
|
165
176
|
},
|
|
166
177
|
"default": "./dist/cjs/api/resources/business/resources/pushNotifications/exports.js"
|
|
167
178
|
},
|
|
179
|
+
"./business/cuisines": {
|
|
180
|
+
"import": {
|
|
181
|
+
"types": "./dist/esm/api/resources/business/resources/cuisines/exports.d.mts",
|
|
182
|
+
"default": "./dist/esm/api/resources/business/resources/cuisines/exports.mjs"
|
|
183
|
+
},
|
|
184
|
+
"require": {
|
|
185
|
+
"types": "./dist/cjs/api/resources/business/resources/cuisines/exports.d.ts",
|
|
186
|
+
"default": "./dist/cjs/api/resources/business/resources/cuisines/exports.js"
|
|
187
|
+
},
|
|
188
|
+
"default": "./dist/cjs/api/resources/business/resources/cuisines/exports.js"
|
|
189
|
+
},
|
|
190
|
+
"./business/certifications": {
|
|
191
|
+
"import": {
|
|
192
|
+
"types": "./dist/esm/api/resources/business/resources/certifications/exports.d.mts",
|
|
193
|
+
"default": "./dist/esm/api/resources/business/resources/certifications/exports.mjs"
|
|
194
|
+
},
|
|
195
|
+
"require": {
|
|
196
|
+
"types": "./dist/cjs/api/resources/business/resources/certifications/exports.d.ts",
|
|
197
|
+
"default": "./dist/cjs/api/resources/business/resources/certifications/exports.js"
|
|
198
|
+
},
|
|
199
|
+
"default": "./dist/cjs/api/resources/business/resources/certifications/exports.js"
|
|
200
|
+
},
|
|
201
|
+
"./business/categories": {
|
|
202
|
+
"import": {
|
|
203
|
+
"types": "./dist/esm/api/resources/business/resources/categories/exports.d.mts",
|
|
204
|
+
"default": "./dist/esm/api/resources/business/resources/categories/exports.mjs"
|
|
205
|
+
},
|
|
206
|
+
"require": {
|
|
207
|
+
"types": "./dist/cjs/api/resources/business/resources/categories/exports.d.ts",
|
|
208
|
+
"default": "./dist/cjs/api/resources/business/resources/categories/exports.js"
|
|
209
|
+
},
|
|
210
|
+
"default": "./dist/cjs/api/resources/business/resources/categories/exports.js"
|
|
211
|
+
},
|
|
168
212
|
"./business/auth/tokens": {
|
|
169
213
|
"import": {
|
|
170
214
|
"types": "./dist/esm/api/resources/business/resources/auth/resources/tokens/exports.d.mts",
|