@gofynd/fdk-client-javascript 1.4.15-beta.3 → 1.4.15-beta.5
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/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +48 -68
- package/sdk/application/Cart/CartApplicationClient.js +304 -114
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +58 -59
- package/sdk/application/Catalog/CatalogApplicationClient.js +437 -30
- package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
- package/sdk/application/Common/CommonApplicationClient.js +22 -1
- package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +20 -20
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +157 -10
- package/sdk/application/Content/ContentApplicationClient.d.ts +30 -19
- package/sdk/application/Content/ContentApplicationClient.js +297 -28
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -8
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +50 -7
- package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationClient.js +74 -1
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +15 -35
- package/sdk/application/Logistic/LogisticApplicationClient.js +159 -87
- package/sdk/application/Order/OrderApplicationClient.d.ts +12 -22
- package/sdk/application/Order/OrderApplicationClient.js +195 -47
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
- package/sdk/application/Payment/PaymentApplicationClient.js +473 -46
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +75 -7
- package/sdk/application/Share/ShareApplicationClient.js +96 -0
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
- package/sdk/application/Theme/ThemeApplicationClient.js +66 -4
- package/sdk/application/User/UserApplicationClient.d.ts +10 -10
- package/sdk/application/User/UserApplicationClient.js +418 -6
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +16 -3
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +19 -116
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +14 -121
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +167 -1200
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +160 -571
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -121
- package/sdk/partner/OAuthClient.js +1 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
- package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +39 -135
- package/sdk/partner/Theme/ThemePartnerModel.js +38 -114
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
- package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
- package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +115 -419
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -118
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -109
- package/sdk/platform/Cart/CartPlatformModel.d.ts +1298 -5037
- package/sdk/platform/Cart/CartPlatformModel.js +1217 -1976
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -209
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +400 -457
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +142 -185
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +78 -96
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +117 -154
- package/sdk/platform/Catalog/CatalogPlatformClient.js +172 -292
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1647 -6385
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1680 -3217
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -72
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +24 -50
- package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
- package/sdk/platform/Common/CommonPlatformClient.js +2 -3
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +131 -283
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +97 -219
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -124
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +422 -449
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -179
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -168
- package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
- package/sdk/platform/Content/ContentPlatformClient.js +336 -523
- package/sdk/platform/Content/ContentPlatformModel.d.ts +395 -1241
- package/sdk/platform/Content/ContentPlatformModel.js +390 -521
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
- package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
- package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +36 -94
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +60 -462
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +101 -370
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +84 -313
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -17
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +7 -85
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +24 -95
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +19 -39
- package/sdk/platform/Order/OrderPlatformClient.d.ts +96 -153
- package/sdk/platform/Order/OrderPlatformClient.js +198 -416
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1286 -7619
- package/sdk/platform/Order/OrderPlatformModel.js +1265 -3922
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +109 -270
- package/sdk/platform/Order/OrderPlatformValidator.js +77 -135
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +105 -93
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +141 -129
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +319 -333
- package/sdk/platform/Payment/PaymentPlatformModel.js +278 -288
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +36 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +41 -132
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +14 -34
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +64 -58
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +612 -1845
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +554 -886
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +46 -42
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +28 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -36
- package/sdk/platform/Share/SharePlatformModel.js +4 -27
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +13 -76
- package/sdk/platform/Theme/ThemePlatformModel.js +17 -57
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
- package/sdk/platform/User/UserPlatformModel.js +23 -23
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
- package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +21 -6
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
- package/sdk/public/Content/ContentPublicClient.js +20 -791
- package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
- package/sdk/public/Content/ContentPublicModel.js +3 -649
- package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
- package/sdk/public/Content/ContentPublicValidator.js +2 -88
- package/sdk/public/Partner/PartnerPublicClient.js +15 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +48 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
- package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -105
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
const {
|
|
2
|
+
FDKClientValidationError,
|
|
3
|
+
FDKResponseValidationError,
|
|
4
|
+
} = require("../../common/FDKError");
|
|
5
|
+
|
|
1
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
7
|
const constructUrl = require("../constructUrl");
|
|
3
8
|
const Paginator = require("../../common/Paginator");
|
|
@@ -12,8 +17,6 @@ class Order {
|
|
|
12
17
|
"/service/application/order/v1.0/orders/shipments/{shipment_id}/invoice",
|
|
13
18
|
getOrderById: "/service/application/order/v1.0/orders/{order_id}",
|
|
14
19
|
getOrders: "/service/application/order/v1.0/orders",
|
|
15
|
-
getPosOrderById:
|
|
16
|
-
"/service/application/order/v1.0/orders/pos-order/{order_id}",
|
|
17
20
|
getShipmentBagReasons:
|
|
18
21
|
"/service/application/order/v1.0/orders/shipments/{shipment_id}/bags/{bag_id}/reasons",
|
|
19
22
|
getShipmentById:
|
|
@@ -48,7 +51,7 @@ class Order {
|
|
|
48
51
|
/**
|
|
49
52
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
50
53
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
51
|
-
* @returns {Promise<
|
|
54
|
+
* @returns {Promise<CustomerDetailsResponse>} - Success response
|
|
52
55
|
* @name getCustomerDetailsByShipmentId
|
|
53
56
|
* @summary: Get shipment's customer
|
|
54
57
|
* @description: Get customer details such as mobile number using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getCustomerDetailsByShipmentId/).
|
|
@@ -57,6 +60,27 @@ class Order {
|
|
|
57
60
|
{ orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
58
61
|
{ responseHeaders } = { responseHeaders: false }
|
|
59
62
|
) {
|
|
63
|
+
let invalidInput = [];
|
|
64
|
+
|
|
65
|
+
if (!orderId) {
|
|
66
|
+
invalidInput.push({
|
|
67
|
+
message: `The 'orderId' field is required.`,
|
|
68
|
+
path: ["orderId"],
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (!shipmentId) {
|
|
72
|
+
invalidInput.push({
|
|
73
|
+
message: `The 'shipmentId' field is required.`,
|
|
74
|
+
path: ["shipmentId"],
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (invalidInput.length) {
|
|
78
|
+
const error = new Error();
|
|
79
|
+
error.message = "Missing required field";
|
|
80
|
+
error.details = invalidInput;
|
|
81
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
82
|
+
}
|
|
83
|
+
|
|
60
84
|
const query_params = {};
|
|
61
85
|
|
|
62
86
|
const xHeaders = {};
|
|
@@ -94,6 +118,21 @@ class Order {
|
|
|
94
118
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
95
119
|
{ responseHeaders } = { responseHeaders: false }
|
|
96
120
|
) {
|
|
121
|
+
let invalidInput = [];
|
|
122
|
+
|
|
123
|
+
if (!shipmentId) {
|
|
124
|
+
invalidInput.push({
|
|
125
|
+
message: `The 'shipmentId' field is required.`,
|
|
126
|
+
path: ["shipmentId"],
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
if (invalidInput.length) {
|
|
130
|
+
const error = new Error();
|
|
131
|
+
error.message = "Missing required field";
|
|
132
|
+
error.details = invalidInput;
|
|
133
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
134
|
+
}
|
|
135
|
+
|
|
97
136
|
const query_params = {};
|
|
98
137
|
|
|
99
138
|
const xHeaders = {};
|
|
@@ -131,6 +170,21 @@ class Order {
|
|
|
131
170
|
{ orderId, allowInactive, requestHeaders } = { requestHeaders: {} },
|
|
132
171
|
{ responseHeaders } = { responseHeaders: false }
|
|
133
172
|
) {
|
|
173
|
+
let invalidInput = [];
|
|
174
|
+
|
|
175
|
+
if (!orderId) {
|
|
176
|
+
invalidInput.push({
|
|
177
|
+
message: `The 'orderId' field is required.`,
|
|
178
|
+
path: ["orderId"],
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
if (invalidInput.length) {
|
|
182
|
+
const error = new Error();
|
|
183
|
+
error.message = "Missing required field";
|
|
184
|
+
error.details = invalidInput;
|
|
185
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
186
|
+
}
|
|
187
|
+
|
|
134
188
|
const query_params = {};
|
|
135
189
|
query_params["allow_inactive"] = allowInactive;
|
|
136
190
|
|
|
@@ -180,6 +234,14 @@ class Order {
|
|
|
180
234
|
} = { requestHeaders: {} },
|
|
181
235
|
{ responseHeaders } = { responseHeaders: false }
|
|
182
236
|
) {
|
|
237
|
+
let invalidInput = [];
|
|
238
|
+
if (invalidInput.length) {
|
|
239
|
+
const error = new Error();
|
|
240
|
+
error.message = "Missing required field";
|
|
241
|
+
error.details = invalidInput;
|
|
242
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
243
|
+
}
|
|
244
|
+
|
|
183
245
|
const query_params = {};
|
|
184
246
|
query_params["status"] = status;
|
|
185
247
|
query_params["page_no"] = pageNo;
|
|
@@ -214,55 +276,39 @@ class Order {
|
|
|
214
276
|
return response;
|
|
215
277
|
}
|
|
216
278
|
|
|
217
|
-
/**
|
|
218
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
219
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
220
|
-
* @returns {Promise<OrderById>} - Success response
|
|
221
|
-
* @name getPosOrderById
|
|
222
|
-
* @summary: Retrieves POS order details
|
|
223
|
-
* @description: Retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getPosOrderById/).
|
|
224
|
-
*/
|
|
225
|
-
async getPosOrderById(
|
|
226
|
-
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
227
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
228
|
-
) {
|
|
229
|
-
const query_params = {};
|
|
230
|
-
|
|
231
|
-
const xHeaders = {};
|
|
232
|
-
|
|
233
|
-
const response = await ApplicationAPIClient.execute(
|
|
234
|
-
this._conf,
|
|
235
|
-
"get",
|
|
236
|
-
constructUrl({
|
|
237
|
-
url: this._urls["getPosOrderById"],
|
|
238
|
-
params: { orderId },
|
|
239
|
-
}),
|
|
240
|
-
query_params,
|
|
241
|
-
undefined,
|
|
242
|
-
{ ...xHeaders, ...requestHeaders },
|
|
243
|
-
{ responseHeaders }
|
|
244
|
-
);
|
|
245
|
-
|
|
246
|
-
let responseData = response;
|
|
247
|
-
if (responseHeaders) {
|
|
248
|
-
responseData = response[0];
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
return response;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
279
|
/**
|
|
255
280
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
256
281
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
257
282
|
* @returns {Promise<ShipmentBagReasons>} - Success response
|
|
258
283
|
* @name getShipmentBagReasons
|
|
259
|
-
* @summary:
|
|
260
|
-
* @description:
|
|
284
|
+
* @summary: List bag cancellation reasons
|
|
285
|
+
* @description: Get reasons to perform full or partial cancellation of a bag. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentBagReasons/).
|
|
261
286
|
*/
|
|
262
287
|
async getShipmentBagReasons(
|
|
263
288
|
{ shipmentId, bagId, requestHeaders } = { requestHeaders: {} },
|
|
264
289
|
{ responseHeaders } = { responseHeaders: false }
|
|
265
290
|
) {
|
|
291
|
+
let invalidInput = [];
|
|
292
|
+
|
|
293
|
+
if (!shipmentId) {
|
|
294
|
+
invalidInput.push({
|
|
295
|
+
message: `The 'shipmentId' field is required.`,
|
|
296
|
+
path: ["shipmentId"],
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
if (!bagId) {
|
|
300
|
+
invalidInput.push({
|
|
301
|
+
message: `The 'bagId' field is required.`,
|
|
302
|
+
path: ["bagId"],
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
if (invalidInput.length) {
|
|
306
|
+
const error = new Error();
|
|
307
|
+
error.message = "Missing required field";
|
|
308
|
+
error.details = invalidInput;
|
|
309
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
310
|
+
}
|
|
311
|
+
|
|
266
312
|
const query_params = {};
|
|
267
313
|
|
|
268
314
|
const xHeaders = {};
|
|
@@ -300,6 +346,21 @@ class Order {
|
|
|
300
346
|
{ shipmentId, allowInactive, requestHeaders } = { requestHeaders: {} },
|
|
301
347
|
{ responseHeaders } = { responseHeaders: false }
|
|
302
348
|
) {
|
|
349
|
+
let invalidInput = [];
|
|
350
|
+
|
|
351
|
+
if (!shipmentId) {
|
|
352
|
+
invalidInput.push({
|
|
353
|
+
message: `The 'shipmentId' field is required.`,
|
|
354
|
+
path: ["shipmentId"],
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
if (invalidInput.length) {
|
|
358
|
+
const error = new Error();
|
|
359
|
+
error.message = "Missing required field";
|
|
360
|
+
error.details = invalidInput;
|
|
361
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
362
|
+
}
|
|
363
|
+
|
|
303
364
|
const query_params = {};
|
|
304
365
|
query_params["allow_inactive"] = allowInactive;
|
|
305
366
|
|
|
@@ -338,6 +399,21 @@ class Order {
|
|
|
338
399
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
339
400
|
{ responseHeaders } = { responseHeaders: false }
|
|
340
401
|
) {
|
|
402
|
+
let invalidInput = [];
|
|
403
|
+
|
|
404
|
+
if (!shipmentId) {
|
|
405
|
+
invalidInput.push({
|
|
406
|
+
message: `The 'shipmentId' field is required.`,
|
|
407
|
+
path: ["shipmentId"],
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
if (invalidInput.length) {
|
|
411
|
+
const error = new Error();
|
|
412
|
+
error.message = "Missing required field";
|
|
413
|
+
error.details = invalidInput;
|
|
414
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
415
|
+
}
|
|
416
|
+
|
|
341
417
|
const query_params = {};
|
|
342
418
|
|
|
343
419
|
const xHeaders = {};
|
|
@@ -366,7 +442,7 @@ class Order {
|
|
|
366
442
|
/**
|
|
367
443
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
368
444
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
369
|
-
* @returns {Promise<
|
|
445
|
+
* @returns {Promise<SendOtpToCustomerResponse>} - Success response
|
|
370
446
|
* @name sendOtpToShipmentCustomer
|
|
371
447
|
* @summary: Send OTP to customer
|
|
372
448
|
* @description: Send OTP to the customer for shipment verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/sendOtpToShipmentCustomer/).
|
|
@@ -375,6 +451,27 @@ class Order {
|
|
|
375
451
|
{ orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
376
452
|
{ responseHeaders } = { responseHeaders: false }
|
|
377
453
|
) {
|
|
454
|
+
let invalidInput = [];
|
|
455
|
+
|
|
456
|
+
if (!orderId) {
|
|
457
|
+
invalidInput.push({
|
|
458
|
+
message: `The 'orderId' field is required.`,
|
|
459
|
+
path: ["orderId"],
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
if (!shipmentId) {
|
|
463
|
+
invalidInput.push({
|
|
464
|
+
message: `The 'shipmentId' field is required.`,
|
|
465
|
+
path: ["shipmentId"],
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
if (invalidInput.length) {
|
|
469
|
+
const error = new Error();
|
|
470
|
+
error.message = "Missing required field";
|
|
471
|
+
error.details = invalidInput;
|
|
472
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
473
|
+
}
|
|
474
|
+
|
|
378
475
|
const query_params = {};
|
|
379
476
|
|
|
380
477
|
const xHeaders = {};
|
|
@@ -412,6 +509,21 @@ class Order {
|
|
|
412
509
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
413
510
|
{ responseHeaders } = { responseHeaders: false }
|
|
414
511
|
) {
|
|
512
|
+
let invalidInput = [];
|
|
513
|
+
|
|
514
|
+
if (!shipmentId) {
|
|
515
|
+
invalidInput.push({
|
|
516
|
+
message: `The 'shipmentId' field is required.`,
|
|
517
|
+
path: ["shipmentId"],
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
if (invalidInput.length) {
|
|
521
|
+
const error = new Error();
|
|
522
|
+
error.message = "Missing required field";
|
|
523
|
+
error.details = invalidInput;
|
|
524
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
525
|
+
}
|
|
526
|
+
|
|
415
527
|
const query_params = {};
|
|
416
528
|
|
|
417
529
|
const xHeaders = {};
|
|
@@ -440,15 +552,30 @@ class Order {
|
|
|
440
552
|
/**
|
|
441
553
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
442
554
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
443
|
-
* @returns {Promise<
|
|
555
|
+
* @returns {Promise<ShipmentApplicationStatusResponse>} - Success response
|
|
444
556
|
* @name updateShipmentStatus
|
|
445
557
|
* @summary: Updates shipment status
|
|
446
|
-
* @description:
|
|
558
|
+
* @description: Update current status of a specific shipment using its shipment ID. Supports both partial and full transition as per the configured settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/updateShipmentStatus/).
|
|
447
559
|
*/
|
|
448
560
|
async updateShipmentStatus(
|
|
449
561
|
{ shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
450
562
|
{ responseHeaders } = { responseHeaders: false }
|
|
451
563
|
) {
|
|
564
|
+
let invalidInput = [];
|
|
565
|
+
|
|
566
|
+
if (!shipmentId) {
|
|
567
|
+
invalidInput.push({
|
|
568
|
+
message: `The 'shipmentId' field is required.`,
|
|
569
|
+
path: ["shipmentId"],
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
if (invalidInput.length) {
|
|
573
|
+
const error = new Error();
|
|
574
|
+
error.message = "Missing required field";
|
|
575
|
+
error.details = invalidInput;
|
|
576
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
577
|
+
}
|
|
578
|
+
|
|
452
579
|
const query_params = {};
|
|
453
580
|
|
|
454
581
|
const xHeaders = {};
|
|
@@ -477,15 +604,36 @@ class Order {
|
|
|
477
604
|
/**
|
|
478
605
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
479
606
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
480
|
-
* @returns {Promise<
|
|
607
|
+
* @returns {Promise<VerifyOtpResponse>} - Success response
|
|
481
608
|
* @name verifyOtpShipmentCustomer
|
|
482
609
|
* @summary: Verifies OTP
|
|
483
|
-
* @description: Verify OTP
|
|
610
|
+
* @description: Verify OTP sent by customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/verifyOtpShipmentCustomer/).
|
|
484
611
|
*/
|
|
485
612
|
async verifyOtpShipmentCustomer(
|
|
486
613
|
{ orderId, shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
487
614
|
{ responseHeaders } = { responseHeaders: false }
|
|
488
615
|
) {
|
|
616
|
+
let invalidInput = [];
|
|
617
|
+
|
|
618
|
+
if (!orderId) {
|
|
619
|
+
invalidInput.push({
|
|
620
|
+
message: `The 'orderId' field is required.`,
|
|
621
|
+
path: ["orderId"],
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
if (!shipmentId) {
|
|
625
|
+
invalidInput.push({
|
|
626
|
+
message: `The 'shipmentId' field is required.`,
|
|
627
|
+
path: ["shipmentId"],
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
if (invalidInput.length) {
|
|
631
|
+
const error = new Error();
|
|
632
|
+
error.message = "Missing required field";
|
|
633
|
+
error.details = invalidInput;
|
|
634
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
635
|
+
}
|
|
636
|
+
|
|
489
637
|
const query_params = {};
|
|
490
638
|
|
|
491
639
|
const xHeaders = {};
|