@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,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.CertificationsClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
53
|
+
const FiveOneEat = __importStar(require("../../../../../index.js"));
|
|
54
|
+
class CertificationsClient {
|
|
55
|
+
constructor(options = {}) {
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Retrieve a list of all certifications, ordered alphabetically. Use these IDs
|
|
60
|
+
* to populate the `certification_ids` field when updating a business profile.
|
|
61
|
+
*
|
|
62
|
+
* @param {CertificationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.business.certifications.list()
|
|
68
|
+
*/
|
|
69
|
+
list(requestOptions) {
|
|
70
|
+
return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
|
|
71
|
+
}
|
|
72
|
+
__list(requestOptions) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
75
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
76
|
+
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);
|
|
77
|
+
const _response = yield core.fetcher({
|
|
78
|
+
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/certifications"),
|
|
79
|
+
method: "GET",
|
|
80
|
+
headers: _headers,
|
|
81
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
82
|
+
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,
|
|
83
|
+
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,
|
|
84
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
85
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
86
|
+
logging: this._options.logging,
|
|
87
|
+
});
|
|
88
|
+
if (_response.ok) {
|
|
89
|
+
return {
|
|
90
|
+
data: _response.body,
|
|
91
|
+
rawResponse: _response.rawResponse,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
if (_response.error.reason === "status-code") {
|
|
95
|
+
switch (_response.error.statusCode) {
|
|
96
|
+
case 401:
|
|
97
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
98
|
+
default:
|
|
99
|
+
throw new errors.FiveOneEatError({
|
|
100
|
+
statusCode: _response.error.statusCode,
|
|
101
|
+
body: _response.error.body,
|
|
102
|
+
rawResponse: _response.rawResponse,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/certifications");
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.CertificationsClient = CertificationsClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.CertificationsClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "CertificationsClient", { enumerable: true, get: function () { return Client_js_1.CertificationsClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
18
|
+
__exportStar(require("./types/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ListCertificationsResponse.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ListCertificationsResponse.js"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../../../core/index.js";
|
|
4
|
+
import * as FiveOneEat from "../../../../../index.js";
|
|
5
|
+
export declare namespace CuisinesClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class CuisinesClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<CuisinesClient.Options>;
|
|
12
|
+
constructor(options?: CuisinesClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve a list of all cuisines, ordered alphabetically. Use these IDs to
|
|
15
|
+
* populate the `cuisine_ids` field when updating a business profile.
|
|
16
|
+
*
|
|
17
|
+
* @param {CuisinesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* await client.business.cuisines.list()
|
|
23
|
+
*/
|
|
24
|
+
list(requestOptions?: CuisinesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListCuisinesResponse>;
|
|
25
|
+
private __list;
|
|
26
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.CuisinesClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
53
|
+
const FiveOneEat = __importStar(require("../../../../../index.js"));
|
|
54
|
+
class CuisinesClient {
|
|
55
|
+
constructor(options = {}) {
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Retrieve a list of all cuisines, ordered alphabetically. Use these IDs to
|
|
60
|
+
* populate the `cuisine_ids` field when updating a business profile.
|
|
61
|
+
*
|
|
62
|
+
* @param {CuisinesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.business.cuisines.list()
|
|
68
|
+
*/
|
|
69
|
+
list(requestOptions) {
|
|
70
|
+
return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
|
|
71
|
+
}
|
|
72
|
+
__list(requestOptions) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
75
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
76
|
+
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);
|
|
77
|
+
const _response = yield core.fetcher({
|
|
78
|
+
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"),
|
|
79
|
+
method: "GET",
|
|
80
|
+
headers: _headers,
|
|
81
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
82
|
+
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,
|
|
83
|
+
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,
|
|
84
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
85
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
86
|
+
logging: this._options.logging,
|
|
87
|
+
});
|
|
88
|
+
if (_response.ok) {
|
|
89
|
+
return {
|
|
90
|
+
data: _response.body,
|
|
91
|
+
rawResponse: _response.rawResponse,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
if (_response.error.reason === "status-code") {
|
|
95
|
+
switch (_response.error.statusCode) {
|
|
96
|
+
case 401:
|
|
97
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
98
|
+
default:
|
|
99
|
+
throw new errors.FiveOneEatError({
|
|
100
|
+
statusCode: _response.error.statusCode,
|
|
101
|
+
body: _response.error.body,
|
|
102
|
+
rawResponse: _response.rawResponse,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/cuisines");
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.CuisinesClient = CuisinesClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.CuisinesClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "CuisinesClient", { enumerable: true, get: function () { return Client_js_1.CuisinesClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
18
|
+
__exportStar(require("./types/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ListCuisinesResponse.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ListCuisinesResponse.js"), exports);
|
|
@@ -4,6 +4,15 @@ export * from "./auth/types/index.js";
|
|
|
4
4
|
export * from "./bulletins/client/requests/index.js";
|
|
5
5
|
export * as bulletins from "./bulletins/index.js";
|
|
6
6
|
export * from "./bulletins/types/index.js";
|
|
7
|
+
export * from "./businesses/client/requests/index.js";
|
|
8
|
+
export * as businesses from "./businesses/index.js";
|
|
9
|
+
export * from "./businesses/types/index.js";
|
|
10
|
+
export * as categories from "./categories/index.js";
|
|
11
|
+
export * from "./categories/types/index.js";
|
|
12
|
+
export * as certifications from "./certifications/index.js";
|
|
13
|
+
export * from "./certifications/types/index.js";
|
|
14
|
+
export * as cuisines from "./cuisines/index.js";
|
|
15
|
+
export * from "./cuisines/types/index.js";
|
|
7
16
|
export * from "./gallery/client/requests/index.js";
|
|
8
17
|
export * as gallery from "./gallery/index.js";
|
|
9
18
|
export * from "./gallery/types/index.js";
|
|
@@ -36,13 +36,22 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.pushNotifications = exports.profile = exports.messaging = exports.menus = exports.gallery = exports.bulletins = exports.auth = void 0;
|
|
39
|
+
exports.pushNotifications = exports.profile = exports.messaging = exports.menus = exports.gallery = exports.cuisines = exports.certifications = exports.categories = exports.businesses = exports.bulletins = exports.auth = void 0;
|
|
40
40
|
__exportStar(require("./auth/client/requests/index.js"), exports);
|
|
41
41
|
exports.auth = __importStar(require("./auth/index.js"));
|
|
42
42
|
__exportStar(require("./auth/types/index.js"), exports);
|
|
43
43
|
__exportStar(require("./bulletins/client/requests/index.js"), exports);
|
|
44
44
|
exports.bulletins = __importStar(require("./bulletins/index.js"));
|
|
45
45
|
__exportStar(require("./bulletins/types/index.js"), exports);
|
|
46
|
+
__exportStar(require("./businesses/client/requests/index.js"), exports);
|
|
47
|
+
exports.businesses = __importStar(require("./businesses/index.js"));
|
|
48
|
+
__exportStar(require("./businesses/types/index.js"), exports);
|
|
49
|
+
exports.categories = __importStar(require("./categories/index.js"));
|
|
50
|
+
__exportStar(require("./categories/types/index.js"), exports);
|
|
51
|
+
exports.certifications = __importStar(require("./certifications/index.js"));
|
|
52
|
+
__exportStar(require("./certifications/types/index.js"), exports);
|
|
53
|
+
exports.cuisines = __importStar(require("./cuisines/index.js"));
|
|
54
|
+
__exportStar(require("./cuisines/types/index.js"), exports);
|
|
46
55
|
__exportStar(require("./gallery/client/requests/index.js"), exports);
|
|
47
56
|
exports.gallery = __importStar(require("./gallery/index.js"));
|
|
48
57
|
__exportStar(require("./gallery/types/index.js"), exports);
|
|
@@ -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"
|
|
@@ -114,7 +114,7 @@ class CustomerClient {
|
|
|
114
114
|
* @example
|
|
115
115
|
* await client.customer.search({
|
|
116
116
|
* q: "wings",
|
|
117
|
-
*
|
|
117
|
+
* categories: "restaurant,bakery",
|
|
118
118
|
* city: "Buffalo",
|
|
119
119
|
* cuisines: "italian,mexican",
|
|
120
120
|
* certifications: "kosher,halal"
|
|
@@ -126,10 +126,10 @@ class CustomerClient {
|
|
|
126
126
|
__search(request, requestOptions) {
|
|
127
127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
128
128
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
129
|
-
const { q,
|
|
129
|
+
const { q, categories, city, cuisines, certifications, radius_km: radiusKm, per_type: perType, lat, lng, } = request;
|
|
130
130
|
const _queryParams = {
|
|
131
131
|
q,
|
|
132
|
-
|
|
132
|
+
categories,
|
|
133
133
|
city,
|
|
134
134
|
cuisines,
|
|
135
135
|
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.
|
|
@@ -173,7 +173,7 @@ class DiscoveryClient {
|
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
|
-
* Retrieve a list of all business categories
|
|
176
|
+
* Retrieve a list of all business categories with their business counts.
|
|
177
177
|
* This endpoint is used to populate category filters and navigation.
|
|
178
178
|
*
|
|
179
179
|
* @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.js";
|
|
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;
|