@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,26 +15,24 @@ class Serviceability {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @param {ServiceabilityPlatformValidator.
|
|
18
|
+
* @param {ServiceabilityPlatformValidator.CreateCourierPartnerAccountParam} arg
|
|
19
|
+
* - Arg object
|
|
20
|
+
*
|
|
19
21
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
22
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
21
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* @
|
|
25
|
-
* @summary: Bulk update serviceability of localities
|
|
26
|
-
* @description: Bulk operations involve either new serviceability settings or updating existing ones in large quantities. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/bulkServiceability/).
|
|
23
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierAccount>} - Success response
|
|
24
|
+
* @name createCourierPartnerAccount
|
|
25
|
+
* @summary: Create courier account
|
|
26
|
+
* @description: Retrieves a list of courier partner accounts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerAccount/).
|
|
27
27
|
*/
|
|
28
|
-
async
|
|
29
|
-
{
|
|
28
|
+
async createCourierPartnerAccount(
|
|
29
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
30
30
|
{ responseHeaders } = { responseHeaders: false }
|
|
31
31
|
) {
|
|
32
32
|
const {
|
|
33
33
|
error,
|
|
34
|
-
} = ServiceabilityPlatformValidator.
|
|
34
|
+
} = ServiceabilityPlatformValidator.createCourierPartnerAccount().validate(
|
|
35
35
|
{
|
|
36
|
-
extensionId,
|
|
37
|
-
schemeId,
|
|
38
36
|
body,
|
|
39
37
|
},
|
|
40
38
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -46,10 +44,8 @@ class Serviceability {
|
|
|
46
44
|
// Showing warrnings if extra unknown parameters are found
|
|
47
45
|
const {
|
|
48
46
|
error: warrning,
|
|
49
|
-
} = ServiceabilityPlatformValidator.
|
|
47
|
+
} = ServiceabilityPlatformValidator.createCourierPartnerAccount().validate(
|
|
50
48
|
{
|
|
51
|
-
extensionId,
|
|
52
|
-
schemeId,
|
|
53
49
|
body,
|
|
54
50
|
},
|
|
55
51
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -57,7 +53,7 @@ class Serviceability {
|
|
|
57
53
|
if (warrning) {
|
|
58
54
|
Logger({
|
|
59
55
|
level: "WARN",
|
|
60
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
56
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createCourierPartnerAccount \n ${warrning}`,
|
|
61
57
|
});
|
|
62
58
|
}
|
|
63
59
|
|
|
@@ -68,7 +64,7 @@ class Serviceability {
|
|
|
68
64
|
const response = await PlatformAPIClient.execute(
|
|
69
65
|
this.config,
|
|
70
66
|
"post",
|
|
71
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner
|
|
67
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account`,
|
|
72
68
|
query_params,
|
|
73
69
|
body,
|
|
74
70
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -82,10 +78,10 @@ class Serviceability {
|
|
|
82
78
|
|
|
83
79
|
const {
|
|
84
80
|
error: res_error,
|
|
85
|
-
} = ServiceabilityPlatformModel.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
);
|
|
81
|
+
} = ServiceabilityPlatformModel.CourierAccount().validate(responseData, {
|
|
82
|
+
abortEarly: false,
|
|
83
|
+
allowUnknown: true,
|
|
84
|
+
});
|
|
89
85
|
|
|
90
86
|
if (res_error) {
|
|
91
87
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -93,7 +89,7 @@ class Serviceability {
|
|
|
93
89
|
} else {
|
|
94
90
|
Logger({
|
|
95
91
|
level: "WARN",
|
|
96
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
92
|
+
message: `Response Validation Warnings for platform > Serviceability > createCourierPartnerAccount \n ${res_error}`,
|
|
97
93
|
});
|
|
98
94
|
}
|
|
99
95
|
}
|
|
@@ -102,26 +98,28 @@ class Serviceability {
|
|
|
102
98
|
}
|
|
103
99
|
|
|
104
100
|
/**
|
|
105
|
-
* @param {ServiceabilityPlatformValidator.
|
|
101
|
+
* @param {ServiceabilityPlatformValidator.CreatePackageMaterialParam} arg
|
|
102
|
+
* - Arg object
|
|
103
|
+
*
|
|
106
104
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
107
105
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
108
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
106
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResponse>}
|
|
109
107
|
* - Success response
|
|
110
108
|
*
|
|
111
|
-
* @name
|
|
112
|
-
* @summary:
|
|
113
|
-
* @description:
|
|
114
|
-
* Export locality wise CSV files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/bulkTat/).
|
|
109
|
+
* @name createPackageMaterial
|
|
110
|
+
* @summary: Create packaging material
|
|
111
|
+
* @description: Creates a packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterial/).
|
|
115
112
|
*/
|
|
116
|
-
async
|
|
117
|
-
{
|
|
113
|
+
async createPackageMaterial(
|
|
114
|
+
{ body, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
118
115
|
{ responseHeaders } = { responseHeaders: false }
|
|
119
116
|
) {
|
|
120
|
-
const {
|
|
117
|
+
const {
|
|
118
|
+
error,
|
|
119
|
+
} = ServiceabilityPlatformValidator.createPackageMaterial().validate(
|
|
121
120
|
{
|
|
122
|
-
extensionId,
|
|
123
|
-
schemeId,
|
|
124
121
|
body,
|
|
122
|
+
pageNo,
|
|
125
123
|
},
|
|
126
124
|
{ abortEarly: false, allowUnknown: true }
|
|
127
125
|
);
|
|
@@ -132,29 +130,29 @@ class Serviceability {
|
|
|
132
130
|
// Showing warrnings if extra unknown parameters are found
|
|
133
131
|
const {
|
|
134
132
|
error: warrning,
|
|
135
|
-
} = ServiceabilityPlatformValidator.
|
|
133
|
+
} = ServiceabilityPlatformValidator.createPackageMaterial().validate(
|
|
136
134
|
{
|
|
137
|
-
extensionId,
|
|
138
|
-
schemeId,
|
|
139
135
|
body,
|
|
136
|
+
pageNo,
|
|
140
137
|
},
|
|
141
138
|
{ abortEarly: false, allowUnknown: false }
|
|
142
139
|
);
|
|
143
140
|
if (warrning) {
|
|
144
141
|
Logger({
|
|
145
142
|
level: "WARN",
|
|
146
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
143
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createPackageMaterial \n ${warrning}`,
|
|
147
144
|
});
|
|
148
145
|
}
|
|
149
146
|
|
|
150
147
|
const query_params = {};
|
|
148
|
+
query_params["page_no"] = pageNo;
|
|
151
149
|
|
|
152
150
|
const xHeaders = {};
|
|
153
151
|
|
|
154
152
|
const response = await PlatformAPIClient.execute(
|
|
155
153
|
this.config,
|
|
156
154
|
"post",
|
|
157
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
155
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-materials`,
|
|
158
156
|
query_params,
|
|
159
157
|
body,
|
|
160
158
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -168,7 +166,7 @@ class Serviceability {
|
|
|
168
166
|
|
|
169
167
|
const {
|
|
170
168
|
error: res_error,
|
|
171
|
-
} = ServiceabilityPlatformModel.
|
|
169
|
+
} = ServiceabilityPlatformModel.PackageMaterialResponse().validate(
|
|
172
170
|
responseData,
|
|
173
171
|
{ abortEarly: false, allowUnknown: true }
|
|
174
172
|
);
|
|
@@ -179,7 +177,7 @@ class Serviceability {
|
|
|
179
177
|
} else {
|
|
180
178
|
Logger({
|
|
181
179
|
level: "WARN",
|
|
182
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
180
|
+
message: `Response Validation Warnings for platform > Serviceability > createPackageMaterial \n ${res_error}`,
|
|
183
181
|
});
|
|
184
182
|
}
|
|
185
183
|
}
|
|
@@ -188,23 +186,24 @@ class Serviceability {
|
|
|
188
186
|
}
|
|
189
187
|
|
|
190
188
|
/**
|
|
191
|
-
* @param {ServiceabilityPlatformValidator.
|
|
189
|
+
* @param {ServiceabilityPlatformValidator.CreatePackageMaterialRuleParam} arg
|
|
192
190
|
* - Arg object
|
|
193
191
|
*
|
|
194
192
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
195
193
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
196
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
197
|
-
*
|
|
198
|
-
* @
|
|
199
|
-
* @
|
|
194
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageRuleResult>} -
|
|
195
|
+
* Success response
|
|
196
|
+
* @name createPackageMaterialRule
|
|
197
|
+
* @summary: Create packaging rule
|
|
198
|
+
* @description: Creates a packaging rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterialRule/).
|
|
200
199
|
*/
|
|
201
|
-
async
|
|
200
|
+
async createPackageMaterialRule(
|
|
202
201
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
203
202
|
{ responseHeaders } = { responseHeaders: false }
|
|
204
203
|
) {
|
|
205
204
|
const {
|
|
206
205
|
error,
|
|
207
|
-
} = ServiceabilityPlatformValidator.
|
|
206
|
+
} = ServiceabilityPlatformValidator.createPackageMaterialRule().validate(
|
|
208
207
|
{
|
|
209
208
|
body,
|
|
210
209
|
},
|
|
@@ -217,7 +216,7 @@ class Serviceability {
|
|
|
217
216
|
// Showing warrnings if extra unknown parameters are found
|
|
218
217
|
const {
|
|
219
218
|
error: warrning,
|
|
220
|
-
} = ServiceabilityPlatformValidator.
|
|
219
|
+
} = ServiceabilityPlatformValidator.createPackageMaterialRule().validate(
|
|
221
220
|
{
|
|
222
221
|
body,
|
|
223
222
|
},
|
|
@@ -226,7 +225,7 @@ class Serviceability {
|
|
|
226
225
|
if (warrning) {
|
|
227
226
|
Logger({
|
|
228
227
|
level: "WARN",
|
|
229
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
228
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createPackageMaterialRule \n ${warrning}`,
|
|
230
229
|
});
|
|
231
230
|
}
|
|
232
231
|
|
|
@@ -237,7 +236,7 @@ class Serviceability {
|
|
|
237
236
|
const response = await PlatformAPIClient.execute(
|
|
238
237
|
this.config,
|
|
239
238
|
"post",
|
|
240
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
239
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules`,
|
|
241
240
|
query_params,
|
|
242
241
|
body,
|
|
243
242
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -251,7 +250,7 @@ class Serviceability {
|
|
|
251
250
|
|
|
252
251
|
const {
|
|
253
252
|
error: res_error,
|
|
254
|
-
} = ServiceabilityPlatformModel.
|
|
253
|
+
} = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, {
|
|
255
254
|
abortEarly: false,
|
|
256
255
|
allowUnknown: true,
|
|
257
256
|
});
|
|
@@ -262,7 +261,7 @@ class Serviceability {
|
|
|
262
261
|
} else {
|
|
263
262
|
Logger({
|
|
264
263
|
level: "WARN",
|
|
265
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
264
|
+
message: `Response Validation Warnings for platform > Serviceability > createPackageMaterialRule \n ${res_error}`,
|
|
266
265
|
});
|
|
267
266
|
}
|
|
268
267
|
}
|
|
@@ -271,28 +270,24 @@ class Serviceability {
|
|
|
271
270
|
}
|
|
272
271
|
|
|
273
272
|
/**
|
|
274
|
-
* @param {ServiceabilityPlatformValidator.
|
|
273
|
+
* @param {ServiceabilityPlatformValidator.GetCompanyConfigurationParam} arg
|
|
275
274
|
* - Arg object
|
|
276
275
|
*
|
|
277
276
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
278
277
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
279
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
* @
|
|
283
|
-
* @summary: Create Scheme for courier partner extension
|
|
284
|
-
* @description: Create Scheme for courier partner extension - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerScheme/).
|
|
278
|
+
* @returns {Promise<ServiceabilityPlatformModel.CompanyConfig>} - Success response
|
|
279
|
+
* @name getCompanyConfiguration
|
|
280
|
+
* @summary: Get delivery configuration
|
|
281
|
+
* @description: Retrieves information about the delivery setup for a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCompanyConfiguration/).
|
|
285
282
|
*/
|
|
286
|
-
async
|
|
287
|
-
{
|
|
283
|
+
async getCompanyConfiguration(
|
|
284
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
288
285
|
{ responseHeaders } = { responseHeaders: false }
|
|
289
286
|
) {
|
|
290
287
|
const {
|
|
291
288
|
error,
|
|
292
|
-
} = ServiceabilityPlatformValidator.
|
|
293
|
-
{
|
|
294
|
-
body,
|
|
295
|
-
},
|
|
289
|
+
} = ServiceabilityPlatformValidator.getCompanyConfiguration().validate(
|
|
290
|
+
{},
|
|
296
291
|
{ abortEarly: false, allowUnknown: true }
|
|
297
292
|
);
|
|
298
293
|
if (error) {
|
|
@@ -302,16 +297,14 @@ class Serviceability {
|
|
|
302
297
|
// Showing warrnings if extra unknown parameters are found
|
|
303
298
|
const {
|
|
304
299
|
error: warrning,
|
|
305
|
-
} = ServiceabilityPlatformValidator.
|
|
306
|
-
{
|
|
307
|
-
body,
|
|
308
|
-
},
|
|
300
|
+
} = ServiceabilityPlatformValidator.getCompanyConfiguration().validate(
|
|
301
|
+
{},
|
|
309
302
|
{ abortEarly: false, allowUnknown: false }
|
|
310
303
|
);
|
|
311
304
|
if (warrning) {
|
|
312
305
|
Logger({
|
|
313
306
|
level: "WARN",
|
|
314
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
307
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCompanyConfiguration \n ${warrning}`,
|
|
315
308
|
});
|
|
316
309
|
}
|
|
317
310
|
|
|
@@ -321,10 +314,10 @@ class Serviceability {
|
|
|
321
314
|
|
|
322
315
|
const response = await PlatformAPIClient.execute(
|
|
323
316
|
this.config,
|
|
324
|
-
"
|
|
325
|
-
`/service/platform/logistics/
|
|
317
|
+
"get",
|
|
318
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/configuration`,
|
|
326
319
|
query_params,
|
|
327
|
-
|
|
320
|
+
undefined,
|
|
328
321
|
{ ...xHeaders, ...requestHeaders },
|
|
329
322
|
{ responseHeaders }
|
|
330
323
|
);
|
|
@@ -336,10 +329,10 @@ class Serviceability {
|
|
|
336
329
|
|
|
337
330
|
const {
|
|
338
331
|
error: res_error,
|
|
339
|
-
} = ServiceabilityPlatformModel.
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
);
|
|
332
|
+
} = ServiceabilityPlatformModel.CompanyConfig().validate(responseData, {
|
|
333
|
+
abortEarly: false,
|
|
334
|
+
allowUnknown: true,
|
|
335
|
+
});
|
|
343
336
|
|
|
344
337
|
if (res_error) {
|
|
345
338
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -347,7 +340,7 @@ class Serviceability {
|
|
|
347
340
|
} else {
|
|
348
341
|
Logger({
|
|
349
342
|
level: "WARN",
|
|
350
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
343
|
+
message: `Response Validation Warnings for platform > Serviceability > getCompanyConfiguration \n ${res_error}`,
|
|
351
344
|
});
|
|
352
345
|
}
|
|
353
346
|
}
|
|
@@ -356,27 +349,22 @@ class Serviceability {
|
|
|
356
349
|
}
|
|
357
350
|
|
|
358
351
|
/**
|
|
359
|
-
* @param {ServiceabilityPlatformValidator.
|
|
360
|
-
* - Arg object
|
|
361
|
-
*
|
|
352
|
+
* @param {ServiceabilityPlatformValidator.GetCompanySelfShipParam} arg - Arg object
|
|
362
353
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
363
354
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
364
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
365
|
-
*
|
|
366
|
-
* @
|
|
367
|
-
* @
|
|
368
|
-
* @description: Creates a packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterial/).
|
|
355
|
+
* @returns {Promise<ServiceabilityPlatformModel.CompanySelfShip>} - Success response
|
|
356
|
+
* @name getCompanySelfShip
|
|
357
|
+
* @summary: Update Company Self Ship
|
|
358
|
+
* @description: Updates Self Ship at company level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCompanySelfShip/).
|
|
369
359
|
*/
|
|
370
|
-
async
|
|
371
|
-
{
|
|
360
|
+
async getCompanySelfShip(
|
|
361
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
372
362
|
{ responseHeaders } = { responseHeaders: false }
|
|
373
363
|
) {
|
|
374
364
|
const {
|
|
375
365
|
error,
|
|
376
|
-
} = ServiceabilityPlatformValidator.
|
|
377
|
-
{
|
|
378
|
-
body,
|
|
379
|
-
},
|
|
366
|
+
} = ServiceabilityPlatformValidator.getCompanySelfShip().validate(
|
|
367
|
+
{},
|
|
380
368
|
{ abortEarly: false, allowUnknown: true }
|
|
381
369
|
);
|
|
382
370
|
if (error) {
|
|
@@ -386,16 +374,14 @@ class Serviceability {
|
|
|
386
374
|
// Showing warrnings if extra unknown parameters are found
|
|
387
375
|
const {
|
|
388
376
|
error: warrning,
|
|
389
|
-
} = ServiceabilityPlatformValidator.
|
|
390
|
-
{
|
|
391
|
-
body,
|
|
392
|
-
},
|
|
377
|
+
} = ServiceabilityPlatformValidator.getCompanySelfShip().validate(
|
|
378
|
+
{},
|
|
393
379
|
{ abortEarly: false, allowUnknown: false }
|
|
394
380
|
);
|
|
395
381
|
if (warrning) {
|
|
396
382
|
Logger({
|
|
397
383
|
level: "WARN",
|
|
398
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
384
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCompanySelfShip \n ${warrning}`,
|
|
399
385
|
});
|
|
400
386
|
}
|
|
401
387
|
|
|
@@ -405,10 +391,10 @@ class Serviceability {
|
|
|
405
391
|
|
|
406
392
|
const response = await PlatformAPIClient.execute(
|
|
407
393
|
this.config,
|
|
408
|
-
"
|
|
409
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
394
|
+
"get",
|
|
395
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/selfship`,
|
|
410
396
|
query_params,
|
|
411
|
-
|
|
397
|
+
undefined,
|
|
412
398
|
{ ...xHeaders, ...requestHeaders },
|
|
413
399
|
{ responseHeaders }
|
|
414
400
|
);
|
|
@@ -420,10 +406,10 @@ class Serviceability {
|
|
|
420
406
|
|
|
421
407
|
const {
|
|
422
408
|
error: res_error,
|
|
423
|
-
} = ServiceabilityPlatformModel.
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
);
|
|
409
|
+
} = ServiceabilityPlatformModel.CompanySelfShip().validate(responseData, {
|
|
410
|
+
abortEarly: false,
|
|
411
|
+
allowUnknown: true,
|
|
412
|
+
});
|
|
427
413
|
|
|
428
414
|
if (res_error) {
|
|
429
415
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -431,7 +417,7 @@ class Serviceability {
|
|
|
431
417
|
} else {
|
|
432
418
|
Logger({
|
|
433
419
|
level: "WARN",
|
|
434
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
420
|
+
message: `Response Validation Warnings for platform > Serviceability > getCompanySelfShip \n ${res_error}`,
|
|
435
421
|
});
|
|
436
422
|
}
|
|
437
423
|
}
|
|
@@ -440,26 +426,27 @@ class Serviceability {
|
|
|
440
426
|
}
|
|
441
427
|
|
|
442
428
|
/**
|
|
443
|
-
* @param {ServiceabilityPlatformValidator.
|
|
444
|
-
* - Arg object
|
|
445
|
-
*
|
|
429
|
+
* @param {ServiceabilityPlatformValidator.GetCountriesParam} arg - Arg object
|
|
446
430
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
447
431
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
448
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
449
|
-
*
|
|
450
|
-
* @
|
|
451
|
-
* @
|
|
452
|
-
* @description: Creates a packaging rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterialRule/).
|
|
432
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetCountries>} - Success response
|
|
433
|
+
* @name getCountries
|
|
434
|
+
* @summary: Get all countries and associated data.
|
|
435
|
+
* @description: Retrieve a list of countries for logistical purposes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCountries/).
|
|
453
436
|
*/
|
|
454
|
-
async
|
|
455
|
-
{
|
|
437
|
+
async getCountries(
|
|
438
|
+
{ onboard, pageNo, pageSize, q, hierarchy, requestHeaders } = {
|
|
439
|
+
requestHeaders: {},
|
|
440
|
+
},
|
|
456
441
|
{ responseHeaders } = { responseHeaders: false }
|
|
457
442
|
) {
|
|
458
|
-
const {
|
|
459
|
-
error,
|
|
460
|
-
} = ServiceabilityPlatformValidator.createPackageMaterialRule().validate(
|
|
443
|
+
const { error } = ServiceabilityPlatformValidator.getCountries().validate(
|
|
461
444
|
{
|
|
462
|
-
|
|
445
|
+
onboard,
|
|
446
|
+
pageNo,
|
|
447
|
+
pageSize,
|
|
448
|
+
q,
|
|
449
|
+
hierarchy,
|
|
463
450
|
},
|
|
464
451
|
{ abortEarly: false, allowUnknown: true }
|
|
465
452
|
);
|
|
@@ -470,29 +457,38 @@ class Serviceability {
|
|
|
470
457
|
// Showing warrnings if extra unknown parameters are found
|
|
471
458
|
const {
|
|
472
459
|
error: warrning,
|
|
473
|
-
} = ServiceabilityPlatformValidator.
|
|
460
|
+
} = ServiceabilityPlatformValidator.getCountries().validate(
|
|
474
461
|
{
|
|
475
|
-
|
|
462
|
+
onboard,
|
|
463
|
+
pageNo,
|
|
464
|
+
pageSize,
|
|
465
|
+
q,
|
|
466
|
+
hierarchy,
|
|
476
467
|
},
|
|
477
468
|
{ abortEarly: false, allowUnknown: false }
|
|
478
469
|
);
|
|
479
470
|
if (warrning) {
|
|
480
471
|
Logger({
|
|
481
472
|
level: "WARN",
|
|
482
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
473
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCountries \n ${warrning}`,
|
|
483
474
|
});
|
|
484
475
|
}
|
|
485
476
|
|
|
486
477
|
const query_params = {};
|
|
478
|
+
query_params["onboard"] = onboard;
|
|
479
|
+
query_params["page_no"] = pageNo;
|
|
480
|
+
query_params["page_size"] = pageSize;
|
|
481
|
+
query_params["q"] = q;
|
|
482
|
+
query_params["hierarchy"] = hierarchy;
|
|
487
483
|
|
|
488
484
|
const xHeaders = {};
|
|
489
485
|
|
|
490
486
|
const response = await PlatformAPIClient.execute(
|
|
491
487
|
this.config,
|
|
492
|
-
"
|
|
493
|
-
`/service/platform/logistics/
|
|
488
|
+
"get",
|
|
489
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/countries`,
|
|
494
490
|
query_params,
|
|
495
|
-
|
|
491
|
+
undefined,
|
|
496
492
|
{ ...xHeaders, ...requestHeaders },
|
|
497
493
|
{ responseHeaders }
|
|
498
494
|
);
|
|
@@ -504,7 +500,7 @@ class Serviceability {
|
|
|
504
500
|
|
|
505
501
|
const {
|
|
506
502
|
error: res_error,
|
|
507
|
-
} = ServiceabilityPlatformModel.
|
|
503
|
+
} = ServiceabilityPlatformModel.GetCountries().validate(responseData, {
|
|
508
504
|
abortEarly: false,
|
|
509
505
|
allowUnknown: true,
|
|
510
506
|
});
|
|
@@ -515,7 +511,7 @@ class Serviceability {
|
|
|
515
511
|
} else {
|
|
516
512
|
Logger({
|
|
517
513
|
level: "WARN",
|
|
518
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
514
|
+
message: `Response Validation Warnings for platform > Serviceability > getCountries \n ${res_error}`,
|
|
519
515
|
});
|
|
520
516
|
}
|
|
521
517
|
}
|
|
@@ -524,21 +520,21 @@ class Serviceability {
|
|
|
524
520
|
}
|
|
525
521
|
|
|
526
522
|
/**
|
|
527
|
-
* @param {ServiceabilityPlatformValidator.
|
|
523
|
+
* @param {ServiceabilityPlatformValidator.GetCountryParam} arg - Arg object
|
|
528
524
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
529
525
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
530
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
531
|
-
* @name
|
|
532
|
-
* @summary:
|
|
533
|
-
* @description:
|
|
526
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetCountry>} - Success response
|
|
527
|
+
* @name getCountry
|
|
528
|
+
* @summary: Get single country and associated data.
|
|
529
|
+
* @description: Retrieve data for a single country and address format. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCountry/).
|
|
534
530
|
*/
|
|
535
|
-
async
|
|
536
|
-
{
|
|
531
|
+
async getCountry(
|
|
532
|
+
{ countryIsoCode, requestHeaders } = { requestHeaders: {} },
|
|
537
533
|
{ responseHeaders } = { responseHeaders: false }
|
|
538
534
|
) {
|
|
539
|
-
const { error } = ServiceabilityPlatformValidator.
|
|
535
|
+
const { error } = ServiceabilityPlatformValidator.getCountry().validate(
|
|
540
536
|
{
|
|
541
|
-
|
|
537
|
+
countryIsoCode,
|
|
542
538
|
},
|
|
543
539
|
{ abortEarly: false, allowUnknown: true }
|
|
544
540
|
);
|
|
@@ -549,16 +545,16 @@ class Serviceability {
|
|
|
549
545
|
// Showing warrnings if extra unknown parameters are found
|
|
550
546
|
const {
|
|
551
547
|
error: warrning,
|
|
552
|
-
} = ServiceabilityPlatformValidator.
|
|
548
|
+
} = ServiceabilityPlatformValidator.getCountry().validate(
|
|
553
549
|
{
|
|
554
|
-
|
|
550
|
+
countryIsoCode,
|
|
555
551
|
},
|
|
556
552
|
{ abortEarly: false, allowUnknown: false }
|
|
557
553
|
);
|
|
558
554
|
if (warrning) {
|
|
559
555
|
Logger({
|
|
560
556
|
level: "WARN",
|
|
561
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
557
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCountry \n ${warrning}`,
|
|
562
558
|
});
|
|
563
559
|
}
|
|
564
560
|
|
|
@@ -568,10 +564,10 @@ class Serviceability {
|
|
|
568
564
|
|
|
569
565
|
const response = await PlatformAPIClient.execute(
|
|
570
566
|
this.config,
|
|
571
|
-
"
|
|
572
|
-
`/service/platform/logistics/
|
|
567
|
+
"get",
|
|
568
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/countries/${countryIsoCode}`,
|
|
573
569
|
query_params,
|
|
574
|
-
|
|
570
|
+
undefined,
|
|
575
571
|
{ ...xHeaders, ...requestHeaders },
|
|
576
572
|
{ responseHeaders }
|
|
577
573
|
);
|
|
@@ -583,7 +579,7 @@ class Serviceability {
|
|
|
583
579
|
|
|
584
580
|
const {
|
|
585
581
|
error: res_error,
|
|
586
|
-
} = ServiceabilityPlatformModel.
|
|
582
|
+
} = ServiceabilityPlatformModel.GetCountry().validate(responseData, {
|
|
587
583
|
abortEarly: false,
|
|
588
584
|
allowUnknown: true,
|
|
589
585
|
});
|
|
@@ -594,7 +590,7 @@ class Serviceability {
|
|
|
594
590
|
} else {
|
|
595
591
|
Logger({
|
|
596
592
|
level: "WARN",
|
|
597
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
593
|
+
message: `Response Validation Warnings for platform > Serviceability > getCountry \n ${res_error}`,
|
|
598
594
|
});
|
|
599
595
|
}
|
|
600
596
|
}
|
|
@@ -603,21 +599,27 @@ class Serviceability {
|
|
|
603
599
|
}
|
|
604
600
|
|
|
605
601
|
/**
|
|
606
|
-
* @param {ServiceabilityPlatformValidator.
|
|
602
|
+
* @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountParam} arg
|
|
603
|
+
* - Arg object
|
|
604
|
+
*
|
|
607
605
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
608
606
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
609
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
607
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierAccountResponse>} -
|
|
610
608
|
* Success response
|
|
611
|
-
* @name
|
|
612
|
-
* @summary: Get
|
|
613
|
-
* @description: Retrieves a
|
|
609
|
+
* @name getCourierPartnerAccount
|
|
610
|
+
* @summary: Get courier account
|
|
611
|
+
* @description: Retrieves a single courier partner account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerAccount/).
|
|
614
612
|
*/
|
|
615
|
-
async
|
|
616
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
613
|
+
async getCourierPartnerAccount(
|
|
614
|
+
{ accountId, requestHeaders } = { requestHeaders: {} },
|
|
617
615
|
{ responseHeaders } = { responseHeaders: false }
|
|
618
616
|
) {
|
|
619
|
-
const {
|
|
620
|
-
|
|
617
|
+
const {
|
|
618
|
+
error,
|
|
619
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate(
|
|
620
|
+
{
|
|
621
|
+
accountId,
|
|
622
|
+
},
|
|
621
623
|
{ abortEarly: false, allowUnknown: true }
|
|
622
624
|
);
|
|
623
625
|
if (error) {
|
|
@@ -627,14 +629,16 @@ class Serviceability {
|
|
|
627
629
|
// Showing warrnings if extra unknown parameters are found
|
|
628
630
|
const {
|
|
629
631
|
error: warrning,
|
|
630
|
-
} = ServiceabilityPlatformValidator.
|
|
631
|
-
{
|
|
632
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate(
|
|
633
|
+
{
|
|
634
|
+
accountId,
|
|
635
|
+
},
|
|
632
636
|
{ abortEarly: false, allowUnknown: false }
|
|
633
637
|
);
|
|
634
638
|
if (warrning) {
|
|
635
639
|
Logger({
|
|
636
640
|
level: "WARN",
|
|
637
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
641
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerAccount \n ${warrning}`,
|
|
638
642
|
});
|
|
639
643
|
}
|
|
640
644
|
|
|
@@ -645,7 +649,7 @@ class Serviceability {
|
|
|
645
649
|
const response = await PlatformAPIClient.execute(
|
|
646
650
|
this.config,
|
|
647
651
|
"get",
|
|
648
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
652
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account/${accountId}`,
|
|
649
653
|
query_params,
|
|
650
654
|
undefined,
|
|
651
655
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -659,7 +663,7 @@ class Serviceability {
|
|
|
659
663
|
|
|
660
664
|
const {
|
|
661
665
|
error: res_error,
|
|
662
|
-
} = ServiceabilityPlatformModel.
|
|
666
|
+
} = ServiceabilityPlatformModel.CourierAccountResponse().validate(
|
|
663
667
|
responseData,
|
|
664
668
|
{ abortEarly: false, allowUnknown: true }
|
|
665
669
|
);
|
|
@@ -670,7 +674,7 @@ class Serviceability {
|
|
|
670
674
|
} else {
|
|
671
675
|
Logger({
|
|
672
676
|
level: "WARN",
|
|
673
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
677
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerAccount \n ${res_error}`,
|
|
674
678
|
});
|
|
675
679
|
}
|
|
676
680
|
}
|
|
@@ -679,48 +683,46 @@ class Serviceability {
|
|
|
679
683
|
}
|
|
680
684
|
|
|
681
685
|
/**
|
|
682
|
-
* @param {ServiceabilityPlatformValidator.
|
|
686
|
+
* @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountsParam} arg
|
|
683
687
|
* - Arg object
|
|
684
688
|
*
|
|
685
689
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
686
690
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
687
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
* @
|
|
691
|
+
* @returns {Promise<ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResponse>}
|
|
692
|
+
* - Success response
|
|
693
|
+
*
|
|
694
|
+
* @name getCourierPartnerAccounts
|
|
695
|
+
* @summary: List courier accounts
|
|
696
|
+
* @description: Retrieves a list of courier partner accounts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerAccounts/).
|
|
691
697
|
*/
|
|
692
|
-
async
|
|
698
|
+
async getCourierPartnerAccounts(
|
|
693
699
|
{
|
|
694
|
-
extensionId,
|
|
695
|
-
schemeId,
|
|
696
700
|
pageNo,
|
|
697
701
|
pageSize,
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
702
|
+
stage,
|
|
703
|
+
paymentMode,
|
|
704
|
+
transportType,
|
|
705
|
+
accountIds,
|
|
706
|
+
selfShip,
|
|
707
|
+
ownAccount,
|
|
708
|
+
q,
|
|
705
709
|
requestHeaders,
|
|
706
710
|
} = { requestHeaders: {} },
|
|
707
711
|
{ responseHeaders } = { responseHeaders: false }
|
|
708
712
|
) {
|
|
709
713
|
const {
|
|
710
714
|
error,
|
|
711
|
-
} = ServiceabilityPlatformValidator.
|
|
715
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate(
|
|
712
716
|
{
|
|
713
|
-
extensionId,
|
|
714
|
-
schemeId,
|
|
715
717
|
pageNo,
|
|
716
718
|
pageSize,
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
719
|
+
stage,
|
|
720
|
+
paymentMode,
|
|
721
|
+
transportType,
|
|
722
|
+
accountIds,
|
|
723
|
+
selfShip,
|
|
724
|
+
ownAccount,
|
|
725
|
+
q,
|
|
724
726
|
},
|
|
725
727
|
{ abortEarly: false, allowUnknown: true }
|
|
726
728
|
);
|
|
@@ -731,46 +733,44 @@ class Serviceability {
|
|
|
731
733
|
// Showing warrnings if extra unknown parameters are found
|
|
732
734
|
const {
|
|
733
735
|
error: warrning,
|
|
734
|
-
} = ServiceabilityPlatformValidator.
|
|
736
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate(
|
|
735
737
|
{
|
|
736
|
-
extensionId,
|
|
737
|
-
schemeId,
|
|
738
738
|
pageNo,
|
|
739
739
|
pageSize,
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
740
|
+
stage,
|
|
741
|
+
paymentMode,
|
|
742
|
+
transportType,
|
|
743
|
+
accountIds,
|
|
744
|
+
selfShip,
|
|
745
|
+
ownAccount,
|
|
746
|
+
q,
|
|
747
747
|
},
|
|
748
748
|
{ abortEarly: false, allowUnknown: false }
|
|
749
749
|
);
|
|
750
750
|
if (warrning) {
|
|
751
751
|
Logger({
|
|
752
752
|
level: "WARN",
|
|
753
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
753
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerAccounts \n ${warrning}`,
|
|
754
754
|
});
|
|
755
755
|
}
|
|
756
756
|
|
|
757
757
|
const query_params = {};
|
|
758
758
|
query_params["page_no"] = pageNo;
|
|
759
759
|
query_params["page_size"] = pageSize;
|
|
760
|
-
query_params["
|
|
761
|
-
query_params["
|
|
762
|
-
query_params["
|
|
763
|
-
query_params["
|
|
764
|
-
query_params["
|
|
765
|
-
query_params["
|
|
766
|
-
query_params["
|
|
760
|
+
query_params["stage"] = stage;
|
|
761
|
+
query_params["payment_mode"] = paymentMode;
|
|
762
|
+
query_params["transport_type"] = transportType;
|
|
763
|
+
query_params["account_ids"] = accountIds;
|
|
764
|
+
query_params["self_ship"] = selfShip;
|
|
765
|
+
query_params["own_account"] = ownAccount;
|
|
766
|
+
query_params["q"] = q;
|
|
767
767
|
|
|
768
768
|
const xHeaders = {};
|
|
769
769
|
|
|
770
770
|
const response = await PlatformAPIClient.execute(
|
|
771
771
|
this.config,
|
|
772
772
|
"get",
|
|
773
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner
|
|
773
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account`,
|
|
774
774
|
query_params,
|
|
775
775
|
undefined,
|
|
776
776
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -784,10 +784,10 @@ class Serviceability {
|
|
|
784
784
|
|
|
785
785
|
const {
|
|
786
786
|
error: res_error,
|
|
787
|
-
} = ServiceabilityPlatformModel.
|
|
788
|
-
|
|
789
|
-
allowUnknown: true
|
|
790
|
-
|
|
787
|
+
} = ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResponse().validate(
|
|
788
|
+
responseData,
|
|
789
|
+
{ abortEarly: false, allowUnknown: true }
|
|
790
|
+
);
|
|
791
791
|
|
|
792
792
|
if (res_error) {
|
|
793
793
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -795,7 +795,7 @@ class Serviceability {
|
|
|
795
795
|
} else {
|
|
796
796
|
Logger({
|
|
797
797
|
level: "WARN",
|
|
798
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
798
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerAccounts \n ${res_error}`,
|
|
799
799
|
});
|
|
800
800
|
}
|
|
801
801
|
}
|
|
@@ -804,44 +804,29 @@ class Serviceability {
|
|
|
804
804
|
}
|
|
805
805
|
|
|
806
806
|
/**
|
|
807
|
-
* @param {ServiceabilityPlatformValidator.
|
|
807
|
+
* @param {ServiceabilityPlatformValidator.GetInstalledCourierPartnerExtensionsParam} arg
|
|
808
|
+
* - Arg object
|
|
809
|
+
*
|
|
808
810
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
809
811
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
810
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
811
|
-
*
|
|
812
|
-
*
|
|
813
|
-
* @
|
|
812
|
+
* @returns {Promise<ServiceabilityPlatformModel.InstallCourierPartnerResponseSchema>}
|
|
813
|
+
* - Success response
|
|
814
|
+
*
|
|
815
|
+
* @name getInstalledCourierPartnerExtensions
|
|
816
|
+
* @summary: Fetching of Package Material Rules from database.
|
|
817
|
+
* @description: This API returns response of Package Materials Rules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getInstalledCourierPartnerExtensions/).
|
|
814
818
|
*/
|
|
815
|
-
async
|
|
816
|
-
{
|
|
817
|
-
extensionId,
|
|
818
|
-
schemeId,
|
|
819
|
-
pageNo,
|
|
820
|
-
pageSize,
|
|
821
|
-
batchId,
|
|
822
|
-
action,
|
|
823
|
-
status,
|
|
824
|
-
country,
|
|
825
|
-
region,
|
|
826
|
-
startDate,
|
|
827
|
-
endDate,
|
|
828
|
-
requestHeaders,
|
|
829
|
-
} = { requestHeaders: {} },
|
|
819
|
+
async getInstalledCourierPartnerExtensions(
|
|
820
|
+
{ pageNo, pageSize, isInstalled, requestHeaders } = { requestHeaders: {} },
|
|
830
821
|
{ responseHeaders } = { responseHeaders: false }
|
|
831
822
|
) {
|
|
832
|
-
const {
|
|
823
|
+
const {
|
|
824
|
+
error,
|
|
825
|
+
} = ServiceabilityPlatformValidator.getInstalledCourierPartnerExtensions().validate(
|
|
833
826
|
{
|
|
834
|
-
extensionId,
|
|
835
|
-
schemeId,
|
|
836
827
|
pageNo,
|
|
837
828
|
pageSize,
|
|
838
|
-
|
|
839
|
-
action,
|
|
840
|
-
status,
|
|
841
|
-
country,
|
|
842
|
-
region,
|
|
843
|
-
startDate,
|
|
844
|
-
endDate,
|
|
829
|
+
isInstalled,
|
|
845
830
|
},
|
|
846
831
|
{ abortEarly: false, allowUnknown: true }
|
|
847
832
|
);
|
|
@@ -852,46 +837,32 @@ class Serviceability {
|
|
|
852
837
|
// Showing warrnings if extra unknown parameters are found
|
|
853
838
|
const {
|
|
854
839
|
error: warrning,
|
|
855
|
-
} = ServiceabilityPlatformValidator.
|
|
840
|
+
} = ServiceabilityPlatformValidator.getInstalledCourierPartnerExtensions().validate(
|
|
856
841
|
{
|
|
857
|
-
extensionId,
|
|
858
|
-
schemeId,
|
|
859
842
|
pageNo,
|
|
860
843
|
pageSize,
|
|
861
|
-
|
|
862
|
-
action,
|
|
863
|
-
status,
|
|
864
|
-
country,
|
|
865
|
-
region,
|
|
866
|
-
startDate,
|
|
867
|
-
endDate,
|
|
844
|
+
isInstalled,
|
|
868
845
|
},
|
|
869
846
|
{ abortEarly: false, allowUnknown: false }
|
|
870
847
|
);
|
|
871
848
|
if (warrning) {
|
|
872
849
|
Logger({
|
|
873
850
|
level: "WARN",
|
|
874
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
851
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getInstalledCourierPartnerExtensions \n ${warrning}`,
|
|
875
852
|
});
|
|
876
853
|
}
|
|
877
854
|
|
|
878
855
|
const query_params = {};
|
|
879
856
|
query_params["page_no"] = pageNo;
|
|
880
857
|
query_params["page_size"] = pageSize;
|
|
881
|
-
query_params["
|
|
882
|
-
query_params["action"] = action;
|
|
883
|
-
query_params["status"] = status;
|
|
884
|
-
query_params["country"] = country;
|
|
885
|
-
query_params["region"] = region;
|
|
886
|
-
query_params["start_date"] = startDate;
|
|
887
|
-
query_params["end_date"] = endDate;
|
|
858
|
+
query_params["is_installed"] = isInstalled;
|
|
888
859
|
|
|
889
860
|
const xHeaders = {};
|
|
890
861
|
|
|
891
862
|
const response = await PlatformAPIClient.execute(
|
|
892
863
|
this.config,
|
|
893
864
|
"get",
|
|
894
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner
|
|
865
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/list`,
|
|
895
866
|
query_params,
|
|
896
867
|
undefined,
|
|
897
868
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -905,10 +876,10 @@ class Serviceability {
|
|
|
905
876
|
|
|
906
877
|
const {
|
|
907
878
|
error: res_error,
|
|
908
|
-
} = ServiceabilityPlatformModel.
|
|
909
|
-
|
|
910
|
-
allowUnknown: true
|
|
911
|
-
|
|
879
|
+
} = ServiceabilityPlatformModel.InstallCourierPartnerResponseSchema().validate(
|
|
880
|
+
responseData,
|
|
881
|
+
{ abortEarly: false, allowUnknown: true }
|
|
882
|
+
);
|
|
912
883
|
|
|
913
884
|
if (res_error) {
|
|
914
885
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -916,7 +887,7 @@ class Serviceability {
|
|
|
916
887
|
} else {
|
|
917
888
|
Logger({
|
|
918
889
|
level: "WARN",
|
|
919
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
890
|
+
message: `Response Validation Warnings for platform > Serviceability > getInstalledCourierPartnerExtensions \n ${res_error}`,
|
|
920
891
|
});
|
|
921
892
|
}
|
|
922
893
|
}
|
|
@@ -925,24 +896,30 @@ class Serviceability {
|
|
|
925
896
|
}
|
|
926
897
|
|
|
927
898
|
/**
|
|
928
|
-
* @param {ServiceabilityPlatformValidator.
|
|
899
|
+
* @param {ServiceabilityPlatformValidator.GetListPackageMaterialRuleDetailsParam} arg
|
|
929
900
|
* - Arg object
|
|
930
901
|
*
|
|
931
902
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
932
903
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
933
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
934
|
-
*
|
|
935
|
-
*
|
|
936
|
-
* @
|
|
904
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialRuleList>}
|
|
905
|
+
* - Success response
|
|
906
|
+
*
|
|
907
|
+
* @name getListPackageMaterialRuleDetails
|
|
908
|
+
* @summary: Fetching of Package Material Rules from database.
|
|
909
|
+
* @description: This API returns response of Package Materials Rules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getListPackageMaterialRuleDetails/).
|
|
937
910
|
*/
|
|
938
|
-
async
|
|
939
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
911
|
+
async getListPackageMaterialRuleDetails(
|
|
912
|
+
{ pageNo, pageSize, isActive, requestHeaders } = { requestHeaders: {} },
|
|
940
913
|
{ responseHeaders } = { responseHeaders: false }
|
|
941
914
|
) {
|
|
942
915
|
const {
|
|
943
916
|
error,
|
|
944
|
-
} = ServiceabilityPlatformValidator.
|
|
945
|
-
{
|
|
917
|
+
} = ServiceabilityPlatformValidator.getListPackageMaterialRuleDetails().validate(
|
|
918
|
+
{
|
|
919
|
+
pageNo,
|
|
920
|
+
pageSize,
|
|
921
|
+
isActive,
|
|
922
|
+
},
|
|
946
923
|
{ abortEarly: false, allowUnknown: true }
|
|
947
924
|
);
|
|
948
925
|
if (error) {
|
|
@@ -952,25 +929,32 @@ class Serviceability {
|
|
|
952
929
|
// Showing warrnings if extra unknown parameters are found
|
|
953
930
|
const {
|
|
954
931
|
error: warrning,
|
|
955
|
-
} = ServiceabilityPlatformValidator.
|
|
956
|
-
{
|
|
932
|
+
} = ServiceabilityPlatformValidator.getListPackageMaterialRuleDetails().validate(
|
|
933
|
+
{
|
|
934
|
+
pageNo,
|
|
935
|
+
pageSize,
|
|
936
|
+
isActive,
|
|
937
|
+
},
|
|
957
938
|
{ abortEarly: false, allowUnknown: false }
|
|
958
939
|
);
|
|
959
940
|
if (warrning) {
|
|
960
941
|
Logger({
|
|
961
942
|
level: "WARN",
|
|
962
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
943
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getListPackageMaterialRuleDetails \n ${warrning}`,
|
|
963
944
|
});
|
|
964
945
|
}
|
|
965
946
|
|
|
966
947
|
const query_params = {};
|
|
948
|
+
query_params["page_no"] = pageNo;
|
|
949
|
+
query_params["page_size"] = pageSize;
|
|
950
|
+
query_params["is_active"] = isActive;
|
|
967
951
|
|
|
968
952
|
const xHeaders = {};
|
|
969
953
|
|
|
970
954
|
const response = await PlatformAPIClient.execute(
|
|
971
955
|
this.config,
|
|
972
956
|
"get",
|
|
973
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
957
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules/details`,
|
|
974
958
|
query_params,
|
|
975
959
|
undefined,
|
|
976
960
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -984,10 +968,10 @@ class Serviceability {
|
|
|
984
968
|
|
|
985
969
|
const {
|
|
986
970
|
error: res_error,
|
|
987
|
-
} = ServiceabilityPlatformModel.
|
|
988
|
-
|
|
989
|
-
allowUnknown: true
|
|
990
|
-
|
|
971
|
+
} = ServiceabilityPlatformModel.PackageMaterialRuleList().validate(
|
|
972
|
+
responseData,
|
|
973
|
+
{ abortEarly: false, allowUnknown: true }
|
|
974
|
+
);
|
|
991
975
|
|
|
992
976
|
if (res_error) {
|
|
993
977
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -995,7 +979,7 @@ class Serviceability {
|
|
|
995
979
|
} else {
|
|
996
980
|
Logger({
|
|
997
981
|
level: "WARN",
|
|
998
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
982
|
+
message: `Response Validation Warnings for platform > Serviceability > getListPackageMaterialRuleDetails \n ${res_error}`,
|
|
999
983
|
});
|
|
1000
984
|
}
|
|
1001
985
|
}
|
|
@@ -1004,27 +988,38 @@ class Serviceability {
|
|
|
1004
988
|
}
|
|
1005
989
|
|
|
1006
990
|
/**
|
|
1007
|
-
* @param {ServiceabilityPlatformValidator.
|
|
991
|
+
* @param {ServiceabilityPlatformValidator.GetLocalitiesParam} arg - Arg object
|
|
1008
992
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1009
993
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1010
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1011
|
-
* @name
|
|
1012
|
-
* @summary: Get
|
|
1013
|
-
* @description:
|
|
994
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetLocalities>} - Success response
|
|
995
|
+
* @name getLocalities
|
|
996
|
+
* @summary: Get Localities.
|
|
997
|
+
* @description: Get Localities data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getLocalities/).
|
|
1014
998
|
*/
|
|
1015
|
-
async
|
|
1016
|
-
{
|
|
1017
|
-
|
|
1018
|
-
|
|
999
|
+
async getLocalities(
|
|
1000
|
+
{
|
|
1001
|
+
localityType,
|
|
1002
|
+
country,
|
|
1003
|
+
state,
|
|
1004
|
+
city,
|
|
1005
|
+
pageNo,
|
|
1006
|
+
pageSize,
|
|
1007
|
+
q,
|
|
1008
|
+
name,
|
|
1009
|
+
requestHeaders,
|
|
1010
|
+
} = { requestHeaders: {} },
|
|
1019
1011
|
{ responseHeaders } = { responseHeaders: false }
|
|
1020
1012
|
) {
|
|
1021
|
-
const { error } = ServiceabilityPlatformValidator.
|
|
1013
|
+
const { error } = ServiceabilityPlatformValidator.getLocalities().validate(
|
|
1022
1014
|
{
|
|
1023
|
-
|
|
1015
|
+
localityType,
|
|
1016
|
+
country,
|
|
1017
|
+
state,
|
|
1018
|
+
city,
|
|
1024
1019
|
pageNo,
|
|
1025
1020
|
pageSize,
|
|
1026
1021
|
q,
|
|
1027
|
-
|
|
1022
|
+
name,
|
|
1028
1023
|
},
|
|
1029
1024
|
{ abortEarly: false, allowUnknown: true }
|
|
1030
1025
|
);
|
|
@@ -1035,36 +1030,41 @@ class Serviceability {
|
|
|
1035
1030
|
// Showing warrnings if extra unknown parameters are found
|
|
1036
1031
|
const {
|
|
1037
1032
|
error: warrning,
|
|
1038
|
-
} = ServiceabilityPlatformValidator.
|
|
1033
|
+
} = ServiceabilityPlatformValidator.getLocalities().validate(
|
|
1039
1034
|
{
|
|
1040
|
-
|
|
1035
|
+
localityType,
|
|
1036
|
+
country,
|
|
1037
|
+
state,
|
|
1038
|
+
city,
|
|
1041
1039
|
pageNo,
|
|
1042
1040
|
pageSize,
|
|
1043
1041
|
q,
|
|
1044
|
-
|
|
1042
|
+
name,
|
|
1045
1043
|
},
|
|
1046
1044
|
{ abortEarly: false, allowUnknown: false }
|
|
1047
1045
|
);
|
|
1048
1046
|
if (warrning) {
|
|
1049
1047
|
Logger({
|
|
1050
1048
|
level: "WARN",
|
|
1051
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1049
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getLocalities \n ${warrning}`,
|
|
1052
1050
|
});
|
|
1053
1051
|
}
|
|
1054
1052
|
|
|
1055
1053
|
const query_params = {};
|
|
1056
|
-
query_params["
|
|
1054
|
+
query_params["country"] = country;
|
|
1055
|
+
query_params["state"] = state;
|
|
1056
|
+
query_params["city"] = city;
|
|
1057
1057
|
query_params["page_no"] = pageNo;
|
|
1058
1058
|
query_params["page_size"] = pageSize;
|
|
1059
1059
|
query_params["q"] = q;
|
|
1060
|
-
query_params["
|
|
1060
|
+
query_params["name"] = name;
|
|
1061
1061
|
|
|
1062
1062
|
const xHeaders = {};
|
|
1063
1063
|
|
|
1064
1064
|
const response = await PlatformAPIClient.execute(
|
|
1065
1065
|
this.config,
|
|
1066
1066
|
"get",
|
|
1067
|
-
`/service/platform/logistics/
|
|
1067
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/localities/${localityType}`,
|
|
1068
1068
|
query_params,
|
|
1069
1069
|
undefined,
|
|
1070
1070
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1078,7 +1078,7 @@ class Serviceability {
|
|
|
1078
1078
|
|
|
1079
1079
|
const {
|
|
1080
1080
|
error: res_error,
|
|
1081
|
-
} = ServiceabilityPlatformModel.
|
|
1081
|
+
} = ServiceabilityPlatformModel.GetLocalities().validate(responseData, {
|
|
1082
1082
|
abortEarly: false,
|
|
1083
1083
|
allowUnknown: true,
|
|
1084
1084
|
});
|
|
@@ -1089,7 +1089,7 @@ class Serviceability {
|
|
|
1089
1089
|
} else {
|
|
1090
1090
|
Logger({
|
|
1091
1091
|
level: "WARN",
|
|
1092
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1092
|
+
message: `Response Validation Warnings for platform > Serviceability > getLocalities \n ${res_error}`,
|
|
1093
1093
|
});
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
@@ -1098,117 +1098,78 @@ class Serviceability {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
|
|
1100
1100
|
/**
|
|
1101
|
-
* @param {
|
|
1102
|
-
*
|
|
1103
|
-
*
|
|
1104
|
-
* @param {
|
|
1105
|
-
*
|
|
1106
|
-
* @
|
|
1107
|
-
*
|
|
1108
|
-
* @
|
|
1109
|
-
* @
|
|
1110
|
-
* @
|
|
1101
|
+
* @param {Object} arg - Arg object.
|
|
1102
|
+
* @param {string} arg.localityType - A `locality_type` contains unique
|
|
1103
|
+
* geographical division.
|
|
1104
|
+
* @param {string} [arg.country] - A `country` contains a specific value of
|
|
1105
|
+
* the country iso2 code.
|
|
1106
|
+
* @param {string} [arg.state] - A `state` contains a specific value of the
|
|
1107
|
+
* state, province.
|
|
1108
|
+
* @param {string} [arg.city] - A `city` contains a specific value of the city.
|
|
1109
|
+
* @param {number} [arg.pageSize] - Page size.
|
|
1110
|
+
* @param {string} [arg.q] - Search.
|
|
1111
|
+
* @param {string} [arg.name] - Search for localities. Either provide a full
|
|
1112
|
+
* name or a search term.
|
|
1113
|
+
* @returns {Paginator<ServiceabilityPlatformModel.GetLocalities>}
|
|
1114
|
+
* @summary: Get Localities.
|
|
1115
|
+
* @description: Get Localities data.
|
|
1111
1116
|
*/
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1136
|
-
);
|
|
1137
|
-
if (warrning) {
|
|
1138
|
-
Logger({
|
|
1139
|
-
level: "WARN",
|
|
1140
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerAccount \n ${warrning}`,
|
|
1117
|
+
getLocalitiesPaginator({
|
|
1118
|
+
localityType,
|
|
1119
|
+
country,
|
|
1120
|
+
state,
|
|
1121
|
+
city,
|
|
1122
|
+
pageSize,
|
|
1123
|
+
q,
|
|
1124
|
+
name,
|
|
1125
|
+
} = {}) {
|
|
1126
|
+
const paginator = new Paginator();
|
|
1127
|
+
const callback = async () => {
|
|
1128
|
+
const pageId = paginator.nextId;
|
|
1129
|
+
const pageNo = paginator.pageNo;
|
|
1130
|
+
const pageType = "number";
|
|
1131
|
+
const data = await this.getLocalities({
|
|
1132
|
+
localityType: localityType,
|
|
1133
|
+
country: country,
|
|
1134
|
+
state: state,
|
|
1135
|
+
city: city,
|
|
1136
|
+
pageNo: pageNo,
|
|
1137
|
+
pageSize: pageSize,
|
|
1138
|
+
q: q,
|
|
1139
|
+
name: name,
|
|
1141
1140
|
});
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
"get",
|
|
1151
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account/${accountId}`,
|
|
1152
|
-
query_params,
|
|
1153
|
-
undefined,
|
|
1154
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1155
|
-
{ responseHeaders }
|
|
1156
|
-
);
|
|
1157
|
-
|
|
1158
|
-
let responseData = response;
|
|
1159
|
-
if (responseHeaders) {
|
|
1160
|
-
responseData = response[0];
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
const {
|
|
1164
|
-
error: res_error,
|
|
1165
|
-
} = ServiceabilityPlatformModel.CourierAccountResult().validate(
|
|
1166
|
-
responseData,
|
|
1167
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1168
|
-
);
|
|
1169
|
-
|
|
1170
|
-
if (res_error) {
|
|
1171
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1172
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1173
|
-
} else {
|
|
1174
|
-
Logger({
|
|
1175
|
-
level: "WARN",
|
|
1176
|
-
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerAccount \n ${res_error}`,
|
|
1177
|
-
});
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
return response;
|
|
1141
|
+
paginator.setPaginator({
|
|
1142
|
+
hasNext: data.page.has_next ? true : false,
|
|
1143
|
+
nextId: data.page.next_id,
|
|
1144
|
+
});
|
|
1145
|
+
return data;
|
|
1146
|
+
};
|
|
1147
|
+
paginator.setCallback(callback.bind(this));
|
|
1148
|
+
return paginator;
|
|
1182
1149
|
}
|
|
1183
1150
|
|
|
1184
1151
|
/**
|
|
1185
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1186
|
-
* - Arg object
|
|
1187
|
-
*
|
|
1152
|
+
* @param {ServiceabilityPlatformValidator.GetLocalityParam} arg - Arg object
|
|
1188
1153
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1189
1154
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1190
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1191
|
-
*
|
|
1192
|
-
*
|
|
1193
|
-
* @
|
|
1194
|
-
* @summary: List courier accounts
|
|
1195
|
-
* @description: Retrieves a list of courier partner accounts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerAccounts/).
|
|
1155
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetLocality>} - Success response
|
|
1156
|
+
* @name getLocality
|
|
1157
|
+
* @summary: Get Locality API
|
|
1158
|
+
* @description: Get Locality data - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getLocality/).
|
|
1196
1159
|
*/
|
|
1197
|
-
async
|
|
1198
|
-
{
|
|
1160
|
+
async getLocality(
|
|
1161
|
+
{ localityType, localityValue, country, state, city, requestHeaders } = {
|
|
1199
1162
|
requestHeaders: {},
|
|
1200
1163
|
},
|
|
1201
1164
|
{ responseHeaders } = { responseHeaders: false }
|
|
1202
1165
|
) {
|
|
1203
|
-
const {
|
|
1204
|
-
error,
|
|
1205
|
-
} = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate(
|
|
1166
|
+
const { error } = ServiceabilityPlatformValidator.getLocality().validate(
|
|
1206
1167
|
{
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1168
|
+
localityType,
|
|
1169
|
+
localityValue,
|
|
1170
|
+
country,
|
|
1171
|
+
state,
|
|
1172
|
+
city,
|
|
1212
1173
|
},
|
|
1213
1174
|
{ abortEarly: false, allowUnknown: true }
|
|
1214
1175
|
);
|
|
@@ -1219,653 +1180,34 @@ class Serviceability {
|
|
|
1219
1180
|
// Showing warrnings if extra unknown parameters are found
|
|
1220
1181
|
const {
|
|
1221
1182
|
error: warrning,
|
|
1222
|
-
} = ServiceabilityPlatformValidator.
|
|
1183
|
+
} = ServiceabilityPlatformValidator.getLocality().validate(
|
|
1223
1184
|
{
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1185
|
+
localityType,
|
|
1186
|
+
localityValue,
|
|
1187
|
+
country,
|
|
1188
|
+
state,
|
|
1189
|
+
city,
|
|
1229
1190
|
},
|
|
1230
1191
|
{ abortEarly: false, allowUnknown: false }
|
|
1231
1192
|
);
|
|
1232
1193
|
if (warrning) {
|
|
1233
1194
|
Logger({
|
|
1234
1195
|
level: "WARN",
|
|
1235
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1236
|
-
});
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
const query_params = {};
|
|
1240
|
-
query_params["page_no"] = pageNo;
|
|
1241
|
-
query_params["page_size"] = pageSize;
|
|
1242
|
-
query_params["stage"] = stage;
|
|
1243
|
-
query_params["payment_mode"] = paymentMode;
|
|
1244
|
-
query_params["transport_type"] = transportType;
|
|
1245
|
-
|
|
1246
|
-
const xHeaders = {};
|
|
1247
|
-
|
|
1248
|
-
const response = await PlatformAPIClient.execute(
|
|
1249
|
-
this.config,
|
|
1250
|
-
"get",
|
|
1251
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account`,
|
|
1252
|
-
query_params,
|
|
1253
|
-
undefined,
|
|
1254
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1255
|
-
{ responseHeaders }
|
|
1256
|
-
);
|
|
1257
|
-
|
|
1258
|
-
let responseData = response;
|
|
1259
|
-
if (responseHeaders) {
|
|
1260
|
-
responseData = response[0];
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
const {
|
|
1264
|
-
error: res_error,
|
|
1265
|
-
} = ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResult().validate(
|
|
1266
|
-
responseData,
|
|
1267
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1268
|
-
);
|
|
1269
|
-
|
|
1270
|
-
if (res_error) {
|
|
1271
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1272
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1273
|
-
} else {
|
|
1274
|
-
Logger({
|
|
1275
|
-
level: "WARN",
|
|
1276
|
-
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerAccounts \n ${res_error}`,
|
|
1277
|
-
});
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
return response;
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
/**
|
|
1285
|
-
* @param {ServiceabilityPlatformValidator.GetCourierPartnerSchemeParam} arg
|
|
1286
|
-
* - Arg object
|
|
1287
|
-
*
|
|
1288
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1289
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1290
|
-
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerV2SchemeModel>}
|
|
1291
|
-
* - Success response
|
|
1292
|
-
*
|
|
1293
|
-
* @name getCourierPartnerScheme
|
|
1294
|
-
* @summary: Get Scheme for courier partner extension by Id
|
|
1295
|
-
* @description: Update Scheme for courier partner extension by Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerScheme/).
|
|
1296
|
-
*/
|
|
1297
|
-
async getCourierPartnerScheme(
|
|
1298
|
-
{ schemeId, requestHeaders } = { requestHeaders: {} },
|
|
1299
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1300
|
-
) {
|
|
1301
|
-
const {
|
|
1302
|
-
error,
|
|
1303
|
-
} = ServiceabilityPlatformValidator.getCourierPartnerScheme().validate(
|
|
1304
|
-
{ schemeId },
|
|
1305
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1306
|
-
);
|
|
1307
|
-
if (error) {
|
|
1308
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1312
|
-
const {
|
|
1313
|
-
error: warrning,
|
|
1314
|
-
} = ServiceabilityPlatformValidator.getCourierPartnerScheme().validate(
|
|
1315
|
-
{ schemeId },
|
|
1316
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1317
|
-
);
|
|
1318
|
-
if (warrning) {
|
|
1319
|
-
Logger({
|
|
1320
|
-
level: "WARN",
|
|
1321
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerScheme \n ${warrning}`,
|
|
1322
|
-
});
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
const query_params = {};
|
|
1326
|
-
|
|
1327
|
-
const xHeaders = {};
|
|
1328
|
-
|
|
1329
|
-
const response = await PlatformAPIClient.execute(
|
|
1330
|
-
this.config,
|
|
1331
|
-
"get",
|
|
1332
|
-
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme/${schemeId}`,
|
|
1333
|
-
query_params,
|
|
1334
|
-
undefined,
|
|
1335
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1336
|
-
{ responseHeaders }
|
|
1337
|
-
);
|
|
1338
|
-
|
|
1339
|
-
let responseData = response;
|
|
1340
|
-
if (responseHeaders) {
|
|
1341
|
-
responseData = response[0];
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
const {
|
|
1345
|
-
error: res_error,
|
|
1346
|
-
} = ServiceabilityPlatformModel.CourierPartnerV2SchemeModel().validate(
|
|
1347
|
-
responseData,
|
|
1348
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1349
|
-
);
|
|
1350
|
-
|
|
1351
|
-
if (res_error) {
|
|
1352
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1353
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1354
|
-
} else {
|
|
1355
|
-
Logger({
|
|
1356
|
-
level: "WARN",
|
|
1357
|
-
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerScheme \n ${res_error}`,
|
|
1358
|
-
});
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
return response;
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
/**
|
|
1366
|
-
* @param {ServiceabilityPlatformValidator.GetCourierPartnerSchemesParam} arg
|
|
1367
|
-
* - Arg object
|
|
1368
|
-
*
|
|
1369
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1370
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1371
|
-
* @returns {Promise<ServiceabilityPlatformModel.courierPartnerSchemeV2List>}
|
|
1372
|
-
* - Success response
|
|
1373
|
-
*
|
|
1374
|
-
* @name getCourierPartnerSchemes
|
|
1375
|
-
* @summary: Get created Schemes for courier partner
|
|
1376
|
-
* @description: Get created Schemes for courier partner - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerSchemes/).
|
|
1377
|
-
*/
|
|
1378
|
-
async getCourierPartnerSchemes(
|
|
1379
|
-
{ schemeType, paymentMode, capabilities, schemeIds, requestHeaders } = {
|
|
1380
|
-
requestHeaders: {},
|
|
1381
|
-
},
|
|
1382
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1383
|
-
) {
|
|
1384
|
-
const {
|
|
1385
|
-
error,
|
|
1386
|
-
} = ServiceabilityPlatformValidator.getCourierPartnerSchemes().validate(
|
|
1387
|
-
{
|
|
1388
|
-
schemeType,
|
|
1389
|
-
paymentMode,
|
|
1390
|
-
capabilities,
|
|
1391
|
-
schemeIds,
|
|
1392
|
-
},
|
|
1393
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1394
|
-
);
|
|
1395
|
-
if (error) {
|
|
1396
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1400
|
-
const {
|
|
1401
|
-
error: warrning,
|
|
1402
|
-
} = ServiceabilityPlatformValidator.getCourierPartnerSchemes().validate(
|
|
1403
|
-
{
|
|
1404
|
-
schemeType,
|
|
1405
|
-
paymentMode,
|
|
1406
|
-
capabilities,
|
|
1407
|
-
schemeIds,
|
|
1408
|
-
},
|
|
1409
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1410
|
-
);
|
|
1411
|
-
if (warrning) {
|
|
1412
|
-
Logger({
|
|
1413
|
-
level: "WARN",
|
|
1414
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerSchemes \n ${warrning}`,
|
|
1415
|
-
});
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
const query_params = {};
|
|
1419
|
-
query_params["scheme_type"] = schemeType;
|
|
1420
|
-
query_params["payment_mode"] = paymentMode;
|
|
1421
|
-
query_params["capabilities"] = capabilities;
|
|
1422
|
-
query_params["scheme_ids"] = schemeIds;
|
|
1423
|
-
|
|
1424
|
-
const xHeaders = {};
|
|
1425
|
-
|
|
1426
|
-
const response = await PlatformAPIClient.execute(
|
|
1427
|
-
this.config,
|
|
1428
|
-
"get",
|
|
1429
|
-
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme`,
|
|
1430
|
-
query_params,
|
|
1431
|
-
undefined,
|
|
1432
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1433
|
-
{ responseHeaders }
|
|
1434
|
-
);
|
|
1435
|
-
|
|
1436
|
-
let responseData = response;
|
|
1437
|
-
if (responseHeaders) {
|
|
1438
|
-
responseData = response[0];
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
|
-
const {
|
|
1442
|
-
error: res_error,
|
|
1443
|
-
} = ServiceabilityPlatformModel.courierPartnerSchemeV2List().validate(
|
|
1444
|
-
responseData,
|
|
1445
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1446
|
-
);
|
|
1447
|
-
|
|
1448
|
-
if (res_error) {
|
|
1449
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1450
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1451
|
-
} else {
|
|
1452
|
-
Logger({
|
|
1453
|
-
level: "WARN",
|
|
1454
|
-
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerSchemes \n ${res_error}`,
|
|
1455
|
-
});
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
return response;
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
/**
|
|
1463
|
-
* @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object
|
|
1464
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1465
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1466
|
-
* @returns {Promise<ServiceabilityPlatformModel.OptimalLocationsResult>} -
|
|
1467
|
-
* Success response
|
|
1468
|
-
* @name getOptimalLocations
|
|
1469
|
-
* @summary: Get selling locations
|
|
1470
|
-
* @description: Retrieves a list selling locations which are best suited to fullfil an order for a customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getOptimalLocations/).
|
|
1471
|
-
*/
|
|
1472
|
-
async getOptimalLocations(
|
|
1473
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1474
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1475
|
-
) {
|
|
1476
|
-
const {
|
|
1477
|
-
error,
|
|
1478
|
-
} = ServiceabilityPlatformValidator.getOptimalLocations().validate(
|
|
1479
|
-
{
|
|
1480
|
-
body,
|
|
1481
|
-
},
|
|
1482
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1483
|
-
);
|
|
1484
|
-
if (error) {
|
|
1485
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1489
|
-
const {
|
|
1490
|
-
error: warrning,
|
|
1491
|
-
} = ServiceabilityPlatformValidator.getOptimalLocations().validate(
|
|
1492
|
-
{
|
|
1493
|
-
body,
|
|
1494
|
-
},
|
|
1495
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1496
|
-
);
|
|
1497
|
-
if (warrning) {
|
|
1498
|
-
Logger({
|
|
1499
|
-
level: "WARN",
|
|
1500
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getOptimalLocations \n ${warrning}`,
|
|
1501
|
-
});
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
const query_params = {};
|
|
1505
|
-
|
|
1506
|
-
const xHeaders = {};
|
|
1507
|
-
|
|
1508
|
-
const response = await PlatformAPIClient.execute(
|
|
1509
|
-
this.config,
|
|
1510
|
-
"post",
|
|
1511
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/optimal-locations`,
|
|
1512
|
-
query_params,
|
|
1513
|
-
body,
|
|
1514
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1515
|
-
{ responseHeaders }
|
|
1516
|
-
);
|
|
1517
|
-
|
|
1518
|
-
let responseData = response;
|
|
1519
|
-
if (responseHeaders) {
|
|
1520
|
-
responseData = response[0];
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
const {
|
|
1524
|
-
error: res_error,
|
|
1525
|
-
} = ServiceabilityPlatformModel.OptimalLocationsResult().validate(
|
|
1526
|
-
responseData,
|
|
1527
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1528
|
-
);
|
|
1529
|
-
|
|
1530
|
-
if (res_error) {
|
|
1531
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1532
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1533
|
-
} else {
|
|
1534
|
-
Logger({
|
|
1535
|
-
level: "WARN",
|
|
1536
|
-
message: `Response Validation Warnings for platform > Serviceability > getOptimalLocations \n ${res_error}`,
|
|
1537
|
-
});
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
return response;
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
/**
|
|
1545
|
-
* @param {ServiceabilityPlatformValidator.GetPackageMaterialListParam} arg
|
|
1546
|
-
* - Arg object
|
|
1547
|
-
*
|
|
1548
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1549
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1550
|
-
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialList>} -
|
|
1551
|
-
* Success response
|
|
1552
|
-
* @name getPackageMaterialList
|
|
1553
|
-
* @summary: Get packaging materials
|
|
1554
|
-
* @description: Retrieves a list of packaging materials - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialList/).
|
|
1555
|
-
*/
|
|
1556
|
-
async getPackageMaterialList(
|
|
1557
|
-
{ pageNo, pageSize, q, size, packageType, requestHeaders } = {
|
|
1558
|
-
requestHeaders: {},
|
|
1559
|
-
},
|
|
1560
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1561
|
-
) {
|
|
1562
|
-
const {
|
|
1563
|
-
error,
|
|
1564
|
-
} = ServiceabilityPlatformValidator.getPackageMaterialList().validate(
|
|
1565
|
-
{
|
|
1566
|
-
pageNo,
|
|
1567
|
-
pageSize,
|
|
1568
|
-
q,
|
|
1569
|
-
size,
|
|
1570
|
-
packageType,
|
|
1571
|
-
},
|
|
1572
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1573
|
-
);
|
|
1574
|
-
if (error) {
|
|
1575
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1579
|
-
const {
|
|
1580
|
-
error: warrning,
|
|
1581
|
-
} = ServiceabilityPlatformValidator.getPackageMaterialList().validate(
|
|
1582
|
-
{
|
|
1583
|
-
pageNo,
|
|
1584
|
-
pageSize,
|
|
1585
|
-
q,
|
|
1586
|
-
size,
|
|
1587
|
-
packageType,
|
|
1588
|
-
},
|
|
1589
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1590
|
-
);
|
|
1591
|
-
if (warrning) {
|
|
1592
|
-
Logger({
|
|
1593
|
-
level: "WARN",
|
|
1594
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialList \n ${warrning}`,
|
|
1595
|
-
});
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
const query_params = {};
|
|
1599
|
-
query_params["page_no"] = pageNo;
|
|
1600
|
-
query_params["page_size"] = pageSize;
|
|
1601
|
-
query_params["q"] = q;
|
|
1602
|
-
query_params["size"] = size;
|
|
1603
|
-
query_params["package_type"] = packageType;
|
|
1604
|
-
|
|
1605
|
-
const xHeaders = {};
|
|
1606
|
-
|
|
1607
|
-
const response = await PlatformAPIClient.execute(
|
|
1608
|
-
this.config,
|
|
1609
|
-
"get",
|
|
1610
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-materials`,
|
|
1611
|
-
query_params,
|
|
1612
|
-
undefined,
|
|
1613
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1614
|
-
{ responseHeaders }
|
|
1615
|
-
);
|
|
1616
|
-
|
|
1617
|
-
let responseData = response;
|
|
1618
|
-
if (responseHeaders) {
|
|
1619
|
-
responseData = response[0];
|
|
1620
|
-
}
|
|
1621
|
-
|
|
1622
|
-
const {
|
|
1623
|
-
error: res_error,
|
|
1624
|
-
} = ServiceabilityPlatformModel.PackageMaterialList().validate(
|
|
1625
|
-
responseData,
|
|
1626
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1627
|
-
);
|
|
1628
|
-
|
|
1629
|
-
if (res_error) {
|
|
1630
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1631
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1632
|
-
} else {
|
|
1633
|
-
Logger({
|
|
1634
|
-
level: "WARN",
|
|
1635
|
-
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialList \n ${res_error}`,
|
|
1636
|
-
});
|
|
1637
|
-
}
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
return response;
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
/**
|
|
1644
|
-
* @param {ServiceabilityPlatformValidator.GetPackageMaterialRuleParam} arg
|
|
1645
|
-
* - Arg object
|
|
1646
|
-
*
|
|
1647
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1648
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1649
|
-
* @returns {Promise<ServiceabilityPlatformModel.PackageRuleResult>} -
|
|
1650
|
-
* Success response
|
|
1651
|
-
* @name getPackageMaterialRule
|
|
1652
|
-
* @summary: Get packaging material rule
|
|
1653
|
-
* @description: Retrieve packaging rule details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRule/).
|
|
1654
|
-
*/
|
|
1655
|
-
async getPackageMaterialRule(
|
|
1656
|
-
{ ruleId, requestHeaders } = { requestHeaders: {} },
|
|
1657
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1658
|
-
) {
|
|
1659
|
-
const {
|
|
1660
|
-
error,
|
|
1661
|
-
} = ServiceabilityPlatformValidator.getPackageMaterialRule().validate(
|
|
1662
|
-
{
|
|
1663
|
-
ruleId,
|
|
1664
|
-
},
|
|
1665
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1666
|
-
);
|
|
1667
|
-
if (error) {
|
|
1668
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1669
|
-
}
|
|
1670
|
-
|
|
1671
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1672
|
-
const {
|
|
1673
|
-
error: warrning,
|
|
1674
|
-
} = ServiceabilityPlatformValidator.getPackageMaterialRule().validate(
|
|
1675
|
-
{
|
|
1676
|
-
ruleId,
|
|
1677
|
-
},
|
|
1678
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1679
|
-
);
|
|
1680
|
-
if (warrning) {
|
|
1681
|
-
Logger({
|
|
1682
|
-
level: "WARN",
|
|
1683
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialRule \n ${warrning}`,
|
|
1684
|
-
});
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
const query_params = {};
|
|
1688
|
-
|
|
1689
|
-
const xHeaders = {};
|
|
1690
|
-
|
|
1691
|
-
const response = await PlatformAPIClient.execute(
|
|
1692
|
-
this.config,
|
|
1693
|
-
"get",
|
|
1694
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules/${ruleId}`,
|
|
1695
|
-
query_params,
|
|
1696
|
-
undefined,
|
|
1697
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1698
|
-
{ responseHeaders }
|
|
1699
|
-
);
|
|
1700
|
-
|
|
1701
|
-
let responseData = response;
|
|
1702
|
-
if (responseHeaders) {
|
|
1703
|
-
responseData = response[0];
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
const {
|
|
1707
|
-
error: res_error,
|
|
1708
|
-
} = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, {
|
|
1709
|
-
abortEarly: false,
|
|
1710
|
-
allowUnknown: true,
|
|
1711
|
-
});
|
|
1712
|
-
|
|
1713
|
-
if (res_error) {
|
|
1714
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1715
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1716
|
-
} else {
|
|
1717
|
-
Logger({
|
|
1718
|
-
level: "WARN",
|
|
1719
|
-
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialRule \n ${res_error}`,
|
|
1720
|
-
});
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
|
|
1724
|
-
return response;
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
/**
|
|
1728
|
-
* @param {ServiceabilityPlatformValidator.GetPackageMaterialRulesParam} arg
|
|
1729
|
-
* - Arg object
|
|
1730
|
-
*
|
|
1731
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1732
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1733
|
-
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialRuleList>}
|
|
1734
|
-
* - Success response
|
|
1735
|
-
*
|
|
1736
|
-
* @name getPackageMaterialRules
|
|
1737
|
-
* @summary: Get packaging rules
|
|
1738
|
-
* @description: Retrieve packaging rules - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRules/).
|
|
1739
|
-
*/
|
|
1740
|
-
async getPackageMaterialRules(
|
|
1741
|
-
{ pageNo, pageSize, isActive, requestHeaders } = { requestHeaders: {} },
|
|
1742
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1743
|
-
) {
|
|
1744
|
-
const {
|
|
1745
|
-
error,
|
|
1746
|
-
} = ServiceabilityPlatformValidator.getPackageMaterialRules().validate(
|
|
1747
|
-
{
|
|
1748
|
-
pageNo,
|
|
1749
|
-
pageSize,
|
|
1750
|
-
isActive,
|
|
1751
|
-
},
|
|
1752
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1753
|
-
);
|
|
1754
|
-
if (error) {
|
|
1755
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1759
|
-
const {
|
|
1760
|
-
error: warrning,
|
|
1761
|
-
} = ServiceabilityPlatformValidator.getPackageMaterialRules().validate(
|
|
1762
|
-
{
|
|
1763
|
-
pageNo,
|
|
1764
|
-
pageSize,
|
|
1765
|
-
isActive,
|
|
1766
|
-
},
|
|
1767
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1768
|
-
);
|
|
1769
|
-
if (warrning) {
|
|
1770
|
-
Logger({
|
|
1771
|
-
level: "WARN",
|
|
1772
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialRules \n ${warrning}`,
|
|
1773
|
-
});
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1776
|
-
const query_params = {};
|
|
1777
|
-
query_params["page_no"] = pageNo;
|
|
1778
|
-
query_params["page_size"] = pageSize;
|
|
1779
|
-
query_params["is_active"] = isActive;
|
|
1780
|
-
|
|
1781
|
-
const xHeaders = {};
|
|
1782
|
-
|
|
1783
|
-
const response = await PlatformAPIClient.execute(
|
|
1784
|
-
this.config,
|
|
1785
|
-
"get",
|
|
1786
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules`,
|
|
1787
|
-
query_params,
|
|
1788
|
-
undefined,
|
|
1789
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1790
|
-
{ responseHeaders }
|
|
1791
|
-
);
|
|
1792
|
-
|
|
1793
|
-
let responseData = response;
|
|
1794
|
-
if (responseHeaders) {
|
|
1795
|
-
responseData = response[0];
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
const {
|
|
1799
|
-
error: res_error,
|
|
1800
|
-
} = ServiceabilityPlatformModel.PackageMaterialRuleList().validate(
|
|
1801
|
-
responseData,
|
|
1802
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1803
|
-
);
|
|
1804
|
-
|
|
1805
|
-
if (res_error) {
|
|
1806
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1807
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1808
|
-
} else {
|
|
1809
|
-
Logger({
|
|
1810
|
-
level: "WARN",
|
|
1811
|
-
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialRules \n ${res_error}`,
|
|
1812
|
-
});
|
|
1813
|
-
}
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
return response;
|
|
1817
|
-
}
|
|
1818
|
-
|
|
1819
|
-
/**
|
|
1820
|
-
* @param {ServiceabilityPlatformValidator.GetPackageMaterialsParam} arg - Arg object
|
|
1821
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1822
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1823
|
-
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResult>} -
|
|
1824
|
-
* Success response
|
|
1825
|
-
* @name getPackageMaterials
|
|
1826
|
-
* @summary: Get packaging material
|
|
1827
|
-
* @description: Retrieve a single packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterials/).
|
|
1828
|
-
*/
|
|
1829
|
-
async getPackageMaterials(
|
|
1830
|
-
{ packageMaterialId, requestHeaders } = { requestHeaders: {} },
|
|
1831
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1832
|
-
) {
|
|
1833
|
-
const {
|
|
1834
|
-
error,
|
|
1835
|
-
} = ServiceabilityPlatformValidator.getPackageMaterials().validate(
|
|
1836
|
-
{
|
|
1837
|
-
packageMaterialId,
|
|
1838
|
-
},
|
|
1839
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1840
|
-
);
|
|
1841
|
-
if (error) {
|
|
1842
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1846
|
-
const {
|
|
1847
|
-
error: warrning,
|
|
1848
|
-
} = ServiceabilityPlatformValidator.getPackageMaterials().validate(
|
|
1849
|
-
{
|
|
1850
|
-
packageMaterialId,
|
|
1851
|
-
},
|
|
1852
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1853
|
-
);
|
|
1854
|
-
if (warrning) {
|
|
1855
|
-
Logger({
|
|
1856
|
-
level: "WARN",
|
|
1857
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterials \n ${warrning}`,
|
|
1196
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getLocality \n ${warrning}`,
|
|
1858
1197
|
});
|
|
1859
1198
|
}
|
|
1860
1199
|
|
|
1861
1200
|
const query_params = {};
|
|
1201
|
+
query_params["country"] = country;
|
|
1202
|
+
query_params["state"] = state;
|
|
1203
|
+
query_params["city"] = city;
|
|
1862
1204
|
|
|
1863
1205
|
const xHeaders = {};
|
|
1864
1206
|
|
|
1865
1207
|
const response = await PlatformAPIClient.execute(
|
|
1866
1208
|
this.config,
|
|
1867
1209
|
"get",
|
|
1868
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1210
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/localities/${localityType}/${localityValue}`,
|
|
1869
1211
|
query_params,
|
|
1870
1212
|
undefined,
|
|
1871
1213
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1879,10 +1221,10 @@ class Serviceability {
|
|
|
1879
1221
|
|
|
1880
1222
|
const {
|
|
1881
1223
|
error: res_error,
|
|
1882
|
-
} = ServiceabilityPlatformModel.
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
);
|
|
1224
|
+
} = ServiceabilityPlatformModel.GetLocality().validate(responseData, {
|
|
1225
|
+
abortEarly: false,
|
|
1226
|
+
allowUnknown: true,
|
|
1227
|
+
});
|
|
1886
1228
|
|
|
1887
1229
|
if (res_error) {
|
|
1888
1230
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1890,7 +1232,7 @@ class Serviceability {
|
|
|
1890
1232
|
} else {
|
|
1891
1233
|
Logger({
|
|
1892
1234
|
level: "WARN",
|
|
1893
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1235
|
+
message: `Response Validation Warnings for platform > Serviceability > getLocality \n ${res_error}`,
|
|
1894
1236
|
});
|
|
1895
1237
|
}
|
|
1896
1238
|
}
|
|
@@ -1899,29 +1241,25 @@ class Serviceability {
|
|
|
1899
1241
|
}
|
|
1900
1242
|
|
|
1901
1243
|
/**
|
|
1902
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1903
|
-
* - Arg object
|
|
1904
|
-
*
|
|
1244
|
+
* @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object
|
|
1905
1245
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1906
1246
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1907
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1247
|
+
* @returns {Promise<ServiceabilityPlatformModel.OptimalLocationsResponse>}
|
|
1908
1248
|
* - Success response
|
|
1909
1249
|
*
|
|
1910
|
-
* @name
|
|
1911
|
-
* @summary: Get
|
|
1912
|
-
* @description:
|
|
1250
|
+
* @name getOptimalLocations
|
|
1251
|
+
* @summary: Get selling locations
|
|
1252
|
+
* @description: Retrieves a list selling locations which are best suited to fullfil an order for a customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getOptimalLocations/).
|
|
1913
1253
|
*/
|
|
1914
|
-
async
|
|
1915
|
-
{
|
|
1254
|
+
async getOptimalLocations(
|
|
1255
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1916
1256
|
{ responseHeaders } = { responseHeaders: false }
|
|
1917
1257
|
) {
|
|
1918
1258
|
const {
|
|
1919
1259
|
error,
|
|
1920
|
-
} = ServiceabilityPlatformValidator.
|
|
1260
|
+
} = ServiceabilityPlatformValidator.getOptimalLocations().validate(
|
|
1921
1261
|
{
|
|
1922
|
-
|
|
1923
|
-
pageSize,
|
|
1924
|
-
batchId,
|
|
1262
|
+
body,
|
|
1925
1263
|
},
|
|
1926
1264
|
{ abortEarly: false, allowUnknown: true }
|
|
1927
1265
|
);
|
|
@@ -1932,34 +1270,29 @@ class Serviceability {
|
|
|
1932
1270
|
// Showing warrnings if extra unknown parameters are found
|
|
1933
1271
|
const {
|
|
1934
1272
|
error: warrning,
|
|
1935
|
-
} = ServiceabilityPlatformValidator.
|
|
1273
|
+
} = ServiceabilityPlatformValidator.getOptimalLocations().validate(
|
|
1936
1274
|
{
|
|
1937
|
-
|
|
1938
|
-
pageSize,
|
|
1939
|
-
batchId,
|
|
1275
|
+
body,
|
|
1940
1276
|
},
|
|
1941
1277
|
{ abortEarly: false, allowUnknown: false }
|
|
1942
1278
|
);
|
|
1943
1279
|
if (warrning) {
|
|
1944
1280
|
Logger({
|
|
1945
1281
|
level: "WARN",
|
|
1946
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1282
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getOptimalLocations \n ${warrning}`,
|
|
1947
1283
|
});
|
|
1948
1284
|
}
|
|
1949
1285
|
|
|
1950
1286
|
const query_params = {};
|
|
1951
|
-
query_params["page_no"] = pageNo;
|
|
1952
|
-
query_params["page_size"] = pageSize;
|
|
1953
|
-
query_params["batch_id"] = batchId;
|
|
1954
1287
|
|
|
1955
1288
|
const xHeaders = {};
|
|
1956
1289
|
|
|
1957
1290
|
const response = await PlatformAPIClient.execute(
|
|
1958
1291
|
this.config,
|
|
1959
|
-
"
|
|
1960
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1292
|
+
"post",
|
|
1293
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/optimal-locations`,
|
|
1961
1294
|
query_params,
|
|
1962
|
-
|
|
1295
|
+
body,
|
|
1963
1296
|
{ ...xHeaders, ...requestHeaders },
|
|
1964
1297
|
{ responseHeaders }
|
|
1965
1298
|
);
|
|
@@ -1971,7 +1304,7 @@ class Serviceability {
|
|
|
1971
1304
|
|
|
1972
1305
|
const {
|
|
1973
1306
|
error: res_error,
|
|
1974
|
-
} = ServiceabilityPlatformModel.
|
|
1307
|
+
} = ServiceabilityPlatformModel.OptimalLocationsResponse().validate(
|
|
1975
1308
|
responseData,
|
|
1976
1309
|
{ abortEarly: false, allowUnknown: true }
|
|
1977
1310
|
);
|
|
@@ -1982,7 +1315,7 @@ class Serviceability {
|
|
|
1982
1315
|
} else {
|
|
1983
1316
|
Logger({
|
|
1984
1317
|
level: "WARN",
|
|
1985
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1318
|
+
message: `Response Validation Warnings for platform > Serviceability > getOptimalLocations \n ${res_error}`,
|
|
1986
1319
|
});
|
|
1987
1320
|
}
|
|
1988
1321
|
}
|
|
@@ -1991,28 +1324,32 @@ class Serviceability {
|
|
|
1991
1324
|
}
|
|
1992
1325
|
|
|
1993
1326
|
/**
|
|
1994
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1327
|
+
* @param {ServiceabilityPlatformValidator.GetPackageMaterialListParam} arg
|
|
1328
|
+
* - Arg object
|
|
1329
|
+
*
|
|
1995
1330
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1996
1331
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1997
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1332
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialList>} -
|
|
1998
1333
|
* Success response
|
|
1999
|
-
* @name
|
|
2000
|
-
* @summary: Get
|
|
2001
|
-
* @description:
|
|
1334
|
+
* @name getPackageMaterialList
|
|
1335
|
+
* @summary: Get packaging materials
|
|
1336
|
+
* @description: Retrieves a list of packaging materials - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialList/).
|
|
2002
1337
|
*/
|
|
2003
|
-
async
|
|
2004
|
-
{
|
|
1338
|
+
async getPackageMaterialList(
|
|
1339
|
+
{ pageNo, pageSize, q, size, packageType, requestHeaders } = {
|
|
2005
1340
|
requestHeaders: {},
|
|
2006
1341
|
},
|
|
2007
1342
|
{ responseHeaders } = { responseHeaders: false }
|
|
2008
1343
|
) {
|
|
2009
1344
|
const {
|
|
2010
1345
|
error,
|
|
2011
|
-
} = ServiceabilityPlatformValidator.
|
|
1346
|
+
} = ServiceabilityPlatformValidator.getPackageMaterialList().validate(
|
|
2012
1347
|
{
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
1348
|
+
pageNo,
|
|
1349
|
+
pageSize,
|
|
1350
|
+
q,
|
|
1351
|
+
size,
|
|
1352
|
+
packageType,
|
|
2016
1353
|
},
|
|
2017
1354
|
{ abortEarly: false, allowUnknown: true }
|
|
2018
1355
|
);
|
|
@@ -2023,29 +1360,36 @@ class Serviceability {
|
|
|
2023
1360
|
// Showing warrnings if extra unknown parameters are found
|
|
2024
1361
|
const {
|
|
2025
1362
|
error: warrning,
|
|
2026
|
-
} = ServiceabilityPlatformValidator.
|
|
1363
|
+
} = ServiceabilityPlatformValidator.getPackageMaterialList().validate(
|
|
2027
1364
|
{
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
1365
|
+
pageNo,
|
|
1366
|
+
pageSize,
|
|
1367
|
+
q,
|
|
1368
|
+
size,
|
|
1369
|
+
packageType,
|
|
2031
1370
|
},
|
|
2032
1371
|
{ abortEarly: false, allowUnknown: false }
|
|
2033
1372
|
);
|
|
2034
1373
|
if (warrning) {
|
|
2035
1374
|
Logger({
|
|
2036
1375
|
level: "WARN",
|
|
2037
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1376
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialList \n ${warrning}`,
|
|
2038
1377
|
});
|
|
2039
1378
|
}
|
|
2040
1379
|
|
|
2041
1380
|
const query_params = {};
|
|
1381
|
+
query_params["page_no"] = pageNo;
|
|
1382
|
+
query_params["page_size"] = pageSize;
|
|
1383
|
+
query_params["q"] = q;
|
|
1384
|
+
query_params["size"] = size;
|
|
1385
|
+
query_params["package_type"] = packageType;
|
|
2042
1386
|
|
|
2043
1387
|
const xHeaders = {};
|
|
2044
1388
|
|
|
2045
1389
|
const response = await PlatformAPIClient.execute(
|
|
2046
1390
|
this.config,
|
|
2047
1391
|
"get",
|
|
2048
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1392
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-materials`,
|
|
2049
1393
|
query_params,
|
|
2050
1394
|
undefined,
|
|
2051
1395
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2059,7 +1403,7 @@ class Serviceability {
|
|
|
2059
1403
|
|
|
2060
1404
|
const {
|
|
2061
1405
|
error: res_error,
|
|
2062
|
-
} = ServiceabilityPlatformModel.
|
|
1406
|
+
} = ServiceabilityPlatformModel.PackageMaterialList().validate(
|
|
2063
1407
|
responseData,
|
|
2064
1408
|
{ abortEarly: false, allowUnknown: true }
|
|
2065
1409
|
);
|
|
@@ -2070,7 +1414,7 @@ class Serviceability {
|
|
|
2070
1414
|
} else {
|
|
2071
1415
|
Logger({
|
|
2072
1416
|
level: "WARN",
|
|
2073
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1417
|
+
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialList \n ${res_error}`,
|
|
2074
1418
|
});
|
|
2075
1419
|
}
|
|
2076
1420
|
}
|
|
@@ -2079,22 +1423,26 @@ class Serviceability {
|
|
|
2079
1423
|
}
|
|
2080
1424
|
|
|
2081
1425
|
/**
|
|
2082
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1426
|
+
* @param {ServiceabilityPlatformValidator.GetPackageMaterialRuleParam} arg
|
|
1427
|
+
* - Arg object
|
|
1428
|
+
*
|
|
2083
1429
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2084
1430
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2085
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1431
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageRuleResult>} -
|
|
2086
1432
|
* Success response
|
|
2087
|
-
* @name
|
|
2088
|
-
* @summary: Get
|
|
2089
|
-
* @description:
|
|
1433
|
+
* @name getPackageMaterialRule
|
|
1434
|
+
* @summary: Get packaging material rule
|
|
1435
|
+
* @description: Retrieve packaging rule details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRule/).
|
|
2090
1436
|
*/
|
|
2091
|
-
async
|
|
2092
|
-
{
|
|
1437
|
+
async getPackageMaterialRule(
|
|
1438
|
+
{ ruleId, requestHeaders } = { requestHeaders: {} },
|
|
2093
1439
|
{ responseHeaders } = { responseHeaders: false }
|
|
2094
1440
|
) {
|
|
2095
|
-
const {
|
|
1441
|
+
const {
|
|
1442
|
+
error,
|
|
1443
|
+
} = ServiceabilityPlatformValidator.getPackageMaterialRule().validate(
|
|
2096
1444
|
{
|
|
2097
|
-
|
|
1445
|
+
ruleId,
|
|
2098
1446
|
},
|
|
2099
1447
|
{ abortEarly: false, allowUnknown: true }
|
|
2100
1448
|
);
|
|
@@ -2105,16 +1453,16 @@ class Serviceability {
|
|
|
2105
1453
|
// Showing warrnings if extra unknown parameters are found
|
|
2106
1454
|
const {
|
|
2107
1455
|
error: warrning,
|
|
2108
|
-
} = ServiceabilityPlatformValidator.
|
|
1456
|
+
} = ServiceabilityPlatformValidator.getPackageMaterialRule().validate(
|
|
2109
1457
|
{
|
|
2110
|
-
|
|
1458
|
+
ruleId,
|
|
2111
1459
|
},
|
|
2112
1460
|
{ abortEarly: false, allowUnknown: false }
|
|
2113
1461
|
);
|
|
2114
1462
|
if (warrning) {
|
|
2115
1463
|
Logger({
|
|
2116
1464
|
level: "WARN",
|
|
2117
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1465
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialRule \n ${warrning}`,
|
|
2118
1466
|
});
|
|
2119
1467
|
}
|
|
2120
1468
|
|
|
@@ -2125,7 +1473,7 @@ class Serviceability {
|
|
|
2125
1473
|
const response = await PlatformAPIClient.execute(
|
|
2126
1474
|
this.config,
|
|
2127
1475
|
"get",
|
|
2128
|
-
`/service/platform/logistics/
|
|
1476
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules/${ruleId}`,
|
|
2129
1477
|
query_params,
|
|
2130
1478
|
undefined,
|
|
2131
1479
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2139,7 +1487,7 @@ class Serviceability {
|
|
|
2139
1487
|
|
|
2140
1488
|
const {
|
|
2141
1489
|
error: res_error,
|
|
2142
|
-
} = ServiceabilityPlatformModel.
|
|
1490
|
+
} = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, {
|
|
2143
1491
|
abortEarly: false,
|
|
2144
1492
|
allowUnknown: true,
|
|
2145
1493
|
});
|
|
@@ -2150,7 +1498,7 @@ class Serviceability {
|
|
|
2150
1498
|
} else {
|
|
2151
1499
|
Logger({
|
|
2152
1500
|
level: "WARN",
|
|
2153
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1501
|
+
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialRule \n ${res_error}`,
|
|
2154
1502
|
});
|
|
2155
1503
|
}
|
|
2156
1504
|
}
|
|
@@ -2159,42 +1507,31 @@ class Serviceability {
|
|
|
2159
1507
|
}
|
|
2160
1508
|
|
|
2161
1509
|
/**
|
|
2162
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1510
|
+
* @param {ServiceabilityPlatformValidator.GetPackageMaterialRuleDetailsParam} arg
|
|
1511
|
+
* - Arg object
|
|
1512
|
+
*
|
|
2163
1513
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2164
1514
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2165
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2166
|
-
*
|
|
2167
|
-
* @
|
|
2168
|
-
* @
|
|
1515
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageRuleResult>} -
|
|
1516
|
+
* Success response
|
|
1517
|
+
* @name getPackageMaterialRuleDetails
|
|
1518
|
+
* @summary: Fetching of Package Material Rule from database.
|
|
1519
|
+
* @description: This API returns details of package materials rule. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRuleDetails/).
|
|
2169
1520
|
*/
|
|
2170
|
-
async
|
|
2171
|
-
{
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
isActive,
|
|
2175
|
-
channelId,
|
|
2176
|
-
q,
|
|
2177
|
-
countryIsoCode,
|
|
2178
|
-
state,
|
|
2179
|
-
city,
|
|
2180
|
-
pincode,
|
|
2181
|
-
sector,
|
|
2182
|
-
requestHeaders,
|
|
2183
|
-
} = { requestHeaders: {} },
|
|
1521
|
+
async getPackageMaterialRuleDetails(
|
|
1522
|
+
{ ruleId, pageNo, pageSize, isActive, requestHeaders } = {
|
|
1523
|
+
requestHeaders: {},
|
|
1524
|
+
},
|
|
2184
1525
|
{ responseHeaders } = { responseHeaders: false }
|
|
2185
1526
|
) {
|
|
2186
|
-
const {
|
|
1527
|
+
const {
|
|
1528
|
+
error,
|
|
1529
|
+
} = ServiceabilityPlatformValidator.getPackageMaterialRuleDetails().validate(
|
|
2187
1530
|
{
|
|
1531
|
+
ruleId,
|
|
2188
1532
|
pageNo,
|
|
2189
1533
|
pageSize,
|
|
2190
1534
|
isActive,
|
|
2191
|
-
channelId,
|
|
2192
|
-
q,
|
|
2193
|
-
countryIsoCode,
|
|
2194
|
-
state,
|
|
2195
|
-
city,
|
|
2196
|
-
pincode,
|
|
2197
|
-
sector,
|
|
2198
1535
|
},
|
|
2199
1536
|
{ abortEarly: false, allowUnknown: true }
|
|
2200
1537
|
);
|
|
@@ -2205,25 +1542,19 @@ class Serviceability {
|
|
|
2205
1542
|
// Showing warrnings if extra unknown parameters are found
|
|
2206
1543
|
const {
|
|
2207
1544
|
error: warrning,
|
|
2208
|
-
} = ServiceabilityPlatformValidator.
|
|
1545
|
+
} = ServiceabilityPlatformValidator.getPackageMaterialRuleDetails().validate(
|
|
2209
1546
|
{
|
|
1547
|
+
ruleId,
|
|
2210
1548
|
pageNo,
|
|
2211
1549
|
pageSize,
|
|
2212
1550
|
isActive,
|
|
2213
|
-
channelId,
|
|
2214
|
-
q,
|
|
2215
|
-
countryIsoCode,
|
|
2216
|
-
state,
|
|
2217
|
-
city,
|
|
2218
|
-
pincode,
|
|
2219
|
-
sector,
|
|
2220
1551
|
},
|
|
2221
1552
|
{ abortEarly: false, allowUnknown: false }
|
|
2222
1553
|
);
|
|
2223
1554
|
if (warrning) {
|
|
2224
1555
|
Logger({
|
|
2225
1556
|
level: "WARN",
|
|
2226
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1557
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialRuleDetails \n ${warrning}`,
|
|
2227
1558
|
});
|
|
2228
1559
|
}
|
|
2229
1560
|
|
|
@@ -2231,20 +1562,13 @@ class Serviceability {
|
|
|
2231
1562
|
query_params["page_no"] = pageNo;
|
|
2232
1563
|
query_params["page_size"] = pageSize;
|
|
2233
1564
|
query_params["is_active"] = isActive;
|
|
2234
|
-
query_params["channel_id"] = channelId;
|
|
2235
|
-
query_params["q"] = q;
|
|
2236
|
-
query_params["country_iso_code"] = countryIsoCode;
|
|
2237
|
-
query_params["state"] = state;
|
|
2238
|
-
query_params["city"] = city;
|
|
2239
|
-
query_params["pincode"] = pincode;
|
|
2240
|
-
query_params["sector"] = sector;
|
|
2241
1565
|
|
|
2242
1566
|
const xHeaders = {};
|
|
2243
1567
|
|
|
2244
1568
|
const response = await PlatformAPIClient.execute(
|
|
2245
1569
|
this.config,
|
|
2246
1570
|
"get",
|
|
2247
|
-
`/service/platform/logistics/
|
|
1571
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules/${ruleId}/details`,
|
|
2248
1572
|
query_params,
|
|
2249
1573
|
undefined,
|
|
2250
1574
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2258,7 +1582,7 @@ class Serviceability {
|
|
|
2258
1582
|
|
|
2259
1583
|
const {
|
|
2260
1584
|
error: res_error,
|
|
2261
|
-
} = ServiceabilityPlatformModel.
|
|
1585
|
+
} = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, {
|
|
2262
1586
|
abortEarly: false,
|
|
2263
1587
|
allowUnknown: true,
|
|
2264
1588
|
});
|
|
@@ -2269,7 +1593,7 @@ class Serviceability {
|
|
|
2269
1593
|
} else {
|
|
2270
1594
|
Logger({
|
|
2271
1595
|
level: "WARN",
|
|
2272
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1596
|
+
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialRuleDetails \n ${res_error}`,
|
|
2273
1597
|
});
|
|
2274
1598
|
}
|
|
2275
1599
|
}
|
|
@@ -2278,27 +1602,25 @@ class Serviceability {
|
|
|
2278
1602
|
}
|
|
2279
1603
|
|
|
2280
1604
|
/**
|
|
2281
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2282
|
-
* - Arg object
|
|
2283
|
-
*
|
|
1605
|
+
* @param {ServiceabilityPlatformValidator.GetPackageMaterialsParam} arg - Arg object
|
|
2284
1606
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2285
1607
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2286
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1608
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResponse>}
|
|
2287
1609
|
* - Success response
|
|
2288
1610
|
*
|
|
2289
|
-
* @name
|
|
2290
|
-
* @summary:
|
|
2291
|
-
* @description:
|
|
1611
|
+
* @name getPackageMaterials
|
|
1612
|
+
* @summary: Get packaging material
|
|
1613
|
+
* @description: Retrieve a single packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterials/).
|
|
2292
1614
|
*/
|
|
2293
|
-
async
|
|
2294
|
-
{
|
|
1615
|
+
async getPackageMaterials(
|
|
1616
|
+
{ packageMaterialId, requestHeaders } = { requestHeaders: {} },
|
|
2295
1617
|
{ responseHeaders } = { responseHeaders: false }
|
|
2296
1618
|
) {
|
|
2297
1619
|
const {
|
|
2298
1620
|
error,
|
|
2299
|
-
} = ServiceabilityPlatformValidator.
|
|
1621
|
+
} = ServiceabilityPlatformValidator.getPackageMaterials().validate(
|
|
2300
1622
|
{
|
|
2301
|
-
|
|
1623
|
+
packageMaterialId,
|
|
2302
1624
|
},
|
|
2303
1625
|
{ abortEarly: false, allowUnknown: true }
|
|
2304
1626
|
);
|
|
@@ -2309,16 +1631,16 @@ class Serviceability {
|
|
|
2309
1631
|
// Showing warrnings if extra unknown parameters are found
|
|
2310
1632
|
const {
|
|
2311
1633
|
error: warrning,
|
|
2312
|
-
} = ServiceabilityPlatformValidator.
|
|
1634
|
+
} = ServiceabilityPlatformValidator.getPackageMaterials().validate(
|
|
2313
1635
|
{
|
|
2314
|
-
|
|
1636
|
+
packageMaterialId,
|
|
2315
1637
|
},
|
|
2316
1638
|
{ abortEarly: false, allowUnknown: false }
|
|
2317
1639
|
);
|
|
2318
1640
|
if (warrning) {
|
|
2319
1641
|
Logger({
|
|
2320
1642
|
level: "WARN",
|
|
2321
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1643
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterials \n ${warrning}`,
|
|
2322
1644
|
});
|
|
2323
1645
|
}
|
|
2324
1646
|
|
|
@@ -2328,10 +1650,10 @@ class Serviceability {
|
|
|
2328
1650
|
|
|
2329
1651
|
const response = await PlatformAPIClient.execute(
|
|
2330
1652
|
this.config,
|
|
2331
|
-
"
|
|
2332
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1653
|
+
"get",
|
|
1654
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/${packageMaterialId}`,
|
|
2333
1655
|
query_params,
|
|
2334
|
-
|
|
1656
|
+
undefined,
|
|
2335
1657
|
{ ...xHeaders, ...requestHeaders },
|
|
2336
1658
|
{ responseHeaders }
|
|
2337
1659
|
);
|
|
@@ -2343,7 +1665,7 @@ class Serviceability {
|
|
|
2343
1665
|
|
|
2344
1666
|
const {
|
|
2345
1667
|
error: res_error,
|
|
2346
|
-
} = ServiceabilityPlatformModel.
|
|
1668
|
+
} = ServiceabilityPlatformModel.PackageMaterialResponse().validate(
|
|
2347
1669
|
responseData,
|
|
2348
1670
|
{ abortEarly: false, allowUnknown: true }
|
|
2349
1671
|
);
|
|
@@ -2354,7 +1676,7 @@ class Serviceability {
|
|
|
2354
1676
|
} else {
|
|
2355
1677
|
Logger({
|
|
2356
1678
|
level: "WARN",
|
|
2357
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1679
|
+
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterials \n ${res_error}`,
|
|
2358
1680
|
});
|
|
2359
1681
|
}
|
|
2360
1682
|
}
|
|
@@ -2446,26 +1768,24 @@ class Serviceability {
|
|
|
2446
1768
|
}
|
|
2447
1769
|
|
|
2448
1770
|
/**
|
|
2449
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1771
|
+
* @param {ServiceabilityPlatformValidator.UpdateCompanySelfShipParam} arg
|
|
2450
1772
|
* - Arg object
|
|
2451
1773
|
*
|
|
2452
1774
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2453
1775
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2454
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2455
|
-
*
|
|
2456
|
-
* @
|
|
2457
|
-
* @
|
|
2458
|
-
* @description: Updates an existing courier partner account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerAccount/).
|
|
1776
|
+
* @returns {Promise<ServiceabilityPlatformModel.CompanySelfShip>} - Success response
|
|
1777
|
+
* @name updateCompanySelfShip
|
|
1778
|
+
* @summary: Update Company Self Ship
|
|
1779
|
+
* @description: Updates Self Ship at company level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCompanySelfShip/).
|
|
2459
1780
|
*/
|
|
2460
|
-
async
|
|
2461
|
-
{
|
|
1781
|
+
async updateCompanySelfShip(
|
|
1782
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2462
1783
|
{ responseHeaders } = { responseHeaders: false }
|
|
2463
1784
|
) {
|
|
2464
1785
|
const {
|
|
2465
1786
|
error,
|
|
2466
|
-
} = ServiceabilityPlatformValidator.
|
|
1787
|
+
} = ServiceabilityPlatformValidator.updateCompanySelfShip().validate(
|
|
2467
1788
|
{
|
|
2468
|
-
accountId,
|
|
2469
1789
|
body,
|
|
2470
1790
|
},
|
|
2471
1791
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2477,9 +1797,8 @@ class Serviceability {
|
|
|
2477
1797
|
// Showing warrnings if extra unknown parameters are found
|
|
2478
1798
|
const {
|
|
2479
1799
|
error: warrning,
|
|
2480
|
-
} = ServiceabilityPlatformValidator.
|
|
1800
|
+
} = ServiceabilityPlatformValidator.updateCompanySelfShip().validate(
|
|
2481
1801
|
{
|
|
2482
|
-
accountId,
|
|
2483
1802
|
body,
|
|
2484
1803
|
},
|
|
2485
1804
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2487,7 +1806,7 @@ class Serviceability {
|
|
|
2487
1806
|
if (warrning) {
|
|
2488
1807
|
Logger({
|
|
2489
1808
|
level: "WARN",
|
|
2490
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1809
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateCompanySelfShip \n ${warrning}`,
|
|
2491
1810
|
});
|
|
2492
1811
|
}
|
|
2493
1812
|
|
|
@@ -2497,8 +1816,8 @@ class Serviceability {
|
|
|
2497
1816
|
|
|
2498
1817
|
const response = await PlatformAPIClient.execute(
|
|
2499
1818
|
this.config,
|
|
2500
|
-
"
|
|
2501
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1819
|
+
"patch",
|
|
1820
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/selfship`,
|
|
2502
1821
|
query_params,
|
|
2503
1822
|
body,
|
|
2504
1823
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2512,10 +1831,10 @@ class Serviceability {
|
|
|
2512
1831
|
|
|
2513
1832
|
const {
|
|
2514
1833
|
error: res_error,
|
|
2515
|
-
} = ServiceabilityPlatformModel.
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
);
|
|
1834
|
+
} = ServiceabilityPlatformModel.CompanySelfShip().validate(responseData, {
|
|
1835
|
+
abortEarly: false,
|
|
1836
|
+
allowUnknown: true,
|
|
1837
|
+
});
|
|
2519
1838
|
|
|
2520
1839
|
if (res_error) {
|
|
2521
1840
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2523,7 +1842,7 @@ class Serviceability {
|
|
|
2523
1842
|
} else {
|
|
2524
1843
|
Logger({
|
|
2525
1844
|
level: "WARN",
|
|
2526
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1845
|
+
message: `Response Validation Warnings for platform > Serviceability > updateCompanySelfShip \n ${res_error}`,
|
|
2527
1846
|
});
|
|
2528
1847
|
}
|
|
2529
1848
|
}
|
|
@@ -2532,28 +1851,25 @@ class Serviceability {
|
|
|
2532
1851
|
}
|
|
2533
1852
|
|
|
2534
1853
|
/**
|
|
2535
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1854
|
+
* @param {ServiceabilityPlatformValidator.UpdateCourierPartnerAccountParam} arg
|
|
2536
1855
|
* - Arg object
|
|
2537
1856
|
*
|
|
2538
1857
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2539
1858
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2540
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2541
|
-
*
|
|
2542
|
-
*
|
|
2543
|
-
* @
|
|
2544
|
-
* @summary: Update Scheme for courier partner extension
|
|
2545
|
-
* @description: Update Scheme for courier partner extension - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerScheme/).
|
|
1859
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierAccount>} - Success response
|
|
1860
|
+
* @name updateCourierPartnerAccount
|
|
1861
|
+
* @summary: Update courier account
|
|
1862
|
+
* @description: Updates an existing courier partner account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerAccount/).
|
|
2546
1863
|
*/
|
|
2547
|
-
async
|
|
2548
|
-
{
|
|
1864
|
+
async updateCourierPartnerAccount(
|
|
1865
|
+
{ accountId, body, requestHeaders } = { requestHeaders: {} },
|
|
2549
1866
|
{ responseHeaders } = { responseHeaders: false }
|
|
2550
1867
|
) {
|
|
2551
1868
|
const {
|
|
2552
1869
|
error,
|
|
2553
|
-
} = ServiceabilityPlatformValidator.
|
|
1870
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerAccount().validate(
|
|
2554
1871
|
{
|
|
2555
|
-
|
|
2556
|
-
|
|
1872
|
+
accountId,
|
|
2557
1873
|
body,
|
|
2558
1874
|
},
|
|
2559
1875
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2565,10 +1881,9 @@ class Serviceability {
|
|
|
2565
1881
|
// Showing warrnings if extra unknown parameters are found
|
|
2566
1882
|
const {
|
|
2567
1883
|
error: warrning,
|
|
2568
|
-
} = ServiceabilityPlatformValidator.
|
|
1884
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerAccount().validate(
|
|
2569
1885
|
{
|
|
2570
|
-
|
|
2571
|
-
|
|
1886
|
+
accountId,
|
|
2572
1887
|
body,
|
|
2573
1888
|
},
|
|
2574
1889
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2576,7 +1891,7 @@ class Serviceability {
|
|
|
2576
1891
|
if (warrning) {
|
|
2577
1892
|
Logger({
|
|
2578
1893
|
level: "WARN",
|
|
2579
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1894
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateCourierPartnerAccount \n ${warrning}`,
|
|
2580
1895
|
});
|
|
2581
1896
|
}
|
|
2582
1897
|
|
|
@@ -2587,7 +1902,7 @@ class Serviceability {
|
|
|
2587
1902
|
const response = await PlatformAPIClient.execute(
|
|
2588
1903
|
this.config,
|
|
2589
1904
|
"put",
|
|
2590
|
-
`/service/platform/logistics/
|
|
1905
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account/${accountId}`,
|
|
2591
1906
|
query_params,
|
|
2592
1907
|
body,
|
|
2593
1908
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2601,10 +1916,10 @@ class Serviceability {
|
|
|
2601
1916
|
|
|
2602
1917
|
const {
|
|
2603
1918
|
error: res_error,
|
|
2604
|
-
} = ServiceabilityPlatformModel.
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
);
|
|
1919
|
+
} = ServiceabilityPlatformModel.CourierAccount().validate(responseData, {
|
|
1920
|
+
abortEarly: false,
|
|
1921
|
+
allowUnknown: true,
|
|
1922
|
+
});
|
|
2608
1923
|
|
|
2609
1924
|
if (res_error) {
|
|
2610
1925
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2612,7 +1927,7 @@ class Serviceability {
|
|
|
2612
1927
|
} else {
|
|
2613
1928
|
Logger({
|
|
2614
1929
|
level: "WARN",
|
|
2615
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1930
|
+
message: `Response Validation Warnings for platform > Serviceability > updateCourierPartnerAccount \n ${res_error}`,
|
|
2616
1931
|
});
|
|
2617
1932
|
}
|
|
2618
1933
|
}
|
|
@@ -2712,8 +2027,9 @@ class Serviceability {
|
|
|
2712
2027
|
*
|
|
2713
2028
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2714
2029
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2715
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2716
|
-
* Success response
|
|
2030
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResponse>}
|
|
2031
|
+
* - Success response
|
|
2032
|
+
*
|
|
2717
2033
|
* @name updatePackageMaterials
|
|
2718
2034
|
* @summary: Update packaging material
|
|
2719
2035
|
* @description: Update an existing packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterials/).
|
|
@@ -2773,7 +2089,7 @@ class Serviceability {
|
|
|
2773
2089
|
|
|
2774
2090
|
const {
|
|
2775
2091
|
error: res_error,
|
|
2776
|
-
} = ServiceabilityPlatformModel.
|
|
2092
|
+
} = ServiceabilityPlatformModel.PackageMaterialResponse().validate(
|
|
2777
2093
|
responseData,
|
|
2778
2094
|
{ abortEarly: false, allowUnknown: true }
|
|
2779
2095
|
);
|
|
@@ -2793,28 +2109,27 @@ class Serviceability {
|
|
|
2793
2109
|
}
|
|
2794
2110
|
|
|
2795
2111
|
/**
|
|
2796
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2112
|
+
* @param {ServiceabilityPlatformValidator.ValidateAddressParam} arg - Arg object
|
|
2797
2113
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2798
2114
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2799
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2115
|
+
* @returns {Promise<ServiceabilityPlatformModel.ValidateAddressRequest>} -
|
|
2800
2116
|
* Success response
|
|
2801
|
-
* @name
|
|
2802
|
-
* @summary:
|
|
2803
|
-
* @description:
|
|
2117
|
+
* @name validateAddress
|
|
2118
|
+
* @summary: Validate given address wrt template
|
|
2119
|
+
* @description: Validate given address wrt template - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/validateAddress/).
|
|
2804
2120
|
*/
|
|
2805
|
-
async
|
|
2806
|
-
{
|
|
2121
|
+
async validateAddress(
|
|
2122
|
+
{ countryIsoCode, templateName, body, requestHeaders } = {
|
|
2807
2123
|
requestHeaders: {},
|
|
2808
2124
|
},
|
|
2809
2125
|
{ responseHeaders } = { responseHeaders: false }
|
|
2810
2126
|
) {
|
|
2811
2127
|
const {
|
|
2812
2128
|
error,
|
|
2813
|
-
} = ServiceabilityPlatformValidator.
|
|
2129
|
+
} = ServiceabilityPlatformValidator.validateAddress().validate(
|
|
2814
2130
|
{
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
regionId,
|
|
2131
|
+
countryIsoCode,
|
|
2132
|
+
templateName,
|
|
2818
2133
|
body,
|
|
2819
2134
|
},
|
|
2820
2135
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2826,11 +2141,10 @@ class Serviceability {
|
|
|
2826
2141
|
// Showing warrnings if extra unknown parameters are found
|
|
2827
2142
|
const {
|
|
2828
2143
|
error: warrning,
|
|
2829
|
-
} = ServiceabilityPlatformValidator.
|
|
2144
|
+
} = ServiceabilityPlatformValidator.validateAddress().validate(
|
|
2830
2145
|
{
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
regionId,
|
|
2146
|
+
countryIsoCode,
|
|
2147
|
+
templateName,
|
|
2834
2148
|
body,
|
|
2835
2149
|
},
|
|
2836
2150
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2838,7 +2152,7 @@ class Serviceability {
|
|
|
2838
2152
|
if (warrning) {
|
|
2839
2153
|
Logger({
|
|
2840
2154
|
level: "WARN",
|
|
2841
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2155
|
+
message: `Parameter Validation warrnings for platform > Serviceability > validateAddress \n ${warrning}`,
|
|
2842
2156
|
});
|
|
2843
2157
|
}
|
|
2844
2158
|
|
|
@@ -2848,8 +2162,8 @@ class Serviceability {
|
|
|
2848
2162
|
|
|
2849
2163
|
const response = await PlatformAPIClient.execute(
|
|
2850
2164
|
this.config,
|
|
2851
|
-
"
|
|
2852
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
2165
|
+
"post",
|
|
2166
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/country/${countryIsoCode}/address/templates/${templateName}/validate`,
|
|
2853
2167
|
query_params,
|
|
2854
2168
|
body,
|
|
2855
2169
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2863,7 +2177,7 @@ class Serviceability {
|
|
|
2863
2177
|
|
|
2864
2178
|
const {
|
|
2865
2179
|
error: res_error,
|
|
2866
|
-
} = ServiceabilityPlatformModel.
|
|
2180
|
+
} = ServiceabilityPlatformModel.ValidateAddressRequest().validate(
|
|
2867
2181
|
responseData,
|
|
2868
2182
|
{ abortEarly: false, allowUnknown: true }
|
|
2869
2183
|
);
|
|
@@ -2874,89 +2188,7 @@ class Serviceability {
|
|
|
2874
2188
|
} else {
|
|
2875
2189
|
Logger({
|
|
2876
2190
|
level: "WARN",
|
|
2877
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2878
|
-
});
|
|
2879
|
-
}
|
|
2880
|
-
}
|
|
2881
|
-
|
|
2882
|
-
return response;
|
|
2883
|
-
}
|
|
2884
|
-
|
|
2885
|
-
/**
|
|
2886
|
-
* @param {ServiceabilityPlatformValidator.UpdateZoneByIdParam} arg - Arg object
|
|
2887
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2888
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2889
|
-
* @returns {Promise<ServiceabilityPlatformModel.ZoneSuccessResult>} -
|
|
2890
|
-
* Success response
|
|
2891
|
-
* @name updateZoneById
|
|
2892
|
-
* @summary: Update a zone
|
|
2893
|
-
* @description: Update an existing delivery zone . - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateZoneById/).
|
|
2894
|
-
*/
|
|
2895
|
-
async updateZoneById(
|
|
2896
|
-
{ zoneId, body, requestHeaders } = { requestHeaders: {} },
|
|
2897
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2898
|
-
) {
|
|
2899
|
-
const { error } = ServiceabilityPlatformValidator.updateZoneById().validate(
|
|
2900
|
-
{
|
|
2901
|
-
zoneId,
|
|
2902
|
-
body,
|
|
2903
|
-
},
|
|
2904
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2905
|
-
);
|
|
2906
|
-
if (error) {
|
|
2907
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2908
|
-
}
|
|
2909
|
-
|
|
2910
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2911
|
-
const {
|
|
2912
|
-
error: warrning,
|
|
2913
|
-
} = ServiceabilityPlatformValidator.updateZoneById().validate(
|
|
2914
|
-
{
|
|
2915
|
-
zoneId,
|
|
2916
|
-
body,
|
|
2917
|
-
},
|
|
2918
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2919
|
-
);
|
|
2920
|
-
if (warrning) {
|
|
2921
|
-
Logger({
|
|
2922
|
-
level: "WARN",
|
|
2923
|
-
message: `Parameter Validation warrnings for platform > Serviceability > updateZoneById \n ${warrning}`,
|
|
2924
|
-
});
|
|
2925
|
-
}
|
|
2926
|
-
|
|
2927
|
-
const query_params = {};
|
|
2928
|
-
|
|
2929
|
-
const xHeaders = {};
|
|
2930
|
-
|
|
2931
|
-
const response = await PlatformAPIClient.execute(
|
|
2932
|
-
this.config,
|
|
2933
|
-
"put",
|
|
2934
|
-
`/service/platform/logistics/v2.0/company/${this.config.companyId}/zones/${zoneId}`,
|
|
2935
|
-
query_params,
|
|
2936
|
-
body,
|
|
2937
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2938
|
-
{ responseHeaders }
|
|
2939
|
-
);
|
|
2940
|
-
|
|
2941
|
-
let responseData = response;
|
|
2942
|
-
if (responseHeaders) {
|
|
2943
|
-
responseData = response[0];
|
|
2944
|
-
}
|
|
2945
|
-
|
|
2946
|
-
const {
|
|
2947
|
-
error: res_error,
|
|
2948
|
-
} = ServiceabilityPlatformModel.ZoneSuccessResult().validate(responseData, {
|
|
2949
|
-
abortEarly: false,
|
|
2950
|
-
allowUnknown: true,
|
|
2951
|
-
});
|
|
2952
|
-
|
|
2953
|
-
if (res_error) {
|
|
2954
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2955
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2956
|
-
} else {
|
|
2957
|
-
Logger({
|
|
2958
|
-
level: "WARN",
|
|
2959
|
-
message: `Response Validation Warnings for platform > Serviceability > updateZoneById \n ${res_error}`,
|
|
2191
|
+
message: `Response Validation Warnings for platform > Serviceability > validateAddress \n ${res_error}`,
|
|
2960
2192
|
});
|
|
2961
2193
|
}
|
|
2962
2194
|
}
|