@51eat/sdk 0.0.23 → 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 +2 -2
- package/dist/cjs/api/resources/business/client/Client.js +4 -4
- package/dist/cjs/api/resources/business/resources/businesses/client/Client.d.ts +49 -8
- package/dist/cjs/api/resources/business/resources/businesses/client/Client.js +164 -41
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/DeleteBusinessesRequest.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/GetBusinessesRequest.d.ts +1 -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/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 +3 -1
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/index.js +5 -0
- package/dist/cjs/api/resources/business/resources/businesses/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/businesses/index.js +1 -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 +7 -1
- package/dist/cjs/api/resources/business/resources/categories/client/Client.js +20 -6
- package/dist/cjs/api/resources/business/resources/categories/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/categories/index.js +1 -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 +7 -1
- package/dist/cjs/api/resources/business/resources/certifications/client/Client.js +20 -6
- package/dist/cjs/api/resources/business/resources/certifications/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/certifications/index.js +1 -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 +7 -1
- package/dist/cjs/api/resources/business/resources/cuisines/client/Client.js +20 -6
- package/dist/cjs/api/resources/business/resources/cuisines/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/cuisines/index.js +1 -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 +4 -0
- package/dist/cjs/api/resources/business/resources/index.js +4 -0
- 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 +2 -2
- package/dist/esm/api/resources/business/client/Client.mjs +4 -4
- package/dist/esm/api/resources/business/resources/businesses/client/Client.d.mts +49 -8
- package/dist/esm/api/resources/business/resources/businesses/client/Client.mjs +164 -41
- package/dist/esm/api/resources/business/resources/businesses/client/requests/DeleteBusinessesRequest.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/GetBusinessesRequest.d.mts +1 -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/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 +3 -1
- package/dist/esm/api/resources/business/resources/businesses/client/requests/index.mjs +2 -1
- package/dist/esm/api/resources/business/resources/businesses/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/businesses/index.mjs +1 -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 +7 -1
- package/dist/esm/api/resources/business/resources/categories/client/Client.mjs +20 -6
- package/dist/esm/api/resources/business/resources/categories/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/categories/index.mjs +1 -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 +7 -1
- package/dist/esm/api/resources/business/resources/certifications/client/Client.mjs +20 -6
- package/dist/esm/api/resources/business/resources/certifications/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/certifications/index.mjs +1 -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 +7 -1
- package/dist/esm/api/resources/business/resources/cuisines/client/Client.mjs +20 -6
- package/dist/esm/api/resources/business/resources/cuisines/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/cuisines/index.mjs +1 -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 +4 -0
- package/dist/esm/api/resources/business/resources/index.mjs +4 -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 +12 -12
- package/reference.md +354 -214
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/UpdateBusinessesRequest.d.ts +0 -9
- package/dist/esm/api/resources/business/resources/businesses/client/requests/UpdateBusinessesRequest.d.mts +0 -9
- /package/dist/cjs/api/resources/business/resources/businesses/client/requests/{UpdateBusinessesRequest.js → ListBusinessesRequest.js} +0 -0
- /package/dist/esm/api/resources/business/resources/businesses/client/requests/{UpdateBusinessesRequest.mjs → ListBusinessesRequest.mjs} +0 -0
|
@@ -14,13 +14,19 @@ import * as core from "../../../../../../core/index.mjs";
|
|
|
14
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
16
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
import * as FiveOneEat from "../../../../../index.mjs";
|
|
17
18
|
export class CategoriesClient {
|
|
18
19
|
constructor(options = {}) {
|
|
19
20
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
23
|
+
* Retrieve a list of all business categories, ordered by sort order and name.
|
|
24
|
+
* Use these IDs to populate the `category_ids` field when creating or updating a business.
|
|
25
|
+
*
|
|
22
26
|
* @param {CategoriesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
23
27
|
*
|
|
28
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
29
|
+
*
|
|
24
30
|
* @example
|
|
25
31
|
* await client.business.categories.list()
|
|
26
32
|
*/
|
|
@@ -44,14 +50,22 @@ export class CategoriesClient {
|
|
|
44
50
|
logging: this._options.logging,
|
|
45
51
|
});
|
|
46
52
|
if (_response.ok) {
|
|
47
|
-
return {
|
|
53
|
+
return {
|
|
54
|
+
data: _response.body,
|
|
55
|
+
rawResponse: _response.rawResponse,
|
|
56
|
+
};
|
|
48
57
|
}
|
|
49
58
|
if (_response.error.reason === "status-code") {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
+
}
|
|
55
69
|
}
|
|
56
70
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/categories");
|
|
57
71
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ListCategoriesResponse.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ListCategoriesResponse.mjs";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
3
3
|
import * as core from "../../../../../../core/index.mjs";
|
|
4
|
+
import * as FiveOneEat from "../../../../../index.mjs";
|
|
4
5
|
export declare namespace CertificationsClient {
|
|
5
6
|
type Options = BaseClientOptions;
|
|
6
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -10,11 +11,16 @@ export declare class CertificationsClient {
|
|
|
10
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<CertificationsClient.Options>;
|
|
11
12
|
constructor(options?: CertificationsClient.Options);
|
|
12
13
|
/**
|
|
14
|
+
* Retrieve a list of all certifications, ordered alphabetically. Use these IDs
|
|
15
|
+
* to populate the `certification_ids` field when updating a business profile.
|
|
16
|
+
*
|
|
13
17
|
* @param {CertificationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
14
18
|
*
|
|
19
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
20
|
+
*
|
|
15
21
|
* @example
|
|
16
22
|
* await client.business.certifications.list()
|
|
17
23
|
*/
|
|
18
|
-
list(requestOptions?: CertificationsClient.RequestOptions): core.HttpResponsePromise<
|
|
24
|
+
list(requestOptions?: CertificationsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListCertificationsResponse>;
|
|
19
25
|
private __list;
|
|
20
26
|
}
|
|
@@ -14,13 +14,19 @@ import * as core from "../../../../../../core/index.mjs";
|
|
|
14
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
16
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
import * as FiveOneEat from "../../../../../index.mjs";
|
|
17
18
|
export class CertificationsClient {
|
|
18
19
|
constructor(options = {}) {
|
|
19
20
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
23
|
+
* Retrieve a list of all certifications, ordered alphabetically. Use these IDs
|
|
24
|
+
* to populate the `certification_ids` field when updating a business profile.
|
|
25
|
+
*
|
|
22
26
|
* @param {CertificationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
23
27
|
*
|
|
28
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
29
|
+
*
|
|
24
30
|
* @example
|
|
25
31
|
* await client.business.certifications.list()
|
|
26
32
|
*/
|
|
@@ -44,14 +50,22 @@ export class CertificationsClient {
|
|
|
44
50
|
logging: this._options.logging,
|
|
45
51
|
});
|
|
46
52
|
if (_response.ok) {
|
|
47
|
-
return {
|
|
53
|
+
return {
|
|
54
|
+
data: _response.body,
|
|
55
|
+
rawResponse: _response.rawResponse,
|
|
56
|
+
};
|
|
48
57
|
}
|
|
49
58
|
if (_response.error.reason === "status-code") {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
+
}
|
|
55
69
|
}
|
|
56
70
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/certifications");
|
|
57
71
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ListCertificationsResponse.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ListCertificationsResponse.mjs";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
3
3
|
import * as core from "../../../../../../core/index.mjs";
|
|
4
|
+
import * as FiveOneEat from "../../../../../index.mjs";
|
|
4
5
|
export declare namespace CuisinesClient {
|
|
5
6
|
type Options = BaseClientOptions;
|
|
6
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -10,11 +11,16 @@ export declare class CuisinesClient {
|
|
|
10
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<CuisinesClient.Options>;
|
|
11
12
|
constructor(options?: CuisinesClient.Options);
|
|
12
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
|
+
*
|
|
13
17
|
* @param {CuisinesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
14
18
|
*
|
|
19
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
20
|
+
*
|
|
15
21
|
* @example
|
|
16
22
|
* await client.business.cuisines.list()
|
|
17
23
|
*/
|
|
18
|
-
list(requestOptions?: CuisinesClient.RequestOptions): core.HttpResponsePromise<
|
|
24
|
+
list(requestOptions?: CuisinesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListCuisinesResponse>;
|
|
19
25
|
private __list;
|
|
20
26
|
}
|
|
@@ -14,13 +14,19 @@ import * as core from "../../../../../../core/index.mjs";
|
|
|
14
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
16
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
import * as FiveOneEat from "../../../../../index.mjs";
|
|
17
18
|
export class CuisinesClient {
|
|
18
19
|
constructor(options = {}) {
|
|
19
20
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
20
21
|
}
|
|
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
|
+
*
|
|
22
26
|
* @param {CuisinesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
23
27
|
*
|
|
28
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
29
|
+
*
|
|
24
30
|
* @example
|
|
25
31
|
* await client.business.cuisines.list()
|
|
26
32
|
*/
|
|
@@ -44,14 +50,22 @@ export class CuisinesClient {
|
|
|
44
50
|
logging: this._options.logging,
|
|
45
51
|
});
|
|
46
52
|
if (_response.ok) {
|
|
47
|
-
return {
|
|
53
|
+
return {
|
|
54
|
+
data: _response.body,
|
|
55
|
+
rawResponse: _response.rawResponse,
|
|
56
|
+
};
|
|
48
57
|
}
|
|
49
58
|
if (_response.error.reason === "status-code") {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
+
}
|
|
55
69
|
}
|
|
56
70
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/cuisines");
|
|
57
71
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ListCuisinesResponse.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ListCuisinesResponse.mjs";
|
|
@@ -6,9 +6,13 @@ export * as bulletins from "./bulletins/index.mjs";
|
|
|
6
6
|
export * from "./bulletins/types/index.mjs";
|
|
7
7
|
export * from "./businesses/client/requests/index.mjs";
|
|
8
8
|
export * as businesses from "./businesses/index.mjs";
|
|
9
|
+
export * from "./businesses/types/index.mjs";
|
|
9
10
|
export * as categories from "./categories/index.mjs";
|
|
11
|
+
export * from "./categories/types/index.mjs";
|
|
10
12
|
export * as certifications from "./certifications/index.mjs";
|
|
13
|
+
export * from "./certifications/types/index.mjs";
|
|
11
14
|
export * as cuisines from "./cuisines/index.mjs";
|
|
15
|
+
export * from "./cuisines/types/index.mjs";
|
|
12
16
|
export * from "./gallery/client/requests/index.mjs";
|
|
13
17
|
export * as gallery from "./gallery/index.mjs";
|
|
14
18
|
export * from "./gallery/types/index.mjs";
|
|
@@ -6,9 +6,13 @@ export * as bulletins from "./bulletins/index.mjs";
|
|
|
6
6
|
export * from "./bulletins/types/index.mjs";
|
|
7
7
|
export * from "./businesses/client/requests/index.mjs";
|
|
8
8
|
export * as businesses from "./businesses/index.mjs";
|
|
9
|
+
export * from "./businesses/types/index.mjs";
|
|
9
10
|
export * as categories from "./categories/index.mjs";
|
|
11
|
+
export * from "./categories/types/index.mjs";
|
|
10
12
|
export * as certifications from "./certifications/index.mjs";
|
|
13
|
+
export * from "./certifications/types/index.mjs";
|
|
11
14
|
export * as cuisines from "./cuisines/index.mjs";
|
|
15
|
+
export * from "./cuisines/types/index.mjs";
|
|
12
16
|
export * from "./gallery/client/requests/index.mjs";
|
|
13
17
|
export * as gallery from "./gallery/index.mjs";
|
|
14
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,17 +176,6 @@
|
|
|
165
176
|
},
|
|
166
177
|
"default": "./dist/cjs/api/resources/business/resources/pushNotifications/exports.js"
|
|
167
178
|
},
|
|
168
|
-
"./business/businesses": {
|
|
169
|
-
"import": {
|
|
170
|
-
"types": "./dist/esm/api/resources/business/resources/businesses/exports.d.mts",
|
|
171
|
-
"default": "./dist/esm/api/resources/business/resources/businesses/exports.mjs"
|
|
172
|
-
},
|
|
173
|
-
"require": {
|
|
174
|
-
"types": "./dist/cjs/api/resources/business/resources/businesses/exports.d.ts",
|
|
175
|
-
"default": "./dist/cjs/api/resources/business/resources/businesses/exports.js"
|
|
176
|
-
},
|
|
177
|
-
"default": "./dist/cjs/api/resources/business/resources/businesses/exports.js"
|
|
178
|
-
},
|
|
179
179
|
"./business/cuisines": {
|
|
180
180
|
"import": {
|
|
181
181
|
"types": "./dist/esm/api/resources/business/resources/cuisines/exports.d.mts",
|