@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.0.0
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 +93 -113
- package/sdk/application/Cart/CartApplicationClient.js +157 -530
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -19
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
- package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
- package/sdk/application/Content/ContentApplicationClient.d.ts +65 -55
- package/sdk/application/Content/ContentApplicationClient.js +211 -341
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -33
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
- package/sdk/application/Lead/LeadApplicationClient.js +24 -55
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +32 -87
- package/sdk/application/Logistic/LogisticApplicationClient.js +126 -383
- package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
- package/sdk/application/Order/OrderApplicationClient.js +89 -293
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
- package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
- package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
- package/sdk/application/Share/ShareApplicationClient.js +35 -89
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
- package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
- package/sdk/application/User/UserApplicationClient.d.ts +23 -13
- package/sdk/application/User/UserApplicationClient.js +49 -407
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +18 -62
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +40 -372
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +99 -33
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +84 -25
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +7 -38
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
- package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
- package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
- package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
- package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
- package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -406
- package/sdk/platform/Billing/BillingPlatformClient.js +76 -3214
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +459 -3798
- package/sdk/platform/Billing/BillingPlatformModel.js +338 -2573
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +24 -465
- package/sdk/platform/Billing/BillingPlatformValidator.js +14 -490
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +205 -284
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +554 -672
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +132 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4865 -3148
- package/sdk/platform/Cart/CartPlatformModel.js +2071 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +419 -1015
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6444
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +226 -1117
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +127 -919
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +574 -372
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1315 -1238
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9334 -7634
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6980 -9652
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +239 -294
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +186 -246
- package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
- package/sdk/platform/Common/CommonPlatformModel.js +11 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +236 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +579 -868
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +314 -422
- package/sdk/platform/Communication/CommunicationPlatformModel.js +382 -538
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -68
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -84
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +118 -333
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +565 -1282
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +369 -1034
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -246
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1297 -776
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
- package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
- package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2374 -877
- package/sdk/platform/Content/ContentPlatformModel.js +1304 -930
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
- package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
- package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
- package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
- package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
- package/sdk/platform/Order/OrderPlatformClient.d.ts +421 -418
- package/sdk/platform/Order/OrderPlatformClient.js +1194 -1350
- package/sdk/platform/Order/OrderPlatformModel.d.ts +9145 -4107
- package/sdk/platform/Order/OrderPlatformModel.js +4257 -3197
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +641 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +341 -311
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
- package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +934 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -305
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
- package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1327 -3529
- package/sdk/platform/Payment/PaymentPlatformModel.js +1397 -3693
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
- package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
- 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 +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -513
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -103
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -99
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +162 -127
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +775 -435
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6250 -3861
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3178 -3798
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +295 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -133
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
- package/sdk/platform/Share/SharePlatformModel.d.ts +53 -4
- package/sdk/platform/Share/SharePlatformModel.js +45 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +4 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +10 -157
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -21
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +6 -23
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
- package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
- package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
- package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
- package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
- package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
- package/sdk/platform/User/UserPlatformModel.js +253 -210
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
- package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
- 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/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
- package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
- package/sdk/public/Content/ContentPublicClient.js +254 -280
- package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
- package/sdk/public/Content/ContentPublicModel.js +98 -44
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
- package/sdk/public/Content/ContentPublicValidator.js +26 -19
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +1 -1
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
- package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
- package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
- package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
- package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
- package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
- 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 -2895
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
- package/sdk/public/Billing/BillingPublicClient.js +0 -397
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
- package/sdk/public/Billing/BillingPublicModel.js +0 -560
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
- package/sdk/public/Billing/BillingPublicValidator.js +0 -50
|
@@ -15,20 +15,20 @@ class Order {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @param {OrderPlatformValidator.
|
|
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
22
|
* Success response
|
|
23
|
-
* @name
|
|
24
|
-
* @summary:
|
|
25
|
-
* @description:
|
|
23
|
+
* @name addStateManagerConfig
|
|
24
|
+
* @summary: Allows esm config updation
|
|
25
|
+
* @description: Update ESM config - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/addStateManagerConfig/).
|
|
26
26
|
*/
|
|
27
|
-
async
|
|
27
|
+
async addStateManagerConfig(
|
|
28
28
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
29
29
|
{ responseHeaders } = { responseHeaders: false }
|
|
30
30
|
) {
|
|
31
|
-
const { error } = OrderPlatformValidator.
|
|
31
|
+
const { error } = OrderPlatformValidator.addStateManagerConfig().validate(
|
|
32
32
|
{
|
|
33
33
|
body,
|
|
34
34
|
},
|
|
@@ -39,7 +39,9 @@ class Order {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// Showing warrnings if extra unknown parameters are found
|
|
42
|
-
const {
|
|
42
|
+
const {
|
|
43
|
+
error: warrning,
|
|
44
|
+
} = OrderPlatformValidator.addStateManagerConfig().validate(
|
|
43
45
|
{
|
|
44
46
|
body,
|
|
45
47
|
},
|
|
@@ -48,7 +50,7 @@ class Order {
|
|
|
48
50
|
if (warrning) {
|
|
49
51
|
Logger({
|
|
50
52
|
level: "WARN",
|
|
51
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
53
|
+
message: `Parameter Validation warrnings for platform > Order > addStateManagerConfig \n ${warrning}`,
|
|
52
54
|
});
|
|
53
55
|
}
|
|
54
56
|
|
|
@@ -59,7 +61,7 @@ class Order {
|
|
|
59
61
|
const response = await PlatformAPIClient.execute(
|
|
60
62
|
this.config,
|
|
61
63
|
"post",
|
|
62
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/
|
|
64
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/state/manager/config`,
|
|
63
65
|
query_params,
|
|
64
66
|
body,
|
|
65
67
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -73,10 +75,10 @@ class Order {
|
|
|
73
75
|
|
|
74
76
|
const {
|
|
75
77
|
error: res_error,
|
|
76
|
-
} = OrderPlatformModel.
|
|
77
|
-
|
|
78
|
-
allowUnknown: true
|
|
79
|
-
|
|
78
|
+
} = OrderPlatformModel.ConfigUpdatedResponseSchema().validate(
|
|
79
|
+
responseData,
|
|
80
|
+
{ abortEarly: false, allowUnknown: true }
|
|
81
|
+
);
|
|
80
82
|
|
|
81
83
|
if (res_error) {
|
|
82
84
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -84,7 +86,7 @@ class Order {
|
|
|
84
86
|
} else {
|
|
85
87
|
Logger({
|
|
86
88
|
level: "WARN",
|
|
87
|
-
message: `Response Validation Warnings for platform > Order >
|
|
89
|
+
message: `Response Validation Warnings for platform > Order > addStateManagerConfig \n ${res_error}`,
|
|
88
90
|
});
|
|
89
91
|
}
|
|
90
92
|
}
|
|
@@ -96,10 +98,11 @@ class Order {
|
|
|
96
98
|
* @param {OrderPlatformValidator.AttachOrderUserParam} arg - Arg object
|
|
97
99
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
98
100
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
99
|
-
* @returns {Promise<OrderPlatformModel.
|
|
101
|
+
* @returns {Promise<OrderPlatformModel.AttachOrderUserResponseSchema>} -
|
|
102
|
+
* Success response
|
|
100
103
|
* @name attachOrderUser
|
|
101
|
-
* @summary: Attach order user
|
|
102
|
-
* @description: Attach order
|
|
104
|
+
* @summary: Attach order to a user
|
|
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/).
|
|
103
106
|
*/
|
|
104
107
|
async attachOrderUser(
|
|
105
108
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -152,10 +155,10 @@ class Order {
|
|
|
152
155
|
|
|
153
156
|
const {
|
|
154
157
|
error: res_error,
|
|
155
|
-
} = OrderPlatformModel.
|
|
156
|
-
|
|
157
|
-
allowUnknown: true
|
|
158
|
-
|
|
158
|
+
} = OrderPlatformModel.AttachOrderUserResponseSchema().validate(
|
|
159
|
+
responseData,
|
|
160
|
+
{ abortEarly: false, allowUnknown: true }
|
|
161
|
+
);
|
|
159
162
|
|
|
160
163
|
if (res_error) {
|
|
161
164
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -175,11 +178,10 @@ class Order {
|
|
|
175
178
|
* @param {OrderPlatformValidator.BulkListingParam} arg - Arg object
|
|
176
179
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
177
180
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
178
|
-
* @returns {Promise<OrderPlatformModel.
|
|
181
|
+
* @returns {Promise<OrderPlatformModel.BulkListingResponseSchema>} - Success response
|
|
179
182
|
* @name bulkListing
|
|
180
|
-
* @summary:
|
|
181
|
-
* @description:
|
|
182
|
-
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkListing/).
|
|
183
|
+
* @summary: Lists bulk operations
|
|
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/).
|
|
183
185
|
*/
|
|
184
186
|
async bulkListing(
|
|
185
187
|
{
|
|
@@ -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,11 +283,12 @@ 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
|
-
* @summary:
|
|
288
|
-
* @description: Performs
|
|
290
|
+
* @summary: Upload bulk state transitions file
|
|
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/).
|
|
289
292
|
*/
|
|
290
293
|
async bulkStateTransistion(
|
|
291
294
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -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
|
);
|
|
@@ -363,8 +366,8 @@ class Order {
|
|
|
363
366
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
364
367
|
* @returns {Promise<OrderPlatformModel.OrderStatusResult>} - Success response
|
|
365
368
|
* @name checkOrderStatus
|
|
366
|
-
* @summary:
|
|
367
|
-
* @description:
|
|
369
|
+
* @summary: Debug order
|
|
370
|
+
* @description: Used to verify the status of order. It queries error logs, resyncs the shipments if there was an issue with sync etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/checkOrderStatus/).
|
|
368
371
|
*/
|
|
369
372
|
async checkOrderStatus(
|
|
370
373
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -437,28 +440,23 @@ class Order {
|
|
|
437
440
|
}
|
|
438
441
|
|
|
439
442
|
/**
|
|
440
|
-
* @param {OrderPlatformValidator.
|
|
443
|
+
* @param {OrderPlatformValidator.CreateChannelConfigParam} arg - Arg object
|
|
441
444
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
442
445
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
443
|
-
* @returns {Promise<OrderPlatformModel.
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
* @
|
|
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/).
|
|
447
452
|
*/
|
|
448
|
-
async
|
|
449
|
-
{
|
|
450
|
-
requestHeaders: {},
|
|
451
|
-
},
|
|
453
|
+
async createChannelConfig(
|
|
454
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
452
455
|
{ responseHeaders } = { responseHeaders: false }
|
|
453
456
|
) {
|
|
454
|
-
const { error } = OrderPlatformValidator.
|
|
457
|
+
const { error } = OrderPlatformValidator.createChannelConfig().validate(
|
|
455
458
|
{
|
|
456
|
-
|
|
457
|
-
receiver,
|
|
458
|
-
bagId,
|
|
459
|
-
|
|
460
|
-
callerId,
|
|
461
|
-
method,
|
|
459
|
+
body,
|
|
462
460
|
},
|
|
463
461
|
{ abortEarly: false, allowUnknown: true }
|
|
464
462
|
);
|
|
@@ -467,39 +465,31 @@ class Order {
|
|
|
467
465
|
}
|
|
468
466
|
|
|
469
467
|
// Showing warrnings if extra unknown parameters are found
|
|
470
|
-
const {
|
|
468
|
+
const {
|
|
469
|
+
error: warrning,
|
|
470
|
+
} = OrderPlatformValidator.createChannelConfig().validate(
|
|
471
471
|
{
|
|
472
|
-
|
|
473
|
-
receiver,
|
|
474
|
-
bagId,
|
|
475
|
-
|
|
476
|
-
callerId,
|
|
477
|
-
method,
|
|
472
|
+
body,
|
|
478
473
|
},
|
|
479
474
|
{ abortEarly: false, allowUnknown: false }
|
|
480
475
|
);
|
|
481
476
|
if (warrning) {
|
|
482
477
|
Logger({
|
|
483
478
|
level: "WARN",
|
|
484
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
479
|
+
message: `Parameter Validation warrnings for platform > Order > createChannelConfig \n ${warrning}`,
|
|
485
480
|
});
|
|
486
481
|
}
|
|
487
482
|
|
|
488
483
|
const query_params = {};
|
|
489
|
-
query_params["caller"] = caller;
|
|
490
|
-
query_params["receiver"] = receiver;
|
|
491
|
-
query_params["bag_id"] = bagId;
|
|
492
|
-
query_params["caller_id"] = callerId;
|
|
493
|
-
query_params["method"] = method;
|
|
494
484
|
|
|
495
485
|
const xHeaders = {};
|
|
496
486
|
|
|
497
487
|
const response = await PlatformAPIClient.execute(
|
|
498
488
|
this.config,
|
|
499
|
-
"
|
|
500
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
489
|
+
"post",
|
|
490
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
501
491
|
query_params,
|
|
502
|
-
|
|
492
|
+
body,
|
|
503
493
|
{ ...xHeaders, ...requestHeaders },
|
|
504
494
|
{ responseHeaders }
|
|
505
495
|
);
|
|
@@ -511,10 +501,10 @@ class Order {
|
|
|
511
501
|
|
|
512
502
|
const {
|
|
513
503
|
error: res_error,
|
|
514
|
-
} = OrderPlatformModel.
|
|
515
|
-
|
|
516
|
-
allowUnknown: true
|
|
517
|
-
|
|
504
|
+
} = OrderPlatformModel.CreateChannelConfigResponseSchema().validate(
|
|
505
|
+
responseData,
|
|
506
|
+
{ abortEarly: false, allowUnknown: true }
|
|
507
|
+
);
|
|
518
508
|
|
|
519
509
|
if (res_error) {
|
|
520
510
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -522,7 +512,7 @@ class Order {
|
|
|
522
512
|
} else {
|
|
523
513
|
Logger({
|
|
524
514
|
level: "WARN",
|
|
525
|
-
message: `Response Validation Warnings for platform > Order >
|
|
515
|
+
message: `Response Validation Warnings for platform > Order > createChannelConfig \n ${res_error}`,
|
|
526
516
|
});
|
|
527
517
|
}
|
|
528
518
|
}
|
|
@@ -534,10 +524,10 @@ class Order {
|
|
|
534
524
|
* @param {OrderPlatformValidator.CreateOrderParam} arg - Arg object
|
|
535
525
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
536
526
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
537
|
-
* @returns {Promise<OrderPlatformModel.
|
|
527
|
+
* @returns {Promise<OrderPlatformModel.CreateOrderResponseSchema>} - Success response
|
|
538
528
|
* @name createOrder
|
|
539
|
-
* @summary: Create order
|
|
540
|
-
* @description:
|
|
529
|
+
* @summary: Create order
|
|
530
|
+
* @description: Creates an order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/).
|
|
541
531
|
*/
|
|
542
532
|
async createOrder(
|
|
543
533
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -588,7 +578,7 @@ class Order {
|
|
|
588
578
|
|
|
589
579
|
const {
|
|
590
580
|
error: res_error,
|
|
591
|
-
} = OrderPlatformModel.
|
|
581
|
+
} = OrderPlatformModel.CreateOrderResponseSchema().validate(responseData, {
|
|
592
582
|
abortEarly: false,
|
|
593
583
|
allowUnknown: true,
|
|
594
584
|
});
|
|
@@ -608,22 +598,21 @@ class Order {
|
|
|
608
598
|
}
|
|
609
599
|
|
|
610
600
|
/**
|
|
611
|
-
* @param {OrderPlatformValidator.
|
|
601
|
+
* @param {OrderPlatformValidator.DispatchManifestsParam} arg - Arg object
|
|
612
602
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
613
603
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
614
|
-
* @returns {Promise<OrderPlatformModel.
|
|
615
|
-
*
|
|
616
|
-
* @
|
|
617
|
-
* @
|
|
618
|
-
* @description: Delete custom view for every unique user cross company pair. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/deleteUserViews/).
|
|
604
|
+
* @returns {Promise<OrderPlatformModel.SuccessResponseSchema>} - Success response
|
|
605
|
+
* @name dispatchManifests
|
|
606
|
+
* @summary: Dispatch manifest
|
|
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/).
|
|
619
608
|
*/
|
|
620
|
-
async
|
|
621
|
-
{
|
|
609
|
+
async dispatchManifests(
|
|
610
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
622
611
|
{ responseHeaders } = { responseHeaders: false }
|
|
623
612
|
) {
|
|
624
|
-
const { error } = OrderPlatformValidator.
|
|
613
|
+
const { error } = OrderPlatformValidator.dispatchManifests().validate(
|
|
625
614
|
{
|
|
626
|
-
|
|
615
|
+
body,
|
|
627
616
|
},
|
|
628
617
|
{ abortEarly: false, allowUnknown: true }
|
|
629
618
|
);
|
|
@@ -634,30 +623,29 @@ class Order {
|
|
|
634
623
|
// Showing warrnings if extra unknown parameters are found
|
|
635
624
|
const {
|
|
636
625
|
error: warrning,
|
|
637
|
-
} = OrderPlatformValidator.
|
|
626
|
+
} = OrderPlatformValidator.dispatchManifests().validate(
|
|
638
627
|
{
|
|
639
|
-
|
|
628
|
+
body,
|
|
640
629
|
},
|
|
641
630
|
{ abortEarly: false, allowUnknown: false }
|
|
642
631
|
);
|
|
643
632
|
if (warrning) {
|
|
644
633
|
Logger({
|
|
645
634
|
level: "WARN",
|
|
646
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
635
|
+
message: `Parameter Validation warrnings for platform > Order > dispatchManifests \n ${warrning}`,
|
|
647
636
|
});
|
|
648
637
|
}
|
|
649
638
|
|
|
650
639
|
const query_params = {};
|
|
651
|
-
query_params["view_id"] = viewId;
|
|
652
640
|
|
|
653
641
|
const xHeaders = {};
|
|
654
642
|
|
|
655
643
|
const response = await PlatformAPIClient.execute(
|
|
656
644
|
this.config,
|
|
657
|
-
"
|
|
658
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/
|
|
645
|
+
"post",
|
|
646
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/dispatch`,
|
|
659
647
|
query_params,
|
|
660
|
-
|
|
648
|
+
body,
|
|
661
649
|
{ ...xHeaders, ...requestHeaders },
|
|
662
650
|
{ responseHeaders }
|
|
663
651
|
);
|
|
@@ -669,7 +657,7 @@ class Order {
|
|
|
669
657
|
|
|
670
658
|
const {
|
|
671
659
|
error: res_error,
|
|
672
|
-
} = OrderPlatformModel.
|
|
660
|
+
} = OrderPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
673
661
|
abortEarly: false,
|
|
674
662
|
allowUnknown: true,
|
|
675
663
|
});
|
|
@@ -680,7 +668,7 @@ class Order {
|
|
|
680
668
|
} else {
|
|
681
669
|
Logger({
|
|
682
670
|
level: "WARN",
|
|
683
|
-
message: `Response Validation Warnings for platform > Order >
|
|
671
|
+
message: `Response Validation Warnings for platform > Order > dispatchManifests \n ${res_error}`,
|
|
684
672
|
});
|
|
685
673
|
}
|
|
686
674
|
}
|
|
@@ -692,10 +680,10 @@ class Order {
|
|
|
692
680
|
* @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object
|
|
693
681
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
694
682
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
695
|
-
* @returns {Promise<OrderPlatformModel.
|
|
683
|
+
* @returns {Promise<OrderPlatformModel.FileResponseSchema>} - Success response
|
|
696
684
|
* @name downloadBulkActionTemplate
|
|
697
|
-
* @summary: Download bulk
|
|
698
|
-
* @description: Download bulk
|
|
685
|
+
* @summary: Download bulk template
|
|
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/).
|
|
699
687
|
*/
|
|
700
688
|
async downloadBulkActionTemplate(
|
|
701
689
|
{ templateSlug, requestHeaders } = { requestHeaders: {} },
|
|
@@ -751,7 +739,7 @@ class Order {
|
|
|
751
739
|
|
|
752
740
|
const {
|
|
753
741
|
error: res_error,
|
|
754
|
-
} = OrderPlatformModel.
|
|
742
|
+
} = OrderPlatformModel.FileResponseSchema().validate(responseData, {
|
|
755
743
|
abortEarly: false,
|
|
756
744
|
allowUnknown: true,
|
|
757
745
|
});
|
|
@@ -774,11 +762,12 @@ class Order {
|
|
|
774
762
|
* @param {OrderPlatformValidator.DownloadLanesReportParam} arg - Arg object
|
|
775
763
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
776
764
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
777
|
-
* @returns {Promise<OrderPlatformModel.
|
|
778
|
-
* Success response
|
|
765
|
+
* @returns {Promise<OrderPlatformModel.BulkReportsDownloadResponseSchema>}
|
|
766
|
+
* - Success response
|
|
767
|
+
*
|
|
779
768
|
* @name downloadLanesReport
|
|
780
|
-
* @summary:
|
|
781
|
-
* @description: Downloads
|
|
769
|
+
* @summary: Download Lane report
|
|
770
|
+
* @description: Downloads shipments/orders present in the provided lane - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadLanesReport/).
|
|
782
771
|
*/
|
|
783
772
|
async downloadLanesReport(
|
|
784
773
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -831,7 +820,7 @@ class Order {
|
|
|
831
820
|
|
|
832
821
|
const {
|
|
833
822
|
error: res_error,
|
|
834
|
-
} = OrderPlatformModel.
|
|
823
|
+
} = OrderPlatformModel.BulkReportsDownloadResponseSchema().validate(
|
|
835
824
|
responseData,
|
|
836
825
|
{ abortEarly: false, allowUnknown: true }
|
|
837
826
|
);
|
|
@@ -854,10 +843,11 @@ class Order {
|
|
|
854
843
|
* @param {OrderPlatformValidator.EInvoiceRetryParam} arg - Arg object
|
|
855
844
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
856
845
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
857
|
-
* @returns {Promise<OrderPlatformModel.
|
|
846
|
+
* @returns {Promise<OrderPlatformModel.EInvoiceRetryResponseSchema>} -
|
|
847
|
+
* Success response
|
|
858
848
|
* @name eInvoiceRetry
|
|
859
|
-
* @summary: Retry
|
|
860
|
-
* @description:
|
|
849
|
+
* @summary: Retry E-invoice
|
|
850
|
+
* @description: Reattempt the generation of an E-invoice - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/eInvoiceRetry/).
|
|
861
851
|
*/
|
|
862
852
|
async eInvoiceRetry(
|
|
863
853
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -908,10 +898,10 @@ class Order {
|
|
|
908
898
|
|
|
909
899
|
const {
|
|
910
900
|
error: res_error,
|
|
911
|
-
} = OrderPlatformModel.
|
|
912
|
-
|
|
913
|
-
allowUnknown: true
|
|
914
|
-
|
|
901
|
+
} = OrderPlatformModel.EInvoiceRetryResponseSchema().validate(
|
|
902
|
+
responseData,
|
|
903
|
+
{ abortEarly: false, allowUnknown: true }
|
|
904
|
+
);
|
|
915
905
|
|
|
916
906
|
if (res_error) {
|
|
917
907
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -933,8 +923,8 @@ class Order {
|
|
|
933
923
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
934
924
|
* @returns {Promise<OrderPlatformModel.FailedOrderLogDetails>} - Success response
|
|
935
925
|
* @name failedOrderLogDetails
|
|
936
|
-
* @summary: Get failed order
|
|
937
|
-
* @description:
|
|
926
|
+
* @summary: Get failed order log
|
|
927
|
+
* @description: Get the exact error trace from the log Id provided in the failed order list API response - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogDetails/).
|
|
938
928
|
*/
|
|
939
929
|
async failedOrderLogDetails(
|
|
940
930
|
{ logId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1007,25 +997,32 @@ class Order {
|
|
|
1007
997
|
}
|
|
1008
998
|
|
|
1009
999
|
/**
|
|
1010
|
-
* @param {OrderPlatformValidator.
|
|
1000
|
+
* @param {OrderPlatformValidator.FailedOrderLogsParam} arg - Arg object
|
|
1011
1001
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1012
1002
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1013
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1014
|
-
*
|
|
1015
|
-
*
|
|
1016
|
-
* @
|
|
1017
|
-
* @summary: Fetch credit balance detail.
|
|
1018
|
-
* @description: Retrieve details about credit balance. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchCreditBalanceDetail/).
|
|
1003
|
+
* @returns {Promise<OrderPlatformModel.FailedOrderLogs>} - Success response
|
|
1004
|
+
* @name failedOrderLogs
|
|
1005
|
+
* @summary: List failed order logs
|
|
1006
|
+
* @description: Get failed order logs listing for filters based on order Id, user contact number, user email Id and sales channel Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogs/).
|
|
1019
1007
|
*/
|
|
1020
|
-
async
|
|
1021
|
-
{
|
|
1008
|
+
async failedOrderLogs(
|
|
1009
|
+
{
|
|
1010
|
+
applicationId,
|
|
1011
|
+
pageNo,
|
|
1012
|
+
pageSize,
|
|
1013
|
+
searchType,
|
|
1014
|
+
searchValue,
|
|
1015
|
+
requestHeaders,
|
|
1016
|
+
} = { requestHeaders: {} },
|
|
1022
1017
|
{ responseHeaders } = { responseHeaders: false }
|
|
1023
1018
|
) {
|
|
1024
|
-
const {
|
|
1025
|
-
error,
|
|
1026
|
-
} = OrderPlatformValidator.fetchCreditBalanceDetail().validate(
|
|
1019
|
+
const { error } = OrderPlatformValidator.failedOrderLogs().validate(
|
|
1027
1020
|
{
|
|
1028
|
-
|
|
1021
|
+
applicationId,
|
|
1022
|
+
pageNo,
|
|
1023
|
+
pageSize,
|
|
1024
|
+
searchType,
|
|
1025
|
+
searchValue,
|
|
1029
1026
|
},
|
|
1030
1027
|
{ abortEarly: false, allowUnknown: true }
|
|
1031
1028
|
);
|
|
@@ -1036,29 +1033,38 @@ class Order {
|
|
|
1036
1033
|
// Showing warrnings if extra unknown parameters are found
|
|
1037
1034
|
const {
|
|
1038
1035
|
error: warrning,
|
|
1039
|
-
} = OrderPlatformValidator.
|
|
1036
|
+
} = OrderPlatformValidator.failedOrderLogs().validate(
|
|
1040
1037
|
{
|
|
1041
|
-
|
|
1038
|
+
applicationId,
|
|
1039
|
+
pageNo,
|
|
1040
|
+
pageSize,
|
|
1041
|
+
searchType,
|
|
1042
|
+
searchValue,
|
|
1042
1043
|
},
|
|
1043
1044
|
{ abortEarly: false, allowUnknown: false }
|
|
1044
1045
|
);
|
|
1045
1046
|
if (warrning) {
|
|
1046
1047
|
Logger({
|
|
1047
1048
|
level: "WARN",
|
|
1048
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
1049
|
+
message: `Parameter Validation warrnings for platform > Order > failedOrderLogs \n ${warrning}`,
|
|
1049
1050
|
});
|
|
1050
1051
|
}
|
|
1051
1052
|
|
|
1052
1053
|
const query_params = {};
|
|
1054
|
+
query_params["application_id"] = applicationId;
|
|
1055
|
+
query_params["page_no"] = pageNo;
|
|
1056
|
+
query_params["page_size"] = pageSize;
|
|
1057
|
+
query_params["search_type"] = searchType;
|
|
1058
|
+
query_params["search_value"] = searchValue;
|
|
1053
1059
|
|
|
1054
1060
|
const xHeaders = {};
|
|
1055
1061
|
|
|
1056
1062
|
const response = await PlatformAPIClient.execute(
|
|
1057
1063
|
this.config,
|
|
1058
|
-
"
|
|
1059
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
1064
|
+
"get",
|
|
1065
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/orders/failed`,
|
|
1060
1066
|
query_params,
|
|
1061
|
-
|
|
1067
|
+
undefined,
|
|
1062
1068
|
{ ...xHeaders, ...requestHeaders },
|
|
1063
1069
|
{ responseHeaders }
|
|
1064
1070
|
);
|
|
@@ -1070,10 +1076,10 @@ class Order {
|
|
|
1070
1076
|
|
|
1071
1077
|
const {
|
|
1072
1078
|
error: res_error,
|
|
1073
|
-
} = OrderPlatformModel.
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
);
|
|
1079
|
+
} = OrderPlatformModel.FailedOrderLogs().validate(responseData, {
|
|
1080
|
+
abortEarly: false,
|
|
1081
|
+
allowUnknown: true,
|
|
1082
|
+
});
|
|
1077
1083
|
|
|
1078
1084
|
if (res_error) {
|
|
1079
1085
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1081,7 +1087,7 @@ class Order {
|
|
|
1081
1087
|
} else {
|
|
1082
1088
|
Logger({
|
|
1083
1089
|
level: "WARN",
|
|
1084
|
-
message: `Response Validation Warnings for platform > Order >
|
|
1090
|
+
message: `Response Validation Warnings for platform > Order > failedOrderLogs \n ${res_error}`,
|
|
1085
1091
|
});
|
|
1086
1092
|
}
|
|
1087
1093
|
}
|
|
@@ -1096,8 +1102,8 @@ class Order {
|
|
|
1096
1102
|
* @returns {Promise<OrderPlatformModel.RefundModeConfigResponsePayload>} -
|
|
1097
1103
|
* Success response
|
|
1098
1104
|
* @name fetchRefundModeConfig
|
|
1099
|
-
* @summary:
|
|
1100
|
-
* @description:
|
|
1105
|
+
* @summary: List refund modes
|
|
1106
|
+
* @description: Get list of refund modes to trigger refunds - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchRefundModeConfig/).
|
|
1101
1107
|
*/
|
|
1102
1108
|
async fetchRefundModeConfig(
|
|
1103
1109
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1170,14 +1176,97 @@ class Order {
|
|
|
1170
1176
|
}
|
|
1171
1177
|
|
|
1172
1178
|
/**
|
|
1173
|
-
* @param {OrderPlatformValidator.
|
|
1179
|
+
* @param {OrderPlatformValidator.GenerateInvoiceIDParam} arg - Arg object
|
|
1174
1180
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1175
1181
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1176
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1182
|
+
* @returns {Promise<OrderPlatformModel.GenerateInvoiceIDResponseSchema>} -
|
|
1177
1183
|
* Success response
|
|
1184
|
+
* @name generateInvoiceID
|
|
1185
|
+
* @summary: Generate and attach invoice Id
|
|
1186
|
+
* @description: Generate and attach Invoice Ids against shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateInvoiceID/).
|
|
1187
|
+
*/
|
|
1188
|
+
async generateInvoiceID(
|
|
1189
|
+
{ invoiceType, body, requestHeaders } = { requestHeaders: {} },
|
|
1190
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1191
|
+
) {
|
|
1192
|
+
const { error } = OrderPlatformValidator.generateInvoiceID().validate(
|
|
1193
|
+
{
|
|
1194
|
+
invoiceType,
|
|
1195
|
+
body,
|
|
1196
|
+
},
|
|
1197
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1198
|
+
);
|
|
1199
|
+
if (error) {
|
|
1200
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1204
|
+
const {
|
|
1205
|
+
error: warrning,
|
|
1206
|
+
} = OrderPlatformValidator.generateInvoiceID().validate(
|
|
1207
|
+
{
|
|
1208
|
+
invoiceType,
|
|
1209
|
+
body,
|
|
1210
|
+
},
|
|
1211
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1212
|
+
);
|
|
1213
|
+
if (warrning) {
|
|
1214
|
+
Logger({
|
|
1215
|
+
level: "WARN",
|
|
1216
|
+
message: `Parameter Validation warrnings for platform > Order > generateInvoiceID \n ${warrning}`,
|
|
1217
|
+
});
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
const query_params = {};
|
|
1221
|
+
|
|
1222
|
+
const xHeaders = {};
|
|
1223
|
+
|
|
1224
|
+
const response = await PlatformAPIClient.execute(
|
|
1225
|
+
this.config,
|
|
1226
|
+
"post",
|
|
1227
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/${invoiceType}/id/generate`,
|
|
1228
|
+
query_params,
|
|
1229
|
+
body,
|
|
1230
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1231
|
+
{ responseHeaders }
|
|
1232
|
+
);
|
|
1233
|
+
|
|
1234
|
+
let responseData = response;
|
|
1235
|
+
if (responseHeaders) {
|
|
1236
|
+
responseData = response[0];
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
const {
|
|
1240
|
+
error: res_error,
|
|
1241
|
+
} = OrderPlatformModel.GenerateInvoiceIDResponseSchema().validate(
|
|
1242
|
+
responseData,
|
|
1243
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1244
|
+
);
|
|
1245
|
+
|
|
1246
|
+
if (res_error) {
|
|
1247
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1248
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1249
|
+
} else {
|
|
1250
|
+
Logger({
|
|
1251
|
+
level: "WARN",
|
|
1252
|
+
message: `Response Validation Warnings for platform > Order > generateInvoiceID \n ${res_error}`,
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
return response;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object
|
|
1262
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1263
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1264
|
+
* @returns {Promise<OrderPlatformModel.GeneratePosOrderReceiptResponseSchema>}
|
|
1265
|
+
* - Success response
|
|
1266
|
+
*
|
|
1178
1267
|
* @name generatePOSReceiptByOrderId
|
|
1179
|
-
* @summary: Generate POS receipt by order
|
|
1180
|
-
* @description:
|
|
1268
|
+
* @summary: Generate POS receipt by order Id
|
|
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/).
|
|
1181
1270
|
*/
|
|
1182
1271
|
async generatePOSReceiptByOrderId(
|
|
1183
1272
|
{ orderId, shipmentId, documentType, requestHeaders } = {
|
|
@@ -1240,7 +1329,7 @@ class Order {
|
|
|
1240
1329
|
|
|
1241
1330
|
const {
|
|
1242
1331
|
error: res_error,
|
|
1243
|
-
} = OrderPlatformModel.
|
|
1332
|
+
} = OrderPlatformModel.GeneratePosOrderReceiptResponseSchema().validate(
|
|
1244
1333
|
responseData,
|
|
1245
1334
|
{ abortEarly: false, allowUnknown: true }
|
|
1246
1335
|
);
|
|
@@ -1259,6 +1348,85 @@ class Order {
|
|
|
1259
1348
|
return response;
|
|
1260
1349
|
}
|
|
1261
1350
|
|
|
1351
|
+
/**
|
|
1352
|
+
* @param {OrderPlatformValidator.GenerateProcessManifestParam} arg - Arg object
|
|
1353
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1354
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1355
|
+
* @returns {Promise<OrderPlatformModel.ManifestResponseSchema>} - Success response
|
|
1356
|
+
* @name generateProcessManifest
|
|
1357
|
+
* @summary: Process Order Manifest
|
|
1358
|
+
* @description: Endpoint to save and process order manifests. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateProcessManifest/).
|
|
1359
|
+
*/
|
|
1360
|
+
async generateProcessManifest(
|
|
1361
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1362
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1363
|
+
) {
|
|
1364
|
+
const { error } = OrderPlatformValidator.generateProcessManifest().validate(
|
|
1365
|
+
{
|
|
1366
|
+
body,
|
|
1367
|
+
},
|
|
1368
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1369
|
+
);
|
|
1370
|
+
if (error) {
|
|
1371
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1375
|
+
const {
|
|
1376
|
+
error: warrning,
|
|
1377
|
+
} = OrderPlatformValidator.generateProcessManifest().validate(
|
|
1378
|
+
{
|
|
1379
|
+
body,
|
|
1380
|
+
},
|
|
1381
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1382
|
+
);
|
|
1383
|
+
if (warrning) {
|
|
1384
|
+
Logger({
|
|
1385
|
+
level: "WARN",
|
|
1386
|
+
message: `Parameter Validation warrnings for platform > Order > generateProcessManifest \n ${warrning}`,
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
const query_params = {};
|
|
1391
|
+
|
|
1392
|
+
const xHeaders = {};
|
|
1393
|
+
|
|
1394
|
+
const response = await PlatformAPIClient.execute(
|
|
1395
|
+
this.config,
|
|
1396
|
+
"post",
|
|
1397
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/process-manifest`,
|
|
1398
|
+
query_params,
|
|
1399
|
+
body,
|
|
1400
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1401
|
+
{ responseHeaders }
|
|
1402
|
+
);
|
|
1403
|
+
|
|
1404
|
+
let responseData = response;
|
|
1405
|
+
if (responseHeaders) {
|
|
1406
|
+
responseData = response[0];
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
const {
|
|
1410
|
+
error: res_error,
|
|
1411
|
+
} = OrderPlatformModel.ManifestResponseSchema().validate(responseData, {
|
|
1412
|
+
abortEarly: false,
|
|
1413
|
+
allowUnknown: true,
|
|
1414
|
+
});
|
|
1415
|
+
|
|
1416
|
+
if (res_error) {
|
|
1417
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1418
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1419
|
+
} else {
|
|
1420
|
+
Logger({
|
|
1421
|
+
level: "WARN",
|
|
1422
|
+
message: `Response Validation Warnings for platform > Order > generateProcessManifest \n ${res_error}`,
|
|
1423
|
+
});
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
return response;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1262
1430
|
/**
|
|
1263
1431
|
* @param {OrderPlatformValidator.GetAllowedStateTransitionParam} arg - Arg object
|
|
1264
1432
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -1266,8 +1434,8 @@ class Order {
|
|
|
1266
1434
|
* @returns {Promise<OrderPlatformModel.RoleBaseStateTransitionMapping>} -
|
|
1267
1435
|
* Success response
|
|
1268
1436
|
* @name getAllowedStateTransition
|
|
1269
|
-
* @summary: Get allowed state transition
|
|
1270
|
-
* @description: Retrieve next possible states based on logged in user
|
|
1437
|
+
* @summary: Get allowed state transition
|
|
1438
|
+
* @description: Retrieve next possible states based on logged in user's role - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedStateTransition/).
|
|
1271
1439
|
*/
|
|
1272
1440
|
async getAllowedStateTransition(
|
|
1273
1441
|
{ orderingChannel, status, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1349,10 +1517,11 @@ class Order {
|
|
|
1349
1517
|
* @param {OrderPlatformValidator.GetAllowedTemplatesForBulkParam} arg - Arg object
|
|
1350
1518
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1351
1519
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1352
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1520
|
+
* @returns {Promise<OrderPlatformModel.AllowedTemplatesResponseSchema>} -
|
|
1521
|
+
* Success response
|
|
1353
1522
|
* @name getAllowedTemplatesForBulk
|
|
1354
|
-
* @summary:
|
|
1355
|
-
* @description: Gets
|
|
1523
|
+
* @summary: List bulk operation templates
|
|
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/).
|
|
1356
1525
|
*/
|
|
1357
1526
|
async getAllowedTemplatesForBulk(
|
|
1358
1527
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -1403,10 +1572,10 @@ class Order {
|
|
|
1403
1572
|
|
|
1404
1573
|
const {
|
|
1405
1574
|
error: res_error,
|
|
1406
|
-
} = OrderPlatformModel.
|
|
1407
|
-
|
|
1408
|
-
allowUnknown: true
|
|
1409
|
-
|
|
1575
|
+
} = OrderPlatformModel.AllowedTemplatesResponseSchema().validate(
|
|
1576
|
+
responseData,
|
|
1577
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1578
|
+
);
|
|
1410
1579
|
|
|
1411
1580
|
if (res_error) {
|
|
1412
1581
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1426,10 +1595,11 @@ class Order {
|
|
|
1426
1595
|
* @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object
|
|
1427
1596
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1428
1597
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1429
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1598
|
+
* @returns {Promise<OrderPlatformModel.AnnouncementsResponseSchema>} -
|
|
1599
|
+
* Success response
|
|
1430
1600
|
* @name getAnnouncements
|
|
1431
|
-
* @summary:
|
|
1432
|
-
* @description: Retrieve announcements related to orders or
|
|
1601
|
+
* @summary: List announcements
|
|
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/).
|
|
1433
1603
|
*/
|
|
1434
1604
|
async getAnnouncements(
|
|
1435
1605
|
{ date, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1483,10 +1653,10 @@ class Order {
|
|
|
1483
1653
|
|
|
1484
1654
|
const {
|
|
1485
1655
|
error: res_error,
|
|
1486
|
-
} = OrderPlatformModel.
|
|
1487
|
-
|
|
1488
|
-
allowUnknown: true
|
|
1489
|
-
|
|
1656
|
+
} = OrderPlatformModel.AnnouncementsResponseSchema().validate(
|
|
1657
|
+
responseData,
|
|
1658
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1659
|
+
);
|
|
1490
1660
|
|
|
1491
1661
|
if (res_error) {
|
|
1492
1662
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1506,11 +1676,12 @@ class Order {
|
|
|
1506
1676
|
* @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object
|
|
1507
1677
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1508
1678
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1509
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1510
|
-
* Success response
|
|
1679
|
+
* @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponseSchema>}
|
|
1680
|
+
* - Success response
|
|
1681
|
+
*
|
|
1511
1682
|
* @name getBagById
|
|
1512
|
-
* @summary: Get bag
|
|
1513
|
-
* @description:
|
|
1683
|
+
* @summary: Get bag
|
|
1684
|
+
* @description: Retrieve detailed information about a specific bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
|
|
1514
1685
|
*/
|
|
1515
1686
|
async getBagById(
|
|
1516
1687
|
{ bagId, channelBagId, channelId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1554,7 +1725,7 @@ class Order {
|
|
|
1554
1725
|
const response = await PlatformAPIClient.execute(
|
|
1555
1726
|
this.config,
|
|
1556
1727
|
"get",
|
|
1557
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/bag-details
|
|
1728
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/bag-details/`,
|
|
1558
1729
|
query_params,
|
|
1559
1730
|
undefined,
|
|
1560
1731
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1568,11 +1739,11 @@ class Order {
|
|
|
1568
1739
|
|
|
1569
1740
|
const {
|
|
1570
1741
|
error: res_error,
|
|
1571
|
-
} = OrderPlatformModel.
|
|
1572
|
-
|
|
1573
|
-
allowUnknown: true
|
|
1574
|
-
|
|
1575
|
-
|
|
1742
|
+
} = OrderPlatformModel.BagDetailsPlatformResponseSchema().validate(
|
|
1743
|
+
responseData,
|
|
1744
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1745
|
+
);
|
|
1746
|
+
|
|
1576
1747
|
if (res_error) {
|
|
1577
1748
|
if (this.config.options.strictResponseCheck === true) {
|
|
1578
1749
|
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
@@ -1591,10 +1762,11 @@ class Order {
|
|
|
1591
1762
|
* @param {OrderPlatformValidator.GetBagsParam} arg - Arg object
|
|
1592
1763
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1593
1764
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1594
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1765
|
+
* @returns {Promise<OrderPlatformModel.GetBagsPlatformResponseSchema>} -
|
|
1766
|
+
* Success response
|
|
1595
1767
|
* @name getBags
|
|
1596
|
-
* @summary:
|
|
1597
|
-
* @description: Get
|
|
1768
|
+
* @summary: List bags
|
|
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/).
|
|
1598
1770
|
*/
|
|
1599
1771
|
async getBags(
|
|
1600
1772
|
{
|
|
@@ -1681,10 +1853,10 @@ class Order {
|
|
|
1681
1853
|
|
|
1682
1854
|
const {
|
|
1683
1855
|
error: res_error,
|
|
1684
|
-
} = OrderPlatformModel.
|
|
1685
|
-
|
|
1686
|
-
allowUnknown: true
|
|
1687
|
-
|
|
1856
|
+
} = OrderPlatformModel.GetBagsPlatformResponseSchema().validate(
|
|
1857
|
+
responseData,
|
|
1858
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1859
|
+
);
|
|
1688
1860
|
|
|
1689
1861
|
if (res_error) {
|
|
1690
1862
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1704,11 +1876,12 @@ class Order {
|
|
|
1704
1876
|
* @param {OrderPlatformValidator.GetBulkActionTemplateParam} arg - Arg object
|
|
1705
1877
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1706
1878
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1707
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1708
|
-
* Success response
|
|
1879
|
+
* @returns {Promise<OrderPlatformModel.BulkActionTemplateResponseSchema>}
|
|
1880
|
+
* - Success response
|
|
1881
|
+
*
|
|
1709
1882
|
* @name getBulkActionTemplate
|
|
1710
|
-
* @summary:
|
|
1711
|
-
* @description: Get
|
|
1883
|
+
* @summary: List supported templates
|
|
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/).
|
|
1712
1885
|
*/
|
|
1713
1886
|
async getBulkActionTemplate(
|
|
1714
1887
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -1757,10 +1930,10 @@ class Order {
|
|
|
1757
1930
|
|
|
1758
1931
|
const {
|
|
1759
1932
|
error: res_error,
|
|
1760
|
-
} = OrderPlatformModel.
|
|
1761
|
-
|
|
1762
|
-
allowUnknown: true
|
|
1763
|
-
|
|
1933
|
+
} = OrderPlatformModel.BulkActionTemplateResponseSchema().validate(
|
|
1934
|
+
responseData,
|
|
1935
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1936
|
+
);
|
|
1764
1937
|
|
|
1765
1938
|
if (res_error) {
|
|
1766
1939
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1780,10 +1953,10 @@ class Order {
|
|
|
1780
1953
|
* @param {OrderPlatformValidator.GetBulkShipmentExcelFileParam} arg - Arg object
|
|
1781
1954
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1782
1955
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1783
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1956
|
+
* @returns {Promise<OrderPlatformModel.FileResponseSchema>} - Success response
|
|
1784
1957
|
* @name getBulkShipmentExcelFile
|
|
1785
|
-
* @summary:
|
|
1786
|
-
* @description:
|
|
1958
|
+
* @summary: Generate the report
|
|
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/).
|
|
1787
1960
|
*/
|
|
1788
1961
|
async getBulkShipmentExcelFile(
|
|
1789
1962
|
{
|
|
@@ -1886,7 +2059,7 @@ class Order {
|
|
|
1886
2059
|
|
|
1887
2060
|
const {
|
|
1888
2061
|
error: res_error,
|
|
1889
|
-
} = OrderPlatformModel.
|
|
2062
|
+
} = OrderPlatformModel.FileResponseSchema().validate(responseData, {
|
|
1890
2063
|
abortEarly: false,
|
|
1891
2064
|
allowUnknown: true,
|
|
1892
2065
|
});
|
|
@@ -1906,27 +2079,20 @@ class Order {
|
|
|
1906
2079
|
}
|
|
1907
2080
|
|
|
1908
2081
|
/**
|
|
1909
|
-
* @param {OrderPlatformValidator.
|
|
2082
|
+
* @param {OrderPlatformValidator.GetChannelConfigParam} arg - Arg object
|
|
1910
2083
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1911
2084
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1912
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1913
|
-
* @name
|
|
1914
|
-
* @summary: Get
|
|
1915
|
-
* @description:
|
|
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/).
|
|
1916
2089
|
*/
|
|
1917
|
-
async
|
|
1918
|
-
{
|
|
1919
|
-
requestHeaders: {},
|
|
1920
|
-
},
|
|
2090
|
+
async getChannelConfig(
|
|
2091
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1921
2092
|
{ responseHeaders } = { responseHeaders: false }
|
|
1922
2093
|
) {
|
|
1923
|
-
const { error } = OrderPlatformValidator.
|
|
1924
|
-
{
|
|
1925
|
-
pageNo,
|
|
1926
|
-
pageSize,
|
|
1927
|
-
searchType,
|
|
1928
|
-
searchValue,
|
|
1929
|
-
},
|
|
2094
|
+
const { error } = OrderPlatformValidator.getChannelConfig().validate(
|
|
2095
|
+
{},
|
|
1930
2096
|
{ abortEarly: false, allowUnknown: true }
|
|
1931
2097
|
);
|
|
1932
2098
|
if (error) {
|
|
@@ -1936,34 +2102,25 @@ class Order {
|
|
|
1936
2102
|
// Showing warrnings if extra unknown parameters are found
|
|
1937
2103
|
const {
|
|
1938
2104
|
error: warrning,
|
|
1939
|
-
} = OrderPlatformValidator.
|
|
1940
|
-
{
|
|
1941
|
-
pageNo,
|
|
1942
|
-
pageSize,
|
|
1943
|
-
searchType,
|
|
1944
|
-
searchValue,
|
|
1945
|
-
},
|
|
2105
|
+
} = OrderPlatformValidator.getChannelConfig().validate(
|
|
2106
|
+
{},
|
|
1946
2107
|
{ abortEarly: false, allowUnknown: false }
|
|
1947
2108
|
);
|
|
1948
2109
|
if (warrning) {
|
|
1949
2110
|
Logger({
|
|
1950
2111
|
level: "WARN",
|
|
1951
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
2112
|
+
message: `Parameter Validation warrnings for platform > Order > getChannelConfig \n ${warrning}`,
|
|
1952
2113
|
});
|
|
1953
2114
|
}
|
|
1954
2115
|
|
|
1955
2116
|
const query_params = {};
|
|
1956
|
-
query_params["page_no"] = pageNo;
|
|
1957
|
-
query_params["page_size"] = pageSize;
|
|
1958
|
-
query_params["search_type"] = searchType;
|
|
1959
|
-
query_params["search_value"] = searchValue;
|
|
1960
2117
|
|
|
1961
2118
|
const xHeaders = {};
|
|
1962
2119
|
|
|
1963
2120
|
const response = await PlatformAPIClient.execute(
|
|
1964
2121
|
this.config,
|
|
1965
2122
|
"get",
|
|
1966
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
2123
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
1967
2124
|
query_params,
|
|
1968
2125
|
undefined,
|
|
1969
2126
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1977,7 +2134,7 @@ class Order {
|
|
|
1977
2134
|
|
|
1978
2135
|
const {
|
|
1979
2136
|
error: res_error,
|
|
1980
|
-
} = OrderPlatformModel.
|
|
2137
|
+
} = OrderPlatformModel.CreateChannelConfigData().validate(responseData, {
|
|
1981
2138
|
abortEarly: false,
|
|
1982
2139
|
allowUnknown: true,
|
|
1983
2140
|
});
|
|
@@ -1988,7 +2145,7 @@ class Order {
|
|
|
1988
2145
|
} else {
|
|
1989
2146
|
Logger({
|
|
1990
2147
|
level: "WARN",
|
|
1991
|
-
message: `Response Validation Warnings for platform > Order >
|
|
2148
|
+
message: `Response Validation Warnings for platform > Order > getChannelConfig \n ${res_error}`,
|
|
1992
2149
|
});
|
|
1993
2150
|
}
|
|
1994
2151
|
}
|
|
@@ -2000,10 +2157,10 @@ class Order {
|
|
|
2000
2157
|
* @param {OrderPlatformValidator.GetFileByStatusParam} arg - Arg object
|
|
2001
2158
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2002
2159
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2003
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2160
|
+
* @returns {Promise<OrderPlatformModel.JobFailedResponseSchema>} - Success response
|
|
2004
2161
|
* @name getFileByStatus
|
|
2005
|
-
* @summary:
|
|
2006
|
-
* @description: Get the file URL
|
|
2162
|
+
* @summary: Download file used for Bulk operation
|
|
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/).
|
|
2007
2164
|
*/
|
|
2008
2165
|
async getFileByStatus(
|
|
2009
2166
|
{ batchId, status, fileType, reportType, requestHeaders } = {
|
|
@@ -2067,7 +2224,7 @@ class Order {
|
|
|
2067
2224
|
|
|
2068
2225
|
const {
|
|
2069
2226
|
error: res_error,
|
|
2070
|
-
} = OrderPlatformModel.
|
|
2227
|
+
} = OrderPlatformModel.JobFailedResponseSchema().validate(responseData, {
|
|
2071
2228
|
abortEarly: false,
|
|
2072
2229
|
allowUnknown: true,
|
|
2073
2230
|
});
|
|
@@ -2086,94 +2243,14 @@ class Order {
|
|
|
2086
2243
|
return response;
|
|
2087
2244
|
}
|
|
2088
2245
|
|
|
2089
|
-
/**
|
|
2090
|
-
* @param {OrderPlatformValidator.GetGlobalFiltersParam} arg - Arg object
|
|
2091
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2092
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2093
|
-
* @returns {Promise<OrderPlatformModel.GlobalFiltersResponse>} - Success response
|
|
2094
|
-
* @name getGlobalFilters
|
|
2095
|
-
* @summary: Get global filters for populating filter listing and powering views api.
|
|
2096
|
-
* @description: Get global filters for populating filter listing and powering views api. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getGlobalFilters/).
|
|
2097
|
-
*/
|
|
2098
|
-
async getGlobalFilters(
|
|
2099
|
-
{ showIn, requestHeaders } = { requestHeaders: {} },
|
|
2100
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2101
|
-
) {
|
|
2102
|
-
const { error } = OrderPlatformValidator.getGlobalFilters().validate(
|
|
2103
|
-
{
|
|
2104
|
-
showIn,
|
|
2105
|
-
},
|
|
2106
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2107
|
-
);
|
|
2108
|
-
if (error) {
|
|
2109
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2110
|
-
}
|
|
2111
|
-
|
|
2112
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2113
|
-
const {
|
|
2114
|
-
error: warrning,
|
|
2115
|
-
} = OrderPlatformValidator.getGlobalFilters().validate(
|
|
2116
|
-
{
|
|
2117
|
-
showIn,
|
|
2118
|
-
},
|
|
2119
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2120
|
-
);
|
|
2121
|
-
if (warrning) {
|
|
2122
|
-
Logger({
|
|
2123
|
-
level: "WARN",
|
|
2124
|
-
message: `Parameter Validation warrnings for platform > Order > getGlobalFilters \n ${warrning}`,
|
|
2125
|
-
});
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
const query_params = {};
|
|
2129
|
-
query_params["show_in"] = showIn;
|
|
2130
|
-
|
|
2131
|
-
const xHeaders = {};
|
|
2132
|
-
|
|
2133
|
-
const response = await PlatformAPIClient.execute(
|
|
2134
|
-
this.config,
|
|
2135
|
-
"get",
|
|
2136
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/filters`,
|
|
2137
|
-
query_params,
|
|
2138
|
-
undefined,
|
|
2139
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2140
|
-
{ responseHeaders }
|
|
2141
|
-
);
|
|
2142
|
-
|
|
2143
|
-
let responseData = response;
|
|
2144
|
-
if (responseHeaders) {
|
|
2145
|
-
responseData = response[0];
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
const {
|
|
2149
|
-
error: res_error,
|
|
2150
|
-
} = OrderPlatformModel.GlobalFiltersResponse().validate(responseData, {
|
|
2151
|
-
abortEarly: false,
|
|
2152
|
-
allowUnknown: true,
|
|
2153
|
-
});
|
|
2154
|
-
|
|
2155
|
-
if (res_error) {
|
|
2156
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2157
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2158
|
-
} else {
|
|
2159
|
-
Logger({
|
|
2160
|
-
level: "WARN",
|
|
2161
|
-
message: `Response Validation Warnings for platform > Order > getGlobalFilters \n ${res_error}`,
|
|
2162
|
-
});
|
|
2163
|
-
}
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
return response;
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
2246
|
/**
|
|
2170
2247
|
* @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object
|
|
2171
2248
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2172
2249
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2173
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2250
|
+
* @returns {Promise<OrderPlatformModel.LaneConfigResponseSchema>} - Success response
|
|
2174
2251
|
* @name getLaneConfig
|
|
2175
|
-
* @summary: Get lane configuration
|
|
2176
|
-
* @description: Get
|
|
2252
|
+
* @summary: Get lane configuration
|
|
2253
|
+
* @description: Get configuration settings for lanes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
|
|
2177
2254
|
*/
|
|
2178
2255
|
async getLaneConfig(
|
|
2179
2256
|
{
|
|
@@ -2286,7 +2363,7 @@ class Order {
|
|
|
2286
2363
|
const response = await PlatformAPIClient.execute(
|
|
2287
2364
|
this.config,
|
|
2288
2365
|
"get",
|
|
2289
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/lane-config
|
|
2366
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/lane-config/`,
|
|
2290
2367
|
query_params,
|
|
2291
2368
|
undefined,
|
|
2292
2369
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2300,7 +2377,7 @@ class Order {
|
|
|
2300
2377
|
|
|
2301
2378
|
const {
|
|
2302
2379
|
error: res_error,
|
|
2303
|
-
} = OrderPlatformModel.
|
|
2380
|
+
} = OrderPlatformModel.LaneConfigResponseSchema().validate(responseData, {
|
|
2304
2381
|
abortEarly: false,
|
|
2305
2382
|
allowUnknown: true,
|
|
2306
2383
|
});
|
|
@@ -2320,21 +2397,34 @@ class Order {
|
|
|
2320
2397
|
}
|
|
2321
2398
|
|
|
2322
2399
|
/**
|
|
2323
|
-
* @param {OrderPlatformValidator.
|
|
2400
|
+
* @param {OrderPlatformValidator.GetManifestDetailsParam} arg - Arg object
|
|
2324
2401
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2325
2402
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2326
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2327
|
-
* @name
|
|
2328
|
-
* @summary:
|
|
2329
|
-
* @description:
|
|
2403
|
+
* @returns {Promise<OrderPlatformModel.ManifestDetails>} - Success response
|
|
2404
|
+
* @name getManifestDetails
|
|
2405
|
+
* @summary: Get a manifest
|
|
2406
|
+
* @description: Get details regarding a manifest which can be used to perform further actions on it - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestDetails/).
|
|
2330
2407
|
*/
|
|
2331
|
-
async
|
|
2332
|
-
{
|
|
2408
|
+
async getManifestDetails(
|
|
2409
|
+
{
|
|
2410
|
+
manifestId,
|
|
2411
|
+
dpIds,
|
|
2412
|
+
endDate,
|
|
2413
|
+
startDate,
|
|
2414
|
+
pageNo,
|
|
2415
|
+
pageSize,
|
|
2416
|
+
requestHeaders,
|
|
2417
|
+
} = { requestHeaders: {} },
|
|
2333
2418
|
{ responseHeaders } = { responseHeaders: false }
|
|
2334
2419
|
) {
|
|
2335
|
-
const { error } = OrderPlatformValidator.
|
|
2420
|
+
const { error } = OrderPlatformValidator.getManifestDetails().validate(
|
|
2336
2421
|
{
|
|
2337
|
-
|
|
2422
|
+
manifestId,
|
|
2423
|
+
dpIds,
|
|
2424
|
+
endDate,
|
|
2425
|
+
startDate,
|
|
2426
|
+
pageNo,
|
|
2427
|
+
pageSize,
|
|
2338
2428
|
},
|
|
2339
2429
|
{ abortEarly: false, allowUnknown: true }
|
|
2340
2430
|
);
|
|
@@ -2345,28 +2435,38 @@ class Order {
|
|
|
2345
2435
|
// Showing warrnings if extra unknown parameters are found
|
|
2346
2436
|
const {
|
|
2347
2437
|
error: warrning,
|
|
2348
|
-
} = OrderPlatformValidator.
|
|
2438
|
+
} = OrderPlatformValidator.getManifestDetails().validate(
|
|
2349
2439
|
{
|
|
2350
|
-
|
|
2440
|
+
manifestId,
|
|
2441
|
+
dpIds,
|
|
2442
|
+
endDate,
|
|
2443
|
+
startDate,
|
|
2444
|
+
pageNo,
|
|
2445
|
+
pageSize,
|
|
2351
2446
|
},
|
|
2352
2447
|
{ abortEarly: false, allowUnknown: false }
|
|
2353
2448
|
);
|
|
2354
2449
|
if (warrning) {
|
|
2355
2450
|
Logger({
|
|
2356
2451
|
level: "WARN",
|
|
2357
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
2452
|
+
message: `Parameter Validation warrnings for platform > Order > getManifestDetails \n ${warrning}`,
|
|
2358
2453
|
});
|
|
2359
2454
|
}
|
|
2360
2455
|
|
|
2361
2456
|
const query_params = {};
|
|
2362
|
-
query_params["
|
|
2457
|
+
query_params["manifest_id"] = manifestId;
|
|
2458
|
+
query_params["dp_ids"] = dpIds;
|
|
2459
|
+
query_params["end_date"] = endDate;
|
|
2460
|
+
query_params["start_date"] = startDate;
|
|
2461
|
+
query_params["page_no"] = pageNo;
|
|
2462
|
+
query_params["page_size"] = pageSize;
|
|
2363
2463
|
|
|
2364
2464
|
const xHeaders = {};
|
|
2365
2465
|
|
|
2366
2466
|
const response = await PlatformAPIClient.execute(
|
|
2367
2467
|
this.config,
|
|
2368
2468
|
"get",
|
|
2369
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
2469
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/details`,
|
|
2370
2470
|
query_params,
|
|
2371
2471
|
undefined,
|
|
2372
2472
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2380,7 +2480,7 @@ class Order {
|
|
|
2380
2480
|
|
|
2381
2481
|
const {
|
|
2382
2482
|
error: res_error,
|
|
2383
|
-
} = OrderPlatformModel.
|
|
2483
|
+
} = OrderPlatformModel.ManifestDetails().validate(responseData, {
|
|
2384
2484
|
abortEarly: false,
|
|
2385
2485
|
allowUnknown: true,
|
|
2386
2486
|
});
|
|
@@ -2391,7 +2491,7 @@ class Order {
|
|
|
2391
2491
|
} else {
|
|
2392
2492
|
Logger({
|
|
2393
2493
|
level: "WARN",
|
|
2394
|
-
message: `Response Validation Warnings for platform > Order >
|
|
2494
|
+
message: `Response Validation Warnings for platform > Order > getManifestDetails \n ${res_error}`,
|
|
2395
2495
|
});
|
|
2396
2496
|
}
|
|
2397
2497
|
}
|
|
@@ -2400,25 +2500,42 @@ class Order {
|
|
|
2400
2500
|
}
|
|
2401
2501
|
|
|
2402
2502
|
/**
|
|
2403
|
-
* @param {OrderPlatformValidator.
|
|
2503
|
+
* @param {OrderPlatformValidator.GetManifestShipmentsParam} arg - Arg object
|
|
2404
2504
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2405
2505
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2406
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2407
|
-
* @name
|
|
2408
|
-
* @summary:
|
|
2409
|
-
* @description:
|
|
2506
|
+
* @returns {Promise<OrderPlatformModel.ManifestShipmentListing>} - Success response
|
|
2507
|
+
* @name getManifestShipments
|
|
2508
|
+
* @summary: List manifest shipments
|
|
2509
|
+
* @description: Get list of shipments tagged to that manifest, the user can also search the shipments on the basis of shipment Id, order Id and AWB number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestShipments/).
|
|
2410
2510
|
*/
|
|
2411
|
-
async
|
|
2412
|
-
{
|
|
2413
|
-
|
|
2414
|
-
|
|
2511
|
+
async getManifestShipments(
|
|
2512
|
+
{
|
|
2513
|
+
dpIds,
|
|
2514
|
+
stores,
|
|
2515
|
+
toDate,
|
|
2516
|
+
fromDate,
|
|
2517
|
+
dpName,
|
|
2518
|
+
salesChannels,
|
|
2519
|
+
searchType,
|
|
2520
|
+
searchValue,
|
|
2521
|
+
pageNo,
|
|
2522
|
+
pageSize,
|
|
2523
|
+
requestHeaders,
|
|
2524
|
+
} = { requestHeaders: {} },
|
|
2415
2525
|
{ responseHeaders } = { responseHeaders: false }
|
|
2416
2526
|
) {
|
|
2417
|
-
const { error } = OrderPlatformValidator.
|
|
2527
|
+
const { error } = OrderPlatformValidator.getManifestShipments().validate(
|
|
2418
2528
|
{
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2529
|
+
dpIds,
|
|
2530
|
+
stores,
|
|
2531
|
+
toDate,
|
|
2532
|
+
fromDate,
|
|
2533
|
+
dpName,
|
|
2534
|
+
salesChannels,
|
|
2535
|
+
searchType,
|
|
2536
|
+
searchValue,
|
|
2537
|
+
pageNo,
|
|
2538
|
+
pageSize,
|
|
2422
2539
|
},
|
|
2423
2540
|
{ abortEarly: false, allowUnknown: true }
|
|
2424
2541
|
);
|
|
@@ -2427,32 +2544,48 @@ class Order {
|
|
|
2427
2544
|
}
|
|
2428
2545
|
|
|
2429
2546
|
// Showing warrnings if extra unknown parameters are found
|
|
2430
|
-
const {
|
|
2547
|
+
const {
|
|
2548
|
+
error: warrning,
|
|
2549
|
+
} = OrderPlatformValidator.getManifestShipments().validate(
|
|
2431
2550
|
{
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2551
|
+
dpIds,
|
|
2552
|
+
stores,
|
|
2553
|
+
toDate,
|
|
2554
|
+
fromDate,
|
|
2555
|
+
dpName,
|
|
2556
|
+
salesChannels,
|
|
2557
|
+
searchType,
|
|
2558
|
+
searchValue,
|
|
2559
|
+
pageNo,
|
|
2560
|
+
pageSize,
|
|
2435
2561
|
},
|
|
2436
2562
|
{ abortEarly: false, allowUnknown: false }
|
|
2437
2563
|
);
|
|
2438
2564
|
if (warrning) {
|
|
2439
2565
|
Logger({
|
|
2440
2566
|
level: "WARN",
|
|
2441
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
2567
|
+
message: `Parameter Validation warrnings for platform > Order > getManifestShipments \n ${warrning}`,
|
|
2442
2568
|
});
|
|
2443
2569
|
}
|
|
2444
2570
|
|
|
2445
2571
|
const query_params = {};
|
|
2446
|
-
query_params["
|
|
2447
|
-
query_params["
|
|
2448
|
-
query_params["
|
|
2572
|
+
query_params["dp_ids"] = dpIds;
|
|
2573
|
+
query_params["stores"] = stores;
|
|
2574
|
+
query_params["to_date"] = toDate;
|
|
2575
|
+
query_params["from_date"] = fromDate;
|
|
2576
|
+
query_params["dp_name"] = dpName;
|
|
2577
|
+
query_params["sales_channels"] = salesChannels;
|
|
2578
|
+
query_params["search_type"] = searchType;
|
|
2579
|
+
query_params["search_value"] = searchValue;
|
|
2580
|
+
query_params["page_no"] = pageNo;
|
|
2581
|
+
query_params["page_size"] = pageSize;
|
|
2449
2582
|
|
|
2450
2583
|
const xHeaders = {};
|
|
2451
2584
|
|
|
2452
2585
|
const response = await PlatformAPIClient.execute(
|
|
2453
2586
|
this.config,
|
|
2454
2587
|
"get",
|
|
2455
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/
|
|
2588
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/shipments-listing`,
|
|
2456
2589
|
query_params,
|
|
2457
2590
|
undefined,
|
|
2458
2591
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2466,7 +2599,7 @@ class Order {
|
|
|
2466
2599
|
|
|
2467
2600
|
const {
|
|
2468
2601
|
error: res_error,
|
|
2469
|
-
} = OrderPlatformModel.
|
|
2602
|
+
} = OrderPlatformModel.ManifestShipmentListing().validate(responseData, {
|
|
2470
2603
|
abortEarly: false,
|
|
2471
2604
|
allowUnknown: true,
|
|
2472
2605
|
});
|
|
@@ -2477,7 +2610,7 @@ class Order {
|
|
|
2477
2610
|
} else {
|
|
2478
2611
|
Logger({
|
|
2479
2612
|
level: "WARN",
|
|
2480
|
-
message: `Response Validation Warnings for platform > Order >
|
|
2613
|
+
message: `Response Validation Warnings for platform > Order > getManifestShipments \n ${res_error}`,
|
|
2481
2614
|
});
|
|
2482
2615
|
}
|
|
2483
2616
|
}
|
|
@@ -2486,78 +2619,22 @@ class Order {
|
|
|
2486
2619
|
}
|
|
2487
2620
|
|
|
2488
2621
|
/**
|
|
2489
|
-
* @param {OrderPlatformValidator.
|
|
2622
|
+
* @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object
|
|
2490
2623
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2491
2624
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2492
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2493
|
-
*
|
|
2494
|
-
* @
|
|
2495
|
-
* @
|
|
2625
|
+
* @returns {Promise<OrderPlatformModel.ManifestFiltersResponseSchema>} -
|
|
2626
|
+
* Success response
|
|
2627
|
+
* @name getManifestfilters
|
|
2628
|
+
* @summary: List filters
|
|
2629
|
+
* @description: Get supported filter for listing manifests - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestfilters/).
|
|
2496
2630
|
*/
|
|
2497
|
-
async
|
|
2498
|
-
{
|
|
2499
|
-
lane,
|
|
2500
|
-
searchType,
|
|
2501
|
-
bagStatus,
|
|
2502
|
-
timeToDispatch,
|
|
2503
|
-
paymentMethods,
|
|
2504
|
-
tags,
|
|
2505
|
-
searchValue,
|
|
2506
|
-
fromDate,
|
|
2507
|
-
toDate,
|
|
2508
|
-
startDate,
|
|
2509
|
-
endDate,
|
|
2510
|
-
dpIds,
|
|
2511
|
-
stores,
|
|
2512
|
-
salesChannels,
|
|
2513
|
-
pageNo,
|
|
2514
|
-
pageSize,
|
|
2515
|
-
isPrioritySort,
|
|
2516
|
-
customMeta,
|
|
2517
|
-
myOrders,
|
|
2518
|
-
showCrossCompanyData,
|
|
2519
|
-
customerId,
|
|
2520
|
-
orderType,
|
|
2521
|
-
operationalStatus,
|
|
2522
|
-
financialStatus,
|
|
2523
|
-
logisticsStatus,
|
|
2524
|
-
parentViewSlug,
|
|
2525
|
-
childViewSlug,
|
|
2526
|
-
groupEntity,
|
|
2527
|
-
requestHeaders,
|
|
2528
|
-
} = { requestHeaders: {} },
|
|
2631
|
+
async getManifestfilters(
|
|
2632
|
+
{ view, requestHeaders } = { requestHeaders: {} },
|
|
2529
2633
|
{ responseHeaders } = { responseHeaders: false }
|
|
2530
2634
|
) {
|
|
2531
|
-
const { error } = OrderPlatformValidator.
|
|
2635
|
+
const { error } = OrderPlatformValidator.getManifestfilters().validate(
|
|
2532
2636
|
{
|
|
2533
|
-
|
|
2534
|
-
searchType,
|
|
2535
|
-
bagStatus,
|
|
2536
|
-
timeToDispatch,
|
|
2537
|
-
paymentMethods,
|
|
2538
|
-
tags,
|
|
2539
|
-
searchValue,
|
|
2540
|
-
fromDate,
|
|
2541
|
-
toDate,
|
|
2542
|
-
startDate,
|
|
2543
|
-
endDate,
|
|
2544
|
-
dpIds,
|
|
2545
|
-
stores,
|
|
2546
|
-
salesChannels,
|
|
2547
|
-
pageNo,
|
|
2548
|
-
pageSize,
|
|
2549
|
-
isPrioritySort,
|
|
2550
|
-
customMeta,
|
|
2551
|
-
myOrders,
|
|
2552
|
-
showCrossCompanyData,
|
|
2553
|
-
customerId,
|
|
2554
|
-
orderType,
|
|
2555
|
-
operationalStatus,
|
|
2556
|
-
financialStatus,
|
|
2557
|
-
logisticsStatus,
|
|
2558
|
-
parentViewSlug,
|
|
2559
|
-
childViewSlug,
|
|
2560
|
-
groupEntity,
|
|
2637
|
+
view,
|
|
2561
2638
|
},
|
|
2562
2639
|
{ abortEarly: false, allowUnknown: true }
|
|
2563
2640
|
);
|
|
@@ -2566,82 +2643,30 @@ class Order {
|
|
|
2566
2643
|
}
|
|
2567
2644
|
|
|
2568
2645
|
// Showing warrnings if extra unknown parameters are found
|
|
2569
|
-
const {
|
|
2646
|
+
const {
|
|
2647
|
+
error: warrning,
|
|
2648
|
+
} = OrderPlatformValidator.getManifestfilters().validate(
|
|
2570
2649
|
{
|
|
2571
|
-
|
|
2572
|
-
searchType,
|
|
2573
|
-
bagStatus,
|
|
2574
|
-
timeToDispatch,
|
|
2575
|
-
paymentMethods,
|
|
2576
|
-
tags,
|
|
2577
|
-
searchValue,
|
|
2578
|
-
fromDate,
|
|
2579
|
-
toDate,
|
|
2580
|
-
startDate,
|
|
2581
|
-
endDate,
|
|
2582
|
-
dpIds,
|
|
2583
|
-
stores,
|
|
2584
|
-
salesChannels,
|
|
2585
|
-
pageNo,
|
|
2586
|
-
pageSize,
|
|
2587
|
-
isPrioritySort,
|
|
2588
|
-
customMeta,
|
|
2589
|
-
myOrders,
|
|
2590
|
-
showCrossCompanyData,
|
|
2591
|
-
customerId,
|
|
2592
|
-
orderType,
|
|
2593
|
-
operationalStatus,
|
|
2594
|
-
financialStatus,
|
|
2595
|
-
logisticsStatus,
|
|
2596
|
-
parentViewSlug,
|
|
2597
|
-
childViewSlug,
|
|
2598
|
-
groupEntity,
|
|
2650
|
+
view,
|
|
2599
2651
|
},
|
|
2600
2652
|
{ abortEarly: false, allowUnknown: false }
|
|
2601
2653
|
);
|
|
2602
2654
|
if (warrning) {
|
|
2603
2655
|
Logger({
|
|
2604
2656
|
level: "WARN",
|
|
2605
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
2657
|
+
message: `Parameter Validation warrnings for platform > Order > getManifestfilters \n ${warrning}`,
|
|
2606
2658
|
});
|
|
2607
2659
|
}
|
|
2608
2660
|
|
|
2609
2661
|
const query_params = {};
|
|
2610
|
-
query_params["
|
|
2611
|
-
query_params["search_type"] = searchType;
|
|
2612
|
-
query_params["bag_status"] = bagStatus;
|
|
2613
|
-
query_params["time_to_dispatch"] = timeToDispatch;
|
|
2614
|
-
query_params["payment_methods"] = paymentMethods;
|
|
2615
|
-
query_params["tags"] = tags;
|
|
2616
|
-
query_params["search_value"] = searchValue;
|
|
2617
|
-
query_params["from_date"] = fromDate;
|
|
2618
|
-
query_params["to_date"] = toDate;
|
|
2619
|
-
query_params["start_date"] = startDate;
|
|
2620
|
-
query_params["end_date"] = endDate;
|
|
2621
|
-
query_params["dp_ids"] = dpIds;
|
|
2622
|
-
query_params["stores"] = stores;
|
|
2623
|
-
query_params["sales_channels"] = salesChannels;
|
|
2624
|
-
query_params["page_no"] = pageNo;
|
|
2625
|
-
query_params["page_size"] = pageSize;
|
|
2626
|
-
query_params["is_priority_sort"] = isPrioritySort;
|
|
2627
|
-
query_params["custom_meta"] = customMeta;
|
|
2628
|
-
query_params["my_orders"] = myOrders;
|
|
2629
|
-
query_params["show_cross_company_data"] = showCrossCompanyData;
|
|
2630
|
-
query_params["customer_id"] = customerId;
|
|
2631
|
-
query_params["order_type"] = orderType;
|
|
2632
|
-
query_params["operational_status"] = operationalStatus;
|
|
2633
|
-
query_params["financial_status"] = financialStatus;
|
|
2634
|
-
query_params["logistics_status"] = logisticsStatus;
|
|
2635
|
-
query_params["parent_view_slug"] = parentViewSlug;
|
|
2636
|
-
query_params["child_view_slug"] = childViewSlug;
|
|
2637
|
-
query_params["group_entity"] = groupEntity;
|
|
2662
|
+
query_params["view"] = view;
|
|
2638
2663
|
|
|
2639
2664
|
const xHeaders = {};
|
|
2640
2665
|
|
|
2641
2666
|
const response = await PlatformAPIClient.execute(
|
|
2642
2667
|
this.config,
|
|
2643
2668
|
"get",
|
|
2644
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/
|
|
2669
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/filter/listing`,
|
|
2645
2670
|
query_params,
|
|
2646
2671
|
undefined,
|
|
2647
2672
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2655,10 +2680,10 @@ class Order {
|
|
|
2655
2680
|
|
|
2656
2681
|
const {
|
|
2657
2682
|
error: res_error,
|
|
2658
|
-
} = OrderPlatformModel.
|
|
2659
|
-
|
|
2660
|
-
allowUnknown: true
|
|
2661
|
-
|
|
2683
|
+
} = OrderPlatformModel.ManifestFiltersResponseSchema().validate(
|
|
2684
|
+
responseData,
|
|
2685
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2686
|
+
);
|
|
2662
2687
|
|
|
2663
2688
|
if (res_error) {
|
|
2664
2689
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2666,7 +2691,7 @@ class Order {
|
|
|
2666
2691
|
} else {
|
|
2667
2692
|
Logger({
|
|
2668
2693
|
level: "WARN",
|
|
2669
|
-
message: `Response Validation Warnings for platform > Order >
|
|
2694
|
+
message: `Response Validation Warnings for platform > Order > getManifestfilters \n ${res_error}`,
|
|
2670
2695
|
});
|
|
2671
2696
|
}
|
|
2672
2697
|
}
|
|
@@ -2675,150 +2700,40 @@ class Order {
|
|
|
2675
2700
|
}
|
|
2676
2701
|
|
|
2677
2702
|
/**
|
|
2678
|
-
* @param {
|
|
2679
|
-
* @param {string} [arg.lane] - Lane refers to a section where orders are
|
|
2680
|
-
* assigned, indicating its grouping
|
|
2681
|
-
* @param {string} [arg.searchType] - Search_type refers to the field that
|
|
2682
|
-
* will be used as the target for the search operation
|
|
2683
|
-
* @param {string} [arg.bagStatus] - Bag_status refers to the status of the
|
|
2684
|
-
* entity. Filters orders based on the status.
|
|
2685
|
-
* @param {number} [arg.timeToDispatch] - Time_to_dispatch refers to the
|
|
2686
|
-
* estimated SLA time.
|
|
2687
|
-
* @param {string} [arg.paymentMethods] -
|
|
2688
|
-
* @param {string} [arg.tags] - Tags refer to additional descriptive labels
|
|
2689
|
-
* associated with the order
|
|
2690
|
-
* @param {string} [arg.searchValue] - Search_value is matched against the
|
|
2691
|
-
* field specified by the search_type
|
|
2692
|
-
* @param {string} [arg.fromDate] -
|
|
2693
|
-
* @param {string} [arg.toDate] -
|
|
2694
|
-
* @param {string} [arg.startDate] -
|
|
2695
|
-
* @param {string} [arg.endDate] -
|
|
2696
|
-
* @param {string} [arg.dpIds] - Delivery Partner IDs to which shipments are assigned.
|
|
2697
|
-
* @param {string} [arg.stores] -
|
|
2698
|
-
* @param {string} [arg.salesChannels] -
|
|
2699
|
-
* @param {number} [arg.pageSize] -
|
|
2700
|
-
* @param {boolean} [arg.isPrioritySort] -
|
|
2701
|
-
* @param {Object[]} [arg.customMeta] -
|
|
2702
|
-
* @param {boolean} [arg.myOrders] -
|
|
2703
|
-
* @param {boolean} [arg.showCrossCompanyData] - Flag to view cross &
|
|
2704
|
-
* non-cross company order
|
|
2705
|
-
* @param {string} [arg.customerId] -
|
|
2706
|
-
* @param {string} [arg.orderType] -
|
|
2707
|
-
* @param {string} [arg.operationalStatus] - Statuses relating to shipment
|
|
2708
|
-
* transition in order processing journey. Comma separated values of
|
|
2709
|
-
* operational statuses.
|
|
2710
|
-
* @param {string} [arg.financialStatus] - Statuses relating to finance
|
|
2711
|
-
* related operations in the order processing journey. Comma separated
|
|
2712
|
-
* values of financial statuses.
|
|
2713
|
-
* @param {string} [arg.logisticsStatus] - Statuses relating to delivery and
|
|
2714
|
-
* pickup related operations in the order processing journey. Comma
|
|
2715
|
-
* separated values of logistics statuses.
|
|
2716
|
-
* @param {string} [arg.parentViewSlug] - Parent view is used for grouping
|
|
2717
|
-
* of child views. Slug of parent view.
|
|
2718
|
-
* @param {string} [arg.childViewSlug] - Child view is user configured view,
|
|
2719
|
-
* which has filters added by the user on which shipments/orders are
|
|
2720
|
-
* fetched. Slug of child view.
|
|
2721
|
-
* @param {string} [arg.groupEntity] - Defines the grouping criterion for
|
|
2722
|
-
* retrieving shipments or orders. It specifies whether the results should
|
|
2723
|
-
* be organized based on shipment groups or order groups. For example,
|
|
2724
|
-
* using 'shipments' groups results by shipment, while an invalid value
|
|
2725
|
-
* like 'abcd' may not be recognized, leading to errors or default behavior.
|
|
2726
|
-
* @returns {Paginator<OrderPlatformModel.OrderListingResponse>}
|
|
2727
|
-
* @summary: Get orders.
|
|
2728
|
-
* @description: Get Orders Listing
|
|
2729
|
-
*/
|
|
2730
|
-
getOrdersPaginator({
|
|
2731
|
-
lane,
|
|
2732
|
-
searchType,
|
|
2733
|
-
bagStatus,
|
|
2734
|
-
timeToDispatch,
|
|
2735
|
-
paymentMethods,
|
|
2736
|
-
tags,
|
|
2737
|
-
searchValue,
|
|
2738
|
-
fromDate,
|
|
2739
|
-
toDate,
|
|
2740
|
-
startDate,
|
|
2741
|
-
endDate,
|
|
2742
|
-
dpIds,
|
|
2743
|
-
stores,
|
|
2744
|
-
salesChannels,
|
|
2745
|
-
pageSize,
|
|
2746
|
-
isPrioritySort,
|
|
2747
|
-
customMeta,
|
|
2748
|
-
myOrders,
|
|
2749
|
-
showCrossCompanyData,
|
|
2750
|
-
customerId,
|
|
2751
|
-
orderType,
|
|
2752
|
-
operationalStatus,
|
|
2753
|
-
financialStatus,
|
|
2754
|
-
logisticsStatus,
|
|
2755
|
-
parentViewSlug,
|
|
2756
|
-
childViewSlug,
|
|
2757
|
-
groupEntity,
|
|
2758
|
-
} = {}) {
|
|
2759
|
-
const paginator = new Paginator();
|
|
2760
|
-
const callback = async () => {
|
|
2761
|
-
const pageId = paginator.nextId;
|
|
2762
|
-
const pageNo = paginator.pageNo;
|
|
2763
|
-
const pageType = "number";
|
|
2764
|
-
const data = await this.getOrders({
|
|
2765
|
-
lane: lane,
|
|
2766
|
-
searchType: searchType,
|
|
2767
|
-
bagStatus: bagStatus,
|
|
2768
|
-
timeToDispatch: timeToDispatch,
|
|
2769
|
-
paymentMethods: paymentMethods,
|
|
2770
|
-
tags: tags,
|
|
2771
|
-
searchValue: searchValue,
|
|
2772
|
-
fromDate: fromDate,
|
|
2773
|
-
toDate: toDate,
|
|
2774
|
-
startDate: startDate,
|
|
2775
|
-
endDate: endDate,
|
|
2776
|
-
dpIds: dpIds,
|
|
2777
|
-
stores: stores,
|
|
2778
|
-
salesChannels: salesChannels,
|
|
2779
|
-
pageNo: pageNo,
|
|
2780
|
-
pageSize: pageSize,
|
|
2781
|
-
isPrioritySort: isPrioritySort,
|
|
2782
|
-
customMeta: customMeta,
|
|
2783
|
-
myOrders: myOrders,
|
|
2784
|
-
showCrossCompanyData: showCrossCompanyData,
|
|
2785
|
-
customerId: customerId,
|
|
2786
|
-
orderType: orderType,
|
|
2787
|
-
operationalStatus: operationalStatus,
|
|
2788
|
-
financialStatus: financialStatus,
|
|
2789
|
-
logisticsStatus: logisticsStatus,
|
|
2790
|
-
parentViewSlug: parentViewSlug,
|
|
2791
|
-
childViewSlug: childViewSlug,
|
|
2792
|
-
groupEntity: groupEntity,
|
|
2793
|
-
});
|
|
2794
|
-
paginator.setPaginator({
|
|
2795
|
-
hasNext: data.page.has_next ? true : false,
|
|
2796
|
-
nextId: data.page.next_id,
|
|
2797
|
-
});
|
|
2798
|
-
return data;
|
|
2799
|
-
};
|
|
2800
|
-
paginator.setCallback(callback.bind(this));
|
|
2801
|
-
return paginator;
|
|
2802
|
-
}
|
|
2803
|
-
|
|
2804
|
-
/**
|
|
2805
|
-
* @param {OrderPlatformValidator.GetRefundConfigurationParam} arg - Arg object
|
|
2703
|
+
* @param {OrderPlatformValidator.GetManifestsParam} arg - Arg object
|
|
2806
2704
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2807
2705
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2808
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2809
|
-
*
|
|
2810
|
-
*
|
|
2811
|
-
* @
|
|
2812
|
-
* @summary: refund configuration.
|
|
2813
|
-
* @description: refund configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRefundConfiguration/).
|
|
2706
|
+
* @returns {Promise<OrderPlatformModel.ManifestList>} - Success response
|
|
2707
|
+
* @name getManifests
|
|
2708
|
+
* @summary: List manifests
|
|
2709
|
+
* @description: Get a list of manifest as per the filter provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifests/).
|
|
2814
2710
|
*/
|
|
2815
|
-
async
|
|
2816
|
-
{
|
|
2711
|
+
async getManifests(
|
|
2712
|
+
{
|
|
2713
|
+
status,
|
|
2714
|
+
startDate,
|
|
2715
|
+
endDate,
|
|
2716
|
+
searchType,
|
|
2717
|
+
storeId,
|
|
2718
|
+
searchValue,
|
|
2719
|
+
dpIds,
|
|
2720
|
+
pageNo,
|
|
2721
|
+
pageSize,
|
|
2722
|
+
requestHeaders,
|
|
2723
|
+
} = { requestHeaders: {} },
|
|
2817
2724
|
{ responseHeaders } = { responseHeaders: false }
|
|
2818
2725
|
) {
|
|
2819
|
-
const { error } = OrderPlatformValidator.
|
|
2726
|
+
const { error } = OrderPlatformValidator.getManifests().validate(
|
|
2820
2727
|
{
|
|
2821
|
-
|
|
2728
|
+
status,
|
|
2729
|
+
startDate,
|
|
2730
|
+
endDate,
|
|
2731
|
+
searchType,
|
|
2732
|
+
storeId,
|
|
2733
|
+
searchValue,
|
|
2734
|
+
dpIds,
|
|
2735
|
+
pageNo,
|
|
2736
|
+
pageSize,
|
|
2822
2737
|
},
|
|
2823
2738
|
{ abortEarly: false, allowUnknown: true }
|
|
2824
2739
|
);
|
|
@@ -2827,30 +2742,44 @@ class Order {
|
|
|
2827
2742
|
}
|
|
2828
2743
|
|
|
2829
2744
|
// Showing warrnings if extra unknown parameters are found
|
|
2830
|
-
const {
|
|
2831
|
-
error: warrning,
|
|
2832
|
-
} = OrderPlatformValidator.getRefundConfiguration().validate(
|
|
2745
|
+
const { error: warrning } = OrderPlatformValidator.getManifests().validate(
|
|
2833
2746
|
{
|
|
2834
|
-
|
|
2747
|
+
status,
|
|
2748
|
+
startDate,
|
|
2749
|
+
endDate,
|
|
2750
|
+
searchType,
|
|
2751
|
+
storeId,
|
|
2752
|
+
searchValue,
|
|
2753
|
+
dpIds,
|
|
2754
|
+
pageNo,
|
|
2755
|
+
pageSize,
|
|
2835
2756
|
},
|
|
2836
2757
|
{ abortEarly: false, allowUnknown: false }
|
|
2837
2758
|
);
|
|
2838
2759
|
if (warrning) {
|
|
2839
2760
|
Logger({
|
|
2840
2761
|
level: "WARN",
|
|
2841
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
2762
|
+
message: `Parameter Validation warrnings for platform > Order > getManifests \n ${warrning}`,
|
|
2842
2763
|
});
|
|
2843
2764
|
}
|
|
2844
2765
|
|
|
2845
2766
|
const query_params = {};
|
|
2846
|
-
query_params["
|
|
2767
|
+
query_params["status"] = status;
|
|
2768
|
+
query_params["start_date"] = startDate;
|
|
2769
|
+
query_params["end_date"] = endDate;
|
|
2770
|
+
query_params["search_type"] = searchType;
|
|
2771
|
+
query_params["store_id"] = storeId;
|
|
2772
|
+
query_params["search_value"] = searchValue;
|
|
2773
|
+
query_params["dp_ids"] = dpIds;
|
|
2774
|
+
query_params["page_no"] = pageNo;
|
|
2775
|
+
query_params["page_size"] = pageSize;
|
|
2847
2776
|
|
|
2848
2777
|
const xHeaders = {};
|
|
2849
2778
|
|
|
2850
2779
|
const response = await PlatformAPIClient.execute(
|
|
2851
2780
|
this.config,
|
|
2852
2781
|
"get",
|
|
2853
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
2782
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/listing`,
|
|
2854
2783
|
query_params,
|
|
2855
2784
|
undefined,
|
|
2856
2785
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2864,10 +2793,10 @@ class Order {
|
|
|
2864
2793
|
|
|
2865
2794
|
const {
|
|
2866
2795
|
error: res_error,
|
|
2867
|
-
} = OrderPlatformModel.
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
);
|
|
2796
|
+
} = OrderPlatformModel.ManifestList().validate(responseData, {
|
|
2797
|
+
abortEarly: false,
|
|
2798
|
+
allowUnknown: true,
|
|
2799
|
+
});
|
|
2871
2800
|
|
|
2872
2801
|
if (res_error) {
|
|
2873
2802
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2875,7 +2804,7 @@ class Order {
|
|
|
2875
2804
|
} else {
|
|
2876
2805
|
Logger({
|
|
2877
2806
|
level: "WARN",
|
|
2878
|
-
message: `Response Validation Warnings for platform > Order >
|
|
2807
|
+
message: `Response Validation Warnings for platform > Order > getManifests \n ${res_error}`,
|
|
2879
2808
|
});
|
|
2880
2809
|
}
|
|
2881
2810
|
}
|
|
@@ -2884,22 +2813,27 @@ class Order {
|
|
|
2884
2813
|
}
|
|
2885
2814
|
|
|
2886
2815
|
/**
|
|
2887
|
-
* @param {OrderPlatformValidator.
|
|
2816
|
+
* @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object
|
|
2888
2817
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2889
2818
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2890
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2891
|
-
*
|
|
2892
|
-
* @
|
|
2893
|
-
* @
|
|
2819
|
+
* @returns {Promise<OrderPlatformModel.OrderDetailsResponseSchema>} -
|
|
2820
|
+
* Success response
|
|
2821
|
+
* @name getOrderById
|
|
2822
|
+
* @summary: Get order
|
|
2823
|
+
* @description: Get detailed information about a specific order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/).
|
|
2894
2824
|
*/
|
|
2895
|
-
async
|
|
2896
|
-
{ requestHeaders } = {
|
|
2825
|
+
async getOrderById(
|
|
2826
|
+
{ orderId, myOrders, allowInactive, requestHeaders } = {
|
|
2827
|
+
requestHeaders: {},
|
|
2828
|
+
},
|
|
2897
2829
|
{ responseHeaders } = { responseHeaders: false }
|
|
2898
2830
|
) {
|
|
2899
|
-
const {
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2831
|
+
const { error } = OrderPlatformValidator.getOrderById().validate(
|
|
2832
|
+
{
|
|
2833
|
+
orderId,
|
|
2834
|
+
myOrders,
|
|
2835
|
+
allowInactive,
|
|
2836
|
+
},
|
|
2903
2837
|
{ abortEarly: false, allowUnknown: true }
|
|
2904
2838
|
);
|
|
2905
2839
|
if (error) {
|
|
@@ -2907,27 +2841,32 @@ class Order {
|
|
|
2907
2841
|
}
|
|
2908
2842
|
|
|
2909
2843
|
// Showing warrnings if extra unknown parameters are found
|
|
2910
|
-
const {
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2844
|
+
const { error: warrning } = OrderPlatformValidator.getOrderById().validate(
|
|
2845
|
+
{
|
|
2846
|
+
orderId,
|
|
2847
|
+
myOrders,
|
|
2848
|
+
allowInactive,
|
|
2849
|
+
},
|
|
2914
2850
|
{ abortEarly: false, allowUnknown: false }
|
|
2915
2851
|
);
|
|
2916
2852
|
if (warrning) {
|
|
2917
2853
|
Logger({
|
|
2918
2854
|
level: "WARN",
|
|
2919
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
2855
|
+
message: `Parameter Validation warrnings for platform > Order > getOrderById \n ${warrning}`,
|
|
2920
2856
|
});
|
|
2921
2857
|
}
|
|
2922
2858
|
|
|
2923
2859
|
const query_params = {};
|
|
2860
|
+
query_params["order_id"] = orderId;
|
|
2861
|
+
query_params["my_orders"] = myOrders;
|
|
2862
|
+
query_params["allow_inactive"] = allowInactive;
|
|
2924
2863
|
|
|
2925
2864
|
const xHeaders = {};
|
|
2926
2865
|
|
|
2927
2866
|
const response = await PlatformAPIClient.execute(
|
|
2928
2867
|
this.config,
|
|
2929
2868
|
"get",
|
|
2930
|
-
`/service/platform/order
|
|
2869
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/order-details`,
|
|
2931
2870
|
query_params,
|
|
2932
2871
|
undefined,
|
|
2933
2872
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2941,7 +2880,7 @@ class Order {
|
|
|
2941
2880
|
|
|
2942
2881
|
const {
|
|
2943
2882
|
error: res_error,
|
|
2944
|
-
} = OrderPlatformModel.
|
|
2883
|
+
} = OrderPlatformModel.OrderDetailsResponseSchema().validate(responseData, {
|
|
2945
2884
|
abortEarly: false,
|
|
2946
2885
|
allowUnknown: true,
|
|
2947
2886
|
});
|
|
@@ -2952,7 +2891,7 @@ class Order {
|
|
|
2952
2891
|
} else {
|
|
2953
2892
|
Logger({
|
|
2954
2893
|
level: "WARN",
|
|
2955
|
-
message: `Response Validation Warnings for platform > Order >
|
|
2894
|
+
message: `Response Validation Warnings for platform > Order > getOrderById \n ${res_error}`,
|
|
2956
2895
|
});
|
|
2957
2896
|
}
|
|
2958
2897
|
}
|
|
@@ -2961,36 +2900,75 @@ class Order {
|
|
|
2961
2900
|
}
|
|
2962
2901
|
|
|
2963
2902
|
/**
|
|
2964
|
-
* @param {OrderPlatformValidator.
|
|
2903
|
+
* @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object
|
|
2965
2904
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2966
2905
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2967
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2906
|
+
* @returns {Promise<OrderPlatformModel.OrderListingResponseSchema>} -
|
|
2968
2907
|
* Success response
|
|
2969
|
-
* @name
|
|
2970
|
-
* @summary:
|
|
2971
|
-
* @description:
|
|
2908
|
+
* @name getOrders
|
|
2909
|
+
* @summary: List orders
|
|
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/).
|
|
2972
2911
|
*/
|
|
2973
|
-
async
|
|
2912
|
+
async getOrders(
|
|
2974
2913
|
{
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2914
|
+
lane,
|
|
2915
|
+
searchType,
|
|
2916
|
+
bagStatus,
|
|
2917
|
+
timeToDispatch,
|
|
2918
|
+
paymentMethods,
|
|
2919
|
+
tags,
|
|
2920
|
+
searchValue,
|
|
2921
|
+
fromDate,
|
|
2922
|
+
toDate,
|
|
2923
|
+
startDate,
|
|
2924
|
+
endDate,
|
|
2925
|
+
dpIds,
|
|
2926
|
+
stores,
|
|
2927
|
+
salesChannels,
|
|
2928
|
+
pageNo,
|
|
2929
|
+
pageSize,
|
|
2930
|
+
isPrioritySort,
|
|
2931
|
+
customMeta,
|
|
2932
|
+
myOrders,
|
|
2933
|
+
showCrossCompanyData,
|
|
2934
|
+
customerId,
|
|
2935
|
+
orderType,
|
|
2936
|
+
allowInactive,
|
|
2937
|
+
groupEntity,
|
|
2938
|
+
enforceDateFilter,
|
|
2939
|
+
fulfillmentType,
|
|
2981
2940
|
requestHeaders,
|
|
2982
2941
|
} = { requestHeaders: {} },
|
|
2983
2942
|
{ responseHeaders } = { responseHeaders: false }
|
|
2984
2943
|
) {
|
|
2985
|
-
const { error } = OrderPlatformValidator.
|
|
2944
|
+
const { error } = OrderPlatformValidator.getOrders().validate(
|
|
2986
2945
|
{
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2946
|
+
lane,
|
|
2947
|
+
searchType,
|
|
2948
|
+
bagStatus,
|
|
2949
|
+
timeToDispatch,
|
|
2950
|
+
paymentMethods,
|
|
2951
|
+
tags,
|
|
2952
|
+
searchValue,
|
|
2953
|
+
fromDate,
|
|
2954
|
+
toDate,
|
|
2955
|
+
startDate,
|
|
2956
|
+
endDate,
|
|
2957
|
+
dpIds,
|
|
2958
|
+
stores,
|
|
2959
|
+
salesChannels,
|
|
2960
|
+
pageNo,
|
|
2961
|
+
pageSize,
|
|
2962
|
+
isPrioritySort,
|
|
2963
|
+
customMeta,
|
|
2964
|
+
myOrders,
|
|
2965
|
+
showCrossCompanyData,
|
|
2966
|
+
customerId,
|
|
2967
|
+
orderType,
|
|
2968
|
+
allowInactive,
|
|
2969
|
+
groupEntity,
|
|
2970
|
+
enforceDateFilter,
|
|
2971
|
+
fulfillmentType,
|
|
2994
2972
|
},
|
|
2995
2973
|
{ abortEarly: false, allowUnknown: true }
|
|
2996
2974
|
);
|
|
@@ -2999,40 +2977,78 @@ class Order {
|
|
|
2999
2977
|
}
|
|
3000
2978
|
|
|
3001
2979
|
// Showing warrnings if extra unknown parameters are found
|
|
3002
|
-
const {
|
|
3003
|
-
error: warrning,
|
|
3004
|
-
} = OrderPlatformValidator.getRefundOptions().validate(
|
|
2980
|
+
const { error: warrning } = OrderPlatformValidator.getOrders().validate(
|
|
3005
2981
|
{
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
2982
|
+
lane,
|
|
2983
|
+
searchType,
|
|
2984
|
+
bagStatus,
|
|
2985
|
+
timeToDispatch,
|
|
2986
|
+
paymentMethods,
|
|
2987
|
+
tags,
|
|
2988
|
+
searchValue,
|
|
2989
|
+
fromDate,
|
|
2990
|
+
toDate,
|
|
2991
|
+
startDate,
|
|
2992
|
+
endDate,
|
|
2993
|
+
dpIds,
|
|
2994
|
+
stores,
|
|
2995
|
+
salesChannels,
|
|
2996
|
+
pageNo,
|
|
2997
|
+
pageSize,
|
|
2998
|
+
isPrioritySort,
|
|
2999
|
+
customMeta,
|
|
3000
|
+
myOrders,
|
|
3001
|
+
showCrossCompanyData,
|
|
3002
|
+
customerId,
|
|
3003
|
+
orderType,
|
|
3004
|
+
allowInactive,
|
|
3005
|
+
groupEntity,
|
|
3006
|
+
enforceDateFilter,
|
|
3007
|
+
fulfillmentType,
|
|
3013
3008
|
},
|
|
3014
3009
|
{ abortEarly: false, allowUnknown: false }
|
|
3015
3010
|
);
|
|
3016
3011
|
if (warrning) {
|
|
3017
3012
|
Logger({
|
|
3018
3013
|
level: "WARN",
|
|
3019
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
3014
|
+
message: `Parameter Validation warrnings for platform > Order > getOrders \n ${warrning}`,
|
|
3020
3015
|
});
|
|
3021
3016
|
}
|
|
3022
3017
|
|
|
3023
3018
|
const query_params = {};
|
|
3024
|
-
query_params["
|
|
3025
|
-
query_params["
|
|
3026
|
-
query_params["
|
|
3027
|
-
query_params["
|
|
3028
|
-
query_params["
|
|
3019
|
+
query_params["lane"] = lane;
|
|
3020
|
+
query_params["search_type"] = searchType;
|
|
3021
|
+
query_params["bag_status"] = bagStatus;
|
|
3022
|
+
query_params["time_to_dispatch"] = timeToDispatch;
|
|
3023
|
+
query_params["payment_methods"] = paymentMethods;
|
|
3024
|
+
query_params["tags"] = tags;
|
|
3025
|
+
query_params["search_value"] = searchValue;
|
|
3026
|
+
query_params["from_date"] = fromDate;
|
|
3027
|
+
query_params["to_date"] = toDate;
|
|
3028
|
+
query_params["start_date"] = startDate;
|
|
3029
|
+
query_params["end_date"] = endDate;
|
|
3030
|
+
query_params["dp_ids"] = dpIds;
|
|
3031
|
+
query_params["stores"] = stores;
|
|
3032
|
+
query_params["sales_channels"] = salesChannels;
|
|
3033
|
+
query_params["page_no"] = pageNo;
|
|
3034
|
+
query_params["page_size"] = pageSize;
|
|
3035
|
+
query_params["is_priority_sort"] = isPrioritySort;
|
|
3036
|
+
query_params["custom_meta"] = customMeta;
|
|
3037
|
+
query_params["my_orders"] = myOrders;
|
|
3038
|
+
query_params["show_cross_company_data"] = showCrossCompanyData;
|
|
3039
|
+
query_params["customer_id"] = customerId;
|
|
3040
|
+
query_params["order_type"] = orderType;
|
|
3041
|
+
query_params["allow_inactive"] = allowInactive;
|
|
3042
|
+
query_params["group_entity"] = groupEntity;
|
|
3043
|
+
query_params["enforce_date_filter"] = enforceDateFilter;
|
|
3044
|
+
query_params["fulfillment_type"] = fulfillmentType;
|
|
3029
3045
|
|
|
3030
3046
|
const xHeaders = {};
|
|
3031
3047
|
|
|
3032
3048
|
const response = await PlatformAPIClient.execute(
|
|
3033
3049
|
this.config,
|
|
3034
3050
|
"get",
|
|
3035
|
-
`/service/platform/order
|
|
3051
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/orders-listing`,
|
|
3036
3052
|
query_params,
|
|
3037
3053
|
undefined,
|
|
3038
3054
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3046,10 +3062,10 @@ class Order {
|
|
|
3046
3062
|
|
|
3047
3063
|
const {
|
|
3048
3064
|
error: res_error,
|
|
3049
|
-
} = OrderPlatformModel.
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
);
|
|
3065
|
+
} = OrderPlatformModel.OrderListingResponseSchema().validate(responseData, {
|
|
3066
|
+
abortEarly: false,
|
|
3067
|
+
allowUnknown: true,
|
|
3068
|
+
});
|
|
3053
3069
|
|
|
3054
3070
|
if (res_error) {
|
|
3055
3071
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3057,7 +3073,7 @@ class Order {
|
|
|
3057
3073
|
} else {
|
|
3058
3074
|
Logger({
|
|
3059
3075
|
level: "WARN",
|
|
3060
|
-
message: `Response Validation Warnings for platform > Order >
|
|
3076
|
+
message: `Response Validation Warnings for platform > Order > getOrders \n ${res_error}`,
|
|
3061
3077
|
});
|
|
3062
3078
|
}
|
|
3063
3079
|
}
|
|
@@ -3066,97 +3082,136 @@ class Order {
|
|
|
3066
3082
|
}
|
|
3067
3083
|
|
|
3068
3084
|
/**
|
|
3069
|
-
* @param {
|
|
3070
|
-
* @param {
|
|
3071
|
-
*
|
|
3072
|
-
* @
|
|
3073
|
-
*
|
|
3074
|
-
*
|
|
3075
|
-
*
|
|
3076
|
-
* @
|
|
3077
|
-
*
|
|
3085
|
+
* @param {Object} arg - Arg object.
|
|
3086
|
+
* @param {string} [arg.lane] - Lane refers to a section where orders are
|
|
3087
|
+
* assigned, indicating its grouping.
|
|
3088
|
+
* @param {string} [arg.searchType] - Search_type refers to the field that
|
|
3089
|
+
* will be used as the target for the search operation.
|
|
3090
|
+
* @param {string} [arg.bagStatus] - Bag_status refers to status of the
|
|
3091
|
+
* entity. Filters orders based on the status.
|
|
3092
|
+
* @param {number} [arg.timeToDispatch] - Time_to_dispatch refers to
|
|
3093
|
+
* estimated SLA time.
|
|
3094
|
+
* @param {string} [arg.paymentMethods] - Comma separated values of payment
|
|
3095
|
+
* methods that were used to place order.
|
|
3096
|
+
* @param {string} [arg.tags] - Tags refers to additional descriptive labels
|
|
3097
|
+
* associated with the order
|
|
3098
|
+
* @param {string} [arg.searchValue] - Search_value is matched against the
|
|
3099
|
+
* field specified by the search_type
|
|
3100
|
+
* @param {string} [arg.fromDate] - Date time in UTC timezone as per ISO format.
|
|
3101
|
+
* @param {string} [arg.toDate] - Date time in UTC timezone as per ISO format.
|
|
3102
|
+
* @param {string} [arg.startDate] - Date time in UTC timezone as per ISO format.
|
|
3103
|
+
* @param {string} [arg.endDate] - Date time in UTC timezone as per ISO format.
|
|
3104
|
+
* @param {string} [arg.dpIds] - Delivery Partner IDs to which shipments are assigned.
|
|
3105
|
+
* @param {string} [arg.stores] - A comma-separated list of store IDs used
|
|
3106
|
+
* to filter results to only those related to specific stores.
|
|
3107
|
+
* @param {string} [arg.salesChannels] - A comma-separated list of sales
|
|
3108
|
+
* channel IDs to filter results based on the sales channels involved.
|
|
3109
|
+
* @param {number} [arg.pageSize] - Determines the number of results
|
|
3110
|
+
* returned per page.
|
|
3111
|
+
* @param {boolean} [arg.isPrioritySort] -
|
|
3112
|
+
* @param {string} [arg.customMeta] -
|
|
3113
|
+
* @param {boolean} [arg.myOrders] -
|
|
3114
|
+
* @param {boolean} [arg.showCrossCompanyData] - Flag to view cross &
|
|
3115
|
+
* non-cross company order
|
|
3116
|
+
* @param {string} [arg.customerId] - The unique identifier for the customer
|
|
3117
|
+
* associated with the query, useful for filtering results to a specific customer.
|
|
3118
|
+
* @param {string} [arg.orderType] -
|
|
3119
|
+
* @param {boolean} [arg.allowInactive] - Flag indicating whether inactive
|
|
3120
|
+
* shipments are allowed
|
|
3121
|
+
* @param {string} [arg.groupEntity] - Defines the grouping criterion for
|
|
3122
|
+
* retrieving shipments or orders. It specifies whether the results should
|
|
3123
|
+
* be organized based on shipment groups or order groups. For example,
|
|
3124
|
+
* using 'shipments' groups results by shipment, while an invalid value
|
|
3125
|
+
* like 'abcd' may not be recognized, leading to errors or default behavior.
|
|
3126
|
+
* @param {boolean} [arg.enforceDateFilter] - Applies a date filter for
|
|
3127
|
+
* listing orders. This is useful when fetching data for a specific date
|
|
3128
|
+
* range while performing searches.
|
|
3129
|
+
* @param {string} [arg.fulfillmentType] - Define the Fulfillment Type for
|
|
3130
|
+
* Listing Orders, This is use when we want to get list of shipments or
|
|
3131
|
+
* orders by cross store or cross company or fulfilling Store (by
|
|
3132
|
+
* default), this is also depends on the login user accessType and store access
|
|
3133
|
+
* @returns {Paginator<OrderPlatformModel.OrderListingResponseSchema>}
|
|
3134
|
+
* @summary: List orders
|
|
3135
|
+
* @description: Get a list of orders based on the filters provided.
|
|
3078
3136
|
*/
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
}
|
|
3148
|
-
|
|
3149
|
-
return response;
|
|
3137
|
+
getOrdersPaginator({
|
|
3138
|
+
lane,
|
|
3139
|
+
searchType,
|
|
3140
|
+
bagStatus,
|
|
3141
|
+
timeToDispatch,
|
|
3142
|
+
paymentMethods,
|
|
3143
|
+
tags,
|
|
3144
|
+
searchValue,
|
|
3145
|
+
fromDate,
|
|
3146
|
+
toDate,
|
|
3147
|
+
startDate,
|
|
3148
|
+
endDate,
|
|
3149
|
+
dpIds,
|
|
3150
|
+
stores,
|
|
3151
|
+
salesChannels,
|
|
3152
|
+
pageSize,
|
|
3153
|
+
isPrioritySort,
|
|
3154
|
+
customMeta,
|
|
3155
|
+
myOrders,
|
|
3156
|
+
showCrossCompanyData,
|
|
3157
|
+
customerId,
|
|
3158
|
+
orderType,
|
|
3159
|
+
allowInactive,
|
|
3160
|
+
groupEntity,
|
|
3161
|
+
enforceDateFilter,
|
|
3162
|
+
fulfillmentType,
|
|
3163
|
+
} = {}) {
|
|
3164
|
+
const paginator = new Paginator();
|
|
3165
|
+
const callback = async () => {
|
|
3166
|
+
const pageId = paginator.nextId;
|
|
3167
|
+
const pageNo = paginator.pageNo;
|
|
3168
|
+
const pageType = "number";
|
|
3169
|
+
const data = await this.getOrders({
|
|
3170
|
+
lane: lane,
|
|
3171
|
+
searchType: searchType,
|
|
3172
|
+
bagStatus: bagStatus,
|
|
3173
|
+
timeToDispatch: timeToDispatch,
|
|
3174
|
+
paymentMethods: paymentMethods,
|
|
3175
|
+
tags: tags,
|
|
3176
|
+
searchValue: searchValue,
|
|
3177
|
+
fromDate: fromDate,
|
|
3178
|
+
toDate: toDate,
|
|
3179
|
+
startDate: startDate,
|
|
3180
|
+
endDate: endDate,
|
|
3181
|
+
dpIds: dpIds,
|
|
3182
|
+
stores: stores,
|
|
3183
|
+
salesChannels: salesChannels,
|
|
3184
|
+
pageNo: pageNo,
|
|
3185
|
+
pageSize: pageSize,
|
|
3186
|
+
isPrioritySort: isPrioritySort,
|
|
3187
|
+
customMeta: customMeta,
|
|
3188
|
+
myOrders: myOrders,
|
|
3189
|
+
showCrossCompanyData: showCrossCompanyData,
|
|
3190
|
+
customerId: customerId,
|
|
3191
|
+
orderType: orderType,
|
|
3192
|
+
allowInactive: allowInactive,
|
|
3193
|
+
groupEntity: groupEntity,
|
|
3194
|
+
enforceDateFilter: enforceDateFilter,
|
|
3195
|
+
fulfillmentType: fulfillmentType,
|
|
3196
|
+
});
|
|
3197
|
+
paginator.setPaginator({
|
|
3198
|
+
hasNext: data.page.has_next ? true : false,
|
|
3199
|
+
nextId: data.page.next_id,
|
|
3200
|
+
});
|
|
3201
|
+
return data;
|
|
3202
|
+
};
|
|
3203
|
+
paginator.setCallback(callback.bind(this));
|
|
3204
|
+
return paginator;
|
|
3150
3205
|
}
|
|
3151
3206
|
|
|
3152
3207
|
/**
|
|
3153
3208
|
* @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object
|
|
3154
3209
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3155
3210
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3156
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3211
|
+
* @returns {Promise<OrderPlatformModel.GetActionsResponseSchema>} - Success response
|
|
3157
3212
|
* @name getRoleBasedActions
|
|
3158
|
-
* @summary: Get role-based actions
|
|
3159
|
-
* @description: Retrieve
|
|
3213
|
+
* @summary: Get role-based actions
|
|
3214
|
+
* @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/).
|
|
3160
3215
|
*/
|
|
3161
3216
|
async getRoleBasedActions(
|
|
3162
3217
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -3205,7 +3260,7 @@ class Order {
|
|
|
3205
3260
|
|
|
3206
3261
|
const {
|
|
3207
3262
|
error: res_error,
|
|
3208
|
-
} = OrderPlatformModel.
|
|
3263
|
+
} = OrderPlatformModel.GetActionsResponseSchema().validate(responseData, {
|
|
3209
3264
|
abortEarly: false,
|
|
3210
3265
|
allowUnknown: true,
|
|
3211
3266
|
});
|
|
@@ -3228,15 +3283,20 @@ class Order {
|
|
|
3228
3283
|
* @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object
|
|
3229
3284
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3230
3285
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3231
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3286
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInfoResponseSchema>} -
|
|
3287
|
+
* Success response
|
|
3232
3288
|
* @name getShipmentById
|
|
3233
|
-
* @summary: Get shipment
|
|
3234
|
-
* @description:
|
|
3289
|
+
* @summary: Get shipment details
|
|
3290
|
+
* @description: Get detailed information about a specific shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
|
|
3235
3291
|
*/
|
|
3236
3292
|
async getShipmentById(
|
|
3237
|
-
{
|
|
3238
|
-
|
|
3239
|
-
|
|
3293
|
+
{
|
|
3294
|
+
channelShipmentId,
|
|
3295
|
+
shipmentId,
|
|
3296
|
+
fetchActiveShipment,
|
|
3297
|
+
allowInactive,
|
|
3298
|
+
requestHeaders,
|
|
3299
|
+
} = { requestHeaders: {} },
|
|
3240
3300
|
{ responseHeaders } = { responseHeaders: false }
|
|
3241
3301
|
) {
|
|
3242
3302
|
const { error } = OrderPlatformValidator.getShipmentById().validate(
|
|
@@ -3244,6 +3304,7 @@ class Order {
|
|
|
3244
3304
|
channelShipmentId,
|
|
3245
3305
|
shipmentId,
|
|
3246
3306
|
fetchActiveShipment,
|
|
3307
|
+
allowInactive,
|
|
3247
3308
|
},
|
|
3248
3309
|
{ abortEarly: false, allowUnknown: true }
|
|
3249
3310
|
);
|
|
@@ -3259,6 +3320,7 @@ class Order {
|
|
|
3259
3320
|
channelShipmentId,
|
|
3260
3321
|
shipmentId,
|
|
3261
3322
|
fetchActiveShipment,
|
|
3323
|
+
allowInactive,
|
|
3262
3324
|
},
|
|
3263
3325
|
{ abortEarly: false, allowUnknown: false }
|
|
3264
3326
|
);
|
|
@@ -3273,6 +3335,7 @@ class Order {
|
|
|
3273
3335
|
query_params["channel_shipment_id"] = channelShipmentId;
|
|
3274
3336
|
query_params["shipment_id"] = shipmentId;
|
|
3275
3337
|
query_params["fetch_active_shipment"] = fetchActiveShipment;
|
|
3338
|
+
query_params["allow_inactive"] = allowInactive;
|
|
3276
3339
|
|
|
3277
3340
|
const xHeaders = {};
|
|
3278
3341
|
|
|
@@ -3293,7 +3356,7 @@ class Order {
|
|
|
3293
3356
|
|
|
3294
3357
|
const {
|
|
3295
3358
|
error: res_error,
|
|
3296
|
-
} = OrderPlatformModel.
|
|
3359
|
+
} = OrderPlatformModel.ShipmentInfoResponseSchema().validate(responseData, {
|
|
3297
3360
|
abortEarly: false,
|
|
3298
3361
|
allowUnknown: true,
|
|
3299
3362
|
});
|
|
@@ -3316,10 +3379,11 @@ class Order {
|
|
|
3316
3379
|
* @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object
|
|
3317
3380
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3318
3381
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3319
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3382
|
+
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponseSchema>} -
|
|
3383
|
+
* Success response
|
|
3320
3384
|
* @name getShipmentHistory
|
|
3321
|
-
* @summary: Get shipment history
|
|
3322
|
-
* @description:
|
|
3385
|
+
* @summary: Get a shipment's history
|
|
3386
|
+
* @description: Get the history of the shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/).
|
|
3323
3387
|
*/
|
|
3324
3388
|
async getShipmentHistory(
|
|
3325
3389
|
{ shipmentId, bagId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3376,10 +3440,10 @@ class Order {
|
|
|
3376
3440
|
|
|
3377
3441
|
const {
|
|
3378
3442
|
error: res_error,
|
|
3379
|
-
} = OrderPlatformModel.
|
|
3380
|
-
|
|
3381
|
-
allowUnknown: true
|
|
3382
|
-
|
|
3443
|
+
} = OrderPlatformModel.ShipmentHistoryResponseSchema().validate(
|
|
3444
|
+
responseData,
|
|
3445
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3446
|
+
);
|
|
3383
3447
|
|
|
3384
3448
|
if (res_error) {
|
|
3385
3449
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3399,11 +3463,12 @@ class Order {
|
|
|
3399
3463
|
* @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object
|
|
3400
3464
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3401
3465
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3402
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3403
|
-
* Success response
|
|
3466
|
+
* @returns {Promise<OrderPlatformModel.PlatformShipmentReasonsResponseSchema>}
|
|
3467
|
+
* - Success response
|
|
3468
|
+
*
|
|
3404
3469
|
* @name getShipmentReasons
|
|
3405
|
-
* @summary:
|
|
3406
|
-
* @description:
|
|
3470
|
+
* @summary: List bag cancellation reasons
|
|
3471
|
+
* @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/).
|
|
3407
3472
|
*/
|
|
3408
3473
|
async getShipmentReasons(
|
|
3409
3474
|
{ shipmentId, bagId, state, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3460,7 +3525,7 @@ class Order {
|
|
|
3460
3525
|
|
|
3461
3526
|
const {
|
|
3462
3527
|
error: res_error,
|
|
3463
|
-
} = OrderPlatformModel.
|
|
3528
|
+
} = OrderPlatformModel.PlatformShipmentReasonsResponseSchema().validate(
|
|
3464
3529
|
responseData,
|
|
3465
3530
|
{ abortEarly: false, allowUnknown: true }
|
|
3466
3531
|
);
|
|
@@ -3483,17 +3548,18 @@ class Order {
|
|
|
3483
3548
|
* @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object
|
|
3484
3549
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3485
3550
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3486
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3551
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema>}
|
|
3487
3552
|
* - Success response
|
|
3488
3553
|
*
|
|
3489
3554
|
* @name getShipments
|
|
3490
|
-
* @summary:
|
|
3491
|
-
* @description: Get
|
|
3555
|
+
* @summary: List shipments
|
|
3556
|
+
* @description: Get a list of shipments based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipments/).
|
|
3492
3557
|
*/
|
|
3493
3558
|
async getShipments(
|
|
3494
3559
|
{
|
|
3495
3560
|
lane,
|
|
3496
3561
|
bagStatus,
|
|
3562
|
+
statusAssigned,
|
|
3497
3563
|
statusOverrideLane,
|
|
3498
3564
|
timeToDispatch,
|
|
3499
3565
|
searchType,
|
|
@@ -3502,6 +3568,8 @@ class Order {
|
|
|
3502
3568
|
toDate,
|
|
3503
3569
|
startDate,
|
|
3504
3570
|
endDate,
|
|
3571
|
+
statusAssignedStartDate,
|
|
3572
|
+
statusAssignedEndDate,
|
|
3505
3573
|
dpIds,
|
|
3506
3574
|
stores,
|
|
3507
3575
|
salesChannels,
|
|
@@ -3523,13 +3591,9 @@ class Order {
|
|
|
3523
3591
|
tags,
|
|
3524
3592
|
customerId,
|
|
3525
3593
|
orderType,
|
|
3526
|
-
operationalStatus,
|
|
3527
|
-
financialStatus,
|
|
3528
|
-
logisticsStatus,
|
|
3529
|
-
parentViewSlug,
|
|
3530
|
-
childViewSlug,
|
|
3531
|
-
lockStatus,
|
|
3532
3594
|
groupEntity,
|
|
3595
|
+
enforceDateFilter,
|
|
3596
|
+
fulfillmentType,
|
|
3533
3597
|
requestHeaders,
|
|
3534
3598
|
} = { requestHeaders: {} },
|
|
3535
3599
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -3538,6 +3602,7 @@ class Order {
|
|
|
3538
3602
|
{
|
|
3539
3603
|
lane,
|
|
3540
3604
|
bagStatus,
|
|
3605
|
+
statusAssigned,
|
|
3541
3606
|
statusOverrideLane,
|
|
3542
3607
|
timeToDispatch,
|
|
3543
3608
|
searchType,
|
|
@@ -3546,6 +3611,8 @@ class Order {
|
|
|
3546
3611
|
toDate,
|
|
3547
3612
|
startDate,
|
|
3548
3613
|
endDate,
|
|
3614
|
+
statusAssignedStartDate,
|
|
3615
|
+
statusAssignedEndDate,
|
|
3549
3616
|
dpIds,
|
|
3550
3617
|
stores,
|
|
3551
3618
|
salesChannels,
|
|
@@ -3567,13 +3634,9 @@ class Order {
|
|
|
3567
3634
|
tags,
|
|
3568
3635
|
customerId,
|
|
3569
3636
|
orderType,
|
|
3570
|
-
operationalStatus,
|
|
3571
|
-
financialStatus,
|
|
3572
|
-
logisticsStatus,
|
|
3573
|
-
parentViewSlug,
|
|
3574
|
-
childViewSlug,
|
|
3575
|
-
lockStatus,
|
|
3576
3637
|
groupEntity,
|
|
3638
|
+
enforceDateFilter,
|
|
3639
|
+
fulfillmentType,
|
|
3577
3640
|
},
|
|
3578
3641
|
{ abortEarly: false, allowUnknown: true }
|
|
3579
3642
|
);
|
|
@@ -3586,6 +3649,7 @@ class Order {
|
|
|
3586
3649
|
{
|
|
3587
3650
|
lane,
|
|
3588
3651
|
bagStatus,
|
|
3652
|
+
statusAssigned,
|
|
3589
3653
|
statusOverrideLane,
|
|
3590
3654
|
timeToDispatch,
|
|
3591
3655
|
searchType,
|
|
@@ -3594,6 +3658,8 @@ class Order {
|
|
|
3594
3658
|
toDate,
|
|
3595
3659
|
startDate,
|
|
3596
3660
|
endDate,
|
|
3661
|
+
statusAssignedStartDate,
|
|
3662
|
+
statusAssignedEndDate,
|
|
3597
3663
|
dpIds,
|
|
3598
3664
|
stores,
|
|
3599
3665
|
salesChannels,
|
|
@@ -3615,13 +3681,9 @@ class Order {
|
|
|
3615
3681
|
tags,
|
|
3616
3682
|
customerId,
|
|
3617
3683
|
orderType,
|
|
3618
|
-
operationalStatus,
|
|
3619
|
-
financialStatus,
|
|
3620
|
-
logisticsStatus,
|
|
3621
|
-
parentViewSlug,
|
|
3622
|
-
childViewSlug,
|
|
3623
|
-
lockStatus,
|
|
3624
3684
|
groupEntity,
|
|
3685
|
+
enforceDateFilter,
|
|
3686
|
+
fulfillmentType,
|
|
3625
3687
|
},
|
|
3626
3688
|
{ abortEarly: false, allowUnknown: false }
|
|
3627
3689
|
);
|
|
@@ -3635,6 +3697,7 @@ class Order {
|
|
|
3635
3697
|
const query_params = {};
|
|
3636
3698
|
query_params["lane"] = lane;
|
|
3637
3699
|
query_params["bag_status"] = bagStatus;
|
|
3700
|
+
query_params["status_assigned"] = statusAssigned;
|
|
3638
3701
|
query_params["status_override_lane"] = statusOverrideLane;
|
|
3639
3702
|
query_params["time_to_dispatch"] = timeToDispatch;
|
|
3640
3703
|
query_params["search_type"] = searchType;
|
|
@@ -3643,6 +3706,8 @@ class Order {
|
|
|
3643
3706
|
query_params["to_date"] = toDate;
|
|
3644
3707
|
query_params["start_date"] = startDate;
|
|
3645
3708
|
query_params["end_date"] = endDate;
|
|
3709
|
+
query_params["status_assigned_start_date"] = statusAssignedStartDate;
|
|
3710
|
+
query_params["status_assigned_end_date"] = statusAssignedEndDate;
|
|
3646
3711
|
query_params["dp_ids"] = dpIds;
|
|
3647
3712
|
query_params["stores"] = stores;
|
|
3648
3713
|
query_params["sales_channels"] = salesChannels;
|
|
@@ -3664,13 +3729,9 @@ class Order {
|
|
|
3664
3729
|
query_params["tags"] = tags;
|
|
3665
3730
|
query_params["customer_id"] = customerId;
|
|
3666
3731
|
query_params["order_type"] = orderType;
|
|
3667
|
-
query_params["operational_status"] = operationalStatus;
|
|
3668
|
-
query_params["financial_status"] = financialStatus;
|
|
3669
|
-
query_params["logistics_status"] = logisticsStatus;
|
|
3670
|
-
query_params["parent_view_slug"] = parentViewSlug;
|
|
3671
|
-
query_params["child_view_slug"] = childViewSlug;
|
|
3672
|
-
query_params["lock_status"] = lockStatus;
|
|
3673
3732
|
query_params["group_entity"] = groupEntity;
|
|
3733
|
+
query_params["enforce_date_filter"] = enforceDateFilter;
|
|
3734
|
+
query_params["fulfillment_type"] = fulfillmentType;
|
|
3674
3735
|
|
|
3675
3736
|
const xHeaders = {};
|
|
3676
3737
|
|
|
@@ -3691,7 +3752,7 @@ class Order {
|
|
|
3691
3752
|
|
|
3692
3753
|
const {
|
|
3693
3754
|
error: res_error,
|
|
3694
|
-
} = OrderPlatformModel.
|
|
3755
|
+
} = OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema().validate(
|
|
3695
3756
|
responseData,
|
|
3696
3757
|
{ abortEarly: false, allowUnknown: true }
|
|
3697
3758
|
);
|
|
@@ -3713,64 +3774,90 @@ class Order {
|
|
|
3713
3774
|
/**
|
|
3714
3775
|
* @param {Object} arg - Arg object.
|
|
3715
3776
|
* @param {string} [arg.lane] - Name of lane for which data is to be fetched
|
|
3716
|
-
* @param {string} [arg.bagStatus] - Comma separated values of bag statuses
|
|
3777
|
+
* @param {string} [arg.bagStatus] - Comma separated values of bag statuses.
|
|
3778
|
+
* @param {string} [arg.statusAssigned] - Used to filter shipments based on
|
|
3779
|
+
* status present in shipment_status_history. For more information on
|
|
3780
|
+
* these statuses, refer to the Fynd Partners documentation.
|
|
3717
3781
|
* @param {boolean} [arg.statusOverrideLane] - Use this flag to fetch by
|
|
3718
|
-
* bag_status and override lane
|
|
3719
|
-
* @param {number} [arg.timeToDispatch] -
|
|
3720
|
-
* @param {string} [arg.searchType] -
|
|
3721
|
-
*
|
|
3782
|
+
* bag_status and override lane.
|
|
3783
|
+
* @param {number} [arg.timeToDispatch] - Indicates the time to dispatch.
|
|
3784
|
+
* @param {string} [arg.searchType] - Specifies the key used to determine
|
|
3785
|
+
* the type of search being performed.
|
|
3786
|
+
* @param {string} [arg.searchValue] - The value corresponding to the search
|
|
3787
|
+
* type, such as a specific shipment ID or order ID.
|
|
3722
3788
|
* @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format
|
|
3723
3789
|
* @param {string} [arg.toDate] - End Date in DD-MM-YYYY format
|
|
3724
|
-
* @param {string} [arg.startDate] - UTC
|
|
3725
|
-
*
|
|
3726
|
-
* @param {string} [arg.
|
|
3727
|
-
*
|
|
3728
|
-
* @param {string} [arg.
|
|
3729
|
-
*
|
|
3730
|
-
*
|
|
3731
|
-
*
|
|
3732
|
-
*
|
|
3733
|
-
* @param {string} [arg.
|
|
3734
|
-
*
|
|
3735
|
-
*
|
|
3736
|
-
*
|
|
3737
|
-
* @param {string} [arg.
|
|
3738
|
-
*
|
|
3739
|
-
* @param {
|
|
3740
|
-
*
|
|
3741
|
-
* @param {string} [arg.
|
|
3742
|
-
*
|
|
3743
|
-
*
|
|
3744
|
-
*
|
|
3745
|
-
* @param {
|
|
3746
|
-
*
|
|
3747
|
-
* @param {
|
|
3748
|
-
*
|
|
3749
|
-
*
|
|
3750
|
-
*
|
|
3751
|
-
*
|
|
3752
|
-
*
|
|
3753
|
-
*
|
|
3754
|
-
*
|
|
3755
|
-
*
|
|
3756
|
-
*
|
|
3757
|
-
*
|
|
3758
|
-
*
|
|
3759
|
-
*
|
|
3760
|
-
*
|
|
3761
|
-
* @param {
|
|
3790
|
+
* @param {string} [arg.startDate] - The UTC start date in ISO format
|
|
3791
|
+
* (YYYY-MM-DDTHH:MM:SSZ) for filtering results.
|
|
3792
|
+
* @param {string} [arg.endDate] - The UTC end date in ISO format
|
|
3793
|
+
* (YYYY-MM-DDTHH:MM:SSZ) for filtering results.
|
|
3794
|
+
* @param {string} [arg.statusAssignedStartDate] - Specifies the starting
|
|
3795
|
+
* UTC date and time (in ISO format, YYYY-MM-DDTHH:MM:SSZ) to define the
|
|
3796
|
+
* lower boundary for filtering shipments based on the `created_at`
|
|
3797
|
+
* timestamp of statuses in the shipment's status history. It allows
|
|
3798
|
+
* filtering statuses that were created within a specific time range.
|
|
3799
|
+
* @param {string} [arg.statusAssignedEndDate] - Specifies the ending UTC
|
|
3800
|
+
* date and time (in ISO format, YYYY-MM-DDTHH:MM:SSZ) to define the upper
|
|
3801
|
+
* boundary for filtering shipments based on the `created_at` timestamp of
|
|
3802
|
+
* statuses in the shipment's status history.
|
|
3803
|
+
* @param {string} [arg.dpIds] - A comma-separated list of delivery partner
|
|
3804
|
+
* IDs to filter results by specific delivery partners.
|
|
3805
|
+
* @param {string} [arg.stores] - A comma-separated list of store IDs used
|
|
3806
|
+
* to filter results to only those related to specific stores.
|
|
3807
|
+
* @param {string} [arg.salesChannels] - A comma-separated list of sales
|
|
3808
|
+
* channel IDs to filter results based on the sales channels involved.
|
|
3809
|
+
* @param {number} [arg.pageSize] - Determines the number of results
|
|
3810
|
+
* returned per page.
|
|
3811
|
+
* @param {boolean} [arg.fetchActiveShipment] - A boolean flag that
|
|
3812
|
+
* indicates whether to include only active shipments in the results.
|
|
3813
|
+
* @param {boolean} [arg.allowInactive] - A flag indicating whether to allow
|
|
3814
|
+
* the inclusion of inactive shipments in the results.
|
|
3815
|
+
* @param {boolean} [arg.excludeLockedShipments] - A flag to specify whether
|
|
3816
|
+
* to exclude shipments that are locked from the results.
|
|
3817
|
+
* @param {string} [arg.paymentMethods] - A comma-separated list of payment methods.
|
|
3818
|
+
* @param {string} [arg.channelShipmentId] - The shipment ID used in the
|
|
3819
|
+
* application, which can be used to reference specific shipments.
|
|
3820
|
+
* @param {string} [arg.channelOrderId] - The order ID used in the application.
|
|
3821
|
+
* @param {string} [arg.customMeta] - Custom metadata associated with the
|
|
3822
|
+
* query, allowing for additional filtering or information to be passed.
|
|
3823
|
+
* @param {string} [arg.orderingChannel] - The channel through which the
|
|
3824
|
+
* order was placed.
|
|
3825
|
+
* @param {string} [arg.companyAffiliateTag] - A tag used to identify the
|
|
3826
|
+
* company's affiliation for filtering or reporting purposes.
|
|
3827
|
+
* @param {boolean} [arg.myOrders] - A boolean flag indicating whether the
|
|
3828
|
+
* query should return only the user's orders.
|
|
3829
|
+
* @param {string} [arg.platformUserId] - The unique identifier of the user
|
|
3830
|
+
* on the platform, useful for filtering orders related to a specific user.
|
|
3831
|
+
* @param {string} [arg.sortType] - Determines the sorting order of the
|
|
3832
|
+
* results based on specific criteria.
|
|
3833
|
+
* @param {boolean} [arg.showCrossCompanyData] - A flag indicating whether
|
|
3834
|
+
* to include data from both cross-company and non-cross-company orders in
|
|
3835
|
+
* the results.
|
|
3836
|
+
* @param {string} [arg.tags] - A comma-separated list of tags associated
|
|
3837
|
+
* with the orders to filter results based on specific characteristics.
|
|
3838
|
+
* @param {string} [arg.customerId] - The unique identifier for the customer
|
|
3839
|
+
* associated with the query, useful for filtering results to a specific customer.
|
|
3840
|
+
* @param {string} [arg.orderType] - The type of order being queried.
|
|
3762
3841
|
* @param {string} [arg.groupEntity] - Defines the grouping criterion for
|
|
3763
3842
|
* retrieving shipments or orders. It specifies whether the results should
|
|
3764
3843
|
* be organized based on shipment groups or order groups. For example,
|
|
3765
3844
|
* using 'shipments' groups results by shipment, while an invalid value
|
|
3766
3845
|
* like 'abcd' may not be recognized, leading to errors or default behavior.
|
|
3767
|
-
* @
|
|
3768
|
-
*
|
|
3769
|
-
*
|
|
3846
|
+
* @param {boolean} [arg.enforceDateFilter] - Applies a date filter for
|
|
3847
|
+
* listing shipments. This is useful when fetching data for a specific
|
|
3848
|
+
* date range while performing searches.
|
|
3849
|
+
* @param {string} [arg.fulfillmentType] - Define the Fulfillment Type for
|
|
3850
|
+
* Listing Orders, This is use when we want to get list of shipments or
|
|
3851
|
+
* orders by cross store or cross company or fulfilling Store (by
|
|
3852
|
+
* default), this is also depends on the login user accessType and store access
|
|
3853
|
+
* @returns {Paginator<OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema>}
|
|
3854
|
+
* @summary: List shipments
|
|
3855
|
+
* @description: Get a list of shipments based on the filters provided
|
|
3770
3856
|
*/
|
|
3771
3857
|
getShipmentsPaginator({
|
|
3772
3858
|
lane,
|
|
3773
3859
|
bagStatus,
|
|
3860
|
+
statusAssigned,
|
|
3774
3861
|
statusOverrideLane,
|
|
3775
3862
|
timeToDispatch,
|
|
3776
3863
|
searchType,
|
|
@@ -3779,6 +3866,8 @@ class Order {
|
|
|
3779
3866
|
toDate,
|
|
3780
3867
|
startDate,
|
|
3781
3868
|
endDate,
|
|
3869
|
+
statusAssignedStartDate,
|
|
3870
|
+
statusAssignedEndDate,
|
|
3782
3871
|
dpIds,
|
|
3783
3872
|
stores,
|
|
3784
3873
|
salesChannels,
|
|
@@ -3799,13 +3888,9 @@ class Order {
|
|
|
3799
3888
|
tags,
|
|
3800
3889
|
customerId,
|
|
3801
3890
|
orderType,
|
|
3802
|
-
operationalStatus,
|
|
3803
|
-
financialStatus,
|
|
3804
|
-
logisticsStatus,
|
|
3805
|
-
parentViewSlug,
|
|
3806
|
-
childViewSlug,
|
|
3807
|
-
lockStatus,
|
|
3808
3891
|
groupEntity,
|
|
3892
|
+
enforceDateFilter,
|
|
3893
|
+
fulfillmentType,
|
|
3809
3894
|
} = {}) {
|
|
3810
3895
|
const paginator = new Paginator();
|
|
3811
3896
|
const callback = async () => {
|
|
@@ -3815,6 +3900,7 @@ class Order {
|
|
|
3815
3900
|
const data = await this.getShipments({
|
|
3816
3901
|
lane: lane,
|
|
3817
3902
|
bagStatus: bagStatus,
|
|
3903
|
+
statusAssigned: statusAssigned,
|
|
3818
3904
|
statusOverrideLane: statusOverrideLane,
|
|
3819
3905
|
timeToDispatch: timeToDispatch,
|
|
3820
3906
|
searchType: searchType,
|
|
@@ -3823,6 +3909,8 @@ class Order {
|
|
|
3823
3909
|
toDate: toDate,
|
|
3824
3910
|
startDate: startDate,
|
|
3825
3911
|
endDate: endDate,
|
|
3912
|
+
statusAssignedStartDate: statusAssignedStartDate,
|
|
3913
|
+
statusAssignedEndDate: statusAssignedEndDate,
|
|
3826
3914
|
dpIds: dpIds,
|
|
3827
3915
|
stores: stores,
|
|
3828
3916
|
salesChannels: salesChannels,
|
|
@@ -3844,13 +3932,9 @@ class Order {
|
|
|
3844
3932
|
tags: tags,
|
|
3845
3933
|
customerId: customerId,
|
|
3846
3934
|
orderType: orderType,
|
|
3847
|
-
operationalStatus: operationalStatus,
|
|
3848
|
-
financialStatus: financialStatus,
|
|
3849
|
-
logisticsStatus: logisticsStatus,
|
|
3850
|
-
parentViewSlug: parentViewSlug,
|
|
3851
|
-
childViewSlug: childViewSlug,
|
|
3852
|
-
lockStatus: lockStatus,
|
|
3853
3935
|
groupEntity: groupEntity,
|
|
3936
|
+
enforceDateFilter: enforceDateFilter,
|
|
3937
|
+
fulfillmentType: fulfillmentType,
|
|
3854
3938
|
});
|
|
3855
3939
|
paginator.setPaginator({
|
|
3856
3940
|
hasNext: data.page.has_next ? true : false,
|
|
@@ -3863,96 +3947,25 @@ class Order {
|
|
|
3863
3947
|
}
|
|
3864
3948
|
|
|
3865
3949
|
/**
|
|
3866
|
-
* @param {OrderPlatformValidator.
|
|
3867
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3868
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3869
|
-
* @returns {Promise<OrderPlatformModel.BagStateTransitionMap>} - Success response
|
|
3870
|
-
* @name getStateTransitionMap
|
|
3871
|
-
* @summary: Get state transition map.
|
|
3872
|
-
* @description: Retrieve a map of state transitions for orders. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionMap/).
|
|
3873
|
-
*/
|
|
3874
|
-
async getStateTransitionMap(
|
|
3875
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
3876
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
3877
|
-
) {
|
|
3878
|
-
const { error } = OrderPlatformValidator.getStateTransitionMap().validate(
|
|
3879
|
-
{},
|
|
3880
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3881
|
-
);
|
|
3882
|
-
if (error) {
|
|
3883
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3884
|
-
}
|
|
3885
|
-
|
|
3886
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3887
|
-
const {
|
|
3888
|
-
error: warrning,
|
|
3889
|
-
} = OrderPlatformValidator.getStateTransitionMap().validate(
|
|
3890
|
-
{},
|
|
3891
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3892
|
-
);
|
|
3893
|
-
if (warrning) {
|
|
3894
|
-
Logger({
|
|
3895
|
-
level: "WARN",
|
|
3896
|
-
message: `Parameter Validation warrnings for platform > Order > getStateTransitionMap \n ${warrning}`,
|
|
3897
|
-
});
|
|
3898
|
-
}
|
|
3899
|
-
|
|
3900
|
-
const query_params = {};
|
|
3901
|
-
|
|
3902
|
-
const xHeaders = {};
|
|
3903
|
-
|
|
3904
|
-
const response = await PlatformAPIClient.execute(
|
|
3905
|
-
this.config,
|
|
3906
|
-
"get",
|
|
3907
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/bag/state/transition`,
|
|
3908
|
-
query_params,
|
|
3909
|
-
undefined,
|
|
3910
|
-
{ ...xHeaders, ...requestHeaders },
|
|
3911
|
-
{ responseHeaders }
|
|
3912
|
-
);
|
|
3913
|
-
|
|
3914
|
-
let responseData = response;
|
|
3915
|
-
if (responseHeaders) {
|
|
3916
|
-
responseData = response[0];
|
|
3917
|
-
}
|
|
3918
|
-
|
|
3919
|
-
const {
|
|
3920
|
-
error: res_error,
|
|
3921
|
-
} = OrderPlatformModel.BagStateTransitionMap().validate(responseData, {
|
|
3922
|
-
abortEarly: false,
|
|
3923
|
-
allowUnknown: true,
|
|
3924
|
-
});
|
|
3925
|
-
|
|
3926
|
-
if (res_error) {
|
|
3927
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
3928
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3929
|
-
} else {
|
|
3930
|
-
Logger({
|
|
3931
|
-
level: "WARN",
|
|
3932
|
-
message: `Response Validation Warnings for platform > Order > getStateTransitionMap \n ${res_error}`,
|
|
3933
|
-
});
|
|
3934
|
-
}
|
|
3935
|
-
}
|
|
3936
|
-
|
|
3937
|
-
return response;
|
|
3938
|
-
}
|
|
3939
|
-
|
|
3940
|
-
/**
|
|
3941
|
-
* @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object
|
|
3950
|
+
* @param {OrderPlatformValidator.GetStateManagerConfigParam} arg - Arg object
|
|
3942
3951
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3943
3952
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3944
|
-
* @returns {Promise<
|
|
3945
|
-
* @name
|
|
3946
|
-
* @summary:
|
|
3947
|
-
* @description:
|
|
3953
|
+
* @returns {Promise<Object>} - Success response
|
|
3954
|
+
* @name getStateManagerConfig
|
|
3955
|
+
* @summary: Retrieves Entity State Manager configuration which includes flags, hooks, and filters, for a specific application within a company's setup.
|
|
3956
|
+
* @description: This endpoint retrieves the ESM (Entity State Manager) configuration for a specific application within a company. The retrieval is based on parameters such as application ID, ordering channel, and entity type.
|
|
3957
|
+
* The ESM config stores order processing configuration. Each document in the ESM config collection of Order Management System - OMS's database is a JSON object representing the configuration of a specific application ID. This includes filters, hooks, flags set on different state-transitions. This configuration is picked and accordingly features are enabled.
|
|
3958
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateManagerConfig/).
|
|
3948
3959
|
*/
|
|
3949
|
-
async
|
|
3950
|
-
{
|
|
3960
|
+
async getStateManagerConfig(
|
|
3961
|
+
{ appId, orderingChannel, entity, requestHeaders } = { requestHeaders: {} },
|
|
3951
3962
|
{ responseHeaders } = { responseHeaders: false }
|
|
3952
3963
|
) {
|
|
3953
|
-
const { error } = OrderPlatformValidator.
|
|
3964
|
+
const { error } = OrderPlatformValidator.getStateManagerConfig().validate(
|
|
3954
3965
|
{
|
|
3955
|
-
|
|
3966
|
+
appId,
|
|
3967
|
+
orderingChannel,
|
|
3968
|
+
entity,
|
|
3956
3969
|
},
|
|
3957
3970
|
{ abortEarly: false, allowUnknown: true }
|
|
3958
3971
|
);
|
|
@@ -3961,105 +3974,34 @@ class Order {
|
|
|
3961
3974
|
}
|
|
3962
3975
|
|
|
3963
3976
|
// Showing warrnings if extra unknown parameters are found
|
|
3964
|
-
const { error: warrning } = OrderPlatformValidator.getTemplate().validate(
|
|
3965
|
-
{
|
|
3966
|
-
templateName,
|
|
3967
|
-
},
|
|
3968
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3969
|
-
);
|
|
3970
|
-
if (warrning) {
|
|
3971
|
-
Logger({
|
|
3972
|
-
level: "WARN",
|
|
3973
|
-
message: `Parameter Validation warrnings for platform > Order > getTemplate \n ${warrning}`,
|
|
3974
|
-
});
|
|
3975
|
-
}
|
|
3976
|
-
|
|
3977
|
-
const query_params = {};
|
|
3978
|
-
|
|
3979
|
-
const xHeaders = {};
|
|
3980
|
-
|
|
3981
|
-
const response = await PlatformAPIClient.execute(
|
|
3982
|
-
this.config,
|
|
3983
|
-
"get",
|
|
3984
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/jobs/templates/${templateName}`,
|
|
3985
|
-
query_params,
|
|
3986
|
-
undefined,
|
|
3987
|
-
{ ...xHeaders, ...requestHeaders },
|
|
3988
|
-
{ responseHeaders }
|
|
3989
|
-
);
|
|
3990
|
-
|
|
3991
|
-
let responseData = response;
|
|
3992
|
-
if (responseHeaders) {
|
|
3993
|
-
responseData = response[0];
|
|
3994
|
-
}
|
|
3995
|
-
|
|
3996
3977
|
const {
|
|
3997
|
-
error:
|
|
3998
|
-
} =
|
|
3999
|
-
abortEarly: false,
|
|
4000
|
-
allowUnknown: true,
|
|
4001
|
-
});
|
|
4002
|
-
|
|
4003
|
-
if (res_error) {
|
|
4004
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
4005
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4006
|
-
} else {
|
|
4007
|
-
Logger({
|
|
4008
|
-
level: "WARN",
|
|
4009
|
-
message: `Response Validation Warnings for platform > Order > getTemplate \n ${res_error}`,
|
|
4010
|
-
});
|
|
4011
|
-
}
|
|
4012
|
-
}
|
|
4013
|
-
|
|
4014
|
-
return response;
|
|
4015
|
-
}
|
|
4016
|
-
|
|
4017
|
-
/**
|
|
4018
|
-
* @param {OrderPlatformValidator.GetUserViewsParam} arg - Arg object
|
|
4019
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4020
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4021
|
-
* @returns {Promise<OrderPlatformModel.UserViewsResponse>} - Success response
|
|
4022
|
-
* @name getUserViews
|
|
4023
|
-
* @summary: Get custom view for every unique user cross company pair.
|
|
4024
|
-
* @description: Get custom view for every unique user cross company pair. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getUserViews/).
|
|
4025
|
-
*/
|
|
4026
|
-
async getUserViews(
|
|
4027
|
-
{ showIn, requestHeaders } = { requestHeaders: {} },
|
|
4028
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
4029
|
-
) {
|
|
4030
|
-
const { error } = OrderPlatformValidator.getUserViews().validate(
|
|
4031
|
-
{
|
|
4032
|
-
showIn,
|
|
4033
|
-
},
|
|
4034
|
-
{ abortEarly: false, allowUnknown: true }
|
|
4035
|
-
);
|
|
4036
|
-
if (error) {
|
|
4037
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
4038
|
-
}
|
|
4039
|
-
|
|
4040
|
-
// Showing warrnings if extra unknown parameters are found
|
|
4041
|
-
const { error: warrning } = OrderPlatformValidator.getUserViews().validate(
|
|
3978
|
+
error: warrning,
|
|
3979
|
+
} = OrderPlatformValidator.getStateManagerConfig().validate(
|
|
4042
3980
|
{
|
|
4043
|
-
|
|
3981
|
+
appId,
|
|
3982
|
+
orderingChannel,
|
|
3983
|
+
entity,
|
|
4044
3984
|
},
|
|
4045
3985
|
{ abortEarly: false, allowUnknown: false }
|
|
4046
3986
|
);
|
|
4047
3987
|
if (warrning) {
|
|
4048
3988
|
Logger({
|
|
4049
3989
|
level: "WARN",
|
|
4050
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
3990
|
+
message: `Parameter Validation warrnings for platform > Order > getStateManagerConfig \n ${warrning}`,
|
|
4051
3991
|
});
|
|
4052
3992
|
}
|
|
4053
3993
|
|
|
4054
3994
|
const query_params = {};
|
|
4055
|
-
query_params["
|
|
3995
|
+
query_params["app_id"] = appId;
|
|
3996
|
+
query_params["ordering_channel"] = orderingChannel;
|
|
3997
|
+
query_params["entity"] = entity;
|
|
4056
3998
|
|
|
4057
3999
|
const xHeaders = {};
|
|
4058
4000
|
|
|
4059
4001
|
const response = await PlatformAPIClient.execute(
|
|
4060
4002
|
this.config,
|
|
4061
4003
|
"get",
|
|
4062
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/
|
|
4004
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/state/manager/config`,
|
|
4063
4005
|
query_params,
|
|
4064
4006
|
undefined,
|
|
4065
4007
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4071,9 +4013,7 @@ class Order {
|
|
|
4071
4013
|
responseData = response[0];
|
|
4072
4014
|
}
|
|
4073
4015
|
|
|
4074
|
-
const {
|
|
4075
|
-
error: res_error,
|
|
4076
|
-
} = OrderPlatformModel.UserViewsResponse().validate(responseData, {
|
|
4016
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
4077
4017
|
abortEarly: false,
|
|
4078
4018
|
allowUnknown: true,
|
|
4079
4019
|
});
|
|
@@ -4084,7 +4024,7 @@ class Order {
|
|
|
4084
4024
|
} else {
|
|
4085
4025
|
Logger({
|
|
4086
4026
|
level: "WARN",
|
|
4087
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4027
|
+
message: `Response Validation Warnings for platform > Order > getStateManagerConfig \n ${res_error}`,
|
|
4088
4028
|
});
|
|
4089
4029
|
}
|
|
4090
4030
|
}
|
|
@@ -4093,23 +4033,20 @@ class Order {
|
|
|
4093
4033
|
}
|
|
4094
4034
|
|
|
4095
4035
|
/**
|
|
4096
|
-
* @param {OrderPlatformValidator.
|
|
4036
|
+
* @param {OrderPlatformValidator.GetStateTransitionMapParam} arg - Arg object
|
|
4097
4037
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4098
4038
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4099
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4100
|
-
* @name
|
|
4101
|
-
* @summary: Get
|
|
4102
|
-
* @description: Retrieve
|
|
4039
|
+
* @returns {Promise<OrderPlatformModel.BagStateTransitionMap>} - Success response
|
|
4040
|
+
* @name getStateTransitionMap
|
|
4041
|
+
* @summary: Get state transition map
|
|
4042
|
+
* @description: Retrieve a map of state transitions for orders - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionMap/).
|
|
4103
4043
|
*/
|
|
4104
|
-
async
|
|
4105
|
-
{
|
|
4044
|
+
async getStateTransitionMap(
|
|
4045
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
4106
4046
|
{ responseHeaders } = { responseHeaders: false }
|
|
4107
4047
|
) {
|
|
4108
|
-
const { error } = OrderPlatformValidator.
|
|
4109
|
-
{
|
|
4110
|
-
view,
|
|
4111
|
-
groupEntity,
|
|
4112
|
-
},
|
|
4048
|
+
const { error } = OrderPlatformValidator.getStateTransitionMap().validate(
|
|
4049
|
+
{},
|
|
4113
4050
|
{ abortEarly: false, allowUnknown: true }
|
|
4114
4051
|
);
|
|
4115
4052
|
if (error) {
|
|
@@ -4117,30 +4054,27 @@ class Order {
|
|
|
4117
4054
|
}
|
|
4118
4055
|
|
|
4119
4056
|
// Showing warrnings if extra unknown parameters are found
|
|
4120
|
-
const {
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
},
|
|
4057
|
+
const {
|
|
4058
|
+
error: warrning,
|
|
4059
|
+
} = OrderPlatformValidator.getStateTransitionMap().validate(
|
|
4060
|
+
{},
|
|
4125
4061
|
{ abortEarly: false, allowUnknown: false }
|
|
4126
4062
|
);
|
|
4127
4063
|
if (warrning) {
|
|
4128
4064
|
Logger({
|
|
4129
4065
|
level: "WARN",
|
|
4130
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4066
|
+
message: `Parameter Validation warrnings for platform > Order > getStateTransitionMap \n ${warrning}`,
|
|
4131
4067
|
});
|
|
4132
4068
|
}
|
|
4133
4069
|
|
|
4134
4070
|
const query_params = {};
|
|
4135
|
-
query_params["view"] = view;
|
|
4136
|
-
query_params["group_entity"] = groupEntity;
|
|
4137
4071
|
|
|
4138
4072
|
const xHeaders = {};
|
|
4139
4073
|
|
|
4140
4074
|
const response = await PlatformAPIClient.execute(
|
|
4141
4075
|
this.config,
|
|
4142
4076
|
"get",
|
|
4143
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/
|
|
4077
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/bag/state/transition`,
|
|
4144
4078
|
query_params,
|
|
4145
4079
|
undefined,
|
|
4146
4080
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4154,7 +4088,7 @@ class Order {
|
|
|
4154
4088
|
|
|
4155
4089
|
const {
|
|
4156
4090
|
error: res_error,
|
|
4157
|
-
} = OrderPlatformModel.
|
|
4091
|
+
} = OrderPlatformModel.BagStateTransitionMap().validate(responseData, {
|
|
4158
4092
|
abortEarly: false,
|
|
4159
4093
|
allowUnknown: true,
|
|
4160
4094
|
});
|
|
@@ -4165,7 +4099,7 @@ class Order {
|
|
|
4165
4099
|
} else {
|
|
4166
4100
|
Logger({
|
|
4167
4101
|
level: "WARN",
|
|
4168
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4102
|
+
message: `Response Validation Warnings for platform > Order > getStateTransitionMap \n ${res_error}`,
|
|
4169
4103
|
});
|
|
4170
4104
|
}
|
|
4171
4105
|
}
|
|
@@ -4174,22 +4108,22 @@ class Order {
|
|
|
4174
4108
|
}
|
|
4175
4109
|
|
|
4176
4110
|
/**
|
|
4177
|
-
* @param {OrderPlatformValidator.
|
|
4111
|
+
* @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object
|
|
4178
4112
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4179
4113
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4180
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4114
|
+
* @returns {Promise<OrderPlatformModel.TemplateDownloadResponseSchema>} -
|
|
4181
4115
|
* Success response
|
|
4182
|
-
* @name
|
|
4183
|
-
* @summary:
|
|
4184
|
-
* @description:
|
|
4116
|
+
* @name getTemplate
|
|
4117
|
+
* @summary: Download bulk operation templates
|
|
4118
|
+
* @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/).
|
|
4185
4119
|
*/
|
|
4186
|
-
async
|
|
4187
|
-
{
|
|
4120
|
+
async getTemplate(
|
|
4121
|
+
{ templateName, requestHeaders } = { requestHeaders: {} },
|
|
4188
4122
|
{ responseHeaders } = { responseHeaders: false }
|
|
4189
4123
|
) {
|
|
4190
|
-
const { error } = OrderPlatformValidator.
|
|
4124
|
+
const { error } = OrderPlatformValidator.getTemplate().validate(
|
|
4191
4125
|
{
|
|
4192
|
-
|
|
4126
|
+
templateName,
|
|
4193
4127
|
},
|
|
4194
4128
|
{ abortEarly: false, allowUnknown: true }
|
|
4195
4129
|
);
|
|
@@ -4198,18 +4132,16 @@ class Order {
|
|
|
4198
4132
|
}
|
|
4199
4133
|
|
|
4200
4134
|
// Showing warrnings if extra unknown parameters are found
|
|
4201
|
-
const {
|
|
4202
|
-
error: warrning,
|
|
4203
|
-
} = OrderPlatformValidator.invalidateShipmentCache().validate(
|
|
4135
|
+
const { error: warrning } = OrderPlatformValidator.getTemplate().validate(
|
|
4204
4136
|
{
|
|
4205
|
-
|
|
4137
|
+
templateName,
|
|
4206
4138
|
},
|
|
4207
4139
|
{ abortEarly: false, allowUnknown: false }
|
|
4208
4140
|
);
|
|
4209
4141
|
if (warrning) {
|
|
4210
4142
|
Logger({
|
|
4211
4143
|
level: "WARN",
|
|
4212
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4144
|
+
message: `Parameter Validation warrnings for platform > Order > getTemplate \n ${warrning}`,
|
|
4213
4145
|
});
|
|
4214
4146
|
}
|
|
4215
4147
|
|
|
@@ -4219,10 +4151,10 @@ class Order {
|
|
|
4219
4151
|
|
|
4220
4152
|
const response = await PlatformAPIClient.execute(
|
|
4221
4153
|
this.config,
|
|
4222
|
-
"
|
|
4223
|
-
`/service/platform/order
|
|
4154
|
+
"get",
|
|
4155
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/jobs/templates/${templateName}`,
|
|
4224
4156
|
query_params,
|
|
4225
|
-
|
|
4157
|
+
undefined,
|
|
4226
4158
|
{ ...xHeaders, ...requestHeaders },
|
|
4227
4159
|
{ responseHeaders }
|
|
4228
4160
|
);
|
|
@@ -4234,7 +4166,7 @@ class Order {
|
|
|
4234
4166
|
|
|
4235
4167
|
const {
|
|
4236
4168
|
error: res_error,
|
|
4237
|
-
} = OrderPlatformModel.
|
|
4169
|
+
} = OrderPlatformModel.TemplateDownloadResponseSchema().validate(
|
|
4238
4170
|
responseData,
|
|
4239
4171
|
{ abortEarly: false, allowUnknown: true }
|
|
4240
4172
|
);
|
|
@@ -4245,7 +4177,7 @@ class Order {
|
|
|
4245
4177
|
} else {
|
|
4246
4178
|
Logger({
|
|
4247
4179
|
level: "WARN",
|
|
4248
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4180
|
+
message: `Response Validation Warnings for platform > Order > getTemplate \n ${res_error}`,
|
|
4249
4181
|
});
|
|
4250
4182
|
}
|
|
4251
4183
|
}
|
|
@@ -4254,21 +4186,22 @@ class Order {
|
|
|
4254
4186
|
}
|
|
4255
4187
|
|
|
4256
4188
|
/**
|
|
4257
|
-
* @param {OrderPlatformValidator.
|
|
4189
|
+
* @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object
|
|
4258
4190
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4259
4191
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4260
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4261
|
-
* @name
|
|
4262
|
-
* @summary:
|
|
4263
|
-
* @description:
|
|
4192
|
+
* @returns {Promise<OrderPlatformModel.FiltersResponseSchema>} - Success response
|
|
4193
|
+
* @name getfilters
|
|
4194
|
+
* @summary: List filters
|
|
4195
|
+
* @description: Get supported filters for various listing operations - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/).
|
|
4264
4196
|
*/
|
|
4265
|
-
async
|
|
4266
|
-
{
|
|
4197
|
+
async getfilters(
|
|
4198
|
+
{ view, groupEntity, requestHeaders } = { requestHeaders: {} },
|
|
4267
4199
|
{ responseHeaders } = { responseHeaders: false }
|
|
4268
4200
|
) {
|
|
4269
|
-
const { error } = OrderPlatformValidator.
|
|
4201
|
+
const { error } = OrderPlatformValidator.getfilters().validate(
|
|
4270
4202
|
{
|
|
4271
|
-
|
|
4203
|
+
view,
|
|
4204
|
+
groupEntity,
|
|
4272
4205
|
},
|
|
4273
4206
|
{ abortEarly: false, allowUnknown: true }
|
|
4274
4207
|
);
|
|
@@ -4277,27 +4210,30 @@ class Order {
|
|
|
4277
4210
|
}
|
|
4278
4211
|
|
|
4279
4212
|
// Showing warrnings if extra unknown parameters are found
|
|
4280
|
-
const { error: warrning } = OrderPlatformValidator.
|
|
4213
|
+
const { error: warrning } = OrderPlatformValidator.getfilters().validate(
|
|
4281
4214
|
{
|
|
4282
|
-
|
|
4215
|
+
view,
|
|
4216
|
+
groupEntity,
|
|
4283
4217
|
},
|
|
4284
4218
|
{ abortEarly: false, allowUnknown: false }
|
|
4285
4219
|
);
|
|
4286
4220
|
if (warrning) {
|
|
4287
4221
|
Logger({
|
|
4288
4222
|
level: "WARN",
|
|
4289
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4223
|
+
message: `Parameter Validation warrnings for platform > Order > getfilters \n ${warrning}`,
|
|
4290
4224
|
});
|
|
4291
4225
|
}
|
|
4292
4226
|
|
|
4293
4227
|
const query_params = {};
|
|
4228
|
+
query_params["view"] = view;
|
|
4229
|
+
query_params["group_entity"] = groupEntity;
|
|
4294
4230
|
|
|
4295
4231
|
const xHeaders = {};
|
|
4296
4232
|
|
|
4297
4233
|
const response = await PlatformAPIClient.execute(
|
|
4298
4234
|
this.config,
|
|
4299
4235
|
"get",
|
|
4300
|
-
`/service/platform/order
|
|
4236
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/filter-listing`,
|
|
4301
4237
|
query_params,
|
|
4302
4238
|
undefined,
|
|
4303
4239
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4311,7 +4247,7 @@ class Order {
|
|
|
4311
4247
|
|
|
4312
4248
|
const {
|
|
4313
4249
|
error: res_error,
|
|
4314
|
-
} = OrderPlatformModel.
|
|
4250
|
+
} = OrderPlatformModel.FiltersResponseSchema().validate(responseData, {
|
|
4315
4251
|
abortEarly: false,
|
|
4316
4252
|
allowUnknown: true,
|
|
4317
4253
|
});
|
|
@@ -4322,7 +4258,7 @@ class Order {
|
|
|
4322
4258
|
} else {
|
|
4323
4259
|
Logger({
|
|
4324
4260
|
level: "WARN",
|
|
4325
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4261
|
+
message: `Response Validation Warnings for platform > Order > getfilters \n ${res_error}`,
|
|
4326
4262
|
});
|
|
4327
4263
|
}
|
|
4328
4264
|
}
|
|
@@ -4331,19 +4267,21 @@ class Order {
|
|
|
4331
4267
|
}
|
|
4332
4268
|
|
|
4333
4269
|
/**
|
|
4334
|
-
* @param {OrderPlatformValidator.
|
|
4270
|
+
* @param {OrderPlatformValidator.InvalidateShipmentCacheParam} arg - Arg object
|
|
4335
4271
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4336
4272
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4337
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4338
|
-
*
|
|
4339
|
-
*
|
|
4340
|
-
* @
|
|
4273
|
+
* @returns {Promise<OrderPlatformModel.InvalidateShipmentCacheResponseSchema>}
|
|
4274
|
+
* - Success response
|
|
4275
|
+
*
|
|
4276
|
+
* @name invalidateShipmentCache
|
|
4277
|
+
* @summary: Invalidate shipment cache
|
|
4278
|
+
* @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/).
|
|
4341
4279
|
*/
|
|
4342
|
-
async
|
|
4280
|
+
async invalidateShipmentCache(
|
|
4343
4281
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4344
4282
|
{ responseHeaders } = { responseHeaders: false }
|
|
4345
4283
|
) {
|
|
4346
|
-
const { error } = OrderPlatformValidator.
|
|
4284
|
+
const { error } = OrderPlatformValidator.invalidateShipmentCache().validate(
|
|
4347
4285
|
{
|
|
4348
4286
|
body,
|
|
4349
4287
|
},
|
|
@@ -4354,7 +4292,9 @@ class Order {
|
|
|
4354
4292
|
}
|
|
4355
4293
|
|
|
4356
4294
|
// Showing warrnings if extra unknown parameters are found
|
|
4357
|
-
const {
|
|
4295
|
+
const {
|
|
4296
|
+
error: warrning,
|
|
4297
|
+
} = OrderPlatformValidator.invalidateShipmentCache().validate(
|
|
4358
4298
|
{
|
|
4359
4299
|
body,
|
|
4360
4300
|
},
|
|
@@ -4363,7 +4303,7 @@ class Order {
|
|
|
4363
4303
|
if (warrning) {
|
|
4364
4304
|
Logger({
|
|
4365
4305
|
level: "WARN",
|
|
4366
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4306
|
+
message: `Parameter Validation warrnings for platform > Order > invalidateShipmentCache \n ${warrning}`,
|
|
4367
4307
|
});
|
|
4368
4308
|
}
|
|
4369
4309
|
|
|
@@ -4374,7 +4314,7 @@ class Order {
|
|
|
4374
4314
|
const response = await PlatformAPIClient.execute(
|
|
4375
4315
|
this.config,
|
|
4376
4316
|
"put",
|
|
4377
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
4317
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/update-cache`,
|
|
4378
4318
|
query_params,
|
|
4379
4319
|
body,
|
|
4380
4320
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4388,10 +4328,10 @@ class Order {
|
|
|
4388
4328
|
|
|
4389
4329
|
const {
|
|
4390
4330
|
error: res_error,
|
|
4391
|
-
} = OrderPlatformModel.
|
|
4392
|
-
|
|
4393
|
-
allowUnknown: true
|
|
4394
|
-
|
|
4331
|
+
} = OrderPlatformModel.InvalidateShipmentCacheResponseSchema().validate(
|
|
4332
|
+
responseData,
|
|
4333
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4334
|
+
);
|
|
4395
4335
|
|
|
4396
4336
|
if (res_error) {
|
|
4397
4337
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4399,7 +4339,7 @@ class Order {
|
|
|
4399
4339
|
} else {
|
|
4400
4340
|
Logger({
|
|
4401
4341
|
level: "WARN",
|
|
4402
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4342
|
+
message: `Response Validation Warnings for platform > Order > invalidateShipmentCache \n ${res_error}`,
|
|
4403
4343
|
});
|
|
4404
4344
|
}
|
|
4405
4345
|
}
|
|
@@ -4408,24 +4348,21 @@ class Order {
|
|
|
4408
4348
|
}
|
|
4409
4349
|
|
|
4410
4350
|
/**
|
|
4411
|
-
* @param {OrderPlatformValidator.
|
|
4351
|
+
* @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object
|
|
4412
4352
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4413
4353
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4414
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4415
|
-
*
|
|
4416
|
-
*
|
|
4417
|
-
* @
|
|
4418
|
-
* @summary: refund configuration.
|
|
4419
|
-
* @description: refund configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postRefundConfiguration/).
|
|
4354
|
+
* @returns {Promise<OrderPlatformModel.JobDetailsResponseSchema>} - Success response
|
|
4355
|
+
* @name jobDetails
|
|
4356
|
+
* @summary: Get bulk operation details
|
|
4357
|
+
* @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/).
|
|
4420
4358
|
*/
|
|
4421
|
-
async
|
|
4422
|
-
{
|
|
4359
|
+
async jobDetails(
|
|
4360
|
+
{ batchId, requestHeaders } = { requestHeaders: {} },
|
|
4423
4361
|
{ responseHeaders } = { responseHeaders: false }
|
|
4424
4362
|
) {
|
|
4425
|
-
const { error } = OrderPlatformValidator.
|
|
4363
|
+
const { error } = OrderPlatformValidator.jobDetails().validate(
|
|
4426
4364
|
{
|
|
4427
|
-
|
|
4428
|
-
body,
|
|
4365
|
+
batchId,
|
|
4429
4366
|
},
|
|
4430
4367
|
{ abortEarly: false, allowUnknown: true }
|
|
4431
4368
|
);
|
|
@@ -4434,33 +4371,29 @@ class Order {
|
|
|
4434
4371
|
}
|
|
4435
4372
|
|
|
4436
4373
|
// Showing warrnings if extra unknown parameters are found
|
|
4437
|
-
const {
|
|
4438
|
-
error: warrning,
|
|
4439
|
-
} = OrderPlatformValidator.postRefundConfiguration().validate(
|
|
4374
|
+
const { error: warrning } = OrderPlatformValidator.jobDetails().validate(
|
|
4440
4375
|
{
|
|
4441
|
-
|
|
4442
|
-
body,
|
|
4376
|
+
batchId,
|
|
4443
4377
|
},
|
|
4444
4378
|
{ abortEarly: false, allowUnknown: false }
|
|
4445
4379
|
);
|
|
4446
4380
|
if (warrning) {
|
|
4447
4381
|
Logger({
|
|
4448
4382
|
level: "WARN",
|
|
4449
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4383
|
+
message: `Parameter Validation warrnings for platform > Order > jobDetails \n ${warrning}`,
|
|
4450
4384
|
});
|
|
4451
4385
|
}
|
|
4452
4386
|
|
|
4453
4387
|
const query_params = {};
|
|
4454
|
-
query_params["app_id"] = appId;
|
|
4455
4388
|
|
|
4456
4389
|
const xHeaders = {};
|
|
4457
4390
|
|
|
4458
4391
|
const response = await PlatformAPIClient.execute(
|
|
4459
4392
|
this.config,
|
|
4460
|
-
"
|
|
4461
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
4393
|
+
"get",
|
|
4394
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/jobs/${batchId}`,
|
|
4462
4395
|
query_params,
|
|
4463
|
-
|
|
4396
|
+
undefined,
|
|
4464
4397
|
{ ...xHeaders, ...requestHeaders },
|
|
4465
4398
|
{ responseHeaders }
|
|
4466
4399
|
);
|
|
@@ -4472,10 +4405,10 @@ class Order {
|
|
|
4472
4405
|
|
|
4473
4406
|
const {
|
|
4474
4407
|
error: res_error,
|
|
4475
|
-
} = OrderPlatformModel.
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
);
|
|
4408
|
+
} = OrderPlatformModel.JobDetailsResponseSchema().validate(responseData, {
|
|
4409
|
+
abortEarly: false,
|
|
4410
|
+
allowUnknown: true,
|
|
4411
|
+
});
|
|
4479
4412
|
|
|
4480
4413
|
if (res_error) {
|
|
4481
4414
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4483,7 +4416,7 @@ class Order {
|
|
|
4483
4416
|
} else {
|
|
4484
4417
|
Logger({
|
|
4485
4418
|
level: "WARN",
|
|
4486
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4419
|
+
message: `Response Validation Warnings for platform > Order > jobDetails \n ${res_error}`,
|
|
4487
4420
|
});
|
|
4488
4421
|
}
|
|
4489
4422
|
}
|
|
@@ -4492,25 +4425,20 @@ class Order {
|
|
|
4492
4425
|
}
|
|
4493
4426
|
|
|
4494
4427
|
/**
|
|
4495
|
-
* @param {OrderPlatformValidator.
|
|
4428
|
+
* @param {OrderPlatformValidator.OrderUpdateParam} arg - Arg object
|
|
4496
4429
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4497
4430
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4498
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4499
|
-
*
|
|
4500
|
-
*
|
|
4501
|
-
* @
|
|
4502
|
-
* @summary: Refund State Configuration
|
|
4503
|
-
* @description: Refund State Configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postRefundStateConfiguration/).
|
|
4431
|
+
* @returns {Promise<OrderPlatformModel.ResponseDetail>} - Success response
|
|
4432
|
+
* @name orderUpdate
|
|
4433
|
+
* @summary: Update an order
|
|
4434
|
+
* @description: Used to update an order's meta information. These meta information can be accessed via order or shipment details API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/orderUpdate/).
|
|
4504
4435
|
*/
|
|
4505
|
-
async
|
|
4506
|
-
{
|
|
4436
|
+
async orderUpdate(
|
|
4437
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4507
4438
|
{ responseHeaders } = { responseHeaders: false }
|
|
4508
4439
|
) {
|
|
4509
|
-
const {
|
|
4510
|
-
error,
|
|
4511
|
-
} = OrderPlatformValidator.postRefundStateConfiguration().validate(
|
|
4440
|
+
const { error } = OrderPlatformValidator.orderUpdate().validate(
|
|
4512
4441
|
{
|
|
4513
|
-
appId,
|
|
4514
4442
|
body,
|
|
4515
4443
|
},
|
|
4516
4444
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -4520,11 +4448,8 @@ class Order {
|
|
|
4520
4448
|
}
|
|
4521
4449
|
|
|
4522
4450
|
// Showing warrnings if extra unknown parameters are found
|
|
4523
|
-
const {
|
|
4524
|
-
error: warrning,
|
|
4525
|
-
} = OrderPlatformValidator.postRefundStateConfiguration().validate(
|
|
4451
|
+
const { error: warrning } = OrderPlatformValidator.orderUpdate().validate(
|
|
4526
4452
|
{
|
|
4527
|
-
appId,
|
|
4528
4453
|
body,
|
|
4529
4454
|
},
|
|
4530
4455
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -4532,19 +4457,18 @@ class Order {
|
|
|
4532
4457
|
if (warrning) {
|
|
4533
4458
|
Logger({
|
|
4534
4459
|
level: "WARN",
|
|
4535
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4460
|
+
message: `Parameter Validation warrnings for platform > Order > orderUpdate \n ${warrning}`,
|
|
4536
4461
|
});
|
|
4537
4462
|
}
|
|
4538
4463
|
|
|
4539
4464
|
const query_params = {};
|
|
4540
|
-
query_params["app_id"] = appId;
|
|
4541
4465
|
|
|
4542
4466
|
const xHeaders = {};
|
|
4543
4467
|
|
|
4544
4468
|
const response = await PlatformAPIClient.execute(
|
|
4545
4469
|
this.config,
|
|
4546
|
-
"
|
|
4547
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
4470
|
+
"put",
|
|
4471
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order/validation`,
|
|
4548
4472
|
query_params,
|
|
4549
4473
|
body,
|
|
4550
4474
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4558,10 +4482,10 @@ class Order {
|
|
|
4558
4482
|
|
|
4559
4483
|
const {
|
|
4560
4484
|
error: res_error,
|
|
4561
|
-
} = OrderPlatformModel.
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
);
|
|
4485
|
+
} = OrderPlatformModel.ResponseDetail().validate(responseData, {
|
|
4486
|
+
abortEarly: false,
|
|
4487
|
+
allowUnknown: true,
|
|
4488
|
+
});
|
|
4565
4489
|
|
|
4566
4490
|
if (res_error) {
|
|
4567
4491
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4569,7 +4493,7 @@ class Order {
|
|
|
4569
4493
|
} else {
|
|
4570
4494
|
Logger({
|
|
4571
4495
|
level: "WARN",
|
|
4572
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4496
|
+
message: `Response Validation Warnings for platform > Order > orderUpdate \n ${res_error}`,
|
|
4573
4497
|
});
|
|
4574
4498
|
}
|
|
4575
4499
|
}
|
|
@@ -4581,10 +4505,11 @@ class Order {
|
|
|
4581
4505
|
* @param {OrderPlatformValidator.PostShipmentHistoryParam} arg - Arg object
|
|
4582
4506
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4583
4507
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4584
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4508
|
+
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponseSchema>} -
|
|
4509
|
+
* Success response
|
|
4585
4510
|
* @name postShipmentHistory
|
|
4586
|
-
* @summary:
|
|
4587
|
-
* @description:
|
|
4511
|
+
* @summary: Create shipment history
|
|
4512
|
+
* @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/).
|
|
4588
4513
|
*/
|
|
4589
4514
|
async postShipmentHistory(
|
|
4590
4515
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4637,10 +4562,10 @@ class Order {
|
|
|
4637
4562
|
|
|
4638
4563
|
const {
|
|
4639
4564
|
error: res_error,
|
|
4640
|
-
} = OrderPlatformModel.
|
|
4641
|
-
|
|
4642
|
-
allowUnknown: true
|
|
4643
|
-
|
|
4565
|
+
} = OrderPlatformModel.ShipmentHistoryResponseSchema().validate(
|
|
4566
|
+
responseData,
|
|
4567
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4568
|
+
);
|
|
4644
4569
|
|
|
4645
4570
|
if (res_error) {
|
|
4646
4571
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4660,10 +4585,11 @@ class Order {
|
|
|
4660
4585
|
* @param {OrderPlatformValidator.ReassignLocationParam} arg - Arg object
|
|
4661
4586
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4662
4587
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4663
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4588
|
+
* @returns {Promise<OrderPlatformModel.StoreReassignResponseSchema>} -
|
|
4589
|
+
* Success response
|
|
4664
4590
|
* @name reassignLocation
|
|
4665
|
-
* @summary: Reassign location
|
|
4666
|
-
* @description:
|
|
4591
|
+
* @summary: Reassign location
|
|
4592
|
+
* @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/).
|
|
4667
4593
|
*/
|
|
4668
4594
|
async reassignLocation(
|
|
4669
4595
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4716,10 +4642,10 @@ class Order {
|
|
|
4716
4642
|
|
|
4717
4643
|
const {
|
|
4718
4644
|
error: res_error,
|
|
4719
|
-
} = OrderPlatformModel.
|
|
4720
|
-
|
|
4721
|
-
allowUnknown: true
|
|
4722
|
-
|
|
4645
|
+
} = OrderPlatformModel.StoreReassignResponseSchema().validate(
|
|
4646
|
+
responseData,
|
|
4647
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4648
|
+
);
|
|
4723
4649
|
|
|
4724
4650
|
if (res_error) {
|
|
4725
4651
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4739,10 +4665,10 @@ class Order {
|
|
|
4739
4665
|
* @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object
|
|
4740
4666
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4741
4667
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4742
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4668
|
+
* @returns {Promise<OrderPlatformModel.BaseResponseSchema>} - Success response
|
|
4743
4669
|
* @name sendSmsNinja
|
|
4744
|
-
* @summary: Send SMS
|
|
4745
|
-
* @description: Send SMS
|
|
4670
|
+
* @summary: Send SMS
|
|
4671
|
+
* @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/).
|
|
4746
4672
|
*/
|
|
4747
4673
|
async sendSmsNinja(
|
|
4748
4674
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4793,7 +4719,7 @@ class Order {
|
|
|
4793
4719
|
|
|
4794
4720
|
const {
|
|
4795
4721
|
error: res_error,
|
|
4796
|
-
} = OrderPlatformModel.
|
|
4722
|
+
} = OrderPlatformModel.BaseResponseSchema().validate(responseData, {
|
|
4797
4723
|
abortEarly: false,
|
|
4798
4724
|
allowUnknown: true,
|
|
4799
4725
|
});
|
|
@@ -4816,10 +4742,11 @@ class Order {
|
|
|
4816
4742
|
* @param {OrderPlatformValidator.SendUserMobileOTPParam} arg - Arg object
|
|
4817
4743
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4818
4744
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4819
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4745
|
+
* @returns {Promise<OrderPlatformModel.SendUserMobileOtpResponseSchema>} -
|
|
4746
|
+
* Success response
|
|
4820
4747
|
* @name sendUserMobileOTP
|
|
4821
|
-
* @summary: Send user mobile OTP
|
|
4822
|
-
* @description: Send a one-time OTP to a
|
|
4748
|
+
* @summary: Send user mobile OTP
|
|
4749
|
+
* @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/).
|
|
4823
4750
|
*/
|
|
4824
4751
|
async sendUserMobileOTP(
|
|
4825
4752
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4872,10 +4799,10 @@ class Order {
|
|
|
4872
4799
|
|
|
4873
4800
|
const {
|
|
4874
4801
|
error: res_error,
|
|
4875
|
-
} = OrderPlatformModel.
|
|
4876
|
-
|
|
4877
|
-
allowUnknown: true
|
|
4878
|
-
|
|
4802
|
+
} = OrderPlatformModel.SendUserMobileOtpResponseSchema().validate(
|
|
4803
|
+
responseData,
|
|
4804
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4805
|
+
);
|
|
4879
4806
|
|
|
4880
4807
|
if (res_error) {
|
|
4881
4808
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4895,11 +4822,12 @@ class Order {
|
|
|
4895
4822
|
* @param {OrderPlatformValidator.TrackShipmentParam} arg - Arg object
|
|
4896
4823
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4897
4824
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4898
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4899
|
-
* Success response
|
|
4825
|
+
* @returns {Promise<OrderPlatformModel.CourierPartnerTrackingResponseSchema>}
|
|
4826
|
+
* - Success response
|
|
4827
|
+
*
|
|
4900
4828
|
* @name trackShipment
|
|
4901
|
-
* @summary:
|
|
4902
|
-
* @description: Retrieve courier partner tracking details for a given shipment
|
|
4829
|
+
* @summary: Track shipment
|
|
4830
|
+
* @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/).
|
|
4903
4831
|
*/
|
|
4904
4832
|
async trackShipment(
|
|
4905
4833
|
{ shipmentId, awb, pageNo, pageSize, requestHeaders } = {
|
|
@@ -4962,7 +4890,7 @@ class Order {
|
|
|
4962
4890
|
|
|
4963
4891
|
const {
|
|
4964
4892
|
error: res_error,
|
|
4965
|
-
} = OrderPlatformModel.
|
|
4893
|
+
} = OrderPlatformModel.CourierPartnerTrackingResponseSchema().validate(
|
|
4966
4894
|
responseData,
|
|
4967
4895
|
{ abortEarly: false, allowUnknown: true }
|
|
4968
4896
|
);
|
|
@@ -4982,21 +4910,21 @@ class Order {
|
|
|
4982
4910
|
}
|
|
4983
4911
|
|
|
4984
4912
|
/**
|
|
4985
|
-
* @param {OrderPlatformValidator.
|
|
4913
|
+
* @param {OrderPlatformValidator.UpdateAddressParam} arg - Arg object
|
|
4986
4914
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4987
4915
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4988
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4989
|
-
* @name
|
|
4990
|
-
* @summary:
|
|
4991
|
-
* @description:
|
|
4916
|
+
* @returns {Promise<OrderPlatformModel.BaseResponseSchema>} - Success response
|
|
4917
|
+
* @name updateAddress
|
|
4918
|
+
* @summary: Update shipment address
|
|
4919
|
+
* @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/).
|
|
4992
4920
|
*/
|
|
4993
|
-
async
|
|
4994
|
-
{
|
|
4921
|
+
async updateAddress(
|
|
4922
|
+
{ shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
4995
4923
|
{ responseHeaders } = { responseHeaders: false }
|
|
4996
4924
|
) {
|
|
4997
|
-
const { error } = OrderPlatformValidator.
|
|
4925
|
+
const { error } = OrderPlatformValidator.updateAddress().validate(
|
|
4998
4926
|
{
|
|
4999
|
-
|
|
4927
|
+
shipmentId,
|
|
5000
4928
|
body,
|
|
5001
4929
|
},
|
|
5002
4930
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -5006,9 +4934,9 @@ class Order {
|
|
|
5006
4934
|
}
|
|
5007
4935
|
|
|
5008
4936
|
// Showing warrnings if extra unknown parameters are found
|
|
5009
|
-
const { error: warrning } = OrderPlatformValidator.
|
|
4937
|
+
const { error: warrning } = OrderPlatformValidator.updateAddress().validate(
|
|
5010
4938
|
{
|
|
5011
|
-
|
|
4939
|
+
shipmentId,
|
|
5012
4940
|
body,
|
|
5013
4941
|
},
|
|
5014
4942
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -5016,7 +4944,7 @@ class Order {
|
|
|
5016
4944
|
if (warrning) {
|
|
5017
4945
|
Logger({
|
|
5018
4946
|
level: "WARN",
|
|
5019
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4947
|
+
message: `Parameter Validation warrnings for platform > Order > updateAddress \n ${warrning}`,
|
|
5020
4948
|
});
|
|
5021
4949
|
}
|
|
5022
4950
|
|
|
@@ -5027,7 +4955,7 @@ class Order {
|
|
|
5027
4955
|
const response = await PlatformAPIClient.execute(
|
|
5028
4956
|
this.config,
|
|
5029
4957
|
"put",
|
|
5030
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
4958
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/address`,
|
|
5031
4959
|
query_params,
|
|
5032
4960
|
body,
|
|
5033
4961
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5041,7 +4969,7 @@ class Order {
|
|
|
5041
4969
|
|
|
5042
4970
|
const {
|
|
5043
4971
|
error: res_error,
|
|
5044
|
-
} = OrderPlatformModel.
|
|
4972
|
+
} = OrderPlatformModel.BaseResponseSchema().validate(responseData, {
|
|
5045
4973
|
abortEarly: false,
|
|
5046
4974
|
allowUnknown: true,
|
|
5047
4975
|
});
|
|
@@ -5052,7 +4980,7 @@ class Order {
|
|
|
5052
4980
|
} else {
|
|
5053
4981
|
Logger({
|
|
5054
4982
|
level: "WARN",
|
|
5055
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4983
|
+
message: `Response Validation Warnings for platform > Order > updateAddress \n ${res_error}`,
|
|
5056
4984
|
});
|
|
5057
4985
|
}
|
|
5058
4986
|
}
|
|
@@ -5064,12 +4992,12 @@ class Order {
|
|
|
5064
4992
|
* @param {OrderPlatformValidator.UpdatePackagingDimensionsParam} arg - Arg object
|
|
5065
4993
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5066
4994
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5067
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4995
|
+
* @returns {Promise<OrderPlatformModel.UpdatePackagingDimensionsResponseSchema>}
|
|
5068
4996
|
* - Success response
|
|
5069
4997
|
*
|
|
5070
4998
|
* @name updatePackagingDimensions
|
|
5071
|
-
* @summary: Update packaging dimensions
|
|
5072
|
-
* @description:
|
|
4999
|
+
* @summary: Update packaging dimensions
|
|
5000
|
+
* @description: Used to modify the packaging dimension of a shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePackagingDimensions/).
|
|
5073
5001
|
*/
|
|
5074
5002
|
async updatePackagingDimensions(
|
|
5075
5003
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5124,7 +5052,7 @@ class Order {
|
|
|
5124
5052
|
|
|
5125
5053
|
const {
|
|
5126
5054
|
error: res_error,
|
|
5127
|
-
} = OrderPlatformModel.
|
|
5055
|
+
} = OrderPlatformModel.UpdatePackagingDimensionsResponseSchema().validate(
|
|
5128
5056
|
responseData,
|
|
5129
5057
|
{ abortEarly: false, allowUnknown: true }
|
|
5130
5058
|
);
|
|
@@ -5144,21 +5072,19 @@ class Order {
|
|
|
5144
5072
|
}
|
|
5145
5073
|
|
|
5146
5074
|
/**
|
|
5147
|
-
* @param {OrderPlatformValidator.
|
|
5075
|
+
* @param {OrderPlatformValidator.UpdatePaymentInfoParam} arg - Arg object
|
|
5148
5076
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5149
5077
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5150
|
-
* @returns {Promise<
|
|
5151
|
-
*
|
|
5152
|
-
*
|
|
5153
|
-
* @
|
|
5154
|
-
* @summary: Update shipment status.
|
|
5155
|
-
* @description: Shipment action transition or Shipment data update or both. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipment/).
|
|
5078
|
+
* @returns {Promise<Object>} - Success response
|
|
5079
|
+
* @name updatePaymentInfo
|
|
5080
|
+
* @summary: Update payment details for an order, its shipments and its bags.
|
|
5081
|
+
* @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/).
|
|
5156
5082
|
*/
|
|
5157
|
-
async
|
|
5083
|
+
async updatePaymentInfo(
|
|
5158
5084
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
5159
5085
|
{ responseHeaders } = { responseHeaders: false }
|
|
5160
5086
|
) {
|
|
5161
|
-
const { error } = OrderPlatformValidator.
|
|
5087
|
+
const { error } = OrderPlatformValidator.updatePaymentInfo().validate(
|
|
5162
5088
|
{
|
|
5163
5089
|
body,
|
|
5164
5090
|
},
|
|
@@ -5171,7 +5097,7 @@ class Order {
|
|
|
5171
5097
|
// Showing warrnings if extra unknown parameters are found
|
|
5172
5098
|
const {
|
|
5173
5099
|
error: warrning,
|
|
5174
|
-
} = OrderPlatformValidator.
|
|
5100
|
+
} = OrderPlatformValidator.updatePaymentInfo().validate(
|
|
5175
5101
|
{
|
|
5176
5102
|
body,
|
|
5177
5103
|
},
|
|
@@ -5180,7 +5106,7 @@ class Order {
|
|
|
5180
5106
|
if (warrning) {
|
|
5181
5107
|
Logger({
|
|
5182
5108
|
level: "WARN",
|
|
5183
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
5109
|
+
message: `Parameter Validation warrnings for platform > Order > updatePaymentInfo \n ${warrning}`,
|
|
5184
5110
|
});
|
|
5185
5111
|
}
|
|
5186
5112
|
|
|
@@ -5191,7 +5117,7 @@ class Order {
|
|
|
5191
5117
|
const response = await PlatformAPIClient.execute(
|
|
5192
5118
|
this.config,
|
|
5193
5119
|
"put",
|
|
5194
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
5120
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/payment/update`,
|
|
5195
5121
|
query_params,
|
|
5196
5122
|
body,
|
|
5197
5123
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5203,12 +5129,10 @@ class Order {
|
|
|
5203
5129
|
responseData = response[0];
|
|
5204
5130
|
}
|
|
5205
5131
|
|
|
5206
|
-
const {
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
{ abortEarly: false, allowUnknown: true }
|
|
5211
|
-
);
|
|
5132
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
5133
|
+
abortEarly: false,
|
|
5134
|
+
allowUnknown: true,
|
|
5135
|
+
});
|
|
5212
5136
|
|
|
5213
5137
|
if (res_error) {
|
|
5214
5138
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5216,7 +5140,7 @@ class Order {
|
|
|
5216
5140
|
} else {
|
|
5217
5141
|
Logger({
|
|
5218
5142
|
level: "WARN",
|
|
5219
|
-
message: `Response Validation Warnings for platform > Order >
|
|
5143
|
+
message: `Response Validation Warnings for platform > Order > updatePaymentInfo \n ${res_error}`,
|
|
5220
5144
|
});
|
|
5221
5145
|
}
|
|
5222
5146
|
}
|
|
@@ -5228,11 +5152,12 @@ class Order {
|
|
|
5228
5152
|
* @param {OrderPlatformValidator.UpdateShipmentLockParam} arg - Arg object
|
|
5229
5153
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5230
5154
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5231
|
-
* @returns {Promise<OrderPlatformModel.
|
|
5232
|
-
* Success response
|
|
5155
|
+
* @returns {Promise<OrderPlatformModel.UpdateShipmentLockResponseSchema>}
|
|
5156
|
+
* - Success response
|
|
5157
|
+
*
|
|
5233
5158
|
* @name updateShipmentLock
|
|
5234
|
-
* @summary: Update shipment lock
|
|
5235
|
-
* @description: Modify shipment/bag lock and
|
|
5159
|
+
* @summary: Update a shipment lock
|
|
5160
|
+
* @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/).
|
|
5236
5161
|
*/
|
|
5237
5162
|
async updateShipmentLock(
|
|
5238
5163
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5285,10 +5210,10 @@ class Order {
|
|
|
5285
5210
|
|
|
5286
5211
|
const {
|
|
5287
5212
|
error: res_error,
|
|
5288
|
-
} = OrderPlatformModel.
|
|
5289
|
-
|
|
5290
|
-
allowUnknown: true
|
|
5291
|
-
|
|
5213
|
+
} = OrderPlatformModel.UpdateShipmentLockResponseSchema().validate(
|
|
5214
|
+
responseData,
|
|
5215
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5216
|
+
);
|
|
5292
5217
|
|
|
5293
5218
|
if (res_error) {
|
|
5294
5219
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5312,8 +5237,8 @@ class Order {
|
|
|
5312
5237
|
* - Success response
|
|
5313
5238
|
*
|
|
5314
5239
|
* @name updateShipmentStatus
|
|
5315
|
-
* @summary: Update shipment status
|
|
5316
|
-
* @description:
|
|
5240
|
+
* @summary: Update a shipment's status
|
|
5241
|
+
* @description: Used for updating a shipment and its status. Can also be used for updating bags present in that shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentStatus/).
|
|
5317
5242
|
*/
|
|
5318
5243
|
async updateShipmentStatus(
|
|
5319
5244
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5392,8 +5317,8 @@ class Order {
|
|
|
5392
5317
|
* @returns {Promise<OrderPlatformModel.CourierPartnerTrackingDetails>} -
|
|
5393
5318
|
* Success response
|
|
5394
5319
|
* @name updateShipmentTracking
|
|
5395
|
-
* @summary: Update shipment tracking
|
|
5396
|
-
* @description: Modify courier partner tracking details for a given shipment
|
|
5320
|
+
* @summary: Update shipment tracking
|
|
5321
|
+
* @description: Modify 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/updateShipmentTracking/).
|
|
5397
5322
|
*/
|
|
5398
5323
|
async updateShipmentTracking(
|
|
5399
5324
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5466,100 +5391,19 @@ class Order {
|
|
|
5466
5391
|
}
|
|
5467
5392
|
|
|
5468
5393
|
/**
|
|
5469
|
-
* @param {OrderPlatformValidator.
|
|
5470
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5471
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5472
|
-
* @returns {Promise<OrderPlatformModel.CreateUpdateDeleteResponse>} -
|
|
5473
|
-
* Success response
|
|
5474
|
-
* @name updateUserViewPosition
|
|
5475
|
-
* @summary: Update User view(Parent view and child view) position
|
|
5476
|
-
* @description: Update User view(Parent view and child view) position - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateUserViewPosition/).
|
|
5477
|
-
*/
|
|
5478
|
-
async updateUserViewPosition(
|
|
5479
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
5480
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
5481
|
-
) {
|
|
5482
|
-
const { error } = OrderPlatformValidator.updateUserViewPosition().validate(
|
|
5483
|
-
{
|
|
5484
|
-
body,
|
|
5485
|
-
},
|
|
5486
|
-
{ abortEarly: false, allowUnknown: true }
|
|
5487
|
-
);
|
|
5488
|
-
if (error) {
|
|
5489
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
5490
|
-
}
|
|
5491
|
-
|
|
5492
|
-
// Showing warrnings if extra unknown parameters are found
|
|
5493
|
-
const {
|
|
5494
|
-
error: warrning,
|
|
5495
|
-
} = OrderPlatformValidator.updateUserViewPosition().validate(
|
|
5496
|
-
{
|
|
5497
|
-
body,
|
|
5498
|
-
},
|
|
5499
|
-
{ abortEarly: false, allowUnknown: false }
|
|
5500
|
-
);
|
|
5501
|
-
if (warrning) {
|
|
5502
|
-
Logger({
|
|
5503
|
-
level: "WARN",
|
|
5504
|
-
message: `Parameter Validation warrnings for platform > Order > updateUserViewPosition \n ${warrning}`,
|
|
5505
|
-
});
|
|
5506
|
-
}
|
|
5507
|
-
|
|
5508
|
-
const query_params = {};
|
|
5509
|
-
|
|
5510
|
-
const xHeaders = {};
|
|
5511
|
-
|
|
5512
|
-
const response = await PlatformAPIClient.execute(
|
|
5513
|
-
this.config,
|
|
5514
|
-
"put",
|
|
5515
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/view/position`,
|
|
5516
|
-
query_params,
|
|
5517
|
-
body,
|
|
5518
|
-
{ ...xHeaders, ...requestHeaders },
|
|
5519
|
-
{ responseHeaders }
|
|
5520
|
-
);
|
|
5521
|
-
|
|
5522
|
-
let responseData = response;
|
|
5523
|
-
if (responseHeaders) {
|
|
5524
|
-
responseData = response[0];
|
|
5525
|
-
}
|
|
5526
|
-
|
|
5527
|
-
const {
|
|
5528
|
-
error: res_error,
|
|
5529
|
-
} = OrderPlatformModel.CreateUpdateDeleteResponse().validate(responseData, {
|
|
5530
|
-
abortEarly: false,
|
|
5531
|
-
allowUnknown: true,
|
|
5532
|
-
});
|
|
5533
|
-
|
|
5534
|
-
if (res_error) {
|
|
5535
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
5536
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
5537
|
-
} else {
|
|
5538
|
-
Logger({
|
|
5539
|
-
level: "WARN",
|
|
5540
|
-
message: `Response Validation Warnings for platform > Order > updateUserViewPosition \n ${res_error}`,
|
|
5541
|
-
});
|
|
5542
|
-
}
|
|
5543
|
-
}
|
|
5544
|
-
|
|
5545
|
-
return response;
|
|
5546
|
-
}
|
|
5547
|
-
|
|
5548
|
-
/**
|
|
5549
|
-
* @param {OrderPlatformValidator.UpdateUserViewsParam} arg - Arg object
|
|
5394
|
+
* @param {OrderPlatformValidator.UploadConsentsParam} arg - Arg object
|
|
5550
5395
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5551
5396
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5552
|
-
* @returns {Promise<OrderPlatformModel.
|
|
5553
|
-
*
|
|
5554
|
-
* @
|
|
5555
|
-
* @
|
|
5556
|
-
* @description: Update custom view for every unique user cross company pair. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateUserViews/).
|
|
5397
|
+
* @returns {Promise<OrderPlatformModel.SuccessResponseSchema>} - Success response
|
|
5398
|
+
* @name uploadConsents
|
|
5399
|
+
* @summary: Upload consent
|
|
5400
|
+
* @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/).
|
|
5557
5401
|
*/
|
|
5558
|
-
async
|
|
5402
|
+
async uploadConsents(
|
|
5559
5403
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
5560
5404
|
{ responseHeaders } = { responseHeaders: false }
|
|
5561
5405
|
) {
|
|
5562
|
-
const { error } = OrderPlatformValidator.
|
|
5406
|
+
const { error } = OrderPlatformValidator.uploadConsents().validate(
|
|
5563
5407
|
{
|
|
5564
5408
|
body,
|
|
5565
5409
|
},
|
|
@@ -5572,7 +5416,7 @@ class Order {
|
|
|
5572
5416
|
// Showing warrnings if extra unknown parameters are found
|
|
5573
5417
|
const {
|
|
5574
5418
|
error: warrning,
|
|
5575
|
-
} = OrderPlatformValidator.
|
|
5419
|
+
} = OrderPlatformValidator.uploadConsents().validate(
|
|
5576
5420
|
{
|
|
5577
5421
|
body,
|
|
5578
5422
|
},
|
|
@@ -5581,7 +5425,7 @@ class Order {
|
|
|
5581
5425
|
if (warrning) {
|
|
5582
5426
|
Logger({
|
|
5583
5427
|
level: "WARN",
|
|
5584
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
5428
|
+
message: `Parameter Validation warrnings for platform > Order > uploadConsents \n ${warrning}`,
|
|
5585
5429
|
});
|
|
5586
5430
|
}
|
|
5587
5431
|
|
|
@@ -5591,8 +5435,8 @@ class Order {
|
|
|
5591
5435
|
|
|
5592
5436
|
const response = await PlatformAPIClient.execute(
|
|
5593
5437
|
this.config,
|
|
5594
|
-
"
|
|
5595
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/
|
|
5438
|
+
"post",
|
|
5439
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/uploadConsent`,
|
|
5596
5440
|
query_params,
|
|
5597
5441
|
body,
|
|
5598
5442
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5606,7 +5450,7 @@ class Order {
|
|
|
5606
5450
|
|
|
5607
5451
|
const {
|
|
5608
5452
|
error: res_error,
|
|
5609
|
-
} = OrderPlatformModel.
|
|
5453
|
+
} = OrderPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
5610
5454
|
abortEarly: false,
|
|
5611
5455
|
allowUnknown: true,
|
|
5612
5456
|
});
|
|
@@ -5617,7 +5461,7 @@ class Order {
|
|
|
5617
5461
|
} else {
|
|
5618
5462
|
Logger({
|
|
5619
5463
|
level: "WARN",
|
|
5620
|
-
message: `Response Validation Warnings for platform > Order >
|
|
5464
|
+
message: `Response Validation Warnings for platform > Order > uploadConsents \n ${res_error}`,
|
|
5621
5465
|
});
|
|
5622
5466
|
}
|
|
5623
5467
|
}
|
|
@@ -5629,10 +5473,10 @@ class Order {
|
|
|
5629
5473
|
* @param {OrderPlatformValidator.VerifyMobileOTPParam} arg - Arg object
|
|
5630
5474
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5631
5475
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5632
|
-
* @returns {Promise<OrderPlatformModel.
|
|
5476
|
+
* @returns {Promise<OrderPlatformModel.VerifyOtpResponseSchema>} - Success response
|
|
5633
5477
|
* @name verifyMobileOTP
|
|
5634
|
-
* @summary: Verify
|
|
5635
|
-
* @description:
|
|
5478
|
+
* @summary: Verify mobile OTP
|
|
5479
|
+
* @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/).
|
|
5636
5480
|
*/
|
|
5637
5481
|
async verifyMobileOTP(
|
|
5638
5482
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5685,7 +5529,7 @@ class Order {
|
|
|
5685
5529
|
|
|
5686
5530
|
const {
|
|
5687
5531
|
error: res_error,
|
|
5688
|
-
} = OrderPlatformModel.
|
|
5532
|
+
} = OrderPlatformModel.VerifyOtpResponseSchema().validate(responseData, {
|
|
5689
5533
|
abortEarly: false,
|
|
5690
5534
|
allowUnknown: true,
|
|
5691
5535
|
});
|