@51eat/sdk 0.0.58 → 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/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/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 -100
|
@@ -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("./CreateBusinessSubmissionsResponse.js"), exports);
|
|
18
|
+
__exportStar(require("./GetBusinessSubmissionsResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./ListBusinessSubmissionsResponse.js"), exports);
|
|
@@ -4,6 +4,9 @@ export * from "./auth/types/index.js";
|
|
|
4
4
|
export * from "./businesses/client/requests/index.js";
|
|
5
5
|
export * as businesses from "./businesses/index.js";
|
|
6
6
|
export * from "./businesses/types/index.js";
|
|
7
|
+
export * from "./businessSubmissions/client/requests/index.js";
|
|
8
|
+
export * as businessSubmissions from "./businessSubmissions/index.js";
|
|
9
|
+
export * from "./businessSubmissions/types/index.js";
|
|
7
10
|
export * from "./cart/client/requests/index.js";
|
|
8
11
|
export * as cart from "./cart/index.js";
|
|
9
12
|
export * from "./cart/types/index.js";
|
|
@@ -36,13 +36,16 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.shop = exports.pushNotifications = exports.productOrders = exports.messaging = exports.me = exports.explore = exports.events = exports.editorials = exports.discovery = exports.cart = exports.businesses = exports.auth = void 0;
|
|
39
|
+
exports.shop = exports.pushNotifications = exports.productOrders = exports.messaging = exports.me = exports.explore = exports.events = exports.editorials = exports.discovery = exports.cart = exports.businessSubmissions = exports.businesses = exports.auth = void 0;
|
|
40
40
|
__exportStar(require("./auth/client/requests/index.js"), exports);
|
|
41
41
|
exports.auth = __importStar(require("./auth/index.js"));
|
|
42
42
|
__exportStar(require("./auth/types/index.js"), exports);
|
|
43
43
|
__exportStar(require("./businesses/client/requests/index.js"), exports);
|
|
44
44
|
exports.businesses = __importStar(require("./businesses/index.js"));
|
|
45
45
|
__exportStar(require("./businesses/types/index.js"), exports);
|
|
46
|
+
__exportStar(require("./businessSubmissions/client/requests/index.js"), exports);
|
|
47
|
+
exports.businessSubmissions = __importStar(require("./businessSubmissions/index.js"));
|
|
48
|
+
__exportStar(require("./businessSubmissions/types/index.js"), exports);
|
|
46
49
|
__exportStar(require("./cart/client/requests/index.js"), exports);
|
|
47
50
|
exports.cart = __importStar(require("./cart/index.js"));
|
|
48
51
|
__exportStar(require("./cart/types/index.js"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface CustomerBusinessSubmission {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
address: string;
|
|
5
|
+
city: string;
|
|
6
|
+
state: string;
|
|
7
|
+
zipcode: string;
|
|
8
|
+
country: string;
|
|
9
|
+
latitude: string;
|
|
10
|
+
longitude: string;
|
|
11
|
+
phone: string;
|
|
12
|
+
website: string;
|
|
13
|
+
description: string;
|
|
14
|
+
status: string;
|
|
15
|
+
source: string;
|
|
16
|
+
rejected_reason: string;
|
|
17
|
+
submitted_at: string;
|
|
18
|
+
photos?: string | undefined;
|
|
19
|
+
}
|
|
@@ -29,6 +29,7 @@ export * from "./BusinessBulletinCommentReply.js";
|
|
|
29
29
|
export * from "./BusinessBulletinCommentResponse.js";
|
|
30
30
|
export * from "./BusinessCategory.js";
|
|
31
31
|
export * from "./BusinessCertification.js";
|
|
32
|
+
export * from "./BusinessClaimRequest.js";
|
|
32
33
|
export * from "./BusinessConversation.js";
|
|
33
34
|
export * from "./BusinessCuisine.js";
|
|
34
35
|
export * from "./BusinessDiscount.js";
|
|
@@ -64,6 +65,7 @@ export * from "./BusinessStripeConnection.js";
|
|
|
64
65
|
export * from "./BusinessSummary.js";
|
|
65
66
|
export * from "./BusinessTemporaryLocation.js";
|
|
66
67
|
export * from "./BusinessToken.js";
|
|
68
|
+
export * from "./ClaimableBusiness.js";
|
|
67
69
|
export * from "./ConflictErrorBody.js";
|
|
68
70
|
export * from "./Conversation.js";
|
|
69
71
|
export * from "./Cuisine.js";
|
|
@@ -71,6 +73,7 @@ export * from "./CustomerBulletin.js";
|
|
|
71
73
|
export * from "./CustomerBulletinCommentReply.js";
|
|
72
74
|
export * from "./CustomerBulletinResponse.js";
|
|
73
75
|
export * from "./CustomerBusinessProfile.js";
|
|
76
|
+
export * from "./CustomerBusinessSubmission.js";
|
|
74
77
|
export * from "./CustomerCart.js";
|
|
75
78
|
export * from "./CustomerCartItem.js";
|
|
76
79
|
export * from "./CustomerComment.js";
|
|
@@ -45,6 +45,7 @@ __exportStar(require("./BusinessBulletinCommentReply.js"), exports);
|
|
|
45
45
|
__exportStar(require("./BusinessBulletinCommentResponse.js"), exports);
|
|
46
46
|
__exportStar(require("./BusinessCategory.js"), exports);
|
|
47
47
|
__exportStar(require("./BusinessCertification.js"), exports);
|
|
48
|
+
__exportStar(require("./BusinessClaimRequest.js"), exports);
|
|
48
49
|
__exportStar(require("./BusinessConversation.js"), exports);
|
|
49
50
|
__exportStar(require("./BusinessCuisine.js"), exports);
|
|
50
51
|
__exportStar(require("./BusinessDiscount.js"), exports);
|
|
@@ -80,6 +81,7 @@ __exportStar(require("./BusinessStripeConnection.js"), exports);
|
|
|
80
81
|
__exportStar(require("./BusinessSummary.js"), exports);
|
|
81
82
|
__exportStar(require("./BusinessTemporaryLocation.js"), exports);
|
|
82
83
|
__exportStar(require("./BusinessToken.js"), exports);
|
|
84
|
+
__exportStar(require("./ClaimableBusiness.js"), exports);
|
|
83
85
|
__exportStar(require("./ConflictErrorBody.js"), exports);
|
|
84
86
|
__exportStar(require("./Conversation.js"), exports);
|
|
85
87
|
__exportStar(require("./Cuisine.js"), exports);
|
|
@@ -87,6 +89,7 @@ __exportStar(require("./CustomerBulletin.js"), exports);
|
|
|
87
89
|
__exportStar(require("./CustomerBulletinCommentReply.js"), exports);
|
|
88
90
|
__exportStar(require("./CustomerBulletinResponse.js"), exports);
|
|
89
91
|
__exportStar(require("./CustomerBusinessProfile.js"), exports);
|
|
92
|
+
__exportStar(require("./CustomerBusinessSubmission.js"), exports);
|
|
90
93
|
__exportStar(require("./CustomerCart.js"), exports);
|
|
91
94
|
__exportStar(require("./CustomerCartItem.js"), exports);
|
|
92
95
|
__exportStar(require("./CustomerComment.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.59";
|
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.59",
|
|
10
|
+
"User-Agent": "@51eat/sdk/0.0.59",
|
|
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);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type * as core from "../../core/index.mjs";
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import type * as FiveOneEat from "../index.mjs";
|
|
4
3
|
export declare class ConflictError extends errors.FiveOneEatError {
|
|
5
|
-
constructor(body
|
|
4
|
+
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type * as core from "../../core/index.mjs";
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import type * as FiveOneEat from "../index.mjs";
|
|
4
3
|
export declare class InternalServerError extends errors.FiveOneEatError {
|
|
5
|
-
constructor(body
|
|
4
|
+
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
6
5
|
}
|
|
@@ -6,6 +6,7 @@ import { BulletinsClient } from "../resources/bulletins/client/Client.mjs";
|
|
|
6
6
|
import { BusinessesClient } from "../resources/businesses/client/Client.mjs";
|
|
7
7
|
import { CategoriesClient } from "../resources/categories/client/Client.mjs";
|
|
8
8
|
import { CertificationsClient } from "../resources/certifications/client/Client.mjs";
|
|
9
|
+
import { ClaimsClient } from "../resources/claims/client/Client.mjs";
|
|
9
10
|
import { CuisinesClient } from "../resources/cuisines/client/Client.mjs";
|
|
10
11
|
import { DiscountsClient } from "../resources/discounts/client/Client.mjs";
|
|
11
12
|
import { EventsClient } from "../resources/events/client/Client.mjs";
|
|
@@ -27,6 +28,7 @@ export declare class BusinessClient {
|
|
|
27
28
|
protected _auth: AuthClient | undefined;
|
|
28
29
|
protected _bulletins: BulletinsClient | undefined;
|
|
29
30
|
protected _businesses: BusinessesClient | undefined;
|
|
31
|
+
protected _claims: ClaimsClient | undefined;
|
|
30
32
|
protected _discounts: DiscountsClient | undefined;
|
|
31
33
|
protected _events: EventsClient | undefined;
|
|
32
34
|
protected _gallery: GalleryClient | undefined;
|
|
@@ -47,6 +49,7 @@ export declare class BusinessClient {
|
|
|
47
49
|
get auth(): AuthClient;
|
|
48
50
|
get bulletins(): BulletinsClient;
|
|
49
51
|
get businesses(): BusinessesClient;
|
|
52
|
+
get claims(): ClaimsClient;
|
|
50
53
|
get discounts(): DiscountsClient;
|
|
51
54
|
get events(): EventsClient;
|
|
52
55
|
get gallery(): GalleryClient;
|
|
@@ -6,6 +6,7 @@ import { BulletinsClient } from "../resources/bulletins/client/Client.mjs";
|
|
|
6
6
|
import { BusinessesClient } from "../resources/businesses/client/Client.mjs";
|
|
7
7
|
import { CategoriesClient } from "../resources/categories/client/Client.mjs";
|
|
8
8
|
import { CertificationsClient } from "../resources/certifications/client/Client.mjs";
|
|
9
|
+
import { ClaimsClient } from "../resources/claims/client/Client.mjs";
|
|
9
10
|
import { CuisinesClient } from "../resources/cuisines/client/Client.mjs";
|
|
10
11
|
import { DiscountsClient } from "../resources/discounts/client/Client.mjs";
|
|
11
12
|
import { EventsClient } from "../resources/events/client/Client.mjs";
|
|
@@ -35,6 +36,10 @@ export class BusinessClient {
|
|
|
35
36
|
var _a;
|
|
36
37
|
return ((_a = this._businesses) !== null && _a !== void 0 ? _a : (this._businesses = new BusinessesClient(this._options)));
|
|
37
38
|
}
|
|
39
|
+
get claims() {
|
|
40
|
+
var _a;
|
|
41
|
+
return ((_a = this._claims) !== null && _a !== void 0 ? _a : (this._claims = new ClaimsClient(this._options)));
|
|
42
|
+
}
|
|
38
43
|
get discounts() {
|
|
39
44
|
var _a;
|
|
40
45
|
return ((_a = this._discounts) !== null && _a !== void 0 ? _a : (this._discounts = new DiscountsClient(this._options)));
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
4
|
+
import * as FiveOneEat from "../../../../../index.mjs";
|
|
5
|
+
export declare namespace ClaimsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class ClaimsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ClaimsClient.Options>;
|
|
12
|
+
constructor(options?: ClaimsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* @param {FiveOneEat.business.ListClaimableBusinessesClaimsRequest} request
|
|
15
|
+
* @param {ClaimsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
|
+
*
|
|
17
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* await client.business.claims.listClaimableBusinesses()
|
|
21
|
+
*/
|
|
22
|
+
listClaimableBusinesses(request?: FiveOneEat.business.ListClaimableBusinessesClaimsRequest, requestOptions?: ClaimsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListClaimableBusinessesClaimsResponse>;
|
|
23
|
+
private __listClaimableBusinesses;
|
|
24
|
+
/**
|
|
25
|
+
* @param {ClaimsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
|
+
*
|
|
27
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* await client.business.claims.listClaimRequests()
|
|
31
|
+
*/
|
|
32
|
+
listClaimRequests(requestOptions?: ClaimsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListClaimRequestsClaimsResponse>;
|
|
33
|
+
private __listClaimRequests;
|
|
34
|
+
/**
|
|
35
|
+
* @param {FiveOneEat.business.StoreClaimRequestRequest} request
|
|
36
|
+
* @param {ClaimsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
+
*
|
|
38
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
39
|
+
* @throws {@link FiveOneEat.ConflictError}
|
|
40
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await client.business.claims.requestClaim({
|
|
44
|
+
* business_id: "business_id",
|
|
45
|
+
* message: "message"
|
|
46
|
+
* })
|
|
47
|
+
*/
|
|
48
|
+
requestClaim(request: FiveOneEat.business.StoreClaimRequestRequest, requestOptions?: ClaimsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.RequestClaimClaimsResponse>;
|
|
49
|
+
private __requestClaim;
|
|
50
|
+
/**
|
|
51
|
+
* @param {FiveOneEat.business.ClaimViaTokenClaimsRequest} request
|
|
52
|
+
* @param {ClaimsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await client.business.claims.claimViaToken({
|
|
58
|
+
* token: "token"
|
|
59
|
+
* })
|
|
60
|
+
*/
|
|
61
|
+
claimViaToken(request: FiveOneEat.business.ClaimViaTokenClaimsRequest, requestOptions?: ClaimsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ClaimViaTokenClaimsResponse>;
|
|
62
|
+
private __claimViaToken;
|
|
63
|
+
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
14
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
import * as FiveOneEat from "../../../../../index.mjs";
|
|
18
|
+
export class ClaimsClient {
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @param {FiveOneEat.business.ListClaimableBusinessesClaimsRequest} request
|
|
24
|
+
* @param {ClaimsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
|
+
*
|
|
26
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* await client.business.claims.listClaimableBusinesses()
|
|
30
|
+
*/
|
|
31
|
+
listClaimableBusinesses(request = {}, requestOptions) {
|
|
32
|
+
return core.HttpResponsePromise.fromPromise(this.__listClaimableBusinesses(request, requestOptions));
|
|
33
|
+
}
|
|
34
|
+
__listClaimableBusinesses() {
|
|
35
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
36
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
37
|
+
const { q, lat, lng, radius } = request;
|
|
38
|
+
const _queryParams = {
|
|
39
|
+
q,
|
|
40
|
+
lat,
|
|
41
|
+
lng,
|
|
42
|
+
radius,
|
|
43
|
+
};
|
|
44
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
45
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
46
|
+
const _response = yield core.fetcher({
|
|
47
|
+
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/claimable-businesses"),
|
|
48
|
+
method: "GET",
|
|
49
|
+
headers: _headers,
|
|
50
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
51
|
+
queryString: core.url
|
|
52
|
+
.queryBuilder()
|
|
53
|
+
.addMany(_queryParams)
|
|
54
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
55
|
+
.build(),
|
|
56
|
+
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,
|
|
57
|
+
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,
|
|
58
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
59
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
60
|
+
logging: this._options.logging,
|
|
61
|
+
});
|
|
62
|
+
if (_response.ok) {
|
|
63
|
+
return {
|
|
64
|
+
data: _response.body,
|
|
65
|
+
rawResponse: _response.rawResponse,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (_response.error.reason === "status-code") {
|
|
69
|
+
switch (_response.error.statusCode) {
|
|
70
|
+
case 401:
|
|
71
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
72
|
+
default:
|
|
73
|
+
throw new errors.FiveOneEatError({
|
|
74
|
+
statusCode: _response.error.statusCode,
|
|
75
|
+
body: _response.error.body,
|
|
76
|
+
rawResponse: _response.rawResponse,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/claimable-businesses");
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* @param {ClaimsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
85
|
+
*
|
|
86
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* await client.business.claims.listClaimRequests()
|
|
90
|
+
*/
|
|
91
|
+
listClaimRequests(requestOptions) {
|
|
92
|
+
return core.HttpResponsePromise.fromPromise(this.__listClaimRequests(requestOptions));
|
|
93
|
+
}
|
|
94
|
+
__listClaimRequests(requestOptions) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
97
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
98
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
99
|
+
const _response = yield core.fetcher({
|
|
100
|
+
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/claim-requests"),
|
|
101
|
+
method: "GET",
|
|
102
|
+
headers: _headers,
|
|
103
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
104
|
+
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,
|
|
105
|
+
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,
|
|
106
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
107
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
108
|
+
logging: this._options.logging,
|
|
109
|
+
});
|
|
110
|
+
if (_response.ok) {
|
|
111
|
+
return {
|
|
112
|
+
data: _response.body,
|
|
113
|
+
rawResponse: _response.rawResponse,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
if (_response.error.reason === "status-code") {
|
|
117
|
+
switch (_response.error.statusCode) {
|
|
118
|
+
case 401:
|
|
119
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
120
|
+
default:
|
|
121
|
+
throw new errors.FiveOneEatError({
|
|
122
|
+
statusCode: _response.error.statusCode,
|
|
123
|
+
body: _response.error.body,
|
|
124
|
+
rawResponse: _response.rawResponse,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/claim-requests");
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* @param {FiveOneEat.business.StoreClaimRequestRequest} request
|
|
133
|
+
* @param {ClaimsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
134
|
+
*
|
|
135
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
136
|
+
* @throws {@link FiveOneEat.ConflictError}
|
|
137
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* await client.business.claims.requestClaim({
|
|
141
|
+
* business_id: "business_id",
|
|
142
|
+
* message: "message"
|
|
143
|
+
* })
|
|
144
|
+
*/
|
|
145
|
+
requestClaim(request, requestOptions) {
|
|
146
|
+
return core.HttpResponsePromise.fromPromise(this.__requestClaim(request, requestOptions));
|
|
147
|
+
}
|
|
148
|
+
__requestClaim(request, requestOptions) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
151
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
152
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
153
|
+
const _response = yield core.fetcher({
|
|
154
|
+
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/claim-requests"),
|
|
155
|
+
method: "POST",
|
|
156
|
+
headers: _headers,
|
|
157
|
+
contentType: "application/json",
|
|
158
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
159
|
+
requestType: "json",
|
|
160
|
+
body: request,
|
|
161
|
+
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,
|
|
162
|
+
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,
|
|
163
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
164
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
165
|
+
logging: this._options.logging,
|
|
166
|
+
});
|
|
167
|
+
if (_response.ok) {
|
|
168
|
+
return {
|
|
169
|
+
data: _response.body,
|
|
170
|
+
rawResponse: _response.rawResponse,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
if (_response.error.reason === "status-code") {
|
|
174
|
+
switch (_response.error.statusCode) {
|
|
175
|
+
case 401:
|
|
176
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
177
|
+
case 409:
|
|
178
|
+
throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
|
|
179
|
+
case 422:
|
|
180
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
181
|
+
default:
|
|
182
|
+
throw new errors.FiveOneEatError({
|
|
183
|
+
statusCode: _response.error.statusCode,
|
|
184
|
+
body: _response.error.body,
|
|
185
|
+
rawResponse: _response.rawResponse,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/business/claim-requests");
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* @param {FiveOneEat.business.ClaimViaTokenClaimsRequest} request
|
|
194
|
+
* @param {ClaimsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
195
|
+
*
|
|
196
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* await client.business.claims.claimViaToken({
|
|
200
|
+
* token: "token"
|
|
201
|
+
* })
|
|
202
|
+
*/
|
|
203
|
+
claimViaToken(request, requestOptions) {
|
|
204
|
+
return core.HttpResponsePromise.fromPromise(this.__claimViaToken(request, requestOptions));
|
|
205
|
+
}
|
|
206
|
+
__claimViaToken(request, requestOptions) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
209
|
+
const { token } = request;
|
|
210
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
211
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
212
|
+
const _response = yield core.fetcher({
|
|
213
|
+
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/claim-token/${core.url.encodePathParam(token)}`),
|
|
214
|
+
method: "POST",
|
|
215
|
+
headers: _headers,
|
|
216
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
217
|
+
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,
|
|
218
|
+
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,
|
|
219
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
220
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
221
|
+
logging: this._options.logging,
|
|
222
|
+
});
|
|
223
|
+
if (_response.ok) {
|
|
224
|
+
return {
|
|
225
|
+
data: _response.body,
|
|
226
|
+
rawResponse: _response.rawResponse,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
if (_response.error.reason === "status-code") {
|
|
230
|
+
switch (_response.error.statusCode) {
|
|
231
|
+
case 401:
|
|
232
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
233
|
+
default:
|
|
234
|
+
throw new errors.FiveOneEatError({
|
|
235
|
+
statusCode: _response.error.statusCode,
|
|
236
|
+
body: _response.error.body,
|
|
237
|
+
rawResponse: _response.rawResponse,
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/business/claim-token/{token}");
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {}
|
|
4
|
+
*/
|
|
5
|
+
export interface ListClaimableBusinessesClaimsRequest {
|
|
6
|
+
/** Name search */
|
|
7
|
+
q?: string;
|
|
8
|
+
/** Center latitude */
|
|
9
|
+
lat?: string;
|
|
10
|
+
/** Center longitude */
|
|
11
|
+
lng?: string;
|
|
12
|
+
/** Radius in kilometers (default 25) */
|
|
13
|
+
radius?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|