@gofynd/fdk-client-javascript 1.4.16-beta.4 → 1.4.16-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 +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +68 -48
- package/sdk/application/Cart/CartApplicationClient.js +118 -27
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +59 -58
- package/sdk/application/Catalog/CatalogApplicationClient.js +30 -29
- package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
- package/sdk/application/Common/CommonApplicationClient.js +1 -1
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +20 -20
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +10 -10
- package/sdk/application/Content/ContentApplicationClient.d.ts +51 -30
- package/sdk/application/Content/ContentApplicationClient.js +161 -56
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +7 -10
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationClient.js +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +35 -15
- package/sdk/application/Logistic/LogisticApplicationClient.js +101 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +22 -12
- package/sdk/application/Order/OrderApplicationClient.js +56 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
- package/sdk/application/Payment/PaymentApplicationClient.js +46 -46
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
- package/sdk/application/Theme/ThemeApplicationClient.js +4 -2
- package/sdk/application/User/UserApplicationClient.d.ts +10 -10
- package/sdk/application/User/UserApplicationClient.js +6 -6
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -21
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -16
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
- 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 +126 -20
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +970 -20
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1200 -167
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +571 -160
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +121 -7
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
- package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
- package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +419 -115
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +121 -65
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +109 -44
- package/sdk/platform/Cart/CartPlatformModel.d.ts +5070 -1296
- package/sdk/platform/Cart/CartPlatformModel.js +1992 -1217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +209 -183
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +452 -395
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +185 -142
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +96 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +154 -117
- package/sdk/platform/Catalog/CatalogPlatformClient.js +292 -172
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6512 -1770
- package/sdk/platform/Catalog/CatalogPlatformModel.js +3228 -1687
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +72 -31
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +50 -24
- package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
- package/sdk/platform/Common/CommonPlatformClient.js +3 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
- package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +204 -141
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1076 -478
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +253 -141
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +256 -130
- package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
- package/sdk/platform/Content/ContentPlatformClient.js +523 -336
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1372 -400
- package/sdk/platform/Content/ContentPlatformModel.js +631 -394
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
- package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
- package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
- 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 +95 -39
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -63
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -22
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -24
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -116
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -104
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- 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 +17 -6
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +85 -7
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +95 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +39 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +153 -96
- package/sdk/platform/Order/OrderPlatformClient.js +416 -198
- package/sdk/platform/Order/OrderPlatformModel.d.ts +7607 -1267
- package/sdk/platform/Order/OrderPlatformModel.js +3929 -1269
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +270 -109
- package/sdk/platform/Order/OrderPlatformValidator.js +135 -77
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
- 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 +333 -319
- package/sdk/platform/Payment/PaymentPlatformModel.js +288 -278
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- 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 +46 -36
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +132 -41
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +46 -17
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +34 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +40 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +58 -64
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1842 -609
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +886 -554
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +42 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +26 -28
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +5 -5
- package/sdk/platform/Share/SharePlatformApplicationClient.js +9 -9
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +3 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +46 -7
- package/sdk/platform/Share/SharePlatformModel.js +31 -6
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
- package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
- 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 +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
- package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +6 -5
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
- package/sdk/public/Content/ContentPublicClient.js +810 -6
- package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
- package/sdk/public/Content/ContentPublicModel.js +649 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
- package/sdk/public/Content/ContentPublicValidator.js +88 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -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/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -18,7 +18,8 @@ class Order {
|
|
|
18
18
|
* @param {OrderPlatformValidator.AddStateManagerConfigParam} arg - Arg object
|
|
19
19
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
20
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
21
|
-
* @returns {Promise<OrderPlatformModel.
|
|
21
|
+
* @returns {Promise<OrderPlatformModel.ConfigUpdatedResponseSchema>} -
|
|
22
|
+
* Success response
|
|
22
23
|
* @name addStateManagerConfig
|
|
23
24
|
* @summary: Allows esm config updation
|
|
24
25
|
* @description: Update ESM config - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/addStateManagerConfig/).
|
|
@@ -74,10 +75,10 @@ class Order {
|
|
|
74
75
|
|
|
75
76
|
const {
|
|
76
77
|
error: res_error,
|
|
77
|
-
} = OrderPlatformModel.
|
|
78
|
-
|
|
79
|
-
allowUnknown: true
|
|
80
|
-
|
|
78
|
+
} = OrderPlatformModel.ConfigUpdatedResponseSchema().validate(
|
|
79
|
+
responseData,
|
|
80
|
+
{ abortEarly: false, allowUnknown: true }
|
|
81
|
+
);
|
|
81
82
|
|
|
82
83
|
if (res_error) {
|
|
83
84
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -97,7 +98,8 @@ class Order {
|
|
|
97
98
|
* @param {OrderPlatformValidator.AttachOrderUserParam} arg - Arg object
|
|
98
99
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
99
100
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
100
|
-
* @returns {Promise<OrderPlatformModel.
|
|
101
|
+
* @returns {Promise<OrderPlatformModel.AttachOrderUserResponseSchema>} -
|
|
102
|
+
* Success response
|
|
101
103
|
* @name attachOrderUser
|
|
102
104
|
* @summary: Attach order to a user
|
|
103
105
|
* @description: Attach an anonymous order to a customer based on OTP verification - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/attachOrderUser/).
|
|
@@ -153,10 +155,10 @@ class Order {
|
|
|
153
155
|
|
|
154
156
|
const {
|
|
155
157
|
error: res_error,
|
|
156
|
-
} = OrderPlatformModel.
|
|
157
|
-
|
|
158
|
-
allowUnknown: true
|
|
159
|
-
|
|
158
|
+
} = OrderPlatformModel.AttachOrderUserResponseSchema().validate(
|
|
159
|
+
responseData,
|
|
160
|
+
{ abortEarly: false, allowUnknown: true }
|
|
161
|
+
);
|
|
160
162
|
|
|
161
163
|
if (res_error) {
|
|
162
164
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -176,7 +178,7 @@ class Order {
|
|
|
176
178
|
* @param {OrderPlatformValidator.BulkListingParam} arg - Arg object
|
|
177
179
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
178
180
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
179
|
-
* @returns {Promise<OrderPlatformModel.
|
|
181
|
+
* @returns {Promise<OrderPlatformModel.BulkListingResponseSchema>} - Success response
|
|
180
182
|
* @name bulkListing
|
|
181
183
|
* @summary: Lists bulk operations
|
|
182
184
|
* @description: Get list of bulk operation that is initiated and completed as per the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkListing/).
|
|
@@ -258,7 +260,7 @@ class Order {
|
|
|
258
260
|
|
|
259
261
|
const {
|
|
260
262
|
error: res_error,
|
|
261
|
-
} = OrderPlatformModel.
|
|
263
|
+
} = OrderPlatformModel.BulkListingResponseSchema().validate(responseData, {
|
|
262
264
|
abortEarly: false,
|
|
263
265
|
allowUnknown: true,
|
|
264
266
|
});
|
|
@@ -281,8 +283,9 @@ class Order {
|
|
|
281
283
|
* @param {OrderPlatformValidator.BulkStateTransistionParam} arg - Arg object
|
|
282
284
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
283
285
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
284
|
-
* @returns {Promise<OrderPlatformModel.
|
|
285
|
-
* Success response
|
|
286
|
+
* @returns {Promise<OrderPlatformModel.BulkStateTransistionResponseSchema>}
|
|
287
|
+
* - Success response
|
|
288
|
+
*
|
|
286
289
|
* @name bulkStateTransistion
|
|
287
290
|
* @summary: Upload bulk state transitions file
|
|
288
291
|
* @description: Performs state transisiton in bulk using the CSV or excel file for the given shipments. The bulk transition CSV or excel template can be downloaded using the seller template download method. Current supported format is excel and CSV. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkStateTransistion/).
|
|
@@ -338,7 +341,7 @@ class Order {
|
|
|
338
341
|
|
|
339
342
|
const {
|
|
340
343
|
error: res_error,
|
|
341
|
-
} = OrderPlatformModel.
|
|
344
|
+
} = OrderPlatformModel.BulkStateTransistionResponseSchema().validate(
|
|
342
345
|
responseData,
|
|
343
346
|
{ abortEarly: false, allowUnknown: true }
|
|
344
347
|
);
|
|
@@ -436,11 +439,92 @@ class Order {
|
|
|
436
439
|
return response;
|
|
437
440
|
}
|
|
438
441
|
|
|
442
|
+
/**
|
|
443
|
+
* @param {OrderPlatformValidator.CreateChannelConfigParam} arg - Arg object
|
|
444
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
445
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
446
|
+
* @returns {Promise<OrderPlatformModel.CreateChannelConfigResponseSchema>}
|
|
447
|
+
* - Success response
|
|
448
|
+
*
|
|
449
|
+
* @name createChannelConfig
|
|
450
|
+
* @summary: Create channel configuration
|
|
451
|
+
* @description: Set up configuration for a channel specific to orders which has implications over how the order fulfilment happens in a channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createChannelConfig/).
|
|
452
|
+
*/
|
|
453
|
+
async createChannelConfig(
|
|
454
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
455
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
456
|
+
) {
|
|
457
|
+
const { error } = OrderPlatformValidator.createChannelConfig().validate(
|
|
458
|
+
{
|
|
459
|
+
body,
|
|
460
|
+
},
|
|
461
|
+
{ abortEarly: false, allowUnknown: true }
|
|
462
|
+
);
|
|
463
|
+
if (error) {
|
|
464
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
// Showing warrnings if extra unknown parameters are found
|
|
468
|
+
const {
|
|
469
|
+
error: warrning,
|
|
470
|
+
} = OrderPlatformValidator.createChannelConfig().validate(
|
|
471
|
+
{
|
|
472
|
+
body,
|
|
473
|
+
},
|
|
474
|
+
{ abortEarly: false, allowUnknown: false }
|
|
475
|
+
);
|
|
476
|
+
if (warrning) {
|
|
477
|
+
Logger({
|
|
478
|
+
level: "WARN",
|
|
479
|
+
message: `Parameter Validation warrnings for platform > Order > createChannelConfig \n ${warrning}`,
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
const query_params = {};
|
|
484
|
+
|
|
485
|
+
const xHeaders = {};
|
|
486
|
+
|
|
487
|
+
const response = await PlatformAPIClient.execute(
|
|
488
|
+
this.config,
|
|
489
|
+
"post",
|
|
490
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
491
|
+
query_params,
|
|
492
|
+
body,
|
|
493
|
+
{ ...xHeaders, ...requestHeaders },
|
|
494
|
+
{ responseHeaders }
|
|
495
|
+
);
|
|
496
|
+
|
|
497
|
+
let responseData = response;
|
|
498
|
+
if (responseHeaders) {
|
|
499
|
+
responseData = response[0];
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
const {
|
|
503
|
+
error: res_error,
|
|
504
|
+
} = OrderPlatformModel.CreateChannelConfigResponseSchema().validate(
|
|
505
|
+
responseData,
|
|
506
|
+
{ abortEarly: false, allowUnknown: true }
|
|
507
|
+
);
|
|
508
|
+
|
|
509
|
+
if (res_error) {
|
|
510
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
511
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
512
|
+
} else {
|
|
513
|
+
Logger({
|
|
514
|
+
level: "WARN",
|
|
515
|
+
message: `Response Validation Warnings for platform > Order > createChannelConfig \n ${res_error}`,
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
return response;
|
|
521
|
+
}
|
|
522
|
+
|
|
439
523
|
/**
|
|
440
524
|
* @param {OrderPlatformValidator.CreateOrderParam} arg - Arg object
|
|
441
525
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
442
526
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
443
|
-
* @returns {Promise<OrderPlatformModel.
|
|
527
|
+
* @returns {Promise<OrderPlatformModel.CreateOrderResponseSchema>} - Success response
|
|
444
528
|
* @name createOrder
|
|
445
529
|
* @summary: Create order
|
|
446
530
|
* @description: Creates an order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/).
|
|
@@ -494,7 +578,7 @@ class Order {
|
|
|
494
578
|
|
|
495
579
|
const {
|
|
496
580
|
error: res_error,
|
|
497
|
-
} = OrderPlatformModel.
|
|
581
|
+
} = OrderPlatformModel.CreateOrderResponseSchema().validate(responseData, {
|
|
498
582
|
abortEarly: false,
|
|
499
583
|
allowUnknown: true,
|
|
500
584
|
});
|
|
@@ -517,7 +601,7 @@ class Order {
|
|
|
517
601
|
* @param {OrderPlatformValidator.DispatchManifestsParam} arg - Arg object
|
|
518
602
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
519
603
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
520
|
-
* @returns {Promise<OrderPlatformModel.
|
|
604
|
+
* @returns {Promise<OrderPlatformModel.SuccessResponseSchema>} - Success response
|
|
521
605
|
* @name dispatchManifests
|
|
522
606
|
* @summary: Dispatch manifest
|
|
523
607
|
* @description: Updates the status of the manifest to processed and change the status of the shipments in the manifest to dispatch status - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifests/).
|
|
@@ -573,7 +657,7 @@ class Order {
|
|
|
573
657
|
|
|
574
658
|
const {
|
|
575
659
|
error: res_error,
|
|
576
|
-
} = OrderPlatformModel.
|
|
660
|
+
} = OrderPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
577
661
|
abortEarly: false,
|
|
578
662
|
allowUnknown: true,
|
|
579
663
|
});
|
|
@@ -596,7 +680,7 @@ class Order {
|
|
|
596
680
|
* @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object
|
|
597
681
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
598
682
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
599
|
-
* @returns {Promise<OrderPlatformModel.
|
|
683
|
+
* @returns {Promise<OrderPlatformModel.FileResponseSchema>} - Success response
|
|
600
684
|
* @name downloadBulkActionTemplate
|
|
601
685
|
* @summary: Download bulk template
|
|
602
686
|
* @description: Download bulk seller templates which can be used to perform operations in bulk - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadBulkActionTemplate/).
|
|
@@ -655,7 +739,7 @@ class Order {
|
|
|
655
739
|
|
|
656
740
|
const {
|
|
657
741
|
error: res_error,
|
|
658
|
-
} = OrderPlatformModel.
|
|
742
|
+
} = OrderPlatformModel.FileResponseSchema().validate(responseData, {
|
|
659
743
|
abortEarly: false,
|
|
660
744
|
allowUnknown: true,
|
|
661
745
|
});
|
|
@@ -678,8 +762,9 @@ class Order {
|
|
|
678
762
|
* @param {OrderPlatformValidator.DownloadLanesReportParam} arg - Arg object
|
|
679
763
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
680
764
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
681
|
-
* @returns {Promise<OrderPlatformModel.
|
|
682
|
-
* Success response
|
|
765
|
+
* @returns {Promise<OrderPlatformModel.BulkReportsDownloadResponseSchema>}
|
|
766
|
+
* - Success response
|
|
767
|
+
*
|
|
683
768
|
* @name downloadLanesReport
|
|
684
769
|
* @summary: Download Lane report
|
|
685
770
|
* @description: Downloads shipments/orders present in the provided lane - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadLanesReport/).
|
|
@@ -735,7 +820,7 @@ class Order {
|
|
|
735
820
|
|
|
736
821
|
const {
|
|
737
822
|
error: res_error,
|
|
738
|
-
} = OrderPlatformModel.
|
|
823
|
+
} = OrderPlatformModel.BulkReportsDownloadResponseSchema().validate(
|
|
739
824
|
responseData,
|
|
740
825
|
{ abortEarly: false, allowUnknown: true }
|
|
741
826
|
);
|
|
@@ -758,7 +843,8 @@ class Order {
|
|
|
758
843
|
* @param {OrderPlatformValidator.EInvoiceRetryParam} arg - Arg object
|
|
759
844
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
760
845
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
761
|
-
* @returns {Promise<OrderPlatformModel.
|
|
846
|
+
* @returns {Promise<OrderPlatformModel.EInvoiceRetryResponseSchema>} -
|
|
847
|
+
* Success response
|
|
762
848
|
* @name eInvoiceRetry
|
|
763
849
|
* @summary: Retry E-invoice
|
|
764
850
|
* @description: Reattempt the generation of an E-invoice - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/eInvoiceRetry/).
|
|
@@ -812,10 +898,10 @@ class Order {
|
|
|
812
898
|
|
|
813
899
|
const {
|
|
814
900
|
error: res_error,
|
|
815
|
-
} = OrderPlatformModel.
|
|
816
|
-
|
|
817
|
-
allowUnknown: true
|
|
818
|
-
|
|
901
|
+
} = OrderPlatformModel.EInvoiceRetryResponseSchema().validate(
|
|
902
|
+
responseData,
|
|
903
|
+
{ abortEarly: false, allowUnknown: true }
|
|
904
|
+
);
|
|
819
905
|
|
|
820
906
|
if (res_error) {
|
|
821
907
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1093,7 +1179,8 @@ class Order {
|
|
|
1093
1179
|
* @param {OrderPlatformValidator.GenerateInvoiceIDParam} arg - Arg object
|
|
1094
1180
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1095
1181
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1096
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1182
|
+
* @returns {Promise<OrderPlatformModel.GenerateInvoiceIDResponseSchema>} -
|
|
1183
|
+
* Success response
|
|
1097
1184
|
* @name generateInvoiceID
|
|
1098
1185
|
* @summary: Generate and attach invoice Id
|
|
1099
1186
|
* @description: Generate and attach Invoice Ids against shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateInvoiceID/).
|
|
@@ -1151,10 +1238,10 @@ class Order {
|
|
|
1151
1238
|
|
|
1152
1239
|
const {
|
|
1153
1240
|
error: res_error,
|
|
1154
|
-
} = OrderPlatformModel.
|
|
1155
|
-
|
|
1156
|
-
allowUnknown: true
|
|
1157
|
-
|
|
1241
|
+
} = OrderPlatformModel.GenerateInvoiceIDResponseSchema().validate(
|
|
1242
|
+
responseData,
|
|
1243
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1244
|
+
);
|
|
1158
1245
|
|
|
1159
1246
|
if (res_error) {
|
|
1160
1247
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1174,8 +1261,9 @@ class Order {
|
|
|
1174
1261
|
* @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object
|
|
1175
1262
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1176
1263
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1177
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1178
|
-
* Success response
|
|
1264
|
+
* @returns {Promise<OrderPlatformModel.GeneratePosOrderReceiptResponseSchema>}
|
|
1265
|
+
* - Success response
|
|
1266
|
+
*
|
|
1179
1267
|
* @name generatePOSReceiptByOrderId
|
|
1180
1268
|
* @summary: Generate POS receipt by order Id
|
|
1181
1269
|
* @description: Create a point-of-sale (POS) receipt for a specific order by order Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generatePOSReceiptByOrderId/).
|
|
@@ -1241,7 +1329,7 @@ class Order {
|
|
|
1241
1329
|
|
|
1242
1330
|
const {
|
|
1243
1331
|
error: res_error,
|
|
1244
|
-
} = OrderPlatformModel.
|
|
1332
|
+
} = OrderPlatformModel.GeneratePosOrderReceiptResponseSchema().validate(
|
|
1245
1333
|
responseData,
|
|
1246
1334
|
{ abortEarly: false, allowUnknown: true }
|
|
1247
1335
|
);
|
|
@@ -1264,7 +1352,7 @@ class Order {
|
|
|
1264
1352
|
* @param {OrderPlatformValidator.GenerateProcessManifestParam} arg - Arg object
|
|
1265
1353
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1266
1354
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1267
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1355
|
+
* @returns {Promise<OrderPlatformModel.ManifestResponseSchema>} - Success response
|
|
1268
1356
|
* @name generateProcessManifest
|
|
1269
1357
|
* @summary: Process Order Manifest
|
|
1270
1358
|
* @description: Endpoint to save and process order manifests. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateProcessManifest/).
|
|
@@ -1320,7 +1408,7 @@ class Order {
|
|
|
1320
1408
|
|
|
1321
1409
|
const {
|
|
1322
1410
|
error: res_error,
|
|
1323
|
-
} = OrderPlatformModel.
|
|
1411
|
+
} = OrderPlatformModel.ManifestResponseSchema().validate(responseData, {
|
|
1324
1412
|
abortEarly: false,
|
|
1325
1413
|
allowUnknown: true,
|
|
1326
1414
|
});
|
|
@@ -1429,7 +1517,8 @@ class Order {
|
|
|
1429
1517
|
* @param {OrderPlatformValidator.GetAllowedTemplatesForBulkParam} arg - Arg object
|
|
1430
1518
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1431
1519
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1432
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1520
|
+
* @returns {Promise<OrderPlatformModel.AllowedTemplatesResponseSchema>} -
|
|
1521
|
+
* Success response
|
|
1433
1522
|
* @name getAllowedTemplatesForBulk
|
|
1434
1523
|
* @summary: List bulk operation templates
|
|
1435
1524
|
* @description: Gets all the allowed templates to perform bulk operations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedTemplatesForBulk/).
|
|
@@ -1483,10 +1572,10 @@ class Order {
|
|
|
1483
1572
|
|
|
1484
1573
|
const {
|
|
1485
1574
|
error: res_error,
|
|
1486
|
-
} = OrderPlatformModel.
|
|
1487
|
-
|
|
1488
|
-
allowUnknown: true
|
|
1489
|
-
|
|
1575
|
+
} = OrderPlatformModel.AllowedTemplatesResponseSchema().validate(
|
|
1576
|
+
responseData,
|
|
1577
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1578
|
+
);
|
|
1490
1579
|
|
|
1491
1580
|
if (res_error) {
|
|
1492
1581
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1506,7 +1595,8 @@ class Order {
|
|
|
1506
1595
|
* @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object
|
|
1507
1596
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1508
1597
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1509
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1598
|
+
* @returns {Promise<OrderPlatformModel.AnnouncementsResponseSchema>} -
|
|
1599
|
+
* Success response
|
|
1510
1600
|
* @name getAnnouncements
|
|
1511
1601
|
* @summary: List announcements
|
|
1512
1602
|
* @description: Retrieve announcements related to orders fulfilment configured by platform or company admin - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAnnouncements/).
|
|
@@ -1563,10 +1653,10 @@ class Order {
|
|
|
1563
1653
|
|
|
1564
1654
|
const {
|
|
1565
1655
|
error: res_error,
|
|
1566
|
-
} = OrderPlatformModel.
|
|
1567
|
-
|
|
1568
|
-
allowUnknown: true
|
|
1569
|
-
|
|
1656
|
+
} = OrderPlatformModel.AnnouncementsResponseSchema().validate(
|
|
1657
|
+
responseData,
|
|
1658
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1659
|
+
);
|
|
1570
1660
|
|
|
1571
1661
|
if (res_error) {
|
|
1572
1662
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1586,8 +1676,9 @@ class Order {
|
|
|
1586
1676
|
* @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object
|
|
1587
1677
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1588
1678
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1589
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1590
|
-
* Success response
|
|
1679
|
+
* @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponseSchema>}
|
|
1680
|
+
* - Success response
|
|
1681
|
+
*
|
|
1591
1682
|
* @name getBagById
|
|
1592
1683
|
* @summary: Get bag
|
|
1593
1684
|
* @description: Retrieve detailed information about a specific bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
|
|
@@ -1648,10 +1739,10 @@ class Order {
|
|
|
1648
1739
|
|
|
1649
1740
|
const {
|
|
1650
1741
|
error: res_error,
|
|
1651
|
-
} = OrderPlatformModel.
|
|
1652
|
-
|
|
1653
|
-
allowUnknown: true
|
|
1654
|
-
|
|
1742
|
+
} = OrderPlatformModel.BagDetailsPlatformResponseSchema().validate(
|
|
1743
|
+
responseData,
|
|
1744
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1745
|
+
);
|
|
1655
1746
|
|
|
1656
1747
|
if (res_error) {
|
|
1657
1748
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1671,7 +1762,8 @@ class Order {
|
|
|
1671
1762
|
* @param {OrderPlatformValidator.GetBagsParam} arg - Arg object
|
|
1672
1763
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1673
1764
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1674
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1765
|
+
* @returns {Promise<OrderPlatformModel.GetBagsPlatformResponseSchema>} -
|
|
1766
|
+
* Success response
|
|
1675
1767
|
* @name getBags
|
|
1676
1768
|
* @summary: List bags
|
|
1677
1769
|
* @description: Get paginated list of bags based on provided filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBags/).
|
|
@@ -1761,10 +1853,10 @@ class Order {
|
|
|
1761
1853
|
|
|
1762
1854
|
const {
|
|
1763
1855
|
error: res_error,
|
|
1764
|
-
} = OrderPlatformModel.
|
|
1765
|
-
|
|
1766
|
-
allowUnknown: true
|
|
1767
|
-
|
|
1856
|
+
} = OrderPlatformModel.GetBagsPlatformResponseSchema().validate(
|
|
1857
|
+
responseData,
|
|
1858
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1859
|
+
);
|
|
1768
1860
|
|
|
1769
1861
|
if (res_error) {
|
|
1770
1862
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1784,8 +1876,9 @@ class Order {
|
|
|
1784
1876
|
* @param {OrderPlatformValidator.GetBulkActionTemplateParam} arg - Arg object
|
|
1785
1877
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1786
1878
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1787
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1788
|
-
* Success response
|
|
1879
|
+
* @returns {Promise<OrderPlatformModel.BulkActionTemplateResponseSchema>}
|
|
1880
|
+
* - Success response
|
|
1881
|
+
*
|
|
1789
1882
|
* @name getBulkActionTemplate
|
|
1790
1883
|
* @summary: List supported templates
|
|
1791
1884
|
* @description: Get list of templates so that users can download the required template - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkActionTemplate/).
|
|
@@ -1837,10 +1930,10 @@ class Order {
|
|
|
1837
1930
|
|
|
1838
1931
|
const {
|
|
1839
1932
|
error: res_error,
|
|
1840
|
-
} = OrderPlatformModel.
|
|
1841
|
-
|
|
1842
|
-
allowUnknown: true
|
|
1843
|
-
|
|
1933
|
+
} = OrderPlatformModel.BulkActionTemplateResponseSchema().validate(
|
|
1934
|
+
responseData,
|
|
1935
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1936
|
+
);
|
|
1844
1937
|
|
|
1845
1938
|
if (res_error) {
|
|
1846
1939
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1860,7 +1953,7 @@ class Order {
|
|
|
1860
1953
|
* @param {OrderPlatformValidator.GetBulkShipmentExcelFileParam} arg - Arg object
|
|
1861
1954
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1862
1955
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1863
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1956
|
+
* @returns {Promise<OrderPlatformModel.FileResponseSchema>} - Success response
|
|
1864
1957
|
* @name getBulkShipmentExcelFile
|
|
1865
1958
|
* @summary: Generate the report
|
|
1866
1959
|
* @description: Generates the report which can be filled and uploaded to perform the bulk operation based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkShipmentExcelFile/).
|
|
@@ -1966,7 +2059,7 @@ class Order {
|
|
|
1966
2059
|
|
|
1967
2060
|
const {
|
|
1968
2061
|
error: res_error,
|
|
1969
|
-
} = OrderPlatformModel.
|
|
2062
|
+
} = OrderPlatformModel.FileResponseSchema().validate(responseData, {
|
|
1970
2063
|
abortEarly: false,
|
|
1971
2064
|
allowUnknown: true,
|
|
1972
2065
|
});
|
|
@@ -1985,11 +2078,86 @@ class Order {
|
|
|
1985
2078
|
return response;
|
|
1986
2079
|
}
|
|
1987
2080
|
|
|
2081
|
+
/**
|
|
2082
|
+
* @param {OrderPlatformValidator.GetChannelConfigParam} arg - Arg object
|
|
2083
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2084
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2085
|
+
* @returns {Promise<OrderPlatformModel.CreateChannelConfigData>} - Success response
|
|
2086
|
+
* @name getChannelConfig
|
|
2087
|
+
* @summary: Get channel configuration
|
|
2088
|
+
* @description: Retrieve configuration settings specific to orders for a channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getChannelConfig/).
|
|
2089
|
+
*/
|
|
2090
|
+
async getChannelConfig(
|
|
2091
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
2092
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2093
|
+
) {
|
|
2094
|
+
const { error } = OrderPlatformValidator.getChannelConfig().validate(
|
|
2095
|
+
{},
|
|
2096
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2097
|
+
);
|
|
2098
|
+
if (error) {
|
|
2099
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2103
|
+
const {
|
|
2104
|
+
error: warrning,
|
|
2105
|
+
} = OrderPlatformValidator.getChannelConfig().validate(
|
|
2106
|
+
{},
|
|
2107
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2108
|
+
);
|
|
2109
|
+
if (warrning) {
|
|
2110
|
+
Logger({
|
|
2111
|
+
level: "WARN",
|
|
2112
|
+
message: `Parameter Validation warrnings for platform > Order > getChannelConfig \n ${warrning}`,
|
|
2113
|
+
});
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
const query_params = {};
|
|
2117
|
+
|
|
2118
|
+
const xHeaders = {};
|
|
2119
|
+
|
|
2120
|
+
const response = await PlatformAPIClient.execute(
|
|
2121
|
+
this.config,
|
|
2122
|
+
"get",
|
|
2123
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
2124
|
+
query_params,
|
|
2125
|
+
undefined,
|
|
2126
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2127
|
+
{ responseHeaders }
|
|
2128
|
+
);
|
|
2129
|
+
|
|
2130
|
+
let responseData = response;
|
|
2131
|
+
if (responseHeaders) {
|
|
2132
|
+
responseData = response[0];
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
const {
|
|
2136
|
+
error: res_error,
|
|
2137
|
+
} = OrderPlatformModel.CreateChannelConfigData().validate(responseData, {
|
|
2138
|
+
abortEarly: false,
|
|
2139
|
+
allowUnknown: true,
|
|
2140
|
+
});
|
|
2141
|
+
|
|
2142
|
+
if (res_error) {
|
|
2143
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2144
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2145
|
+
} else {
|
|
2146
|
+
Logger({
|
|
2147
|
+
level: "WARN",
|
|
2148
|
+
message: `Response Validation Warnings for platform > Order > getChannelConfig \n ${res_error}`,
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
return response;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
1988
2156
|
/**
|
|
1989
2157
|
* @param {OrderPlatformValidator.GetFileByStatusParam} arg - Arg object
|
|
1990
2158
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1991
2159
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1992
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2160
|
+
* @returns {Promise<OrderPlatformModel.JobFailedResponseSchema>} - Success response
|
|
1993
2161
|
* @name getFileByStatus
|
|
1994
2162
|
* @summary: Download file used for Bulk operation
|
|
1995
2163
|
* @description: Get the file download URL used for performing bulk operation - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getFileByStatus/).
|
|
@@ -2056,7 +2224,7 @@ class Order {
|
|
|
2056
2224
|
|
|
2057
2225
|
const {
|
|
2058
2226
|
error: res_error,
|
|
2059
|
-
} = OrderPlatformModel.
|
|
2227
|
+
} = OrderPlatformModel.JobFailedResponseSchema().validate(responseData, {
|
|
2060
2228
|
abortEarly: false,
|
|
2061
2229
|
allowUnknown: true,
|
|
2062
2230
|
});
|
|
@@ -2079,7 +2247,7 @@ class Order {
|
|
|
2079
2247
|
* @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object
|
|
2080
2248
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2081
2249
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2082
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2250
|
+
* @returns {Promise<OrderPlatformModel.LaneConfigResponseSchema>} - Success response
|
|
2083
2251
|
* @name getLaneConfig
|
|
2084
2252
|
* @summary: Get lane configuration
|
|
2085
2253
|
* @description: Get configuration settings for lanes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
|
|
@@ -2209,7 +2377,7 @@ class Order {
|
|
|
2209
2377
|
|
|
2210
2378
|
const {
|
|
2211
2379
|
error: res_error,
|
|
2212
|
-
} = OrderPlatformModel.
|
|
2380
|
+
} = OrderPlatformModel.LaneConfigResponseSchema().validate(responseData, {
|
|
2213
2381
|
abortEarly: false,
|
|
2214
2382
|
allowUnknown: true,
|
|
2215
2383
|
});
|
|
@@ -2454,7 +2622,8 @@ class Order {
|
|
|
2454
2622
|
* @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object
|
|
2455
2623
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2456
2624
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2457
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2625
|
+
* @returns {Promise<OrderPlatformModel.ManifestFiltersResponseSchema>} -
|
|
2626
|
+
* Success response
|
|
2458
2627
|
* @name getManifestfilters
|
|
2459
2628
|
* @summary: List filters
|
|
2460
2629
|
* @description: Get supported filter for listing manifests - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestfilters/).
|
|
@@ -2511,10 +2680,10 @@ class Order {
|
|
|
2511
2680
|
|
|
2512
2681
|
const {
|
|
2513
2682
|
error: res_error,
|
|
2514
|
-
} = OrderPlatformModel.
|
|
2515
|
-
|
|
2516
|
-
allowUnknown: true
|
|
2517
|
-
|
|
2683
|
+
} = OrderPlatformModel.ManifestFiltersResponseSchema().validate(
|
|
2684
|
+
responseData,
|
|
2685
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2686
|
+
);
|
|
2518
2687
|
|
|
2519
2688
|
if (res_error) {
|
|
2520
2689
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2647,7 +2816,8 @@ class Order {
|
|
|
2647
2816
|
* @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object
|
|
2648
2817
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2649
2818
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2650
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2819
|
+
* @returns {Promise<OrderPlatformModel.OrderDetailsResponseSchema>} -
|
|
2820
|
+
* Success response
|
|
2651
2821
|
* @name getOrderById
|
|
2652
2822
|
* @summary: Get order
|
|
2653
2823
|
* @description: Get detailed information about a specific order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/).
|
|
@@ -2710,7 +2880,7 @@ class Order {
|
|
|
2710
2880
|
|
|
2711
2881
|
const {
|
|
2712
2882
|
error: res_error,
|
|
2713
|
-
} = OrderPlatformModel.
|
|
2883
|
+
} = OrderPlatformModel.OrderDetailsResponseSchema().validate(responseData, {
|
|
2714
2884
|
abortEarly: false,
|
|
2715
2885
|
allowUnknown: true,
|
|
2716
2886
|
});
|
|
@@ -2733,10 +2903,11 @@ class Order {
|
|
|
2733
2903
|
* @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object
|
|
2734
2904
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2735
2905
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2736
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2906
|
+
* @returns {Promise<OrderPlatformModel.OrderListingResponseSchema>} -
|
|
2907
|
+
* Success response
|
|
2737
2908
|
* @name getOrders
|
|
2738
2909
|
* @summary: List orders
|
|
2739
|
-
* @description: Get a list of orders based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/).
|
|
2910
|
+
* @description: Get a list of orders based on the filters provided. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/).
|
|
2740
2911
|
*/
|
|
2741
2912
|
async getOrders(
|
|
2742
2913
|
{
|
|
@@ -2763,6 +2934,7 @@ class Order {
|
|
|
2763
2934
|
customerId,
|
|
2764
2935
|
orderType,
|
|
2765
2936
|
allowInactive,
|
|
2937
|
+
groupEntity,
|
|
2766
2938
|
enforceDateFilter,
|
|
2767
2939
|
requestHeaders,
|
|
2768
2940
|
} = { requestHeaders: {} },
|
|
@@ -2793,6 +2965,7 @@ class Order {
|
|
|
2793
2965
|
customerId,
|
|
2794
2966
|
orderType,
|
|
2795
2967
|
allowInactive,
|
|
2968
|
+
groupEntity,
|
|
2796
2969
|
enforceDateFilter,
|
|
2797
2970
|
},
|
|
2798
2971
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2827,6 +3000,7 @@ class Order {
|
|
|
2827
3000
|
customerId,
|
|
2828
3001
|
orderType,
|
|
2829
3002
|
allowInactive,
|
|
3003
|
+
groupEntity,
|
|
2830
3004
|
enforceDateFilter,
|
|
2831
3005
|
},
|
|
2832
3006
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2862,6 +3036,7 @@ class Order {
|
|
|
2862
3036
|
query_params["customer_id"] = customerId;
|
|
2863
3037
|
query_params["order_type"] = orderType;
|
|
2864
3038
|
query_params["allow_inactive"] = allowInactive;
|
|
3039
|
+
query_params["group_entity"] = groupEntity;
|
|
2865
3040
|
query_params["enforce_date_filter"] = enforceDateFilter;
|
|
2866
3041
|
|
|
2867
3042
|
const xHeaders = {};
|
|
@@ -2883,7 +3058,7 @@ class Order {
|
|
|
2883
3058
|
|
|
2884
3059
|
const {
|
|
2885
3060
|
error: res_error,
|
|
2886
|
-
} = OrderPlatformModel.
|
|
3061
|
+
} = OrderPlatformModel.OrderListingResponseSchema().validate(responseData, {
|
|
2887
3062
|
abortEarly: false,
|
|
2888
3063
|
allowUnknown: true,
|
|
2889
3064
|
});
|
|
@@ -2906,7 +3081,7 @@ class Order {
|
|
|
2906
3081
|
* @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object
|
|
2907
3082
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2908
3083
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2909
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3084
|
+
* @returns {Promise<OrderPlatformModel.GetActionsResponseSchema>} - Success response
|
|
2910
3085
|
* @name getRoleBasedActions
|
|
2911
3086
|
* @summary: Get role-based actions
|
|
2912
3087
|
* @description: Retrieve permissible actions based on user roles such as company_admin, company_operation, customer_care, and read_only. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRoleBasedActions/).
|
|
@@ -2958,7 +3133,7 @@ class Order {
|
|
|
2958
3133
|
|
|
2959
3134
|
const {
|
|
2960
3135
|
error: res_error,
|
|
2961
|
-
} = OrderPlatformModel.
|
|
3136
|
+
} = OrderPlatformModel.GetActionsResponseSchema().validate(responseData, {
|
|
2962
3137
|
abortEarly: false,
|
|
2963
3138
|
allowUnknown: true,
|
|
2964
3139
|
});
|
|
@@ -2981,9 +3156,10 @@ class Order {
|
|
|
2981
3156
|
* @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object
|
|
2982
3157
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2983
3158
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2984
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3159
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInfoResponseSchema>} -
|
|
3160
|
+
* Success response
|
|
2985
3161
|
* @name getShipmentById
|
|
2986
|
-
* @summary: Get shipment
|
|
3162
|
+
* @summary: Get shipment details
|
|
2987
3163
|
* @description: Get detailed information about a specific shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
|
|
2988
3164
|
*/
|
|
2989
3165
|
async getShipmentById(
|
|
@@ -3053,7 +3229,7 @@ class Order {
|
|
|
3053
3229
|
|
|
3054
3230
|
const {
|
|
3055
3231
|
error: res_error,
|
|
3056
|
-
} = OrderPlatformModel.
|
|
3232
|
+
} = OrderPlatformModel.ShipmentInfoResponseSchema().validate(responseData, {
|
|
3057
3233
|
abortEarly: false,
|
|
3058
3234
|
allowUnknown: true,
|
|
3059
3235
|
});
|
|
@@ -3076,7 +3252,8 @@ class Order {
|
|
|
3076
3252
|
* @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object
|
|
3077
3253
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3078
3254
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3079
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3255
|
+
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponseSchema>} -
|
|
3256
|
+
* Success response
|
|
3080
3257
|
* @name getShipmentHistory
|
|
3081
3258
|
* @summary: Get a shipment's history
|
|
3082
3259
|
* @description: Get the history of the shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/).
|
|
@@ -3136,10 +3313,10 @@ class Order {
|
|
|
3136
3313
|
|
|
3137
3314
|
const {
|
|
3138
3315
|
error: res_error,
|
|
3139
|
-
} = OrderPlatformModel.
|
|
3140
|
-
|
|
3141
|
-
allowUnknown: true
|
|
3142
|
-
|
|
3316
|
+
} = OrderPlatformModel.ShipmentHistoryResponseSchema().validate(
|
|
3317
|
+
responseData,
|
|
3318
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3319
|
+
);
|
|
3143
3320
|
|
|
3144
3321
|
if (res_error) {
|
|
3145
3322
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3159,8 +3336,9 @@ class Order {
|
|
|
3159
3336
|
* @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object
|
|
3160
3337
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3161
3338
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3162
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3163
|
-
* Success response
|
|
3339
|
+
* @returns {Promise<OrderPlatformModel.PlatformShipmentReasonsResponseSchema>}
|
|
3340
|
+
* - Success response
|
|
3341
|
+
*
|
|
3164
3342
|
* @name getShipmentReasons
|
|
3165
3343
|
* @summary: List bag cancellation reasons
|
|
3166
3344
|
* @description: Get reasons to perform full or partial cancellation of a bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentReasons/).
|
|
@@ -3220,7 +3398,7 @@ class Order {
|
|
|
3220
3398
|
|
|
3221
3399
|
const {
|
|
3222
3400
|
error: res_error,
|
|
3223
|
-
} = OrderPlatformModel.
|
|
3401
|
+
} = OrderPlatformModel.PlatformShipmentReasonsResponseSchema().validate(
|
|
3224
3402
|
responseData,
|
|
3225
3403
|
{ abortEarly: false, allowUnknown: true }
|
|
3226
3404
|
);
|
|
@@ -3243,7 +3421,7 @@ class Order {
|
|
|
3243
3421
|
* @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object
|
|
3244
3422
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3245
3423
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3246
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3424
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema>}
|
|
3247
3425
|
* - Success response
|
|
3248
3426
|
*
|
|
3249
3427
|
* @name getShipments
|
|
@@ -3283,6 +3461,7 @@ class Order {
|
|
|
3283
3461
|
tags,
|
|
3284
3462
|
customerId,
|
|
3285
3463
|
orderType,
|
|
3464
|
+
groupEntity,
|
|
3286
3465
|
enforceDateFilter,
|
|
3287
3466
|
requestHeaders,
|
|
3288
3467
|
} = { requestHeaders: {} },
|
|
@@ -3321,6 +3500,7 @@ class Order {
|
|
|
3321
3500
|
tags,
|
|
3322
3501
|
customerId,
|
|
3323
3502
|
orderType,
|
|
3503
|
+
groupEntity,
|
|
3324
3504
|
enforceDateFilter,
|
|
3325
3505
|
},
|
|
3326
3506
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -3363,6 +3543,7 @@ class Order {
|
|
|
3363
3543
|
tags,
|
|
3364
3544
|
customerId,
|
|
3365
3545
|
orderType,
|
|
3546
|
+
groupEntity,
|
|
3366
3547
|
enforceDateFilter,
|
|
3367
3548
|
},
|
|
3368
3549
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -3406,6 +3587,7 @@ class Order {
|
|
|
3406
3587
|
query_params["tags"] = tags;
|
|
3407
3588
|
query_params["customer_id"] = customerId;
|
|
3408
3589
|
query_params["order_type"] = orderType;
|
|
3590
|
+
query_params["group_entity"] = groupEntity;
|
|
3409
3591
|
query_params["enforce_date_filter"] = enforceDateFilter;
|
|
3410
3592
|
|
|
3411
3593
|
const xHeaders = {};
|
|
@@ -3427,7 +3609,7 @@ class Order {
|
|
|
3427
3609
|
|
|
3428
3610
|
const {
|
|
3429
3611
|
error: res_error,
|
|
3430
|
-
} = OrderPlatformModel.
|
|
3612
|
+
} = OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema().validate(
|
|
3431
3613
|
responseData,
|
|
3432
3614
|
{ abortEarly: false, allowUnknown: true }
|
|
3433
3615
|
);
|
|
@@ -3611,7 +3793,8 @@ class Order {
|
|
|
3611
3793
|
* @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object
|
|
3612
3794
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3613
3795
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3614
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3796
|
+
* @returns {Promise<OrderPlatformModel.TemplateDownloadResponseSchema>} -
|
|
3797
|
+
* Success response
|
|
3615
3798
|
* @name getTemplate
|
|
3616
3799
|
* @summary: Download bulk operation templates
|
|
3617
3800
|
* @description: Get the excel or CSV file URL for the template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getTemplate/).
|
|
@@ -3665,10 +3848,10 @@ class Order {
|
|
|
3665
3848
|
|
|
3666
3849
|
const {
|
|
3667
3850
|
error: res_error,
|
|
3668
|
-
} = OrderPlatformModel.
|
|
3669
|
-
|
|
3670
|
-
allowUnknown: true
|
|
3671
|
-
|
|
3851
|
+
} = OrderPlatformModel.TemplateDownloadResponseSchema().validate(
|
|
3852
|
+
responseData,
|
|
3853
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3854
|
+
);
|
|
3672
3855
|
|
|
3673
3856
|
if (res_error) {
|
|
3674
3857
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3688,7 +3871,7 @@ class Order {
|
|
|
3688
3871
|
* @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object
|
|
3689
3872
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3690
3873
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3691
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3874
|
+
* @returns {Promise<OrderPlatformModel.FiltersResponseSchema>} - Success response
|
|
3692
3875
|
* @name getfilters
|
|
3693
3876
|
* @summary: List filters
|
|
3694
3877
|
* @description: Get supported filters for various listing operations - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/).
|
|
@@ -3746,7 +3929,7 @@ class Order {
|
|
|
3746
3929
|
|
|
3747
3930
|
const {
|
|
3748
3931
|
error: res_error,
|
|
3749
|
-
} = OrderPlatformModel.
|
|
3932
|
+
} = OrderPlatformModel.FiltersResponseSchema().validate(responseData, {
|
|
3750
3933
|
abortEarly: false,
|
|
3751
3934
|
allowUnknown: true,
|
|
3752
3935
|
});
|
|
@@ -3769,8 +3952,9 @@ class Order {
|
|
|
3769
3952
|
* @param {OrderPlatformValidator.InvalidateShipmentCacheParam} arg - Arg object
|
|
3770
3953
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3771
3954
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3772
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3773
|
-
* Success response
|
|
3955
|
+
* @returns {Promise<OrderPlatformModel.InvalidateShipmentCacheResponseSchema>}
|
|
3956
|
+
* - Success response
|
|
3957
|
+
*
|
|
3774
3958
|
* @name invalidateShipmentCache
|
|
3775
3959
|
* @summary: Invalidate shipment cache
|
|
3776
3960
|
* @description: Clear the existing shipment cache data stored in Redis and serialize the updated data for subsequent use. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/invalidateShipmentCache/).
|
|
@@ -3826,7 +4010,7 @@ class Order {
|
|
|
3826
4010
|
|
|
3827
4011
|
const {
|
|
3828
4012
|
error: res_error,
|
|
3829
|
-
} = OrderPlatformModel.
|
|
4013
|
+
} = OrderPlatformModel.InvalidateShipmentCacheResponseSchema().validate(
|
|
3830
4014
|
responseData,
|
|
3831
4015
|
{ abortEarly: false, allowUnknown: true }
|
|
3832
4016
|
);
|
|
@@ -3849,7 +4033,7 @@ class Order {
|
|
|
3849
4033
|
* @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object
|
|
3850
4034
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3851
4035
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3852
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4036
|
+
* @returns {Promise<OrderPlatformModel.JobDetailsResponseSchema>} - Success response
|
|
3853
4037
|
* @name jobDetails
|
|
3854
4038
|
* @summary: Get bulk operation details
|
|
3855
4039
|
* @description: Fetches details of the job for the provided batch Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/jobDetails/).
|
|
@@ -3903,7 +4087,7 @@ class Order {
|
|
|
3903
4087
|
|
|
3904
4088
|
const {
|
|
3905
4089
|
error: res_error,
|
|
3906
|
-
} = OrderPlatformModel.
|
|
4090
|
+
} = OrderPlatformModel.JobDetailsResponseSchema().validate(responseData, {
|
|
3907
4091
|
abortEarly: false,
|
|
3908
4092
|
allowUnknown: true,
|
|
3909
4093
|
});
|
|
@@ -4003,7 +4187,8 @@ class Order {
|
|
|
4003
4187
|
* @param {OrderPlatformValidator.PostShipmentHistoryParam} arg - Arg object
|
|
4004
4188
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4005
4189
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4006
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4190
|
+
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponseSchema>} -
|
|
4191
|
+
* Success response
|
|
4007
4192
|
* @name postShipmentHistory
|
|
4008
4193
|
* @summary: Create shipment history
|
|
4009
4194
|
* @description: Used to add logs in history for a bag for the provided Shipment ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postShipmentHistory/).
|
|
@@ -4059,10 +4244,10 @@ class Order {
|
|
|
4059
4244
|
|
|
4060
4245
|
const {
|
|
4061
4246
|
error: res_error,
|
|
4062
|
-
} = OrderPlatformModel.
|
|
4063
|
-
|
|
4064
|
-
allowUnknown: true
|
|
4065
|
-
|
|
4247
|
+
} = OrderPlatformModel.ShipmentHistoryResponseSchema().validate(
|
|
4248
|
+
responseData,
|
|
4249
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4250
|
+
);
|
|
4066
4251
|
|
|
4067
4252
|
if (res_error) {
|
|
4068
4253
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4082,7 +4267,8 @@ class Order {
|
|
|
4082
4267
|
* @param {OrderPlatformValidator.ReassignLocationParam} arg - Arg object
|
|
4083
4268
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4084
4269
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4085
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4270
|
+
* @returns {Promise<OrderPlatformModel.StoreReassignResponseSchema>} -
|
|
4271
|
+
* Success response
|
|
4086
4272
|
* @name reassignLocation
|
|
4087
4273
|
* @summary: Reassign location
|
|
4088
4274
|
* @description: Reassign the shipment to a another location and update its status to 'Store Reassigned.' - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/reassignLocation/).
|
|
@@ -4138,10 +4324,10 @@ class Order {
|
|
|
4138
4324
|
|
|
4139
4325
|
const {
|
|
4140
4326
|
error: res_error,
|
|
4141
|
-
} = OrderPlatformModel.
|
|
4142
|
-
|
|
4143
|
-
allowUnknown: true
|
|
4144
|
-
|
|
4327
|
+
} = OrderPlatformModel.StoreReassignResponseSchema().validate(
|
|
4328
|
+
responseData,
|
|
4329
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4330
|
+
);
|
|
4145
4331
|
|
|
4146
4332
|
if (res_error) {
|
|
4147
4333
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4161,7 +4347,7 @@ class Order {
|
|
|
4161
4347
|
* @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object
|
|
4162
4348
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4163
4349
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4164
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4350
|
+
* @returns {Promise<OrderPlatformModel.BaseResponseSchema>} - Success response
|
|
4165
4351
|
* @name sendSmsNinja
|
|
4166
4352
|
* @summary: Send SMS
|
|
4167
4353
|
* @description: Send SMS to customer based on the template that is selected - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendSmsNinja/).
|
|
@@ -4215,7 +4401,7 @@ class Order {
|
|
|
4215
4401
|
|
|
4216
4402
|
const {
|
|
4217
4403
|
error: res_error,
|
|
4218
|
-
} = OrderPlatformModel.
|
|
4404
|
+
} = OrderPlatformModel.BaseResponseSchema().validate(responseData, {
|
|
4219
4405
|
abortEarly: false,
|
|
4220
4406
|
allowUnknown: true,
|
|
4221
4407
|
});
|
|
@@ -4238,7 +4424,8 @@ class Order {
|
|
|
4238
4424
|
* @param {OrderPlatformValidator.SendUserMobileOTPParam} arg - Arg object
|
|
4239
4425
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4240
4426
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4241
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4427
|
+
* @returns {Promise<OrderPlatformModel.SendUserMobileOtpResponseSchema>} -
|
|
4428
|
+
* Success response
|
|
4242
4429
|
* @name sendUserMobileOTP
|
|
4243
4430
|
* @summary: Send user mobile OTP
|
|
4244
4431
|
* @description: Send a one-time OTP to a customer mobile number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendUserMobileOTP/).
|
|
@@ -4294,10 +4481,10 @@ class Order {
|
|
|
4294
4481
|
|
|
4295
4482
|
const {
|
|
4296
4483
|
error: res_error,
|
|
4297
|
-
} = OrderPlatformModel.
|
|
4298
|
-
|
|
4299
|
-
allowUnknown: true
|
|
4300
|
-
|
|
4484
|
+
} = OrderPlatformModel.SendUserMobileOtpResponseSchema().validate(
|
|
4485
|
+
responseData,
|
|
4486
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4487
|
+
);
|
|
4301
4488
|
|
|
4302
4489
|
if (res_error) {
|
|
4303
4490
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4317,8 +4504,9 @@ class Order {
|
|
|
4317
4504
|
* @param {OrderPlatformValidator.TrackShipmentParam} arg - Arg object
|
|
4318
4505
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4319
4506
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4320
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4321
|
-
* Success response
|
|
4507
|
+
* @returns {Promise<OrderPlatformModel.CourierPartnerTrackingResponseSchema>}
|
|
4508
|
+
* - Success response
|
|
4509
|
+
*
|
|
4322
4510
|
* @name trackShipment
|
|
4323
4511
|
* @summary: Track shipment
|
|
4324
4512
|
* @description: Retrieve courier partner tracking details for a given shipment Id or AWB number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/trackShipment/).
|
|
@@ -4384,7 +4572,7 @@ class Order {
|
|
|
4384
4572
|
|
|
4385
4573
|
const {
|
|
4386
4574
|
error: res_error,
|
|
4387
|
-
} = OrderPlatformModel.
|
|
4575
|
+
} = OrderPlatformModel.CourierPartnerTrackingResponseSchema().validate(
|
|
4388
4576
|
responseData,
|
|
4389
4577
|
{ abortEarly: false, allowUnknown: true }
|
|
4390
4578
|
);
|
|
@@ -4407,44 +4595,19 @@ class Order {
|
|
|
4407
4595
|
* @param {OrderPlatformValidator.UpdateAddressParam} arg - Arg object
|
|
4408
4596
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4409
4597
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4410
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4598
|
+
* @returns {Promise<OrderPlatformModel.BaseResponseSchema>} - Success response
|
|
4411
4599
|
* @name updateAddress
|
|
4412
4600
|
* @summary: Update shipment address
|
|
4413
|
-
* @description:
|
|
4601
|
+
* @description: Update the address details of an existing shipment based on the provided address_category. This operation allows the modification of critical shipment details, potentially affecting delivery/billing accuracy and customer communication. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateAddress/).
|
|
4414
4602
|
*/
|
|
4415
4603
|
async updateAddress(
|
|
4416
|
-
{
|
|
4417
|
-
shipmentId,
|
|
4418
|
-
addressCategory,
|
|
4419
|
-
name,
|
|
4420
|
-
address,
|
|
4421
|
-
addressType,
|
|
4422
|
-
pincode,
|
|
4423
|
-
phone,
|
|
4424
|
-
email,
|
|
4425
|
-
landmark,
|
|
4426
|
-
city,
|
|
4427
|
-
state,
|
|
4428
|
-
country,
|
|
4429
|
-
requestHeaders,
|
|
4430
|
-
} = { requestHeaders: {} },
|
|
4604
|
+
{ shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
4431
4605
|
{ responseHeaders } = { responseHeaders: false }
|
|
4432
4606
|
) {
|
|
4433
4607
|
const { error } = OrderPlatformValidator.updateAddress().validate(
|
|
4434
4608
|
{
|
|
4435
4609
|
shipmentId,
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
name,
|
|
4439
|
-
address,
|
|
4440
|
-
addressType,
|
|
4441
|
-
pincode,
|
|
4442
|
-
phone,
|
|
4443
|
-
email,
|
|
4444
|
-
landmark,
|
|
4445
|
-
city,
|
|
4446
|
-
state,
|
|
4447
|
-
country,
|
|
4610
|
+
body,
|
|
4448
4611
|
},
|
|
4449
4612
|
{ abortEarly: false, allowUnknown: true }
|
|
4450
4613
|
);
|
|
@@ -4456,18 +4619,7 @@ class Order {
|
|
|
4456
4619
|
const { error: warrning } = OrderPlatformValidator.updateAddress().validate(
|
|
4457
4620
|
{
|
|
4458
4621
|
shipmentId,
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
name,
|
|
4462
|
-
address,
|
|
4463
|
-
addressType,
|
|
4464
|
-
pincode,
|
|
4465
|
-
phone,
|
|
4466
|
-
email,
|
|
4467
|
-
landmark,
|
|
4468
|
-
city,
|
|
4469
|
-
state,
|
|
4470
|
-
country,
|
|
4622
|
+
body,
|
|
4471
4623
|
},
|
|
4472
4624
|
{ abortEarly: false, allowUnknown: false }
|
|
4473
4625
|
);
|
|
@@ -4479,27 +4631,15 @@ class Order {
|
|
|
4479
4631
|
}
|
|
4480
4632
|
|
|
4481
4633
|
const query_params = {};
|
|
4482
|
-
query_params["shipment_id"] = shipmentId;
|
|
4483
|
-
query_params["name"] = name;
|
|
4484
|
-
query_params["address"] = address;
|
|
4485
|
-
query_params["address_type"] = addressType;
|
|
4486
|
-
query_params["pincode"] = pincode;
|
|
4487
|
-
query_params["phone"] = phone;
|
|
4488
|
-
query_params["email"] = email;
|
|
4489
|
-
query_params["landmark"] = landmark;
|
|
4490
|
-
query_params["address_category"] = addressCategory;
|
|
4491
|
-
query_params["city"] = city;
|
|
4492
|
-
query_params["state"] = state;
|
|
4493
|
-
query_params["country"] = country;
|
|
4494
4634
|
|
|
4495
4635
|
const xHeaders = {};
|
|
4496
4636
|
|
|
4497
4637
|
const response = await PlatformAPIClient.execute(
|
|
4498
4638
|
this.config,
|
|
4499
|
-
"
|
|
4500
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
4639
|
+
"put",
|
|
4640
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/address`,
|
|
4501
4641
|
query_params,
|
|
4502
|
-
|
|
4642
|
+
body,
|
|
4503
4643
|
{ ...xHeaders, ...requestHeaders },
|
|
4504
4644
|
{ responseHeaders }
|
|
4505
4645
|
);
|
|
@@ -4511,7 +4651,7 @@ class Order {
|
|
|
4511
4651
|
|
|
4512
4652
|
const {
|
|
4513
4653
|
error: res_error,
|
|
4514
|
-
} = OrderPlatformModel.
|
|
4654
|
+
} = OrderPlatformModel.BaseResponseSchema().validate(responseData, {
|
|
4515
4655
|
abortEarly: false,
|
|
4516
4656
|
allowUnknown: true,
|
|
4517
4657
|
});
|
|
@@ -4534,7 +4674,7 @@ class Order {
|
|
|
4534
4674
|
* @param {OrderPlatformValidator.UpdatePackagingDimensionsParam} arg - Arg object
|
|
4535
4675
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4536
4676
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4537
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4677
|
+
* @returns {Promise<OrderPlatformModel.UpdatePackagingDimensionsResponseSchema>}
|
|
4538
4678
|
* - Success response
|
|
4539
4679
|
*
|
|
4540
4680
|
* @name updatePackagingDimensions
|
|
@@ -4594,7 +4734,7 @@ class Order {
|
|
|
4594
4734
|
|
|
4595
4735
|
const {
|
|
4596
4736
|
error: res_error,
|
|
4597
|
-
} = OrderPlatformModel.
|
|
4737
|
+
} = OrderPlatformModel.UpdatePackagingDimensionsResponseSchema().validate(
|
|
4598
4738
|
responseData,
|
|
4599
4739
|
{ abortEarly: false, allowUnknown: true }
|
|
4600
4740
|
);
|
|
@@ -4613,12 +4753,90 @@ class Order {
|
|
|
4613
4753
|
return response;
|
|
4614
4754
|
}
|
|
4615
4755
|
|
|
4756
|
+
/**
|
|
4757
|
+
* @param {OrderPlatformValidator.UpdatePaymentInfoParam} arg - Arg object
|
|
4758
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4759
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4760
|
+
* @returns {Promise<Object>} - Success response
|
|
4761
|
+
* @name updatePaymentInfo
|
|
4762
|
+
* @summary: Update payment details for an order, its shipments and its bags.
|
|
4763
|
+
* @description: Updates the payment mode for an order, its shipments and its bags. This endpoint allows for modifying payment methods, and associated details but not amount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePaymentInfo/).
|
|
4764
|
+
*/
|
|
4765
|
+
async updatePaymentInfo(
|
|
4766
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4767
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
4768
|
+
) {
|
|
4769
|
+
const { error } = OrderPlatformValidator.updatePaymentInfo().validate(
|
|
4770
|
+
{
|
|
4771
|
+
body,
|
|
4772
|
+
},
|
|
4773
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4774
|
+
);
|
|
4775
|
+
if (error) {
|
|
4776
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4777
|
+
}
|
|
4778
|
+
|
|
4779
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4780
|
+
const {
|
|
4781
|
+
error: warrning,
|
|
4782
|
+
} = OrderPlatformValidator.updatePaymentInfo().validate(
|
|
4783
|
+
{
|
|
4784
|
+
body,
|
|
4785
|
+
},
|
|
4786
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4787
|
+
);
|
|
4788
|
+
if (warrning) {
|
|
4789
|
+
Logger({
|
|
4790
|
+
level: "WARN",
|
|
4791
|
+
message: `Parameter Validation warrnings for platform > Order > updatePaymentInfo \n ${warrning}`,
|
|
4792
|
+
});
|
|
4793
|
+
}
|
|
4794
|
+
|
|
4795
|
+
const query_params = {};
|
|
4796
|
+
|
|
4797
|
+
const xHeaders = {};
|
|
4798
|
+
|
|
4799
|
+
const response = await PlatformAPIClient.execute(
|
|
4800
|
+
this.config,
|
|
4801
|
+
"put",
|
|
4802
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/payment/update`,
|
|
4803
|
+
query_params,
|
|
4804
|
+
body,
|
|
4805
|
+
{ ...xHeaders, ...requestHeaders },
|
|
4806
|
+
{ responseHeaders }
|
|
4807
|
+
);
|
|
4808
|
+
|
|
4809
|
+
let responseData = response;
|
|
4810
|
+
if (responseHeaders) {
|
|
4811
|
+
responseData = response[0];
|
|
4812
|
+
}
|
|
4813
|
+
|
|
4814
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
4815
|
+
abortEarly: false,
|
|
4816
|
+
allowUnknown: true,
|
|
4817
|
+
});
|
|
4818
|
+
|
|
4819
|
+
if (res_error) {
|
|
4820
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
4821
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4822
|
+
} else {
|
|
4823
|
+
Logger({
|
|
4824
|
+
level: "WARN",
|
|
4825
|
+
message: `Response Validation Warnings for platform > Order > updatePaymentInfo \n ${res_error}`,
|
|
4826
|
+
});
|
|
4827
|
+
}
|
|
4828
|
+
}
|
|
4829
|
+
|
|
4830
|
+
return response;
|
|
4831
|
+
}
|
|
4832
|
+
|
|
4616
4833
|
/**
|
|
4617
4834
|
* @param {OrderPlatformValidator.UpdateShipmentLockParam} arg - Arg object
|
|
4618
4835
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4619
4836
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4620
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4621
|
-
* Success response
|
|
4837
|
+
* @returns {Promise<OrderPlatformModel.UpdateShipmentLockResponseSchema>}
|
|
4838
|
+
* - Success response
|
|
4839
|
+
*
|
|
4622
4840
|
* @name updateShipmentLock
|
|
4623
4841
|
* @summary: Update a shipment lock
|
|
4624
4842
|
* @description: Modify shipment/bag lock status and update lock/unlock messages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentLock/).
|
|
@@ -4674,10 +4892,10 @@ class Order {
|
|
|
4674
4892
|
|
|
4675
4893
|
const {
|
|
4676
4894
|
error: res_error,
|
|
4677
|
-
} = OrderPlatformModel.
|
|
4678
|
-
|
|
4679
|
-
allowUnknown: true
|
|
4680
|
-
|
|
4895
|
+
} = OrderPlatformModel.UpdateShipmentLockResponseSchema().validate(
|
|
4896
|
+
responseData,
|
|
4897
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4898
|
+
);
|
|
4681
4899
|
|
|
4682
4900
|
if (res_error) {
|
|
4683
4901
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4858,7 +5076,7 @@ class Order {
|
|
|
4858
5076
|
* @param {OrderPlatformValidator.UploadConsentsParam} arg - Arg object
|
|
4859
5077
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4860
5078
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4861
|
-
* @returns {Promise<OrderPlatformModel.
|
|
5079
|
+
* @returns {Promise<OrderPlatformModel.SuccessResponseSchema>} - Success response
|
|
4862
5080
|
* @name uploadConsents
|
|
4863
5081
|
* @summary: Upload consent
|
|
4864
5082
|
* @description: Uploads the consent signed by courier partner and seller to keep records - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsents/).
|
|
@@ -4914,7 +5132,7 @@ class Order {
|
|
|
4914
5132
|
|
|
4915
5133
|
const {
|
|
4916
5134
|
error: res_error,
|
|
4917
|
-
} = OrderPlatformModel.
|
|
5135
|
+
} = OrderPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
4918
5136
|
abortEarly: false,
|
|
4919
5137
|
allowUnknown: true,
|
|
4920
5138
|
});
|
|
@@ -4937,7 +5155,7 @@ class Order {
|
|
|
4937
5155
|
* @param {OrderPlatformValidator.VerifyMobileOTPParam} arg - Arg object
|
|
4938
5156
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4939
5157
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4940
|
-
* @returns {Promise<OrderPlatformModel.
|
|
5158
|
+
* @returns {Promise<OrderPlatformModel.VerifyOtpResponseSchema>} - Success response
|
|
4941
5159
|
* @name verifyMobileOTP
|
|
4942
5160
|
* @summary: Verify mobile OTP
|
|
4943
5161
|
* @description: Perform OTP verification to link a user to an anonymous order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/verifyMobileOTP/).
|
|
@@ -4993,7 +5211,7 @@ class Order {
|
|
|
4993
5211
|
|
|
4994
5212
|
const {
|
|
4995
5213
|
error: res_error,
|
|
4996
|
-
} = OrderPlatformModel.
|
|
5214
|
+
} = OrderPlatformModel.VerifyOtpResponseSchema().validate(responseData, {
|
|
4997
5215
|
abortEarly: false,
|
|
4998
5216
|
allowUnknown: true,
|
|
4999
5217
|
});
|