@51eat/sdk 0.0.23 → 0.0.25
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 +59 -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 +71 -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 +59 -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 +71 -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
|
@@ -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;
|
|
@@ -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.js";
|
|
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.js";
|
|
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.js";
|
|
|
21
21
|
export * from "./BardSetValues.js";
|
|
22
22
|
export * from "./BardTextNode.js";
|
|
23
23
|
export * from "./BusinessBulletin.js";
|
|
24
|
+
export * from "./BusinessCategory.js";
|
|
25
|
+
export * from "./BusinessCertification.js";
|
|
24
26
|
export * from "./BusinessConversation.js";
|
|
27
|
+
export * from "./BusinessCuisine.js";
|
|
25
28
|
export * from "./BusinessLoginResponse.js";
|
|
26
29
|
export * from "./BusinessMe.js";
|
|
27
30
|
export * from "./BusinessMenu.js";
|
|
@@ -37,7 +37,10 @@ __exportStar(require("./BardSetNode.js"), exports);
|
|
|
37
37
|
__exportStar(require("./BardSetValues.js"), exports);
|
|
38
38
|
__exportStar(require("./BardTextNode.js"), exports);
|
|
39
39
|
__exportStar(require("./BusinessBulletin.js"), exports);
|
|
40
|
+
__exportStar(require("./BusinessCategory.js"), exports);
|
|
41
|
+
__exportStar(require("./BusinessCertification.js"), exports);
|
|
40
42
|
__exportStar(require("./BusinessConversation.js"), exports);
|
|
43
|
+
__exportStar(require("./BusinessCuisine.js"), exports);
|
|
41
44
|
__exportStar(require("./BusinessLoginResponse.js"), exports);
|
|
42
45
|
__exportStar(require("./BusinessMe.js"), exports);
|
|
43
46
|
__exportStar(require("./BusinessMenu.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.25";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@51eat/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "0.0.
|
|
10
|
-
"User-Agent": "@51eat/sdk/0.0.
|
|
9
|
+
"X-Fern-SDK-Version": "0.0.25",
|
|
10
|
+
"User-Agent": "@51eat/sdk/0.0.25",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -18,24 +18,24 @@ export declare class BusinessClient {
|
|
|
18
18
|
protected readonly _options: NormalizedClientOptionsWithAuth<BusinessClient.Options>;
|
|
19
19
|
protected _auth: AuthClient | undefined;
|
|
20
20
|
protected _bulletins: BulletinsClient | undefined;
|
|
21
|
+
protected _businesses: BusinessesClient | undefined;
|
|
21
22
|
protected _gallery: GalleryClient | undefined;
|
|
22
23
|
protected _menus: MenusClient | undefined;
|
|
23
24
|
protected _messaging: MessagingClient | undefined;
|
|
24
25
|
protected _profile: ProfileClient | undefined;
|
|
25
26
|
protected _pushNotifications: PushNotificationsClient | undefined;
|
|
26
|
-
protected _businesses: BusinessesClient | undefined;
|
|
27
27
|
protected _cuisines: CuisinesClient | undefined;
|
|
28
28
|
protected _certifications: CertificationsClient | undefined;
|
|
29
29
|
protected _categories: CategoriesClient | undefined;
|
|
30
30
|
constructor(options?: BusinessClient.Options);
|
|
31
31
|
get auth(): AuthClient;
|
|
32
32
|
get bulletins(): BulletinsClient;
|
|
33
|
+
get businesses(): BusinessesClient;
|
|
33
34
|
get gallery(): GalleryClient;
|
|
34
35
|
get menus(): MenusClient;
|
|
35
36
|
get messaging(): MessagingClient;
|
|
36
37
|
get profile(): ProfileClient;
|
|
37
38
|
get pushNotifications(): PushNotificationsClient;
|
|
38
|
-
get businesses(): BusinessesClient;
|
|
39
39
|
get cuisines(): CuisinesClient;
|
|
40
40
|
get certifications(): CertificationsClient;
|
|
41
41
|
get categories(): CategoriesClient;
|
|
@@ -23,6 +23,10 @@ export class BusinessClient {
|
|
|
23
23
|
var _a;
|
|
24
24
|
return ((_a = this._bulletins) !== null && _a !== void 0 ? _a : (this._bulletins = new BulletinsClient(this._options)));
|
|
25
25
|
}
|
|
26
|
+
get businesses() {
|
|
27
|
+
var _a;
|
|
28
|
+
return ((_a = this._businesses) !== null && _a !== void 0 ? _a : (this._businesses = new BusinessesClient(this._options)));
|
|
29
|
+
}
|
|
26
30
|
get gallery() {
|
|
27
31
|
var _a;
|
|
28
32
|
return ((_a = this._gallery) !== null && _a !== void 0 ? _a : (this._gallery = new GalleryClient(this._options)));
|
|
@@ -43,10 +47,6 @@ export class BusinessClient {
|
|
|
43
47
|
var _a;
|
|
44
48
|
return ((_a = this._pushNotifications) !== null && _a !== void 0 ? _a : (this._pushNotifications = new PushNotificationsClient(this._options)));
|
|
45
49
|
}
|
|
46
|
-
get businesses() {
|
|
47
|
-
var _a;
|
|
48
|
-
return ((_a = this._businesses) !== null && _a !== void 0 ? _a : (this._businesses = new BusinessesClient(this._options)));
|
|
49
|
-
}
|
|
50
50
|
get cuisines() {
|
|
51
51
|
var _a;
|
|
52
52
|
return ((_a = this._cuisines) !== null && _a !== void 0 ? _a : (this._cuisines = new CuisinesClient(this._options)));
|
|
@@ -1,7 +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
|
|
4
|
+
import * as FiveOneEat from "../../../../../index.mjs";
|
|
5
5
|
export declare namespace BusinessesClient {
|
|
6
6
|
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -11,47 +11,88 @@ export declare class BusinessesClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<BusinessesClient.Options>;
|
|
12
12
|
constructor(options?: BusinessesClient.Options);
|
|
13
13
|
/**
|
|
14
|
+
* Retrieve a paginated list of all businesses owned by the authenticated user.
|
|
15
|
+
* Useful for rendering a business picker in the companion mobile app.
|
|
16
|
+
*
|
|
17
|
+
* @param {FiveOneEat.business.ListBusinessesRequest} request
|
|
14
18
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
15
19
|
*
|
|
20
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
21
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
22
|
+
*
|
|
16
23
|
* @example
|
|
17
24
|
* await client.business.businesses.list()
|
|
18
25
|
*/
|
|
19
|
-
list(requestOptions?: BusinessesClient.RequestOptions): core.HttpResponsePromise<
|
|
26
|
+
list(request?: FiveOneEat.business.ListBusinessesRequest, requestOptions?: BusinessesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListBusinessesResponse>;
|
|
20
27
|
private __list;
|
|
21
28
|
/**
|
|
29
|
+
* Create a new business owned by the authenticated user. The newly created
|
|
30
|
+
* business is automatically set as the user's active business.
|
|
31
|
+
*
|
|
32
|
+
* @param {FiveOneEat.business.StoreBusinessRequest} request
|
|
22
33
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
23
34
|
*
|
|
35
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
36
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
37
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
38
|
+
*
|
|
24
39
|
* @example
|
|
25
|
-
* await client.business.businesses.create(
|
|
40
|
+
* await client.business.businesses.create({
|
|
41
|
+
* name: "name",
|
|
42
|
+
* handle: "handle",
|
|
43
|
+
* category_ids: [1]
|
|
44
|
+
* })
|
|
26
45
|
*/
|
|
27
|
-
create(requestOptions?: BusinessesClient.RequestOptions): core.HttpResponsePromise<
|
|
46
|
+
create(request: FiveOneEat.business.StoreBusinessRequest, requestOptions?: BusinessesClient.RequestOptions): core.HttpResponsePromise<number>;
|
|
28
47
|
private __create;
|
|
29
48
|
/**
|
|
49
|
+
* Retrieve a single business owned by the authenticated user.
|
|
50
|
+
*
|
|
30
51
|
* @param {FiveOneEat.business.GetBusinessesRequest} request
|
|
31
52
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
53
|
*
|
|
54
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
55
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
56
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
57
|
+
*
|
|
33
58
|
* @example
|
|
34
59
|
* await client.business.businesses.get({
|
|
35
60
|
* business: "business"
|
|
36
61
|
* })
|
|
37
62
|
*/
|
|
38
|
-
get(request: FiveOneEat.business.GetBusinessesRequest, requestOptions?: BusinessesClient.RequestOptions): core.HttpResponsePromise<
|
|
63
|
+
get(request: FiveOneEat.business.GetBusinessesRequest, requestOptions?: BusinessesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.GetBusinessesResponse>;
|
|
39
64
|
private __get;
|
|
40
65
|
/**
|
|
41
|
-
*
|
|
66
|
+
* Update core fields for a business owned by the authenticated user.
|
|
67
|
+
*
|
|
68
|
+
* @param {FiveOneEat.business.UpdateBusinessRequest} request
|
|
42
69
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
70
|
*
|
|
71
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
72
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
73
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
74
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
75
|
+
*
|
|
44
76
|
* @example
|
|
45
77
|
* await client.business.businesses.update({
|
|
46
|
-
* business: "business"
|
|
78
|
+
* business: "business",
|
|
79
|
+
* name: "name",
|
|
80
|
+
* handle: "handle",
|
|
81
|
+
* category_ids: [1]
|
|
47
82
|
* })
|
|
48
83
|
*/
|
|
49
|
-
update(request: FiveOneEat.business.
|
|
84
|
+
update(request: FiveOneEat.business.UpdateBusinessRequest, requestOptions?: BusinessesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.UpdateBusinessesResponse>;
|
|
50
85
|
private __update;
|
|
51
86
|
/**
|
|
87
|
+
* Delete a business owned by the authenticated user.
|
|
88
|
+
*
|
|
52
89
|
* @param {FiveOneEat.business.DeleteBusinessesRequest} request
|
|
53
90
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
91
|
*
|
|
92
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
93
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
94
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
95
|
+
*
|
|
55
96
|
* @example
|
|
56
97
|
* await client.business.businesses.delete({
|
|
57
98
|
* business: "business"
|