@gofynd/fdk-client-javascript 1.6.4 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +113 -93
- package/sdk/application/Cart/CartApplicationClient.js +270 -139
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +122 -138
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +43 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +190 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +71 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +103 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +51 -21
- package/sdk/application/Content/ContentApplicationClient.js +197 -36
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +79 -64
- package/sdk/application/Logistic/LogisticApplicationClient.js +246 -264
- package/sdk/application/Order/OrderApplicationClient.d.ts +44 -24
- package/sdk/application/Order/OrderApplicationClient.js +140 -21
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +211 -111
- package/sdk/application/Payment/PaymentApplicationClient.js +610 -109
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +14 -14
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +23 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +103 -5
- package/sdk/application/User/UserApplicationClient.d.ts +13 -23
- package/sdk/application/User/UserApplicationClient.js +9 -57
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +66 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +431 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +231 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +152 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +8 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +39 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +26 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.js +173 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +238 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.js +248 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +5 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +19 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -22
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -87
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +33 -99
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +25 -84
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -10
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +100 -49
- package/sdk/partner/Lead/LeadPartnerModel.js +100 -74
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -160
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +66 -1180
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +288 -1685
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +226 -824
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -13
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +14 -141
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +116 -0
- package/sdk/partner/Payment/PaymentPartnerClient.js +857 -0
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +388 -0
- package/sdk/partner/Payment/PaymentPartnerModel.js +442 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +14 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.js +74 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +63 -21
- package/sdk/partner/Theme/ThemePartnerClient.js +396 -71
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +104 -72
- package/sdk/partner/Theme/ThemePartnerModel.js +101 -75
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +5 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +42 -12
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +191 -670
- package/sdk/partner/Webhook/WebhookPartnerModel.js +159 -268
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +1 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +145 -49
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +171 -20
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +406 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +3214 -76
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +3798 -459
- package/sdk/platform/Billing/BillingPlatformModel.js +2577 -342
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +465 -24
- package/sdk/platform/Billing/BillingPlatformValidator.js +490 -14
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +284 -205
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +671 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3136 -4788
- package/sdk/platform/Cart/CartPlatformModel.js +2850 -2031
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1015 -419
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6450 -2010
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1121 -230
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +919 -127
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +372 -574
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1238 -1317
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +8351 -9825
- package/sdk/platform/Catalog/CatalogPlatformModel.js +9662 -6881
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +288 -235
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +241 -183
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -6
- package/sdk/platform/Common/CommonPlatformClient.js +5 -6
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +374 -234
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +875 -583
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +170 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +145 -126
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +56 -3
- package/sdk/platform/Communication/CommunicationPlatformClient.js +307 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +424 -252
- package/sdk/platform/Communication/CommunicationPlatformModel.js +540 -320
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +68 -99
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +84 -140
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +333 -118
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1470 -409
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +158 -55
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +163 -41
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +151 -61
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +595 -101
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +1199 -462
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1008 -321
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +253 -140
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1087 -458
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +221 -178
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +220 -157
- package/sdk/platform/Content/ContentPlatformClient.d.ts +124 -123
- package/sdk/platform/Content/ContentPlatformClient.js +459 -379
- package/sdk/platform/Content/ContentPlatformModel.d.ts +833 -1307
- package/sdk/platform/Content/ContentPlatformModel.js +893 -582
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +140 -150
- package/sdk/platform/Content/ContentPlatformValidator.js +131 -135
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +60 -36
- package/sdk/platform/Discount/DiscountPlatformClient.js +85 -36
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +46 -47
- package/sdk/platform/Discount/DiscountPlatformModel.js +42 -46
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +24 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +75 -86
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +60 -74
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2895 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2150 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- 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 +4 -24
- package/sdk/platform/Lead/LeadPlatformClient.js +4 -160
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +142 -57
- package/sdk/platform/Lead/LeadPlatformModel.js +162 -79
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +3 -29
- package/sdk/platform/Lead/LeadPlatformValidator.js +2 -28
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +94 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +600 -57
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +115 -115
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +120 -43
- package/sdk/platform/Order/OrderPlatformClient.d.ts +502 -293
- package/sdk/platform/Order/OrderPlatformClient.js +1466 -913
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4103 -9109
- package/sdk/platform/Order/OrderPlatformModel.js +3198 -4245
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +445 -612
- package/sdk/platform/Order/OrderPlatformValidator.js +316 -326
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +7 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +382 -135
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +2453 -935
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +306 -93
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +305 -70
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +66 -56
- package/sdk/platform/Payment/PaymentPlatformClient.js +269 -124
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3525 -1313
- package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1511
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +64 -35
- package/sdk/platform/Payment/PaymentPlatformValidator.js +60 -34
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +14 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +344 -56
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +2180 -302
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +380 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +336 -37
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +127 -213
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +538 -1306
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3429 -2979
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3642 -1785
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +218 -392
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +151 -290
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +4 -16
- package/sdk/platform/Share/SharePlatformApplicationClient.js +8 -86
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -23
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +3 -16
- package/sdk/platform/Share/SharePlatformModel.d.ts +6 -50
- package/sdk/platform/Share/SharePlatformModel.js +3 -43
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +157 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +21 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +23 -6
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +18 -8
- package/sdk/platform/Theme/ThemePlatformClient.js +85 -8
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +425 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +329 -23
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +7 -3
- package/sdk/platform/Theme/ThemePlatformValidator.js +9 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +18 -71
- package/sdk/platform/User/UserPlatformApplicationClient.js +27 -412
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +10 -114
- package/sdk/platform/User/UserPlatformApplicationValidator.js +7 -80
- package/sdk/platform/User/UserPlatformModel.d.ts +216 -264
- package/sdk/platform/User/UserPlatformModel.js +209 -216
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +428 -810
- package/sdk/platform/Webhook/WebhookPlatformModel.js +395 -444
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Billing/BillingPublicClient.d.ts +56 -0
- package/sdk/public/Billing/BillingPublicClient.js +397 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +919 -0
- package/sdk/public/Billing/BillingPublicModel.js +560 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +43 -0
- package/sdk/public/Billing/BillingPublicValidator.js +50 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +97 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +102 -40
- package/sdk/public/Configuration/ConfigurationPublicModel.js +111 -29
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +11 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +12 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +183 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +38 -1
- package/sdk/public/Content/ContentPublicModel.js +47 -1
- package/sdk/public/Content/ContentPublicValidator.d.ts +17 -1
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- 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 +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +67 -215
- package/sdk/public/Webhook/WebhookPublicModel.js +61 -66
- 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/application/Finance/FinanceApplicationClient.d.ts +0 -29
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -126
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +0 -22
- package/sdk/public/Catalog/CatalogPublicClient.js +0 -138
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +0 -155
- package/sdk/public/Catalog/CatalogPublicModel.js +0 -116
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +0 -55
- package/sdk/public/Catalog/CatalogPublicValidator.js +0 -35
|
@@ -15,20 +15,20 @@ class Order {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @param {OrderPlatformValidator.
|
|
18
|
+
* @param {OrderPlatformValidator.AddUserViewsParam} 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.CreateUpdateDeleteResponse>} -
|
|
22
22
|
* Success response
|
|
23
|
-
* @name
|
|
24
|
-
* @summary:
|
|
25
|
-
* @description:
|
|
23
|
+
* @name addUserViews
|
|
24
|
+
* @summary: Add custom view for every unique user cross company pair.
|
|
25
|
+
* @description: Add custom view for every unique user cross company pair. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/addUserViews/).
|
|
26
26
|
*/
|
|
27
|
-
async
|
|
27
|
+
async addUserViews(
|
|
28
28
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
29
29
|
{ responseHeaders } = { responseHeaders: false }
|
|
30
30
|
) {
|
|
31
|
-
const { error } = OrderPlatformValidator.
|
|
31
|
+
const { error } = OrderPlatformValidator.addUserViews().validate(
|
|
32
32
|
{
|
|
33
33
|
body,
|
|
34
34
|
},
|
|
@@ -39,9 +39,7 @@ class Order {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// Showing warrnings if extra unknown parameters are found
|
|
42
|
-
const {
|
|
43
|
-
error: warrning,
|
|
44
|
-
} = OrderPlatformValidator.addStateManagerConfig().validate(
|
|
42
|
+
const { error: warrning } = OrderPlatformValidator.addUserViews().validate(
|
|
45
43
|
{
|
|
46
44
|
body,
|
|
47
45
|
},
|
|
@@ -50,7 +48,7 @@ class Order {
|
|
|
50
48
|
if (warrning) {
|
|
51
49
|
Logger({
|
|
52
50
|
level: "WARN",
|
|
53
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
51
|
+
message: `Parameter Validation warrnings for platform > Order > addUserViews \n ${warrning}`,
|
|
54
52
|
});
|
|
55
53
|
}
|
|
56
54
|
|
|
@@ -61,7 +59,7 @@ class Order {
|
|
|
61
59
|
const response = await PlatformAPIClient.execute(
|
|
62
60
|
this.config,
|
|
63
61
|
"post",
|
|
64
|
-
`/service/platform/order
|
|
62
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/views`,
|
|
65
63
|
query_params,
|
|
66
64
|
body,
|
|
67
65
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -75,10 +73,10 @@ class Order {
|
|
|
75
73
|
|
|
76
74
|
const {
|
|
77
75
|
error: res_error,
|
|
78
|
-
} = OrderPlatformModel.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
);
|
|
76
|
+
} = OrderPlatformModel.CreateUpdateDeleteResponse().validate(responseData, {
|
|
77
|
+
abortEarly: false,
|
|
78
|
+
allowUnknown: true,
|
|
79
|
+
});
|
|
82
80
|
|
|
83
81
|
if (res_error) {
|
|
84
82
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -86,7 +84,7 @@ class Order {
|
|
|
86
84
|
} else {
|
|
87
85
|
Logger({
|
|
88
86
|
level: "WARN",
|
|
89
|
-
message: `Response Validation Warnings for platform > Order >
|
|
87
|
+
message: `Response Validation Warnings for platform > Order > addUserViews \n ${res_error}`,
|
|
90
88
|
});
|
|
91
89
|
}
|
|
92
90
|
}
|
|
@@ -98,11 +96,10 @@ class Order {
|
|
|
98
96
|
* @param {OrderPlatformValidator.AttachOrderUserParam} arg - Arg object
|
|
99
97
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
100
98
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
101
|
-
* @returns {Promise<OrderPlatformModel.
|
|
102
|
-
* Success response
|
|
99
|
+
* @returns {Promise<OrderPlatformModel.AttachOrderUserResponse>} - Success response
|
|
103
100
|
* @name attachOrderUser
|
|
104
|
-
* @summary: Attach order
|
|
105
|
-
* @description: Attach
|
|
101
|
+
* @summary: Attach order user.
|
|
102
|
+
* @description: Attach order User - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/attachOrderUser/).
|
|
106
103
|
*/
|
|
107
104
|
async attachOrderUser(
|
|
108
105
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -155,10 +152,10 @@ class Order {
|
|
|
155
152
|
|
|
156
153
|
const {
|
|
157
154
|
error: res_error,
|
|
158
|
-
} = OrderPlatformModel.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
);
|
|
155
|
+
} = OrderPlatformModel.AttachOrderUserResponse().validate(responseData, {
|
|
156
|
+
abortEarly: false,
|
|
157
|
+
allowUnknown: true,
|
|
158
|
+
});
|
|
162
159
|
|
|
163
160
|
if (res_error) {
|
|
164
161
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -178,10 +175,11 @@ class Order {
|
|
|
178
175
|
* @param {OrderPlatformValidator.BulkListingParam} arg - Arg object
|
|
179
176
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
180
177
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
181
|
-
* @returns {Promise<OrderPlatformModel.
|
|
178
|
+
* @returns {Promise<OrderPlatformModel.BulkListingResponse>} - Success response
|
|
182
179
|
* @name bulkListing
|
|
183
|
-
* @summary:
|
|
184
|
-
* @description:
|
|
180
|
+
* @summary: Fetches of previous or running bulk jobs.
|
|
181
|
+
* @description: Fetches of previous or running bulk jobs.
|
|
182
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkListing/).
|
|
185
183
|
*/
|
|
186
184
|
async bulkListing(
|
|
187
185
|
{
|
|
@@ -260,7 +258,7 @@ class Order {
|
|
|
260
258
|
|
|
261
259
|
const {
|
|
262
260
|
error: res_error,
|
|
263
|
-
} = OrderPlatformModel.
|
|
261
|
+
} = OrderPlatformModel.BulkListingResponse().validate(responseData, {
|
|
264
262
|
abortEarly: false,
|
|
265
263
|
allowUnknown: true,
|
|
266
264
|
});
|
|
@@ -283,12 +281,11 @@ class Order {
|
|
|
283
281
|
* @param {OrderPlatformValidator.BulkStateTransistionParam} arg - Arg object
|
|
284
282
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
285
283
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
286
|
-
* @returns {Promise<OrderPlatformModel.
|
|
287
|
-
*
|
|
288
|
-
*
|
|
284
|
+
* @returns {Promise<OrderPlatformModel.BulkStateTransistionResponse>} -
|
|
285
|
+
* Success response
|
|
289
286
|
* @name bulkStateTransistion
|
|
290
|
-
* @summary:
|
|
291
|
-
* @description: Performs
|
|
287
|
+
* @summary: Performs State Transisiton in Bulk for the given shipments in the excel/csv file url.
|
|
288
|
+
* @description: Performs State Transisiton in Bulk for the given shipments in the excel/csv file url. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkStateTransistion/).
|
|
292
289
|
*/
|
|
293
290
|
async bulkStateTransistion(
|
|
294
291
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -341,7 +338,7 @@ class Order {
|
|
|
341
338
|
|
|
342
339
|
const {
|
|
343
340
|
error: res_error,
|
|
344
|
-
} = OrderPlatformModel.
|
|
341
|
+
} = OrderPlatformModel.BulkStateTransistionResponse().validate(
|
|
345
342
|
responseData,
|
|
346
343
|
{ abortEarly: false, allowUnknown: true }
|
|
347
344
|
);
|
|
@@ -366,8 +363,8 @@ class Order {
|
|
|
366
363
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
367
364
|
* @returns {Promise<OrderPlatformModel.OrderStatusResult>} - Success response
|
|
368
365
|
* @name checkOrderStatus
|
|
369
|
-
* @summary:
|
|
370
|
-
* @description:
|
|
366
|
+
* @summary: Check order status.
|
|
367
|
+
* @description: Verify the current status of an order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/checkOrderStatus/).
|
|
371
368
|
*/
|
|
372
369
|
async checkOrderStatus(
|
|
373
370
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -440,23 +437,28 @@ class Order {
|
|
|
440
437
|
}
|
|
441
438
|
|
|
442
439
|
/**
|
|
443
|
-
* @param {OrderPlatformValidator.
|
|
440
|
+
* @param {OrderPlatformValidator.Click2CallParam} arg - Arg object
|
|
444
441
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
445
442
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
446
|
-
* @returns {Promise<OrderPlatformModel.
|
|
447
|
-
*
|
|
448
|
-
*
|
|
449
|
-
* @
|
|
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/).
|
|
443
|
+
* @returns {Promise<OrderPlatformModel.Click2CallResponse>} - Success response
|
|
444
|
+
* @name click2Call
|
|
445
|
+
* @summary: Click to call.
|
|
446
|
+
* @description: Click to call. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/click2Call/).
|
|
452
447
|
*/
|
|
453
|
-
async
|
|
454
|
-
{
|
|
448
|
+
async click2Call(
|
|
449
|
+
{ caller, receiver, bagId, callerId, method, requestHeaders } = {
|
|
450
|
+
requestHeaders: {},
|
|
451
|
+
},
|
|
455
452
|
{ responseHeaders } = { responseHeaders: false }
|
|
456
453
|
) {
|
|
457
|
-
const { error } = OrderPlatformValidator.
|
|
454
|
+
const { error } = OrderPlatformValidator.click2Call().validate(
|
|
458
455
|
{
|
|
459
|
-
|
|
456
|
+
caller,
|
|
457
|
+
receiver,
|
|
458
|
+
bagId,
|
|
459
|
+
|
|
460
|
+
callerId,
|
|
461
|
+
method,
|
|
460
462
|
},
|
|
461
463
|
{ abortEarly: false, allowUnknown: true }
|
|
462
464
|
);
|
|
@@ -465,31 +467,39 @@ class Order {
|
|
|
465
467
|
}
|
|
466
468
|
|
|
467
469
|
// Showing warrnings if extra unknown parameters are found
|
|
468
|
-
const {
|
|
469
|
-
error: warrning,
|
|
470
|
-
} = OrderPlatformValidator.createChannelConfig().validate(
|
|
470
|
+
const { error: warrning } = OrderPlatformValidator.click2Call().validate(
|
|
471
471
|
{
|
|
472
|
-
|
|
472
|
+
caller,
|
|
473
|
+
receiver,
|
|
474
|
+
bagId,
|
|
475
|
+
|
|
476
|
+
callerId,
|
|
477
|
+
method,
|
|
473
478
|
},
|
|
474
479
|
{ abortEarly: false, allowUnknown: false }
|
|
475
480
|
);
|
|
476
481
|
if (warrning) {
|
|
477
482
|
Logger({
|
|
478
483
|
level: "WARN",
|
|
479
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
484
|
+
message: `Parameter Validation warrnings for platform > Order > click2Call \n ${warrning}`,
|
|
480
485
|
});
|
|
481
486
|
}
|
|
482
487
|
|
|
483
488
|
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;
|
|
484
494
|
|
|
485
495
|
const xHeaders = {};
|
|
486
496
|
|
|
487
497
|
const response = await PlatformAPIClient.execute(
|
|
488
498
|
this.config,
|
|
489
|
-
"
|
|
490
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
499
|
+
"get",
|
|
500
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/ninja/click2call`,
|
|
491
501
|
query_params,
|
|
492
|
-
|
|
502
|
+
undefined,
|
|
493
503
|
{ ...xHeaders, ...requestHeaders },
|
|
494
504
|
{ responseHeaders }
|
|
495
505
|
);
|
|
@@ -501,10 +511,10 @@ class Order {
|
|
|
501
511
|
|
|
502
512
|
const {
|
|
503
513
|
error: res_error,
|
|
504
|
-
} = OrderPlatformModel.
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
);
|
|
514
|
+
} = OrderPlatformModel.Click2CallResponse().validate(responseData, {
|
|
515
|
+
abortEarly: false,
|
|
516
|
+
allowUnknown: true,
|
|
517
|
+
});
|
|
508
518
|
|
|
509
519
|
if (res_error) {
|
|
510
520
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -512,7 +522,7 @@ class Order {
|
|
|
512
522
|
} else {
|
|
513
523
|
Logger({
|
|
514
524
|
level: "WARN",
|
|
515
|
-
message: `Response Validation Warnings for platform > Order >
|
|
525
|
+
message: `Response Validation Warnings for platform > Order > click2Call \n ${res_error}`,
|
|
516
526
|
});
|
|
517
527
|
}
|
|
518
528
|
}
|
|
@@ -524,10 +534,10 @@ class Order {
|
|
|
524
534
|
* @param {OrderPlatformValidator.CreateOrderParam} arg - Arg object
|
|
525
535
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
526
536
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
527
|
-
* @returns {Promise<OrderPlatformModel.
|
|
537
|
+
* @returns {Promise<OrderPlatformModel.CreateOrderResponse>} - Success response
|
|
528
538
|
* @name createOrder
|
|
529
|
-
* @summary: Create order
|
|
530
|
-
* @description:
|
|
539
|
+
* @summary: Create order.
|
|
540
|
+
* @description: Create order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/).
|
|
531
541
|
*/
|
|
532
542
|
async createOrder(
|
|
533
543
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -578,7 +588,7 @@ class Order {
|
|
|
578
588
|
|
|
579
589
|
const {
|
|
580
590
|
error: res_error,
|
|
581
|
-
} = OrderPlatformModel.
|
|
591
|
+
} = OrderPlatformModel.CreateOrderResponse().validate(responseData, {
|
|
582
592
|
abortEarly: false,
|
|
583
593
|
allowUnknown: true,
|
|
584
594
|
});
|
|
@@ -598,21 +608,22 @@ class Order {
|
|
|
598
608
|
}
|
|
599
609
|
|
|
600
610
|
/**
|
|
601
|
-
* @param {OrderPlatformValidator.
|
|
611
|
+
* @param {OrderPlatformValidator.DeleteUserViewsParam} arg - Arg object
|
|
602
612
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
603
613
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
604
|
-
* @returns {Promise<OrderPlatformModel.
|
|
605
|
-
*
|
|
606
|
-
* @
|
|
607
|
-
* @
|
|
614
|
+
* @returns {Promise<OrderPlatformModel.CreateUpdateDeleteResponse>} -
|
|
615
|
+
* Success response
|
|
616
|
+
* @name deleteUserViews
|
|
617
|
+
* @summary: Delete custom view for every unique user cross company pair.
|
|
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/).
|
|
608
619
|
*/
|
|
609
|
-
async
|
|
610
|
-
{
|
|
620
|
+
async deleteUserViews(
|
|
621
|
+
{ viewId, requestHeaders } = { requestHeaders: {} },
|
|
611
622
|
{ responseHeaders } = { responseHeaders: false }
|
|
612
623
|
) {
|
|
613
|
-
const { error } = OrderPlatformValidator.
|
|
624
|
+
const { error } = OrderPlatformValidator.deleteUserViews().validate(
|
|
614
625
|
{
|
|
615
|
-
|
|
626
|
+
viewId,
|
|
616
627
|
},
|
|
617
628
|
{ abortEarly: false, allowUnknown: true }
|
|
618
629
|
);
|
|
@@ -623,29 +634,30 @@ class Order {
|
|
|
623
634
|
// Showing warrnings if extra unknown parameters are found
|
|
624
635
|
const {
|
|
625
636
|
error: warrning,
|
|
626
|
-
} = OrderPlatformValidator.
|
|
637
|
+
} = OrderPlatformValidator.deleteUserViews().validate(
|
|
627
638
|
{
|
|
628
|
-
|
|
639
|
+
viewId,
|
|
629
640
|
},
|
|
630
641
|
{ abortEarly: false, allowUnknown: false }
|
|
631
642
|
);
|
|
632
643
|
if (warrning) {
|
|
633
644
|
Logger({
|
|
634
645
|
level: "WARN",
|
|
635
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
646
|
+
message: `Parameter Validation warrnings for platform > Order > deleteUserViews \n ${warrning}`,
|
|
636
647
|
});
|
|
637
648
|
}
|
|
638
649
|
|
|
639
650
|
const query_params = {};
|
|
651
|
+
query_params["view_id"] = viewId;
|
|
640
652
|
|
|
641
653
|
const xHeaders = {};
|
|
642
654
|
|
|
643
655
|
const response = await PlatformAPIClient.execute(
|
|
644
656
|
this.config,
|
|
645
|
-
"
|
|
646
|
-
`/service/platform/order
|
|
657
|
+
"delete",
|
|
658
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/views`,
|
|
647
659
|
query_params,
|
|
648
|
-
|
|
660
|
+
undefined,
|
|
649
661
|
{ ...xHeaders, ...requestHeaders },
|
|
650
662
|
{ responseHeaders }
|
|
651
663
|
);
|
|
@@ -657,7 +669,7 @@ class Order {
|
|
|
657
669
|
|
|
658
670
|
const {
|
|
659
671
|
error: res_error,
|
|
660
|
-
} = OrderPlatformModel.
|
|
672
|
+
} = OrderPlatformModel.CreateUpdateDeleteResponse().validate(responseData, {
|
|
661
673
|
abortEarly: false,
|
|
662
674
|
allowUnknown: true,
|
|
663
675
|
});
|
|
@@ -668,7 +680,7 @@ class Order {
|
|
|
668
680
|
} else {
|
|
669
681
|
Logger({
|
|
670
682
|
level: "WARN",
|
|
671
|
-
message: `Response Validation Warnings for platform > Order >
|
|
683
|
+
message: `Response Validation Warnings for platform > Order > deleteUserViews \n ${res_error}`,
|
|
672
684
|
});
|
|
673
685
|
}
|
|
674
686
|
}
|
|
@@ -680,10 +692,10 @@ class Order {
|
|
|
680
692
|
* @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object
|
|
681
693
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
682
694
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
683
|
-
* @returns {Promise<OrderPlatformModel.
|
|
695
|
+
* @returns {Promise<OrderPlatformModel.TemplateDownloadResponse>} - Success response
|
|
684
696
|
* @name downloadBulkActionTemplate
|
|
685
|
-
* @summary: Download bulk template
|
|
686
|
-
* @description: Download bulk seller templates
|
|
697
|
+
* @summary: Download bulk action template.
|
|
698
|
+
* @description: Download bulk actions seller templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadBulkActionTemplate/).
|
|
687
699
|
*/
|
|
688
700
|
async downloadBulkActionTemplate(
|
|
689
701
|
{ templateSlug, requestHeaders } = { requestHeaders: {} },
|
|
@@ -739,7 +751,7 @@ class Order {
|
|
|
739
751
|
|
|
740
752
|
const {
|
|
741
753
|
error: res_error,
|
|
742
|
-
} = OrderPlatformModel.
|
|
754
|
+
} = OrderPlatformModel.TemplateDownloadResponse().validate(responseData, {
|
|
743
755
|
abortEarly: false,
|
|
744
756
|
allowUnknown: true,
|
|
745
757
|
});
|
|
@@ -762,12 +774,11 @@ class Order {
|
|
|
762
774
|
* @param {OrderPlatformValidator.DownloadLanesReportParam} arg - Arg object
|
|
763
775
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
764
776
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
765
|
-
* @returns {Promise<OrderPlatformModel.
|
|
766
|
-
*
|
|
767
|
-
*
|
|
777
|
+
* @returns {Promise<OrderPlatformModel.BulkReportsDownloadResponse>} -
|
|
778
|
+
* Success response
|
|
768
779
|
* @name downloadLanesReport
|
|
769
|
-
* @summary:
|
|
770
|
-
* @description: Downloads
|
|
780
|
+
* @summary: Downloads lanes shipment/orders.
|
|
781
|
+
* @description: Downloads lanes shipment/orders. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadLanesReport/).
|
|
771
782
|
*/
|
|
772
783
|
async downloadLanesReport(
|
|
773
784
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -820,7 +831,7 @@ class Order {
|
|
|
820
831
|
|
|
821
832
|
const {
|
|
822
833
|
error: res_error,
|
|
823
|
-
} = OrderPlatformModel.
|
|
834
|
+
} = OrderPlatformModel.BulkReportsDownloadResponse().validate(
|
|
824
835
|
responseData,
|
|
825
836
|
{ abortEarly: false, allowUnknown: true }
|
|
826
837
|
);
|
|
@@ -843,11 +854,10 @@ class Order {
|
|
|
843
854
|
* @param {OrderPlatformValidator.EInvoiceRetryParam} arg - Arg object
|
|
844
855
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
845
856
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
846
|
-
* @returns {Promise<OrderPlatformModel.
|
|
847
|
-
* Success response
|
|
857
|
+
* @returns {Promise<OrderPlatformModel.EInvoiceRetryResponse>} - Success response
|
|
848
858
|
* @name eInvoiceRetry
|
|
849
|
-
* @summary: Retry
|
|
850
|
-
* @description:
|
|
859
|
+
* @summary: Retry e-invoice after failure
|
|
860
|
+
* @description: Retry e-invoice after failure - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/eInvoiceRetry/).
|
|
851
861
|
*/
|
|
852
862
|
async eInvoiceRetry(
|
|
853
863
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -898,10 +908,10 @@ class Order {
|
|
|
898
908
|
|
|
899
909
|
const {
|
|
900
910
|
error: res_error,
|
|
901
|
-
} = OrderPlatformModel.
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
);
|
|
911
|
+
} = OrderPlatformModel.EInvoiceRetryResponse().validate(responseData, {
|
|
912
|
+
abortEarly: false,
|
|
913
|
+
allowUnknown: true,
|
|
914
|
+
});
|
|
905
915
|
|
|
906
916
|
if (res_error) {
|
|
907
917
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -923,8 +933,8 @@ class Order {
|
|
|
923
933
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
924
934
|
* @returns {Promise<OrderPlatformModel.FailedOrderLogDetails>} - Success response
|
|
925
935
|
* @name failedOrderLogDetails
|
|
926
|
-
* @summary: Get failed order
|
|
927
|
-
* @description:
|
|
936
|
+
* @summary: Get failed order logs according to the filter provided
|
|
937
|
+
* @description: This endpoint allows users to get the exact error trace from the log id provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogDetails/).
|
|
928
938
|
*/
|
|
929
939
|
async failedOrderLogDetails(
|
|
930
940
|
{ logId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -997,20 +1007,23 @@ class Order {
|
|
|
997
1007
|
}
|
|
998
1008
|
|
|
999
1009
|
/**
|
|
1000
|
-
* @param {OrderPlatformValidator.
|
|
1010
|
+
* @param {OrderPlatformValidator.FetchCreditBalanceDetailParam} arg - Arg object
|
|
1001
1011
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1002
1012
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1003
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1004
|
-
* Success response
|
|
1005
|
-
*
|
|
1006
|
-
* @
|
|
1007
|
-
* @
|
|
1013
|
+
* @returns {Promise<OrderPlatformModel.FetchCreditBalanceResponsePayload>}
|
|
1014
|
+
* - Success response
|
|
1015
|
+
*
|
|
1016
|
+
* @name fetchCreditBalanceDetail
|
|
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/).
|
|
1008
1019
|
*/
|
|
1009
|
-
async
|
|
1020
|
+
async fetchCreditBalanceDetail(
|
|
1010
1021
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1011
1022
|
{ responseHeaders } = { responseHeaders: false }
|
|
1012
1023
|
) {
|
|
1013
|
-
const {
|
|
1024
|
+
const {
|
|
1025
|
+
error,
|
|
1026
|
+
} = OrderPlatformValidator.fetchCreditBalanceDetail().validate(
|
|
1014
1027
|
{
|
|
1015
1028
|
body,
|
|
1016
1029
|
},
|
|
@@ -1023,7 +1036,7 @@ class Order {
|
|
|
1023
1036
|
// Showing warrnings if extra unknown parameters are found
|
|
1024
1037
|
const {
|
|
1025
1038
|
error: warrning,
|
|
1026
|
-
} = OrderPlatformValidator.
|
|
1039
|
+
} = OrderPlatformValidator.fetchCreditBalanceDetail().validate(
|
|
1027
1040
|
{
|
|
1028
1041
|
body,
|
|
1029
1042
|
},
|
|
@@ -1032,7 +1045,7 @@ class Order {
|
|
|
1032
1045
|
if (warrning) {
|
|
1033
1046
|
Logger({
|
|
1034
1047
|
level: "WARN",
|
|
1035
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
1048
|
+
message: `Parameter Validation warrnings for platform > Order > fetchCreditBalanceDetail \n ${warrning}`,
|
|
1036
1049
|
});
|
|
1037
1050
|
}
|
|
1038
1051
|
|
|
@@ -1043,7 +1056,7 @@ class Order {
|
|
|
1043
1056
|
const response = await PlatformAPIClient.execute(
|
|
1044
1057
|
this.config,
|
|
1045
1058
|
"post",
|
|
1046
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
1059
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/customer-credit-balance`,
|
|
1047
1060
|
query_params,
|
|
1048
1061
|
body,
|
|
1049
1062
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1057,7 +1070,7 @@ class Order {
|
|
|
1057
1070
|
|
|
1058
1071
|
const {
|
|
1059
1072
|
error: res_error,
|
|
1060
|
-
} = OrderPlatformModel.
|
|
1073
|
+
} = OrderPlatformModel.FetchCreditBalanceResponsePayload().validate(
|
|
1061
1074
|
responseData,
|
|
1062
1075
|
{ abortEarly: false, allowUnknown: true }
|
|
1063
1076
|
);
|
|
@@ -1068,7 +1081,7 @@ class Order {
|
|
|
1068
1081
|
} else {
|
|
1069
1082
|
Logger({
|
|
1070
1083
|
level: "WARN",
|
|
1071
|
-
message: `Response Validation Warnings for platform > Order >
|
|
1084
|
+
message: `Response Validation Warnings for platform > Order > fetchCreditBalanceDetail \n ${res_error}`,
|
|
1072
1085
|
});
|
|
1073
1086
|
}
|
|
1074
1087
|
}
|
|
@@ -1077,22 +1090,21 @@ class Order {
|
|
|
1077
1090
|
}
|
|
1078
1091
|
|
|
1079
1092
|
/**
|
|
1080
|
-
* @param {OrderPlatformValidator.
|
|
1093
|
+
* @param {OrderPlatformValidator.FetchRefundModeConfigParam} arg - Arg object
|
|
1081
1094
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1082
1095
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1083
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1096
|
+
* @returns {Promise<OrderPlatformModel.RefundModeConfigResponsePayload>} -
|
|
1084
1097
|
* Success response
|
|
1085
|
-
* @name
|
|
1086
|
-
* @summary:
|
|
1087
|
-
* @description:
|
|
1098
|
+
* @name fetchRefundModeConfig
|
|
1099
|
+
* @summary: Fetch refund mode config.
|
|
1100
|
+
* @description: Retrieve configuration for refund modes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchRefundModeConfig/).
|
|
1088
1101
|
*/
|
|
1089
|
-
async
|
|
1090
|
-
{
|
|
1102
|
+
async fetchRefundModeConfig(
|
|
1103
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1091
1104
|
{ responseHeaders } = { responseHeaders: false }
|
|
1092
1105
|
) {
|
|
1093
|
-
const { error } = OrderPlatformValidator.
|
|
1106
|
+
const { error } = OrderPlatformValidator.fetchRefundModeConfig().validate(
|
|
1094
1107
|
{
|
|
1095
|
-
invoiceType,
|
|
1096
1108
|
body,
|
|
1097
1109
|
},
|
|
1098
1110
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1104,9 +1116,8 @@ class Order {
|
|
|
1104
1116
|
// Showing warrnings if extra unknown parameters are found
|
|
1105
1117
|
const {
|
|
1106
1118
|
error: warrning,
|
|
1107
|
-
} = OrderPlatformValidator.
|
|
1119
|
+
} = OrderPlatformValidator.fetchRefundModeConfig().validate(
|
|
1108
1120
|
{
|
|
1109
|
-
invoiceType,
|
|
1110
1121
|
body,
|
|
1111
1122
|
},
|
|
1112
1123
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1114,7 +1125,7 @@ class Order {
|
|
|
1114
1125
|
if (warrning) {
|
|
1115
1126
|
Logger({
|
|
1116
1127
|
level: "WARN",
|
|
1117
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
1128
|
+
message: `Parameter Validation warrnings for platform > Order > fetchRefundModeConfig \n ${warrning}`,
|
|
1118
1129
|
});
|
|
1119
1130
|
}
|
|
1120
1131
|
|
|
@@ -1125,7 +1136,7 @@ class Order {
|
|
|
1125
1136
|
const response = await PlatformAPIClient.execute(
|
|
1126
1137
|
this.config,
|
|
1127
1138
|
"post",
|
|
1128
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}
|
|
1139
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund-mode-config`,
|
|
1129
1140
|
query_params,
|
|
1130
1141
|
body,
|
|
1131
1142
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1139,7 +1150,7 @@ class Order {
|
|
|
1139
1150
|
|
|
1140
1151
|
const {
|
|
1141
1152
|
error: res_error,
|
|
1142
|
-
} = OrderPlatformModel.
|
|
1153
|
+
} = OrderPlatformModel.RefundModeConfigResponsePayload().validate(
|
|
1143
1154
|
responseData,
|
|
1144
1155
|
{ abortEarly: false, allowUnknown: true }
|
|
1145
1156
|
);
|
|
@@ -1150,7 +1161,7 @@ class Order {
|
|
|
1150
1161
|
} else {
|
|
1151
1162
|
Logger({
|
|
1152
1163
|
level: "WARN",
|
|
1153
|
-
message: `Response Validation Warnings for platform > Order >
|
|
1164
|
+
message: `Response Validation Warnings for platform > Order > fetchRefundModeConfig \n ${res_error}`,
|
|
1154
1165
|
});
|
|
1155
1166
|
}
|
|
1156
1167
|
}
|
|
@@ -1162,12 +1173,11 @@ class Order {
|
|
|
1162
1173
|
* @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object
|
|
1163
1174
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1164
1175
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1165
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1166
|
-
*
|
|
1167
|
-
*
|
|
1176
|
+
* @returns {Promise<OrderPlatformModel.GeneratePosOrderReceiptResponse>} -
|
|
1177
|
+
* Success response
|
|
1168
1178
|
* @name generatePOSReceiptByOrderId
|
|
1169
|
-
* @summary: Generate POS receipt by order
|
|
1170
|
-
* @description:
|
|
1179
|
+
* @summary: Generate POS receipt by order ID.
|
|
1180
|
+
* @description: Generate POS recipt by order id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generatePOSReceiptByOrderId/).
|
|
1171
1181
|
*/
|
|
1172
1182
|
async generatePOSReceiptByOrderId(
|
|
1173
1183
|
{ orderId, shipmentId, documentType, requestHeaders } = {
|
|
@@ -1230,7 +1240,7 @@ class Order {
|
|
|
1230
1240
|
|
|
1231
1241
|
const {
|
|
1232
1242
|
error: res_error,
|
|
1233
|
-
} = OrderPlatformModel.
|
|
1243
|
+
} = OrderPlatformModel.GeneratePosOrderReceiptResponse().validate(
|
|
1234
1244
|
responseData,
|
|
1235
1245
|
{ abortEarly: false, allowUnknown: true }
|
|
1236
1246
|
);
|
|
@@ -1249,85 +1259,6 @@ class Order {
|
|
|
1249
1259
|
return response;
|
|
1250
1260
|
}
|
|
1251
1261
|
|
|
1252
|
-
/**
|
|
1253
|
-
* @param {OrderPlatformValidator.GenerateProcessManifestParam} arg - Arg object
|
|
1254
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1255
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1256
|
-
* @returns {Promise<OrderPlatformModel.ManifestResponseSchema>} - Success response
|
|
1257
|
-
* @name generateProcessManifest
|
|
1258
|
-
* @summary: Process Order Manifest
|
|
1259
|
-
* @description: Endpoint to save and process order manifests. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateProcessManifest/).
|
|
1260
|
-
*/
|
|
1261
|
-
async generateProcessManifest(
|
|
1262
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1263
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1264
|
-
) {
|
|
1265
|
-
const { error } = OrderPlatformValidator.generateProcessManifest().validate(
|
|
1266
|
-
{
|
|
1267
|
-
body,
|
|
1268
|
-
},
|
|
1269
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1270
|
-
);
|
|
1271
|
-
if (error) {
|
|
1272
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1276
|
-
const {
|
|
1277
|
-
error: warrning,
|
|
1278
|
-
} = OrderPlatformValidator.generateProcessManifest().validate(
|
|
1279
|
-
{
|
|
1280
|
-
body,
|
|
1281
|
-
},
|
|
1282
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1283
|
-
);
|
|
1284
|
-
if (warrning) {
|
|
1285
|
-
Logger({
|
|
1286
|
-
level: "WARN",
|
|
1287
|
-
message: `Parameter Validation warrnings for platform > Order > generateProcessManifest \n ${warrning}`,
|
|
1288
|
-
});
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
const query_params = {};
|
|
1292
|
-
|
|
1293
|
-
const xHeaders = {};
|
|
1294
|
-
|
|
1295
|
-
const response = await PlatformAPIClient.execute(
|
|
1296
|
-
this.config,
|
|
1297
|
-
"post",
|
|
1298
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/process-manifest`,
|
|
1299
|
-
query_params,
|
|
1300
|
-
body,
|
|
1301
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1302
|
-
{ responseHeaders }
|
|
1303
|
-
);
|
|
1304
|
-
|
|
1305
|
-
let responseData = response;
|
|
1306
|
-
if (responseHeaders) {
|
|
1307
|
-
responseData = response[0];
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
const {
|
|
1311
|
-
error: res_error,
|
|
1312
|
-
} = OrderPlatformModel.ManifestResponseSchema().validate(responseData, {
|
|
1313
|
-
abortEarly: false,
|
|
1314
|
-
allowUnknown: true,
|
|
1315
|
-
});
|
|
1316
|
-
|
|
1317
|
-
if (res_error) {
|
|
1318
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1319
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1320
|
-
} else {
|
|
1321
|
-
Logger({
|
|
1322
|
-
level: "WARN",
|
|
1323
|
-
message: `Response Validation Warnings for platform > Order > generateProcessManifest \n ${res_error}`,
|
|
1324
|
-
});
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
return response;
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
1262
|
/**
|
|
1332
1263
|
* @param {OrderPlatformValidator.GetAllowedStateTransitionParam} arg - Arg object
|
|
1333
1264
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -1335,8 +1266,8 @@ class Order {
|
|
|
1335
1266
|
* @returns {Promise<OrderPlatformModel.RoleBaseStateTransitionMapping>} -
|
|
1336
1267
|
* Success response
|
|
1337
1268
|
* @name getAllowedStateTransition
|
|
1338
|
-
* @summary: Get allowed state transition
|
|
1339
|
-
* @description: Retrieve next possible states based on logged in user
|
|
1269
|
+
* @summary: Get allowed state transition.
|
|
1270
|
+
* @description: Retrieve next possible states based on logged in user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedStateTransition/).
|
|
1340
1271
|
*/
|
|
1341
1272
|
async getAllowedStateTransition(
|
|
1342
1273
|
{ orderingChannel, status, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1418,11 +1349,10 @@ class Order {
|
|
|
1418
1349
|
* @param {OrderPlatformValidator.GetAllowedTemplatesForBulkParam} arg - Arg object
|
|
1419
1350
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1420
1351
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1421
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1422
|
-
* Success response
|
|
1352
|
+
* @returns {Promise<OrderPlatformModel.AllowedTemplatesResponse>} - Success response
|
|
1423
1353
|
* @name getAllowedTemplatesForBulk
|
|
1424
|
-
* @summary:
|
|
1425
|
-
* @description: Gets
|
|
1354
|
+
* @summary: Gets All the allowed Templates to perform Bulk Operations.
|
|
1355
|
+
* @description: Gets All the allowed Templates to perform Bulk Operations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedTemplatesForBulk/).
|
|
1426
1356
|
*/
|
|
1427
1357
|
async getAllowedTemplatesForBulk(
|
|
1428
1358
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -1473,10 +1403,10 @@ class Order {
|
|
|
1473
1403
|
|
|
1474
1404
|
const {
|
|
1475
1405
|
error: res_error,
|
|
1476
|
-
} = OrderPlatformModel.
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
);
|
|
1406
|
+
} = OrderPlatformModel.AllowedTemplatesResponse().validate(responseData, {
|
|
1407
|
+
abortEarly: false,
|
|
1408
|
+
allowUnknown: true,
|
|
1409
|
+
});
|
|
1480
1410
|
|
|
1481
1411
|
if (res_error) {
|
|
1482
1412
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1496,11 +1426,10 @@ class Order {
|
|
|
1496
1426
|
* @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object
|
|
1497
1427
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1498
1428
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1499
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1500
|
-
* Success response
|
|
1429
|
+
* @returns {Promise<OrderPlatformModel.AnnouncementsResponse>} - Success response
|
|
1501
1430
|
* @name getAnnouncements
|
|
1502
|
-
* @summary:
|
|
1503
|
-
* @description: Retrieve announcements related to orders
|
|
1431
|
+
* @summary: Get announcements.
|
|
1432
|
+
* @description: Retrieve announcements related to orders or shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAnnouncements/).
|
|
1504
1433
|
*/
|
|
1505
1434
|
async getAnnouncements(
|
|
1506
1435
|
{ date, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1554,10 +1483,10 @@ class Order {
|
|
|
1554
1483
|
|
|
1555
1484
|
const {
|
|
1556
1485
|
error: res_error,
|
|
1557
|
-
} = OrderPlatformModel.
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
);
|
|
1486
|
+
} = OrderPlatformModel.AnnouncementsResponse().validate(responseData, {
|
|
1487
|
+
abortEarly: false,
|
|
1488
|
+
allowUnknown: true,
|
|
1489
|
+
});
|
|
1561
1490
|
|
|
1562
1491
|
if (res_error) {
|
|
1563
1492
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1577,12 +1506,11 @@ class Order {
|
|
|
1577
1506
|
* @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object
|
|
1578
1507
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1579
1508
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1580
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1581
|
-
*
|
|
1582
|
-
*
|
|
1509
|
+
* @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponse>} -
|
|
1510
|
+
* Success response
|
|
1583
1511
|
* @name getBagById
|
|
1584
|
-
* @summary: Get bag
|
|
1585
|
-
* @description:
|
|
1512
|
+
* @summary: Get bag by ID.
|
|
1513
|
+
* @description: Get Order Bag Details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
|
|
1586
1514
|
*/
|
|
1587
1515
|
async getBagById(
|
|
1588
1516
|
{ bagId, channelBagId, channelId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1626,7 +1554,7 @@ class Order {
|
|
|
1626
1554
|
const response = await PlatformAPIClient.execute(
|
|
1627
1555
|
this.config,
|
|
1628
1556
|
"get",
|
|
1629
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/bag-details
|
|
1557
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/bag-details`,
|
|
1630
1558
|
query_params,
|
|
1631
1559
|
undefined,
|
|
1632
1560
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1640,10 +1568,10 @@ class Order {
|
|
|
1640
1568
|
|
|
1641
1569
|
const {
|
|
1642
1570
|
error: res_error,
|
|
1643
|
-
} = OrderPlatformModel.
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
);
|
|
1571
|
+
} = OrderPlatformModel.BagDetailsPlatformResponse().validate(responseData, {
|
|
1572
|
+
abortEarly: false,
|
|
1573
|
+
allowUnknown: true,
|
|
1574
|
+
});
|
|
1647
1575
|
|
|
1648
1576
|
if (res_error) {
|
|
1649
1577
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1663,11 +1591,10 @@ class Order {
|
|
|
1663
1591
|
* @param {OrderPlatformValidator.GetBagsParam} arg - Arg object
|
|
1664
1592
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1665
1593
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1666
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1667
|
-
* Success response
|
|
1594
|
+
* @returns {Promise<OrderPlatformModel.GetBagsPlatformResponse>} - Success response
|
|
1668
1595
|
* @name getBags
|
|
1669
|
-
* @summary:
|
|
1670
|
-
* @description: Get
|
|
1596
|
+
* @summary: Get bags.
|
|
1597
|
+
* @description: Get Bags for the order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBags/).
|
|
1671
1598
|
*/
|
|
1672
1599
|
async getBags(
|
|
1673
1600
|
{
|
|
@@ -1754,10 +1681,10 @@ class Order {
|
|
|
1754
1681
|
|
|
1755
1682
|
const {
|
|
1756
1683
|
error: res_error,
|
|
1757
|
-
} = OrderPlatformModel.
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
);
|
|
1684
|
+
} = OrderPlatformModel.GetBagsPlatformResponse().validate(responseData, {
|
|
1685
|
+
abortEarly: false,
|
|
1686
|
+
allowUnknown: true,
|
|
1687
|
+
});
|
|
1761
1688
|
|
|
1762
1689
|
if (res_error) {
|
|
1763
1690
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1777,12 +1704,11 @@ class Order {
|
|
|
1777
1704
|
* @param {OrderPlatformValidator.GetBulkActionTemplateParam} arg - Arg object
|
|
1778
1705
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1779
1706
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1780
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1781
|
-
*
|
|
1782
|
-
*
|
|
1707
|
+
* @returns {Promise<OrderPlatformModel.BulkActionTemplateResponse>} -
|
|
1708
|
+
* Success response
|
|
1783
1709
|
* @name getBulkActionTemplate
|
|
1784
|
-
* @summary:
|
|
1785
|
-
* @description: Get
|
|
1710
|
+
* @summary: Get bulk action template.
|
|
1711
|
+
* @description: Get Bulk Action seller templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkActionTemplate/).
|
|
1786
1712
|
*/
|
|
1787
1713
|
async getBulkActionTemplate(
|
|
1788
1714
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -1831,10 +1757,10 @@ class Order {
|
|
|
1831
1757
|
|
|
1832
1758
|
const {
|
|
1833
1759
|
error: res_error,
|
|
1834
|
-
} = OrderPlatformModel.
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
);
|
|
1760
|
+
} = OrderPlatformModel.BulkActionTemplateResponse().validate(responseData, {
|
|
1761
|
+
abortEarly: false,
|
|
1762
|
+
allowUnknown: true,
|
|
1763
|
+
});
|
|
1838
1764
|
|
|
1839
1765
|
if (res_error) {
|
|
1840
1766
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1854,10 +1780,10 @@ class Order {
|
|
|
1854
1780
|
* @param {OrderPlatformValidator.GetBulkShipmentExcelFileParam} arg - Arg object
|
|
1855
1781
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1856
1782
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1857
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1783
|
+
* @returns {Promise<OrderPlatformModel.TemplateDownloadResponse>} - Success response
|
|
1858
1784
|
* @name getBulkShipmentExcelFile
|
|
1859
|
-
* @summary:
|
|
1860
|
-
* @description:
|
|
1785
|
+
* @summary: Get bulk shipment Excel file.
|
|
1786
|
+
* @description: Generate Bulk Shipment Excel Report. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkShipmentExcelFile/).
|
|
1861
1787
|
*/
|
|
1862
1788
|
async getBulkShipmentExcelFile(
|
|
1863
1789
|
{
|
|
@@ -1960,7 +1886,7 @@ class Order {
|
|
|
1960
1886
|
|
|
1961
1887
|
const {
|
|
1962
1888
|
error: res_error,
|
|
1963
|
-
} = OrderPlatformModel.
|
|
1889
|
+
} = OrderPlatformModel.TemplateDownloadResponse().validate(responseData, {
|
|
1964
1890
|
abortEarly: false,
|
|
1965
1891
|
allowUnknown: true,
|
|
1966
1892
|
});
|
|
@@ -1980,20 +1906,27 @@ class Order {
|
|
|
1980
1906
|
}
|
|
1981
1907
|
|
|
1982
1908
|
/**
|
|
1983
|
-
* @param {OrderPlatformValidator.
|
|
1909
|
+
* @param {OrderPlatformValidator.GetFailedOrderLogsParam} arg - Arg object
|
|
1984
1910
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1985
1911
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1986
|
-
* @returns {Promise<OrderPlatformModel.
|
|
1987
|
-
* @name
|
|
1988
|
-
* @summary: Get
|
|
1989
|
-
* @description:
|
|
1912
|
+
* @returns {Promise<OrderPlatformModel.FailedOrderLogs>} - Success response
|
|
1913
|
+
* @name getFailedOrderLogs
|
|
1914
|
+
* @summary: Get failed order logs according to the filter provided
|
|
1915
|
+
* @description: This endpoint allows users to 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/getFailedOrderLogs/).
|
|
1990
1916
|
*/
|
|
1991
|
-
async
|
|
1992
|
-
{
|
|
1917
|
+
async getFailedOrderLogs(
|
|
1918
|
+
{ pageNo, pageSize, searchType, searchValue, requestHeaders } = {
|
|
1919
|
+
requestHeaders: {},
|
|
1920
|
+
},
|
|
1993
1921
|
{ responseHeaders } = { responseHeaders: false }
|
|
1994
1922
|
) {
|
|
1995
|
-
const { error } = OrderPlatformValidator.
|
|
1996
|
-
{
|
|
1923
|
+
const { error } = OrderPlatformValidator.getFailedOrderLogs().validate(
|
|
1924
|
+
{
|
|
1925
|
+
pageNo,
|
|
1926
|
+
pageSize,
|
|
1927
|
+
searchType,
|
|
1928
|
+
searchValue,
|
|
1929
|
+
},
|
|
1997
1930
|
{ abortEarly: false, allowUnknown: true }
|
|
1998
1931
|
);
|
|
1999
1932
|
if (error) {
|
|
@@ -2003,25 +1936,34 @@ class Order {
|
|
|
2003
1936
|
// Showing warrnings if extra unknown parameters are found
|
|
2004
1937
|
const {
|
|
2005
1938
|
error: warrning,
|
|
2006
|
-
} = OrderPlatformValidator.
|
|
2007
|
-
{
|
|
1939
|
+
} = OrderPlatformValidator.getFailedOrderLogs().validate(
|
|
1940
|
+
{
|
|
1941
|
+
pageNo,
|
|
1942
|
+
pageSize,
|
|
1943
|
+
searchType,
|
|
1944
|
+
searchValue,
|
|
1945
|
+
},
|
|
2008
1946
|
{ abortEarly: false, allowUnknown: false }
|
|
2009
1947
|
);
|
|
2010
1948
|
if (warrning) {
|
|
2011
1949
|
Logger({
|
|
2012
1950
|
level: "WARN",
|
|
2013
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
1951
|
+
message: `Parameter Validation warrnings for platform > Order > getFailedOrderLogs \n ${warrning}`,
|
|
2014
1952
|
});
|
|
2015
1953
|
}
|
|
2016
1954
|
|
|
2017
1955
|
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;
|
|
2018
1960
|
|
|
2019
1961
|
const xHeaders = {};
|
|
2020
1962
|
|
|
2021
1963
|
const response = await PlatformAPIClient.execute(
|
|
2022
1964
|
this.config,
|
|
2023
1965
|
"get",
|
|
2024
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
1966
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/orders/failed`,
|
|
2025
1967
|
query_params,
|
|
2026
1968
|
undefined,
|
|
2027
1969
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2035,7 +1977,7 @@ class Order {
|
|
|
2035
1977
|
|
|
2036
1978
|
const {
|
|
2037
1979
|
error: res_error,
|
|
2038
|
-
} = OrderPlatformModel.
|
|
1980
|
+
} = OrderPlatformModel.FailedOrderLogs().validate(responseData, {
|
|
2039
1981
|
abortEarly: false,
|
|
2040
1982
|
allowUnknown: true,
|
|
2041
1983
|
});
|
|
@@ -2046,7 +1988,7 @@ class Order {
|
|
|
2046
1988
|
} else {
|
|
2047
1989
|
Logger({
|
|
2048
1990
|
level: "WARN",
|
|
2049
|
-
message: `Response Validation Warnings for platform > Order >
|
|
1991
|
+
message: `Response Validation Warnings for platform > Order > getFailedOrderLogs \n ${res_error}`,
|
|
2050
1992
|
});
|
|
2051
1993
|
}
|
|
2052
1994
|
}
|
|
@@ -2058,10 +2000,10 @@ class Order {
|
|
|
2058
2000
|
* @param {OrderPlatformValidator.GetFileByStatusParam} arg - Arg object
|
|
2059
2001
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2060
2002
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2061
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2003
|
+
* @returns {Promise<OrderPlatformModel.JobFailedResponse>} - Success response
|
|
2062
2004
|
* @name getFileByStatus
|
|
2063
|
-
* @summary:
|
|
2064
|
-
* @description: Get the file
|
|
2005
|
+
* @summary: Get the file URL consisting Records of the provided status.
|
|
2006
|
+
* @description: Get the file URL consisting Records of the provided status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getFileByStatus/).
|
|
2065
2007
|
*/
|
|
2066
2008
|
async getFileByStatus(
|
|
2067
2009
|
{ batchId, status, fileType, reportType, requestHeaders } = {
|
|
@@ -2125,7 +2067,7 @@ class Order {
|
|
|
2125
2067
|
|
|
2126
2068
|
const {
|
|
2127
2069
|
error: res_error,
|
|
2128
|
-
} = OrderPlatformModel.
|
|
2070
|
+
} = OrderPlatformModel.JobFailedResponse().validate(responseData, {
|
|
2129
2071
|
abortEarly: false,
|
|
2130
2072
|
allowUnknown: true,
|
|
2131
2073
|
});
|
|
@@ -2145,56 +2087,136 @@ class Order {
|
|
|
2145
2087
|
}
|
|
2146
2088
|
|
|
2147
2089
|
/**
|
|
2148
|
-
* @param {OrderPlatformValidator.
|
|
2090
|
+
* @param {OrderPlatformValidator.GetGlobalFiltersParam} arg - Arg object
|
|
2149
2091
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2150
2092
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2151
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2152
|
-
* @name
|
|
2153
|
-
* @summary: Get
|
|
2154
|
-
* @description: Get
|
|
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/).
|
|
2155
2097
|
*/
|
|
2156
|
-
async
|
|
2157
|
-
{
|
|
2158
|
-
superLane,
|
|
2159
|
-
groupEntity,
|
|
2160
|
-
fromDate,
|
|
2161
|
-
toDate,
|
|
2162
|
-
startDate,
|
|
2163
|
-
endDate,
|
|
2164
|
-
dpIds,
|
|
2165
|
-
stores,
|
|
2166
|
-
salesChannels,
|
|
2167
|
-
paymentMode,
|
|
2168
|
-
bagStatus,
|
|
2169
|
-
searchType,
|
|
2170
|
-
searchValue,
|
|
2171
|
-
tags,
|
|
2172
|
-
timeToDispatch,
|
|
2173
|
-
paymentMethods,
|
|
2174
|
-
myOrders,
|
|
2175
|
-
showCrossCompanyData,
|
|
2176
|
-
orderType,
|
|
2177
|
-
requestHeaders,
|
|
2178
|
-
} = { requestHeaders: {} },
|
|
2098
|
+
async getGlobalFilters(
|
|
2099
|
+
{ showIn, requestHeaders } = { requestHeaders: {} },
|
|
2179
2100
|
{ responseHeaders } = { responseHeaders: false }
|
|
2180
2101
|
) {
|
|
2181
|
-
const { error } = OrderPlatformValidator.
|
|
2102
|
+
const { error } = OrderPlatformValidator.getGlobalFilters().validate(
|
|
2182
2103
|
{
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
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
|
+
/**
|
|
2170
|
+
* @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object
|
|
2171
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2172
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2173
|
+
* @returns {Promise<OrderPlatformModel.LaneConfigResponse>} - Success response
|
|
2174
|
+
* @name getLaneConfig
|
|
2175
|
+
* @summary: Get lane configuration.
|
|
2176
|
+
* @description: Get lane config for the order and shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
|
|
2177
|
+
*/
|
|
2178
|
+
async getLaneConfig(
|
|
2179
|
+
{
|
|
2180
|
+
superLane,
|
|
2181
|
+
groupEntity,
|
|
2182
|
+
fromDate,
|
|
2183
|
+
toDate,
|
|
2184
|
+
startDate,
|
|
2185
|
+
endDate,
|
|
2186
|
+
dpIds,
|
|
2187
|
+
stores,
|
|
2188
|
+
salesChannels,
|
|
2189
|
+
paymentMode,
|
|
2190
|
+
bagStatus,
|
|
2191
|
+
searchType,
|
|
2192
|
+
searchValue,
|
|
2193
|
+
tags,
|
|
2194
|
+
timeToDispatch,
|
|
2195
|
+
paymentMethods,
|
|
2196
|
+
myOrders,
|
|
2197
|
+
showCrossCompanyData,
|
|
2198
|
+
orderType,
|
|
2199
|
+
requestHeaders,
|
|
2200
|
+
} = { requestHeaders: {} },
|
|
2201
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2202
|
+
) {
|
|
2203
|
+
const { error } = OrderPlatformValidator.getLaneConfig().validate(
|
|
2204
|
+
{
|
|
2205
|
+
superLane,
|
|
2206
|
+
groupEntity,
|
|
2207
|
+
fromDate,
|
|
2208
|
+
toDate,
|
|
2209
|
+
startDate,
|
|
2210
|
+
endDate,
|
|
2211
|
+
dpIds,
|
|
2212
|
+
stores,
|
|
2213
|
+
salesChannels,
|
|
2214
|
+
paymentMode,
|
|
2215
|
+
bagStatus,
|
|
2216
|
+
searchType,
|
|
2217
|
+
searchValue,
|
|
2218
|
+
tags,
|
|
2219
|
+
timeToDispatch,
|
|
2198
2220
|
paymentMethods,
|
|
2199
2221
|
myOrders,
|
|
2200
2222
|
showCrossCompanyData,
|
|
@@ -2264,7 +2286,7 @@ class Order {
|
|
|
2264
2286
|
const response = await PlatformAPIClient.execute(
|
|
2265
2287
|
this.config,
|
|
2266
2288
|
"get",
|
|
2267
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/lane-config
|
|
2289
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/lane-config`,
|
|
2268
2290
|
query_params,
|
|
2269
2291
|
undefined,
|
|
2270
2292
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2278,7 +2300,7 @@ class Order {
|
|
|
2278
2300
|
|
|
2279
2301
|
const {
|
|
2280
2302
|
error: res_error,
|
|
2281
|
-
} = OrderPlatformModel.
|
|
2303
|
+
} = OrderPlatformModel.LaneConfigResponse().validate(responseData, {
|
|
2282
2304
|
abortEarly: false,
|
|
2283
2305
|
allowUnknown: true,
|
|
2284
2306
|
});
|
|
@@ -2298,34 +2320,21 @@ class Order {
|
|
|
2298
2320
|
}
|
|
2299
2321
|
|
|
2300
2322
|
/**
|
|
2301
|
-
* @param {OrderPlatformValidator.
|
|
2323
|
+
* @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object
|
|
2302
2324
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2303
2325
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2304
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2305
|
-
* @name
|
|
2306
|
-
* @summary:
|
|
2307
|
-
* @description:
|
|
2326
|
+
* @returns {Promise<OrderPlatformModel.ManifestFiltersResponse>} - Success response
|
|
2327
|
+
* @name getManifestfilters
|
|
2328
|
+
* @summary: get Manifest Filters.
|
|
2329
|
+
* @description: get Manifest Filters. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestfilters/).
|
|
2308
2330
|
*/
|
|
2309
|
-
async
|
|
2310
|
-
{
|
|
2311
|
-
manifestId,
|
|
2312
|
-
dpIds,
|
|
2313
|
-
endDate,
|
|
2314
|
-
startDate,
|
|
2315
|
-
pageNo,
|
|
2316
|
-
pageSize,
|
|
2317
|
-
requestHeaders,
|
|
2318
|
-
} = { requestHeaders: {} },
|
|
2331
|
+
async getManifestfilters(
|
|
2332
|
+
{ view, requestHeaders } = { requestHeaders: {} },
|
|
2319
2333
|
{ responseHeaders } = { responseHeaders: false }
|
|
2320
2334
|
) {
|
|
2321
|
-
const { error } = OrderPlatformValidator.
|
|
2335
|
+
const { error } = OrderPlatformValidator.getManifestfilters().validate(
|
|
2322
2336
|
{
|
|
2323
|
-
|
|
2324
|
-
dpIds,
|
|
2325
|
-
endDate,
|
|
2326
|
-
startDate,
|
|
2327
|
-
pageNo,
|
|
2328
|
-
pageSize,
|
|
2337
|
+
view,
|
|
2329
2338
|
},
|
|
2330
2339
|
{ abortEarly: false, allowUnknown: true }
|
|
2331
2340
|
);
|
|
@@ -2336,38 +2345,114 @@ class Order {
|
|
|
2336
2345
|
// Showing warrnings if extra unknown parameters are found
|
|
2337
2346
|
const {
|
|
2338
2347
|
error: warrning,
|
|
2339
|
-
} = OrderPlatformValidator.
|
|
2348
|
+
} = OrderPlatformValidator.getManifestfilters().validate(
|
|
2340
2349
|
{
|
|
2341
|
-
|
|
2342
|
-
dpIds,
|
|
2343
|
-
endDate,
|
|
2344
|
-
startDate,
|
|
2345
|
-
pageNo,
|
|
2346
|
-
pageSize,
|
|
2350
|
+
view,
|
|
2347
2351
|
},
|
|
2348
2352
|
{ abortEarly: false, allowUnknown: false }
|
|
2349
2353
|
);
|
|
2350
2354
|
if (warrning) {
|
|
2351
2355
|
Logger({
|
|
2352
2356
|
level: "WARN",
|
|
2353
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
2357
|
+
message: `Parameter Validation warrnings for platform > Order > getManifestfilters \n ${warrning}`,
|
|
2354
2358
|
});
|
|
2355
2359
|
}
|
|
2356
2360
|
|
|
2357
2361
|
const query_params = {};
|
|
2358
|
-
query_params["
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2362
|
+
query_params["view"] = view;
|
|
2363
|
+
|
|
2364
|
+
const xHeaders = {};
|
|
2365
|
+
|
|
2366
|
+
const response = await PlatformAPIClient.execute(
|
|
2367
|
+
this.config,
|
|
2368
|
+
"get",
|
|
2369
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/filter/listing`,
|
|
2370
|
+
query_params,
|
|
2371
|
+
undefined,
|
|
2372
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2373
|
+
{ responseHeaders }
|
|
2374
|
+
);
|
|
2375
|
+
|
|
2376
|
+
let responseData = response;
|
|
2377
|
+
if (responseHeaders) {
|
|
2378
|
+
responseData = response[0];
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
const {
|
|
2382
|
+
error: res_error,
|
|
2383
|
+
} = OrderPlatformModel.ManifestFiltersResponse().validate(responseData, {
|
|
2384
|
+
abortEarly: false,
|
|
2385
|
+
allowUnknown: true,
|
|
2386
|
+
});
|
|
2387
|
+
|
|
2388
|
+
if (res_error) {
|
|
2389
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2390
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2391
|
+
} else {
|
|
2392
|
+
Logger({
|
|
2393
|
+
level: "WARN",
|
|
2394
|
+
message: `Response Validation Warnings for platform > Order > getManifestfilters \n ${res_error}`,
|
|
2395
|
+
});
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
return response;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
/**
|
|
2403
|
+
* @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object
|
|
2404
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2405
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2406
|
+
* @returns {Promise<OrderPlatformModel.OrderDetailsResponse>} - Success response
|
|
2407
|
+
* @name getOrderById
|
|
2408
|
+
* @summary: Get order by ID.
|
|
2409
|
+
* @description: Retrieve detailed information about a specific order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/).
|
|
2410
|
+
*/
|
|
2411
|
+
async getOrderById(
|
|
2412
|
+
{ orderId, myOrders, allowInactive, requestHeaders } = {
|
|
2413
|
+
requestHeaders: {},
|
|
2414
|
+
},
|
|
2415
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2416
|
+
) {
|
|
2417
|
+
const { error } = OrderPlatformValidator.getOrderById().validate(
|
|
2418
|
+
{
|
|
2419
|
+
orderId,
|
|
2420
|
+
myOrders,
|
|
2421
|
+
allowInactive,
|
|
2422
|
+
},
|
|
2423
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2424
|
+
);
|
|
2425
|
+
if (error) {
|
|
2426
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2430
|
+
const { error: warrning } = OrderPlatformValidator.getOrderById().validate(
|
|
2431
|
+
{
|
|
2432
|
+
orderId,
|
|
2433
|
+
myOrders,
|
|
2434
|
+
allowInactive,
|
|
2435
|
+
},
|
|
2436
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2437
|
+
);
|
|
2438
|
+
if (warrning) {
|
|
2439
|
+
Logger({
|
|
2440
|
+
level: "WARN",
|
|
2441
|
+
message: `Parameter Validation warrnings for platform > Order > getOrderById \n ${warrning}`,
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
const query_params = {};
|
|
2446
|
+
query_params["order_id"] = orderId;
|
|
2447
|
+
query_params["my_orders"] = myOrders;
|
|
2448
|
+
query_params["allow_inactive"] = allowInactive;
|
|
2364
2449
|
|
|
2365
2450
|
const xHeaders = {};
|
|
2366
2451
|
|
|
2367
2452
|
const response = await PlatformAPIClient.execute(
|
|
2368
2453
|
this.config,
|
|
2369
2454
|
"get",
|
|
2370
|
-
`/service/platform/order
|
|
2455
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/order-details`,
|
|
2371
2456
|
query_params,
|
|
2372
2457
|
undefined,
|
|
2373
2458
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2381,7 +2466,7 @@ class Order {
|
|
|
2381
2466
|
|
|
2382
2467
|
const {
|
|
2383
2468
|
error: res_error,
|
|
2384
|
-
} = OrderPlatformModel.
|
|
2469
|
+
} = OrderPlatformModel.OrderDetailsResponse().validate(responseData, {
|
|
2385
2470
|
abortEarly: false,
|
|
2386
2471
|
allowUnknown: true,
|
|
2387
2472
|
});
|
|
@@ -2392,7 +2477,7 @@ class Order {
|
|
|
2392
2477
|
} else {
|
|
2393
2478
|
Logger({
|
|
2394
2479
|
level: "WARN",
|
|
2395
|
-
message: `Response Validation Warnings for platform > Order >
|
|
2480
|
+
message: `Response Validation Warnings for platform > Order > getOrderById \n ${res_error}`,
|
|
2396
2481
|
});
|
|
2397
2482
|
}
|
|
2398
2483
|
}
|
|
@@ -2401,42 +2486,78 @@ class Order {
|
|
|
2401
2486
|
}
|
|
2402
2487
|
|
|
2403
2488
|
/**
|
|
2404
|
-
* @param {OrderPlatformValidator.
|
|
2489
|
+
* @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object
|
|
2405
2490
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2406
2491
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2407
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2408
|
-
* @name
|
|
2409
|
-
* @summary:
|
|
2410
|
-
* @description: Get
|
|
2492
|
+
* @returns {Promise<OrderPlatformModel.OrderListingResponse>} - Success response
|
|
2493
|
+
* @name getOrders
|
|
2494
|
+
* @summary: Get orders.
|
|
2495
|
+
* @description: Get Orders Listing - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/).
|
|
2411
2496
|
*/
|
|
2412
|
-
async
|
|
2497
|
+
async getOrders(
|
|
2413
2498
|
{
|
|
2499
|
+
lane,
|
|
2500
|
+
searchType,
|
|
2501
|
+
bagStatus,
|
|
2502
|
+
timeToDispatch,
|
|
2503
|
+
paymentMethods,
|
|
2504
|
+
tags,
|
|
2505
|
+
searchValue,
|
|
2506
|
+
fromDate,
|
|
2507
|
+
toDate,
|
|
2508
|
+
startDate,
|
|
2509
|
+
endDate,
|
|
2414
2510
|
dpIds,
|
|
2415
2511
|
stores,
|
|
2416
|
-
toDate,
|
|
2417
|
-
fromDate,
|
|
2418
|
-
dpName,
|
|
2419
2512
|
salesChannels,
|
|
2420
|
-
searchType,
|
|
2421
|
-
searchValue,
|
|
2422
2513
|
pageNo,
|
|
2423
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,
|
|
2424
2527
|
requestHeaders,
|
|
2425
2528
|
} = { requestHeaders: {} },
|
|
2426
2529
|
{ responseHeaders } = { responseHeaders: false }
|
|
2427
2530
|
) {
|
|
2428
|
-
const { error } = OrderPlatformValidator.
|
|
2531
|
+
const { error } = OrderPlatformValidator.getOrders().validate(
|
|
2429
2532
|
{
|
|
2533
|
+
lane,
|
|
2534
|
+
searchType,
|
|
2535
|
+
bagStatus,
|
|
2536
|
+
timeToDispatch,
|
|
2537
|
+
paymentMethods,
|
|
2538
|
+
tags,
|
|
2539
|
+
searchValue,
|
|
2540
|
+
fromDate,
|
|
2541
|
+
toDate,
|
|
2542
|
+
startDate,
|
|
2543
|
+
endDate,
|
|
2430
2544
|
dpIds,
|
|
2431
2545
|
stores,
|
|
2432
|
-
toDate,
|
|
2433
|
-
fromDate,
|
|
2434
|
-
dpName,
|
|
2435
2546
|
salesChannels,
|
|
2436
|
-
searchType,
|
|
2437
|
-
searchValue,
|
|
2438
2547
|
pageNo,
|
|
2439
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,
|
|
2440
2561
|
},
|
|
2441
2562
|
{ abortEarly: false, allowUnknown: true }
|
|
2442
2563
|
);
|
|
@@ -2445,48 +2566,82 @@ class Order {
|
|
|
2445
2566
|
}
|
|
2446
2567
|
|
|
2447
2568
|
// Showing warrnings if extra unknown parameters are found
|
|
2448
|
-
const {
|
|
2449
|
-
error: warrning,
|
|
2450
|
-
} = OrderPlatformValidator.getManifestShipments().validate(
|
|
2569
|
+
const { error: warrning } = OrderPlatformValidator.getOrders().validate(
|
|
2451
2570
|
{
|
|
2571
|
+
lane,
|
|
2572
|
+
searchType,
|
|
2573
|
+
bagStatus,
|
|
2574
|
+
timeToDispatch,
|
|
2575
|
+
paymentMethods,
|
|
2576
|
+
tags,
|
|
2577
|
+
searchValue,
|
|
2578
|
+
fromDate,
|
|
2579
|
+
toDate,
|
|
2580
|
+
startDate,
|
|
2581
|
+
endDate,
|
|
2452
2582
|
dpIds,
|
|
2453
2583
|
stores,
|
|
2454
|
-
toDate,
|
|
2455
|
-
fromDate,
|
|
2456
|
-
dpName,
|
|
2457
2584
|
salesChannels,
|
|
2458
|
-
searchType,
|
|
2459
|
-
searchValue,
|
|
2460
2585
|
pageNo,
|
|
2461
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,
|
|
2462
2599
|
},
|
|
2463
2600
|
{ abortEarly: false, allowUnknown: false }
|
|
2464
2601
|
);
|
|
2465
2602
|
if (warrning) {
|
|
2466
2603
|
Logger({
|
|
2467
2604
|
level: "WARN",
|
|
2468
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
2605
|
+
message: `Parameter Validation warrnings for platform > Order > getOrders \n ${warrning}`,
|
|
2469
2606
|
});
|
|
2470
2607
|
}
|
|
2471
2608
|
|
|
2472
2609
|
const query_params = {};
|
|
2610
|
+
query_params["lane"] = lane;
|
|
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;
|
|
2473
2621
|
query_params["dp_ids"] = dpIds;
|
|
2474
2622
|
query_params["stores"] = stores;
|
|
2475
|
-
query_params["to_date"] = toDate;
|
|
2476
|
-
query_params["from_date"] = fromDate;
|
|
2477
|
-
query_params["dp_name"] = dpName;
|
|
2478
2623
|
query_params["sales_channels"] = salesChannels;
|
|
2479
|
-
query_params["search_type"] = searchType;
|
|
2480
|
-
query_params["search_value"] = searchValue;
|
|
2481
2624
|
query_params["page_no"] = pageNo;
|
|
2482
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;
|
|
2483
2638
|
|
|
2484
2639
|
const xHeaders = {};
|
|
2485
2640
|
|
|
2486
2641
|
const response = await PlatformAPIClient.execute(
|
|
2487
2642
|
this.config,
|
|
2488
2643
|
"get",
|
|
2489
|
-
`/service/platform/order
|
|
2644
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/orders-listing`,
|
|
2490
2645
|
query_params,
|
|
2491
2646
|
undefined,
|
|
2492
2647
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2500,7 +2655,7 @@ class Order {
|
|
|
2500
2655
|
|
|
2501
2656
|
const {
|
|
2502
2657
|
error: res_error,
|
|
2503
|
-
} = OrderPlatformModel.
|
|
2658
|
+
} = OrderPlatformModel.OrderListingResponse().validate(responseData, {
|
|
2504
2659
|
abortEarly: false,
|
|
2505
2660
|
allowUnknown: true,
|
|
2506
2661
|
});
|
|
@@ -2511,7 +2666,7 @@ class Order {
|
|
|
2511
2666
|
} else {
|
|
2512
2667
|
Logger({
|
|
2513
2668
|
level: "WARN",
|
|
2514
|
-
message: `Response Validation Warnings for platform > Order >
|
|
2669
|
+
message: `Response Validation Warnings for platform > Order > getOrders \n ${res_error}`,
|
|
2515
2670
|
});
|
|
2516
2671
|
}
|
|
2517
2672
|
}
|
|
@@ -2520,22 +2675,150 @@ class Order {
|
|
|
2520
2675
|
}
|
|
2521
2676
|
|
|
2522
2677
|
/**
|
|
2523
|
-
* @param {
|
|
2678
|
+
* @param {Object} arg - Arg object.
|
|
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
|
|
2524
2806
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2525
2807
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2526
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2527
|
-
* Success response
|
|
2528
|
-
*
|
|
2529
|
-
* @
|
|
2530
|
-
* @
|
|
2808
|
+
* @returns {Promise<OrderPlatformModel.RefundStateConfigurationManualSchemaResponse>}
|
|
2809
|
+
* - Success response
|
|
2810
|
+
*
|
|
2811
|
+
* @name getRefundConfiguration
|
|
2812
|
+
* @summary: refund configuration.
|
|
2813
|
+
* @description: refund configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRefundConfiguration/).
|
|
2531
2814
|
*/
|
|
2532
|
-
async
|
|
2533
|
-
{
|
|
2815
|
+
async getRefundConfiguration(
|
|
2816
|
+
{ appId, requestHeaders } = { requestHeaders: {} },
|
|
2534
2817
|
{ responseHeaders } = { responseHeaders: false }
|
|
2535
2818
|
) {
|
|
2536
|
-
const { error } = OrderPlatformValidator.
|
|
2819
|
+
const { error } = OrderPlatformValidator.getRefundConfiguration().validate(
|
|
2537
2820
|
{
|
|
2538
|
-
|
|
2821
|
+
appId,
|
|
2539
2822
|
},
|
|
2540
2823
|
{ abortEarly: false, allowUnknown: true }
|
|
2541
2824
|
);
|
|
@@ -2546,28 +2829,28 @@ class Order {
|
|
|
2546
2829
|
// Showing warrnings if extra unknown parameters are found
|
|
2547
2830
|
const {
|
|
2548
2831
|
error: warrning,
|
|
2549
|
-
} = OrderPlatformValidator.
|
|
2832
|
+
} = OrderPlatformValidator.getRefundConfiguration().validate(
|
|
2550
2833
|
{
|
|
2551
|
-
|
|
2834
|
+
appId,
|
|
2552
2835
|
},
|
|
2553
2836
|
{ abortEarly: false, allowUnknown: false }
|
|
2554
2837
|
);
|
|
2555
2838
|
if (warrning) {
|
|
2556
2839
|
Logger({
|
|
2557
2840
|
level: "WARN",
|
|
2558
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
2841
|
+
message: `Parameter Validation warrnings for platform > Order > getRefundConfiguration \n ${warrning}`,
|
|
2559
2842
|
});
|
|
2560
2843
|
}
|
|
2561
2844
|
|
|
2562
2845
|
const query_params = {};
|
|
2563
|
-
query_params["
|
|
2846
|
+
query_params["app_id"] = appId;
|
|
2564
2847
|
|
|
2565
2848
|
const xHeaders = {};
|
|
2566
2849
|
|
|
2567
2850
|
const response = await PlatformAPIClient.execute(
|
|
2568
2851
|
this.config,
|
|
2569
2852
|
"get",
|
|
2570
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
2853
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund/config`,
|
|
2571
2854
|
query_params,
|
|
2572
2855
|
undefined,
|
|
2573
2856
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2581,7 +2864,7 @@ class Order {
|
|
|
2581
2864
|
|
|
2582
2865
|
const {
|
|
2583
2866
|
error: res_error,
|
|
2584
|
-
} = OrderPlatformModel.
|
|
2867
|
+
} = OrderPlatformModel.RefundStateConfigurationManualSchemaResponse().validate(
|
|
2585
2868
|
responseData,
|
|
2586
2869
|
{ abortEarly: false, allowUnknown: true }
|
|
2587
2870
|
);
|
|
@@ -2592,7 +2875,7 @@ class Order {
|
|
|
2592
2875
|
} else {
|
|
2593
2876
|
Logger({
|
|
2594
2877
|
level: "WARN",
|
|
2595
|
-
message: `Response Validation Warnings for platform > Order >
|
|
2878
|
+
message: `Response Validation Warnings for platform > Order > getRefundConfiguration \n ${res_error}`,
|
|
2596
2879
|
});
|
|
2597
2880
|
}
|
|
2598
2881
|
}
|
|
@@ -2601,41 +2884,22 @@ class Order {
|
|
|
2601
2884
|
}
|
|
2602
2885
|
|
|
2603
2886
|
/**
|
|
2604
|
-
* @param {OrderPlatformValidator.
|
|
2887
|
+
* @param {OrderPlatformValidator.GetRefundEnableStateListParam} arg - Arg object
|
|
2605
2888
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2606
2889
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2607
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2608
|
-
* @name
|
|
2609
|
-
* @summary:
|
|
2610
|
-
* @description:
|
|
2890
|
+
* @returns {Promise<OrderPlatformModel.GetRefundStates>} - Success response
|
|
2891
|
+
* @name getRefundEnableStateList
|
|
2892
|
+
* @summary: Refund State Configuration
|
|
2893
|
+
* @description: refund configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRefundEnableStateList/).
|
|
2611
2894
|
*/
|
|
2612
|
-
async
|
|
2613
|
-
{
|
|
2614
|
-
status,
|
|
2615
|
-
startDate,
|
|
2616
|
-
endDate,
|
|
2617
|
-
searchType,
|
|
2618
|
-
storeId,
|
|
2619
|
-
searchValue,
|
|
2620
|
-
dpIds,
|
|
2621
|
-
pageNo,
|
|
2622
|
-
pageSize,
|
|
2623
|
-
requestHeaders,
|
|
2624
|
-
} = { requestHeaders: {} },
|
|
2895
|
+
async getRefundEnableStateList(
|
|
2896
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
2625
2897
|
{ responseHeaders } = { responseHeaders: false }
|
|
2626
2898
|
) {
|
|
2627
|
-
const {
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
endDate,
|
|
2632
|
-
searchType,
|
|
2633
|
-
storeId,
|
|
2634
|
-
searchValue,
|
|
2635
|
-
dpIds,
|
|
2636
|
-
pageNo,
|
|
2637
|
-
pageSize,
|
|
2638
|
-
},
|
|
2899
|
+
const {
|
|
2900
|
+
error,
|
|
2901
|
+
} = OrderPlatformValidator.getRefundEnableStateList().validate(
|
|
2902
|
+
{},
|
|
2639
2903
|
{ abortEarly: false, allowUnknown: true }
|
|
2640
2904
|
);
|
|
2641
2905
|
if (error) {
|
|
@@ -2643,44 +2907,27 @@ class Order {
|
|
|
2643
2907
|
}
|
|
2644
2908
|
|
|
2645
2909
|
// Showing warrnings if extra unknown parameters are found
|
|
2646
|
-
const {
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
endDate,
|
|
2651
|
-
searchType,
|
|
2652
|
-
storeId,
|
|
2653
|
-
searchValue,
|
|
2654
|
-
dpIds,
|
|
2655
|
-
pageNo,
|
|
2656
|
-
pageSize,
|
|
2657
|
-
},
|
|
2910
|
+
const {
|
|
2911
|
+
error: warrning,
|
|
2912
|
+
} = OrderPlatformValidator.getRefundEnableStateList().validate(
|
|
2913
|
+
{},
|
|
2658
2914
|
{ abortEarly: false, allowUnknown: false }
|
|
2659
2915
|
);
|
|
2660
2916
|
if (warrning) {
|
|
2661
2917
|
Logger({
|
|
2662
2918
|
level: "WARN",
|
|
2663
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
2919
|
+
message: `Parameter Validation warrnings for platform > Order > getRefundEnableStateList \n ${warrning}`,
|
|
2664
2920
|
});
|
|
2665
2921
|
}
|
|
2666
2922
|
|
|
2667
2923
|
const query_params = {};
|
|
2668
|
-
query_params["status"] = status;
|
|
2669
|
-
query_params["start_date"] = startDate;
|
|
2670
|
-
query_params["end_date"] = endDate;
|
|
2671
|
-
query_params["search_type"] = searchType;
|
|
2672
|
-
query_params["store_id"] = storeId;
|
|
2673
|
-
query_params["search_value"] = searchValue;
|
|
2674
|
-
query_params["dp_ids"] = dpIds;
|
|
2675
|
-
query_params["page_no"] = pageNo;
|
|
2676
|
-
query_params["page_size"] = pageSize;
|
|
2677
2924
|
|
|
2678
2925
|
const xHeaders = {};
|
|
2679
2926
|
|
|
2680
2927
|
const response = await PlatformAPIClient.execute(
|
|
2681
2928
|
this.config,
|
|
2682
2929
|
"get",
|
|
2683
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
2930
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund/states`,
|
|
2684
2931
|
query_params,
|
|
2685
2932
|
undefined,
|
|
2686
2933
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2694,7 +2941,7 @@ class Order {
|
|
|
2694
2941
|
|
|
2695
2942
|
const {
|
|
2696
2943
|
error: res_error,
|
|
2697
|
-
} = OrderPlatformModel.
|
|
2944
|
+
} = OrderPlatformModel.GetRefundStates().validate(responseData, {
|
|
2698
2945
|
abortEarly: false,
|
|
2699
2946
|
allowUnknown: true,
|
|
2700
2947
|
});
|
|
@@ -2705,7 +2952,7 @@ class Order {
|
|
|
2705
2952
|
} else {
|
|
2706
2953
|
Logger({
|
|
2707
2954
|
level: "WARN",
|
|
2708
|
-
message: `Response Validation Warnings for platform > Order >
|
|
2955
|
+
message: `Response Validation Warnings for platform > Order > getRefundEnableStateList \n ${res_error}`,
|
|
2709
2956
|
});
|
|
2710
2957
|
}
|
|
2711
2958
|
}
|
|
@@ -2714,26 +2961,36 @@ class Order {
|
|
|
2714
2961
|
}
|
|
2715
2962
|
|
|
2716
2963
|
/**
|
|
2717
|
-
* @param {OrderPlatformValidator.
|
|
2964
|
+
* @param {OrderPlatformValidator.GetRefundOptionsParam} arg - Arg object
|
|
2718
2965
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2719
2966
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2720
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2967
|
+
* @returns {Promise<OrderPlatformModel.RefundOptionsSchemaResponse>} -
|
|
2721
2968
|
* Success response
|
|
2722
|
-
* @name
|
|
2723
|
-
* @summary:
|
|
2724
|
-
* @description:
|
|
2969
|
+
* @name getRefundOptions
|
|
2970
|
+
* @summary: Retrieve refund options with amount breakup for specific shipment and bags.
|
|
2971
|
+
* @description: This API can be used for giving the refund amount with available option of MOPs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRefundOptions/).
|
|
2725
2972
|
*/
|
|
2726
|
-
async
|
|
2727
|
-
{
|
|
2728
|
-
|
|
2729
|
-
|
|
2973
|
+
async getRefundOptions(
|
|
2974
|
+
{
|
|
2975
|
+
shipmentId,
|
|
2976
|
+
bagIds,
|
|
2977
|
+
state,
|
|
2978
|
+
optinAppId,
|
|
2979
|
+
optinCompanyId,
|
|
2980
|
+
status,
|
|
2981
|
+
requestHeaders,
|
|
2982
|
+
} = { requestHeaders: {} },
|
|
2730
2983
|
{ responseHeaders } = { responseHeaders: false }
|
|
2731
2984
|
) {
|
|
2732
|
-
const { error } = OrderPlatformValidator.
|
|
2985
|
+
const { error } = OrderPlatformValidator.getRefundOptions().validate(
|
|
2733
2986
|
{
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2987
|
+
shipmentId,
|
|
2988
|
+
|
|
2989
|
+
bagIds,
|
|
2990
|
+
state,
|
|
2991
|
+
optinAppId,
|
|
2992
|
+
optinCompanyId,
|
|
2993
|
+
status,
|
|
2737
2994
|
},
|
|
2738
2995
|
{ abortEarly: false, allowUnknown: true }
|
|
2739
2996
|
);
|
|
@@ -2742,32 +2999,40 @@ class Order {
|
|
|
2742
2999
|
}
|
|
2743
3000
|
|
|
2744
3001
|
// Showing warrnings if extra unknown parameters are found
|
|
2745
|
-
const {
|
|
3002
|
+
const {
|
|
3003
|
+
error: warrning,
|
|
3004
|
+
} = OrderPlatformValidator.getRefundOptions().validate(
|
|
2746
3005
|
{
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
3006
|
+
shipmentId,
|
|
3007
|
+
|
|
3008
|
+
bagIds,
|
|
3009
|
+
state,
|
|
3010
|
+
optinAppId,
|
|
3011
|
+
optinCompanyId,
|
|
3012
|
+
status,
|
|
2750
3013
|
},
|
|
2751
3014
|
{ abortEarly: false, allowUnknown: false }
|
|
2752
3015
|
);
|
|
2753
3016
|
if (warrning) {
|
|
2754
3017
|
Logger({
|
|
2755
3018
|
level: "WARN",
|
|
2756
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
3019
|
+
message: `Parameter Validation warrnings for platform > Order > getRefundOptions \n ${warrning}`,
|
|
2757
3020
|
});
|
|
2758
3021
|
}
|
|
2759
3022
|
|
|
2760
3023
|
const query_params = {};
|
|
2761
|
-
query_params["
|
|
2762
|
-
query_params["
|
|
2763
|
-
query_params["
|
|
3024
|
+
query_params["bag_ids"] = bagIds;
|
|
3025
|
+
query_params["state"] = state;
|
|
3026
|
+
query_params["optin_app_id"] = optinAppId;
|
|
3027
|
+
query_params["optin_company_id"] = optinCompanyId;
|
|
3028
|
+
query_params["status"] = status;
|
|
2764
3029
|
|
|
2765
3030
|
const xHeaders = {};
|
|
2766
3031
|
|
|
2767
3032
|
const response = await PlatformAPIClient.execute(
|
|
2768
3033
|
this.config,
|
|
2769
3034
|
"get",
|
|
2770
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/
|
|
3035
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/refund-options`,
|
|
2771
3036
|
query_params,
|
|
2772
3037
|
undefined,
|
|
2773
3038
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2781,10 +3046,10 @@ class Order {
|
|
|
2781
3046
|
|
|
2782
3047
|
const {
|
|
2783
3048
|
error: res_error,
|
|
2784
|
-
} = OrderPlatformModel.
|
|
2785
|
-
|
|
2786
|
-
allowUnknown: true
|
|
2787
|
-
|
|
3049
|
+
} = OrderPlatformModel.RefundOptionsSchemaResponse().validate(
|
|
3050
|
+
responseData,
|
|
3051
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3052
|
+
);
|
|
2788
3053
|
|
|
2789
3054
|
if (res_error) {
|
|
2790
3055
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2792,7 +3057,7 @@ class Order {
|
|
|
2792
3057
|
} else {
|
|
2793
3058
|
Logger({
|
|
2794
3059
|
level: "WARN",
|
|
2795
|
-
message: `Response Validation Warnings for platform > Order >
|
|
3060
|
+
message: `Response Validation Warnings for platform > Order > getRefundOptions \n ${res_error}`,
|
|
2796
3061
|
});
|
|
2797
3062
|
}
|
|
2798
3063
|
}
|
|
@@ -2801,75 +3066,25 @@ class Order {
|
|
|
2801
3066
|
}
|
|
2802
3067
|
|
|
2803
3068
|
/**
|
|
2804
|
-
* @param {OrderPlatformValidator.
|
|
3069
|
+
* @param {OrderPlatformValidator.GetRefundStateConfigurationParam} arg - Arg object
|
|
2805
3070
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2806
3071
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2807
|
-
* @returns {Promise<OrderPlatformModel.
|
|
2808
|
-
* Success response
|
|
2809
|
-
*
|
|
2810
|
-
* @
|
|
2811
|
-
* @
|
|
3072
|
+
* @returns {Promise<OrderPlatformModel.GetRefundStateConfigurationResponse>}
|
|
3073
|
+
* - Success response
|
|
3074
|
+
*
|
|
3075
|
+
* @name getRefundStateConfiguration
|
|
3076
|
+
* @summary: Refund State Configuration
|
|
3077
|
+
* @description: Refund State Configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRefundStateConfiguration/).
|
|
2812
3078
|
*/
|
|
2813
|
-
async
|
|
2814
|
-
{
|
|
2815
|
-
lane,
|
|
2816
|
-
searchType,
|
|
2817
|
-
bagStatus,
|
|
2818
|
-
timeToDispatch,
|
|
2819
|
-
paymentMethods,
|
|
2820
|
-
tags,
|
|
2821
|
-
searchValue,
|
|
2822
|
-
fromDate,
|
|
2823
|
-
toDate,
|
|
2824
|
-
startDate,
|
|
2825
|
-
endDate,
|
|
2826
|
-
dpIds,
|
|
2827
|
-
stores,
|
|
2828
|
-
salesChannels,
|
|
2829
|
-
pageNo,
|
|
2830
|
-
pageSize,
|
|
2831
|
-
isPrioritySort,
|
|
2832
|
-
customMeta,
|
|
2833
|
-
myOrders,
|
|
2834
|
-
showCrossCompanyData,
|
|
2835
|
-
customerId,
|
|
2836
|
-
orderType,
|
|
2837
|
-
allowInactive,
|
|
2838
|
-
groupEntity,
|
|
2839
|
-
enforceDateFilter,
|
|
2840
|
-
fulfillmentType,
|
|
2841
|
-
requestHeaders,
|
|
2842
|
-
} = { requestHeaders: {} },
|
|
3079
|
+
async getRefundStateConfiguration(
|
|
3080
|
+
{ appId, requestHeaders } = { requestHeaders: {} },
|
|
2843
3081
|
{ responseHeaders } = { responseHeaders: false }
|
|
2844
3082
|
) {
|
|
2845
|
-
const {
|
|
3083
|
+
const {
|
|
3084
|
+
error,
|
|
3085
|
+
} = OrderPlatformValidator.getRefundStateConfiguration().validate(
|
|
2846
3086
|
{
|
|
2847
|
-
|
|
2848
|
-
searchType,
|
|
2849
|
-
bagStatus,
|
|
2850
|
-
timeToDispatch,
|
|
2851
|
-
paymentMethods,
|
|
2852
|
-
tags,
|
|
2853
|
-
searchValue,
|
|
2854
|
-
fromDate,
|
|
2855
|
-
toDate,
|
|
2856
|
-
startDate,
|
|
2857
|
-
endDate,
|
|
2858
|
-
dpIds,
|
|
2859
|
-
stores,
|
|
2860
|
-
salesChannels,
|
|
2861
|
-
pageNo,
|
|
2862
|
-
pageSize,
|
|
2863
|
-
isPrioritySort,
|
|
2864
|
-
customMeta,
|
|
2865
|
-
myOrders,
|
|
2866
|
-
showCrossCompanyData,
|
|
2867
|
-
customerId,
|
|
2868
|
-
orderType,
|
|
2869
|
-
allowInactive,
|
|
2870
|
-
groupEntity,
|
|
2871
|
-
enforceDateFilter,
|
|
2872
|
-
fulfillmentType,
|
|
3087
|
+
appId,
|
|
2873
3088
|
},
|
|
2874
3089
|
{ abortEarly: false, allowUnknown: true }
|
|
2875
3090
|
);
|
|
@@ -2878,78 +3093,30 @@ class Order {
|
|
|
2878
3093
|
}
|
|
2879
3094
|
|
|
2880
3095
|
// Showing warrnings if extra unknown parameters are found
|
|
2881
|
-
const {
|
|
3096
|
+
const {
|
|
3097
|
+
error: warrning,
|
|
3098
|
+
} = OrderPlatformValidator.getRefundStateConfiguration().validate(
|
|
2882
3099
|
{
|
|
2883
|
-
|
|
2884
|
-
searchType,
|
|
2885
|
-
bagStatus,
|
|
2886
|
-
timeToDispatch,
|
|
2887
|
-
paymentMethods,
|
|
2888
|
-
tags,
|
|
2889
|
-
searchValue,
|
|
2890
|
-
fromDate,
|
|
2891
|
-
toDate,
|
|
2892
|
-
startDate,
|
|
2893
|
-
endDate,
|
|
2894
|
-
dpIds,
|
|
2895
|
-
stores,
|
|
2896
|
-
salesChannels,
|
|
2897
|
-
pageNo,
|
|
2898
|
-
pageSize,
|
|
2899
|
-
isPrioritySort,
|
|
2900
|
-
customMeta,
|
|
2901
|
-
myOrders,
|
|
2902
|
-
showCrossCompanyData,
|
|
2903
|
-
customerId,
|
|
2904
|
-
orderType,
|
|
2905
|
-
allowInactive,
|
|
2906
|
-
groupEntity,
|
|
2907
|
-
enforceDateFilter,
|
|
2908
|
-
fulfillmentType,
|
|
3100
|
+
appId,
|
|
2909
3101
|
},
|
|
2910
3102
|
{ abortEarly: false, allowUnknown: false }
|
|
2911
3103
|
);
|
|
2912
3104
|
if (warrning) {
|
|
2913
3105
|
Logger({
|
|
2914
3106
|
level: "WARN",
|
|
2915
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
3107
|
+
message: `Parameter Validation warrnings for platform > Order > getRefundStateConfiguration \n ${warrning}`,
|
|
2916
3108
|
});
|
|
2917
3109
|
}
|
|
2918
3110
|
|
|
2919
3111
|
const query_params = {};
|
|
2920
|
-
query_params["
|
|
2921
|
-
query_params["search_type"] = searchType;
|
|
2922
|
-
query_params["bag_status"] = bagStatus;
|
|
2923
|
-
query_params["time_to_dispatch"] = timeToDispatch;
|
|
2924
|
-
query_params["payment_methods"] = paymentMethods;
|
|
2925
|
-
query_params["tags"] = tags;
|
|
2926
|
-
query_params["search_value"] = searchValue;
|
|
2927
|
-
query_params["from_date"] = fromDate;
|
|
2928
|
-
query_params["to_date"] = toDate;
|
|
2929
|
-
query_params["start_date"] = startDate;
|
|
2930
|
-
query_params["end_date"] = endDate;
|
|
2931
|
-
query_params["dp_ids"] = dpIds;
|
|
2932
|
-
query_params["stores"] = stores;
|
|
2933
|
-
query_params["sales_channels"] = salesChannels;
|
|
2934
|
-
query_params["page_no"] = pageNo;
|
|
2935
|
-
query_params["page_size"] = pageSize;
|
|
2936
|
-
query_params["is_priority_sort"] = isPrioritySort;
|
|
2937
|
-
query_params["custom_meta"] = customMeta;
|
|
2938
|
-
query_params["my_orders"] = myOrders;
|
|
2939
|
-
query_params["show_cross_company_data"] = showCrossCompanyData;
|
|
2940
|
-
query_params["customer_id"] = customerId;
|
|
2941
|
-
query_params["order_type"] = orderType;
|
|
2942
|
-
query_params["allow_inactive"] = allowInactive;
|
|
2943
|
-
query_params["group_entity"] = groupEntity;
|
|
2944
|
-
query_params["enforce_date_filter"] = enforceDateFilter;
|
|
2945
|
-
query_params["fulfillment_type"] = fulfillmentType;
|
|
3112
|
+
query_params["app_id"] = appId;
|
|
2946
3113
|
|
|
2947
3114
|
const xHeaders = {};
|
|
2948
3115
|
|
|
2949
3116
|
const response = await PlatformAPIClient.execute(
|
|
2950
3117
|
this.config,
|
|
2951
3118
|
"get",
|
|
2952
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/
|
|
3119
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund/states/config`,
|
|
2953
3120
|
query_params,
|
|
2954
3121
|
undefined,
|
|
2955
3122
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2963,10 +3130,10 @@ class Order {
|
|
|
2963
3130
|
|
|
2964
3131
|
const {
|
|
2965
3132
|
error: res_error,
|
|
2966
|
-
} = OrderPlatformModel.
|
|
2967
|
-
|
|
2968
|
-
allowUnknown: true
|
|
2969
|
-
|
|
3133
|
+
} = OrderPlatformModel.GetRefundStateConfigurationResponse().validate(
|
|
3134
|
+
responseData,
|
|
3135
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3136
|
+
);
|
|
2970
3137
|
|
|
2971
3138
|
if (res_error) {
|
|
2972
3139
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2974,7 +3141,7 @@ class Order {
|
|
|
2974
3141
|
} else {
|
|
2975
3142
|
Logger({
|
|
2976
3143
|
level: "WARN",
|
|
2977
|
-
message: `Response Validation Warnings for platform > Order >
|
|
3144
|
+
message: `Response Validation Warnings for platform > Order > getRefundStateConfiguration \n ${res_error}`,
|
|
2978
3145
|
});
|
|
2979
3146
|
}
|
|
2980
3147
|
}
|
|
@@ -2986,10 +3153,10 @@ class Order {
|
|
|
2986
3153
|
* @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object
|
|
2987
3154
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2988
3155
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2989
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3156
|
+
* @returns {Promise<OrderPlatformModel.GetActionsResponse>} - Success response
|
|
2990
3157
|
* @name getRoleBasedActions
|
|
2991
|
-
* @summary: Get role-based actions
|
|
2992
|
-
* @description: Retrieve
|
|
3158
|
+
* @summary: Get role-based actions.
|
|
3159
|
+
* @description: Retrieve role based actions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRoleBasedActions/).
|
|
2993
3160
|
*/
|
|
2994
3161
|
async getRoleBasedActions(
|
|
2995
3162
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -3038,7 +3205,7 @@ class Order {
|
|
|
3038
3205
|
|
|
3039
3206
|
const {
|
|
3040
3207
|
error: res_error,
|
|
3041
|
-
} = OrderPlatformModel.
|
|
3208
|
+
} = OrderPlatformModel.GetActionsResponse().validate(responseData, {
|
|
3042
3209
|
abortEarly: false,
|
|
3043
3210
|
allowUnknown: true,
|
|
3044
3211
|
});
|
|
@@ -3061,20 +3228,15 @@ class Order {
|
|
|
3061
3228
|
* @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object
|
|
3062
3229
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3063
3230
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3064
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3065
|
-
* Success response
|
|
3231
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInfoResponse>} - Success response
|
|
3066
3232
|
* @name getShipmentById
|
|
3067
|
-
* @summary: Get shipment
|
|
3068
|
-
* @description:
|
|
3233
|
+
* @summary: Get shipment by ID.
|
|
3234
|
+
* @description: Retrieve detailed information about a specific shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
|
|
3069
3235
|
*/
|
|
3070
3236
|
async getShipmentById(
|
|
3071
|
-
{
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
fetchActiveShipment,
|
|
3075
|
-
allowInactive,
|
|
3076
|
-
requestHeaders,
|
|
3077
|
-
} = { requestHeaders: {} },
|
|
3237
|
+
{ channelShipmentId, shipmentId, fetchActiveShipment, requestHeaders } = {
|
|
3238
|
+
requestHeaders: {},
|
|
3239
|
+
},
|
|
3078
3240
|
{ responseHeaders } = { responseHeaders: false }
|
|
3079
3241
|
) {
|
|
3080
3242
|
const { error } = OrderPlatformValidator.getShipmentById().validate(
|
|
@@ -3082,7 +3244,6 @@ class Order {
|
|
|
3082
3244
|
channelShipmentId,
|
|
3083
3245
|
shipmentId,
|
|
3084
3246
|
fetchActiveShipment,
|
|
3085
|
-
allowInactive,
|
|
3086
3247
|
},
|
|
3087
3248
|
{ abortEarly: false, allowUnknown: true }
|
|
3088
3249
|
);
|
|
@@ -3098,7 +3259,6 @@ class Order {
|
|
|
3098
3259
|
channelShipmentId,
|
|
3099
3260
|
shipmentId,
|
|
3100
3261
|
fetchActiveShipment,
|
|
3101
|
-
allowInactive,
|
|
3102
3262
|
},
|
|
3103
3263
|
{ abortEarly: false, allowUnknown: false }
|
|
3104
3264
|
);
|
|
@@ -3113,7 +3273,6 @@ class Order {
|
|
|
3113
3273
|
query_params["channel_shipment_id"] = channelShipmentId;
|
|
3114
3274
|
query_params["shipment_id"] = shipmentId;
|
|
3115
3275
|
query_params["fetch_active_shipment"] = fetchActiveShipment;
|
|
3116
|
-
query_params["allow_inactive"] = allowInactive;
|
|
3117
3276
|
|
|
3118
3277
|
const xHeaders = {};
|
|
3119
3278
|
|
|
@@ -3134,7 +3293,7 @@ class Order {
|
|
|
3134
3293
|
|
|
3135
3294
|
const {
|
|
3136
3295
|
error: res_error,
|
|
3137
|
-
} = OrderPlatformModel.
|
|
3296
|
+
} = OrderPlatformModel.ShipmentInfoResponse().validate(responseData, {
|
|
3138
3297
|
abortEarly: false,
|
|
3139
3298
|
allowUnknown: true,
|
|
3140
3299
|
});
|
|
@@ -3157,11 +3316,10 @@ class Order {
|
|
|
3157
3316
|
* @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object
|
|
3158
3317
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3159
3318
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3160
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3161
|
-
* Success response
|
|
3319
|
+
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponse>} - Success response
|
|
3162
3320
|
* @name getShipmentHistory
|
|
3163
|
-
* @summary: Get
|
|
3164
|
-
* @description:
|
|
3321
|
+
* @summary: Get shipment history.
|
|
3322
|
+
* @description: Retrieve the shipment history. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/).
|
|
3165
3323
|
*/
|
|
3166
3324
|
async getShipmentHistory(
|
|
3167
3325
|
{ shipmentId, bagId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3218,10 +3376,10 @@ class Order {
|
|
|
3218
3376
|
|
|
3219
3377
|
const {
|
|
3220
3378
|
error: res_error,
|
|
3221
|
-
} = OrderPlatformModel.
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
);
|
|
3379
|
+
} = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, {
|
|
3380
|
+
abortEarly: false,
|
|
3381
|
+
allowUnknown: true,
|
|
3382
|
+
});
|
|
3225
3383
|
|
|
3226
3384
|
if (res_error) {
|
|
3227
3385
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3241,12 +3399,11 @@ class Order {
|
|
|
3241
3399
|
* @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object
|
|
3242
3400
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3243
3401
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3244
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3245
|
-
*
|
|
3246
|
-
*
|
|
3402
|
+
* @returns {Promise<OrderPlatformModel.PlatformShipmentReasonsResponse>} -
|
|
3403
|
+
* Success response
|
|
3247
3404
|
* @name getShipmentReasons
|
|
3248
|
-
* @summary:
|
|
3249
|
-
* @description:
|
|
3405
|
+
* @summary: Get reasons behind full or partial cancellation of a shipment
|
|
3406
|
+
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentReasons/).
|
|
3250
3407
|
*/
|
|
3251
3408
|
async getShipmentReasons(
|
|
3252
3409
|
{ shipmentId, bagId, state, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3303,7 +3460,7 @@ class Order {
|
|
|
3303
3460
|
|
|
3304
3461
|
const {
|
|
3305
3462
|
error: res_error,
|
|
3306
|
-
} = OrderPlatformModel.
|
|
3463
|
+
} = OrderPlatformModel.PlatformShipmentReasonsResponse().validate(
|
|
3307
3464
|
responseData,
|
|
3308
3465
|
{ abortEarly: false, allowUnknown: true }
|
|
3309
3466
|
);
|
|
@@ -3326,18 +3483,17 @@ class Order {
|
|
|
3326
3483
|
* @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object
|
|
3327
3484
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3328
3485
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3329
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3486
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponse>}
|
|
3330
3487
|
* - Success response
|
|
3331
3488
|
*
|
|
3332
3489
|
* @name getShipments
|
|
3333
|
-
* @summary:
|
|
3334
|
-
* @description: Get
|
|
3490
|
+
* @summary: Get shipments.
|
|
3491
|
+
* @description: Get Shipments Listing for the company id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipments/).
|
|
3335
3492
|
*/
|
|
3336
3493
|
async getShipments(
|
|
3337
3494
|
{
|
|
3338
3495
|
lane,
|
|
3339
3496
|
bagStatus,
|
|
3340
|
-
statusAssigned,
|
|
3341
3497
|
statusOverrideLane,
|
|
3342
3498
|
timeToDispatch,
|
|
3343
3499
|
searchType,
|
|
@@ -3346,8 +3502,6 @@ class Order {
|
|
|
3346
3502
|
toDate,
|
|
3347
3503
|
startDate,
|
|
3348
3504
|
endDate,
|
|
3349
|
-
statusAssignedStartDate,
|
|
3350
|
-
statusAssignedEndDate,
|
|
3351
3505
|
dpIds,
|
|
3352
3506
|
stores,
|
|
3353
3507
|
salesChannels,
|
|
@@ -3369,9 +3523,13 @@ class Order {
|
|
|
3369
3523
|
tags,
|
|
3370
3524
|
customerId,
|
|
3371
3525
|
orderType,
|
|
3526
|
+
operationalStatus,
|
|
3527
|
+
financialStatus,
|
|
3528
|
+
logisticsStatus,
|
|
3529
|
+
parentViewSlug,
|
|
3530
|
+
childViewSlug,
|
|
3531
|
+
lockStatus,
|
|
3372
3532
|
groupEntity,
|
|
3373
|
-
enforceDateFilter,
|
|
3374
|
-
fulfillmentType,
|
|
3375
3533
|
requestHeaders,
|
|
3376
3534
|
} = { requestHeaders: {} },
|
|
3377
3535
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -3380,7 +3538,6 @@ class Order {
|
|
|
3380
3538
|
{
|
|
3381
3539
|
lane,
|
|
3382
3540
|
bagStatus,
|
|
3383
|
-
statusAssigned,
|
|
3384
3541
|
statusOverrideLane,
|
|
3385
3542
|
timeToDispatch,
|
|
3386
3543
|
searchType,
|
|
@@ -3389,8 +3546,6 @@ class Order {
|
|
|
3389
3546
|
toDate,
|
|
3390
3547
|
startDate,
|
|
3391
3548
|
endDate,
|
|
3392
|
-
statusAssignedStartDate,
|
|
3393
|
-
statusAssignedEndDate,
|
|
3394
3549
|
dpIds,
|
|
3395
3550
|
stores,
|
|
3396
3551
|
salesChannels,
|
|
@@ -3412,9 +3567,13 @@ class Order {
|
|
|
3412
3567
|
tags,
|
|
3413
3568
|
customerId,
|
|
3414
3569
|
orderType,
|
|
3570
|
+
operationalStatus,
|
|
3571
|
+
financialStatus,
|
|
3572
|
+
logisticsStatus,
|
|
3573
|
+
parentViewSlug,
|
|
3574
|
+
childViewSlug,
|
|
3575
|
+
lockStatus,
|
|
3415
3576
|
groupEntity,
|
|
3416
|
-
enforceDateFilter,
|
|
3417
|
-
fulfillmentType,
|
|
3418
3577
|
},
|
|
3419
3578
|
{ abortEarly: false, allowUnknown: true }
|
|
3420
3579
|
);
|
|
@@ -3427,7 +3586,6 @@ class Order {
|
|
|
3427
3586
|
{
|
|
3428
3587
|
lane,
|
|
3429
3588
|
bagStatus,
|
|
3430
|
-
statusAssigned,
|
|
3431
3589
|
statusOverrideLane,
|
|
3432
3590
|
timeToDispatch,
|
|
3433
3591
|
searchType,
|
|
@@ -3436,8 +3594,6 @@ class Order {
|
|
|
3436
3594
|
toDate,
|
|
3437
3595
|
startDate,
|
|
3438
3596
|
endDate,
|
|
3439
|
-
statusAssignedStartDate,
|
|
3440
|
-
statusAssignedEndDate,
|
|
3441
3597
|
dpIds,
|
|
3442
3598
|
stores,
|
|
3443
3599
|
salesChannels,
|
|
@@ -3459,9 +3615,13 @@ class Order {
|
|
|
3459
3615
|
tags,
|
|
3460
3616
|
customerId,
|
|
3461
3617
|
orderType,
|
|
3618
|
+
operationalStatus,
|
|
3619
|
+
financialStatus,
|
|
3620
|
+
logisticsStatus,
|
|
3621
|
+
parentViewSlug,
|
|
3622
|
+
childViewSlug,
|
|
3623
|
+
lockStatus,
|
|
3462
3624
|
groupEntity,
|
|
3463
|
-
enforceDateFilter,
|
|
3464
|
-
fulfillmentType,
|
|
3465
3625
|
},
|
|
3466
3626
|
{ abortEarly: false, allowUnknown: false }
|
|
3467
3627
|
);
|
|
@@ -3475,7 +3635,6 @@ class Order {
|
|
|
3475
3635
|
const query_params = {};
|
|
3476
3636
|
query_params["lane"] = lane;
|
|
3477
3637
|
query_params["bag_status"] = bagStatus;
|
|
3478
|
-
query_params["status_assigned"] = statusAssigned;
|
|
3479
3638
|
query_params["status_override_lane"] = statusOverrideLane;
|
|
3480
3639
|
query_params["time_to_dispatch"] = timeToDispatch;
|
|
3481
3640
|
query_params["search_type"] = searchType;
|
|
@@ -3484,8 +3643,6 @@ class Order {
|
|
|
3484
3643
|
query_params["to_date"] = toDate;
|
|
3485
3644
|
query_params["start_date"] = startDate;
|
|
3486
3645
|
query_params["end_date"] = endDate;
|
|
3487
|
-
query_params["status_assigned_start_date"] = statusAssignedStartDate;
|
|
3488
|
-
query_params["status_assigned_end_date"] = statusAssignedEndDate;
|
|
3489
3646
|
query_params["dp_ids"] = dpIds;
|
|
3490
3647
|
query_params["stores"] = stores;
|
|
3491
3648
|
query_params["sales_channels"] = salesChannels;
|
|
@@ -3507,9 +3664,13 @@ class Order {
|
|
|
3507
3664
|
query_params["tags"] = tags;
|
|
3508
3665
|
query_params["customer_id"] = customerId;
|
|
3509
3666
|
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;
|
|
3510
3673
|
query_params["group_entity"] = groupEntity;
|
|
3511
|
-
query_params["enforce_date_filter"] = enforceDateFilter;
|
|
3512
|
-
query_params["fulfillment_type"] = fulfillmentType;
|
|
3513
3674
|
|
|
3514
3675
|
const xHeaders = {};
|
|
3515
3676
|
|
|
@@ -3530,7 +3691,7 @@ class Order {
|
|
|
3530
3691
|
|
|
3531
3692
|
const {
|
|
3532
3693
|
error: res_error,
|
|
3533
|
-
} = OrderPlatformModel.
|
|
3694
|
+
} = OrderPlatformModel.ShipmentInternalPlatformViewResponse().validate(
|
|
3534
3695
|
responseData,
|
|
3535
3696
|
{ abortEarly: false, allowUnknown: true }
|
|
3536
3697
|
);
|
|
@@ -3550,26 +3711,172 @@ class Order {
|
|
|
3550
3711
|
}
|
|
3551
3712
|
|
|
3552
3713
|
/**
|
|
3553
|
-
* @param {
|
|
3714
|
+
* @param {Object} arg - Arg object.
|
|
3715
|
+
* @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
|
|
3717
|
+
* @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] - Search type key
|
|
3721
|
+
* @param {string} [arg.searchValue] - Search type value
|
|
3722
|
+
* @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format
|
|
3723
|
+
* @param {string} [arg.toDate] - End Date in DD-MM-YYYY format
|
|
3724
|
+
* @param {string} [arg.startDate] - UTC Start Date in ISO format
|
|
3725
|
+
* @param {string} [arg.endDate] - UTC End Date in ISO format
|
|
3726
|
+
* @param {string} [arg.dpIds] - Comma separated values of delivery partner ids
|
|
3727
|
+
* @param {string} [arg.stores] - Comma separated values of store ids
|
|
3728
|
+
* @param {string} [arg.salesChannels] - Comma separated values of sales channel ids
|
|
3729
|
+
* @param {number} [arg.pageSize] - Page size of data received per page
|
|
3730
|
+
* @param {boolean} [arg.fetchActiveShipment] - Flag to fetch active shipments
|
|
3731
|
+
* @param {boolean} [arg.allowInactive] - Flag to allow inactive shipments
|
|
3732
|
+
* @param {boolean} [arg.excludeLockedShipments] - Flag to fetch locked shipments
|
|
3733
|
+
* @param {string} [arg.paymentMethods] - Comma separated values of payment methods
|
|
3734
|
+
* @param {string} [arg.channelShipmentId] - App Shipment Id
|
|
3735
|
+
* @param {string} [arg.channelOrderId] - App Order Id
|
|
3736
|
+
* @param {string} [arg.customMeta] -
|
|
3737
|
+
* @param {string} [arg.orderingChannel] -
|
|
3738
|
+
* @param {string} [arg.companyAffiliateTag] -
|
|
3739
|
+
* @param {boolean} [arg.myOrders] -
|
|
3740
|
+
* @param {string} [arg.platformUserId] -
|
|
3741
|
+
* @param {string} [arg.sortType] - Sort the result data on basis of input
|
|
3742
|
+
* @param {boolean} [arg.showCrossCompanyData] - Flag to view cross &
|
|
3743
|
+
* non-cross company order
|
|
3744
|
+
* @param {string} [arg.tags] - Comma separated values of tags
|
|
3745
|
+
* @param {string} [arg.customerId] -
|
|
3746
|
+
* @param {string} [arg.orderType] -
|
|
3747
|
+
* @param {string} [arg.operationalStatus] - Statuses relating to shipment
|
|
3748
|
+
* transition in order processing journey. Comma separated values of
|
|
3749
|
+
* operational statuses.
|
|
3750
|
+
* @param {string} [arg.financialStatus] - Statuses relating to finance
|
|
3751
|
+
* related operations in the order processing journey. Comma separated
|
|
3752
|
+
* values of financial statuses.
|
|
3753
|
+
* @param {string} [arg.logisticsStatus] - Statuses relating to delivery and
|
|
3754
|
+
* pickup related operations in the order processing journey. Comma
|
|
3755
|
+
* separated values of logistics statuses.
|
|
3756
|
+
* @param {string} [arg.parentViewSlug] - Parent view is used for grouping
|
|
3757
|
+
* of child views. Slug of parent view.
|
|
3758
|
+
* @param {string} [arg.childViewSlug] - Child view is user configured view
|
|
3759
|
+
* which has filters added by the user on which shipments/orders are
|
|
3760
|
+
* fetched. Slug of child view.
|
|
3761
|
+
* @param {string} [arg.lockStatus] - Flag to identify if a shipment is locked or not.
|
|
3762
|
+
* @param {string} [arg.groupEntity] - Defines the grouping criterion for
|
|
3763
|
+
* retrieving shipments or orders. It specifies whether the results should
|
|
3764
|
+
* be organized based on shipment groups or order groups. For example,
|
|
3765
|
+
* using 'shipments' groups results by shipment, while an invalid value
|
|
3766
|
+
* like 'abcd' may not be recognized, leading to errors or default behavior.
|
|
3767
|
+
* @returns {Paginator<OrderPlatformModel.ShipmentInternalPlatformViewResponse>}
|
|
3768
|
+
* @summary: Get shipments.
|
|
3769
|
+
* @description: Get Shipments Listing for the company id
|
|
3770
|
+
*/
|
|
3771
|
+
getShipmentsPaginator({
|
|
3772
|
+
lane,
|
|
3773
|
+
bagStatus,
|
|
3774
|
+
statusOverrideLane,
|
|
3775
|
+
timeToDispatch,
|
|
3776
|
+
searchType,
|
|
3777
|
+
searchValue,
|
|
3778
|
+
fromDate,
|
|
3779
|
+
toDate,
|
|
3780
|
+
startDate,
|
|
3781
|
+
endDate,
|
|
3782
|
+
dpIds,
|
|
3783
|
+
stores,
|
|
3784
|
+
salesChannels,
|
|
3785
|
+
pageSize,
|
|
3786
|
+
fetchActiveShipment,
|
|
3787
|
+
allowInactive,
|
|
3788
|
+
excludeLockedShipments,
|
|
3789
|
+
paymentMethods,
|
|
3790
|
+
channelShipmentId,
|
|
3791
|
+
channelOrderId,
|
|
3792
|
+
customMeta,
|
|
3793
|
+
orderingChannel,
|
|
3794
|
+
companyAffiliateTag,
|
|
3795
|
+
myOrders,
|
|
3796
|
+
platformUserId,
|
|
3797
|
+
sortType,
|
|
3798
|
+
showCrossCompanyData,
|
|
3799
|
+
tags,
|
|
3800
|
+
customerId,
|
|
3801
|
+
orderType,
|
|
3802
|
+
operationalStatus,
|
|
3803
|
+
financialStatus,
|
|
3804
|
+
logisticsStatus,
|
|
3805
|
+
parentViewSlug,
|
|
3806
|
+
childViewSlug,
|
|
3807
|
+
lockStatus,
|
|
3808
|
+
groupEntity,
|
|
3809
|
+
} = {}) {
|
|
3810
|
+
const paginator = new Paginator();
|
|
3811
|
+
const callback = async () => {
|
|
3812
|
+
const pageId = paginator.nextId;
|
|
3813
|
+
const pageNo = paginator.pageNo;
|
|
3814
|
+
const pageType = "number";
|
|
3815
|
+
const data = await this.getShipments({
|
|
3816
|
+
lane: lane,
|
|
3817
|
+
bagStatus: bagStatus,
|
|
3818
|
+
statusOverrideLane: statusOverrideLane,
|
|
3819
|
+
timeToDispatch: timeToDispatch,
|
|
3820
|
+
searchType: searchType,
|
|
3821
|
+
searchValue: searchValue,
|
|
3822
|
+
fromDate: fromDate,
|
|
3823
|
+
toDate: toDate,
|
|
3824
|
+
startDate: startDate,
|
|
3825
|
+
endDate: endDate,
|
|
3826
|
+
dpIds: dpIds,
|
|
3827
|
+
stores: stores,
|
|
3828
|
+
salesChannels: salesChannels,
|
|
3829
|
+
pageNo: pageNo,
|
|
3830
|
+
pageSize: pageSize,
|
|
3831
|
+
fetchActiveShipment: fetchActiveShipment,
|
|
3832
|
+
allowInactive: allowInactive,
|
|
3833
|
+
excludeLockedShipments: excludeLockedShipments,
|
|
3834
|
+
paymentMethods: paymentMethods,
|
|
3835
|
+
channelShipmentId: channelShipmentId,
|
|
3836
|
+
channelOrderId: channelOrderId,
|
|
3837
|
+
customMeta: customMeta,
|
|
3838
|
+
orderingChannel: orderingChannel,
|
|
3839
|
+
companyAffiliateTag: companyAffiliateTag,
|
|
3840
|
+
myOrders: myOrders,
|
|
3841
|
+
platformUserId: platformUserId,
|
|
3842
|
+
sortType: sortType,
|
|
3843
|
+
showCrossCompanyData: showCrossCompanyData,
|
|
3844
|
+
tags: tags,
|
|
3845
|
+
customerId: customerId,
|
|
3846
|
+
orderType: orderType,
|
|
3847
|
+
operationalStatus: operationalStatus,
|
|
3848
|
+
financialStatus: financialStatus,
|
|
3849
|
+
logisticsStatus: logisticsStatus,
|
|
3850
|
+
parentViewSlug: parentViewSlug,
|
|
3851
|
+
childViewSlug: childViewSlug,
|
|
3852
|
+
lockStatus: lockStatus,
|
|
3853
|
+
groupEntity: groupEntity,
|
|
3854
|
+
});
|
|
3855
|
+
paginator.setPaginator({
|
|
3856
|
+
hasNext: data.page.has_next ? true : false,
|
|
3857
|
+
nextId: data.page.next_id,
|
|
3858
|
+
});
|
|
3859
|
+
return data;
|
|
3860
|
+
};
|
|
3861
|
+
paginator.setCallback(callback.bind(this));
|
|
3862
|
+
return paginator;
|
|
3863
|
+
}
|
|
3864
|
+
|
|
3865
|
+
/**
|
|
3866
|
+
* @param {OrderPlatformValidator.GetStateTransitionMapParam} arg - Arg object
|
|
3554
3867
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3555
3868
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3556
|
-
* @returns {Promise<
|
|
3557
|
-
* @name
|
|
3558
|
-
* @summary:
|
|
3559
|
-
* @description:
|
|
3560
|
-
* 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.
|
|
3561
|
-
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateManagerConfig/).
|
|
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/).
|
|
3562
3873
|
*/
|
|
3563
|
-
async
|
|
3564
|
-
{
|
|
3874
|
+
async getStateTransitionMap(
|
|
3875
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
3565
3876
|
{ responseHeaders } = { responseHeaders: false }
|
|
3566
3877
|
) {
|
|
3567
|
-
const { error } = OrderPlatformValidator.
|
|
3568
|
-
{
|
|
3569
|
-
appId,
|
|
3570
|
-
orderingChannel,
|
|
3571
|
-
entity,
|
|
3572
|
-
},
|
|
3878
|
+
const { error } = OrderPlatformValidator.getStateTransitionMap().validate(
|
|
3879
|
+
{},
|
|
3573
3880
|
{ abortEarly: false, allowUnknown: true }
|
|
3574
3881
|
);
|
|
3575
3882
|
if (error) {
|
|
@@ -3579,32 +3886,102 @@ class Order {
|
|
|
3579
3886
|
// Showing warrnings if extra unknown parameters are found
|
|
3580
3887
|
const {
|
|
3581
3888
|
error: warrning,
|
|
3582
|
-
} = OrderPlatformValidator.
|
|
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
|
|
3942
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3943
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3944
|
+
* @returns {Promise<OrderPlatformModel.TemplateDownloadResponse>} - Success response
|
|
3945
|
+
* @name getTemplate
|
|
3946
|
+
* @summary: Get the Excel file URL for the Template.
|
|
3947
|
+
* @description: Get the Excel file URL for the Template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getTemplate/).
|
|
3948
|
+
*/
|
|
3949
|
+
async getTemplate(
|
|
3950
|
+
{ templateName, requestHeaders } = { requestHeaders: {} },
|
|
3951
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3952
|
+
) {
|
|
3953
|
+
const { error } = OrderPlatformValidator.getTemplate().validate(
|
|
3583
3954
|
{
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3955
|
+
templateName,
|
|
3956
|
+
},
|
|
3957
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3958
|
+
);
|
|
3959
|
+
if (error) {
|
|
3960
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3961
|
+
}
|
|
3962
|
+
|
|
3963
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3964
|
+
const { error: warrning } = OrderPlatformValidator.getTemplate().validate(
|
|
3965
|
+
{
|
|
3966
|
+
templateName,
|
|
3587
3967
|
},
|
|
3588
3968
|
{ abortEarly: false, allowUnknown: false }
|
|
3589
3969
|
);
|
|
3590
3970
|
if (warrning) {
|
|
3591
3971
|
Logger({
|
|
3592
3972
|
level: "WARN",
|
|
3593
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
3973
|
+
message: `Parameter Validation warrnings for platform > Order > getTemplate \n ${warrning}`,
|
|
3594
3974
|
});
|
|
3595
3975
|
}
|
|
3596
3976
|
|
|
3597
3977
|
const query_params = {};
|
|
3598
|
-
query_params["app_id"] = appId;
|
|
3599
|
-
query_params["ordering_channel"] = orderingChannel;
|
|
3600
|
-
query_params["entity"] = entity;
|
|
3601
3978
|
|
|
3602
3979
|
const xHeaders = {};
|
|
3603
3980
|
|
|
3604
3981
|
const response = await PlatformAPIClient.execute(
|
|
3605
3982
|
this.config,
|
|
3606
3983
|
"get",
|
|
3607
|
-
`/service/platform/order
|
|
3984
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/jobs/templates/${templateName}`,
|
|
3608
3985
|
query_params,
|
|
3609
3986
|
undefined,
|
|
3610
3987
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3616,7 +3993,9 @@ class Order {
|
|
|
3616
3993
|
responseData = response[0];
|
|
3617
3994
|
}
|
|
3618
3995
|
|
|
3619
|
-
const {
|
|
3996
|
+
const {
|
|
3997
|
+
error: res_error,
|
|
3998
|
+
} = OrderPlatformModel.TemplateDownloadResponse().validate(responseData, {
|
|
3620
3999
|
abortEarly: false,
|
|
3621
4000
|
allowUnknown: true,
|
|
3622
4001
|
});
|
|
@@ -3627,7 +4006,7 @@ class Order {
|
|
|
3627
4006
|
} else {
|
|
3628
4007
|
Logger({
|
|
3629
4008
|
level: "WARN",
|
|
3630
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4009
|
+
message: `Response Validation Warnings for platform > Order > getTemplate \n ${res_error}`,
|
|
3631
4010
|
});
|
|
3632
4011
|
}
|
|
3633
4012
|
}
|
|
@@ -3636,20 +4015,22 @@ class Order {
|
|
|
3636
4015
|
}
|
|
3637
4016
|
|
|
3638
4017
|
/**
|
|
3639
|
-
* @param {OrderPlatformValidator.
|
|
4018
|
+
* @param {OrderPlatformValidator.GetUserViewsParam} arg - Arg object
|
|
3640
4019
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3641
4020
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3642
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3643
|
-
* @name
|
|
3644
|
-
* @summary: Get
|
|
3645
|
-
* @description:
|
|
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/).
|
|
3646
4025
|
*/
|
|
3647
|
-
async
|
|
3648
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
4026
|
+
async getUserViews(
|
|
4027
|
+
{ showIn, requestHeaders } = { requestHeaders: {} },
|
|
3649
4028
|
{ responseHeaders } = { responseHeaders: false }
|
|
3650
4029
|
) {
|
|
3651
|
-
const { error } = OrderPlatformValidator.
|
|
3652
|
-
{
|
|
4030
|
+
const { error } = OrderPlatformValidator.getUserViews().validate(
|
|
4031
|
+
{
|
|
4032
|
+
showIn,
|
|
4033
|
+
},
|
|
3653
4034
|
{ abortEarly: false, allowUnknown: true }
|
|
3654
4035
|
);
|
|
3655
4036
|
if (error) {
|
|
@@ -3657,27 +4038,109 @@ class Order {
|
|
|
3657
4038
|
}
|
|
3658
4039
|
|
|
3659
4040
|
// Showing warrnings if extra unknown parameters are found
|
|
4041
|
+
const { error: warrning } = OrderPlatformValidator.getUserViews().validate(
|
|
4042
|
+
{
|
|
4043
|
+
showIn,
|
|
4044
|
+
},
|
|
4045
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4046
|
+
);
|
|
4047
|
+
if (warrning) {
|
|
4048
|
+
Logger({
|
|
4049
|
+
level: "WARN",
|
|
4050
|
+
message: `Parameter Validation warrnings for platform > Order > getUserViews \n ${warrning}`,
|
|
4051
|
+
});
|
|
4052
|
+
}
|
|
4053
|
+
|
|
4054
|
+
const query_params = {};
|
|
4055
|
+
query_params["show_in"] = showIn;
|
|
4056
|
+
|
|
4057
|
+
const xHeaders = {};
|
|
4058
|
+
|
|
4059
|
+
const response = await PlatformAPIClient.execute(
|
|
4060
|
+
this.config,
|
|
4061
|
+
"get",
|
|
4062
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/views`,
|
|
4063
|
+
query_params,
|
|
4064
|
+
undefined,
|
|
4065
|
+
{ ...xHeaders, ...requestHeaders },
|
|
4066
|
+
{ responseHeaders }
|
|
4067
|
+
);
|
|
4068
|
+
|
|
4069
|
+
let responseData = response;
|
|
4070
|
+
if (responseHeaders) {
|
|
4071
|
+
responseData = response[0];
|
|
4072
|
+
}
|
|
4073
|
+
|
|
3660
4074
|
const {
|
|
3661
|
-
error:
|
|
3662
|
-
} =
|
|
3663
|
-
|
|
4075
|
+
error: res_error,
|
|
4076
|
+
} = OrderPlatformModel.UserViewsResponse().validate(responseData, {
|
|
4077
|
+
abortEarly: false,
|
|
4078
|
+
allowUnknown: true,
|
|
4079
|
+
});
|
|
4080
|
+
|
|
4081
|
+
if (res_error) {
|
|
4082
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
4083
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4084
|
+
} else {
|
|
4085
|
+
Logger({
|
|
4086
|
+
level: "WARN",
|
|
4087
|
+
message: `Response Validation Warnings for platform > Order > getUserViews \n ${res_error}`,
|
|
4088
|
+
});
|
|
4089
|
+
}
|
|
4090
|
+
}
|
|
4091
|
+
|
|
4092
|
+
return response;
|
|
4093
|
+
}
|
|
4094
|
+
|
|
4095
|
+
/**
|
|
4096
|
+
* @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object
|
|
4097
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4098
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4099
|
+
* @returns {Promise<OrderPlatformModel.FiltersResponse>} - Success response
|
|
4100
|
+
* @name getfilters
|
|
4101
|
+
* @summary: Get filters.
|
|
4102
|
+
* @description: Retrieve listing filters. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/).
|
|
4103
|
+
*/
|
|
4104
|
+
async getfilters(
|
|
4105
|
+
{ view, groupEntity, requestHeaders } = { requestHeaders: {} },
|
|
4106
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
4107
|
+
) {
|
|
4108
|
+
const { error } = OrderPlatformValidator.getfilters().validate(
|
|
4109
|
+
{
|
|
4110
|
+
view,
|
|
4111
|
+
groupEntity,
|
|
4112
|
+
},
|
|
4113
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4114
|
+
);
|
|
4115
|
+
if (error) {
|
|
4116
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4117
|
+
}
|
|
4118
|
+
|
|
4119
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4120
|
+
const { error: warrning } = OrderPlatformValidator.getfilters().validate(
|
|
4121
|
+
{
|
|
4122
|
+
view,
|
|
4123
|
+
groupEntity,
|
|
4124
|
+
},
|
|
3664
4125
|
{ abortEarly: false, allowUnknown: false }
|
|
3665
4126
|
);
|
|
3666
4127
|
if (warrning) {
|
|
3667
4128
|
Logger({
|
|
3668
4129
|
level: "WARN",
|
|
3669
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4130
|
+
message: `Parameter Validation warrnings for platform > Order > getfilters \n ${warrning}`,
|
|
3670
4131
|
});
|
|
3671
4132
|
}
|
|
3672
4133
|
|
|
3673
4134
|
const query_params = {};
|
|
4135
|
+
query_params["view"] = view;
|
|
4136
|
+
query_params["group_entity"] = groupEntity;
|
|
3674
4137
|
|
|
3675
4138
|
const xHeaders = {};
|
|
3676
4139
|
|
|
3677
4140
|
const response = await PlatformAPIClient.execute(
|
|
3678
4141
|
this.config,
|
|
3679
4142
|
"get",
|
|
3680
|
-
`/service/platform/order
|
|
4143
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/filter-listing`,
|
|
3681
4144
|
query_params,
|
|
3682
4145
|
undefined,
|
|
3683
4146
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3691,7 +4154,7 @@ class Order {
|
|
|
3691
4154
|
|
|
3692
4155
|
const {
|
|
3693
4156
|
error: res_error,
|
|
3694
|
-
} = OrderPlatformModel.
|
|
4157
|
+
} = OrderPlatformModel.FiltersResponse().validate(responseData, {
|
|
3695
4158
|
abortEarly: false,
|
|
3696
4159
|
allowUnknown: true,
|
|
3697
4160
|
});
|
|
@@ -3702,7 +4165,7 @@ class Order {
|
|
|
3702
4165
|
} else {
|
|
3703
4166
|
Logger({
|
|
3704
4167
|
level: "WARN",
|
|
3705
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4168
|
+
message: `Response Validation Warnings for platform > Order > getfilters \n ${res_error}`,
|
|
3706
4169
|
});
|
|
3707
4170
|
}
|
|
3708
4171
|
}
|
|
@@ -3711,22 +4174,22 @@ class Order {
|
|
|
3711
4174
|
}
|
|
3712
4175
|
|
|
3713
4176
|
/**
|
|
3714
|
-
* @param {OrderPlatformValidator.
|
|
4177
|
+
* @param {OrderPlatformValidator.InvalidateShipmentCacheParam} arg - Arg object
|
|
3715
4178
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3716
4179
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3717
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4180
|
+
* @returns {Promise<OrderPlatformModel.InvalidateShipmentCacheResponse>} -
|
|
3718
4181
|
* Success response
|
|
3719
|
-
* @name
|
|
3720
|
-
* @summary:
|
|
3721
|
-
* @description:
|
|
4182
|
+
* @name invalidateShipmentCache
|
|
4183
|
+
* @summary: Invalidate shipment cache.
|
|
4184
|
+
* @description: Invalidate shipment Cache. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/invalidateShipmentCache/).
|
|
3722
4185
|
*/
|
|
3723
|
-
async
|
|
3724
|
-
{
|
|
4186
|
+
async invalidateShipmentCache(
|
|
4187
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3725
4188
|
{ responseHeaders } = { responseHeaders: false }
|
|
3726
4189
|
) {
|
|
3727
|
-
const { error } = OrderPlatformValidator.
|
|
4190
|
+
const { error } = OrderPlatformValidator.invalidateShipmentCache().validate(
|
|
3728
4191
|
{
|
|
3729
|
-
|
|
4192
|
+
body,
|
|
3730
4193
|
},
|
|
3731
4194
|
{ abortEarly: false, allowUnknown: true }
|
|
3732
4195
|
);
|
|
@@ -3735,16 +4198,18 @@ class Order {
|
|
|
3735
4198
|
}
|
|
3736
4199
|
|
|
3737
4200
|
// Showing warrnings if extra unknown parameters are found
|
|
3738
|
-
const {
|
|
4201
|
+
const {
|
|
4202
|
+
error: warrning,
|
|
4203
|
+
} = OrderPlatformValidator.invalidateShipmentCache().validate(
|
|
3739
4204
|
{
|
|
3740
|
-
|
|
4205
|
+
body,
|
|
3741
4206
|
},
|
|
3742
4207
|
{ abortEarly: false, allowUnknown: false }
|
|
3743
4208
|
);
|
|
3744
4209
|
if (warrning) {
|
|
3745
4210
|
Logger({
|
|
3746
4211
|
level: "WARN",
|
|
3747
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4212
|
+
message: `Parameter Validation warrnings for platform > Order > invalidateShipmentCache \n ${warrning}`,
|
|
3748
4213
|
});
|
|
3749
4214
|
}
|
|
3750
4215
|
|
|
@@ -3754,10 +4219,10 @@ class Order {
|
|
|
3754
4219
|
|
|
3755
4220
|
const response = await PlatformAPIClient.execute(
|
|
3756
4221
|
this.config,
|
|
3757
|
-
"
|
|
3758
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/
|
|
4222
|
+
"put",
|
|
4223
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/update-cache`,
|
|
3759
4224
|
query_params,
|
|
3760
|
-
|
|
4225
|
+
body,
|
|
3761
4226
|
{ ...xHeaders, ...requestHeaders },
|
|
3762
4227
|
{ responseHeaders }
|
|
3763
4228
|
);
|
|
@@ -3769,7 +4234,7 @@ class Order {
|
|
|
3769
4234
|
|
|
3770
4235
|
const {
|
|
3771
4236
|
error: res_error,
|
|
3772
|
-
} = OrderPlatformModel.
|
|
4237
|
+
} = OrderPlatformModel.InvalidateShipmentCacheResponse().validate(
|
|
3773
4238
|
responseData,
|
|
3774
4239
|
{ abortEarly: false, allowUnknown: true }
|
|
3775
4240
|
);
|
|
@@ -3780,7 +4245,7 @@ class Order {
|
|
|
3780
4245
|
} else {
|
|
3781
4246
|
Logger({
|
|
3782
4247
|
level: "WARN",
|
|
3783
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4248
|
+
message: `Response Validation Warnings for platform > Order > invalidateShipmentCache \n ${res_error}`,
|
|
3784
4249
|
});
|
|
3785
4250
|
}
|
|
3786
4251
|
}
|
|
@@ -3789,22 +4254,21 @@ class Order {
|
|
|
3789
4254
|
}
|
|
3790
4255
|
|
|
3791
4256
|
/**
|
|
3792
|
-
* @param {OrderPlatformValidator.
|
|
4257
|
+
* @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object
|
|
3793
4258
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3794
4259
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3795
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3796
|
-
* @name
|
|
3797
|
-
* @summary:
|
|
3798
|
-
* @description:
|
|
4260
|
+
* @returns {Promise<OrderPlatformModel.JobDetailsResponse>} - Success response
|
|
4261
|
+
* @name jobDetails
|
|
4262
|
+
* @summary: Fetches details for the job of the provided batch_id
|
|
4263
|
+
* @description: Fetches details for the job of the provided batch_id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/jobDetails/).
|
|
3799
4264
|
*/
|
|
3800
|
-
async
|
|
3801
|
-
{
|
|
4265
|
+
async jobDetails(
|
|
4266
|
+
{ batchId, requestHeaders } = { requestHeaders: {} },
|
|
3802
4267
|
{ responseHeaders } = { responseHeaders: false }
|
|
3803
4268
|
) {
|
|
3804
|
-
const { error } = OrderPlatformValidator.
|
|
4269
|
+
const { error } = OrderPlatformValidator.jobDetails().validate(
|
|
3805
4270
|
{
|
|
3806
|
-
|
|
3807
|
-
groupEntity,
|
|
4271
|
+
batchId,
|
|
3808
4272
|
},
|
|
3809
4273
|
{ abortEarly: false, allowUnknown: true }
|
|
3810
4274
|
);
|
|
@@ -3813,30 +4277,27 @@ class Order {
|
|
|
3813
4277
|
}
|
|
3814
4278
|
|
|
3815
4279
|
// Showing warrnings if extra unknown parameters are found
|
|
3816
|
-
const { error: warrning } = OrderPlatformValidator.
|
|
4280
|
+
const { error: warrning } = OrderPlatformValidator.jobDetails().validate(
|
|
3817
4281
|
{
|
|
3818
|
-
|
|
3819
|
-
groupEntity,
|
|
4282
|
+
batchId,
|
|
3820
4283
|
},
|
|
3821
4284
|
{ abortEarly: false, allowUnknown: false }
|
|
3822
4285
|
);
|
|
3823
4286
|
if (warrning) {
|
|
3824
4287
|
Logger({
|
|
3825
4288
|
level: "WARN",
|
|
3826
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4289
|
+
message: `Parameter Validation warrnings for platform > Order > jobDetails \n ${warrning}`,
|
|
3827
4290
|
});
|
|
3828
4291
|
}
|
|
3829
4292
|
|
|
3830
4293
|
const query_params = {};
|
|
3831
|
-
query_params["view"] = view;
|
|
3832
|
-
query_params["group_entity"] = groupEntity;
|
|
3833
4294
|
|
|
3834
4295
|
const xHeaders = {};
|
|
3835
4296
|
|
|
3836
4297
|
const response = await PlatformAPIClient.execute(
|
|
3837
4298
|
this.config,
|
|
3838
4299
|
"get",
|
|
3839
|
-
`/service/platform/order/v1.0/company/${this.config.companyId}/
|
|
4300
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/jobs/${batchId}`,
|
|
3840
4301
|
query_params,
|
|
3841
4302
|
undefined,
|
|
3842
4303
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3850,7 +4311,7 @@ class Order {
|
|
|
3850
4311
|
|
|
3851
4312
|
const {
|
|
3852
4313
|
error: res_error,
|
|
3853
|
-
} = OrderPlatformModel.
|
|
4314
|
+
} = OrderPlatformModel.JobDetailsResponse().validate(responseData, {
|
|
3854
4315
|
abortEarly: false,
|
|
3855
4316
|
allowUnknown: true,
|
|
3856
4317
|
});
|
|
@@ -3861,7 +4322,7 @@ class Order {
|
|
|
3861
4322
|
} else {
|
|
3862
4323
|
Logger({
|
|
3863
4324
|
level: "WARN",
|
|
3864
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4325
|
+
message: `Response Validation Warnings for platform > Order > jobDetails \n ${res_error}`,
|
|
3865
4326
|
});
|
|
3866
4327
|
}
|
|
3867
4328
|
}
|
|
@@ -3870,21 +4331,19 @@ class Order {
|
|
|
3870
4331
|
}
|
|
3871
4332
|
|
|
3872
4333
|
/**
|
|
3873
|
-
* @param {OrderPlatformValidator.
|
|
4334
|
+
* @param {OrderPlatformValidator.OrderUpdateParam} arg - Arg object
|
|
3874
4335
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3875
4336
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3876
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3877
|
-
*
|
|
3878
|
-
*
|
|
3879
|
-
* @
|
|
3880
|
-
* @summary: Invalidate shipment cache
|
|
3881
|
-
* @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/).
|
|
4337
|
+
* @returns {Promise<OrderPlatformModel.ResponseDetail>} - Success response
|
|
4338
|
+
* @name orderUpdate
|
|
4339
|
+
* @summary: Order update.
|
|
4340
|
+
* @description: Modify the details and status of an order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/orderUpdate/).
|
|
3882
4341
|
*/
|
|
3883
|
-
async
|
|
4342
|
+
async orderUpdate(
|
|
3884
4343
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3885
4344
|
{ responseHeaders } = { responseHeaders: false }
|
|
3886
4345
|
) {
|
|
3887
|
-
const { error } = OrderPlatformValidator.
|
|
4346
|
+
const { error } = OrderPlatformValidator.orderUpdate().validate(
|
|
3888
4347
|
{
|
|
3889
4348
|
body,
|
|
3890
4349
|
},
|
|
@@ -3895,9 +4354,7 @@ class Order {
|
|
|
3895
4354
|
}
|
|
3896
4355
|
|
|
3897
4356
|
// Showing warrnings if extra unknown parameters are found
|
|
3898
|
-
const {
|
|
3899
|
-
error: warrning,
|
|
3900
|
-
} = OrderPlatformValidator.invalidateShipmentCache().validate(
|
|
4357
|
+
const { error: warrning } = OrderPlatformValidator.orderUpdate().validate(
|
|
3901
4358
|
{
|
|
3902
4359
|
body,
|
|
3903
4360
|
},
|
|
@@ -3906,7 +4363,7 @@ class Order {
|
|
|
3906
4363
|
if (warrning) {
|
|
3907
4364
|
Logger({
|
|
3908
4365
|
level: "WARN",
|
|
3909
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4366
|
+
message: `Parameter Validation warrnings for platform > Order > orderUpdate \n ${warrning}`,
|
|
3910
4367
|
});
|
|
3911
4368
|
}
|
|
3912
4369
|
|
|
@@ -3917,7 +4374,7 @@ class Order {
|
|
|
3917
4374
|
const response = await PlatformAPIClient.execute(
|
|
3918
4375
|
this.config,
|
|
3919
4376
|
"put",
|
|
3920
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
4377
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order/validation`,
|
|
3921
4378
|
query_params,
|
|
3922
4379
|
body,
|
|
3923
4380
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3931,10 +4388,10 @@ class Order {
|
|
|
3931
4388
|
|
|
3932
4389
|
const {
|
|
3933
4390
|
error: res_error,
|
|
3934
|
-
} = OrderPlatformModel.
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
);
|
|
4391
|
+
} = OrderPlatformModel.ResponseDetail().validate(responseData, {
|
|
4392
|
+
abortEarly: false,
|
|
4393
|
+
allowUnknown: true,
|
|
4394
|
+
});
|
|
3938
4395
|
|
|
3939
4396
|
if (res_error) {
|
|
3940
4397
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3942,7 +4399,7 @@ class Order {
|
|
|
3942
4399
|
} else {
|
|
3943
4400
|
Logger({
|
|
3944
4401
|
level: "WARN",
|
|
3945
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4402
|
+
message: `Response Validation Warnings for platform > Order > orderUpdate \n ${res_error}`,
|
|
3946
4403
|
});
|
|
3947
4404
|
}
|
|
3948
4405
|
}
|
|
@@ -3951,21 +4408,24 @@ class Order {
|
|
|
3951
4408
|
}
|
|
3952
4409
|
|
|
3953
4410
|
/**
|
|
3954
|
-
* @param {OrderPlatformValidator.
|
|
4411
|
+
* @param {OrderPlatformValidator.PostRefundConfigurationParam} arg - Arg object
|
|
3955
4412
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3956
4413
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3957
|
-
* @returns {Promise<OrderPlatformModel.
|
|
3958
|
-
*
|
|
3959
|
-
*
|
|
3960
|
-
* @
|
|
4414
|
+
* @returns {Promise<OrderPlatformModel.RefundStateConfigurationManualSchemaResponse>}
|
|
4415
|
+
* - Success response
|
|
4416
|
+
*
|
|
4417
|
+
* @name postRefundConfiguration
|
|
4418
|
+
* @summary: refund configuration.
|
|
4419
|
+
* @description: refund configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postRefundConfiguration/).
|
|
3961
4420
|
*/
|
|
3962
|
-
async
|
|
3963
|
-
{
|
|
4421
|
+
async postRefundConfiguration(
|
|
4422
|
+
{ appId, body, requestHeaders } = { requestHeaders: {} },
|
|
3964
4423
|
{ responseHeaders } = { responseHeaders: false }
|
|
3965
4424
|
) {
|
|
3966
|
-
const { error } = OrderPlatformValidator.
|
|
4425
|
+
const { error } = OrderPlatformValidator.postRefundConfiguration().validate(
|
|
3967
4426
|
{
|
|
3968
|
-
|
|
4427
|
+
appId,
|
|
4428
|
+
body,
|
|
3969
4429
|
},
|
|
3970
4430
|
{ abortEarly: false, allowUnknown: true }
|
|
3971
4431
|
);
|
|
@@ -3974,29 +4434,33 @@ class Order {
|
|
|
3974
4434
|
}
|
|
3975
4435
|
|
|
3976
4436
|
// Showing warrnings if extra unknown parameters are found
|
|
3977
|
-
const {
|
|
4437
|
+
const {
|
|
4438
|
+
error: warrning,
|
|
4439
|
+
} = OrderPlatformValidator.postRefundConfiguration().validate(
|
|
3978
4440
|
{
|
|
3979
|
-
|
|
4441
|
+
appId,
|
|
4442
|
+
body,
|
|
3980
4443
|
},
|
|
3981
4444
|
{ abortEarly: false, allowUnknown: false }
|
|
3982
4445
|
);
|
|
3983
4446
|
if (warrning) {
|
|
3984
4447
|
Logger({
|
|
3985
4448
|
level: "WARN",
|
|
3986
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4449
|
+
message: `Parameter Validation warrnings for platform > Order > postRefundConfiguration \n ${warrning}`,
|
|
3987
4450
|
});
|
|
3988
4451
|
}
|
|
3989
4452
|
|
|
3990
4453
|
const query_params = {};
|
|
4454
|
+
query_params["app_id"] = appId;
|
|
3991
4455
|
|
|
3992
4456
|
const xHeaders = {};
|
|
3993
4457
|
|
|
3994
4458
|
const response = await PlatformAPIClient.execute(
|
|
3995
4459
|
this.config,
|
|
3996
|
-
"
|
|
3997
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
4460
|
+
"post",
|
|
4461
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund/config`,
|
|
3998
4462
|
query_params,
|
|
3999
|
-
|
|
4463
|
+
body,
|
|
4000
4464
|
{ ...xHeaders, ...requestHeaders },
|
|
4001
4465
|
{ responseHeaders }
|
|
4002
4466
|
);
|
|
@@ -4008,10 +4472,10 @@ class Order {
|
|
|
4008
4472
|
|
|
4009
4473
|
const {
|
|
4010
4474
|
error: res_error,
|
|
4011
|
-
} = OrderPlatformModel.
|
|
4012
|
-
|
|
4013
|
-
allowUnknown: true
|
|
4014
|
-
|
|
4475
|
+
} = OrderPlatformModel.RefundStateConfigurationManualSchemaResponse().validate(
|
|
4476
|
+
responseData,
|
|
4477
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4478
|
+
);
|
|
4015
4479
|
|
|
4016
4480
|
if (res_error) {
|
|
4017
4481
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4019,7 +4483,7 @@ class Order {
|
|
|
4019
4483
|
} else {
|
|
4020
4484
|
Logger({
|
|
4021
4485
|
level: "WARN",
|
|
4022
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4486
|
+
message: `Response Validation Warnings for platform > Order > postRefundConfiguration \n ${res_error}`,
|
|
4023
4487
|
});
|
|
4024
4488
|
}
|
|
4025
4489
|
}
|
|
@@ -4028,20 +4492,25 @@ class Order {
|
|
|
4028
4492
|
}
|
|
4029
4493
|
|
|
4030
4494
|
/**
|
|
4031
|
-
* @param {OrderPlatformValidator.
|
|
4495
|
+
* @param {OrderPlatformValidator.PostRefundStateConfigurationParam} arg - Arg object
|
|
4032
4496
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4033
4497
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4034
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4035
|
-
*
|
|
4036
|
-
*
|
|
4037
|
-
* @
|
|
4498
|
+
* @returns {Promise<OrderPlatformModel.PostRefundStateConfigurationResponse>}
|
|
4499
|
+
* - Success response
|
|
4500
|
+
*
|
|
4501
|
+
* @name postRefundStateConfiguration
|
|
4502
|
+
* @summary: Refund State Configuration
|
|
4503
|
+
* @description: Refund State Configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postRefundStateConfiguration/).
|
|
4038
4504
|
*/
|
|
4039
|
-
async
|
|
4040
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4505
|
+
async postRefundStateConfiguration(
|
|
4506
|
+
{ appId, body, requestHeaders } = { requestHeaders: {} },
|
|
4041
4507
|
{ responseHeaders } = { responseHeaders: false }
|
|
4042
4508
|
) {
|
|
4043
|
-
const {
|
|
4509
|
+
const {
|
|
4510
|
+
error,
|
|
4511
|
+
} = OrderPlatformValidator.postRefundStateConfiguration().validate(
|
|
4044
4512
|
{
|
|
4513
|
+
appId,
|
|
4045
4514
|
body,
|
|
4046
4515
|
},
|
|
4047
4516
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -4051,8 +4520,11 @@ class Order {
|
|
|
4051
4520
|
}
|
|
4052
4521
|
|
|
4053
4522
|
// Showing warrnings if extra unknown parameters are found
|
|
4054
|
-
const {
|
|
4523
|
+
const {
|
|
4524
|
+
error: warrning,
|
|
4525
|
+
} = OrderPlatformValidator.postRefundStateConfiguration().validate(
|
|
4055
4526
|
{
|
|
4527
|
+
appId,
|
|
4056
4528
|
body,
|
|
4057
4529
|
},
|
|
4058
4530
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -4060,18 +4532,19 @@ class Order {
|
|
|
4060
4532
|
if (warrning) {
|
|
4061
4533
|
Logger({
|
|
4062
4534
|
level: "WARN",
|
|
4063
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
4535
|
+
message: `Parameter Validation warrnings for platform > Order > postRefundStateConfiguration \n ${warrning}`,
|
|
4064
4536
|
});
|
|
4065
4537
|
}
|
|
4066
4538
|
|
|
4067
4539
|
const query_params = {};
|
|
4540
|
+
query_params["app_id"] = appId;
|
|
4068
4541
|
|
|
4069
4542
|
const xHeaders = {};
|
|
4070
4543
|
|
|
4071
4544
|
const response = await PlatformAPIClient.execute(
|
|
4072
4545
|
this.config,
|
|
4073
|
-
"
|
|
4074
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
4546
|
+
"post",
|
|
4547
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund/states/config`,
|
|
4075
4548
|
query_params,
|
|
4076
4549
|
body,
|
|
4077
4550
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4085,10 +4558,10 @@ class Order {
|
|
|
4085
4558
|
|
|
4086
4559
|
const {
|
|
4087
4560
|
error: res_error,
|
|
4088
|
-
} = OrderPlatformModel.
|
|
4089
|
-
|
|
4090
|
-
allowUnknown: true
|
|
4091
|
-
|
|
4561
|
+
} = OrderPlatformModel.PostRefundStateConfigurationResponse().validate(
|
|
4562
|
+
responseData,
|
|
4563
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4564
|
+
);
|
|
4092
4565
|
|
|
4093
4566
|
if (res_error) {
|
|
4094
4567
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4096,7 +4569,7 @@ class Order {
|
|
|
4096
4569
|
} else {
|
|
4097
4570
|
Logger({
|
|
4098
4571
|
level: "WARN",
|
|
4099
|
-
message: `Response Validation Warnings for platform > Order >
|
|
4572
|
+
message: `Response Validation Warnings for platform > Order > postRefundStateConfiguration \n ${res_error}`,
|
|
4100
4573
|
});
|
|
4101
4574
|
}
|
|
4102
4575
|
}
|
|
@@ -4108,11 +4581,10 @@ class Order {
|
|
|
4108
4581
|
* @param {OrderPlatformValidator.PostShipmentHistoryParam} arg - Arg object
|
|
4109
4582
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4110
4583
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4111
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4112
|
-
* Success response
|
|
4584
|
+
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponse>} - Success response
|
|
4113
4585
|
* @name postShipmentHistory
|
|
4114
|
-
* @summary:
|
|
4115
|
-
* @description:
|
|
4586
|
+
* @summary: Post shipment history.
|
|
4587
|
+
* @description: Add history records for a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postShipmentHistory/).
|
|
4116
4588
|
*/
|
|
4117
4589
|
async postShipmentHistory(
|
|
4118
4590
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4165,10 +4637,10 @@ class Order {
|
|
|
4165
4637
|
|
|
4166
4638
|
const {
|
|
4167
4639
|
error: res_error,
|
|
4168
|
-
} = OrderPlatformModel.
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
);
|
|
4640
|
+
} = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, {
|
|
4641
|
+
abortEarly: false,
|
|
4642
|
+
allowUnknown: true,
|
|
4643
|
+
});
|
|
4172
4644
|
|
|
4173
4645
|
if (res_error) {
|
|
4174
4646
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4188,11 +4660,10 @@ class Order {
|
|
|
4188
4660
|
* @param {OrderPlatformValidator.ReassignLocationParam} arg - Arg object
|
|
4189
4661
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4190
4662
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4191
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4192
|
-
* Success response
|
|
4663
|
+
* @returns {Promise<OrderPlatformModel.StoreReassignResponse>} - Success response
|
|
4193
4664
|
* @name reassignLocation
|
|
4194
|
-
* @summary: Reassign location
|
|
4195
|
-
* @description:
|
|
4665
|
+
* @summary: Reassign location.
|
|
4666
|
+
* @description: Change the assigned location for an order or shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/reassignLocation/).
|
|
4196
4667
|
*/
|
|
4197
4668
|
async reassignLocation(
|
|
4198
4669
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4245,10 +4716,10 @@ class Order {
|
|
|
4245
4716
|
|
|
4246
4717
|
const {
|
|
4247
4718
|
error: res_error,
|
|
4248
|
-
} = OrderPlatformModel.
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
);
|
|
4719
|
+
} = OrderPlatformModel.StoreReassignResponse().validate(responseData, {
|
|
4720
|
+
abortEarly: false,
|
|
4721
|
+
allowUnknown: true,
|
|
4722
|
+
});
|
|
4252
4723
|
|
|
4253
4724
|
if (res_error) {
|
|
4254
4725
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4268,10 +4739,10 @@ class Order {
|
|
|
4268
4739
|
* @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object
|
|
4269
4740
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4270
4741
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4271
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4742
|
+
* @returns {Promise<OrderPlatformModel.SendSmsResponse>} - Success response
|
|
4272
4743
|
* @name sendSmsNinja
|
|
4273
|
-
* @summary: Send SMS
|
|
4274
|
-
* @description: Send SMS
|
|
4744
|
+
* @summary: Send SMS via Ninja.
|
|
4745
|
+
* @description: Send SMS Ninja Panel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendSmsNinja/).
|
|
4275
4746
|
*/
|
|
4276
4747
|
async sendSmsNinja(
|
|
4277
4748
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4322,7 +4793,7 @@ class Order {
|
|
|
4322
4793
|
|
|
4323
4794
|
const {
|
|
4324
4795
|
error: res_error,
|
|
4325
|
-
} = OrderPlatformModel.
|
|
4796
|
+
} = OrderPlatformModel.SendSmsResponse().validate(responseData, {
|
|
4326
4797
|
abortEarly: false,
|
|
4327
4798
|
allowUnknown: true,
|
|
4328
4799
|
});
|
|
@@ -4345,11 +4816,10 @@ class Order {
|
|
|
4345
4816
|
* @param {OrderPlatformValidator.SendUserMobileOTPParam} arg - Arg object
|
|
4346
4817
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4347
4818
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4348
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4349
|
-
* Success response
|
|
4819
|
+
* @returns {Promise<OrderPlatformModel.SendUserMobileOtpResponse>} - Success response
|
|
4350
4820
|
* @name sendUserMobileOTP
|
|
4351
|
-
* @summary: Send user mobile OTP
|
|
4352
|
-
* @description: Send a one-time OTP to a
|
|
4821
|
+
* @summary: Send user mobile OTP.
|
|
4822
|
+
* @description: Send a one-time OTP to a users mobile device. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendUserMobileOTP/).
|
|
4353
4823
|
*/
|
|
4354
4824
|
async sendUserMobileOTP(
|
|
4355
4825
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4402,10 +4872,10 @@ class Order {
|
|
|
4402
4872
|
|
|
4403
4873
|
const {
|
|
4404
4874
|
error: res_error,
|
|
4405
|
-
} = OrderPlatformModel.
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
);
|
|
4875
|
+
} = OrderPlatformModel.SendUserMobileOtpResponse().validate(responseData, {
|
|
4876
|
+
abortEarly: false,
|
|
4877
|
+
allowUnknown: true,
|
|
4878
|
+
});
|
|
4409
4879
|
|
|
4410
4880
|
if (res_error) {
|
|
4411
4881
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4425,12 +4895,11 @@ class Order {
|
|
|
4425
4895
|
* @param {OrderPlatformValidator.TrackShipmentParam} arg - Arg object
|
|
4426
4896
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4427
4897
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4428
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4429
|
-
*
|
|
4430
|
-
*
|
|
4898
|
+
* @returns {Promise<OrderPlatformModel.CourierPartnerTrackingResponse>} -
|
|
4899
|
+
* Success response
|
|
4431
4900
|
* @name trackShipment
|
|
4432
|
-
* @summary:
|
|
4433
|
-
* @description: Retrieve courier partner tracking details for a given shipment
|
|
4901
|
+
* @summary: Retrieve courier partner tracking details for a given shipment id or awb no.
|
|
4902
|
+
* @description: Retrieve courier partner tracking details for a given shipment id or awb no. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/trackShipment/).
|
|
4434
4903
|
*/
|
|
4435
4904
|
async trackShipment(
|
|
4436
4905
|
{ shipmentId, awb, pageNo, pageSize, requestHeaders } = {
|
|
@@ -4493,7 +4962,7 @@ class Order {
|
|
|
4493
4962
|
|
|
4494
4963
|
const {
|
|
4495
4964
|
error: res_error,
|
|
4496
|
-
} = OrderPlatformModel.
|
|
4965
|
+
} = OrderPlatformModel.CourierPartnerTrackingResponse().validate(
|
|
4497
4966
|
responseData,
|
|
4498
4967
|
{ abortEarly: false, allowUnknown: true }
|
|
4499
4968
|
);
|
|
@@ -4513,21 +4982,21 @@ class Order {
|
|
|
4513
4982
|
}
|
|
4514
4983
|
|
|
4515
4984
|
/**
|
|
4516
|
-
* @param {OrderPlatformValidator.
|
|
4985
|
+
* @param {OrderPlatformValidator.UpdateOrderParam} arg - Arg object
|
|
4517
4986
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4518
4987
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4519
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4520
|
-
* @name
|
|
4521
|
-
* @summary:
|
|
4522
|
-
* @description:
|
|
4988
|
+
* @returns {Promise<OrderPlatformModel.OrderUpdateResponseDetail>} - Success response
|
|
4989
|
+
* @name updateOrder
|
|
4990
|
+
* @summary: Enables the updating of various order properties, including tax_details, meta, and more, providing flexibility and precision in order adjustments.
|
|
4991
|
+
* @description: Enables the updating of various order properties, including tax_details, meta, and more, providing flexibility and precision in order adjustments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateOrder/).
|
|
4523
4992
|
*/
|
|
4524
|
-
async
|
|
4525
|
-
{
|
|
4993
|
+
async updateOrder(
|
|
4994
|
+
{ orderId, body, requestHeaders } = { requestHeaders: {} },
|
|
4526
4995
|
{ responseHeaders } = { responseHeaders: false }
|
|
4527
4996
|
) {
|
|
4528
|
-
const { error } = OrderPlatformValidator.
|
|
4997
|
+
const { error } = OrderPlatformValidator.updateOrder().validate(
|
|
4529
4998
|
{
|
|
4530
|
-
|
|
4999
|
+
orderId,
|
|
4531
5000
|
body,
|
|
4532
5001
|
},
|
|
4533
5002
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -4537,9 +5006,9 @@ class Order {
|
|
|
4537
5006
|
}
|
|
4538
5007
|
|
|
4539
5008
|
// Showing warrnings if extra unknown parameters are found
|
|
4540
|
-
const { error: warrning } = OrderPlatformValidator.
|
|
5009
|
+
const { error: warrning } = OrderPlatformValidator.updateOrder().validate(
|
|
4541
5010
|
{
|
|
4542
|
-
|
|
5011
|
+
orderId,
|
|
4543
5012
|
body,
|
|
4544
5013
|
},
|
|
4545
5014
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -4547,7 +5016,7 @@ class Order {
|
|
|
4547
5016
|
if (warrning) {
|
|
4548
5017
|
Logger({
|
|
4549
5018
|
level: "WARN",
|
|
4550
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
5019
|
+
message: `Parameter Validation warrnings for platform > Order > updateOrder \n ${warrning}`,
|
|
4551
5020
|
});
|
|
4552
5021
|
}
|
|
4553
5022
|
|
|
@@ -4558,7 +5027,7 @@ class Order {
|
|
|
4558
5027
|
const response = await PlatformAPIClient.execute(
|
|
4559
5028
|
this.config,
|
|
4560
5029
|
"put",
|
|
4561
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
5030
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order/${orderId}`,
|
|
4562
5031
|
query_params,
|
|
4563
5032
|
body,
|
|
4564
5033
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4572,7 +5041,7 @@ class Order {
|
|
|
4572
5041
|
|
|
4573
5042
|
const {
|
|
4574
5043
|
error: res_error,
|
|
4575
|
-
} = OrderPlatformModel.
|
|
5044
|
+
} = OrderPlatformModel.OrderUpdateResponseDetail().validate(responseData, {
|
|
4576
5045
|
abortEarly: false,
|
|
4577
5046
|
allowUnknown: true,
|
|
4578
5047
|
});
|
|
@@ -4583,7 +5052,7 @@ class Order {
|
|
|
4583
5052
|
} else {
|
|
4584
5053
|
Logger({
|
|
4585
5054
|
level: "WARN",
|
|
4586
|
-
message: `Response Validation Warnings for platform > Order >
|
|
5055
|
+
message: `Response Validation Warnings for platform > Order > updateOrder \n ${res_error}`,
|
|
4587
5056
|
});
|
|
4588
5057
|
}
|
|
4589
5058
|
}
|
|
@@ -4595,12 +5064,12 @@ class Order {
|
|
|
4595
5064
|
* @param {OrderPlatformValidator.UpdatePackagingDimensionsParam} arg - Arg object
|
|
4596
5065
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4597
5066
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4598
|
-
* @returns {Promise<OrderPlatformModel.
|
|
5067
|
+
* @returns {Promise<OrderPlatformModel.UpdatePackagingDimensionsResponse>}
|
|
4599
5068
|
* - Success response
|
|
4600
5069
|
*
|
|
4601
5070
|
* @name updatePackagingDimensions
|
|
4602
|
-
* @summary: Update packaging dimensions
|
|
4603
|
-
* @description:
|
|
5071
|
+
* @summary: Update packaging dimensions.
|
|
5072
|
+
* @description: Modify the dimensions of packaging. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePackagingDimensions/).
|
|
4604
5073
|
*/
|
|
4605
5074
|
async updatePackagingDimensions(
|
|
4606
5075
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4655,7 +5124,7 @@ class Order {
|
|
|
4655
5124
|
|
|
4656
5125
|
const {
|
|
4657
5126
|
error: res_error,
|
|
4658
|
-
} = OrderPlatformModel.
|
|
5127
|
+
} = OrderPlatformModel.UpdatePackagingDimensionsResponse().validate(
|
|
4659
5128
|
responseData,
|
|
4660
5129
|
{ abortEarly: false, allowUnknown: true }
|
|
4661
5130
|
);
|
|
@@ -4675,19 +5144,21 @@ class Order {
|
|
|
4675
5144
|
}
|
|
4676
5145
|
|
|
4677
5146
|
/**
|
|
4678
|
-
* @param {OrderPlatformValidator.
|
|
5147
|
+
* @param {OrderPlatformValidator.UpdateShipmentParam} arg - Arg object
|
|
4679
5148
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4680
5149
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4681
|
-
* @returns {Promise<
|
|
4682
|
-
*
|
|
4683
|
-
*
|
|
4684
|
-
* @
|
|
5150
|
+
* @returns {Promise<OrderPlatformModel.UpdateShipmentStatusResponseBody>}
|
|
5151
|
+
* - Success response
|
|
5152
|
+
*
|
|
5153
|
+
* @name updateShipment
|
|
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/).
|
|
4685
5156
|
*/
|
|
4686
|
-
async
|
|
5157
|
+
async updateShipment(
|
|
4687
5158
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4688
5159
|
{ responseHeaders } = { responseHeaders: false }
|
|
4689
5160
|
) {
|
|
4690
|
-
const { error } = OrderPlatformValidator.
|
|
5161
|
+
const { error } = OrderPlatformValidator.updateShipment().validate(
|
|
4691
5162
|
{
|
|
4692
5163
|
body,
|
|
4693
5164
|
},
|
|
@@ -4700,7 +5171,7 @@ class Order {
|
|
|
4700
5171
|
// Showing warrnings if extra unknown parameters are found
|
|
4701
5172
|
const {
|
|
4702
5173
|
error: warrning,
|
|
4703
|
-
} = OrderPlatformValidator.
|
|
5174
|
+
} = OrderPlatformValidator.updateShipment().validate(
|
|
4704
5175
|
{
|
|
4705
5176
|
body,
|
|
4706
5177
|
},
|
|
@@ -4709,7 +5180,7 @@ class Order {
|
|
|
4709
5180
|
if (warrning) {
|
|
4710
5181
|
Logger({
|
|
4711
5182
|
level: "WARN",
|
|
4712
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
5183
|
+
message: `Parameter Validation warrnings for platform > Order > updateShipment \n ${warrning}`,
|
|
4713
5184
|
});
|
|
4714
5185
|
}
|
|
4715
5186
|
|
|
@@ -4720,7 +5191,7 @@ class Order {
|
|
|
4720
5191
|
const response = await PlatformAPIClient.execute(
|
|
4721
5192
|
this.config,
|
|
4722
5193
|
"put",
|
|
4723
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
5194
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/update`,
|
|
4724
5195
|
query_params,
|
|
4725
5196
|
body,
|
|
4726
5197
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4732,10 +5203,12 @@ class Order {
|
|
|
4732
5203
|
responseData = response[0];
|
|
4733
5204
|
}
|
|
4734
5205
|
|
|
4735
|
-
const {
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
5206
|
+
const {
|
|
5207
|
+
error: res_error,
|
|
5208
|
+
} = OrderPlatformModel.UpdateShipmentStatusResponseBody().validate(
|
|
5209
|
+
responseData,
|
|
5210
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5211
|
+
);
|
|
4739
5212
|
|
|
4740
5213
|
if (res_error) {
|
|
4741
5214
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4743,7 +5216,7 @@ class Order {
|
|
|
4743
5216
|
} else {
|
|
4744
5217
|
Logger({
|
|
4745
5218
|
level: "WARN",
|
|
4746
|
-
message: `Response Validation Warnings for platform > Order >
|
|
5219
|
+
message: `Response Validation Warnings for platform > Order > updateShipment \n ${res_error}`,
|
|
4747
5220
|
});
|
|
4748
5221
|
}
|
|
4749
5222
|
}
|
|
@@ -4755,12 +5228,11 @@ class Order {
|
|
|
4755
5228
|
* @param {OrderPlatformValidator.UpdateShipmentLockParam} arg - Arg object
|
|
4756
5229
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4757
5230
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4758
|
-
* @returns {Promise<OrderPlatformModel.
|
|
4759
|
-
*
|
|
4760
|
-
*
|
|
5231
|
+
* @returns {Promise<OrderPlatformModel.UpdateShipmentLockResponse>} -
|
|
5232
|
+
* Success response
|
|
4761
5233
|
* @name updateShipmentLock
|
|
4762
|
-
* @summary: Update
|
|
4763
|
-
* @description: Modify shipment/bag lock
|
|
5234
|
+
* @summary: Update shipment lock.
|
|
5235
|
+
* @description: Modify shipment/bag lock and check status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentLock/).
|
|
4764
5236
|
*/
|
|
4765
5237
|
async updateShipmentLock(
|
|
4766
5238
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4813,10 +5285,10 @@ class Order {
|
|
|
4813
5285
|
|
|
4814
5286
|
const {
|
|
4815
5287
|
error: res_error,
|
|
4816
|
-
} = OrderPlatformModel.
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
);
|
|
5288
|
+
} = OrderPlatformModel.UpdateShipmentLockResponse().validate(responseData, {
|
|
5289
|
+
abortEarly: false,
|
|
5290
|
+
allowUnknown: true,
|
|
5291
|
+
});
|
|
4820
5292
|
|
|
4821
5293
|
if (res_error) {
|
|
4822
5294
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4840,8 +5312,8 @@ class Order {
|
|
|
4840
5312
|
* - Success response
|
|
4841
5313
|
*
|
|
4842
5314
|
* @name updateShipmentStatus
|
|
4843
|
-
* @summary: Update
|
|
4844
|
-
* @description:
|
|
5315
|
+
* @summary: Update shipment status.
|
|
5316
|
+
* @description: Shipment state transition or Shipment data update or both. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentStatus/).
|
|
4845
5317
|
*/
|
|
4846
5318
|
async updateShipmentStatus(
|
|
4847
5319
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4920,8 +5392,8 @@ class Order {
|
|
|
4920
5392
|
* @returns {Promise<OrderPlatformModel.CourierPartnerTrackingDetails>} -
|
|
4921
5393
|
* Success response
|
|
4922
5394
|
* @name updateShipmentTracking
|
|
4923
|
-
* @summary: Update shipment tracking
|
|
4924
|
-
* @description: Modify courier partner tracking details for a given shipment
|
|
5395
|
+
* @summary: Update shipment tracking.
|
|
5396
|
+
* @description: Modify courier partner tracking details for a given shipment id or awb no. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentTracking/).
|
|
4925
5397
|
*/
|
|
4926
5398
|
async updateShipmentTracking(
|
|
4927
5399
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4994,19 +5466,20 @@ class Order {
|
|
|
4994
5466
|
}
|
|
4995
5467
|
|
|
4996
5468
|
/**
|
|
4997
|
-
* @param {OrderPlatformValidator.
|
|
5469
|
+
* @param {OrderPlatformValidator.UpdateUserViewPositionParam} arg - Arg object
|
|
4998
5470
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4999
5471
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5000
|
-
* @returns {Promise<OrderPlatformModel.
|
|
5001
|
-
*
|
|
5002
|
-
* @
|
|
5003
|
-
* @
|
|
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/).
|
|
5004
5477
|
*/
|
|
5005
|
-
async
|
|
5478
|
+
async updateUserViewPosition(
|
|
5006
5479
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
5007
5480
|
{ responseHeaders } = { responseHeaders: false }
|
|
5008
5481
|
) {
|
|
5009
|
-
const { error } = OrderPlatformValidator.
|
|
5482
|
+
const { error } = OrderPlatformValidator.updateUserViewPosition().validate(
|
|
5010
5483
|
{
|
|
5011
5484
|
body,
|
|
5012
5485
|
},
|
|
@@ -5019,7 +5492,7 @@ class Order {
|
|
|
5019
5492
|
// Showing warrnings if extra unknown parameters are found
|
|
5020
5493
|
const {
|
|
5021
5494
|
error: warrning,
|
|
5022
|
-
} = OrderPlatformValidator.
|
|
5495
|
+
} = OrderPlatformValidator.updateUserViewPosition().validate(
|
|
5023
5496
|
{
|
|
5024
5497
|
body,
|
|
5025
5498
|
},
|
|
@@ -5028,7 +5501,7 @@ class Order {
|
|
|
5028
5501
|
if (warrning) {
|
|
5029
5502
|
Logger({
|
|
5030
5503
|
level: "WARN",
|
|
5031
|
-
message: `Parameter Validation warrnings for platform > Order >
|
|
5504
|
+
message: `Parameter Validation warrnings for platform > Order > updateUserViewPosition \n ${warrning}`,
|
|
5032
5505
|
});
|
|
5033
5506
|
}
|
|
5034
5507
|
|
|
@@ -5038,8 +5511,88 @@ class Order {
|
|
|
5038
5511
|
|
|
5039
5512
|
const response = await PlatformAPIClient.execute(
|
|
5040
5513
|
this.config,
|
|
5041
|
-
"
|
|
5042
|
-
`/service/platform/order
|
|
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
|
|
5550
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5551
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5552
|
+
* @returns {Promise<OrderPlatformModel.CreateUpdateDeleteResponse>} -
|
|
5553
|
+
* Success response
|
|
5554
|
+
* @name updateUserViews
|
|
5555
|
+
* @summary: Update custom view for every unique user cross company pair.
|
|
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/).
|
|
5557
|
+
*/
|
|
5558
|
+
async updateUserViews(
|
|
5559
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
5560
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
5561
|
+
) {
|
|
5562
|
+
const { error } = OrderPlatformValidator.updateUserViews().validate(
|
|
5563
|
+
{
|
|
5564
|
+
body,
|
|
5565
|
+
},
|
|
5566
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5567
|
+
);
|
|
5568
|
+
if (error) {
|
|
5569
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
5570
|
+
}
|
|
5571
|
+
|
|
5572
|
+
// Showing warrnings if extra unknown parameters are found
|
|
5573
|
+
const {
|
|
5574
|
+
error: warrning,
|
|
5575
|
+
} = OrderPlatformValidator.updateUserViews().validate(
|
|
5576
|
+
{
|
|
5577
|
+
body,
|
|
5578
|
+
},
|
|
5579
|
+
{ abortEarly: false, allowUnknown: false }
|
|
5580
|
+
);
|
|
5581
|
+
if (warrning) {
|
|
5582
|
+
Logger({
|
|
5583
|
+
level: "WARN",
|
|
5584
|
+
message: `Parameter Validation warrnings for platform > Order > updateUserViews \n ${warrning}`,
|
|
5585
|
+
});
|
|
5586
|
+
}
|
|
5587
|
+
|
|
5588
|
+
const query_params = {};
|
|
5589
|
+
|
|
5590
|
+
const xHeaders = {};
|
|
5591
|
+
|
|
5592
|
+
const response = await PlatformAPIClient.execute(
|
|
5593
|
+
this.config,
|
|
5594
|
+
"put",
|
|
5595
|
+
`/service/platform/order/v1.0/company/${this.config.companyId}/views`,
|
|
5043
5596
|
query_params,
|
|
5044
5597
|
body,
|
|
5045
5598
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5053,7 +5606,7 @@ class Order {
|
|
|
5053
5606
|
|
|
5054
5607
|
const {
|
|
5055
5608
|
error: res_error,
|
|
5056
|
-
} = OrderPlatformModel.
|
|
5609
|
+
} = OrderPlatformModel.CreateUpdateDeleteResponse().validate(responseData, {
|
|
5057
5610
|
abortEarly: false,
|
|
5058
5611
|
allowUnknown: true,
|
|
5059
5612
|
});
|
|
@@ -5064,7 +5617,7 @@ class Order {
|
|
|
5064
5617
|
} else {
|
|
5065
5618
|
Logger({
|
|
5066
5619
|
level: "WARN",
|
|
5067
|
-
message: `Response Validation Warnings for platform > Order >
|
|
5620
|
+
message: `Response Validation Warnings for platform > Order > updateUserViews \n ${res_error}`,
|
|
5068
5621
|
});
|
|
5069
5622
|
}
|
|
5070
5623
|
}
|
|
@@ -5076,10 +5629,10 @@ class Order {
|
|
|
5076
5629
|
* @param {OrderPlatformValidator.VerifyMobileOTPParam} arg - Arg object
|
|
5077
5630
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5078
5631
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5079
|
-
* @returns {Promise<OrderPlatformModel.
|
|
5632
|
+
* @returns {Promise<OrderPlatformModel.VerifyOtpResponse>} - Success response
|
|
5080
5633
|
* @name verifyMobileOTP
|
|
5081
|
-
* @summary: Verify
|
|
5082
|
-
* @description:
|
|
5634
|
+
* @summary: Verify Mobile OTP
|
|
5635
|
+
* @description: Verify Mobile OTP - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/verifyMobileOTP/).
|
|
5083
5636
|
*/
|
|
5084
5637
|
async verifyMobileOTP(
|
|
5085
5638
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5132,7 +5685,7 @@ class Order {
|
|
|
5132
5685
|
|
|
5133
5686
|
const {
|
|
5134
5687
|
error: res_error,
|
|
5135
|
-
} = OrderPlatformModel.
|
|
5688
|
+
} = OrderPlatformModel.VerifyOtpResponse().validate(responseData, {
|
|
5136
5689
|
abortEarly: false,
|
|
5137
5690
|
allowUnknown: true,
|
|
5138
5691
|
});
|