@gofynd/fdk-client-javascript 3.1.0-beta.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +81 -101
- package/sdk/application/Cart/CartApplicationClient.js +173 -511
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -19
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
- package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
- package/sdk/application/Content/ContentApplicationClient.d.ts +61 -61
- package/sdk/application/Content/ContentApplicationClient.js +183 -366
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
- package/sdk/application/Lead/LeadApplicationClient.js +24 -55
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +28 -117
- package/sdk/application/Logistic/LogisticApplicationClient.js +99 -492
- package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
- package/sdk/application/Order/OrderApplicationClient.js +89 -293
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
- package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
- package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
- package/sdk/application/Share/ShareApplicationClient.js +35 -89
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
- package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
- package/sdk/application/User/UserApplicationClient.d.ts +23 -13
- package/sdk/application/User/UserApplicationClient.js +49 -407
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -54
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +32 -364
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -35
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
- package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
- package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
- package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
- package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
- package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +172 -251
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +577 -648
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +270 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +192 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4554 -3154
- package/sdk/platform/Cart/CartPlatformModel.js +1935 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +380 -976
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6464
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +161 -1082
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +80 -884
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +568 -325
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1560 -1162
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9772 -7871
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6978 -9516
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +231 -240
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +180 -188
- package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
- package/sdk/platform/Common/CommonPlatformModel.js +11 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +240 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +589 -874
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +330 -502
- package/sdk/platform/Communication/CommunicationPlatformModel.js +376 -610
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -100
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -146
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -31
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -25
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +117 -332
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +562 -1289
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +368 -1037
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -248
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1292 -773
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
- package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
- package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2391 -924
- package/sdk/platform/Content/ContentPlatformModel.js +1314 -970
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
- package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
- package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
- package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
- package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
- package/sdk/platform/Order/OrderPlatformClient.d.ts +406 -403
- package/sdk/platform/Order/OrderPlatformClient.js +1200 -1343
- package/sdk/platform/Order/OrderPlatformModel.d.ts +8665 -4505
- package/sdk/platform/Order/OrderPlatformModel.js +4088 -3601
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +666 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +353 -312
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
- package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +937 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +100 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +74 -305
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
- package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1307 -3536
- package/sdk/platform/Payment/PaymentPlatformModel.js +1389 -3692
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
- package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -521
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +160 -149
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +766 -545
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6196 -3978
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3181 -3895
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +294 -220
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -149
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
- package/sdk/platform/Share/SharePlatformModel.d.ts +53 -9
- package/sdk/platform/Share/SharePlatformModel.js +45 -5
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +17 -37
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +66 -204
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +25 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +20 -31
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
- package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
- package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
- package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
- package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
- package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
- package/sdk/platform/User/UserPlatformModel.js +253 -210
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
- package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
- package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
- package/sdk/public/Content/ContentPublicClient.js +254 -280
- package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
- package/sdk/public/Content/ContentPublicModel.js +98 -44
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
- package/sdk/public/Content/ContentPublicValidator.js +26 -19
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
- package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
- package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
- package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
- package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
- package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2895
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -15,24 +15,26 @@ class Serviceability {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @param {ServiceabilityPlatformValidator.
|
|
19
|
-
* - Arg object
|
|
20
|
-
*
|
|
18
|
+
* @param {ServiceabilityPlatformValidator.BulkServiceabilityParam} arg - Arg object
|
|
21
19
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
22
20
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
23
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* @
|
|
21
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionResultItemData>}
|
|
22
|
+
* - Success response
|
|
23
|
+
*
|
|
24
|
+
* @name bulkServiceability
|
|
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/).
|
|
27
27
|
*/
|
|
28
|
-
async
|
|
29
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
28
|
+
async bulkServiceability(
|
|
29
|
+
{ extensionId, schemeId, body, requestHeaders } = { requestHeaders: {} },
|
|
30
30
|
{ responseHeaders } = { responseHeaders: false }
|
|
31
31
|
) {
|
|
32
32
|
const {
|
|
33
33
|
error,
|
|
34
|
-
} = ServiceabilityPlatformValidator.
|
|
34
|
+
} = ServiceabilityPlatformValidator.bulkServiceability().validate(
|
|
35
35
|
{
|
|
36
|
+
extensionId,
|
|
37
|
+
schemeId,
|
|
36
38
|
body,
|
|
37
39
|
},
|
|
38
40
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -44,8 +46,10 @@ class Serviceability {
|
|
|
44
46
|
// Showing warrnings if extra unknown parameters are found
|
|
45
47
|
const {
|
|
46
48
|
error: warrning,
|
|
47
|
-
} = ServiceabilityPlatformValidator.
|
|
49
|
+
} = ServiceabilityPlatformValidator.bulkServiceability().validate(
|
|
48
50
|
{
|
|
51
|
+
extensionId,
|
|
52
|
+
schemeId,
|
|
49
53
|
body,
|
|
50
54
|
},
|
|
51
55
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -53,7 +57,7 @@ class Serviceability {
|
|
|
53
57
|
if (warrning) {
|
|
54
58
|
Logger({
|
|
55
59
|
level: "WARN",
|
|
56
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
60
|
+
message: `Parameter Validation warrnings for platform > Serviceability > bulkServiceability \n ${warrning}`,
|
|
57
61
|
});
|
|
58
62
|
}
|
|
59
63
|
|
|
@@ -64,7 +68,7 @@ class Serviceability {
|
|
|
64
68
|
const response = await PlatformAPIClient.execute(
|
|
65
69
|
this.config,
|
|
66
70
|
"post",
|
|
67
|
-
`/service/platform/logistics/
|
|
71
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/bulk`,
|
|
68
72
|
query_params,
|
|
69
73
|
body,
|
|
70
74
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -78,10 +82,10 @@ class Serviceability {
|
|
|
78
82
|
|
|
79
83
|
const {
|
|
80
84
|
error: res_error,
|
|
81
|
-
} = ServiceabilityPlatformModel.
|
|
82
|
-
|
|
83
|
-
allowUnknown: true
|
|
84
|
-
|
|
85
|
+
} = ServiceabilityPlatformModel.BulkRegionResultItemData().validate(
|
|
86
|
+
responseData,
|
|
87
|
+
{ abortEarly: false, allowUnknown: true }
|
|
88
|
+
);
|
|
85
89
|
|
|
86
90
|
if (res_error) {
|
|
87
91
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -89,7 +93,7 @@ class Serviceability {
|
|
|
89
93
|
} else {
|
|
90
94
|
Logger({
|
|
91
95
|
level: "WARN",
|
|
92
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
96
|
+
message: `Response Validation Warnings for platform > Serviceability > bulkServiceability \n ${res_error}`,
|
|
93
97
|
});
|
|
94
98
|
}
|
|
95
99
|
}
|
|
@@ -98,28 +102,26 @@ class Serviceability {
|
|
|
98
102
|
}
|
|
99
103
|
|
|
100
104
|
/**
|
|
101
|
-
* @param {ServiceabilityPlatformValidator.
|
|
102
|
-
* - Arg object
|
|
103
|
-
*
|
|
105
|
+
* @param {ServiceabilityPlatformValidator.BulkTatParam} arg - Arg object
|
|
104
106
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
105
107
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
106
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
108
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionResultItemData>}
|
|
107
109
|
* - Success response
|
|
108
110
|
*
|
|
109
|
-
* @name
|
|
110
|
-
* @summary:
|
|
111
|
-
* @description:
|
|
111
|
+
* @name bulkTat
|
|
112
|
+
* @summary: Locality TAT import or export
|
|
113
|
+
* @description: Updates locality wise TAT(Turn Around Time) for particular courier scheme using CSV file.
|
|
114
|
+
* Export locality wise CSV files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/bulkTat/).
|
|
112
115
|
*/
|
|
113
|
-
async
|
|
114
|
-
{
|
|
116
|
+
async bulkTat(
|
|
117
|
+
{ extensionId, schemeId, body, requestHeaders } = { requestHeaders: {} },
|
|
115
118
|
{ responseHeaders } = { responseHeaders: false }
|
|
116
119
|
) {
|
|
117
|
-
const {
|
|
118
|
-
error,
|
|
119
|
-
} = ServiceabilityPlatformValidator.createPackageMaterial().validate(
|
|
120
|
+
const { error } = ServiceabilityPlatformValidator.bulkTat().validate(
|
|
120
121
|
{
|
|
122
|
+
extensionId,
|
|
123
|
+
schemeId,
|
|
121
124
|
body,
|
|
122
|
-
pageNo,
|
|
123
125
|
},
|
|
124
126
|
{ abortEarly: false, allowUnknown: true }
|
|
125
127
|
);
|
|
@@ -130,29 +132,29 @@ class Serviceability {
|
|
|
130
132
|
// Showing warrnings if extra unknown parameters are found
|
|
131
133
|
const {
|
|
132
134
|
error: warrning,
|
|
133
|
-
} = ServiceabilityPlatformValidator.
|
|
135
|
+
} = ServiceabilityPlatformValidator.bulkTat().validate(
|
|
134
136
|
{
|
|
137
|
+
extensionId,
|
|
138
|
+
schemeId,
|
|
135
139
|
body,
|
|
136
|
-
pageNo,
|
|
137
140
|
},
|
|
138
141
|
{ abortEarly: false, allowUnknown: false }
|
|
139
142
|
);
|
|
140
143
|
if (warrning) {
|
|
141
144
|
Logger({
|
|
142
145
|
level: "WARN",
|
|
143
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
146
|
+
message: `Parameter Validation warrnings for platform > Serviceability > bulkTat \n ${warrning}`,
|
|
144
147
|
});
|
|
145
148
|
}
|
|
146
149
|
|
|
147
150
|
const query_params = {};
|
|
148
|
-
query_params["page_no"] = pageNo;
|
|
149
151
|
|
|
150
152
|
const xHeaders = {};
|
|
151
153
|
|
|
152
154
|
const response = await PlatformAPIClient.execute(
|
|
153
155
|
this.config,
|
|
154
156
|
"post",
|
|
155
|
-
`/service/platform/logistics/
|
|
157
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`,
|
|
156
158
|
query_params,
|
|
157
159
|
body,
|
|
158
160
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -166,7 +168,7 @@ class Serviceability {
|
|
|
166
168
|
|
|
167
169
|
const {
|
|
168
170
|
error: res_error,
|
|
169
|
-
} = ServiceabilityPlatformModel.
|
|
171
|
+
} = ServiceabilityPlatformModel.BulkRegionResultItemData().validate(
|
|
170
172
|
responseData,
|
|
171
173
|
{ abortEarly: false, allowUnknown: true }
|
|
172
174
|
);
|
|
@@ -177,7 +179,7 @@ class Serviceability {
|
|
|
177
179
|
} else {
|
|
178
180
|
Logger({
|
|
179
181
|
level: "WARN",
|
|
180
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
182
|
+
message: `Response Validation Warnings for platform > Serviceability > bulkTat \n ${res_error}`,
|
|
181
183
|
});
|
|
182
184
|
}
|
|
183
185
|
}
|
|
@@ -186,24 +188,25 @@ class Serviceability {
|
|
|
186
188
|
}
|
|
187
189
|
|
|
188
190
|
/**
|
|
189
|
-
* @param {ServiceabilityPlatformValidator.
|
|
191
|
+
* @param {ServiceabilityPlatformValidator.CreateCourierPartnerAccountParam} arg
|
|
190
192
|
* - Arg object
|
|
191
193
|
*
|
|
192
194
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
193
195
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
194
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
195
|
-
* Success response
|
|
196
|
-
*
|
|
197
|
-
* @
|
|
198
|
-
* @
|
|
196
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierAccountDetailsBody>}
|
|
197
|
+
* - Success response
|
|
198
|
+
*
|
|
199
|
+
* @name createCourierPartnerAccount
|
|
200
|
+
* @summary: Create courier account
|
|
201
|
+
* @description: Retrieves a list of courier partner accounts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerAccount/).
|
|
199
202
|
*/
|
|
200
|
-
async
|
|
203
|
+
async createCourierPartnerAccount(
|
|
201
204
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
202
205
|
{ responseHeaders } = { responseHeaders: false }
|
|
203
206
|
) {
|
|
204
207
|
const {
|
|
205
208
|
error,
|
|
206
|
-
} = ServiceabilityPlatformValidator.
|
|
209
|
+
} = ServiceabilityPlatformValidator.createCourierPartnerAccount().validate(
|
|
207
210
|
{
|
|
208
211
|
body,
|
|
209
212
|
},
|
|
@@ -216,7 +219,7 @@ class Serviceability {
|
|
|
216
219
|
// Showing warrnings if extra unknown parameters are found
|
|
217
220
|
const {
|
|
218
221
|
error: warrning,
|
|
219
|
-
} = ServiceabilityPlatformValidator.
|
|
222
|
+
} = ServiceabilityPlatformValidator.createCourierPartnerAccount().validate(
|
|
220
223
|
{
|
|
221
224
|
body,
|
|
222
225
|
},
|
|
@@ -225,7 +228,7 @@ class Serviceability {
|
|
|
225
228
|
if (warrning) {
|
|
226
229
|
Logger({
|
|
227
230
|
level: "WARN",
|
|
228
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
231
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createCourierPartnerAccount \n ${warrning}`,
|
|
229
232
|
});
|
|
230
233
|
}
|
|
231
234
|
|
|
@@ -236,7 +239,7 @@ class Serviceability {
|
|
|
236
239
|
const response = await PlatformAPIClient.execute(
|
|
237
240
|
this.config,
|
|
238
241
|
"post",
|
|
239
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
242
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account`,
|
|
240
243
|
query_params,
|
|
241
244
|
body,
|
|
242
245
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -250,10 +253,10 @@ class Serviceability {
|
|
|
250
253
|
|
|
251
254
|
const {
|
|
252
255
|
error: res_error,
|
|
253
|
-
} = ServiceabilityPlatformModel.
|
|
254
|
-
|
|
255
|
-
allowUnknown: true
|
|
256
|
-
|
|
256
|
+
} = ServiceabilityPlatformModel.CourierAccountDetailsBody().validate(
|
|
257
|
+
responseData,
|
|
258
|
+
{ abortEarly: false, allowUnknown: true }
|
|
259
|
+
);
|
|
257
260
|
|
|
258
261
|
if (res_error) {
|
|
259
262
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -261,7 +264,7 @@ class Serviceability {
|
|
|
261
264
|
} else {
|
|
262
265
|
Logger({
|
|
263
266
|
level: "WARN",
|
|
264
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
267
|
+
message: `Response Validation Warnings for platform > Serviceability > createCourierPartnerAccount \n ${res_error}`,
|
|
265
268
|
});
|
|
266
269
|
}
|
|
267
270
|
}
|
|
@@ -270,24 +273,28 @@ class Serviceability {
|
|
|
270
273
|
}
|
|
271
274
|
|
|
272
275
|
/**
|
|
273
|
-
* @param {ServiceabilityPlatformValidator.
|
|
276
|
+
* @param {ServiceabilityPlatformValidator.CreateCourierPartnerSchemeParam} arg
|
|
274
277
|
* - Arg object
|
|
275
278
|
*
|
|
276
279
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
277
280
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
278
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
* @
|
|
281
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema>}
|
|
282
|
+
* - Success response
|
|
283
|
+
*
|
|
284
|
+
* @name createCourierPartnerScheme
|
|
285
|
+
* @summary: Create Scheme for courier partner extension
|
|
286
|
+
* @description: Create Scheme for courier partner extension - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerScheme/).
|
|
282
287
|
*/
|
|
283
|
-
async
|
|
284
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
288
|
+
async createCourierPartnerScheme(
|
|
289
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
285
290
|
{ responseHeaders } = { responseHeaders: false }
|
|
286
291
|
) {
|
|
287
292
|
const {
|
|
288
293
|
error,
|
|
289
|
-
} = ServiceabilityPlatformValidator.
|
|
290
|
-
{
|
|
294
|
+
} = ServiceabilityPlatformValidator.createCourierPartnerScheme().validate(
|
|
295
|
+
{
|
|
296
|
+
body,
|
|
297
|
+
},
|
|
291
298
|
{ abortEarly: false, allowUnknown: true }
|
|
292
299
|
);
|
|
293
300
|
if (error) {
|
|
@@ -297,14 +304,16 @@ class Serviceability {
|
|
|
297
304
|
// Showing warrnings if extra unknown parameters are found
|
|
298
305
|
const {
|
|
299
306
|
error: warrning,
|
|
300
|
-
} = ServiceabilityPlatformValidator.
|
|
301
|
-
{
|
|
307
|
+
} = ServiceabilityPlatformValidator.createCourierPartnerScheme().validate(
|
|
308
|
+
{
|
|
309
|
+
body,
|
|
310
|
+
},
|
|
302
311
|
{ abortEarly: false, allowUnknown: false }
|
|
303
312
|
);
|
|
304
313
|
if (warrning) {
|
|
305
314
|
Logger({
|
|
306
315
|
level: "WARN",
|
|
307
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
316
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createCourierPartnerScheme \n ${warrning}`,
|
|
308
317
|
});
|
|
309
318
|
}
|
|
310
319
|
|
|
@@ -314,10 +323,10 @@ class Serviceability {
|
|
|
314
323
|
|
|
315
324
|
const response = await PlatformAPIClient.execute(
|
|
316
325
|
this.config,
|
|
317
|
-
"
|
|
318
|
-
`/service/platform/logistics/
|
|
326
|
+
"post",
|
|
327
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme`,
|
|
319
328
|
query_params,
|
|
320
|
-
|
|
329
|
+
body,
|
|
321
330
|
{ ...xHeaders, ...requestHeaders },
|
|
322
331
|
{ responseHeaders }
|
|
323
332
|
);
|
|
@@ -329,10 +338,10 @@ class Serviceability {
|
|
|
329
338
|
|
|
330
339
|
const {
|
|
331
340
|
error: res_error,
|
|
332
|
-
} = ServiceabilityPlatformModel.
|
|
333
|
-
|
|
334
|
-
allowUnknown: true
|
|
335
|
-
|
|
341
|
+
} = ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema().validate(
|
|
342
|
+
responseData,
|
|
343
|
+
{ abortEarly: false, allowUnknown: true }
|
|
344
|
+
);
|
|
336
345
|
|
|
337
346
|
if (res_error) {
|
|
338
347
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -340,7 +349,7 @@ class Serviceability {
|
|
|
340
349
|
} else {
|
|
341
350
|
Logger({
|
|
342
351
|
level: "WARN",
|
|
343
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
352
|
+
message: `Response Validation Warnings for platform > Serviceability > createCourierPartnerScheme \n ${res_error}`,
|
|
344
353
|
});
|
|
345
354
|
}
|
|
346
355
|
}
|
|
@@ -349,22 +358,28 @@ class Serviceability {
|
|
|
349
358
|
}
|
|
350
359
|
|
|
351
360
|
/**
|
|
352
|
-
* @param {ServiceabilityPlatformValidator.
|
|
361
|
+
* @param {ServiceabilityPlatformValidator.CreatePackageMaterialParam} arg
|
|
362
|
+
* - Arg object
|
|
363
|
+
*
|
|
353
364
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
354
365
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
355
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
356
|
-
*
|
|
357
|
-
* @
|
|
358
|
-
* @
|
|
366
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResult>} -
|
|
367
|
+
* Success response
|
|
368
|
+
* @name createPackageMaterial
|
|
369
|
+
* @summary: Create packaging material
|
|
370
|
+
* @description: Creates a packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterial/).
|
|
359
371
|
*/
|
|
360
|
-
async
|
|
361
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
372
|
+
async createPackageMaterial(
|
|
373
|
+
{ body, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
362
374
|
{ responseHeaders } = { responseHeaders: false }
|
|
363
375
|
) {
|
|
364
376
|
const {
|
|
365
377
|
error,
|
|
366
|
-
} = ServiceabilityPlatformValidator.
|
|
367
|
-
{
|
|
378
|
+
} = ServiceabilityPlatformValidator.createPackageMaterial().validate(
|
|
379
|
+
{
|
|
380
|
+
body,
|
|
381
|
+
pageNo,
|
|
382
|
+
},
|
|
368
383
|
{ abortEarly: false, allowUnknown: true }
|
|
369
384
|
);
|
|
370
385
|
if (error) {
|
|
@@ -374,27 +389,31 @@ class Serviceability {
|
|
|
374
389
|
// Showing warrnings if extra unknown parameters are found
|
|
375
390
|
const {
|
|
376
391
|
error: warrning,
|
|
377
|
-
} = ServiceabilityPlatformValidator.
|
|
378
|
-
{
|
|
392
|
+
} = ServiceabilityPlatformValidator.createPackageMaterial().validate(
|
|
393
|
+
{
|
|
394
|
+
body,
|
|
395
|
+
pageNo,
|
|
396
|
+
},
|
|
379
397
|
{ abortEarly: false, allowUnknown: false }
|
|
380
398
|
);
|
|
381
399
|
if (warrning) {
|
|
382
400
|
Logger({
|
|
383
401
|
level: "WARN",
|
|
384
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
402
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createPackageMaterial \n ${warrning}`,
|
|
385
403
|
});
|
|
386
404
|
}
|
|
387
405
|
|
|
388
406
|
const query_params = {};
|
|
407
|
+
query_params["page_no"] = pageNo;
|
|
389
408
|
|
|
390
409
|
const xHeaders = {};
|
|
391
410
|
|
|
392
411
|
const response = await PlatformAPIClient.execute(
|
|
393
412
|
this.config,
|
|
394
|
-
"
|
|
395
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
413
|
+
"post",
|
|
414
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-materials`,
|
|
396
415
|
query_params,
|
|
397
|
-
|
|
416
|
+
body,
|
|
398
417
|
{ ...xHeaders, ...requestHeaders },
|
|
399
418
|
{ responseHeaders }
|
|
400
419
|
);
|
|
@@ -406,10 +425,10 @@ class Serviceability {
|
|
|
406
425
|
|
|
407
426
|
const {
|
|
408
427
|
error: res_error,
|
|
409
|
-
} = ServiceabilityPlatformModel.
|
|
410
|
-
|
|
411
|
-
allowUnknown: true
|
|
412
|
-
|
|
428
|
+
} = ServiceabilityPlatformModel.PackageMaterialResult().validate(
|
|
429
|
+
responseData,
|
|
430
|
+
{ abortEarly: false, allowUnknown: true }
|
|
431
|
+
);
|
|
413
432
|
|
|
414
433
|
if (res_error) {
|
|
415
434
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -417,7 +436,7 @@ class Serviceability {
|
|
|
417
436
|
} else {
|
|
418
437
|
Logger({
|
|
419
438
|
level: "WARN",
|
|
420
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
439
|
+
message: `Response Validation Warnings for platform > Serviceability > createPackageMaterial \n ${res_error}`,
|
|
421
440
|
});
|
|
422
441
|
}
|
|
423
442
|
}
|
|
@@ -426,27 +445,26 @@ class Serviceability {
|
|
|
426
445
|
}
|
|
427
446
|
|
|
428
447
|
/**
|
|
429
|
-
* @param {ServiceabilityPlatformValidator.
|
|
448
|
+
* @param {ServiceabilityPlatformValidator.CreatePackageMaterialRuleParam} arg
|
|
449
|
+
* - Arg object
|
|
450
|
+
*
|
|
430
451
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
431
452
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
432
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
433
|
-
*
|
|
434
|
-
* @
|
|
435
|
-
* @
|
|
453
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageRuleResult>} -
|
|
454
|
+
* Success response
|
|
455
|
+
* @name createPackageMaterialRule
|
|
456
|
+
* @summary: Create packaging rule
|
|
457
|
+
* @description: Creates a packaging rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterialRule/).
|
|
436
458
|
*/
|
|
437
|
-
async
|
|
438
|
-
{
|
|
439
|
-
requestHeaders: {},
|
|
440
|
-
},
|
|
459
|
+
async createPackageMaterialRule(
|
|
460
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
441
461
|
{ responseHeaders } = { responseHeaders: false }
|
|
442
462
|
) {
|
|
443
|
-
const {
|
|
463
|
+
const {
|
|
464
|
+
error,
|
|
465
|
+
} = ServiceabilityPlatformValidator.createPackageMaterialRule().validate(
|
|
444
466
|
{
|
|
445
|
-
|
|
446
|
-
pageNo,
|
|
447
|
-
pageSize,
|
|
448
|
-
q,
|
|
449
|
-
hierarchy,
|
|
467
|
+
body,
|
|
450
468
|
},
|
|
451
469
|
{ abortEarly: false, allowUnknown: true }
|
|
452
470
|
);
|
|
@@ -457,38 +475,29 @@ class Serviceability {
|
|
|
457
475
|
// Showing warrnings if extra unknown parameters are found
|
|
458
476
|
const {
|
|
459
477
|
error: warrning,
|
|
460
|
-
} = ServiceabilityPlatformValidator.
|
|
478
|
+
} = ServiceabilityPlatformValidator.createPackageMaterialRule().validate(
|
|
461
479
|
{
|
|
462
|
-
|
|
463
|
-
pageNo,
|
|
464
|
-
pageSize,
|
|
465
|
-
q,
|
|
466
|
-
hierarchy,
|
|
480
|
+
body,
|
|
467
481
|
},
|
|
468
482
|
{ abortEarly: false, allowUnknown: false }
|
|
469
483
|
);
|
|
470
484
|
if (warrning) {
|
|
471
485
|
Logger({
|
|
472
486
|
level: "WARN",
|
|
473
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
487
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createPackageMaterialRule \n ${warrning}`,
|
|
474
488
|
});
|
|
475
489
|
}
|
|
476
490
|
|
|
477
491
|
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;
|
|
483
492
|
|
|
484
493
|
const xHeaders = {};
|
|
485
494
|
|
|
486
495
|
const response = await PlatformAPIClient.execute(
|
|
487
496
|
this.config,
|
|
488
|
-
"
|
|
489
|
-
`/service/platform/logistics/
|
|
497
|
+
"post",
|
|
498
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules`,
|
|
490
499
|
query_params,
|
|
491
|
-
|
|
500
|
+
body,
|
|
492
501
|
{ ...xHeaders, ...requestHeaders },
|
|
493
502
|
{ responseHeaders }
|
|
494
503
|
);
|
|
@@ -500,7 +509,7 @@ class Serviceability {
|
|
|
500
509
|
|
|
501
510
|
const {
|
|
502
511
|
error: res_error,
|
|
503
|
-
} = ServiceabilityPlatformModel.
|
|
512
|
+
} = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, {
|
|
504
513
|
abortEarly: false,
|
|
505
514
|
allowUnknown: true,
|
|
506
515
|
});
|
|
@@ -511,7 +520,7 @@ class Serviceability {
|
|
|
511
520
|
} else {
|
|
512
521
|
Logger({
|
|
513
522
|
level: "WARN",
|
|
514
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
523
|
+
message: `Response Validation Warnings for platform > Serviceability > createPackageMaterialRule \n ${res_error}`,
|
|
515
524
|
});
|
|
516
525
|
}
|
|
517
526
|
}
|
|
@@ -520,21 +529,48 @@ class Serviceability {
|
|
|
520
529
|
}
|
|
521
530
|
|
|
522
531
|
/**
|
|
523
|
-
* @param {ServiceabilityPlatformValidator.
|
|
532
|
+
* @param {ServiceabilityPlatformValidator.GetBulkServiceabilityParam} arg
|
|
533
|
+
* - Arg object
|
|
534
|
+
*
|
|
524
535
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
525
536
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
526
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
527
|
-
* @name
|
|
528
|
-
* @summary:
|
|
529
|
-
* @description:
|
|
537
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionResult>} - Success response
|
|
538
|
+
* @name getBulkServiceability
|
|
539
|
+
* @summary: Bulk update history
|
|
540
|
+
* @description: Retrieves the history of changes made to serviceability settings for a scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getBulkServiceability/).
|
|
530
541
|
*/
|
|
531
|
-
async
|
|
532
|
-
{
|
|
542
|
+
async getBulkServiceability(
|
|
543
|
+
{
|
|
544
|
+
extensionId,
|
|
545
|
+
schemeId,
|
|
546
|
+
pageNo,
|
|
547
|
+
pageSize,
|
|
548
|
+
batchId,
|
|
549
|
+
action,
|
|
550
|
+
status,
|
|
551
|
+
country,
|
|
552
|
+
region,
|
|
553
|
+
startDate,
|
|
554
|
+
endDate,
|
|
555
|
+
requestHeaders,
|
|
556
|
+
} = { requestHeaders: {} },
|
|
533
557
|
{ responseHeaders } = { responseHeaders: false }
|
|
534
558
|
) {
|
|
535
|
-
const {
|
|
559
|
+
const {
|
|
560
|
+
error,
|
|
561
|
+
} = ServiceabilityPlatformValidator.getBulkServiceability().validate(
|
|
536
562
|
{
|
|
537
|
-
|
|
563
|
+
extensionId,
|
|
564
|
+
schemeId,
|
|
565
|
+
pageNo,
|
|
566
|
+
pageSize,
|
|
567
|
+
batchId,
|
|
568
|
+
action,
|
|
569
|
+
status,
|
|
570
|
+
country,
|
|
571
|
+
region,
|
|
572
|
+
startDate,
|
|
573
|
+
endDate,
|
|
538
574
|
},
|
|
539
575
|
{ abortEarly: false, allowUnknown: true }
|
|
540
576
|
);
|
|
@@ -545,27 +581,46 @@ class Serviceability {
|
|
|
545
581
|
// Showing warrnings if extra unknown parameters are found
|
|
546
582
|
const {
|
|
547
583
|
error: warrning,
|
|
548
|
-
} = ServiceabilityPlatformValidator.
|
|
584
|
+
} = ServiceabilityPlatformValidator.getBulkServiceability().validate(
|
|
549
585
|
{
|
|
550
|
-
|
|
586
|
+
extensionId,
|
|
587
|
+
schemeId,
|
|
588
|
+
pageNo,
|
|
589
|
+
pageSize,
|
|
590
|
+
batchId,
|
|
591
|
+
action,
|
|
592
|
+
status,
|
|
593
|
+
country,
|
|
594
|
+
region,
|
|
595
|
+
startDate,
|
|
596
|
+
endDate,
|
|
551
597
|
},
|
|
552
598
|
{ abortEarly: false, allowUnknown: false }
|
|
553
599
|
);
|
|
554
600
|
if (warrning) {
|
|
555
601
|
Logger({
|
|
556
602
|
level: "WARN",
|
|
557
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
603
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getBulkServiceability \n ${warrning}`,
|
|
558
604
|
});
|
|
559
605
|
}
|
|
560
606
|
|
|
561
607
|
const query_params = {};
|
|
608
|
+
query_params["page_no"] = pageNo;
|
|
609
|
+
query_params["page_size"] = pageSize;
|
|
610
|
+
query_params["batch_id"] = batchId;
|
|
611
|
+
query_params["action"] = action;
|
|
612
|
+
query_params["status"] = status;
|
|
613
|
+
query_params["country"] = country;
|
|
614
|
+
query_params["region"] = region;
|
|
615
|
+
query_params["start_date"] = startDate;
|
|
616
|
+
query_params["end_date"] = endDate;
|
|
562
617
|
|
|
563
618
|
const xHeaders = {};
|
|
564
619
|
|
|
565
620
|
const response = await PlatformAPIClient.execute(
|
|
566
621
|
this.config,
|
|
567
622
|
"get",
|
|
568
|
-
`/service/platform/logistics/
|
|
623
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/bulk`,
|
|
569
624
|
query_params,
|
|
570
625
|
undefined,
|
|
571
626
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -579,7 +634,7 @@ class Serviceability {
|
|
|
579
634
|
|
|
580
635
|
const {
|
|
581
636
|
error: res_error,
|
|
582
|
-
} = ServiceabilityPlatformModel.
|
|
637
|
+
} = ServiceabilityPlatformModel.BulkRegionResult().validate(responseData, {
|
|
583
638
|
abortEarly: false,
|
|
584
639
|
allowUnknown: true,
|
|
585
640
|
});
|
|
@@ -590,7 +645,7 @@ class Serviceability {
|
|
|
590
645
|
} else {
|
|
591
646
|
Logger({
|
|
592
647
|
level: "WARN",
|
|
593
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
648
|
+
message: `Response Validation Warnings for platform > Serviceability > getBulkServiceability \n ${res_error}`,
|
|
594
649
|
});
|
|
595
650
|
}
|
|
596
651
|
}
|
|
@@ -599,26 +654,44 @@ class Serviceability {
|
|
|
599
654
|
}
|
|
600
655
|
|
|
601
656
|
/**
|
|
602
|
-
* @param {ServiceabilityPlatformValidator.
|
|
603
|
-
* - Arg object
|
|
604
|
-
*
|
|
657
|
+
* @param {ServiceabilityPlatformValidator.GetBulkTatParam} arg - Arg object
|
|
605
658
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
606
659
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
607
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
608
|
-
*
|
|
609
|
-
* @
|
|
610
|
-
* @
|
|
611
|
-
* @description: Retrieves a single courier partner account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerAccount/).
|
|
660
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionResult>} - Success response
|
|
661
|
+
* @name getBulkTat
|
|
662
|
+
* @summary: Locality TAT change history
|
|
663
|
+
* @description: Retrieves the history of changes made to TAT(Turn Around Time) for scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getBulkTat/).
|
|
612
664
|
*/
|
|
613
|
-
async
|
|
614
|
-
{
|
|
665
|
+
async getBulkTat(
|
|
666
|
+
{
|
|
667
|
+
extensionId,
|
|
668
|
+
schemeId,
|
|
669
|
+
pageNo,
|
|
670
|
+
pageSize,
|
|
671
|
+
batchId,
|
|
672
|
+
action,
|
|
673
|
+
status,
|
|
674
|
+
country,
|
|
675
|
+
region,
|
|
676
|
+
startDate,
|
|
677
|
+
endDate,
|
|
678
|
+
requestHeaders,
|
|
679
|
+
} = { requestHeaders: {} },
|
|
615
680
|
{ responseHeaders } = { responseHeaders: false }
|
|
616
681
|
) {
|
|
617
|
-
const {
|
|
618
|
-
error,
|
|
619
|
-
} = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate(
|
|
682
|
+
const { error } = ServiceabilityPlatformValidator.getBulkTat().validate(
|
|
620
683
|
{
|
|
621
|
-
|
|
684
|
+
extensionId,
|
|
685
|
+
schemeId,
|
|
686
|
+
pageNo,
|
|
687
|
+
pageSize,
|
|
688
|
+
batchId,
|
|
689
|
+
action,
|
|
690
|
+
status,
|
|
691
|
+
country,
|
|
692
|
+
region,
|
|
693
|
+
startDate,
|
|
694
|
+
endDate,
|
|
622
695
|
},
|
|
623
696
|
{ abortEarly: false, allowUnknown: true }
|
|
624
697
|
);
|
|
@@ -629,27 +702,46 @@ class Serviceability {
|
|
|
629
702
|
// Showing warrnings if extra unknown parameters are found
|
|
630
703
|
const {
|
|
631
704
|
error: warrning,
|
|
632
|
-
} = ServiceabilityPlatformValidator.
|
|
705
|
+
} = ServiceabilityPlatformValidator.getBulkTat().validate(
|
|
633
706
|
{
|
|
634
|
-
|
|
707
|
+
extensionId,
|
|
708
|
+
schemeId,
|
|
709
|
+
pageNo,
|
|
710
|
+
pageSize,
|
|
711
|
+
batchId,
|
|
712
|
+
action,
|
|
713
|
+
status,
|
|
714
|
+
country,
|
|
715
|
+
region,
|
|
716
|
+
startDate,
|
|
717
|
+
endDate,
|
|
635
718
|
},
|
|
636
719
|
{ abortEarly: false, allowUnknown: false }
|
|
637
720
|
);
|
|
638
721
|
if (warrning) {
|
|
639
722
|
Logger({
|
|
640
723
|
level: "WARN",
|
|
641
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
724
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getBulkTat \n ${warrning}`,
|
|
642
725
|
});
|
|
643
726
|
}
|
|
644
727
|
|
|
645
728
|
const query_params = {};
|
|
729
|
+
query_params["page_no"] = pageNo;
|
|
730
|
+
query_params["page_size"] = pageSize;
|
|
731
|
+
query_params["batch_id"] = batchId;
|
|
732
|
+
query_params["action"] = action;
|
|
733
|
+
query_params["status"] = status;
|
|
734
|
+
query_params["country"] = country;
|
|
735
|
+
query_params["region"] = region;
|
|
736
|
+
query_params["start_date"] = startDate;
|
|
737
|
+
query_params["end_date"] = endDate;
|
|
646
738
|
|
|
647
739
|
const xHeaders = {};
|
|
648
740
|
|
|
649
741
|
const response = await PlatformAPIClient.execute(
|
|
650
742
|
this.config,
|
|
651
743
|
"get",
|
|
652
|
-
`/service/platform/logistics/
|
|
744
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`,
|
|
653
745
|
query_params,
|
|
654
746
|
undefined,
|
|
655
747
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -663,10 +755,10 @@ class Serviceability {
|
|
|
663
755
|
|
|
664
756
|
const {
|
|
665
757
|
error: res_error,
|
|
666
|
-
} = ServiceabilityPlatformModel.
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
);
|
|
758
|
+
} = ServiceabilityPlatformModel.BulkRegionResult().validate(responseData, {
|
|
759
|
+
abortEarly: false,
|
|
760
|
+
allowUnknown: true,
|
|
761
|
+
});
|
|
670
762
|
|
|
671
763
|
if (res_error) {
|
|
672
764
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -674,7 +766,7 @@ class Serviceability {
|
|
|
674
766
|
} else {
|
|
675
767
|
Logger({
|
|
676
768
|
level: "WARN",
|
|
677
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
769
|
+
message: `Response Validation Warnings for platform > Serviceability > getBulkTat \n ${res_error}`,
|
|
678
770
|
});
|
|
679
771
|
}
|
|
680
772
|
}
|
|
@@ -683,47 +775,24 @@ class Serviceability {
|
|
|
683
775
|
}
|
|
684
776
|
|
|
685
777
|
/**
|
|
686
|
-
* @param {ServiceabilityPlatformValidator.
|
|
778
|
+
* @param {ServiceabilityPlatformValidator.GetCompanyConfigurationParam} arg
|
|
687
779
|
* - Arg object
|
|
688
780
|
*
|
|
689
781
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
690
782
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
691
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
692
|
-
*
|
|
693
|
-
*
|
|
694
|
-
* @
|
|
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/).
|
|
783
|
+
* @returns {Promise<ServiceabilityPlatformModel.CompanyConfig>} - Success response
|
|
784
|
+
* @name getCompanyConfiguration
|
|
785
|
+
* @summary: Get delivery configuration
|
|
786
|
+
* @description: Retrieves information about the delivery setup for a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCompanyConfiguration/).
|
|
697
787
|
*/
|
|
698
|
-
async
|
|
699
|
-
{
|
|
700
|
-
pageNo,
|
|
701
|
-
pageSize,
|
|
702
|
-
stage,
|
|
703
|
-
paymentMode,
|
|
704
|
-
transportType,
|
|
705
|
-
accountIds,
|
|
706
|
-
selfShip,
|
|
707
|
-
ownAccount,
|
|
708
|
-
q,
|
|
709
|
-
requestHeaders,
|
|
710
|
-
} = { requestHeaders: {} },
|
|
788
|
+
async getCompanyConfiguration(
|
|
789
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
711
790
|
{ responseHeaders } = { responseHeaders: false }
|
|
712
791
|
) {
|
|
713
792
|
const {
|
|
714
793
|
error,
|
|
715
|
-
} = ServiceabilityPlatformValidator.
|
|
716
|
-
{
|
|
717
|
-
pageNo,
|
|
718
|
-
pageSize,
|
|
719
|
-
stage,
|
|
720
|
-
paymentMode,
|
|
721
|
-
transportType,
|
|
722
|
-
accountIds,
|
|
723
|
-
selfShip,
|
|
724
|
-
ownAccount,
|
|
725
|
-
q,
|
|
726
|
-
},
|
|
794
|
+
} = ServiceabilityPlatformValidator.getCompanyConfiguration().validate(
|
|
795
|
+
{},
|
|
727
796
|
{ abortEarly: false, allowUnknown: true }
|
|
728
797
|
);
|
|
729
798
|
if (error) {
|
|
@@ -733,44 +802,25 @@ class Serviceability {
|
|
|
733
802
|
// Showing warrnings if extra unknown parameters are found
|
|
734
803
|
const {
|
|
735
804
|
error: warrning,
|
|
736
|
-
} = ServiceabilityPlatformValidator.
|
|
737
|
-
{
|
|
738
|
-
pageNo,
|
|
739
|
-
pageSize,
|
|
740
|
-
stage,
|
|
741
|
-
paymentMode,
|
|
742
|
-
transportType,
|
|
743
|
-
accountIds,
|
|
744
|
-
selfShip,
|
|
745
|
-
ownAccount,
|
|
746
|
-
q,
|
|
747
|
-
},
|
|
805
|
+
} = ServiceabilityPlatformValidator.getCompanyConfiguration().validate(
|
|
806
|
+
{},
|
|
748
807
|
{ abortEarly: false, allowUnknown: false }
|
|
749
808
|
);
|
|
750
809
|
if (warrning) {
|
|
751
810
|
Logger({
|
|
752
811
|
level: "WARN",
|
|
753
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
812
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCompanyConfiguration \n ${warrning}`,
|
|
754
813
|
});
|
|
755
814
|
}
|
|
756
815
|
|
|
757
816
|
const query_params = {};
|
|
758
|
-
query_params["page_no"] = pageNo;
|
|
759
|
-
query_params["page_size"] = pageSize;
|
|
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
817
|
|
|
768
818
|
const xHeaders = {};
|
|
769
819
|
|
|
770
820
|
const response = await PlatformAPIClient.execute(
|
|
771
821
|
this.config,
|
|
772
822
|
"get",
|
|
773
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
823
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/configuration`,
|
|
774
824
|
query_params,
|
|
775
825
|
undefined,
|
|
776
826
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -784,10 +834,10 @@ class Serviceability {
|
|
|
784
834
|
|
|
785
835
|
const {
|
|
786
836
|
error: res_error,
|
|
787
|
-
} = ServiceabilityPlatformModel.
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
);
|
|
837
|
+
} = ServiceabilityPlatformModel.CompanyConfig().validate(responseData, {
|
|
838
|
+
abortEarly: false,
|
|
839
|
+
allowUnknown: true,
|
|
840
|
+
});
|
|
791
841
|
|
|
792
842
|
if (res_error) {
|
|
793
843
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -795,7 +845,7 @@ class Serviceability {
|
|
|
795
845
|
} else {
|
|
796
846
|
Logger({
|
|
797
847
|
level: "WARN",
|
|
798
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
848
|
+
message: `Response Validation Warnings for platform > Serviceability > getCompanyConfiguration \n ${res_error}`,
|
|
799
849
|
});
|
|
800
850
|
}
|
|
801
851
|
}
|
|
@@ -804,29 +854,27 @@ class Serviceability {
|
|
|
804
854
|
}
|
|
805
855
|
|
|
806
856
|
/**
|
|
807
|
-
* @param {ServiceabilityPlatformValidator.
|
|
808
|
-
* - Arg object
|
|
809
|
-
*
|
|
857
|
+
* @param {ServiceabilityPlatformValidator.GetCountriesParam} arg - Arg object
|
|
810
858
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
811
859
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
812
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
813
|
-
*
|
|
814
|
-
*
|
|
815
|
-
* @
|
|
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/).
|
|
860
|
+
* @returns {Promise<ServiceabilityPlatformModel.GetCountries>} - Success response
|
|
861
|
+
* @name getCountries
|
|
862
|
+
* @summary: Get all countries and associated data
|
|
863
|
+
* @description: Retrieve a list of countries for logistical purposes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCountries/).
|
|
818
864
|
*/
|
|
819
|
-
async
|
|
820
|
-
{ pageNo, pageSize,
|
|
865
|
+
async getCountries(
|
|
866
|
+
{ onboard, pageNo, pageSize, q, hierarchy, requestHeaders } = {
|
|
867
|
+
requestHeaders: {},
|
|
868
|
+
},
|
|
821
869
|
{ responseHeaders } = { responseHeaders: false }
|
|
822
870
|
) {
|
|
823
|
-
const {
|
|
824
|
-
error,
|
|
825
|
-
} = ServiceabilityPlatformValidator.getInstalledCourierPartnerExtensions().validate(
|
|
871
|
+
const { error } = ServiceabilityPlatformValidator.getCountries().validate(
|
|
826
872
|
{
|
|
873
|
+
onboard,
|
|
827
874
|
pageNo,
|
|
828
875
|
pageSize,
|
|
829
|
-
|
|
876
|
+
q,
|
|
877
|
+
hierarchy,
|
|
830
878
|
},
|
|
831
879
|
{ abortEarly: false, allowUnknown: true }
|
|
832
880
|
);
|
|
@@ -837,32 +885,36 @@ class Serviceability {
|
|
|
837
885
|
// Showing warrnings if extra unknown parameters are found
|
|
838
886
|
const {
|
|
839
887
|
error: warrning,
|
|
840
|
-
} = ServiceabilityPlatformValidator.
|
|
888
|
+
} = ServiceabilityPlatformValidator.getCountries().validate(
|
|
841
889
|
{
|
|
890
|
+
onboard,
|
|
842
891
|
pageNo,
|
|
843
892
|
pageSize,
|
|
844
|
-
|
|
893
|
+
q,
|
|
894
|
+
hierarchy,
|
|
845
895
|
},
|
|
846
896
|
{ abortEarly: false, allowUnknown: false }
|
|
847
897
|
);
|
|
848
898
|
if (warrning) {
|
|
849
899
|
Logger({
|
|
850
900
|
level: "WARN",
|
|
851
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
901
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCountries \n ${warrning}`,
|
|
852
902
|
});
|
|
853
903
|
}
|
|
854
904
|
|
|
855
905
|
const query_params = {};
|
|
906
|
+
query_params["onboard"] = onboard;
|
|
856
907
|
query_params["page_no"] = pageNo;
|
|
857
908
|
query_params["page_size"] = pageSize;
|
|
858
|
-
query_params["
|
|
909
|
+
query_params["q"] = q;
|
|
910
|
+
query_params["hierarchy"] = hierarchy;
|
|
859
911
|
|
|
860
912
|
const xHeaders = {};
|
|
861
913
|
|
|
862
914
|
const response = await PlatformAPIClient.execute(
|
|
863
915
|
this.config,
|
|
864
916
|
"get",
|
|
865
|
-
`/service/platform/logistics/
|
|
917
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/countries`,
|
|
866
918
|
query_params,
|
|
867
919
|
undefined,
|
|
868
920
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -876,10 +928,10 @@ class Serviceability {
|
|
|
876
928
|
|
|
877
929
|
const {
|
|
878
930
|
error: res_error,
|
|
879
|
-
} = ServiceabilityPlatformModel.
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
);
|
|
931
|
+
} = ServiceabilityPlatformModel.GetCountries().validate(responseData, {
|
|
932
|
+
abortEarly: false,
|
|
933
|
+
allowUnknown: true,
|
|
934
|
+
});
|
|
883
935
|
|
|
884
936
|
if (res_error) {
|
|
885
937
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -887,7 +939,7 @@ class Serviceability {
|
|
|
887
939
|
} else {
|
|
888
940
|
Logger({
|
|
889
941
|
level: "WARN",
|
|
890
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
942
|
+
message: `Response Validation Warnings for platform > Serviceability > getCountries \n ${res_error}`,
|
|
891
943
|
});
|
|
892
944
|
}
|
|
893
945
|
}
|
|
@@ -896,29 +948,26 @@ class Serviceability {
|
|
|
896
948
|
}
|
|
897
949
|
|
|
898
950
|
/**
|
|
899
|
-
* @param {ServiceabilityPlatformValidator.
|
|
951
|
+
* @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountParam} arg
|
|
900
952
|
* - Arg object
|
|
901
953
|
*
|
|
902
954
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
903
955
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
904
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
905
|
-
*
|
|
906
|
-
*
|
|
907
|
-
* @
|
|
908
|
-
* @
|
|
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/).
|
|
956
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierAccountResult>} -
|
|
957
|
+
* Success response
|
|
958
|
+
* @name getCourierPartnerAccount
|
|
959
|
+
* @summary: Get courier account
|
|
960
|
+
* @description: Retrieves a single courier partner account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerAccount/).
|
|
910
961
|
*/
|
|
911
|
-
async
|
|
912
|
-
{
|
|
962
|
+
async getCourierPartnerAccount(
|
|
963
|
+
{ accountId, requestHeaders } = { requestHeaders: {} },
|
|
913
964
|
{ responseHeaders } = { responseHeaders: false }
|
|
914
965
|
) {
|
|
915
966
|
const {
|
|
916
967
|
error,
|
|
917
|
-
} = ServiceabilityPlatformValidator.
|
|
968
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate(
|
|
918
969
|
{
|
|
919
|
-
|
|
920
|
-
pageSize,
|
|
921
|
-
isActive,
|
|
970
|
+
accountId,
|
|
922
971
|
},
|
|
923
972
|
{ abortEarly: false, allowUnknown: true }
|
|
924
973
|
);
|
|
@@ -929,32 +978,27 @@ class Serviceability {
|
|
|
929
978
|
// Showing warrnings if extra unknown parameters are found
|
|
930
979
|
const {
|
|
931
980
|
error: warrning,
|
|
932
|
-
} = ServiceabilityPlatformValidator.
|
|
981
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate(
|
|
933
982
|
{
|
|
934
|
-
|
|
935
|
-
pageSize,
|
|
936
|
-
isActive,
|
|
983
|
+
accountId,
|
|
937
984
|
},
|
|
938
985
|
{ abortEarly: false, allowUnknown: false }
|
|
939
986
|
);
|
|
940
987
|
if (warrning) {
|
|
941
988
|
Logger({
|
|
942
989
|
level: "WARN",
|
|
943
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
990
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerAccount \n ${warrning}`,
|
|
944
991
|
});
|
|
945
992
|
}
|
|
946
993
|
|
|
947
994
|
const query_params = {};
|
|
948
|
-
query_params["page_no"] = pageNo;
|
|
949
|
-
query_params["page_size"] = pageSize;
|
|
950
|
-
query_params["is_active"] = isActive;
|
|
951
995
|
|
|
952
996
|
const xHeaders = {};
|
|
953
997
|
|
|
954
998
|
const response = await PlatformAPIClient.execute(
|
|
955
999
|
this.config,
|
|
956
1000
|
"get",
|
|
957
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1001
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account/${accountId}`,
|
|
958
1002
|
query_params,
|
|
959
1003
|
undefined,
|
|
960
1004
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -968,7 +1012,7 @@ class Serviceability {
|
|
|
968
1012
|
|
|
969
1013
|
const {
|
|
970
1014
|
error: res_error,
|
|
971
|
-
} = ServiceabilityPlatformModel.
|
|
1015
|
+
} = ServiceabilityPlatformModel.CourierAccountResult().validate(
|
|
972
1016
|
responseData,
|
|
973
1017
|
{ abortEarly: false, allowUnknown: true }
|
|
974
1018
|
);
|
|
@@ -979,7 +1023,7 @@ class Serviceability {
|
|
|
979
1023
|
} else {
|
|
980
1024
|
Logger({
|
|
981
1025
|
level: "WARN",
|
|
982
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1026
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerAccount \n ${res_error}`,
|
|
983
1027
|
});
|
|
984
1028
|
}
|
|
985
1029
|
}
|
|
@@ -988,38 +1032,46 @@ class Serviceability {
|
|
|
988
1032
|
}
|
|
989
1033
|
|
|
990
1034
|
/**
|
|
991
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1035
|
+
* @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountsParam} arg
|
|
1036
|
+
* - Arg object
|
|
1037
|
+
*
|
|
992
1038
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
993
1039
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
994
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
995
|
-
*
|
|
996
|
-
*
|
|
997
|
-
* @
|
|
1040
|
+
* @returns {Promise<ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResult>}
|
|
1041
|
+
* - Success response
|
|
1042
|
+
*
|
|
1043
|
+
* @name getCourierPartnerAccounts
|
|
1044
|
+
* @summary: List courier accounts
|
|
1045
|
+
* @description: Retrieves a list of courier partner accounts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerAccounts/).
|
|
998
1046
|
*/
|
|
999
|
-
async
|
|
1047
|
+
async getCourierPartnerAccounts(
|
|
1000
1048
|
{
|
|
1001
|
-
localityType,
|
|
1002
|
-
country,
|
|
1003
|
-
state,
|
|
1004
|
-
city,
|
|
1005
1049
|
pageNo,
|
|
1006
1050
|
pageSize,
|
|
1051
|
+
stage,
|
|
1052
|
+
paymentMode,
|
|
1053
|
+
transportType,
|
|
1054
|
+
accountIds,
|
|
1055
|
+
selfShip,
|
|
1056
|
+
ownAccount,
|
|
1007
1057
|
q,
|
|
1008
|
-
name,
|
|
1009
1058
|
requestHeaders,
|
|
1010
1059
|
} = { requestHeaders: {} },
|
|
1011
1060
|
{ responseHeaders } = { responseHeaders: false }
|
|
1012
1061
|
) {
|
|
1013
|
-
const {
|
|
1062
|
+
const {
|
|
1063
|
+
error,
|
|
1064
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate(
|
|
1014
1065
|
{
|
|
1015
|
-
localityType,
|
|
1016
|
-
country,
|
|
1017
|
-
state,
|
|
1018
|
-
city,
|
|
1019
1066
|
pageNo,
|
|
1020
1067
|
pageSize,
|
|
1068
|
+
stage,
|
|
1069
|
+
paymentMode,
|
|
1070
|
+
transportType,
|
|
1071
|
+
accountIds,
|
|
1072
|
+
selfShip,
|
|
1073
|
+
ownAccount,
|
|
1021
1074
|
q,
|
|
1022
|
-
name,
|
|
1023
1075
|
},
|
|
1024
1076
|
{ abortEarly: false, allowUnknown: true }
|
|
1025
1077
|
);
|
|
@@ -1030,41 +1082,44 @@ class Serviceability {
|
|
|
1030
1082
|
// Showing warrnings if extra unknown parameters are found
|
|
1031
1083
|
const {
|
|
1032
1084
|
error: warrning,
|
|
1033
|
-
} = ServiceabilityPlatformValidator.
|
|
1085
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate(
|
|
1034
1086
|
{
|
|
1035
|
-
localityType,
|
|
1036
|
-
country,
|
|
1037
|
-
state,
|
|
1038
|
-
city,
|
|
1039
1087
|
pageNo,
|
|
1040
1088
|
pageSize,
|
|
1089
|
+
stage,
|
|
1090
|
+
paymentMode,
|
|
1091
|
+
transportType,
|
|
1092
|
+
accountIds,
|
|
1093
|
+
selfShip,
|
|
1094
|
+
ownAccount,
|
|
1041
1095
|
q,
|
|
1042
|
-
name,
|
|
1043
1096
|
},
|
|
1044
1097
|
{ abortEarly: false, allowUnknown: false }
|
|
1045
1098
|
);
|
|
1046
1099
|
if (warrning) {
|
|
1047
1100
|
Logger({
|
|
1048
1101
|
level: "WARN",
|
|
1049
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1102
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerAccounts \n ${warrning}`,
|
|
1050
1103
|
});
|
|
1051
1104
|
}
|
|
1052
1105
|
|
|
1053
1106
|
const query_params = {};
|
|
1054
|
-
query_params["country"] = country;
|
|
1055
|
-
query_params["state"] = state;
|
|
1056
|
-
query_params["city"] = city;
|
|
1057
1107
|
query_params["page_no"] = pageNo;
|
|
1058
1108
|
query_params["page_size"] = pageSize;
|
|
1109
|
+
query_params["stage"] = stage;
|
|
1110
|
+
query_params["payment_mode"] = paymentMode;
|
|
1111
|
+
query_params["transport_type"] = transportType;
|
|
1112
|
+
query_params["account_ids"] = accountIds;
|
|
1113
|
+
query_params["self_ship"] = selfShip;
|
|
1114
|
+
query_params["own_account"] = ownAccount;
|
|
1059
1115
|
query_params["q"] = q;
|
|
1060
|
-
query_params["name"] = name;
|
|
1061
1116
|
|
|
1062
1117
|
const xHeaders = {};
|
|
1063
1118
|
|
|
1064
1119
|
const response = await PlatformAPIClient.execute(
|
|
1065
1120
|
this.config,
|
|
1066
1121
|
"get",
|
|
1067
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1122
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account`,
|
|
1068
1123
|
query_params,
|
|
1069
1124
|
undefined,
|
|
1070
1125
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1078,10 +1133,10 @@ class Serviceability {
|
|
|
1078
1133
|
|
|
1079
1134
|
const {
|
|
1080
1135
|
error: res_error,
|
|
1081
|
-
} = ServiceabilityPlatformModel.
|
|
1082
|
-
|
|
1083
|
-
allowUnknown: true
|
|
1084
|
-
|
|
1136
|
+
} = ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResult().validate(
|
|
1137
|
+
responseData,
|
|
1138
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1139
|
+
);
|
|
1085
1140
|
|
|
1086
1141
|
if (res_error) {
|
|
1087
1142
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1089,7 +1144,7 @@ class Serviceability {
|
|
|
1089
1144
|
} else {
|
|
1090
1145
|
Logger({
|
|
1091
1146
|
level: "WARN",
|
|
1092
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1147
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerAccounts \n ${res_error}`,
|
|
1093
1148
|
});
|
|
1094
1149
|
}
|
|
1095
1150
|
}
|
|
@@ -1098,78 +1153,113 @@ class Serviceability {
|
|
|
1098
1153
|
}
|
|
1099
1154
|
|
|
1100
1155
|
/**
|
|
1101
|
-
* @param {
|
|
1102
|
-
*
|
|
1103
|
-
*
|
|
1104
|
-
* @param {
|
|
1105
|
-
*
|
|
1106
|
-
* @
|
|
1107
|
-
*
|
|
1108
|
-
*
|
|
1109
|
-
* @
|
|
1110
|
-
* @
|
|
1111
|
-
* @
|
|
1112
|
-
* name or a search term.
|
|
1113
|
-
* @returns {Paginator<ServiceabilityPlatformModel.GetLocalities>}
|
|
1114
|
-
* @summary: Get Localities.
|
|
1115
|
-
* @description: Get Localities data.
|
|
1156
|
+
* @param {ServiceabilityPlatformValidator.GetCourierPartnerSchemeParam} arg
|
|
1157
|
+
* - Arg object
|
|
1158
|
+
*
|
|
1159
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1160
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1161
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema>}
|
|
1162
|
+
* - Success response
|
|
1163
|
+
*
|
|
1164
|
+
* @name getCourierPartnerScheme
|
|
1165
|
+
* @summary: Get Scheme for courier partner extension by Id
|
|
1166
|
+
* @description: Update Scheme for courier partner extension by Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerScheme/).
|
|
1116
1167
|
*/
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
hasNext: data.page.has_next ? true : false,
|
|
1143
|
-
nextId: data.page.next_id,
|
|
1168
|
+
async getCourierPartnerScheme(
|
|
1169
|
+
{ schemeId, requestHeaders } = { requestHeaders: {} },
|
|
1170
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1171
|
+
) {
|
|
1172
|
+
const {
|
|
1173
|
+
error,
|
|
1174
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerScheme().validate(
|
|
1175
|
+
{ schemeId },
|
|
1176
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1177
|
+
);
|
|
1178
|
+
if (error) {
|
|
1179
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1183
|
+
const {
|
|
1184
|
+
error: warrning,
|
|
1185
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerScheme().validate(
|
|
1186
|
+
{ schemeId },
|
|
1187
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1188
|
+
);
|
|
1189
|
+
if (warrning) {
|
|
1190
|
+
Logger({
|
|
1191
|
+
level: "WARN",
|
|
1192
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerScheme \n ${warrning}`,
|
|
1144
1193
|
});
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
const query_params = {};
|
|
1197
|
+
|
|
1198
|
+
const xHeaders = {};
|
|
1199
|
+
|
|
1200
|
+
const response = await PlatformAPIClient.execute(
|
|
1201
|
+
this.config,
|
|
1202
|
+
"get",
|
|
1203
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme/${schemeId}`,
|
|
1204
|
+
query_params,
|
|
1205
|
+
undefined,
|
|
1206
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1207
|
+
{ responseHeaders }
|
|
1208
|
+
);
|
|
1209
|
+
|
|
1210
|
+
let responseData = response;
|
|
1211
|
+
if (responseHeaders) {
|
|
1212
|
+
responseData = response[0];
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
const {
|
|
1216
|
+
error: res_error,
|
|
1217
|
+
} = ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema().validate(
|
|
1218
|
+
responseData,
|
|
1219
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1220
|
+
);
|
|
1221
|
+
|
|
1222
|
+
if (res_error) {
|
|
1223
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1224
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1225
|
+
} else {
|
|
1226
|
+
Logger({
|
|
1227
|
+
level: "WARN",
|
|
1228
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerScheme \n ${res_error}`,
|
|
1229
|
+
});
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
return response;
|
|
1149
1234
|
}
|
|
1150
1235
|
|
|
1151
1236
|
/**
|
|
1152
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1237
|
+
* @param {ServiceabilityPlatformValidator.GetCourierPartnerSchemesParam} arg
|
|
1153
1238
|
* - Arg object
|
|
1154
1239
|
*
|
|
1155
1240
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1156
1241
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1157
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1158
|
-
*
|
|
1159
|
-
*
|
|
1160
|
-
* @
|
|
1242
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerSchemeList>}
|
|
1243
|
+
* - Success response
|
|
1244
|
+
*
|
|
1245
|
+
* @name getCourierPartnerSchemes
|
|
1246
|
+
* @summary: Get created Schemes for courier partner
|
|
1247
|
+
* @description: Get created Schemes for courier partner - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerSchemes/).
|
|
1161
1248
|
*/
|
|
1162
|
-
async
|
|
1163
|
-
{
|
|
1249
|
+
async getCourierPartnerSchemes(
|
|
1250
|
+
{ schemeType, paymentMode, capabilities, schemeIds, requestHeaders } = {
|
|
1251
|
+
requestHeaders: {},
|
|
1252
|
+
},
|
|
1164
1253
|
{ responseHeaders } = { responseHeaders: false }
|
|
1165
1254
|
) {
|
|
1166
1255
|
const {
|
|
1167
1256
|
error,
|
|
1168
|
-
} = ServiceabilityPlatformValidator.
|
|
1257
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerSchemes().validate(
|
|
1169
1258
|
{
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1259
|
+
schemeType,
|
|
1260
|
+
paymentMode,
|
|
1261
|
+
capabilities,
|
|
1262
|
+
schemeIds,
|
|
1173
1263
|
},
|
|
1174
1264
|
{ abortEarly: false, allowUnknown: true }
|
|
1175
1265
|
);
|
|
@@ -1180,32 +1270,34 @@ class Serviceability {
|
|
|
1180
1270
|
// Showing warrnings if extra unknown parameters are found
|
|
1181
1271
|
const {
|
|
1182
1272
|
error: warrning,
|
|
1183
|
-
} = ServiceabilityPlatformValidator.
|
|
1273
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerSchemes().validate(
|
|
1184
1274
|
{
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1275
|
+
schemeType,
|
|
1276
|
+
paymentMode,
|
|
1277
|
+
capabilities,
|
|
1278
|
+
schemeIds,
|
|
1188
1279
|
},
|
|
1189
1280
|
{ abortEarly: false, allowUnknown: false }
|
|
1190
1281
|
);
|
|
1191
1282
|
if (warrning) {
|
|
1192
1283
|
Logger({
|
|
1193
1284
|
level: "WARN",
|
|
1194
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1285
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerSchemes \n ${warrning}`,
|
|
1195
1286
|
});
|
|
1196
1287
|
}
|
|
1197
1288
|
|
|
1198
1289
|
const query_params = {};
|
|
1199
|
-
query_params["
|
|
1200
|
-
query_params["
|
|
1201
|
-
query_params["
|
|
1290
|
+
query_params["scheme_type"] = schemeType;
|
|
1291
|
+
query_params["payment_mode"] = paymentMode;
|
|
1292
|
+
query_params["capabilities"] = capabilities;
|
|
1293
|
+
query_params["scheme_ids"] = schemeIds;
|
|
1202
1294
|
|
|
1203
1295
|
const xHeaders = {};
|
|
1204
1296
|
|
|
1205
1297
|
const response = await PlatformAPIClient.execute(
|
|
1206
1298
|
this.config,
|
|
1207
1299
|
"get",
|
|
1208
|
-
`/service/platform/logistics/
|
|
1300
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme`,
|
|
1209
1301
|
query_params,
|
|
1210
1302
|
undefined,
|
|
1211
1303
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1219,10 +1311,10 @@ class Serviceability {
|
|
|
1219
1311
|
|
|
1220
1312
|
const {
|
|
1221
1313
|
error: res_error,
|
|
1222
|
-
} = ServiceabilityPlatformModel.
|
|
1223
|
-
|
|
1224
|
-
allowUnknown: true
|
|
1225
|
-
|
|
1314
|
+
} = ServiceabilityPlatformModel.CourierPartnerSchemeList().validate(
|
|
1315
|
+
responseData,
|
|
1316
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1317
|
+
);
|
|
1226
1318
|
|
|
1227
1319
|
if (res_error) {
|
|
1228
1320
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1230,7 +1322,7 @@ class Serviceability {
|
|
|
1230
1322
|
} else {
|
|
1231
1323
|
Logger({
|
|
1232
1324
|
level: "WARN",
|
|
1233
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1325
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerSchemes \n ${res_error}`,
|
|
1234
1326
|
});
|
|
1235
1327
|
}
|
|
1236
1328
|
}
|
|
@@ -1239,56 +1331,29 @@ class Serviceability {
|
|
|
1239
1331
|
}
|
|
1240
1332
|
|
|
1241
1333
|
/**
|
|
1242
|
-
* @param {
|
|
1243
|
-
*
|
|
1244
|
-
*
|
|
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
|
|
1334
|
+
* @param {ServiceabilityPlatformValidator.GetInstalledCourierPartnerExtensionsParam} arg
|
|
1335
|
+
* - Arg object
|
|
1336
|
+
*
|
|
1272
1337
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1273
1338
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1274
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1275
|
-
*
|
|
1276
|
-
*
|
|
1277
|
-
* @
|
|
1339
|
+
* @returns {Promise<ServiceabilityPlatformModel.InstallCourierPartnerResponseSchema>}
|
|
1340
|
+
* - Success response
|
|
1341
|
+
*
|
|
1342
|
+
* @name getInstalledCourierPartnerExtensions
|
|
1343
|
+
* @summary: Fetching of Package Material Rules from database.
|
|
1344
|
+
* @description: This API returns response of Package Materials Rules. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getInstalledCourierPartnerExtensions/).
|
|
1278
1345
|
*/
|
|
1279
|
-
async
|
|
1280
|
-
{
|
|
1281
|
-
requestHeaders: {},
|
|
1282
|
-
},
|
|
1346
|
+
async getInstalledCourierPartnerExtensions(
|
|
1347
|
+
{ pageNo, pageSize, isInstalled, requestHeaders } = { requestHeaders: {} },
|
|
1283
1348
|
{ responseHeaders } = { responseHeaders: false }
|
|
1284
1349
|
) {
|
|
1285
|
-
const {
|
|
1350
|
+
const {
|
|
1351
|
+
error,
|
|
1352
|
+
} = ServiceabilityPlatformValidator.getInstalledCourierPartnerExtensions().validate(
|
|
1286
1353
|
{
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
state,
|
|
1291
|
-
city,
|
|
1354
|
+
pageNo,
|
|
1355
|
+
pageSize,
|
|
1356
|
+
isInstalled,
|
|
1292
1357
|
},
|
|
1293
1358
|
{ abortEarly: false, allowUnknown: true }
|
|
1294
1359
|
);
|
|
@@ -1299,34 +1364,32 @@ class Serviceability {
|
|
|
1299
1364
|
// Showing warrnings if extra unknown parameters are found
|
|
1300
1365
|
const {
|
|
1301
1366
|
error: warrning,
|
|
1302
|
-
} = ServiceabilityPlatformValidator.
|
|
1367
|
+
} = ServiceabilityPlatformValidator.getInstalledCourierPartnerExtensions().validate(
|
|
1303
1368
|
{
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
state,
|
|
1308
|
-
city,
|
|
1369
|
+
pageNo,
|
|
1370
|
+
pageSize,
|
|
1371
|
+
isInstalled,
|
|
1309
1372
|
},
|
|
1310
1373
|
{ abortEarly: false, allowUnknown: false }
|
|
1311
1374
|
);
|
|
1312
1375
|
if (warrning) {
|
|
1313
1376
|
Logger({
|
|
1314
1377
|
level: "WARN",
|
|
1315
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1378
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getInstalledCourierPartnerExtensions \n ${warrning}`,
|
|
1316
1379
|
});
|
|
1317
1380
|
}
|
|
1318
1381
|
|
|
1319
1382
|
const query_params = {};
|
|
1320
|
-
query_params["
|
|
1321
|
-
query_params["
|
|
1322
|
-
query_params["
|
|
1383
|
+
query_params["page_no"] = pageNo;
|
|
1384
|
+
query_params["page_size"] = pageSize;
|
|
1385
|
+
query_params["is_installed"] = isInstalled;
|
|
1323
1386
|
|
|
1324
1387
|
const xHeaders = {};
|
|
1325
1388
|
|
|
1326
1389
|
const response = await PlatformAPIClient.execute(
|
|
1327
1390
|
this.config,
|
|
1328
1391
|
"get",
|
|
1329
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1392
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/list`,
|
|
1330
1393
|
query_params,
|
|
1331
1394
|
undefined,
|
|
1332
1395
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1340,10 +1403,10 @@ class Serviceability {
|
|
|
1340
1403
|
|
|
1341
1404
|
const {
|
|
1342
1405
|
error: res_error,
|
|
1343
|
-
} = ServiceabilityPlatformModel.
|
|
1344
|
-
|
|
1345
|
-
allowUnknown: true
|
|
1346
|
-
|
|
1406
|
+
} = ServiceabilityPlatformModel.InstallCourierPartnerResponseSchema().validate(
|
|
1407
|
+
responseData,
|
|
1408
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1409
|
+
);
|
|
1347
1410
|
|
|
1348
1411
|
if (res_error) {
|
|
1349
1412
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1351,7 +1414,7 @@ class Serviceability {
|
|
|
1351
1414
|
} else {
|
|
1352
1415
|
Logger({
|
|
1353
1416
|
level: "WARN",
|
|
1354
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1417
|
+
message: `Response Validation Warnings for platform > Serviceability > getInstalledCourierPartnerExtensions \n ${res_error}`,
|
|
1355
1418
|
});
|
|
1356
1419
|
}
|
|
1357
1420
|
}
|
|
@@ -1363,9 +1426,8 @@ class Serviceability {
|
|
|
1363
1426
|
* @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object
|
|
1364
1427
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1365
1428
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1366
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1429
|
+
* @returns {Promise<ServiceabilityPlatformModel.OptimalLocationsResult>} -
|
|
1430
|
+
* Success response
|
|
1369
1431
|
* @name getOptimalLocations
|
|
1370
1432
|
* @summary: Get selling locations
|
|
1371
1433
|
* @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/).
|
|
@@ -1423,7 +1485,7 @@ class Serviceability {
|
|
|
1423
1485
|
|
|
1424
1486
|
const {
|
|
1425
1487
|
error: res_error,
|
|
1426
|
-
} = ServiceabilityPlatformModel.
|
|
1488
|
+
} = ServiceabilityPlatformModel.OptimalLocationsResult().validate(
|
|
1427
1489
|
responseData,
|
|
1428
1490
|
{ abortEarly: false, allowUnknown: true }
|
|
1429
1491
|
);
|
|
@@ -1448,7 +1510,7 @@ class Serviceability {
|
|
|
1448
1510
|
*
|
|
1449
1511
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1450
1512
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1451
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1513
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackagesListResult>} -
|
|
1452
1514
|
* Success response
|
|
1453
1515
|
* @name getPackageMaterialList
|
|
1454
1516
|
* @summary: Get packaging materials
|
|
@@ -1522,7 +1584,7 @@ class Serviceability {
|
|
|
1522
1584
|
|
|
1523
1585
|
const {
|
|
1524
1586
|
error: res_error,
|
|
1525
|
-
} = ServiceabilityPlatformModel.
|
|
1587
|
+
} = ServiceabilityPlatformModel.PackagesListResult().validate(
|
|
1526
1588
|
responseData,
|
|
1527
1589
|
{ abortEarly: false, allowUnknown: true }
|
|
1528
1590
|
);
|
|
@@ -1626,31 +1688,110 @@ class Serviceability {
|
|
|
1626
1688
|
}
|
|
1627
1689
|
|
|
1628
1690
|
/**
|
|
1629
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1691
|
+
* @param {ServiceabilityPlatformValidator.GetPackageMaterialsParam} arg - Arg object
|
|
1692
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1693
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1694
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageItem>} - Success response
|
|
1695
|
+
* @name getPackageMaterials
|
|
1696
|
+
* @summary: Get packaging material
|
|
1697
|
+
* @description: Retrieve a single packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterials/).
|
|
1698
|
+
*/
|
|
1699
|
+
async getPackageMaterials(
|
|
1700
|
+
{ packageMaterialId, requestHeaders } = { requestHeaders: {} },
|
|
1701
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1702
|
+
) {
|
|
1703
|
+
const {
|
|
1704
|
+
error,
|
|
1705
|
+
} = ServiceabilityPlatformValidator.getPackageMaterials().validate(
|
|
1706
|
+
{
|
|
1707
|
+
packageMaterialId,
|
|
1708
|
+
},
|
|
1709
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1710
|
+
);
|
|
1711
|
+
if (error) {
|
|
1712
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1716
|
+
const {
|
|
1717
|
+
error: warrning,
|
|
1718
|
+
} = ServiceabilityPlatformValidator.getPackageMaterials().validate(
|
|
1719
|
+
{
|
|
1720
|
+
packageMaterialId,
|
|
1721
|
+
},
|
|
1722
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1723
|
+
);
|
|
1724
|
+
if (warrning) {
|
|
1725
|
+
Logger({
|
|
1726
|
+
level: "WARN",
|
|
1727
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterials \n ${warrning}`,
|
|
1728
|
+
});
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
const query_params = {};
|
|
1732
|
+
|
|
1733
|
+
const xHeaders = {};
|
|
1734
|
+
|
|
1735
|
+
const response = await PlatformAPIClient.execute(
|
|
1736
|
+
this.config,
|
|
1737
|
+
"get",
|
|
1738
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/${packageMaterialId}`,
|
|
1739
|
+
query_params,
|
|
1740
|
+
undefined,
|
|
1741
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1742
|
+
{ responseHeaders }
|
|
1743
|
+
);
|
|
1744
|
+
|
|
1745
|
+
let responseData = response;
|
|
1746
|
+
if (responseHeaders) {
|
|
1747
|
+
responseData = response[0];
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
const {
|
|
1751
|
+
error: res_error,
|
|
1752
|
+
} = ServiceabilityPlatformModel.PackageItem().validate(responseData, {
|
|
1753
|
+
abortEarly: false,
|
|
1754
|
+
allowUnknown: true,
|
|
1755
|
+
});
|
|
1756
|
+
|
|
1757
|
+
if (res_error) {
|
|
1758
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1759
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1760
|
+
} else {
|
|
1761
|
+
Logger({
|
|
1762
|
+
level: "WARN",
|
|
1763
|
+
message: `Response Validation Warnings for platform > Serviceability > getPackageMaterials \n ${res_error}`,
|
|
1764
|
+
});
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
return response;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
/**
|
|
1772
|
+
* @param {ServiceabilityPlatformValidator.GetSampleFileServiceabilityStatusParam} arg
|
|
1630
1773
|
* - Arg object
|
|
1631
1774
|
*
|
|
1632
1775
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1633
1776
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1634
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1635
|
-
* Success response
|
|
1636
|
-
*
|
|
1637
|
-
* @
|
|
1638
|
-
* @
|
|
1777
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionServiceabilityTatResult>}
|
|
1778
|
+
* - Success response
|
|
1779
|
+
*
|
|
1780
|
+
* @name getSampleFileServiceabilityStatus
|
|
1781
|
+
* @summary: Get Serviceability TAT sample files generator status
|
|
1782
|
+
* @description: Get Serviceability TAT sample file generator status - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getSampleFileServiceabilityStatus/).
|
|
1639
1783
|
*/
|
|
1640
|
-
async
|
|
1641
|
-
{
|
|
1642
|
-
requestHeaders: {},
|
|
1643
|
-
},
|
|
1784
|
+
async getSampleFileServiceabilityStatus(
|
|
1785
|
+
{ pageNo, pageSize, batchId, requestHeaders } = { requestHeaders: {} },
|
|
1644
1786
|
{ responseHeaders } = { responseHeaders: false }
|
|
1645
1787
|
) {
|
|
1646
1788
|
const {
|
|
1647
1789
|
error,
|
|
1648
|
-
} = ServiceabilityPlatformValidator.
|
|
1790
|
+
} = ServiceabilityPlatformValidator.getSampleFileServiceabilityStatus().validate(
|
|
1649
1791
|
{
|
|
1650
|
-
ruleId,
|
|
1651
1792
|
pageNo,
|
|
1652
1793
|
pageSize,
|
|
1653
|
-
|
|
1794
|
+
batchId,
|
|
1654
1795
|
},
|
|
1655
1796
|
{ abortEarly: false, allowUnknown: true }
|
|
1656
1797
|
);
|
|
@@ -1661,33 +1802,32 @@ class Serviceability {
|
|
|
1661
1802
|
// Showing warrnings if extra unknown parameters are found
|
|
1662
1803
|
const {
|
|
1663
1804
|
error: warrning,
|
|
1664
|
-
} = ServiceabilityPlatformValidator.
|
|
1805
|
+
} = ServiceabilityPlatformValidator.getSampleFileServiceabilityStatus().validate(
|
|
1665
1806
|
{
|
|
1666
|
-
ruleId,
|
|
1667
1807
|
pageNo,
|
|
1668
1808
|
pageSize,
|
|
1669
|
-
|
|
1809
|
+
batchId,
|
|
1670
1810
|
},
|
|
1671
1811
|
{ abortEarly: false, allowUnknown: false }
|
|
1672
1812
|
);
|
|
1673
1813
|
if (warrning) {
|
|
1674
1814
|
Logger({
|
|
1675
1815
|
level: "WARN",
|
|
1676
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1816
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getSampleFileServiceabilityStatus \n ${warrning}`,
|
|
1677
1817
|
});
|
|
1678
1818
|
}
|
|
1679
1819
|
|
|
1680
1820
|
const query_params = {};
|
|
1681
1821
|
query_params["page_no"] = pageNo;
|
|
1682
1822
|
query_params["page_size"] = pageSize;
|
|
1683
|
-
query_params["
|
|
1823
|
+
query_params["batch_id"] = batchId;
|
|
1684
1824
|
|
|
1685
1825
|
const xHeaders = {};
|
|
1686
1826
|
|
|
1687
1827
|
const response = await PlatformAPIClient.execute(
|
|
1688
1828
|
this.config,
|
|
1689
1829
|
"get",
|
|
1690
|
-
`/service/platform/logistics/
|
|
1830
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/localities/bulk-sample`,
|
|
1691
1831
|
query_params,
|
|
1692
1832
|
undefined,
|
|
1693
1833
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1701,7 +1841,84 @@ class Serviceability {
|
|
|
1701
1841
|
|
|
1702
1842
|
const {
|
|
1703
1843
|
error: res_error,
|
|
1704
|
-
} = ServiceabilityPlatformModel.
|
|
1844
|
+
} = ServiceabilityPlatformModel.BulkRegionServiceabilityTatResult().validate(
|
|
1845
|
+
responseData,
|
|
1846
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1847
|
+
);
|
|
1848
|
+
|
|
1849
|
+
if (res_error) {
|
|
1850
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1851
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1852
|
+
} else {
|
|
1853
|
+
Logger({
|
|
1854
|
+
level: "WARN",
|
|
1855
|
+
message: `Response Validation Warnings for platform > Serviceability > getSampleFileServiceabilityStatus \n ${res_error}`,
|
|
1856
|
+
});
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
return response;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
/**
|
|
1864
|
+
* @param {ServiceabilityPlatformValidator.GetSelfShipDetailsParam} arg - Arg object
|
|
1865
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1866
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1867
|
+
* @returns {Promise<ServiceabilityPlatformModel.SelfshipSchema>} - Success response
|
|
1868
|
+
* @name getSelfShipDetails
|
|
1869
|
+
* @summary: Get self-ship details
|
|
1870
|
+
* @description: Get the self-ship details such as TAT, activation status, and unit for a specified company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getSelfShipDetails/).
|
|
1871
|
+
*/
|
|
1872
|
+
async getSelfShipDetails(
|
|
1873
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1874
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1875
|
+
) {
|
|
1876
|
+
const {
|
|
1877
|
+
error,
|
|
1878
|
+
} = ServiceabilityPlatformValidator.getSelfShipDetails().validate(
|
|
1879
|
+
{},
|
|
1880
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1881
|
+
);
|
|
1882
|
+
if (error) {
|
|
1883
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1887
|
+
const {
|
|
1888
|
+
error: warrning,
|
|
1889
|
+
} = ServiceabilityPlatformValidator.getSelfShipDetails().validate(
|
|
1890
|
+
{},
|
|
1891
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1892
|
+
);
|
|
1893
|
+
if (warrning) {
|
|
1894
|
+
Logger({
|
|
1895
|
+
level: "WARN",
|
|
1896
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getSelfShipDetails \n ${warrning}`,
|
|
1897
|
+
});
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
const query_params = {};
|
|
1901
|
+
|
|
1902
|
+
const xHeaders = {};
|
|
1903
|
+
|
|
1904
|
+
const response = await PlatformAPIClient.execute(
|
|
1905
|
+
this.config,
|
|
1906
|
+
"get",
|
|
1907
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/selfship`,
|
|
1908
|
+
query_params,
|
|
1909
|
+
undefined,
|
|
1910
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1911
|
+
{ responseHeaders }
|
|
1912
|
+
);
|
|
1913
|
+
|
|
1914
|
+
let responseData = response;
|
|
1915
|
+
if (responseHeaders) {
|
|
1916
|
+
responseData = response[0];
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
const {
|
|
1920
|
+
error: res_error,
|
|
1921
|
+
} = ServiceabilityPlatformModel.SelfshipSchema().validate(responseData, {
|
|
1705
1922
|
abortEarly: false,
|
|
1706
1923
|
allowUnknown: true,
|
|
1707
1924
|
});
|
|
@@ -1712,7 +1929,7 @@ class Serviceability {
|
|
|
1712
1929
|
} else {
|
|
1713
1930
|
Logger({
|
|
1714
1931
|
level: "WARN",
|
|
1715
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1932
|
+
message: `Response Validation Warnings for platform > Serviceability > getSelfShipDetails \n ${res_error}`,
|
|
1716
1933
|
});
|
|
1717
1934
|
}
|
|
1718
1935
|
}
|
|
@@ -1721,25 +1938,27 @@ class Serviceability {
|
|
|
1721
1938
|
}
|
|
1722
1939
|
|
|
1723
1940
|
/**
|
|
1724
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1941
|
+
* @param {ServiceabilityPlatformValidator.SampleFileServiceabilityParam} arg
|
|
1942
|
+
* - Arg object
|
|
1943
|
+
*
|
|
1725
1944
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1726
1945
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1727
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1946
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionServiceabilityTatResultItemData>}
|
|
1728
1947
|
* - Success response
|
|
1729
1948
|
*
|
|
1730
|
-
* @name
|
|
1731
|
-
* @summary:
|
|
1732
|
-
* @description:
|
|
1949
|
+
* @name sampleFileServiceability
|
|
1950
|
+
* @summary: Sample File Download
|
|
1951
|
+
* @description: Sample File Download - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/sampleFileServiceability/).
|
|
1733
1952
|
*/
|
|
1734
|
-
async
|
|
1735
|
-
{
|
|
1953
|
+
async sampleFileServiceability(
|
|
1954
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1736
1955
|
{ responseHeaders } = { responseHeaders: false }
|
|
1737
1956
|
) {
|
|
1738
1957
|
const {
|
|
1739
1958
|
error,
|
|
1740
|
-
} = ServiceabilityPlatformValidator.
|
|
1959
|
+
} = ServiceabilityPlatformValidator.sampleFileServiceability().validate(
|
|
1741
1960
|
{
|
|
1742
|
-
|
|
1961
|
+
body,
|
|
1743
1962
|
},
|
|
1744
1963
|
{ abortEarly: false, allowUnknown: true }
|
|
1745
1964
|
);
|
|
@@ -1750,16 +1969,16 @@ class Serviceability {
|
|
|
1750
1969
|
// Showing warrnings if extra unknown parameters are found
|
|
1751
1970
|
const {
|
|
1752
1971
|
error: warrning,
|
|
1753
|
-
} = ServiceabilityPlatformValidator.
|
|
1972
|
+
} = ServiceabilityPlatformValidator.sampleFileServiceability().validate(
|
|
1754
1973
|
{
|
|
1755
|
-
|
|
1974
|
+
body,
|
|
1756
1975
|
},
|
|
1757
1976
|
{ abortEarly: false, allowUnknown: false }
|
|
1758
1977
|
);
|
|
1759
1978
|
if (warrning) {
|
|
1760
1979
|
Logger({
|
|
1761
1980
|
level: "WARN",
|
|
1762
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1981
|
+
message: `Parameter Validation warrnings for platform > Serviceability > sampleFileServiceability \n ${warrning}`,
|
|
1763
1982
|
});
|
|
1764
1983
|
}
|
|
1765
1984
|
|
|
@@ -1769,10 +1988,10 @@ class Serviceability {
|
|
|
1769
1988
|
|
|
1770
1989
|
const response = await PlatformAPIClient.execute(
|
|
1771
1990
|
this.config,
|
|
1772
|
-
"
|
|
1773
|
-
`/service/platform/logistics/
|
|
1991
|
+
"post",
|
|
1992
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/localities/bulk-sample`,
|
|
1774
1993
|
query_params,
|
|
1775
|
-
|
|
1994
|
+
body,
|
|
1776
1995
|
{ ...xHeaders, ...requestHeaders },
|
|
1777
1996
|
{ responseHeaders }
|
|
1778
1997
|
);
|
|
@@ -1784,7 +2003,7 @@ class Serviceability {
|
|
|
1784
2003
|
|
|
1785
2004
|
const {
|
|
1786
2005
|
error: res_error,
|
|
1787
|
-
} = ServiceabilityPlatformModel.
|
|
2006
|
+
} = ServiceabilityPlatformModel.BulkRegionServiceabilityTatResultItemData().validate(
|
|
1788
2007
|
responseData,
|
|
1789
2008
|
{ abortEarly: false, allowUnknown: true }
|
|
1790
2009
|
);
|
|
@@ -1795,7 +2014,7 @@ class Serviceability {
|
|
|
1795
2014
|
} else {
|
|
1796
2015
|
Logger({
|
|
1797
2016
|
level: "WARN",
|
|
1798
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2017
|
+
message: `Response Validation Warnings for platform > Serviceability > sampleFileServiceability \n ${res_error}`,
|
|
1799
2018
|
});
|
|
1800
2019
|
}
|
|
1801
2020
|
}
|
|
@@ -1887,24 +2106,27 @@ class Serviceability {
|
|
|
1887
2106
|
}
|
|
1888
2107
|
|
|
1889
2108
|
/**
|
|
1890
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2109
|
+
* @param {ServiceabilityPlatformValidator.UpdateCourierPartnerAccountParam} arg
|
|
1891
2110
|
* - Arg object
|
|
1892
2111
|
*
|
|
1893
2112
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1894
2113
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1895
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1896
|
-
*
|
|
1897
|
-
*
|
|
1898
|
-
* @
|
|
2114
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierAccountDetailsBody>}
|
|
2115
|
+
* - Success response
|
|
2116
|
+
*
|
|
2117
|
+
* @name updateCourierPartnerAccount
|
|
2118
|
+
* @summary: Update courier account
|
|
2119
|
+
* @description: Updates an existing courier partner account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerAccount/).
|
|
1899
2120
|
*/
|
|
1900
|
-
async
|
|
1901
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2121
|
+
async updateCourierPartnerAccount(
|
|
2122
|
+
{ accountId, body, requestHeaders } = { requestHeaders: {} },
|
|
1902
2123
|
{ responseHeaders } = { responseHeaders: false }
|
|
1903
2124
|
) {
|
|
1904
2125
|
const {
|
|
1905
2126
|
error,
|
|
1906
|
-
} = ServiceabilityPlatformValidator.
|
|
2127
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerAccount().validate(
|
|
1907
2128
|
{
|
|
2129
|
+
accountId,
|
|
1908
2130
|
body,
|
|
1909
2131
|
},
|
|
1910
2132
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1916,8 +2138,9 @@ class Serviceability {
|
|
|
1916
2138
|
// Showing warrnings if extra unknown parameters are found
|
|
1917
2139
|
const {
|
|
1918
2140
|
error: warrning,
|
|
1919
|
-
} = ServiceabilityPlatformValidator.
|
|
2141
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerAccount().validate(
|
|
1920
2142
|
{
|
|
2143
|
+
accountId,
|
|
1921
2144
|
body,
|
|
1922
2145
|
},
|
|
1923
2146
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1925,7 +2148,7 @@ class Serviceability {
|
|
|
1925
2148
|
if (warrning) {
|
|
1926
2149
|
Logger({
|
|
1927
2150
|
level: "WARN",
|
|
1928
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2151
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateCourierPartnerAccount \n ${warrning}`,
|
|
1929
2152
|
});
|
|
1930
2153
|
}
|
|
1931
2154
|
|
|
@@ -1935,8 +2158,8 @@ class Serviceability {
|
|
|
1935
2158
|
|
|
1936
2159
|
const response = await PlatformAPIClient.execute(
|
|
1937
2160
|
this.config,
|
|
1938
|
-
"
|
|
1939
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
2161
|
+
"put",
|
|
2162
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account/${accountId}`,
|
|
1940
2163
|
query_params,
|
|
1941
2164
|
body,
|
|
1942
2165
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1950,10 +2173,10 @@ class Serviceability {
|
|
|
1950
2173
|
|
|
1951
2174
|
const {
|
|
1952
2175
|
error: res_error,
|
|
1953
|
-
} = ServiceabilityPlatformModel.
|
|
1954
|
-
|
|
1955
|
-
allowUnknown: true
|
|
1956
|
-
|
|
2176
|
+
} = ServiceabilityPlatformModel.CourierAccountDetailsBody().validate(
|
|
2177
|
+
responseData,
|
|
2178
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2179
|
+
);
|
|
1957
2180
|
|
|
1958
2181
|
if (res_error) {
|
|
1959
2182
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1961,7 +2184,7 @@ class Serviceability {
|
|
|
1961
2184
|
} else {
|
|
1962
2185
|
Logger({
|
|
1963
2186
|
level: "WARN",
|
|
1964
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2187
|
+
message: `Response Validation Warnings for platform > Serviceability > updateCourierPartnerAccount \n ${res_error}`,
|
|
1965
2188
|
});
|
|
1966
2189
|
}
|
|
1967
2190
|
}
|
|
@@ -1970,25 +2193,28 @@ class Serviceability {
|
|
|
1970
2193
|
}
|
|
1971
2194
|
|
|
1972
2195
|
/**
|
|
1973
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2196
|
+
* @param {ServiceabilityPlatformValidator.UpdateCourierPartnerSchemeParam} arg
|
|
1974
2197
|
* - Arg object
|
|
1975
2198
|
*
|
|
1976
2199
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1977
2200
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1978
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1979
|
-
*
|
|
1980
|
-
*
|
|
1981
|
-
* @
|
|
2201
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema>}
|
|
2202
|
+
* - Success response
|
|
2203
|
+
*
|
|
2204
|
+
* @name updateCourierPartnerScheme
|
|
2205
|
+
* @summary: Update Scheme for courier partner extension
|
|
2206
|
+
* @description: Update Scheme for courier partner extension - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerScheme/).
|
|
1982
2207
|
*/
|
|
1983
|
-
async
|
|
1984
|
-
{
|
|
2208
|
+
async updateCourierPartnerScheme(
|
|
2209
|
+
{ schemeId, body, requestHeaders } = { requestHeaders: {} },
|
|
1985
2210
|
{ responseHeaders } = { responseHeaders: false }
|
|
1986
2211
|
) {
|
|
1987
2212
|
const {
|
|
1988
2213
|
error,
|
|
1989
|
-
} = ServiceabilityPlatformValidator.
|
|
2214
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerScheme().validate(
|
|
1990
2215
|
{
|
|
1991
|
-
|
|
2216
|
+
schemeId,
|
|
2217
|
+
|
|
1992
2218
|
body,
|
|
1993
2219
|
},
|
|
1994
2220
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2000,9 +2226,10 @@ class Serviceability {
|
|
|
2000
2226
|
// Showing warrnings if extra unknown parameters are found
|
|
2001
2227
|
const {
|
|
2002
2228
|
error: warrning,
|
|
2003
|
-
} = ServiceabilityPlatformValidator.
|
|
2229
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerScheme().validate(
|
|
2004
2230
|
{
|
|
2005
|
-
|
|
2231
|
+
schemeId,
|
|
2232
|
+
|
|
2006
2233
|
body,
|
|
2007
2234
|
},
|
|
2008
2235
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2010,7 +2237,7 @@ class Serviceability {
|
|
|
2010
2237
|
if (warrning) {
|
|
2011
2238
|
Logger({
|
|
2012
2239
|
level: "WARN",
|
|
2013
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2240
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateCourierPartnerScheme \n ${warrning}`,
|
|
2014
2241
|
});
|
|
2015
2242
|
}
|
|
2016
2243
|
|
|
@@ -2021,7 +2248,7 @@ class Serviceability {
|
|
|
2021
2248
|
const response = await PlatformAPIClient.execute(
|
|
2022
2249
|
this.config,
|
|
2023
2250
|
"put",
|
|
2024
|
-
`/service/platform/logistics/
|
|
2251
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme/${schemeId}`,
|
|
2025
2252
|
query_params,
|
|
2026
2253
|
body,
|
|
2027
2254
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2035,10 +2262,10 @@ class Serviceability {
|
|
|
2035
2262
|
|
|
2036
2263
|
const {
|
|
2037
2264
|
error: res_error,
|
|
2038
|
-
} = ServiceabilityPlatformModel.
|
|
2039
|
-
|
|
2040
|
-
allowUnknown: true
|
|
2041
|
-
|
|
2265
|
+
} = ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema().validate(
|
|
2266
|
+
responseData,
|
|
2267
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2268
|
+
);
|
|
2042
2269
|
|
|
2043
2270
|
if (res_error) {
|
|
2044
2271
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2046,7 +2273,7 @@ class Serviceability {
|
|
|
2046
2273
|
} else {
|
|
2047
2274
|
Logger({
|
|
2048
2275
|
level: "WARN",
|
|
2049
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2276
|
+
message: `Response Validation Warnings for platform > Serviceability > updateCourierPartnerScheme \n ${res_error}`,
|
|
2050
2277
|
});
|
|
2051
2278
|
}
|
|
2052
2279
|
}
|
|
@@ -2146,9 +2373,8 @@ class Serviceability {
|
|
|
2146
2373
|
*
|
|
2147
2374
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2148
2375
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2149
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2150
|
-
*
|
|
2151
|
-
*
|
|
2376
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResult>} -
|
|
2377
|
+
* Success response
|
|
2152
2378
|
* @name updatePackageMaterials
|
|
2153
2379
|
* @summary: Update packaging material
|
|
2154
2380
|
* @description: Update an existing packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterials/).
|
|
@@ -2208,7 +2434,7 @@ class Serviceability {
|
|
|
2208
2434
|
|
|
2209
2435
|
const {
|
|
2210
2436
|
error: res_error,
|
|
2211
|
-
} = ServiceabilityPlatformModel.
|
|
2437
|
+
} = ServiceabilityPlatformModel.PackageMaterialResult().validate(
|
|
2212
2438
|
responseData,
|
|
2213
2439
|
{ abortEarly: false, allowUnknown: true }
|
|
2214
2440
|
);
|
|
@@ -2228,27 +2454,24 @@ class Serviceability {
|
|
|
2228
2454
|
}
|
|
2229
2455
|
|
|
2230
2456
|
/**
|
|
2231
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2457
|
+
* @param {ServiceabilityPlatformValidator.UpdateSelfShipDetailsParam} arg
|
|
2458
|
+
* - Arg object
|
|
2459
|
+
*
|
|
2232
2460
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2233
2461
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2234
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2235
|
-
*
|
|
2236
|
-
* @
|
|
2237
|
-
* @
|
|
2238
|
-
* @description: Validate given address wrt template - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/validateAddress/).
|
|
2462
|
+
* @returns {Promise<ServiceabilityPlatformModel.SelfshipSchema>} - Success response
|
|
2463
|
+
* @name updateSelfShipDetails
|
|
2464
|
+
* @summary: Update self-ship details
|
|
2465
|
+
* @description: Updates the self-ship details such as TAT, activation status, and unit for a specified company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateSelfShipDetails/).
|
|
2239
2466
|
*/
|
|
2240
|
-
async
|
|
2241
|
-
{
|
|
2242
|
-
requestHeaders: {},
|
|
2243
|
-
},
|
|
2467
|
+
async updateSelfShipDetails(
|
|
2468
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2244
2469
|
{ responseHeaders } = { responseHeaders: false }
|
|
2245
2470
|
) {
|
|
2246
2471
|
const {
|
|
2247
2472
|
error,
|
|
2248
|
-
} = ServiceabilityPlatformValidator.
|
|
2473
|
+
} = ServiceabilityPlatformValidator.updateSelfShipDetails().validate(
|
|
2249
2474
|
{
|
|
2250
|
-
countryIsoCode,
|
|
2251
|
-
templateName,
|
|
2252
2475
|
body,
|
|
2253
2476
|
},
|
|
2254
2477
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2260,10 +2483,8 @@ class Serviceability {
|
|
|
2260
2483
|
// Showing warrnings if extra unknown parameters are found
|
|
2261
2484
|
const {
|
|
2262
2485
|
error: warrning,
|
|
2263
|
-
} = ServiceabilityPlatformValidator.
|
|
2486
|
+
} = ServiceabilityPlatformValidator.updateSelfShipDetails().validate(
|
|
2264
2487
|
{
|
|
2265
|
-
countryIsoCode,
|
|
2266
|
-
templateName,
|
|
2267
2488
|
body,
|
|
2268
2489
|
},
|
|
2269
2490
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2271,7 +2492,7 @@ class Serviceability {
|
|
|
2271
2492
|
if (warrning) {
|
|
2272
2493
|
Logger({
|
|
2273
2494
|
level: "WARN",
|
|
2274
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2495
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateSelfShipDetails \n ${warrning}`,
|
|
2275
2496
|
});
|
|
2276
2497
|
}
|
|
2277
2498
|
|
|
@@ -2281,8 +2502,8 @@ class Serviceability {
|
|
|
2281
2502
|
|
|
2282
2503
|
const response = await PlatformAPIClient.execute(
|
|
2283
2504
|
this.config,
|
|
2284
|
-
"
|
|
2285
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
2505
|
+
"patch",
|
|
2506
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/selfship`,
|
|
2286
2507
|
query_params,
|
|
2287
2508
|
body,
|
|
2288
2509
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2296,10 +2517,10 @@ class Serviceability {
|
|
|
2296
2517
|
|
|
2297
2518
|
const {
|
|
2298
2519
|
error: res_error,
|
|
2299
|
-
} = ServiceabilityPlatformModel.
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
);
|
|
2520
|
+
} = ServiceabilityPlatformModel.SelfshipSchema().validate(responseData, {
|
|
2521
|
+
abortEarly: false,
|
|
2522
|
+
allowUnknown: true,
|
|
2523
|
+
});
|
|
2303
2524
|
|
|
2304
2525
|
if (res_error) {
|
|
2305
2526
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2307,7 +2528,7 @@ class Serviceability {
|
|
|
2307
2528
|
} else {
|
|
2308
2529
|
Logger({
|
|
2309
2530
|
level: "WARN",
|
|
2310
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2531
|
+
message: `Response Validation Warnings for platform > Serviceability > updateSelfShipDetails \n ${res_error}`,
|
|
2311
2532
|
});
|
|
2312
2533
|
}
|
|
2313
2534
|
}
|