@gofynd/fdk-client-javascript 1.6.4 → 3.1.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 +100 -80
- package/sdk/application/Cart/CartApplicationClient.js +257 -126
- 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 +61 -21
- package/sdk/application/Content/ContentApplicationClient.js +250 -36
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +106 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +326 -208
- 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 +0 -10
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +0 -75
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +1 -54
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +0 -43
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -6
- 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 +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
- package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +251 -172
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +639 -521
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3150 -4468
- package/sdk/platform/Cart/CartPlatformModel.js +2858 -1867
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +976 -380
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6475 -2015
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1083 -162
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +884 -80
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +325 -568
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1162 -1562
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6008 -7688
- package/sdk/platform/Catalog/CatalogPlatformModel.js +9522 -6892
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +234 -227
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +183 -177
- 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 -238
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +876 -588
- 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 +506 -270
- package/sdk/platform/Communication/CommunicationPlatformModel.js +611 -313
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +78 -77
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +97 -91
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +31 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +25 -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 +1206 -459
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1011 -320
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +255 -140
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1095 -464
- 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 +871 -1315
- package/sdk/platform/Content/ContentPlatformModel.js +940 -599
- 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 +486 -277
- package/sdk/platform/Order/OrderPlatformClient.js +1491 -938
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4560 -8636
- package/sdk/platform/Order/OrderPlatformModel.js +3604 -4056
- 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 +3531 -1292
- package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1504
- 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 +2188 -302
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +394 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +342 -37
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +150 -212
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +589 -1238
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3581 -2960
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3730 -1779
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +230 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +164 -287
- 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 +11 -50
- package/sdk/platform/Share/SharePlatformModel.js +5 -43
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +36 -16
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +201 -58
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +28 -17
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +33 -16
- 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/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 +0 -2
- package/sdk/public/PublicClient.js +0 -4
- 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 +0 -1
- package/sdk/public/index.js +0 -2
- 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,591 +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: {} },
|
|
830
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
831
|
-
) {
|
|
832
|
-
const { error } = ServiceabilityPlatformValidator.getBulkTat().validate(
|
|
833
|
-
{
|
|
834
|
-
extensionId,
|
|
835
|
-
schemeId,
|
|
836
|
-
pageNo,
|
|
837
|
-
pageSize,
|
|
838
|
-
batchId,
|
|
839
|
-
action,
|
|
840
|
-
status,
|
|
841
|
-
country,
|
|
842
|
-
region,
|
|
843
|
-
startDate,
|
|
844
|
-
endDate,
|
|
845
|
-
},
|
|
846
|
-
{ abortEarly: false, allowUnknown: true }
|
|
847
|
-
);
|
|
848
|
-
if (error) {
|
|
849
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
// Showing warrnings if extra unknown parameters are found
|
|
853
|
-
const {
|
|
854
|
-
error: warrning,
|
|
855
|
-
} = ServiceabilityPlatformValidator.getBulkTat().validate(
|
|
856
|
-
{
|
|
857
|
-
extensionId,
|
|
858
|
-
schemeId,
|
|
859
|
-
pageNo,
|
|
860
|
-
pageSize,
|
|
861
|
-
batchId,
|
|
862
|
-
action,
|
|
863
|
-
status,
|
|
864
|
-
country,
|
|
865
|
-
region,
|
|
866
|
-
startDate,
|
|
867
|
-
endDate,
|
|
868
|
-
},
|
|
869
|
-
{ abortEarly: false, allowUnknown: false }
|
|
870
|
-
);
|
|
871
|
-
if (warrning) {
|
|
872
|
-
Logger({
|
|
873
|
-
level: "WARN",
|
|
874
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getBulkTat \n ${warrning}`,
|
|
875
|
-
});
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
const query_params = {};
|
|
879
|
-
query_params["page_no"] = pageNo;
|
|
880
|
-
query_params["page_size"] = pageSize;
|
|
881
|
-
query_params["batch_id"] = batchId;
|
|
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;
|
|
888
|
-
|
|
889
|
-
const xHeaders = {};
|
|
890
|
-
|
|
891
|
-
const response = await PlatformAPIClient.execute(
|
|
892
|
-
this.config,
|
|
893
|
-
"get",
|
|
894
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`,
|
|
895
|
-
query_params,
|
|
896
|
-
undefined,
|
|
897
|
-
{ ...xHeaders, ...requestHeaders },
|
|
898
|
-
{ responseHeaders }
|
|
899
|
-
);
|
|
900
|
-
|
|
901
|
-
let responseData = response;
|
|
902
|
-
if (responseHeaders) {
|
|
903
|
-
responseData = response[0];
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
const {
|
|
907
|
-
error: res_error,
|
|
908
|
-
} = ServiceabilityPlatformModel.BulkRegionResult().validate(responseData, {
|
|
909
|
-
abortEarly: false,
|
|
910
|
-
allowUnknown: true,
|
|
911
|
-
});
|
|
912
|
-
|
|
913
|
-
if (res_error) {
|
|
914
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
915
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
916
|
-
} else {
|
|
917
|
-
Logger({
|
|
918
|
-
level: "WARN",
|
|
919
|
-
message: `Response Validation Warnings for platform > Serviceability > getBulkTat \n ${res_error}`,
|
|
920
|
-
});
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
return response;
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
/**
|
|
928
|
-
* @param {ServiceabilityPlatformValidator.GetCompanyConfigurationParam} arg
|
|
929
|
-
* - Arg object
|
|
930
|
-
*
|
|
931
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
932
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
933
|
-
* @returns {Promise<ServiceabilityPlatformModel.CompanyConfig>} - Success response
|
|
934
|
-
* @name getCompanyConfiguration
|
|
935
|
-
* @summary: Get delivery configuration
|
|
936
|
-
* @description: Retrieves information about the delivery setup for a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCompanyConfiguration/).
|
|
937
|
-
*/
|
|
938
|
-
async getCompanyConfiguration(
|
|
939
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
940
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
941
|
-
) {
|
|
942
|
-
const {
|
|
943
|
-
error,
|
|
944
|
-
} = ServiceabilityPlatformValidator.getCompanyConfiguration().validate(
|
|
945
|
-
{},
|
|
946
|
-
{ abortEarly: false, allowUnknown: true }
|
|
947
|
-
);
|
|
948
|
-
if (error) {
|
|
949
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
// Showing warrnings if extra unknown parameters are found
|
|
953
|
-
const {
|
|
954
|
-
error: warrning,
|
|
955
|
-
} = ServiceabilityPlatformValidator.getCompanyConfiguration().validate(
|
|
956
|
-
{},
|
|
957
|
-
{ abortEarly: false, allowUnknown: false }
|
|
958
|
-
);
|
|
959
|
-
if (warrning) {
|
|
960
|
-
Logger({
|
|
961
|
-
level: "WARN",
|
|
962
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getCompanyConfiguration \n ${warrning}`,
|
|
963
|
-
});
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
const query_params = {};
|
|
967
|
-
|
|
968
|
-
const xHeaders = {};
|
|
969
|
-
|
|
970
|
-
const response = await PlatformAPIClient.execute(
|
|
971
|
-
this.config,
|
|
972
|
-
"get",
|
|
973
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/configuration`,
|
|
974
|
-
query_params,
|
|
975
|
-
undefined,
|
|
976
|
-
{ ...xHeaders, ...requestHeaders },
|
|
977
|
-
{ responseHeaders }
|
|
978
|
-
);
|
|
979
|
-
|
|
980
|
-
let responseData = response;
|
|
981
|
-
if (responseHeaders) {
|
|
982
|
-
responseData = response[0];
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
const {
|
|
986
|
-
error: res_error,
|
|
987
|
-
} = ServiceabilityPlatformModel.CompanyConfig().validate(responseData, {
|
|
988
|
-
abortEarly: false,
|
|
989
|
-
allowUnknown: true,
|
|
990
|
-
});
|
|
991
|
-
|
|
992
|
-
if (res_error) {
|
|
993
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
994
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
995
|
-
} else {
|
|
996
|
-
Logger({
|
|
997
|
-
level: "WARN",
|
|
998
|
-
message: `Response Validation Warnings for platform > Serviceability > getCompanyConfiguration \n ${res_error}`,
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
return response;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
/**
|
|
1007
|
-
* @param {ServiceabilityPlatformValidator.GetCountriesParam} arg - Arg object
|
|
1008
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1009
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1010
|
-
* @returns {Promise<ServiceabilityPlatformModel.GetCountries>} - Success response
|
|
1011
|
-
* @name getCountries
|
|
1012
|
-
* @summary: Get countries
|
|
1013
|
-
* @description: Retrieve a list of countries for logistical purposes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCountries/).
|
|
1014
|
-
*/
|
|
1015
|
-
async getCountries(
|
|
1016
|
-
{ onboarding, pageNo, pageSize, q, hierarchy, requestHeaders } = {
|
|
1017
|
-
requestHeaders: {},
|
|
1018
|
-
},
|
|
1019
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1020
|
-
) {
|
|
1021
|
-
const { error } = ServiceabilityPlatformValidator.getCountries().validate(
|
|
1022
|
-
{
|
|
1023
|
-
onboarding,
|
|
1024
|
-
pageNo,
|
|
1025
|
-
pageSize,
|
|
1026
|
-
q,
|
|
1027
|
-
hierarchy,
|
|
1028
|
-
},
|
|
1029
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1030
|
-
);
|
|
1031
|
-
if (error) {
|
|
1032
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1036
|
-
const {
|
|
1037
|
-
error: warrning,
|
|
1038
|
-
} = ServiceabilityPlatformValidator.getCountries().validate(
|
|
1039
|
-
{
|
|
1040
|
-
onboarding,
|
|
1041
|
-
pageNo,
|
|
1042
|
-
pageSize,
|
|
1043
|
-
q,
|
|
1044
|
-
hierarchy,
|
|
1045
|
-
},
|
|
1046
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1047
|
-
);
|
|
1048
|
-
if (warrning) {
|
|
1049
|
-
Logger({
|
|
1050
|
-
level: "WARN",
|
|
1051
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getCountries \n ${warrning}`,
|
|
1052
|
-
});
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
const query_params = {};
|
|
1056
|
-
query_params["onboarding"] = onboarding;
|
|
1057
|
-
query_params["page_no"] = pageNo;
|
|
1058
|
-
query_params["page_size"] = pageSize;
|
|
1059
|
-
query_params["q"] = q;
|
|
1060
|
-
query_params["hierarchy"] = hierarchy;
|
|
1061
|
-
|
|
1062
|
-
const xHeaders = {};
|
|
1063
|
-
|
|
1064
|
-
const response = await PlatformAPIClient.execute(
|
|
1065
|
-
this.config,
|
|
1066
|
-
"get",
|
|
1067
|
-
`/service/platform/logistics/v2.0/company/${this.config.companyId}/countries`,
|
|
1068
|
-
query_params,
|
|
1069
|
-
undefined,
|
|
1070
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1071
|
-
{ responseHeaders }
|
|
1072
|
-
);
|
|
1073
|
-
|
|
1074
|
-
let responseData = response;
|
|
1075
|
-
if (responseHeaders) {
|
|
1076
|
-
responseData = response[0];
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
const {
|
|
1080
|
-
error: res_error,
|
|
1081
|
-
} = ServiceabilityPlatformModel.GetCountries().validate(responseData, {
|
|
1082
|
-
abortEarly: false,
|
|
1083
|
-
allowUnknown: true,
|
|
1084
|
-
});
|
|
1085
|
-
|
|
1086
|
-
if (res_error) {
|
|
1087
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1088
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1089
|
-
} else {
|
|
1090
|
-
Logger({
|
|
1091
|
-
level: "WARN",
|
|
1092
|
-
message: `Response Validation Warnings for platform > Serviceability > getCountries \n ${res_error}`,
|
|
1093
|
-
});
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
return response;
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountParam} arg
|
|
1102
|
-
* - Arg object
|
|
1103
|
-
*
|
|
1104
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1105
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1106
|
-
* @returns {Promise<ServiceabilityPlatformModel.CourierAccountResult>} -
|
|
1107
|
-
* Success response
|
|
1108
|
-
* @name getCourierPartnerAccount
|
|
1109
|
-
* @summary: Get courier account
|
|
1110
|
-
* @description: Retrieves a single courier partner account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerAccount/).
|
|
1111
|
-
*/
|
|
1112
|
-
async getCourierPartnerAccount(
|
|
1113
|
-
{ accountId, requestHeaders } = { requestHeaders: {} },
|
|
1114
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1115
|
-
) {
|
|
1116
|
-
const {
|
|
1117
|
-
error,
|
|
1118
|
-
} = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate(
|
|
1119
|
-
{
|
|
1120
|
-
accountId,
|
|
1121
|
-
},
|
|
1122
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1123
|
-
);
|
|
1124
|
-
if (error) {
|
|
1125
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1129
|
-
const {
|
|
1130
|
-
error: warrning,
|
|
1131
|
-
} = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate(
|
|
1132
|
-
{
|
|
1133
|
-
accountId,
|
|
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}`,
|
|
1141
|
-
});
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
const query_params = {};
|
|
1145
|
-
|
|
1146
|
-
const xHeaders = {};
|
|
1147
|
-
|
|
1148
|
-
const response = await PlatformAPIClient.execute(
|
|
1149
|
-
this.config,
|
|
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;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
/**
|
|
1185
|
-
* @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountsParam} arg
|
|
1186
|
-
* - Arg object
|
|
1187
|
-
*
|
|
1188
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1189
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1190
|
-
* @returns {Promise<ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResult>}
|
|
1191
|
-
* - Success response
|
|
1192
|
-
*
|
|
1193
|
-
* @name getCourierPartnerAccounts
|
|
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/).
|
|
1196
|
-
*/
|
|
1197
|
-
async getCourierPartnerAccounts(
|
|
1198
|
-
{ pageNo, pageSize, stage, paymentMode, transportType, requestHeaders } = {
|
|
1199
|
-
requestHeaders: {},
|
|
1200
|
-
},
|
|
1201
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1202
|
-
) {
|
|
1203
|
-
const {
|
|
1204
|
-
error,
|
|
1205
|
-
} = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate(
|
|
1206
|
-
{
|
|
1207
|
-
pageNo,
|
|
1208
|
-
pageSize,
|
|
1209
|
-
stage,
|
|
1210
|
-
paymentMode,
|
|
1211
|
-
transportType,
|
|
1212
|
-
},
|
|
1213
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1214
|
-
);
|
|
1215
|
-
if (error) {
|
|
1216
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1220
|
-
const {
|
|
1221
|
-
error: warrning,
|
|
1222
|
-
} = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate(
|
|
1223
|
-
{
|
|
1224
|
-
pageNo,
|
|
1225
|
-
pageSize,
|
|
1226
|
-
stage,
|
|
1227
|
-
paymentMode,
|
|
1228
|
-
transportType,
|
|
1229
|
-
},
|
|
1230
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1231
|
-
);
|
|
1232
|
-
if (warrning) {
|
|
1233
|
-
Logger({
|
|
1234
|
-
level: "WARN",
|
|
1235
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerAccounts \n ${warrning}`,
|
|
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
|
-
},
|
|
819
|
+
async getInstalledCourierPartnerExtensions(
|
|
820
|
+
{ pageNo, pageSize, isInstalled, requestHeaders } = { requestHeaders: {} },
|
|
1382
821
|
{ responseHeaders } = { responseHeaders: false }
|
|
1383
822
|
) {
|
|
1384
823
|
const {
|
|
1385
824
|
error,
|
|
1386
|
-
} = ServiceabilityPlatformValidator.
|
|
825
|
+
} = ServiceabilityPlatformValidator.getInstalledCourierPartnerExtensions().validate(
|
|
1387
826
|
{
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
schemeIds,
|
|
827
|
+
pageNo,
|
|
828
|
+
pageSize,
|
|
829
|
+
isInstalled,
|
|
1392
830
|
},
|
|
1393
831
|
{ abortEarly: false, allowUnknown: true }
|
|
1394
832
|
);
|
|
@@ -1399,34 +837,32 @@ class Serviceability {
|
|
|
1399
837
|
// Showing warrnings if extra unknown parameters are found
|
|
1400
838
|
const {
|
|
1401
839
|
error: warrning,
|
|
1402
|
-
} = ServiceabilityPlatformValidator.
|
|
840
|
+
} = ServiceabilityPlatformValidator.getInstalledCourierPartnerExtensions().validate(
|
|
1403
841
|
{
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
schemeIds,
|
|
842
|
+
pageNo,
|
|
843
|
+
pageSize,
|
|
844
|
+
isInstalled,
|
|
1408
845
|
},
|
|
1409
846
|
{ abortEarly: false, allowUnknown: false }
|
|
1410
847
|
);
|
|
1411
848
|
if (warrning) {
|
|
1412
849
|
Logger({
|
|
1413
850
|
level: "WARN",
|
|
1414
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
851
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getInstalledCourierPartnerExtensions \n ${warrning}`,
|
|
1415
852
|
});
|
|
1416
853
|
}
|
|
1417
854
|
|
|
1418
855
|
const query_params = {};
|
|
1419
|
-
query_params["
|
|
1420
|
-
query_params["
|
|
1421
|
-
query_params["
|
|
1422
|
-
query_params["scheme_ids"] = schemeIds;
|
|
856
|
+
query_params["page_no"] = pageNo;
|
|
857
|
+
query_params["page_size"] = pageSize;
|
|
858
|
+
query_params["is_installed"] = isInstalled;
|
|
1423
859
|
|
|
1424
860
|
const xHeaders = {};
|
|
1425
861
|
|
|
1426
862
|
const response = await PlatformAPIClient.execute(
|
|
1427
863
|
this.config,
|
|
1428
864
|
"get",
|
|
1429
|
-
`/service/platform/logistics/
|
|
865
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/list`,
|
|
1430
866
|
query_params,
|
|
1431
867
|
undefined,
|
|
1432
868
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1440,7 +876,7 @@ class Serviceability {
|
|
|
1440
876
|
|
|
1441
877
|
const {
|
|
1442
878
|
error: res_error,
|
|
1443
|
-
} = ServiceabilityPlatformModel.
|
|
879
|
+
} = ServiceabilityPlatformModel.InstallCourierPartnerResponseSchema().validate(
|
|
1444
880
|
responseData,
|
|
1445
881
|
{ abortEarly: false, allowUnknown: true }
|
|
1446
882
|
);
|
|
@@ -1451,7 +887,7 @@ class Serviceability {
|
|
|
1451
887
|
} else {
|
|
1452
888
|
Logger({
|
|
1453
889
|
level: "WARN",
|
|
1454
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
890
|
+
message: `Response Validation Warnings for platform > Serviceability > getInstalledCourierPartnerExtensions \n ${res_error}`,
|
|
1455
891
|
});
|
|
1456
892
|
}
|
|
1457
893
|
}
|
|
@@ -1460,24 +896,29 @@ class Serviceability {
|
|
|
1460
896
|
}
|
|
1461
897
|
|
|
1462
898
|
/**
|
|
1463
|
-
* @param {ServiceabilityPlatformValidator.
|
|
899
|
+
* @param {ServiceabilityPlatformValidator.GetListPackageMaterialRuleDetailsParam} arg
|
|
900
|
+
* - Arg object
|
|
901
|
+
*
|
|
1464
902
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1465
903
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1466
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1467
|
-
* Success response
|
|
1468
|
-
*
|
|
1469
|
-
* @
|
|
1470
|
-
* @
|
|
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/).
|
|
1471
910
|
*/
|
|
1472
|
-
async
|
|
1473
|
-
{
|
|
911
|
+
async getListPackageMaterialRuleDetails(
|
|
912
|
+
{ pageNo, pageSize, isActive, requestHeaders } = { requestHeaders: {} },
|
|
1474
913
|
{ responseHeaders } = { responseHeaders: false }
|
|
1475
914
|
) {
|
|
1476
915
|
const {
|
|
1477
916
|
error,
|
|
1478
|
-
} = ServiceabilityPlatformValidator.
|
|
917
|
+
} = ServiceabilityPlatformValidator.getListPackageMaterialRuleDetails().validate(
|
|
1479
918
|
{
|
|
1480
|
-
|
|
919
|
+
pageNo,
|
|
920
|
+
pageSize,
|
|
921
|
+
isActive,
|
|
1481
922
|
},
|
|
1482
923
|
{ abortEarly: false, allowUnknown: true }
|
|
1483
924
|
);
|
|
@@ -1488,29 +929,34 @@ class Serviceability {
|
|
|
1488
929
|
// Showing warrnings if extra unknown parameters are found
|
|
1489
930
|
const {
|
|
1490
931
|
error: warrning,
|
|
1491
|
-
} = ServiceabilityPlatformValidator.
|
|
932
|
+
} = ServiceabilityPlatformValidator.getListPackageMaterialRuleDetails().validate(
|
|
1492
933
|
{
|
|
1493
|
-
|
|
934
|
+
pageNo,
|
|
935
|
+
pageSize,
|
|
936
|
+
isActive,
|
|
1494
937
|
},
|
|
1495
938
|
{ abortEarly: false, allowUnknown: false }
|
|
1496
939
|
);
|
|
1497
940
|
if (warrning) {
|
|
1498
941
|
Logger({
|
|
1499
942
|
level: "WARN",
|
|
1500
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
943
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getListPackageMaterialRuleDetails \n ${warrning}`,
|
|
1501
944
|
});
|
|
1502
945
|
}
|
|
1503
946
|
|
|
1504
947
|
const query_params = {};
|
|
948
|
+
query_params["page_no"] = pageNo;
|
|
949
|
+
query_params["page_size"] = pageSize;
|
|
950
|
+
query_params["is_active"] = isActive;
|
|
1505
951
|
|
|
1506
952
|
const xHeaders = {};
|
|
1507
953
|
|
|
1508
954
|
const response = await PlatformAPIClient.execute(
|
|
1509
955
|
this.config,
|
|
1510
|
-
"
|
|
1511
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
956
|
+
"get",
|
|
957
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules/details`,
|
|
1512
958
|
query_params,
|
|
1513
|
-
|
|
959
|
+
undefined,
|
|
1514
960
|
{ ...xHeaders, ...requestHeaders },
|
|
1515
961
|
{ responseHeaders }
|
|
1516
962
|
);
|
|
@@ -1522,7 +968,7 @@ class Serviceability {
|
|
|
1522
968
|
|
|
1523
969
|
const {
|
|
1524
970
|
error: res_error,
|
|
1525
|
-
} = ServiceabilityPlatformModel.
|
|
971
|
+
} = ServiceabilityPlatformModel.PackageMaterialRuleList().validate(
|
|
1526
972
|
responseData,
|
|
1527
973
|
{ abortEarly: false, allowUnknown: true }
|
|
1528
974
|
);
|
|
@@ -1533,7 +979,7 @@ class Serviceability {
|
|
|
1533
979
|
} else {
|
|
1534
980
|
Logger({
|
|
1535
981
|
level: "WARN",
|
|
1536
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
982
|
+
message: `Response Validation Warnings for platform > Serviceability > getListPackageMaterialRuleDetails \n ${res_error}`,
|
|
1537
983
|
});
|
|
1538
984
|
}
|
|
1539
985
|
}
|
|
@@ -1542,32 +988,38 @@ class Serviceability {
|
|
|
1542
988
|
}
|
|
1543
989
|
|
|
1544
990
|
/**
|
|
1545
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1546
|
-
* - Arg object
|
|
1547
|
-
*
|
|
991
|
+
* @param {ServiceabilityPlatformValidator.GetLocalitiesParam} arg - Arg object
|
|
1548
992
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1549
993
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1550
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1551
|
-
*
|
|
1552
|
-
* @
|
|
1553
|
-
* @
|
|
1554
|
-
* @description: Retrieves a list of packaging materials - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialList/).
|
|
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/).
|
|
1555
998
|
*/
|
|
1556
|
-
async
|
|
1557
|
-
{
|
|
1558
|
-
|
|
1559
|
-
|
|
999
|
+
async getLocalities(
|
|
1000
|
+
{
|
|
1001
|
+
localityType,
|
|
1002
|
+
country,
|
|
1003
|
+
state,
|
|
1004
|
+
city,
|
|
1005
|
+
pageNo,
|
|
1006
|
+
pageSize,
|
|
1007
|
+
q,
|
|
1008
|
+
name,
|
|
1009
|
+
requestHeaders,
|
|
1010
|
+
} = { requestHeaders: {} },
|
|
1560
1011
|
{ responseHeaders } = { responseHeaders: false }
|
|
1561
1012
|
) {
|
|
1562
|
-
const {
|
|
1563
|
-
error,
|
|
1564
|
-
} = ServiceabilityPlatformValidator.getPackageMaterialList().validate(
|
|
1013
|
+
const { error } = ServiceabilityPlatformValidator.getLocalities().validate(
|
|
1565
1014
|
{
|
|
1015
|
+
localityType,
|
|
1016
|
+
country,
|
|
1017
|
+
state,
|
|
1018
|
+
city,
|
|
1566
1019
|
pageNo,
|
|
1567
1020
|
pageSize,
|
|
1568
1021
|
q,
|
|
1569
|
-
|
|
1570
|
-
packageType,
|
|
1022
|
+
name,
|
|
1571
1023
|
},
|
|
1572
1024
|
{ abortEarly: false, allowUnknown: true }
|
|
1573
1025
|
);
|
|
@@ -1578,36 +1030,41 @@ class Serviceability {
|
|
|
1578
1030
|
// Showing warrnings if extra unknown parameters are found
|
|
1579
1031
|
const {
|
|
1580
1032
|
error: warrning,
|
|
1581
|
-
} = ServiceabilityPlatformValidator.
|
|
1033
|
+
} = ServiceabilityPlatformValidator.getLocalities().validate(
|
|
1582
1034
|
{
|
|
1035
|
+
localityType,
|
|
1036
|
+
country,
|
|
1037
|
+
state,
|
|
1038
|
+
city,
|
|
1583
1039
|
pageNo,
|
|
1584
1040
|
pageSize,
|
|
1585
1041
|
q,
|
|
1586
|
-
|
|
1587
|
-
packageType,
|
|
1042
|
+
name,
|
|
1588
1043
|
},
|
|
1589
1044
|
{ abortEarly: false, allowUnknown: false }
|
|
1590
1045
|
);
|
|
1591
1046
|
if (warrning) {
|
|
1592
1047
|
Logger({
|
|
1593
1048
|
level: "WARN",
|
|
1594
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1049
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getLocalities \n ${warrning}`,
|
|
1595
1050
|
});
|
|
1596
1051
|
}
|
|
1597
1052
|
|
|
1598
1053
|
const query_params = {};
|
|
1054
|
+
query_params["country"] = country;
|
|
1055
|
+
query_params["state"] = state;
|
|
1056
|
+
query_params["city"] = city;
|
|
1599
1057
|
query_params["page_no"] = pageNo;
|
|
1600
1058
|
query_params["page_size"] = pageSize;
|
|
1601
1059
|
query_params["q"] = q;
|
|
1602
|
-
query_params["
|
|
1603
|
-
query_params["package_type"] = packageType;
|
|
1060
|
+
query_params["name"] = name;
|
|
1604
1061
|
|
|
1605
1062
|
const xHeaders = {};
|
|
1606
1063
|
|
|
1607
1064
|
const response = await PlatformAPIClient.execute(
|
|
1608
1065
|
this.config,
|
|
1609
1066
|
"get",
|
|
1610
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1067
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/localities/${localityType}`,
|
|
1611
1068
|
query_params,
|
|
1612
1069
|
undefined,
|
|
1613
1070
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1621,10 +1078,10 @@ class Serviceability {
|
|
|
1621
1078
|
|
|
1622
1079
|
const {
|
|
1623
1080
|
error: res_error,
|
|
1624
|
-
} = ServiceabilityPlatformModel.
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
);
|
|
1081
|
+
} = ServiceabilityPlatformModel.GetLocalities().validate(responseData, {
|
|
1082
|
+
abortEarly: false,
|
|
1083
|
+
allowUnknown: true,
|
|
1084
|
+
});
|
|
1628
1085
|
|
|
1629
1086
|
if (res_error) {
|
|
1630
1087
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1632,7 +1089,7 @@ class Serviceability {
|
|
|
1632
1089
|
} else {
|
|
1633
1090
|
Logger({
|
|
1634
1091
|
level: "WARN",
|
|
1635
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1092
|
+
message: `Response Validation Warnings for platform > Serviceability > getLocalities \n ${res_error}`,
|
|
1636
1093
|
});
|
|
1637
1094
|
}
|
|
1638
1095
|
}
|
|
@@ -1641,113 +1098,78 @@ class Serviceability {
|
|
|
1641
1098
|
}
|
|
1642
1099
|
|
|
1643
1100
|
/**
|
|
1644
|
-
* @param {
|
|
1645
|
-
*
|
|
1646
|
-
*
|
|
1647
|
-
* @param {
|
|
1648
|
-
*
|
|
1649
|
-
* @
|
|
1650
|
-
*
|
|
1651
|
-
* @
|
|
1652
|
-
* @
|
|
1653
|
-
* @
|
|
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.
|
|
1654
1116
|
*/
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
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}`,
|
|
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,
|
|
1684
1140
|
});
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
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;
|
|
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;
|
|
1725
1149
|
}
|
|
1726
1150
|
|
|
1727
1151
|
/**
|
|
1728
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1152
|
+
* @param {ServiceabilityPlatformValidator.GetLocalitiesByPrefixParam} arg
|
|
1729
1153
|
* - Arg object
|
|
1730
1154
|
*
|
|
1731
1155
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1732
1156
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1733
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1734
|
-
*
|
|
1735
|
-
*
|
|
1736
|
-
* @
|
|
1737
|
-
* @summary: Get packaging rules
|
|
1738
|
-
* @description: Retrieve packaging rules - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRules/).
|
|
1157
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetLocalities>} - Success response
|
|
1158
|
+
* @name getLocalitiesByPrefix
|
|
1159
|
+
* @summary: Get Localities by Name Prefix
|
|
1160
|
+
* @description: Get localities that start with a specified prefix. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getLocalitiesByPrefix/).
|
|
1739
1161
|
*/
|
|
1740
|
-
async
|
|
1741
|
-
{ pageNo, pageSize,
|
|
1162
|
+
async getLocalitiesByPrefix(
|
|
1163
|
+
{ pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
|
|
1742
1164
|
{ responseHeaders } = { responseHeaders: false }
|
|
1743
1165
|
) {
|
|
1744
1166
|
const {
|
|
1745
1167
|
error,
|
|
1746
|
-
} = ServiceabilityPlatformValidator.
|
|
1168
|
+
} = ServiceabilityPlatformValidator.getLocalitiesByPrefix().validate(
|
|
1747
1169
|
{
|
|
1748
1170
|
pageNo,
|
|
1749
1171
|
pageSize,
|
|
1750
|
-
|
|
1172
|
+
q,
|
|
1751
1173
|
},
|
|
1752
1174
|
{ abortEarly: false, allowUnknown: true }
|
|
1753
1175
|
);
|
|
@@ -1758,32 +1180,32 @@ class Serviceability {
|
|
|
1758
1180
|
// Showing warrnings if extra unknown parameters are found
|
|
1759
1181
|
const {
|
|
1760
1182
|
error: warrning,
|
|
1761
|
-
} = ServiceabilityPlatformValidator.
|
|
1183
|
+
} = ServiceabilityPlatformValidator.getLocalitiesByPrefix().validate(
|
|
1762
1184
|
{
|
|
1763
1185
|
pageNo,
|
|
1764
1186
|
pageSize,
|
|
1765
|
-
|
|
1187
|
+
q,
|
|
1766
1188
|
},
|
|
1767
1189
|
{ abortEarly: false, allowUnknown: false }
|
|
1768
1190
|
);
|
|
1769
1191
|
if (warrning) {
|
|
1770
1192
|
Logger({
|
|
1771
1193
|
level: "WARN",
|
|
1772
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1194
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getLocalitiesByPrefix \n ${warrning}`,
|
|
1773
1195
|
});
|
|
1774
1196
|
}
|
|
1775
1197
|
|
|
1776
1198
|
const query_params = {};
|
|
1777
1199
|
query_params["page_no"] = pageNo;
|
|
1778
1200
|
query_params["page_size"] = pageSize;
|
|
1779
|
-
query_params["
|
|
1201
|
+
query_params["q"] = q;
|
|
1780
1202
|
|
|
1781
1203
|
const xHeaders = {};
|
|
1782
1204
|
|
|
1783
1205
|
const response = await PlatformAPIClient.execute(
|
|
1784
1206
|
this.config,
|
|
1785
1207
|
"get",
|
|
1786
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1208
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/localities`,
|
|
1787
1209
|
query_params,
|
|
1788
1210
|
undefined,
|
|
1789
1211
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1797,10 +1219,10 @@ class Serviceability {
|
|
|
1797
1219
|
|
|
1798
1220
|
const {
|
|
1799
1221
|
error: res_error,
|
|
1800
|
-
} = ServiceabilityPlatformModel.
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
);
|
|
1222
|
+
} = ServiceabilityPlatformModel.GetLocalities().validate(responseData, {
|
|
1223
|
+
abortEarly: false,
|
|
1224
|
+
allowUnknown: true,
|
|
1225
|
+
});
|
|
1804
1226
|
|
|
1805
1227
|
if (res_error) {
|
|
1806
1228
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1808,7 +1230,7 @@ class Serviceability {
|
|
|
1808
1230
|
} else {
|
|
1809
1231
|
Logger({
|
|
1810
1232
|
level: "WARN",
|
|
1811
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1233
|
+
message: `Response Validation Warnings for platform > Serviceability > getLocalitiesByPrefix \n ${res_error}`,
|
|
1812
1234
|
});
|
|
1813
1235
|
}
|
|
1814
1236
|
}
|
|
@@ -1817,24 +1239,56 @@ class Serviceability {
|
|
|
1817
1239
|
}
|
|
1818
1240
|
|
|
1819
1241
|
/**
|
|
1820
|
-
* @param {
|
|
1242
|
+
* @param {Object} arg - Arg object.
|
|
1243
|
+
* @param {number} [arg.pageSize] - Number of items per page.
|
|
1244
|
+
* @param {string} [arg.q] - Localities starting with the specified prefix.
|
|
1245
|
+
* @returns {Paginator<ServiceabilityPlatformModel.GetLocalities>}
|
|
1246
|
+
* @summary: Get Localities by Name Prefix
|
|
1247
|
+
* @description: Get localities that start with a specified prefix.
|
|
1248
|
+
*/
|
|
1249
|
+
getLocalitiesByPrefixPaginator({ pageSize, q } = {}) {
|
|
1250
|
+
const paginator = new Paginator();
|
|
1251
|
+
const callback = async () => {
|
|
1252
|
+
const pageId = paginator.nextId;
|
|
1253
|
+
const pageNo = paginator.pageNo;
|
|
1254
|
+
const pageType = "number";
|
|
1255
|
+
const data = await this.getLocalitiesByPrefix({
|
|
1256
|
+
pageNo: pageNo,
|
|
1257
|
+
pageSize: pageSize,
|
|
1258
|
+
q: q,
|
|
1259
|
+
});
|
|
1260
|
+
paginator.setPaginator({
|
|
1261
|
+
hasNext: data.page.has_next ? true : false,
|
|
1262
|
+
nextId: data.page.next_id,
|
|
1263
|
+
});
|
|
1264
|
+
return data;
|
|
1265
|
+
};
|
|
1266
|
+
paginator.setCallback(callback.bind(this));
|
|
1267
|
+
return paginator;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* @param {ServiceabilityPlatformValidator.GetLocalityParam} arg - Arg object
|
|
1821
1272
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1822
1273
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1823
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1824
|
-
*
|
|
1825
|
-
* @
|
|
1826
|
-
* @
|
|
1827
|
-
* @description: Retrieve a single packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterials/).
|
|
1274
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetLocality>} - Success response
|
|
1275
|
+
* @name getLocality
|
|
1276
|
+
* @summary: Get Locality API
|
|
1277
|
+
* @description: Get Locality data - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getLocality/).
|
|
1828
1278
|
*/
|
|
1829
|
-
async
|
|
1830
|
-
{
|
|
1279
|
+
async getLocality(
|
|
1280
|
+
{ localityType, localityValue, country, state, city, requestHeaders } = {
|
|
1281
|
+
requestHeaders: {},
|
|
1282
|
+
},
|
|
1831
1283
|
{ responseHeaders } = { responseHeaders: false }
|
|
1832
1284
|
) {
|
|
1833
|
-
const {
|
|
1834
|
-
error,
|
|
1835
|
-
} = ServiceabilityPlatformValidator.getPackageMaterials().validate(
|
|
1285
|
+
const { error } = ServiceabilityPlatformValidator.getLocality().validate(
|
|
1836
1286
|
{
|
|
1837
|
-
|
|
1287
|
+
localityType,
|
|
1288
|
+
localityValue,
|
|
1289
|
+
country,
|
|
1290
|
+
state,
|
|
1291
|
+
city,
|
|
1838
1292
|
},
|
|
1839
1293
|
{ abortEarly: false, allowUnknown: true }
|
|
1840
1294
|
);
|
|
@@ -1845,27 +1299,34 @@ class Serviceability {
|
|
|
1845
1299
|
// Showing warrnings if extra unknown parameters are found
|
|
1846
1300
|
const {
|
|
1847
1301
|
error: warrning,
|
|
1848
|
-
} = ServiceabilityPlatformValidator.
|
|
1302
|
+
} = ServiceabilityPlatformValidator.getLocality().validate(
|
|
1849
1303
|
{
|
|
1850
|
-
|
|
1304
|
+
localityType,
|
|
1305
|
+
localityValue,
|
|
1306
|
+
country,
|
|
1307
|
+
state,
|
|
1308
|
+
city,
|
|
1851
1309
|
},
|
|
1852
1310
|
{ abortEarly: false, allowUnknown: false }
|
|
1853
1311
|
);
|
|
1854
1312
|
if (warrning) {
|
|
1855
1313
|
Logger({
|
|
1856
1314
|
level: "WARN",
|
|
1857
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1315
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getLocality \n ${warrning}`,
|
|
1858
1316
|
});
|
|
1859
1317
|
}
|
|
1860
1318
|
|
|
1861
1319
|
const query_params = {};
|
|
1320
|
+
query_params["country"] = country;
|
|
1321
|
+
query_params["state"] = state;
|
|
1322
|
+
query_params["city"] = city;
|
|
1862
1323
|
|
|
1863
1324
|
const xHeaders = {};
|
|
1864
1325
|
|
|
1865
1326
|
const response = await PlatformAPIClient.execute(
|
|
1866
1327
|
this.config,
|
|
1867
1328
|
"get",
|
|
1868
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1329
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/localities/${localityType}/${localityValue}`,
|
|
1869
1330
|
query_params,
|
|
1870
1331
|
undefined,
|
|
1871
1332
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1879,10 +1340,10 @@ class Serviceability {
|
|
|
1879
1340
|
|
|
1880
1341
|
const {
|
|
1881
1342
|
error: res_error,
|
|
1882
|
-
} = ServiceabilityPlatformModel.
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
);
|
|
1343
|
+
} = ServiceabilityPlatformModel.GetLocality().validate(responseData, {
|
|
1344
|
+
abortEarly: false,
|
|
1345
|
+
allowUnknown: true,
|
|
1346
|
+
});
|
|
1886
1347
|
|
|
1887
1348
|
if (res_error) {
|
|
1888
1349
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1890,7 +1351,7 @@ class Serviceability {
|
|
|
1890
1351
|
} else {
|
|
1891
1352
|
Logger({
|
|
1892
1353
|
level: "WARN",
|
|
1893
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1354
|
+
message: `Response Validation Warnings for platform > Serviceability > getLocality \n ${res_error}`,
|
|
1894
1355
|
});
|
|
1895
1356
|
}
|
|
1896
1357
|
}
|
|
@@ -1899,29 +1360,25 @@ class Serviceability {
|
|
|
1899
1360
|
}
|
|
1900
1361
|
|
|
1901
1362
|
/**
|
|
1902
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1903
|
-
* - Arg object
|
|
1904
|
-
*
|
|
1363
|
+
* @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object
|
|
1905
1364
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1906
1365
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1907
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1366
|
+
* @returns {Promise<ServiceabilityPlatformModel.OptimalLocationsResponse>}
|
|
1908
1367
|
* - Success response
|
|
1909
1368
|
*
|
|
1910
|
-
* @name
|
|
1911
|
-
* @summary: Get
|
|
1912
|
-
* @description:
|
|
1369
|
+
* @name getOptimalLocations
|
|
1370
|
+
* @summary: Get selling locations
|
|
1371
|
+
* @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
1372
|
*/
|
|
1914
|
-
async
|
|
1915
|
-
{
|
|
1373
|
+
async getOptimalLocations(
|
|
1374
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1916
1375
|
{ responseHeaders } = { responseHeaders: false }
|
|
1917
1376
|
) {
|
|
1918
1377
|
const {
|
|
1919
1378
|
error,
|
|
1920
|
-
} = ServiceabilityPlatformValidator.
|
|
1379
|
+
} = ServiceabilityPlatformValidator.getOptimalLocations().validate(
|
|
1921
1380
|
{
|
|
1922
|
-
|
|
1923
|
-
pageSize,
|
|
1924
|
-
batchId,
|
|
1381
|
+
body,
|
|
1925
1382
|
},
|
|
1926
1383
|
{ abortEarly: false, allowUnknown: true }
|
|
1927
1384
|
);
|
|
@@ -1932,34 +1389,29 @@ class Serviceability {
|
|
|
1932
1389
|
// Showing warrnings if extra unknown parameters are found
|
|
1933
1390
|
const {
|
|
1934
1391
|
error: warrning,
|
|
1935
|
-
} = ServiceabilityPlatformValidator.
|
|
1392
|
+
} = ServiceabilityPlatformValidator.getOptimalLocations().validate(
|
|
1936
1393
|
{
|
|
1937
|
-
|
|
1938
|
-
pageSize,
|
|
1939
|
-
batchId,
|
|
1394
|
+
body,
|
|
1940
1395
|
},
|
|
1941
1396
|
{ abortEarly: false, allowUnknown: false }
|
|
1942
1397
|
);
|
|
1943
1398
|
if (warrning) {
|
|
1944
1399
|
Logger({
|
|
1945
1400
|
level: "WARN",
|
|
1946
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1401
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getOptimalLocations \n ${warrning}`,
|
|
1947
1402
|
});
|
|
1948
1403
|
}
|
|
1949
1404
|
|
|
1950
1405
|
const query_params = {};
|
|
1951
|
-
query_params["page_no"] = pageNo;
|
|
1952
|
-
query_params["page_size"] = pageSize;
|
|
1953
|
-
query_params["batch_id"] = batchId;
|
|
1954
1406
|
|
|
1955
1407
|
const xHeaders = {};
|
|
1956
1408
|
|
|
1957
1409
|
const response = await PlatformAPIClient.execute(
|
|
1958
1410
|
this.config,
|
|
1959
|
-
"
|
|
1960
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1411
|
+
"post",
|
|
1412
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/optimal-locations`,
|
|
1961
1413
|
query_params,
|
|
1962
|
-
|
|
1414
|
+
body,
|
|
1963
1415
|
{ ...xHeaders, ...requestHeaders },
|
|
1964
1416
|
{ responseHeaders }
|
|
1965
1417
|
);
|
|
@@ -1971,7 +1423,7 @@ class Serviceability {
|
|
|
1971
1423
|
|
|
1972
1424
|
const {
|
|
1973
1425
|
error: res_error,
|
|
1974
|
-
} = ServiceabilityPlatformModel.
|
|
1426
|
+
} = ServiceabilityPlatformModel.OptimalLocationsResponse().validate(
|
|
1975
1427
|
responseData,
|
|
1976
1428
|
{ abortEarly: false, allowUnknown: true }
|
|
1977
1429
|
);
|
|
@@ -1982,7 +1434,7 @@ class Serviceability {
|
|
|
1982
1434
|
} else {
|
|
1983
1435
|
Logger({
|
|
1984
1436
|
level: "WARN",
|
|
1985
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1437
|
+
message: `Response Validation Warnings for platform > Serviceability > getOptimalLocations \n ${res_error}`,
|
|
1986
1438
|
});
|
|
1987
1439
|
}
|
|
1988
1440
|
}
|
|
@@ -1991,28 +1443,32 @@ class Serviceability {
|
|
|
1991
1443
|
}
|
|
1992
1444
|
|
|
1993
1445
|
/**
|
|
1994
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1446
|
+
* @param {ServiceabilityPlatformValidator.GetPackageMaterialListParam} arg
|
|
1447
|
+
* - Arg object
|
|
1448
|
+
*
|
|
1995
1449
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1996
1450
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1997
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1451
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialList>} -
|
|
1998
1452
|
* Success response
|
|
1999
|
-
* @name
|
|
2000
|
-
* @summary: Get
|
|
2001
|
-
* @description:
|
|
1453
|
+
* @name getPackageMaterialList
|
|
1454
|
+
* @summary: Get packaging materials
|
|
1455
|
+
* @description: Retrieves a list of packaging materials - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialList/).
|
|
2002
1456
|
*/
|
|
2003
|
-
async
|
|
2004
|
-
{
|
|
1457
|
+
async getPackageMaterialList(
|
|
1458
|
+
{ pageNo, pageSize, q, size, packageType, requestHeaders } = {
|
|
2005
1459
|
requestHeaders: {},
|
|
2006
1460
|
},
|
|
2007
1461
|
{ responseHeaders } = { responseHeaders: false }
|
|
2008
1462
|
) {
|
|
2009
1463
|
const {
|
|
2010
1464
|
error,
|
|
2011
|
-
} = ServiceabilityPlatformValidator.
|
|
1465
|
+
} = ServiceabilityPlatformValidator.getPackageMaterialList().validate(
|
|
2012
1466
|
{
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
1467
|
+
pageNo,
|
|
1468
|
+
pageSize,
|
|
1469
|
+
q,
|
|
1470
|
+
size,
|
|
1471
|
+
packageType,
|
|
2016
1472
|
},
|
|
2017
1473
|
{ abortEarly: false, allowUnknown: true }
|
|
2018
1474
|
);
|
|
@@ -2023,29 +1479,36 @@ class Serviceability {
|
|
|
2023
1479
|
// Showing warrnings if extra unknown parameters are found
|
|
2024
1480
|
const {
|
|
2025
1481
|
error: warrning,
|
|
2026
|
-
} = ServiceabilityPlatformValidator.
|
|
1482
|
+
} = ServiceabilityPlatformValidator.getPackageMaterialList().validate(
|
|
2027
1483
|
{
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
1484
|
+
pageNo,
|
|
1485
|
+
pageSize,
|
|
1486
|
+
q,
|
|
1487
|
+
size,
|
|
1488
|
+
packageType,
|
|
2031
1489
|
},
|
|
2032
1490
|
{ abortEarly: false, allowUnknown: false }
|
|
2033
1491
|
);
|
|
2034
1492
|
if (warrning) {
|
|
2035
1493
|
Logger({
|
|
2036
1494
|
level: "WARN",
|
|
2037
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1495
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialList \n ${warrning}`,
|
|
2038
1496
|
});
|
|
2039
1497
|
}
|
|
2040
1498
|
|
|
2041
1499
|
const query_params = {};
|
|
1500
|
+
query_params["page_no"] = pageNo;
|
|
1501
|
+
query_params["page_size"] = pageSize;
|
|
1502
|
+
query_params["q"] = q;
|
|
1503
|
+
query_params["size"] = size;
|
|
1504
|
+
query_params["package_type"] = packageType;
|
|
2042
1505
|
|
|
2043
1506
|
const xHeaders = {};
|
|
2044
1507
|
|
|
2045
1508
|
const response = await PlatformAPIClient.execute(
|
|
2046
1509
|
this.config,
|
|
2047
1510
|
"get",
|
|
2048
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1511
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-materials`,
|
|
2049
1512
|
query_params,
|
|
2050
1513
|
undefined,
|
|
2051
1514
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2059,7 +1522,7 @@ class Serviceability {
|
|
|
2059
1522
|
|
|
2060
1523
|
const {
|
|
2061
1524
|
error: res_error,
|
|
2062
|
-
} = ServiceabilityPlatformModel.
|
|
1525
|
+
} = ServiceabilityPlatformModel.PackageMaterialList().validate(
|
|
2063
1526
|
responseData,
|
|
2064
1527
|
{ abortEarly: false, allowUnknown: true }
|
|
2065
1528
|
);
|
|
@@ -2070,7 +1533,7 @@ class Serviceability {
|
|
|
2070
1533
|
} else {
|
|
2071
1534
|
Logger({
|
|
2072
1535
|
level: "WARN",
|
|
2073
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1536
|
+
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialList \n ${res_error}`,
|
|
2074
1537
|
});
|
|
2075
1538
|
}
|
|
2076
1539
|
}
|
|
@@ -2079,22 +1542,26 @@ class Serviceability {
|
|
|
2079
1542
|
}
|
|
2080
1543
|
|
|
2081
1544
|
/**
|
|
2082
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1545
|
+
* @param {ServiceabilityPlatformValidator.GetPackageMaterialRuleParam} arg
|
|
1546
|
+
* - Arg object
|
|
1547
|
+
*
|
|
2083
1548
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2084
1549
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2085
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1550
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageRuleResult>} -
|
|
2086
1551
|
* Success response
|
|
2087
|
-
* @name
|
|
2088
|
-
* @summary: Get
|
|
2089
|
-
* @description:
|
|
1552
|
+
* @name getPackageMaterialRule
|
|
1553
|
+
* @summary: Get packaging material rule
|
|
1554
|
+
* @description: Retrieve packaging rule details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRule/).
|
|
2090
1555
|
*/
|
|
2091
|
-
async
|
|
2092
|
-
{
|
|
1556
|
+
async getPackageMaterialRule(
|
|
1557
|
+
{ ruleId, requestHeaders } = { requestHeaders: {} },
|
|
2093
1558
|
{ responseHeaders } = { responseHeaders: false }
|
|
2094
1559
|
) {
|
|
2095
|
-
const {
|
|
1560
|
+
const {
|
|
1561
|
+
error,
|
|
1562
|
+
} = ServiceabilityPlatformValidator.getPackageMaterialRule().validate(
|
|
2096
1563
|
{
|
|
2097
|
-
|
|
1564
|
+
ruleId,
|
|
2098
1565
|
},
|
|
2099
1566
|
{ abortEarly: false, allowUnknown: true }
|
|
2100
1567
|
);
|
|
@@ -2105,16 +1572,16 @@ class Serviceability {
|
|
|
2105
1572
|
// Showing warrnings if extra unknown parameters are found
|
|
2106
1573
|
const {
|
|
2107
1574
|
error: warrning,
|
|
2108
|
-
} = ServiceabilityPlatformValidator.
|
|
1575
|
+
} = ServiceabilityPlatformValidator.getPackageMaterialRule().validate(
|
|
2109
1576
|
{
|
|
2110
|
-
|
|
1577
|
+
ruleId,
|
|
2111
1578
|
},
|
|
2112
1579
|
{ abortEarly: false, allowUnknown: false }
|
|
2113
1580
|
);
|
|
2114
1581
|
if (warrning) {
|
|
2115
1582
|
Logger({
|
|
2116
1583
|
level: "WARN",
|
|
2117
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1584
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialRule \n ${warrning}`,
|
|
2118
1585
|
});
|
|
2119
1586
|
}
|
|
2120
1587
|
|
|
@@ -2125,7 +1592,7 @@ class Serviceability {
|
|
|
2125
1592
|
const response = await PlatformAPIClient.execute(
|
|
2126
1593
|
this.config,
|
|
2127
1594
|
"get",
|
|
2128
|
-
`/service/platform/logistics/
|
|
1595
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules/${ruleId}`,
|
|
2129
1596
|
query_params,
|
|
2130
1597
|
undefined,
|
|
2131
1598
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2139,7 +1606,7 @@ class Serviceability {
|
|
|
2139
1606
|
|
|
2140
1607
|
const {
|
|
2141
1608
|
error: res_error,
|
|
2142
|
-
} = ServiceabilityPlatformModel.
|
|
1609
|
+
} = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, {
|
|
2143
1610
|
abortEarly: false,
|
|
2144
1611
|
allowUnknown: true,
|
|
2145
1612
|
});
|
|
@@ -2150,7 +1617,7 @@ class Serviceability {
|
|
|
2150
1617
|
} else {
|
|
2151
1618
|
Logger({
|
|
2152
1619
|
level: "WARN",
|
|
2153
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1620
|
+
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialRule \n ${res_error}`,
|
|
2154
1621
|
});
|
|
2155
1622
|
}
|
|
2156
1623
|
}
|
|
@@ -2159,42 +1626,31 @@ class Serviceability {
|
|
|
2159
1626
|
}
|
|
2160
1627
|
|
|
2161
1628
|
/**
|
|
2162
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1629
|
+
* @param {ServiceabilityPlatformValidator.GetPackageMaterialRuleDetailsParam} arg
|
|
1630
|
+
* - Arg object
|
|
1631
|
+
*
|
|
2163
1632
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2164
1633
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2165
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2166
|
-
*
|
|
2167
|
-
* @
|
|
2168
|
-
* @
|
|
1634
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageRuleResult>} -
|
|
1635
|
+
* Success response
|
|
1636
|
+
* @name getPackageMaterialRuleDetails
|
|
1637
|
+
* @summary: Fetching of Package Material Rule from database.
|
|
1638
|
+
* @description: This API returns details of package materials rule. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRuleDetails/).
|
|
2169
1639
|
*/
|
|
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: {} },
|
|
1640
|
+
async getPackageMaterialRuleDetails(
|
|
1641
|
+
{ ruleId, pageNo, pageSize, isActive, requestHeaders } = {
|
|
1642
|
+
requestHeaders: {},
|
|
1643
|
+
},
|
|
2184
1644
|
{ responseHeaders } = { responseHeaders: false }
|
|
2185
1645
|
) {
|
|
2186
|
-
const {
|
|
1646
|
+
const {
|
|
1647
|
+
error,
|
|
1648
|
+
} = ServiceabilityPlatformValidator.getPackageMaterialRuleDetails().validate(
|
|
2187
1649
|
{
|
|
1650
|
+
ruleId,
|
|
2188
1651
|
pageNo,
|
|
2189
1652
|
pageSize,
|
|
2190
1653
|
isActive,
|
|
2191
|
-
channelId,
|
|
2192
|
-
q,
|
|
2193
|
-
countryIsoCode,
|
|
2194
|
-
state,
|
|
2195
|
-
city,
|
|
2196
|
-
pincode,
|
|
2197
|
-
sector,
|
|
2198
1654
|
},
|
|
2199
1655
|
{ abortEarly: false, allowUnknown: true }
|
|
2200
1656
|
);
|
|
@@ -2205,25 +1661,19 @@ class Serviceability {
|
|
|
2205
1661
|
// Showing warrnings if extra unknown parameters are found
|
|
2206
1662
|
const {
|
|
2207
1663
|
error: warrning,
|
|
2208
|
-
} = ServiceabilityPlatformValidator.
|
|
1664
|
+
} = ServiceabilityPlatformValidator.getPackageMaterialRuleDetails().validate(
|
|
2209
1665
|
{
|
|
1666
|
+
ruleId,
|
|
2210
1667
|
pageNo,
|
|
2211
1668
|
pageSize,
|
|
2212
1669
|
isActive,
|
|
2213
|
-
channelId,
|
|
2214
|
-
q,
|
|
2215
|
-
countryIsoCode,
|
|
2216
|
-
state,
|
|
2217
|
-
city,
|
|
2218
|
-
pincode,
|
|
2219
|
-
sector,
|
|
2220
1670
|
},
|
|
2221
1671
|
{ abortEarly: false, allowUnknown: false }
|
|
2222
1672
|
);
|
|
2223
1673
|
if (warrning) {
|
|
2224
1674
|
Logger({
|
|
2225
1675
|
level: "WARN",
|
|
2226
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1676
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialRuleDetails \n ${warrning}`,
|
|
2227
1677
|
});
|
|
2228
1678
|
}
|
|
2229
1679
|
|
|
@@ -2231,20 +1681,13 @@ class Serviceability {
|
|
|
2231
1681
|
query_params["page_no"] = pageNo;
|
|
2232
1682
|
query_params["page_size"] = pageSize;
|
|
2233
1683
|
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
1684
|
|
|
2242
1685
|
const xHeaders = {};
|
|
2243
1686
|
|
|
2244
1687
|
const response = await PlatformAPIClient.execute(
|
|
2245
1688
|
this.config,
|
|
2246
1689
|
"get",
|
|
2247
|
-
`/service/platform/logistics/
|
|
1690
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules/${ruleId}/details`,
|
|
2248
1691
|
query_params,
|
|
2249
1692
|
undefined,
|
|
2250
1693
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2258,7 +1701,7 @@ class Serviceability {
|
|
|
2258
1701
|
|
|
2259
1702
|
const {
|
|
2260
1703
|
error: res_error,
|
|
2261
|
-
} = ServiceabilityPlatformModel.
|
|
1704
|
+
} = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, {
|
|
2262
1705
|
abortEarly: false,
|
|
2263
1706
|
allowUnknown: true,
|
|
2264
1707
|
});
|
|
@@ -2269,7 +1712,7 @@ class Serviceability {
|
|
|
2269
1712
|
} else {
|
|
2270
1713
|
Logger({
|
|
2271
1714
|
level: "WARN",
|
|
2272
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1715
|
+
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialRuleDetails \n ${res_error}`,
|
|
2273
1716
|
});
|
|
2274
1717
|
}
|
|
2275
1718
|
}
|
|
@@ -2278,27 +1721,25 @@ class Serviceability {
|
|
|
2278
1721
|
}
|
|
2279
1722
|
|
|
2280
1723
|
/**
|
|
2281
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2282
|
-
* - Arg object
|
|
2283
|
-
*
|
|
1724
|
+
* @param {ServiceabilityPlatformValidator.GetPackageMaterialsParam} arg - Arg object
|
|
2284
1725
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2285
1726
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2286
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1727
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResponse>}
|
|
2287
1728
|
* - Success response
|
|
2288
1729
|
*
|
|
2289
|
-
* @name
|
|
2290
|
-
* @summary:
|
|
2291
|
-
* @description:
|
|
1730
|
+
* @name getPackageMaterials
|
|
1731
|
+
* @summary: Get packaging material
|
|
1732
|
+
* @description: Retrieve a single packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterials/).
|
|
2292
1733
|
*/
|
|
2293
|
-
async
|
|
2294
|
-
{
|
|
1734
|
+
async getPackageMaterials(
|
|
1735
|
+
{ packageMaterialId, requestHeaders } = { requestHeaders: {} },
|
|
2295
1736
|
{ responseHeaders } = { responseHeaders: false }
|
|
2296
1737
|
) {
|
|
2297
1738
|
const {
|
|
2298
1739
|
error,
|
|
2299
|
-
} = ServiceabilityPlatformValidator.
|
|
1740
|
+
} = ServiceabilityPlatformValidator.getPackageMaterials().validate(
|
|
2300
1741
|
{
|
|
2301
|
-
|
|
1742
|
+
packageMaterialId,
|
|
2302
1743
|
},
|
|
2303
1744
|
{ abortEarly: false, allowUnknown: true }
|
|
2304
1745
|
);
|
|
@@ -2309,16 +1750,16 @@ class Serviceability {
|
|
|
2309
1750
|
// Showing warrnings if extra unknown parameters are found
|
|
2310
1751
|
const {
|
|
2311
1752
|
error: warrning,
|
|
2312
|
-
} = ServiceabilityPlatformValidator.
|
|
1753
|
+
} = ServiceabilityPlatformValidator.getPackageMaterials().validate(
|
|
2313
1754
|
{
|
|
2314
|
-
|
|
1755
|
+
packageMaterialId,
|
|
2315
1756
|
},
|
|
2316
1757
|
{ abortEarly: false, allowUnknown: false }
|
|
2317
1758
|
);
|
|
2318
1759
|
if (warrning) {
|
|
2319
1760
|
Logger({
|
|
2320
1761
|
level: "WARN",
|
|
2321
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1762
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterials \n ${warrning}`,
|
|
2322
1763
|
});
|
|
2323
1764
|
}
|
|
2324
1765
|
|
|
@@ -2328,10 +1769,10 @@ class Serviceability {
|
|
|
2328
1769
|
|
|
2329
1770
|
const response = await PlatformAPIClient.execute(
|
|
2330
1771
|
this.config,
|
|
2331
|
-
"
|
|
2332
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1772
|
+
"get",
|
|
1773
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/${packageMaterialId}`,
|
|
2333
1774
|
query_params,
|
|
2334
|
-
|
|
1775
|
+
undefined,
|
|
2335
1776
|
{ ...xHeaders, ...requestHeaders },
|
|
2336
1777
|
{ responseHeaders }
|
|
2337
1778
|
);
|
|
@@ -2343,7 +1784,7 @@ class Serviceability {
|
|
|
2343
1784
|
|
|
2344
1785
|
const {
|
|
2345
1786
|
error: res_error,
|
|
2346
|
-
} = ServiceabilityPlatformModel.
|
|
1787
|
+
} = ServiceabilityPlatformModel.PackageMaterialResponse().validate(
|
|
2347
1788
|
responseData,
|
|
2348
1789
|
{ abortEarly: false, allowUnknown: true }
|
|
2349
1790
|
);
|
|
@@ -2354,7 +1795,7 @@ class Serviceability {
|
|
|
2354
1795
|
} else {
|
|
2355
1796
|
Logger({
|
|
2356
1797
|
level: "WARN",
|
|
2357
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1798
|
+
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterials \n ${res_error}`,
|
|
2358
1799
|
});
|
|
2359
1800
|
}
|
|
2360
1801
|
}
|
|
@@ -2446,26 +1887,24 @@ class Serviceability {
|
|
|
2446
1887
|
}
|
|
2447
1888
|
|
|
2448
1889
|
/**
|
|
2449
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1890
|
+
* @param {ServiceabilityPlatformValidator.UpdateCompanySelfShipParam} arg
|
|
2450
1891
|
* - Arg object
|
|
2451
1892
|
*
|
|
2452
1893
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2453
1894
|
* @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/).
|
|
1895
|
+
* @returns {Promise<ServiceabilityPlatformModel.CompanySelfShip>} - Success response
|
|
1896
|
+
* @name updateCompanySelfShip
|
|
1897
|
+
* @summary: Update Company Self Ship
|
|
1898
|
+
* @description: Updates Self Ship at company level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCompanySelfShip/).
|
|
2459
1899
|
*/
|
|
2460
|
-
async
|
|
2461
|
-
{
|
|
1900
|
+
async updateCompanySelfShip(
|
|
1901
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2462
1902
|
{ responseHeaders } = { responseHeaders: false }
|
|
2463
1903
|
) {
|
|
2464
1904
|
const {
|
|
2465
1905
|
error,
|
|
2466
|
-
} = ServiceabilityPlatformValidator.
|
|
1906
|
+
} = ServiceabilityPlatformValidator.updateCompanySelfShip().validate(
|
|
2467
1907
|
{
|
|
2468
|
-
accountId,
|
|
2469
1908
|
body,
|
|
2470
1909
|
},
|
|
2471
1910
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2477,9 +1916,8 @@ class Serviceability {
|
|
|
2477
1916
|
// Showing warrnings if extra unknown parameters are found
|
|
2478
1917
|
const {
|
|
2479
1918
|
error: warrning,
|
|
2480
|
-
} = ServiceabilityPlatformValidator.
|
|
1919
|
+
} = ServiceabilityPlatformValidator.updateCompanySelfShip().validate(
|
|
2481
1920
|
{
|
|
2482
|
-
accountId,
|
|
2483
1921
|
body,
|
|
2484
1922
|
},
|
|
2485
1923
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2487,7 +1925,7 @@ class Serviceability {
|
|
|
2487
1925
|
if (warrning) {
|
|
2488
1926
|
Logger({
|
|
2489
1927
|
level: "WARN",
|
|
2490
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1928
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateCompanySelfShip \n ${warrning}`,
|
|
2491
1929
|
});
|
|
2492
1930
|
}
|
|
2493
1931
|
|
|
@@ -2497,8 +1935,8 @@ class Serviceability {
|
|
|
2497
1935
|
|
|
2498
1936
|
const response = await PlatformAPIClient.execute(
|
|
2499
1937
|
this.config,
|
|
2500
|
-
"
|
|
2501
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1938
|
+
"patch",
|
|
1939
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/selfship`,
|
|
2502
1940
|
query_params,
|
|
2503
1941
|
body,
|
|
2504
1942
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2512,10 +1950,10 @@ class Serviceability {
|
|
|
2512
1950
|
|
|
2513
1951
|
const {
|
|
2514
1952
|
error: res_error,
|
|
2515
|
-
} = ServiceabilityPlatformModel.
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
);
|
|
1953
|
+
} = ServiceabilityPlatformModel.CompanySelfShip().validate(responseData, {
|
|
1954
|
+
abortEarly: false,
|
|
1955
|
+
allowUnknown: true,
|
|
1956
|
+
});
|
|
2519
1957
|
|
|
2520
1958
|
if (res_error) {
|
|
2521
1959
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2523,7 +1961,7 @@ class Serviceability {
|
|
|
2523
1961
|
} else {
|
|
2524
1962
|
Logger({
|
|
2525
1963
|
level: "WARN",
|
|
2526
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1964
|
+
message: `Response Validation Warnings for platform > Serviceability > updateCompanySelfShip \n ${res_error}`,
|
|
2527
1965
|
});
|
|
2528
1966
|
}
|
|
2529
1967
|
}
|
|
@@ -2532,28 +1970,25 @@ class Serviceability {
|
|
|
2532
1970
|
}
|
|
2533
1971
|
|
|
2534
1972
|
/**
|
|
2535
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1973
|
+
* @param {ServiceabilityPlatformValidator.UpdateCourierPartnerAccountParam} arg
|
|
2536
1974
|
* - Arg object
|
|
2537
1975
|
*
|
|
2538
1976
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2539
1977
|
* @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/).
|
|
1978
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierAccount>} - Success response
|
|
1979
|
+
* @name updateCourierPartnerAccount
|
|
1980
|
+
* @summary: Update courier account
|
|
1981
|
+
* @description: Updates an existing courier partner account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerAccount/).
|
|
2546
1982
|
*/
|
|
2547
|
-
async
|
|
2548
|
-
{
|
|
1983
|
+
async updateCourierPartnerAccount(
|
|
1984
|
+
{ accountId, body, requestHeaders } = { requestHeaders: {} },
|
|
2549
1985
|
{ responseHeaders } = { responseHeaders: false }
|
|
2550
1986
|
) {
|
|
2551
1987
|
const {
|
|
2552
1988
|
error,
|
|
2553
|
-
} = ServiceabilityPlatformValidator.
|
|
1989
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerAccount().validate(
|
|
2554
1990
|
{
|
|
2555
|
-
|
|
2556
|
-
|
|
1991
|
+
accountId,
|
|
2557
1992
|
body,
|
|
2558
1993
|
},
|
|
2559
1994
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2565,10 +2000,9 @@ class Serviceability {
|
|
|
2565
2000
|
// Showing warrnings if extra unknown parameters are found
|
|
2566
2001
|
const {
|
|
2567
2002
|
error: warrning,
|
|
2568
|
-
} = ServiceabilityPlatformValidator.
|
|
2003
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerAccount().validate(
|
|
2569
2004
|
{
|
|
2570
|
-
|
|
2571
|
-
|
|
2005
|
+
accountId,
|
|
2572
2006
|
body,
|
|
2573
2007
|
},
|
|
2574
2008
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2576,7 +2010,7 @@ class Serviceability {
|
|
|
2576
2010
|
if (warrning) {
|
|
2577
2011
|
Logger({
|
|
2578
2012
|
level: "WARN",
|
|
2579
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2013
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateCourierPartnerAccount \n ${warrning}`,
|
|
2580
2014
|
});
|
|
2581
2015
|
}
|
|
2582
2016
|
|
|
@@ -2587,7 +2021,7 @@ class Serviceability {
|
|
|
2587
2021
|
const response = await PlatformAPIClient.execute(
|
|
2588
2022
|
this.config,
|
|
2589
2023
|
"put",
|
|
2590
|
-
`/service/platform/logistics/
|
|
2024
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account/${accountId}`,
|
|
2591
2025
|
query_params,
|
|
2592
2026
|
body,
|
|
2593
2027
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2601,10 +2035,10 @@ class Serviceability {
|
|
|
2601
2035
|
|
|
2602
2036
|
const {
|
|
2603
2037
|
error: res_error,
|
|
2604
|
-
} = ServiceabilityPlatformModel.
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
);
|
|
2038
|
+
} = ServiceabilityPlatformModel.CourierAccount().validate(responseData, {
|
|
2039
|
+
abortEarly: false,
|
|
2040
|
+
allowUnknown: true,
|
|
2041
|
+
});
|
|
2608
2042
|
|
|
2609
2043
|
if (res_error) {
|
|
2610
2044
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2612,7 +2046,7 @@ class Serviceability {
|
|
|
2612
2046
|
} else {
|
|
2613
2047
|
Logger({
|
|
2614
2048
|
level: "WARN",
|
|
2615
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2049
|
+
message: `Response Validation Warnings for platform > Serviceability > updateCourierPartnerAccount \n ${res_error}`,
|
|
2616
2050
|
});
|
|
2617
2051
|
}
|
|
2618
2052
|
}
|
|
@@ -2712,8 +2146,9 @@ class Serviceability {
|
|
|
2712
2146
|
*
|
|
2713
2147
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2714
2148
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2715
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2716
|
-
* Success response
|
|
2149
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResponse>}
|
|
2150
|
+
* - Success response
|
|
2151
|
+
*
|
|
2717
2152
|
* @name updatePackageMaterials
|
|
2718
2153
|
* @summary: Update packaging material
|
|
2719
2154
|
* @description: Update an existing packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterials/).
|
|
@@ -2773,7 +2208,7 @@ class Serviceability {
|
|
|
2773
2208
|
|
|
2774
2209
|
const {
|
|
2775
2210
|
error: res_error,
|
|
2776
|
-
} = ServiceabilityPlatformModel.
|
|
2211
|
+
} = ServiceabilityPlatformModel.PackageMaterialResponse().validate(
|
|
2777
2212
|
responseData,
|
|
2778
2213
|
{ abortEarly: false, allowUnknown: true }
|
|
2779
2214
|
);
|
|
@@ -2793,28 +2228,27 @@ class Serviceability {
|
|
|
2793
2228
|
}
|
|
2794
2229
|
|
|
2795
2230
|
/**
|
|
2796
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2231
|
+
* @param {ServiceabilityPlatformValidator.ValidateAddressParam} arg - Arg object
|
|
2797
2232
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2798
2233
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2799
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2234
|
+
* @returns {Promise<ServiceabilityPlatformModel.ValidateAddressRequest>} -
|
|
2800
2235
|
* Success response
|
|
2801
|
-
* @name
|
|
2802
|
-
* @summary:
|
|
2803
|
-
* @description:
|
|
2236
|
+
* @name validateAddress
|
|
2237
|
+
* @summary: Validate given address wrt template
|
|
2238
|
+
* @description: Validate given address wrt template - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/validateAddress/).
|
|
2804
2239
|
*/
|
|
2805
|
-
async
|
|
2806
|
-
{
|
|
2240
|
+
async validateAddress(
|
|
2241
|
+
{ countryIsoCode, templateName, body, requestHeaders } = {
|
|
2807
2242
|
requestHeaders: {},
|
|
2808
2243
|
},
|
|
2809
2244
|
{ responseHeaders } = { responseHeaders: false }
|
|
2810
2245
|
) {
|
|
2811
2246
|
const {
|
|
2812
2247
|
error,
|
|
2813
|
-
} = ServiceabilityPlatformValidator.
|
|
2248
|
+
} = ServiceabilityPlatformValidator.validateAddress().validate(
|
|
2814
2249
|
{
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
regionId,
|
|
2250
|
+
countryIsoCode,
|
|
2251
|
+
templateName,
|
|
2818
2252
|
body,
|
|
2819
2253
|
},
|
|
2820
2254
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2826,11 +2260,10 @@ class Serviceability {
|
|
|
2826
2260
|
// Showing warrnings if extra unknown parameters are found
|
|
2827
2261
|
const {
|
|
2828
2262
|
error: warrning,
|
|
2829
|
-
} = ServiceabilityPlatformValidator.
|
|
2263
|
+
} = ServiceabilityPlatformValidator.validateAddress().validate(
|
|
2830
2264
|
{
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
regionId,
|
|
2265
|
+
countryIsoCode,
|
|
2266
|
+
templateName,
|
|
2834
2267
|
body,
|
|
2835
2268
|
},
|
|
2836
2269
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2838,7 +2271,7 @@ class Serviceability {
|
|
|
2838
2271
|
if (warrning) {
|
|
2839
2272
|
Logger({
|
|
2840
2273
|
level: "WARN",
|
|
2841
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2274
|
+
message: `Parameter Validation warrnings for platform > Serviceability > validateAddress \n ${warrning}`,
|
|
2842
2275
|
});
|
|
2843
2276
|
}
|
|
2844
2277
|
|
|
@@ -2848,8 +2281,8 @@ class Serviceability {
|
|
|
2848
2281
|
|
|
2849
2282
|
const response = await PlatformAPIClient.execute(
|
|
2850
2283
|
this.config,
|
|
2851
|
-
"
|
|
2852
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
2284
|
+
"post",
|
|
2285
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/country/${countryIsoCode}/address/templates/${templateName}/validate`,
|
|
2853
2286
|
query_params,
|
|
2854
2287
|
body,
|
|
2855
2288
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2863,7 +2296,7 @@ class Serviceability {
|
|
|
2863
2296
|
|
|
2864
2297
|
const {
|
|
2865
2298
|
error: res_error,
|
|
2866
|
-
} = ServiceabilityPlatformModel.
|
|
2299
|
+
} = ServiceabilityPlatformModel.ValidateAddressRequest().validate(
|
|
2867
2300
|
responseData,
|
|
2868
2301
|
{ abortEarly: false, allowUnknown: true }
|
|
2869
2302
|
);
|
|
@@ -2874,89 +2307,7 @@ class Serviceability {
|
|
|
2874
2307
|
} else {
|
|
2875
2308
|
Logger({
|
|
2876
2309
|
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}`,
|
|
2310
|
+
message: `Response Validation Warnings for platform > Serviceability > validateAddress \n ${res_error}`,
|
|
2960
2311
|
});
|
|
2961
2312
|
}
|
|
2962
2313
|
}
|