@51eat/sdk 0.0.57 → 0.0.59
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/errors/ConflictError.d.ts +1 -2
- package/dist/cjs/api/errors/InternalServerError.d.ts +1 -2
- package/dist/cjs/api/resources/business/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/business/client/Client.js +31 -26
- package/dist/cjs/api/resources/business/resources/claims/client/Client.d.ts +63 -0
- package/dist/cjs/api/resources/business/resources/claims/client/Client.js +281 -0
- package/dist/cjs/api/resources/business/resources/claims/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/claims/client/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/claims/client/requests/ClaimViaTokenClaimsRequest.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/claims/client/requests/ClaimViaTokenClaimsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/claims/client/requests/ListClaimableBusinessesClaimsRequest.d.ts +14 -0
- package/dist/cjs/api/resources/business/resources/claims/client/requests/ListClaimableBusinessesClaimsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/claims/client/requests/StoreClaimRequestRequest.d.ts +11 -0
- package/dist/cjs/api/resources/business/resources/claims/client/requests/StoreClaimRequestRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/claims/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/claims/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/claims/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/claims/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/claims/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/claims/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/claims/types/ClaimViaTokenClaimsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/claims/types/ClaimViaTokenClaimsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/claims/types/ListClaimRequestsClaimsResponse.d.ts +39 -0
- package/dist/cjs/api/resources/business/resources/claims/types/ListClaimRequestsClaimsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/claims/types/ListClaimableBusinessesClaimsResponse.d.ts +39 -0
- package/dist/cjs/api/resources/business/resources/claims/types/ListClaimableBusinessesClaimsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/claims/types/RequestClaimClaimsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/claims/types/RequestClaimClaimsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/claims/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/claims/types/index.js +20 -0
- package/dist/cjs/api/resources/business/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/index.js +4 -1
- package/dist/cjs/api/resources/customer/client/Client.d.ts +5 -2
- package/dist/cjs/api/resources/customer/client/Client.js +27 -22
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/Client.d.ts +62 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/Client.js +234 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/index.js +17 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/requests/GetBusinessSubmissionsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/requests/GetBusinessSubmissionsRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/requests/StoreBusinessSubmissionRequest.d.ts +37 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/requests/StoreBusinessSubmissionRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/exports.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/exports.js +22 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/index.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/index.js +19 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/index.js +42 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/client/Client.d.ts +48 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/client/Client.js +189 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/client/index.js +17 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/DeletePhotosRequest.d.ts +13 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/DeletePhotosRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/UploadSubmissionPhotoRequest.d.ts +14 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/UploadSubmissionPhotoRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/exports.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/exports.js +21 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/index.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/index.js +18 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/types/UploadPhotosResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/types/UploadPhotosResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/types/index.js +17 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/types/CreateBusinessSubmissionsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/types/CreateBusinessSubmissionsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/types/GetBusinessSubmissionsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/types/GetBusinessSubmissionsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/types/ListBusinessSubmissionsResponse.d.ts +39 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/types/ListBusinessSubmissionsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/types/index.js +19 -0
- package/dist/cjs/api/resources/customer/resources/explore/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/customer/resources/explore/client/Client.js +4 -2
- package/dist/cjs/api/resources/customer/resources/explore/client/requests/BusinessesExploreRequest.d.ts +4 -1
- package/dist/cjs/api/resources/customer/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/index.js +4 -1
- package/dist/cjs/api/types/BusinessClaimRequest.d.ts +9 -0
- package/dist/cjs/api/types/BusinessClaimRequest.js +3 -0
- package/dist/cjs/api/types/ClaimableBusiness.d.ts +11 -0
- package/dist/cjs/api/types/ClaimableBusiness.js +3 -0
- package/dist/cjs/api/types/CustomerBusinessSubmission.d.ts +19 -0
- package/dist/cjs/api/types/CustomerBusinessSubmission.js +3 -0
- 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/errors/ConflictError.d.mts +1 -2
- package/dist/esm/api/errors/InternalServerError.d.mts +1 -2
- package/dist/esm/api/resources/business/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/business/client/Client.mjs +5 -0
- package/dist/esm/api/resources/business/resources/claims/client/Client.d.mts +63 -0
- package/dist/esm/api/resources/business/resources/claims/client/Client.mjs +244 -0
- package/dist/esm/api/resources/business/resources/claims/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/claims/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/claims/client/requests/ClaimViaTokenClaimsRequest.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/claims/client/requests/ClaimViaTokenClaimsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/claims/client/requests/ListClaimableBusinessesClaimsRequest.d.mts +14 -0
- package/dist/esm/api/resources/business/resources/claims/client/requests/ListClaimableBusinessesClaimsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/claims/client/requests/StoreClaimRequestRequest.d.mts +11 -0
- package/dist/esm/api/resources/business/resources/claims/client/requests/StoreClaimRequestRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/claims/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/claims/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/claims/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/claims/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/claims/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/claims/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/claims/types/ClaimViaTokenClaimsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/claims/types/ClaimViaTokenClaimsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/claims/types/ListClaimRequestsClaimsResponse.d.mts +39 -0
- package/dist/esm/api/resources/business/resources/claims/types/ListClaimRequestsClaimsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/claims/types/ListClaimableBusinessesClaimsResponse.d.mts +39 -0
- package/dist/esm/api/resources/business/resources/claims/types/ListClaimableBusinessesClaimsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/claims/types/RequestClaimClaimsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/claims/types/RequestClaimClaimsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/claims/types/index.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/claims/types/index.mjs +4 -0
- package/dist/esm/api/resources/business/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/index.mjs +3 -0
- package/dist/esm/api/resources/customer/client/Client.d.mts +5 -2
- package/dist/esm/api/resources/customer/client/Client.mjs +9 -4
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/Client.d.mts +62 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/Client.mjs +197 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/requests/GetBusinessSubmissionsRequest.d.mts +10 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/requests/GetBusinessSubmissionsRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/requests/StoreBusinessSubmissionRequest.d.mts +37 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/requests/StoreBusinessSubmissionRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/exports.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/exports.mjs +4 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/index.mjs +3 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/index.mjs +3 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/client/Client.d.mts +48 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/client/Client.mjs +152 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/client/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/client/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/DeletePhotosRequest.d.mts +13 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/DeletePhotosRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/UploadSubmissionPhotoRequest.d.mts +14 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/UploadSubmissionPhotoRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/exports.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/exports.mjs +3 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/index.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/index.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/types/UploadPhotosResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/types/UploadPhotosResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/types/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/types/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/types/CreateBusinessSubmissionsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/types/CreateBusinessSubmissionsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/types/GetBusinessSubmissionsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/types/GetBusinessSubmissionsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/types/ListBusinessSubmissionsResponse.d.mts +39 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/types/ListBusinessSubmissionsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/types/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/types/index.mjs +3 -0
- package/dist/esm/api/resources/customer/resources/explore/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/customer/resources/explore/client/Client.mjs +4 -2
- package/dist/esm/api/resources/customer/resources/explore/client/requests/BusinessesExploreRequest.d.mts +4 -1
- package/dist/esm/api/resources/customer/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/index.mjs +3 -0
- package/dist/esm/api/types/BusinessClaimRequest.d.mts +9 -0
- package/dist/esm/api/types/BusinessClaimRequest.mjs +2 -0
- package/dist/esm/api/types/ClaimableBusiness.d.mts +11 -0
- package/dist/esm/api/types/ClaimableBusiness.mjs +2 -0
- package/dist/esm/api/types/CustomerBusinessSubmission.d.mts +19 -0
- package/dist/esm/api/types/CustomerBusinessSubmission.mjs +2 -0
- 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 -12
- package/reference.md +550 -99
|
@@ -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);
|
package/dist/cjs/api/resources/business/resources/claims/types/ListClaimRequestsClaimsResponse.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../../../../../index.js";
|
|
2
|
+
export interface ListClaimRequestsClaimsResponse {
|
|
3
|
+
data: FiveOneEat.BusinessClaimRequest[];
|
|
4
|
+
links: ListClaimRequestsClaimsResponse.Links;
|
|
5
|
+
meta: ListClaimRequestsClaimsResponse.Meta;
|
|
6
|
+
}
|
|
7
|
+
export declare namespace ListClaimRequestsClaimsResponse {
|
|
8
|
+
interface Links {
|
|
9
|
+
first: string | null;
|
|
10
|
+
last: string | null;
|
|
11
|
+
prev: string | null;
|
|
12
|
+
next: string | null;
|
|
13
|
+
}
|
|
14
|
+
interface Meta {
|
|
15
|
+
current_page: number;
|
|
16
|
+
from: number | null;
|
|
17
|
+
last_page: number;
|
|
18
|
+
/** Generated paginator links. */
|
|
19
|
+
links: Meta.Links.Item[];
|
|
20
|
+
/** Base path for paginator generated URLs. */
|
|
21
|
+
path: string | null;
|
|
22
|
+
/** Number of items shown per page. */
|
|
23
|
+
per_page: number;
|
|
24
|
+
/** Number of the last item in the slice. */
|
|
25
|
+
to: number | null;
|
|
26
|
+
/** Total number of items being paginated. */
|
|
27
|
+
total: number;
|
|
28
|
+
}
|
|
29
|
+
namespace Meta {
|
|
30
|
+
type Links = Links.Item[];
|
|
31
|
+
namespace Links {
|
|
32
|
+
interface Item {
|
|
33
|
+
url: string | null;
|
|
34
|
+
label: string;
|
|
35
|
+
active: boolean;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../../../../../index.js";
|
|
2
|
+
export interface ListClaimableBusinessesClaimsResponse {
|
|
3
|
+
data: FiveOneEat.ClaimableBusiness[];
|
|
4
|
+
links: ListClaimableBusinessesClaimsResponse.Links;
|
|
5
|
+
meta: ListClaimableBusinessesClaimsResponse.Meta;
|
|
6
|
+
}
|
|
7
|
+
export declare namespace ListClaimableBusinessesClaimsResponse {
|
|
8
|
+
interface Links {
|
|
9
|
+
first: string | null;
|
|
10
|
+
last: string | null;
|
|
11
|
+
prev: string | null;
|
|
12
|
+
next: string | null;
|
|
13
|
+
}
|
|
14
|
+
interface Meta {
|
|
15
|
+
current_page: number;
|
|
16
|
+
from: number | null;
|
|
17
|
+
last_page: number;
|
|
18
|
+
/** Generated paginator links. */
|
|
19
|
+
links: Meta.Links.Item[];
|
|
20
|
+
/** Base path for paginator generated URLs. */
|
|
21
|
+
path: string | null;
|
|
22
|
+
/** Number of items shown per page. */
|
|
23
|
+
per_page: number;
|
|
24
|
+
/** Number of the last item in the slice. */
|
|
25
|
+
to: number | null;
|
|
26
|
+
/** Total number of items being paginated. */
|
|
27
|
+
total: number;
|
|
28
|
+
}
|
|
29
|
+
namespace Meta {
|
|
30
|
+
type Links = Links.Item[];
|
|
31
|
+
namespace Links {
|
|
32
|
+
interface Item {
|
|
33
|
+
url: string | null;
|
|
34
|
+
label: string;
|
|
35
|
+
active: boolean;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./ClaimViaTokenClaimsResponse.js"), exports);
|
|
18
|
+
__exportStar(require("./ListClaimableBusinessesClaimsResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./ListClaimRequestsClaimsResponse.js"), exports);
|
|
20
|
+
__exportStar(require("./RequestClaimClaimsResponse.js"), exports);
|
|
@@ -13,6 +13,9 @@ export * as categories from "./categories/index.js";
|
|
|
13
13
|
export * from "./categories/types/index.js";
|
|
14
14
|
export * as certifications from "./certifications/index.js";
|
|
15
15
|
export * from "./certifications/types/index.js";
|
|
16
|
+
export * from "./claims/client/requests/index.js";
|
|
17
|
+
export * as claims from "./claims/index.js";
|
|
18
|
+
export * from "./claims/types/index.js";
|
|
16
19
|
export * as cuisines from "./cuisines/index.js";
|
|
17
20
|
export * from "./cuisines/types/index.js";
|
|
18
21
|
export * from "./discounts/client/requests/index.js";
|
|
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.temporaryLocations = exports.stripeConnect = exports.pushNotifications = exports.profile = exports.products = exports.productOrders = exports.productCategories = exports.messaging = exports.menus = exports.gallery = exports.events = exports.discounts = exports.cuisines = exports.certifications = exports.categories = exports.businesses = exports.bulletins = exports.auth = exports.allergens = void 0;
|
|
39
|
+
exports.temporaryLocations = exports.stripeConnect = exports.pushNotifications = exports.profile = exports.products = exports.productOrders = exports.productCategories = exports.messaging = exports.menus = exports.gallery = exports.events = exports.discounts = exports.cuisines = exports.claims = exports.certifications = exports.categories = exports.businesses = exports.bulletins = exports.auth = exports.allergens = void 0;
|
|
40
40
|
exports.allergens = __importStar(require("./allergens/index.js"));
|
|
41
41
|
__exportStar(require("./allergens/types/index.js"), exports);
|
|
42
42
|
__exportStar(require("./auth/client/requests/index.js"), exports);
|
|
@@ -52,6 +52,9 @@ exports.categories = __importStar(require("./categories/index.js"));
|
|
|
52
52
|
__exportStar(require("./categories/types/index.js"), exports);
|
|
53
53
|
exports.certifications = __importStar(require("./certifications/index.js"));
|
|
54
54
|
__exportStar(require("./certifications/types/index.js"), exports);
|
|
55
|
+
__exportStar(require("./claims/client/requests/index.js"), exports);
|
|
56
|
+
exports.claims = __importStar(require("./claims/index.js"));
|
|
57
|
+
__exportStar(require("./claims/types/index.js"), exports);
|
|
55
58
|
exports.cuisines = __importStar(require("./cuisines/index.js"));
|
|
56
59
|
__exportStar(require("./cuisines/types/index.js"), exports);
|
|
57
60
|
__exportStar(require("./discounts/client/requests/index.js"), exports);
|
|
@@ -4,6 +4,7 @@ import * as core from "../../../../core/index.js";
|
|
|
4
4
|
import * as FiveOneEat from "../../../index.js";
|
|
5
5
|
import { AuthClient } from "../resources/auth/client/Client.js";
|
|
6
6
|
import { BusinessesClient } from "../resources/businesses/client/Client.js";
|
|
7
|
+
import { BusinessSubmissionsClient } from "../resources/businessSubmissions/client/Client.js";
|
|
7
8
|
import { CartClient } from "../resources/cart/client/Client.js";
|
|
8
9
|
import { DiscoveryClient } from "../resources/discovery/client/Client.js";
|
|
9
10
|
import { EditorialsClient } from "../resources/editorials/client/Client.js";
|
|
@@ -22,10 +23,11 @@ export declare namespace CustomerClient {
|
|
|
22
23
|
export declare class CustomerClient {
|
|
23
24
|
protected readonly _options: NormalizedClientOptionsWithAuth<CustomerClient.Options>;
|
|
24
25
|
protected _auth: AuthClient | undefined;
|
|
26
|
+
protected _businessSubmissions: BusinessSubmissionsClient | undefined;
|
|
25
27
|
protected _businesses: BusinessesClient | undefined;
|
|
26
28
|
protected _cart: CartClient | undefined;
|
|
27
|
-
protected _explore: ExploreClient | undefined;
|
|
28
29
|
protected _discovery: DiscoveryClient | undefined;
|
|
30
|
+
protected _explore: ExploreClient | undefined;
|
|
29
31
|
protected _editorials: EditorialsClient | undefined;
|
|
30
32
|
protected _events: EventsClient | undefined;
|
|
31
33
|
protected _messaging: MessagingClient | undefined;
|
|
@@ -35,10 +37,11 @@ export declare class CustomerClient {
|
|
|
35
37
|
protected _shop: ShopClient | undefined;
|
|
36
38
|
constructor(options?: CustomerClient.Options);
|
|
37
39
|
get auth(): AuthClient;
|
|
40
|
+
get businessSubmissions(): BusinessSubmissionsClient;
|
|
38
41
|
get businesses(): BusinessesClient;
|
|
39
42
|
get cart(): CartClient;
|
|
40
|
-
get explore(): ExploreClient;
|
|
41
43
|
get discovery(): DiscoveryClient;
|
|
44
|
+
get explore(): ExploreClient;
|
|
42
45
|
get editorials(): EditorialsClient;
|
|
43
46
|
get events(): EventsClient;
|
|
44
47
|
get messaging(): MessagingClient;
|
|
@@ -54,16 +54,17 @@ const errors = __importStar(require("../../../../errors/index.js"));
|
|
|
54
54
|
const FiveOneEat = __importStar(require("../../../index.js"));
|
|
55
55
|
const Client_js_1 = require("../resources/auth/client/Client.js");
|
|
56
56
|
const Client_js_2 = require("../resources/businesses/client/Client.js");
|
|
57
|
-
const Client_js_3 = require("../resources/
|
|
58
|
-
const Client_js_4 = require("../resources/
|
|
59
|
-
const Client_js_5 = require("../resources/
|
|
60
|
-
const Client_js_6 = require("../resources/
|
|
61
|
-
const Client_js_7 = require("../resources/
|
|
62
|
-
const Client_js_8 = require("../resources/
|
|
63
|
-
const Client_js_9 = require("../resources/
|
|
64
|
-
const Client_js_10 = require("../resources/
|
|
65
|
-
const Client_js_11 = require("../resources/
|
|
66
|
-
const Client_js_12 = require("../resources/
|
|
57
|
+
const Client_js_3 = require("../resources/businessSubmissions/client/Client.js");
|
|
58
|
+
const Client_js_4 = require("../resources/cart/client/Client.js");
|
|
59
|
+
const Client_js_5 = require("../resources/discovery/client/Client.js");
|
|
60
|
+
const Client_js_6 = require("../resources/editorials/client/Client.js");
|
|
61
|
+
const Client_js_7 = require("../resources/events/client/Client.js");
|
|
62
|
+
const Client_js_8 = require("../resources/explore/client/Client.js");
|
|
63
|
+
const Client_js_9 = require("../resources/me/client/Client.js");
|
|
64
|
+
const Client_js_10 = require("../resources/messaging/client/Client.js");
|
|
65
|
+
const Client_js_11 = require("../resources/productOrders/client/Client.js");
|
|
66
|
+
const Client_js_12 = require("../resources/pushNotifications/client/Client.js");
|
|
67
|
+
const Client_js_13 = require("../resources/shop/client/Client.js");
|
|
67
68
|
class CustomerClient {
|
|
68
69
|
constructor(options = {}) {
|
|
69
70
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
@@ -72,49 +73,53 @@ class CustomerClient {
|
|
|
72
73
|
var _a;
|
|
73
74
|
return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_1.AuthClient(this._options)));
|
|
74
75
|
}
|
|
76
|
+
get businessSubmissions() {
|
|
77
|
+
var _a;
|
|
78
|
+
return ((_a = this._businessSubmissions) !== null && _a !== void 0 ? _a : (this._businessSubmissions = new Client_js_3.BusinessSubmissionsClient(this._options)));
|
|
79
|
+
}
|
|
75
80
|
get businesses() {
|
|
76
81
|
var _a;
|
|
77
82
|
return ((_a = this._businesses) !== null && _a !== void 0 ? _a : (this._businesses = new Client_js_2.BusinessesClient(this._options)));
|
|
78
83
|
}
|
|
79
84
|
get cart() {
|
|
80
85
|
var _a;
|
|
81
|
-
return ((_a = this._cart) !== null && _a !== void 0 ? _a : (this._cart = new
|
|
86
|
+
return ((_a = this._cart) !== null && _a !== void 0 ? _a : (this._cart = new Client_js_4.CartClient(this._options)));
|
|
82
87
|
}
|
|
83
|
-
get
|
|
88
|
+
get discovery() {
|
|
84
89
|
var _a;
|
|
85
|
-
return ((_a = this.
|
|
90
|
+
return ((_a = this._discovery) !== null && _a !== void 0 ? _a : (this._discovery = new Client_js_5.DiscoveryClient(this._options)));
|
|
86
91
|
}
|
|
87
|
-
get
|
|
92
|
+
get explore() {
|
|
88
93
|
var _a;
|
|
89
|
-
return ((_a = this.
|
|
94
|
+
return ((_a = this._explore) !== null && _a !== void 0 ? _a : (this._explore = new Client_js_8.ExploreClient(this._options)));
|
|
90
95
|
}
|
|
91
96
|
get editorials() {
|
|
92
97
|
var _a;
|
|
93
|
-
return ((_a = this._editorials) !== null && _a !== void 0 ? _a : (this._editorials = new
|
|
98
|
+
return ((_a = this._editorials) !== null && _a !== void 0 ? _a : (this._editorials = new Client_js_6.EditorialsClient(this._options)));
|
|
94
99
|
}
|
|
95
100
|
get events() {
|
|
96
101
|
var _a;
|
|
97
|
-
return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new
|
|
102
|
+
return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_js_7.EventsClient(this._options)));
|
|
98
103
|
}
|
|
99
104
|
get messaging() {
|
|
100
105
|
var _a;
|
|
101
|
-
return ((_a = this._messaging) !== null && _a !== void 0 ? _a : (this._messaging = new
|
|
106
|
+
return ((_a = this._messaging) !== null && _a !== void 0 ? _a : (this._messaging = new Client_js_10.MessagingClient(this._options)));
|
|
102
107
|
}
|
|
103
108
|
get me() {
|
|
104
109
|
var _a;
|
|
105
|
-
return ((_a = this._me) !== null && _a !== void 0 ? _a : (this._me = new
|
|
110
|
+
return ((_a = this._me) !== null && _a !== void 0 ? _a : (this._me = new Client_js_9.MeClient(this._options)));
|
|
106
111
|
}
|
|
107
112
|
get productOrders() {
|
|
108
113
|
var _a;
|
|
109
|
-
return ((_a = this._productOrders) !== null && _a !== void 0 ? _a : (this._productOrders = new
|
|
114
|
+
return ((_a = this._productOrders) !== null && _a !== void 0 ? _a : (this._productOrders = new Client_js_11.ProductOrdersClient(this._options)));
|
|
110
115
|
}
|
|
111
116
|
get pushNotifications() {
|
|
112
117
|
var _a;
|
|
113
|
-
return ((_a = this._pushNotifications) !== null && _a !== void 0 ? _a : (this._pushNotifications = new
|
|
118
|
+
return ((_a = this._pushNotifications) !== null && _a !== void 0 ? _a : (this._pushNotifications = new Client_js_12.PushNotificationsClient(this._options)));
|
|
114
119
|
}
|
|
115
120
|
get shop() {
|
|
116
121
|
var _a;
|
|
117
|
-
return ((_a = this._shop) !== null && _a !== void 0 ? _a : (this._shop = new
|
|
122
|
+
return ((_a = this._shop) !== null && _a !== void 0 ? _a : (this._shop = new Client_js_13.ShopClient(this._options)));
|
|
118
123
|
}
|
|
119
124
|
/**
|
|
120
125
|
* Returns grouped results for each type. Use per_type to control how many results
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
import { PhotosClient } from "../resources/photos/client/Client.js";
|
|
6
|
+
export declare namespace BusinessSubmissionsClient {
|
|
7
|
+
type Options = BaseClientOptions;
|
|
8
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export declare class BusinessSubmissionsClient {
|
|
12
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<BusinessSubmissionsClient.Options>;
|
|
13
|
+
protected _photos: PhotosClient | undefined;
|
|
14
|
+
constructor(options?: BusinessSubmissionsClient.Options);
|
|
15
|
+
get photos(): PhotosClient;
|
|
16
|
+
/**
|
|
17
|
+
* @param {BusinessSubmissionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* await client.customer.businessSubmissions.list()
|
|
23
|
+
*/
|
|
24
|
+
list(requestOptions?: BusinessSubmissionsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.ListBusinessSubmissionsResponse>;
|
|
25
|
+
private __list;
|
|
26
|
+
/**
|
|
27
|
+
* @param {FiveOneEat.customer.StoreBusinessSubmissionRequest} request
|
|
28
|
+
* @param {BusinessSubmissionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
|
+
*
|
|
30
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
31
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* await client.customer.businessSubmissions.create({
|
|
35
|
+
* name: "name",
|
|
36
|
+
* address: "address",
|
|
37
|
+
* city: "city",
|
|
38
|
+
* state: "state",
|
|
39
|
+
* zipcode: "zipcode",
|
|
40
|
+
* country: "country",
|
|
41
|
+
* latitude: 1.1,
|
|
42
|
+
* longitude: 1.1
|
|
43
|
+
* })
|
|
44
|
+
*/
|
|
45
|
+
create(request: FiveOneEat.customer.StoreBusinessSubmissionRequest, requestOptions?: BusinessSubmissionsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.CreateBusinessSubmissionsResponse>;
|
|
46
|
+
private __create;
|
|
47
|
+
/**
|
|
48
|
+
* @param {FiveOneEat.customer.GetBusinessSubmissionsRequest} request
|
|
49
|
+
* @param {BusinessSubmissionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
50
|
+
*
|
|
51
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
52
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
53
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* await client.customer.businessSubmissions.get({
|
|
57
|
+
* business: "business"
|
|
58
|
+
* })
|
|
59
|
+
*/
|
|
60
|
+
get(request: FiveOneEat.customer.GetBusinessSubmissionsRequest, requestOptions?: BusinessSubmissionsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.GetBusinessSubmissionsResponse>;
|
|
61
|
+
private __get;
|
|
62
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
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.BusinessSubmissionsClient = 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
|
+
const Client_js_1 = require("../resources/photos/client/Client.js");
|
|
55
|
+
class BusinessSubmissionsClient {
|
|
56
|
+
constructor(options = {}) {
|
|
57
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
58
|
+
}
|
|
59
|
+
get photos() {
|
|
60
|
+
var _a;
|
|
61
|
+
return ((_a = this._photos) !== null && _a !== void 0 ? _a : (this._photos = new Client_js_1.PhotosClient(this._options)));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @param {BusinessSubmissionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await client.customer.businessSubmissions.list()
|
|
70
|
+
*/
|
|
71
|
+
list(requestOptions) {
|
|
72
|
+
return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
|
|
73
|
+
}
|
|
74
|
+
__list(requestOptions) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
77
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
78
|
+
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);
|
|
79
|
+
const _response = yield core.fetcher({
|
|
80
|
+
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, "customer/business-submissions"),
|
|
81
|
+
method: "GET",
|
|
82
|
+
headers: _headers,
|
|
83
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
84
|
+
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,
|
|
85
|
+
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,
|
|
86
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
87
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
88
|
+
logging: this._options.logging,
|
|
89
|
+
});
|
|
90
|
+
if (_response.ok) {
|
|
91
|
+
return {
|
|
92
|
+
data: _response.body,
|
|
93
|
+
rawResponse: _response.rawResponse,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
if (_response.error.reason === "status-code") {
|
|
97
|
+
switch (_response.error.statusCode) {
|
|
98
|
+
case 401:
|
|
99
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
100
|
+
default:
|
|
101
|
+
throw new errors.FiveOneEatError({
|
|
102
|
+
statusCode: _response.error.statusCode,
|
|
103
|
+
body: _response.error.body,
|
|
104
|
+
rawResponse: _response.rawResponse,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/business-submissions");
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @param {FiveOneEat.customer.StoreBusinessSubmissionRequest} request
|
|
113
|
+
* @param {BusinessSubmissionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
|
+
*
|
|
115
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
116
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* await client.customer.businessSubmissions.create({
|
|
120
|
+
* name: "name",
|
|
121
|
+
* address: "address",
|
|
122
|
+
* city: "city",
|
|
123
|
+
* state: "state",
|
|
124
|
+
* zipcode: "zipcode",
|
|
125
|
+
* country: "country",
|
|
126
|
+
* latitude: 1.1,
|
|
127
|
+
* longitude: 1.1
|
|
128
|
+
* })
|
|
129
|
+
*/
|
|
130
|
+
create(request, requestOptions) {
|
|
131
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
132
|
+
}
|
|
133
|
+
__create(request, requestOptions) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
136
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
137
|
+
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);
|
|
138
|
+
const _response = yield core.fetcher({
|
|
139
|
+
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, "customer/business-submissions"),
|
|
140
|
+
method: "POST",
|
|
141
|
+
headers: _headers,
|
|
142
|
+
contentType: "application/json",
|
|
143
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
144
|
+
requestType: "json",
|
|
145
|
+
body: request,
|
|
146
|
+
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,
|
|
147
|
+
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,
|
|
148
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
149
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
150
|
+
logging: this._options.logging,
|
|
151
|
+
});
|
|
152
|
+
if (_response.ok) {
|
|
153
|
+
return {
|
|
154
|
+
data: _response.body,
|
|
155
|
+
rawResponse: _response.rawResponse,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
if (_response.error.reason === "status-code") {
|
|
159
|
+
switch (_response.error.statusCode) {
|
|
160
|
+
case 401:
|
|
161
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
162
|
+
case 422:
|
|
163
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
164
|
+
default:
|
|
165
|
+
throw new errors.FiveOneEatError({
|
|
166
|
+
statusCode: _response.error.statusCode,
|
|
167
|
+
body: _response.error.body,
|
|
168
|
+
rawResponse: _response.rawResponse,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/business-submissions");
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* @param {FiveOneEat.customer.GetBusinessSubmissionsRequest} request
|
|
177
|
+
* @param {BusinessSubmissionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
178
|
+
*
|
|
179
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
180
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
181
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* await client.customer.businessSubmissions.get({
|
|
185
|
+
* business: "business"
|
|
186
|
+
* })
|
|
187
|
+
*/
|
|
188
|
+
get(request, requestOptions) {
|
|
189
|
+
return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
|
|
190
|
+
}
|
|
191
|
+
__get(request, requestOptions) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
194
|
+
const { business } = request;
|
|
195
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
196
|
+
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);
|
|
197
|
+
const _response = yield core.fetcher({
|
|
198
|
+
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, `customer/business-submissions/${core.url.encodePathParam(business)}`),
|
|
199
|
+
method: "GET",
|
|
200
|
+
headers: _headers,
|
|
201
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
202
|
+
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,
|
|
203
|
+
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,
|
|
204
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
205
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
206
|
+
logging: this._options.logging,
|
|
207
|
+
});
|
|
208
|
+
if (_response.ok) {
|
|
209
|
+
return {
|
|
210
|
+
data: _response.body,
|
|
211
|
+
rawResponse: _response.rawResponse,
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
if (_response.error.reason === "status-code") {
|
|
215
|
+
switch (_response.error.statusCode) {
|
|
216
|
+
case 401:
|
|
217
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
218
|
+
case 403:
|
|
219
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
220
|
+
case 404:
|
|
221
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
222
|
+
default:
|
|
223
|
+
throw new errors.FiveOneEatError({
|
|
224
|
+
statusCode: _response.error.statusCode,
|
|
225
|
+
body: _response.error.body,
|
|
226
|
+
rawResponse: _response.rawResponse,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/business-submissions/{business}");
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
exports.BusinessSubmissionsClient = BusinessSubmissionsClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.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("./requests/index.js"), exports);
|