@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,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* name: "name",
|
|
5
|
+
* handle: "handle",
|
|
6
|
+
* category_ids: [1]
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface StoreBusinessRequest {
|
|
10
|
+
name: string;
|
|
11
|
+
handle: string;
|
|
12
|
+
email?: string | null;
|
|
13
|
+
phone?: string | null;
|
|
14
|
+
website?: string | null;
|
|
15
|
+
description?: string | null;
|
|
16
|
+
address?: string | null;
|
|
17
|
+
city?: string | null;
|
|
18
|
+
state?: string | null;
|
|
19
|
+
zipcode?: string | null;
|
|
20
|
+
country?: string | null;
|
|
21
|
+
latitude?: number | null;
|
|
22
|
+
longitude?: number | null;
|
|
23
|
+
has_location?: boolean;
|
|
24
|
+
metadata?: string[] | null;
|
|
25
|
+
badges?: string[] | null;
|
|
26
|
+
seasonal?: boolean;
|
|
27
|
+
ownership?: string[] | null;
|
|
28
|
+
category_ids: number[];
|
|
29
|
+
operating_months?: StoreBusinessRequest.OperatingMonths.Item[] | null;
|
|
30
|
+
}
|
|
31
|
+
export declare namespace StoreBusinessRequest {
|
|
32
|
+
type OperatingMonths = OperatingMonths.Item[];
|
|
33
|
+
namespace OperatingMonths {
|
|
34
|
+
const Item: {
|
|
35
|
+
readonly January: "january";
|
|
36
|
+
readonly February: "february";
|
|
37
|
+
readonly March: "march";
|
|
38
|
+
readonly April: "april";
|
|
39
|
+
readonly May: "may";
|
|
40
|
+
readonly June: "june";
|
|
41
|
+
readonly July: "july";
|
|
42
|
+
readonly August: "august";
|
|
43
|
+
readonly September: "september";
|
|
44
|
+
readonly October: "october";
|
|
45
|
+
readonly November: "november";
|
|
46
|
+
readonly December: "december";
|
|
47
|
+
};
|
|
48
|
+
type Item = (typeof Item)[keyof typeof Item];
|
|
49
|
+
}
|
|
50
|
+
}
|
package/dist/cjs/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.StoreBusinessRequest = void 0;
|
|
5
|
+
var StoreBusinessRequest;
|
|
6
|
+
(function (StoreBusinessRequest) {
|
|
7
|
+
let OperatingMonths;
|
|
8
|
+
(function (OperatingMonths) {
|
|
9
|
+
OperatingMonths.Item = {
|
|
10
|
+
January: "january",
|
|
11
|
+
February: "february",
|
|
12
|
+
March: "march",
|
|
13
|
+
April: "april",
|
|
14
|
+
May: "may",
|
|
15
|
+
June: "june",
|
|
16
|
+
July: "july",
|
|
17
|
+
August: "august",
|
|
18
|
+
September: "september",
|
|
19
|
+
October: "october",
|
|
20
|
+
November: "november",
|
|
21
|
+
December: "december",
|
|
22
|
+
};
|
|
23
|
+
})(OperatingMonths = StoreBusinessRequest.OperatingMonths || (StoreBusinessRequest.OperatingMonths = {}));
|
|
24
|
+
})(StoreBusinessRequest || (exports.StoreBusinessRequest = StoreBusinessRequest = {}));
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* business: "business",
|
|
5
|
+
* name: "name",
|
|
6
|
+
* handle: "handle",
|
|
7
|
+
* category_ids: [1]
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface UpdateBusinessRequest {
|
|
11
|
+
/** The business ID */
|
|
12
|
+
business: string;
|
|
13
|
+
name: string;
|
|
14
|
+
handle: string;
|
|
15
|
+
email?: string | null;
|
|
16
|
+
phone?: string | null;
|
|
17
|
+
website?: string | null;
|
|
18
|
+
description?: string | null;
|
|
19
|
+
bio?: string | null;
|
|
20
|
+
facebook_url?: string | null;
|
|
21
|
+
instagram_url?: string | null;
|
|
22
|
+
twitter_url?: string | null;
|
|
23
|
+
tiktok_url?: string | null;
|
|
24
|
+
youtube_url?: string | null;
|
|
25
|
+
linkedin_url?: string | null;
|
|
26
|
+
address?: string | null;
|
|
27
|
+
city?: string | null;
|
|
28
|
+
state?: string | null;
|
|
29
|
+
zipcode?: string | null;
|
|
30
|
+
country?: string | null;
|
|
31
|
+
latitude?: number | null;
|
|
32
|
+
longitude?: number | null;
|
|
33
|
+
has_location?: boolean;
|
|
34
|
+
metadata?: string[] | null;
|
|
35
|
+
badges?: string[] | null;
|
|
36
|
+
seasonal?: boolean;
|
|
37
|
+
ownership?: string[] | null;
|
|
38
|
+
category_ids: number[];
|
|
39
|
+
operating_months?: UpdateBusinessRequest.OperatingMonths.Item[] | null;
|
|
40
|
+
certification_ids?: number[] | null;
|
|
41
|
+
cuisine_ids?: number[] | null;
|
|
42
|
+
}
|
|
43
|
+
export declare namespace UpdateBusinessRequest {
|
|
44
|
+
type OperatingMonths = OperatingMonths.Item[];
|
|
45
|
+
namespace OperatingMonths {
|
|
46
|
+
const Item: {
|
|
47
|
+
readonly January: "january";
|
|
48
|
+
readonly February: "february";
|
|
49
|
+
readonly March: "march";
|
|
50
|
+
readonly April: "april";
|
|
51
|
+
readonly May: "may";
|
|
52
|
+
readonly June: "june";
|
|
53
|
+
readonly July: "july";
|
|
54
|
+
readonly August: "august";
|
|
55
|
+
readonly September: "september";
|
|
56
|
+
readonly October: "october";
|
|
57
|
+
readonly November: "november";
|
|
58
|
+
readonly December: "december";
|
|
59
|
+
};
|
|
60
|
+
type Item = (typeof Item)[keyof typeof Item];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.UpdateBusinessRequest = void 0;
|
|
5
|
+
var UpdateBusinessRequest;
|
|
6
|
+
(function (UpdateBusinessRequest) {
|
|
7
|
+
let OperatingMonths;
|
|
8
|
+
(function (OperatingMonths) {
|
|
9
|
+
OperatingMonths.Item = {
|
|
10
|
+
January: "january",
|
|
11
|
+
February: "february",
|
|
12
|
+
March: "march",
|
|
13
|
+
April: "april",
|
|
14
|
+
May: "may",
|
|
15
|
+
June: "june",
|
|
16
|
+
July: "july",
|
|
17
|
+
August: "august",
|
|
18
|
+
September: "september",
|
|
19
|
+
October: "october",
|
|
20
|
+
November: "november",
|
|
21
|
+
December: "december",
|
|
22
|
+
};
|
|
23
|
+
})(OperatingMonths = UpdateBusinessRequest.OperatingMonths || (UpdateBusinessRequest.OperatingMonths = {}));
|
|
24
|
+
})(UpdateBusinessRequest || (exports.UpdateBusinessRequest = UpdateBusinessRequest = {}));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { DeleteBusinessesRequest } from "./DeleteBusinessesRequest.js";
|
|
2
|
+
export type { GetBusinessesRequest } from "./GetBusinessesRequest.js";
|
|
3
|
+
export type { ListBusinessesRequest } from "./ListBusinessesRequest.js";
|
|
4
|
+
export { StoreBusinessRequest } from "./StoreBusinessRequest.js";
|
|
5
|
+
export { UpdateBusinessRequest } from "./UpdateBusinessRequest.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateBusinessRequest = exports.StoreBusinessRequest = void 0;
|
|
4
|
+
var StoreBusinessRequest_js_1 = require("./StoreBusinessRequest.js");
|
|
5
|
+
Object.defineProperty(exports, "StoreBusinessRequest", { enumerable: true, get: function () { return StoreBusinessRequest_js_1.StoreBusinessRequest; } });
|
|
6
|
+
var UpdateBusinessRequest_js_1 = require("./UpdateBusinessRequest.js");
|
|
7
|
+
Object.defineProperty(exports, "UpdateBusinessRequest", { enumerable: true, get: function () { return UpdateBusinessRequest_js_1.UpdateBusinessRequest; } });
|
|
@@ -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.BusinessesClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "BusinessesClient", { enumerable: true, get: function () { return Client_js_1.BusinessesClient; } });
|
|
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,19 @@
|
|
|
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("./GetBusinessesResponse.js"), exports);
|
|
18
|
+
__exportStar(require("./ListBusinessesResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./UpdateBusinessesResponse.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 CategoriesClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class CategoriesClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<CategoriesClient.Options>;
|
|
12
|
+
constructor(options?: CategoriesClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve a list of all business categories, ordered by sort order and name.
|
|
15
|
+
* Use these IDs to populate the `category_ids` field when creating or updating a business.
|
|
16
|
+
*
|
|
17
|
+
* @param {CategoriesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* await client.business.categories.list()
|
|
23
|
+
*/
|
|
24
|
+
list(requestOptions?: CategoriesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListCategoriesResponse>;
|
|
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.CategoriesClient = 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 CategoriesClient {
|
|
55
|
+
constructor(options = {}) {
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Retrieve a list of all business categories, ordered by sort order and name.
|
|
60
|
+
* Use these IDs to populate the `category_ids` field when creating or updating a business.
|
|
61
|
+
*
|
|
62
|
+
* @param {CategoriesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.business.categories.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/categories"),
|
|
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/categories");
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.CategoriesClient = CategoriesClient;
|
|
@@ -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.CategoriesClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "CategoriesClient", { enumerable: true, get: function () { return Client_js_1.CategoriesClient; } });
|
|
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 "./ListCategoriesResponse.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("./ListCategoriesResponse.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 CertificationsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class CertificationsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<CertificationsClient.Options>;
|
|
12
|
+
constructor(options?: CertificationsClient.Options);
|
|
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
|
+
*
|
|
17
|
+
* @param {CertificationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* await client.business.certifications.list()
|
|
23
|
+
*/
|
|
24
|
+
list(requestOptions?: CertificationsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListCertificationsResponse>;
|
|
25
|
+
private __list;
|
|
26
|
+
}
|