@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +93 -113
- package/sdk/application/Cart/CartApplicationClient.js +157 -530
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -19
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
- package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
- package/sdk/application/Content/ContentApplicationClient.d.ts +65 -55
- package/sdk/application/Content/ContentApplicationClient.js +211 -341
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -33
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
- package/sdk/application/Lead/LeadApplicationClient.js +24 -55
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +32 -87
- package/sdk/application/Logistic/LogisticApplicationClient.js +126 -383
- package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
- package/sdk/application/Order/OrderApplicationClient.js +89 -293
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
- package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
- package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
- package/sdk/application/Share/ShareApplicationClient.js +35 -89
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
- package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
- package/sdk/application/User/UserApplicationClient.d.ts +23 -13
- package/sdk/application/User/UserApplicationClient.js +49 -407
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +18 -62
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +40 -372
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +99 -33
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +84 -25
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +7 -38
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
- package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
- package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
- package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
- package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
- package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -406
- package/sdk/platform/Billing/BillingPlatformClient.js +76 -3214
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +459 -3798
- package/sdk/platform/Billing/BillingPlatformModel.js +338 -2573
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +24 -465
- package/sdk/platform/Billing/BillingPlatformValidator.js +14 -490
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +205 -284
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +554 -672
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +132 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4865 -3148
- package/sdk/platform/Cart/CartPlatformModel.js +2071 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +419 -1015
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6444
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +226 -1117
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +127 -919
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +574 -372
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1315 -1238
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9334 -7634
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6980 -9652
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +239 -294
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +186 -246
- package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
- package/sdk/platform/Common/CommonPlatformModel.js +11 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +236 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +579 -868
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +314 -422
- package/sdk/platform/Communication/CommunicationPlatformModel.js +382 -538
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -68
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -84
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +118 -333
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +565 -1282
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +369 -1034
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -246
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1297 -776
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
- package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
- package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2374 -877
- package/sdk/platform/Content/ContentPlatformModel.js +1304 -930
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
- package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
- package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
- package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
- package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
- package/sdk/platform/Order/OrderPlatformClient.d.ts +421 -418
- package/sdk/platform/Order/OrderPlatformClient.js +1194 -1350
- package/sdk/platform/Order/OrderPlatformModel.d.ts +9145 -4107
- package/sdk/platform/Order/OrderPlatformModel.js +4257 -3197
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +641 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +341 -311
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
- package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +934 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -305
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
- package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1327 -3529
- package/sdk/platform/Payment/PaymentPlatformModel.js +1397 -3693
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
- package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -513
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -103
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -99
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +162 -127
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +775 -435
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6250 -3861
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3178 -3798
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +295 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -133
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
- package/sdk/platform/Share/SharePlatformModel.d.ts +53 -4
- package/sdk/platform/Share/SharePlatformModel.js +45 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +4 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +10 -157
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -21
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +6 -23
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
- package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
- package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
- package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
- package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
- package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
- package/sdk/platform/User/UserPlatformModel.js +253 -210
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
- package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
- package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
- package/sdk/public/Content/ContentPublicClient.js +254 -280
- package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
- package/sdk/public/Content/ContentPublicModel.js +98 -44
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
- package/sdk/public/Content/ContentPublicValidator.js +26 -19
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +1 -1
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
- package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
- package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
- package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
- package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
- package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2895
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
- package/sdk/public/Billing/BillingPublicClient.js +0 -397
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
- package/sdk/public/Billing/BillingPublicModel.js +0 -560
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
- package/sdk/public/Billing/BillingPublicValidator.js +0 -50
|
@@ -14,13 +14,188 @@ class Serviceability {
|
|
|
14
14
|
this.config = config;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @param {ServiceabilityPlatformValidator.BulkServiceabilityParam} arg - Arg object
|
|
19
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
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
|
+
*/
|
|
28
|
+
async bulkServiceability(
|
|
29
|
+
{ extensionId, schemeId, body, requestHeaders } = { requestHeaders: {} },
|
|
30
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
31
|
+
) {
|
|
32
|
+
const {
|
|
33
|
+
error,
|
|
34
|
+
} = ServiceabilityPlatformValidator.bulkServiceability().validate(
|
|
35
|
+
{
|
|
36
|
+
extensionId,
|
|
37
|
+
schemeId,
|
|
38
|
+
body,
|
|
39
|
+
},
|
|
40
|
+
{ abortEarly: false, allowUnknown: true }
|
|
41
|
+
);
|
|
42
|
+
if (error) {
|
|
43
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Showing warrnings if extra unknown parameters are found
|
|
47
|
+
const {
|
|
48
|
+
error: warrning,
|
|
49
|
+
} = ServiceabilityPlatformValidator.bulkServiceability().validate(
|
|
50
|
+
{
|
|
51
|
+
extensionId,
|
|
52
|
+
schemeId,
|
|
53
|
+
body,
|
|
54
|
+
},
|
|
55
|
+
{ abortEarly: false, allowUnknown: false }
|
|
56
|
+
);
|
|
57
|
+
if (warrning) {
|
|
58
|
+
Logger({
|
|
59
|
+
level: "WARN",
|
|
60
|
+
message: `Parameter Validation warrnings for platform > Serviceability > bulkServiceability \n ${warrning}`,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const query_params = {};
|
|
65
|
+
|
|
66
|
+
const xHeaders = {};
|
|
67
|
+
|
|
68
|
+
const response = await PlatformAPIClient.execute(
|
|
69
|
+
this.config,
|
|
70
|
+
"post",
|
|
71
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/bulk`,
|
|
72
|
+
query_params,
|
|
73
|
+
body,
|
|
74
|
+
{ ...xHeaders, ...requestHeaders },
|
|
75
|
+
{ responseHeaders }
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
let responseData = response;
|
|
79
|
+
if (responseHeaders) {
|
|
80
|
+
responseData = response[0];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const {
|
|
84
|
+
error: res_error,
|
|
85
|
+
} = ServiceabilityPlatformModel.BulkRegionResultItemData().validate(
|
|
86
|
+
responseData,
|
|
87
|
+
{ abortEarly: false, allowUnknown: true }
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
if (res_error) {
|
|
91
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
92
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
93
|
+
} else {
|
|
94
|
+
Logger({
|
|
95
|
+
level: "WARN",
|
|
96
|
+
message: `Response Validation Warnings for platform > Serviceability > bulkServiceability \n ${res_error}`,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return response;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @param {ServiceabilityPlatformValidator.BulkTatParam} arg - Arg object
|
|
106
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
107
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
108
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionResultItemData>}
|
|
109
|
+
* - Success response
|
|
110
|
+
*
|
|
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/).
|
|
115
|
+
*/
|
|
116
|
+
async bulkTat(
|
|
117
|
+
{ extensionId, schemeId, body, requestHeaders } = { requestHeaders: {} },
|
|
118
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
119
|
+
) {
|
|
120
|
+
const { error } = ServiceabilityPlatformValidator.bulkTat().validate(
|
|
121
|
+
{
|
|
122
|
+
extensionId,
|
|
123
|
+
schemeId,
|
|
124
|
+
body,
|
|
125
|
+
},
|
|
126
|
+
{ abortEarly: false, allowUnknown: true }
|
|
127
|
+
);
|
|
128
|
+
if (error) {
|
|
129
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Showing warrnings if extra unknown parameters are found
|
|
133
|
+
const {
|
|
134
|
+
error: warrning,
|
|
135
|
+
} = ServiceabilityPlatformValidator.bulkTat().validate(
|
|
136
|
+
{
|
|
137
|
+
extensionId,
|
|
138
|
+
schemeId,
|
|
139
|
+
body,
|
|
140
|
+
},
|
|
141
|
+
{ abortEarly: false, allowUnknown: false }
|
|
142
|
+
);
|
|
143
|
+
if (warrning) {
|
|
144
|
+
Logger({
|
|
145
|
+
level: "WARN",
|
|
146
|
+
message: `Parameter Validation warrnings for platform > Serviceability > bulkTat \n ${warrning}`,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const query_params = {};
|
|
151
|
+
|
|
152
|
+
const xHeaders = {};
|
|
153
|
+
|
|
154
|
+
const response = await PlatformAPIClient.execute(
|
|
155
|
+
this.config,
|
|
156
|
+
"post",
|
|
157
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`,
|
|
158
|
+
query_params,
|
|
159
|
+
body,
|
|
160
|
+
{ ...xHeaders, ...requestHeaders },
|
|
161
|
+
{ responseHeaders }
|
|
162
|
+
);
|
|
163
|
+
|
|
164
|
+
let responseData = response;
|
|
165
|
+
if (responseHeaders) {
|
|
166
|
+
responseData = response[0];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const {
|
|
170
|
+
error: res_error,
|
|
171
|
+
} = ServiceabilityPlatformModel.BulkRegionResultItemData().validate(
|
|
172
|
+
responseData,
|
|
173
|
+
{ abortEarly: false, allowUnknown: true }
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
if (res_error) {
|
|
177
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
178
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
179
|
+
} else {
|
|
180
|
+
Logger({
|
|
181
|
+
level: "WARN",
|
|
182
|
+
message: `Response Validation Warnings for platform > Serviceability > bulkTat \n ${res_error}`,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return response;
|
|
188
|
+
}
|
|
189
|
+
|
|
17
190
|
/**
|
|
18
191
|
* @param {ServiceabilityPlatformValidator.CreateCourierPartnerAccountParam} arg
|
|
19
192
|
* - Arg object
|
|
20
193
|
*
|
|
21
194
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
22
195
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
23
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
196
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierAccountDetailsBody>}
|
|
197
|
+
* - Success response
|
|
198
|
+
*
|
|
24
199
|
* @name createCourierPartnerAccount
|
|
25
200
|
* @summary: Create courier account
|
|
26
201
|
* @description: Retrieves a list of courier partner accounts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerAccount/).
|
|
@@ -78,10 +253,10 @@ class Serviceability {
|
|
|
78
253
|
|
|
79
254
|
const {
|
|
80
255
|
error: res_error,
|
|
81
|
-
} = ServiceabilityPlatformModel.
|
|
82
|
-
|
|
83
|
-
allowUnknown: true
|
|
84
|
-
|
|
256
|
+
} = ServiceabilityPlatformModel.CourierAccountDetailsBody().validate(
|
|
257
|
+
responseData,
|
|
258
|
+
{ abortEarly: false, allowUnknown: true }
|
|
259
|
+
);
|
|
85
260
|
|
|
86
261
|
if (res_error) {
|
|
87
262
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -98,14 +273,98 @@ class Serviceability {
|
|
|
98
273
|
}
|
|
99
274
|
|
|
100
275
|
/**
|
|
101
|
-
* @param {ServiceabilityPlatformValidator.
|
|
276
|
+
* @param {ServiceabilityPlatformValidator.CreateCourierPartnerSchemeParam} arg
|
|
102
277
|
* - Arg object
|
|
103
278
|
*
|
|
104
279
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
105
280
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
106
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
281
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema>}
|
|
107
282
|
* - Success response
|
|
108
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/).
|
|
287
|
+
*/
|
|
288
|
+
async createCourierPartnerScheme(
|
|
289
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
290
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
291
|
+
) {
|
|
292
|
+
const {
|
|
293
|
+
error,
|
|
294
|
+
} = ServiceabilityPlatformValidator.createCourierPartnerScheme().validate(
|
|
295
|
+
{
|
|
296
|
+
body,
|
|
297
|
+
},
|
|
298
|
+
{ abortEarly: false, allowUnknown: true }
|
|
299
|
+
);
|
|
300
|
+
if (error) {
|
|
301
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// Showing warrnings if extra unknown parameters are found
|
|
305
|
+
const {
|
|
306
|
+
error: warrning,
|
|
307
|
+
} = ServiceabilityPlatformValidator.createCourierPartnerScheme().validate(
|
|
308
|
+
{
|
|
309
|
+
body,
|
|
310
|
+
},
|
|
311
|
+
{ abortEarly: false, allowUnknown: false }
|
|
312
|
+
);
|
|
313
|
+
if (warrning) {
|
|
314
|
+
Logger({
|
|
315
|
+
level: "WARN",
|
|
316
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createCourierPartnerScheme \n ${warrning}`,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
const query_params = {};
|
|
321
|
+
|
|
322
|
+
const xHeaders = {};
|
|
323
|
+
|
|
324
|
+
const response = await PlatformAPIClient.execute(
|
|
325
|
+
this.config,
|
|
326
|
+
"post",
|
|
327
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme`,
|
|
328
|
+
query_params,
|
|
329
|
+
body,
|
|
330
|
+
{ ...xHeaders, ...requestHeaders },
|
|
331
|
+
{ responseHeaders }
|
|
332
|
+
);
|
|
333
|
+
|
|
334
|
+
let responseData = response;
|
|
335
|
+
if (responseHeaders) {
|
|
336
|
+
responseData = response[0];
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const {
|
|
340
|
+
error: res_error,
|
|
341
|
+
} = ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema().validate(
|
|
342
|
+
responseData,
|
|
343
|
+
{ abortEarly: false, allowUnknown: true }
|
|
344
|
+
);
|
|
345
|
+
|
|
346
|
+
if (res_error) {
|
|
347
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
348
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
349
|
+
} else {
|
|
350
|
+
Logger({
|
|
351
|
+
level: "WARN",
|
|
352
|
+
message: `Response Validation Warnings for platform > Serviceability > createCourierPartnerScheme \n ${res_error}`,
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
return response;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* @param {ServiceabilityPlatformValidator.CreatePackageMaterialParam} arg
|
|
362
|
+
* - Arg object
|
|
363
|
+
*
|
|
364
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
365
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
366
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResult>} -
|
|
367
|
+
* Success response
|
|
109
368
|
* @name createPackageMaterial
|
|
110
369
|
* @summary: Create packaging material
|
|
111
370
|
* @description: Creates a packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterial/).
|
|
@@ -166,7 +425,7 @@ class Serviceability {
|
|
|
166
425
|
|
|
167
426
|
const {
|
|
168
427
|
error: res_error,
|
|
169
|
-
} = ServiceabilityPlatformModel.
|
|
428
|
+
} = ServiceabilityPlatformModel.PackageMaterialResult().validate(
|
|
170
429
|
responseData,
|
|
171
430
|
{ abortEarly: false, allowUnknown: true }
|
|
172
431
|
);
|
|
@@ -270,24 +529,49 @@ class Serviceability {
|
|
|
270
529
|
}
|
|
271
530
|
|
|
272
531
|
/**
|
|
273
|
-
* @param {ServiceabilityPlatformValidator.
|
|
532
|
+
* @param {ServiceabilityPlatformValidator.GetBulkServiceabilityParam} arg
|
|
274
533
|
* - Arg object
|
|
275
534
|
*
|
|
276
535
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
277
536
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
278
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
279
|
-
* @name
|
|
280
|
-
* @summary:
|
|
281
|
-
* @description: Retrieves
|
|
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/).
|
|
282
541
|
*/
|
|
283
|
-
async
|
|
284
|
-
{
|
|
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: {} },
|
|
285
557
|
{ responseHeaders } = { responseHeaders: false }
|
|
286
558
|
) {
|
|
287
559
|
const {
|
|
288
560
|
error,
|
|
289
|
-
} = ServiceabilityPlatformValidator.
|
|
290
|
-
{
|
|
561
|
+
} = ServiceabilityPlatformValidator.getBulkServiceability().validate(
|
|
562
|
+
{
|
|
563
|
+
extensionId,
|
|
564
|
+
schemeId,
|
|
565
|
+
pageNo,
|
|
566
|
+
pageSize,
|
|
567
|
+
batchId,
|
|
568
|
+
action,
|
|
569
|
+
status,
|
|
570
|
+
country,
|
|
571
|
+
region,
|
|
572
|
+
startDate,
|
|
573
|
+
endDate,
|
|
574
|
+
},
|
|
291
575
|
{ abortEarly: false, allowUnknown: true }
|
|
292
576
|
);
|
|
293
577
|
if (error) {
|
|
@@ -297,25 +581,46 @@ class Serviceability {
|
|
|
297
581
|
// Showing warrnings if extra unknown parameters are found
|
|
298
582
|
const {
|
|
299
583
|
error: warrning,
|
|
300
|
-
} = ServiceabilityPlatformValidator.
|
|
301
|
-
{
|
|
584
|
+
} = ServiceabilityPlatformValidator.getBulkServiceability().validate(
|
|
585
|
+
{
|
|
586
|
+
extensionId,
|
|
587
|
+
schemeId,
|
|
588
|
+
pageNo,
|
|
589
|
+
pageSize,
|
|
590
|
+
batchId,
|
|
591
|
+
action,
|
|
592
|
+
status,
|
|
593
|
+
country,
|
|
594
|
+
region,
|
|
595
|
+
startDate,
|
|
596
|
+
endDate,
|
|
597
|
+
},
|
|
302
598
|
{ abortEarly: false, allowUnknown: false }
|
|
303
599
|
);
|
|
304
600
|
if (warrning) {
|
|
305
601
|
Logger({
|
|
306
602
|
level: "WARN",
|
|
307
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
603
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getBulkServiceability \n ${warrning}`,
|
|
308
604
|
});
|
|
309
605
|
}
|
|
310
606
|
|
|
311
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;
|
|
312
617
|
|
|
313
618
|
const xHeaders = {};
|
|
314
619
|
|
|
315
620
|
const response = await PlatformAPIClient.execute(
|
|
316
621
|
this.config,
|
|
317
622
|
"get",
|
|
318
|
-
`/service/platform/logistics/
|
|
623
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/bulk`,
|
|
319
624
|
query_params,
|
|
320
625
|
undefined,
|
|
321
626
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -329,7 +634,7 @@ class Serviceability {
|
|
|
329
634
|
|
|
330
635
|
const {
|
|
331
636
|
error: res_error,
|
|
332
|
-
} = ServiceabilityPlatformModel.
|
|
637
|
+
} = ServiceabilityPlatformModel.BulkRegionResult().validate(responseData, {
|
|
333
638
|
abortEarly: false,
|
|
334
639
|
allowUnknown: true,
|
|
335
640
|
});
|
|
@@ -340,7 +645,7 @@ class Serviceability {
|
|
|
340
645
|
} else {
|
|
341
646
|
Logger({
|
|
342
647
|
level: "WARN",
|
|
343
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
648
|
+
message: `Response Validation Warnings for platform > Serviceability > getBulkServiceability \n ${res_error}`,
|
|
344
649
|
});
|
|
345
650
|
}
|
|
346
651
|
}
|
|
@@ -349,22 +654,45 @@ class Serviceability {
|
|
|
349
654
|
}
|
|
350
655
|
|
|
351
656
|
/**
|
|
352
|
-
* @param {ServiceabilityPlatformValidator.
|
|
657
|
+
* @param {ServiceabilityPlatformValidator.GetBulkTatParam} arg - Arg object
|
|
353
658
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
354
659
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
355
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
356
|
-
* @name
|
|
357
|
-
* @summary:
|
|
358
|
-
* @description:
|
|
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/).
|
|
359
664
|
*/
|
|
360
|
-
async
|
|
361
|
-
{
|
|
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: {} },
|
|
362
680
|
{ responseHeaders } = { responseHeaders: false }
|
|
363
681
|
) {
|
|
364
|
-
const {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
682
|
+
const { error } = ServiceabilityPlatformValidator.getBulkTat().validate(
|
|
683
|
+
{
|
|
684
|
+
extensionId,
|
|
685
|
+
schemeId,
|
|
686
|
+
pageNo,
|
|
687
|
+
pageSize,
|
|
688
|
+
batchId,
|
|
689
|
+
action,
|
|
690
|
+
status,
|
|
691
|
+
country,
|
|
692
|
+
region,
|
|
693
|
+
startDate,
|
|
694
|
+
endDate,
|
|
695
|
+
},
|
|
368
696
|
{ abortEarly: false, allowUnknown: true }
|
|
369
697
|
);
|
|
370
698
|
if (error) {
|
|
@@ -374,25 +702,46 @@ class Serviceability {
|
|
|
374
702
|
// Showing warrnings if extra unknown parameters are found
|
|
375
703
|
const {
|
|
376
704
|
error: warrning,
|
|
377
|
-
} = ServiceabilityPlatformValidator.
|
|
378
|
-
{
|
|
705
|
+
} = ServiceabilityPlatformValidator.getBulkTat().validate(
|
|
706
|
+
{
|
|
707
|
+
extensionId,
|
|
708
|
+
schemeId,
|
|
709
|
+
pageNo,
|
|
710
|
+
pageSize,
|
|
711
|
+
batchId,
|
|
712
|
+
action,
|
|
713
|
+
status,
|
|
714
|
+
country,
|
|
715
|
+
region,
|
|
716
|
+
startDate,
|
|
717
|
+
endDate,
|
|
718
|
+
},
|
|
379
719
|
{ abortEarly: false, allowUnknown: false }
|
|
380
720
|
);
|
|
381
721
|
if (warrning) {
|
|
382
722
|
Logger({
|
|
383
723
|
level: "WARN",
|
|
384
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
724
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getBulkTat \n ${warrning}`,
|
|
385
725
|
});
|
|
386
726
|
}
|
|
387
727
|
|
|
388
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;
|
|
389
738
|
|
|
390
739
|
const xHeaders = {};
|
|
391
740
|
|
|
392
741
|
const response = await PlatformAPIClient.execute(
|
|
393
742
|
this.config,
|
|
394
743
|
"get",
|
|
395
|
-
`/service/platform/logistics/
|
|
744
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`,
|
|
396
745
|
query_params,
|
|
397
746
|
undefined,
|
|
398
747
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -406,7 +755,7 @@ class Serviceability {
|
|
|
406
755
|
|
|
407
756
|
const {
|
|
408
757
|
error: res_error,
|
|
409
|
-
} = ServiceabilityPlatformModel.
|
|
758
|
+
} = ServiceabilityPlatformModel.BulkRegionResult().validate(responseData, {
|
|
410
759
|
abortEarly: false,
|
|
411
760
|
allowUnknown: true,
|
|
412
761
|
});
|
|
@@ -417,7 +766,7 @@ class Serviceability {
|
|
|
417
766
|
} else {
|
|
418
767
|
Logger({
|
|
419
768
|
level: "WARN",
|
|
420
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
769
|
+
message: `Response Validation Warnings for platform > Serviceability > getBulkTat \n ${res_error}`,
|
|
421
770
|
});
|
|
422
771
|
}
|
|
423
772
|
}
|
|
@@ -426,28 +775,24 @@ class Serviceability {
|
|
|
426
775
|
}
|
|
427
776
|
|
|
428
777
|
/**
|
|
429
|
-
* @param {ServiceabilityPlatformValidator.
|
|
778
|
+
* @param {ServiceabilityPlatformValidator.GetCompanyConfigurationParam} arg
|
|
779
|
+
* - Arg object
|
|
780
|
+
*
|
|
430
781
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
431
782
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
432
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
433
|
-
* @name
|
|
434
|
-
* @summary: Get
|
|
435
|
-
* @description:
|
|
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/).
|
|
436
787
|
*/
|
|
437
|
-
async
|
|
438
|
-
{
|
|
439
|
-
requestHeaders: {},
|
|
440
|
-
},
|
|
788
|
+
async getCompanyConfiguration(
|
|
789
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
441
790
|
{ responseHeaders } = { responseHeaders: false }
|
|
442
791
|
) {
|
|
443
|
-
const {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
pageSize,
|
|
448
|
-
q,
|
|
449
|
-
hierarchy,
|
|
450
|
-
},
|
|
792
|
+
const {
|
|
793
|
+
error,
|
|
794
|
+
} = ServiceabilityPlatformValidator.getCompanyConfiguration().validate(
|
|
795
|
+
{},
|
|
451
796
|
{ abortEarly: false, allowUnknown: true }
|
|
452
797
|
);
|
|
453
798
|
if (error) {
|
|
@@ -457,36 +802,25 @@ class Serviceability {
|
|
|
457
802
|
// Showing warrnings if extra unknown parameters are found
|
|
458
803
|
const {
|
|
459
804
|
error: warrning,
|
|
460
|
-
} = ServiceabilityPlatformValidator.
|
|
461
|
-
{
|
|
462
|
-
onboard,
|
|
463
|
-
pageNo,
|
|
464
|
-
pageSize,
|
|
465
|
-
q,
|
|
466
|
-
hierarchy,
|
|
467
|
-
},
|
|
805
|
+
} = ServiceabilityPlatformValidator.getCompanyConfiguration().validate(
|
|
806
|
+
{},
|
|
468
807
|
{ abortEarly: false, allowUnknown: false }
|
|
469
808
|
);
|
|
470
809
|
if (warrning) {
|
|
471
810
|
Logger({
|
|
472
811
|
level: "WARN",
|
|
473
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
812
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCompanyConfiguration \n ${warrning}`,
|
|
474
813
|
});
|
|
475
814
|
}
|
|
476
815
|
|
|
477
816
|
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
817
|
|
|
484
818
|
const xHeaders = {};
|
|
485
819
|
|
|
486
820
|
const response = await PlatformAPIClient.execute(
|
|
487
821
|
this.config,
|
|
488
822
|
"get",
|
|
489
|
-
`/service/platform/logistics/
|
|
823
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/configuration`,
|
|
490
824
|
query_params,
|
|
491
825
|
undefined,
|
|
492
826
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -500,7 +834,7 @@ class Serviceability {
|
|
|
500
834
|
|
|
501
835
|
const {
|
|
502
836
|
error: res_error,
|
|
503
|
-
} = ServiceabilityPlatformModel.
|
|
837
|
+
} = ServiceabilityPlatformModel.CompanyConfig().validate(responseData, {
|
|
504
838
|
abortEarly: false,
|
|
505
839
|
allowUnknown: true,
|
|
506
840
|
});
|
|
@@ -511,7 +845,7 @@ class Serviceability {
|
|
|
511
845
|
} else {
|
|
512
846
|
Logger({
|
|
513
847
|
level: "WARN",
|
|
514
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
848
|
+
message: `Response Validation Warnings for platform > Serviceability > getCompanyConfiguration \n ${res_error}`,
|
|
515
849
|
});
|
|
516
850
|
}
|
|
517
851
|
}
|
|
@@ -520,21 +854,27 @@ class Serviceability {
|
|
|
520
854
|
}
|
|
521
855
|
|
|
522
856
|
/**
|
|
523
|
-
* @param {ServiceabilityPlatformValidator.
|
|
857
|
+
* @param {ServiceabilityPlatformValidator.GetCountriesParam} arg - Arg object
|
|
524
858
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
525
859
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
526
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
527
|
-
* @name
|
|
528
|
-
* @summary: Get
|
|
529
|
-
* @description: Retrieve
|
|
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/).
|
|
530
864
|
*/
|
|
531
|
-
async
|
|
532
|
-
{
|
|
865
|
+
async getCountries(
|
|
866
|
+
{ onboard, pageNo, pageSize, q, hierarchy, requestHeaders } = {
|
|
867
|
+
requestHeaders: {},
|
|
868
|
+
},
|
|
533
869
|
{ responseHeaders } = { responseHeaders: false }
|
|
534
870
|
) {
|
|
535
|
-
const { error } = ServiceabilityPlatformValidator.
|
|
871
|
+
const { error } = ServiceabilityPlatformValidator.getCountries().validate(
|
|
536
872
|
{
|
|
537
|
-
|
|
873
|
+
onboard,
|
|
874
|
+
pageNo,
|
|
875
|
+
pageSize,
|
|
876
|
+
q,
|
|
877
|
+
hierarchy,
|
|
538
878
|
},
|
|
539
879
|
{ abortEarly: false, allowUnknown: true }
|
|
540
880
|
);
|
|
@@ -545,27 +885,36 @@ class Serviceability {
|
|
|
545
885
|
// Showing warrnings if extra unknown parameters are found
|
|
546
886
|
const {
|
|
547
887
|
error: warrning,
|
|
548
|
-
} = ServiceabilityPlatformValidator.
|
|
888
|
+
} = ServiceabilityPlatformValidator.getCountries().validate(
|
|
549
889
|
{
|
|
550
|
-
|
|
890
|
+
onboard,
|
|
891
|
+
pageNo,
|
|
892
|
+
pageSize,
|
|
893
|
+
q,
|
|
894
|
+
hierarchy,
|
|
551
895
|
},
|
|
552
896
|
{ abortEarly: false, allowUnknown: false }
|
|
553
897
|
);
|
|
554
898
|
if (warrning) {
|
|
555
899
|
Logger({
|
|
556
900
|
level: "WARN",
|
|
557
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
901
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCountries \n ${warrning}`,
|
|
558
902
|
});
|
|
559
903
|
}
|
|
560
904
|
|
|
561
905
|
const query_params = {};
|
|
906
|
+
query_params["onboard"] = onboard;
|
|
907
|
+
query_params["page_no"] = pageNo;
|
|
908
|
+
query_params["page_size"] = pageSize;
|
|
909
|
+
query_params["q"] = q;
|
|
910
|
+
query_params["hierarchy"] = hierarchy;
|
|
562
911
|
|
|
563
912
|
const xHeaders = {};
|
|
564
913
|
|
|
565
914
|
const response = await PlatformAPIClient.execute(
|
|
566
915
|
this.config,
|
|
567
916
|
"get",
|
|
568
|
-
`/service/platform/logistics/
|
|
917
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/countries`,
|
|
569
918
|
query_params,
|
|
570
919
|
undefined,
|
|
571
920
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -579,7 +928,7 @@ class Serviceability {
|
|
|
579
928
|
|
|
580
929
|
const {
|
|
581
930
|
error: res_error,
|
|
582
|
-
} = ServiceabilityPlatformModel.
|
|
931
|
+
} = ServiceabilityPlatformModel.GetCountries().validate(responseData, {
|
|
583
932
|
abortEarly: false,
|
|
584
933
|
allowUnknown: true,
|
|
585
934
|
});
|
|
@@ -590,7 +939,7 @@ class Serviceability {
|
|
|
590
939
|
} else {
|
|
591
940
|
Logger({
|
|
592
941
|
level: "WARN",
|
|
593
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
942
|
+
message: `Response Validation Warnings for platform > Serviceability > getCountries \n ${res_error}`,
|
|
594
943
|
});
|
|
595
944
|
}
|
|
596
945
|
}
|
|
@@ -604,7 +953,7 @@ class Serviceability {
|
|
|
604
953
|
*
|
|
605
954
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
606
955
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
607
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
956
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierAccountResult>} -
|
|
608
957
|
* Success response
|
|
609
958
|
* @name getCourierPartnerAccount
|
|
610
959
|
* @summary: Get courier account
|
|
@@ -663,7 +1012,7 @@ class Serviceability {
|
|
|
663
1012
|
|
|
664
1013
|
const {
|
|
665
1014
|
error: res_error,
|
|
666
|
-
} = ServiceabilityPlatformModel.
|
|
1015
|
+
} = ServiceabilityPlatformModel.CourierAccountResult().validate(
|
|
667
1016
|
responseData,
|
|
668
1017
|
{ abortEarly: false, allowUnknown: true }
|
|
669
1018
|
);
|
|
@@ -688,7 +1037,7 @@ class Serviceability {
|
|
|
688
1037
|
*
|
|
689
1038
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
690
1039
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
691
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1040
|
+
* @returns {Promise<ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResult>}
|
|
692
1041
|
* - Success response
|
|
693
1042
|
*
|
|
694
1043
|
* @name getCourierPartnerAccounts
|
|
@@ -784,7 +1133,7 @@ class Serviceability {
|
|
|
784
1133
|
|
|
785
1134
|
const {
|
|
786
1135
|
error: res_error,
|
|
787
|
-
} = ServiceabilityPlatformModel.
|
|
1136
|
+
} = ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResult().validate(
|
|
788
1137
|
responseData,
|
|
789
1138
|
{ abortEarly: false, allowUnknown: true }
|
|
790
1139
|
);
|
|
@@ -804,30 +1153,26 @@ class Serviceability {
|
|
|
804
1153
|
}
|
|
805
1154
|
|
|
806
1155
|
/**
|
|
807
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1156
|
+
* @param {ServiceabilityPlatformValidator.GetCourierPartnerSchemeParam} arg
|
|
808
1157
|
* - Arg object
|
|
809
1158
|
*
|
|
810
1159
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
811
1160
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
812
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1161
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema>}
|
|
813
1162
|
* - Success response
|
|
814
1163
|
*
|
|
815
|
-
* @name
|
|
816
|
-
* @summary:
|
|
817
|
-
* @description:
|
|
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/).
|
|
818
1167
|
*/
|
|
819
|
-
async
|
|
820
|
-
{
|
|
1168
|
+
async getCourierPartnerScheme(
|
|
1169
|
+
{ schemeId, requestHeaders } = { requestHeaders: {} },
|
|
821
1170
|
{ responseHeaders } = { responseHeaders: false }
|
|
822
1171
|
) {
|
|
823
1172
|
const {
|
|
824
1173
|
error,
|
|
825
|
-
} = ServiceabilityPlatformValidator.
|
|
826
|
-
{
|
|
827
|
-
pageNo,
|
|
828
|
-
pageSize,
|
|
829
|
-
isInstalled,
|
|
830
|
-
},
|
|
1174
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerScheme().validate(
|
|
1175
|
+
{ schemeId },
|
|
831
1176
|
{ abortEarly: false, allowUnknown: true }
|
|
832
1177
|
);
|
|
833
1178
|
if (error) {
|
|
@@ -837,32 +1182,25 @@ class Serviceability {
|
|
|
837
1182
|
// Showing warrnings if extra unknown parameters are found
|
|
838
1183
|
const {
|
|
839
1184
|
error: warrning,
|
|
840
|
-
} = ServiceabilityPlatformValidator.
|
|
841
|
-
{
|
|
842
|
-
pageNo,
|
|
843
|
-
pageSize,
|
|
844
|
-
isInstalled,
|
|
845
|
-
},
|
|
1185
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerScheme().validate(
|
|
1186
|
+
{ schemeId },
|
|
846
1187
|
{ abortEarly: false, allowUnknown: false }
|
|
847
1188
|
);
|
|
848
1189
|
if (warrning) {
|
|
849
1190
|
Logger({
|
|
850
1191
|
level: "WARN",
|
|
851
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1192
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerScheme \n ${warrning}`,
|
|
852
1193
|
});
|
|
853
1194
|
}
|
|
854
1195
|
|
|
855
1196
|
const query_params = {};
|
|
856
|
-
query_params["page_no"] = pageNo;
|
|
857
|
-
query_params["page_size"] = pageSize;
|
|
858
|
-
query_params["is_installed"] = isInstalled;
|
|
859
1197
|
|
|
860
1198
|
const xHeaders = {};
|
|
861
1199
|
|
|
862
1200
|
const response = await PlatformAPIClient.execute(
|
|
863
1201
|
this.config,
|
|
864
1202
|
"get",
|
|
865
|
-
`/service/platform/logistics/
|
|
1203
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme/${schemeId}`,
|
|
866
1204
|
query_params,
|
|
867
1205
|
undefined,
|
|
868
1206
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -876,7 +1214,7 @@ class Serviceability {
|
|
|
876
1214
|
|
|
877
1215
|
const {
|
|
878
1216
|
error: res_error,
|
|
879
|
-
} = ServiceabilityPlatformModel.
|
|
1217
|
+
} = ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema().validate(
|
|
880
1218
|
responseData,
|
|
881
1219
|
{ abortEarly: false, allowUnknown: true }
|
|
882
1220
|
);
|
|
@@ -887,7 +1225,7 @@ class Serviceability {
|
|
|
887
1225
|
} else {
|
|
888
1226
|
Logger({
|
|
889
1227
|
level: "WARN",
|
|
890
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1228
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerScheme \n ${res_error}`,
|
|
891
1229
|
});
|
|
892
1230
|
}
|
|
893
1231
|
}
|
|
@@ -896,29 +1234,32 @@ class Serviceability {
|
|
|
896
1234
|
}
|
|
897
1235
|
|
|
898
1236
|
/**
|
|
899
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1237
|
+
* @param {ServiceabilityPlatformValidator.GetCourierPartnerSchemesParam} arg
|
|
900
1238
|
* - Arg object
|
|
901
1239
|
*
|
|
902
1240
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
903
1241
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
904
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1242
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerSchemeList>}
|
|
905
1243
|
* - Success response
|
|
906
1244
|
*
|
|
907
|
-
* @name
|
|
908
|
-
* @summary:
|
|
909
|
-
* @description:
|
|
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/).
|
|
910
1248
|
*/
|
|
911
|
-
async
|
|
912
|
-
{
|
|
1249
|
+
async getCourierPartnerSchemes(
|
|
1250
|
+
{ schemeType, paymentMode, capabilities, schemeIds, requestHeaders } = {
|
|
1251
|
+
requestHeaders: {},
|
|
1252
|
+
},
|
|
913
1253
|
{ responseHeaders } = { responseHeaders: false }
|
|
914
1254
|
) {
|
|
915
1255
|
const {
|
|
916
1256
|
error,
|
|
917
|
-
} = ServiceabilityPlatformValidator.
|
|
1257
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerSchemes().validate(
|
|
918
1258
|
{
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
1259
|
+
schemeType,
|
|
1260
|
+
paymentMode,
|
|
1261
|
+
capabilities,
|
|
1262
|
+
schemeIds,
|
|
922
1263
|
},
|
|
923
1264
|
{ abortEarly: false, allowUnknown: true }
|
|
924
1265
|
);
|
|
@@ -929,32 +1270,34 @@ class Serviceability {
|
|
|
929
1270
|
// Showing warrnings if extra unknown parameters are found
|
|
930
1271
|
const {
|
|
931
1272
|
error: warrning,
|
|
932
|
-
} = ServiceabilityPlatformValidator.
|
|
1273
|
+
} = ServiceabilityPlatformValidator.getCourierPartnerSchemes().validate(
|
|
933
1274
|
{
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
1275
|
+
schemeType,
|
|
1276
|
+
paymentMode,
|
|
1277
|
+
capabilities,
|
|
1278
|
+
schemeIds,
|
|
937
1279
|
},
|
|
938
1280
|
{ abortEarly: false, allowUnknown: false }
|
|
939
1281
|
);
|
|
940
1282
|
if (warrning) {
|
|
941
1283
|
Logger({
|
|
942
1284
|
level: "WARN",
|
|
943
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1285
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerSchemes \n ${warrning}`,
|
|
944
1286
|
});
|
|
945
1287
|
}
|
|
946
1288
|
|
|
947
1289
|
const query_params = {};
|
|
948
|
-
query_params["
|
|
949
|
-
query_params["
|
|
950
|
-
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;
|
|
951
1294
|
|
|
952
1295
|
const xHeaders = {};
|
|
953
1296
|
|
|
954
1297
|
const response = await PlatformAPIClient.execute(
|
|
955
1298
|
this.config,
|
|
956
1299
|
"get",
|
|
957
|
-
`/service/platform/logistics/
|
|
1300
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme`,
|
|
958
1301
|
query_params,
|
|
959
1302
|
undefined,
|
|
960
1303
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -968,7 +1311,7 @@ class Serviceability {
|
|
|
968
1311
|
|
|
969
1312
|
const {
|
|
970
1313
|
error: res_error,
|
|
971
|
-
} = ServiceabilityPlatformModel.
|
|
1314
|
+
} = ServiceabilityPlatformModel.CourierPartnerSchemeList().validate(
|
|
972
1315
|
responseData,
|
|
973
1316
|
{ abortEarly: false, allowUnknown: true }
|
|
974
1317
|
);
|
|
@@ -979,7 +1322,7 @@ class Serviceability {
|
|
|
979
1322
|
} else {
|
|
980
1323
|
Logger({
|
|
981
1324
|
level: "WARN",
|
|
982
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1325
|
+
message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerSchemes \n ${res_error}`,
|
|
983
1326
|
});
|
|
984
1327
|
}
|
|
985
1328
|
}
|
|
@@ -988,38 +1331,29 @@ class Serviceability {
|
|
|
988
1331
|
}
|
|
989
1332
|
|
|
990
1333
|
/**
|
|
991
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1334
|
+
* @param {ServiceabilityPlatformValidator.GetInstalledCourierPartnerExtensionsParam} arg
|
|
1335
|
+
* - Arg object
|
|
1336
|
+
*
|
|
992
1337
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
993
1338
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
994
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
995
|
-
*
|
|
996
|
-
*
|
|
997
|
-
* @
|
|
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/).
|
|
998
1345
|
*/
|
|
999
|
-
async
|
|
1000
|
-
{
|
|
1001
|
-
localityType,
|
|
1002
|
-
country,
|
|
1003
|
-
state,
|
|
1004
|
-
city,
|
|
1005
|
-
pageNo,
|
|
1006
|
-
pageSize,
|
|
1007
|
-
q,
|
|
1008
|
-
name,
|
|
1009
|
-
requestHeaders,
|
|
1010
|
-
} = { requestHeaders: {} },
|
|
1346
|
+
async getInstalledCourierPartnerExtensions(
|
|
1347
|
+
{ pageNo, pageSize, isInstalled, requestHeaders } = { requestHeaders: {} },
|
|
1011
1348
|
{ responseHeaders } = { responseHeaders: false }
|
|
1012
1349
|
) {
|
|
1013
|
-
const {
|
|
1350
|
+
const {
|
|
1351
|
+
error,
|
|
1352
|
+
} = ServiceabilityPlatformValidator.getInstalledCourierPartnerExtensions().validate(
|
|
1014
1353
|
{
|
|
1015
|
-
localityType,
|
|
1016
|
-
country,
|
|
1017
|
-
state,
|
|
1018
|
-
city,
|
|
1019
1354
|
pageNo,
|
|
1020
1355
|
pageSize,
|
|
1021
|
-
|
|
1022
|
-
name,
|
|
1356
|
+
isInstalled,
|
|
1023
1357
|
},
|
|
1024
1358
|
{ abortEarly: false, allowUnknown: true }
|
|
1025
1359
|
);
|
|
@@ -1030,184 +1364,32 @@ class Serviceability {
|
|
|
1030
1364
|
// Showing warrnings if extra unknown parameters are found
|
|
1031
1365
|
const {
|
|
1032
1366
|
error: warrning,
|
|
1033
|
-
} = ServiceabilityPlatformValidator.
|
|
1367
|
+
} = ServiceabilityPlatformValidator.getInstalledCourierPartnerExtensions().validate(
|
|
1034
1368
|
{
|
|
1035
|
-
localityType,
|
|
1036
|
-
country,
|
|
1037
|
-
state,
|
|
1038
|
-
city,
|
|
1039
1369
|
pageNo,
|
|
1040
1370
|
pageSize,
|
|
1041
|
-
|
|
1042
|
-
name,
|
|
1371
|
+
isInstalled,
|
|
1043
1372
|
},
|
|
1044
1373
|
{ abortEarly: false, allowUnknown: false }
|
|
1045
1374
|
);
|
|
1046
1375
|
if (warrning) {
|
|
1047
1376
|
Logger({
|
|
1048
1377
|
level: "WARN",
|
|
1049
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1378
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getInstalledCourierPartnerExtensions \n ${warrning}`,
|
|
1050
1379
|
});
|
|
1051
1380
|
}
|
|
1052
1381
|
|
|
1053
1382
|
const query_params = {};
|
|
1054
|
-
query_params["country"] = country;
|
|
1055
|
-
query_params["state"] = state;
|
|
1056
|
-
query_params["city"] = city;
|
|
1057
1383
|
query_params["page_no"] = pageNo;
|
|
1058
|
-
query_params["page_size"] = pageSize;
|
|
1059
|
-
query_params["
|
|
1060
|
-
query_params["name"] = name;
|
|
1061
|
-
|
|
1062
|
-
const xHeaders = {};
|
|
1063
|
-
|
|
1064
|
-
const response = await PlatformAPIClient.execute(
|
|
1065
|
-
this.config,
|
|
1066
|
-
"get",
|
|
1067
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/localities/${localityType}`,
|
|
1068
|
-
query_params,
|
|
1069
|
-
undefined,
|
|
1070
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1071
|
-
{ responseHeaders }
|
|
1072
|
-
);
|
|
1073
|
-
|
|
1074
|
-
let responseData = response;
|
|
1075
|
-
if (responseHeaders) {
|
|
1076
|
-
responseData = response[0];
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
const {
|
|
1080
|
-
error: res_error,
|
|
1081
|
-
} = ServiceabilityPlatformModel.GetLocalities().validate(responseData, {
|
|
1082
|
-
abortEarly: false,
|
|
1083
|
-
allowUnknown: true,
|
|
1084
|
-
});
|
|
1085
|
-
|
|
1086
|
-
if (res_error) {
|
|
1087
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1088
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1089
|
-
} else {
|
|
1090
|
-
Logger({
|
|
1091
|
-
level: "WARN",
|
|
1092
|
-
message: `Response Validation Warnings for platform > Serviceability > getLocalities \n ${res_error}`,
|
|
1093
|
-
});
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
return response;
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* @param {Object} arg - Arg object.
|
|
1102
|
-
* @param {string} arg.localityType - A `locality_type` contains unique
|
|
1103
|
-
* geographical division.
|
|
1104
|
-
* @param {string} [arg.country] - A `country` contains a specific value of
|
|
1105
|
-
* the country iso2 code.
|
|
1106
|
-
* @param {string} [arg.state] - A `state` contains a specific value of the
|
|
1107
|
-
* state, province.
|
|
1108
|
-
* @param {string} [arg.city] - A `city` contains a specific value of the city.
|
|
1109
|
-
* @param {number} [arg.pageSize] - Page size.
|
|
1110
|
-
* @param {string} [arg.q] - Search.
|
|
1111
|
-
* @param {string} [arg.name] - Search for localities. Either provide a full
|
|
1112
|
-
* name or a search term.
|
|
1113
|
-
* @returns {Paginator<ServiceabilityPlatformModel.GetLocalities>}
|
|
1114
|
-
* @summary: Get Localities.
|
|
1115
|
-
* @description: Get Localities data.
|
|
1116
|
-
*/
|
|
1117
|
-
getLocalitiesPaginator({
|
|
1118
|
-
localityType,
|
|
1119
|
-
country,
|
|
1120
|
-
state,
|
|
1121
|
-
city,
|
|
1122
|
-
pageSize,
|
|
1123
|
-
q,
|
|
1124
|
-
name,
|
|
1125
|
-
} = {}) {
|
|
1126
|
-
const paginator = new Paginator();
|
|
1127
|
-
const callback = async () => {
|
|
1128
|
-
const pageId = paginator.nextId;
|
|
1129
|
-
const pageNo = paginator.pageNo;
|
|
1130
|
-
const pageType = "number";
|
|
1131
|
-
const data = await this.getLocalities({
|
|
1132
|
-
localityType: localityType,
|
|
1133
|
-
country: country,
|
|
1134
|
-
state: state,
|
|
1135
|
-
city: city,
|
|
1136
|
-
pageNo: pageNo,
|
|
1137
|
-
pageSize: pageSize,
|
|
1138
|
-
q: q,
|
|
1139
|
-
name: name,
|
|
1140
|
-
});
|
|
1141
|
-
paginator.setPaginator({
|
|
1142
|
-
hasNext: data.page.has_next ? true : false,
|
|
1143
|
-
nextId: data.page.next_id,
|
|
1144
|
-
});
|
|
1145
|
-
return data;
|
|
1146
|
-
};
|
|
1147
|
-
paginator.setCallback(callback.bind(this));
|
|
1148
|
-
return paginator;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
/**
|
|
1152
|
-
* @param {ServiceabilityPlatformValidator.GetLocalityParam} arg - Arg object
|
|
1153
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1154
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1155
|
-
* @returns {Promise<ServiceabilityPlatformModel.GetLocality>} - Success response
|
|
1156
|
-
* @name getLocality
|
|
1157
|
-
* @summary: Get Locality API
|
|
1158
|
-
* @description: Get Locality data - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getLocality/).
|
|
1159
|
-
*/
|
|
1160
|
-
async getLocality(
|
|
1161
|
-
{ localityType, localityValue, country, state, city, requestHeaders } = {
|
|
1162
|
-
requestHeaders: {},
|
|
1163
|
-
},
|
|
1164
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1165
|
-
) {
|
|
1166
|
-
const { error } = ServiceabilityPlatformValidator.getLocality().validate(
|
|
1167
|
-
{
|
|
1168
|
-
localityType,
|
|
1169
|
-
localityValue,
|
|
1170
|
-
country,
|
|
1171
|
-
state,
|
|
1172
|
-
city,
|
|
1173
|
-
},
|
|
1174
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1175
|
-
);
|
|
1176
|
-
if (error) {
|
|
1177
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1181
|
-
const {
|
|
1182
|
-
error: warrning,
|
|
1183
|
-
} = ServiceabilityPlatformValidator.getLocality().validate(
|
|
1184
|
-
{
|
|
1185
|
-
localityType,
|
|
1186
|
-
localityValue,
|
|
1187
|
-
country,
|
|
1188
|
-
state,
|
|
1189
|
-
city,
|
|
1190
|
-
},
|
|
1191
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1192
|
-
);
|
|
1193
|
-
if (warrning) {
|
|
1194
|
-
Logger({
|
|
1195
|
-
level: "WARN",
|
|
1196
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getLocality \n ${warrning}`,
|
|
1197
|
-
});
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
const query_params = {};
|
|
1201
|
-
query_params["country"] = country;
|
|
1202
|
-
query_params["state"] = state;
|
|
1203
|
-
query_params["city"] = city;
|
|
1384
|
+
query_params["page_size"] = pageSize;
|
|
1385
|
+
query_params["is_installed"] = isInstalled;
|
|
1204
1386
|
|
|
1205
1387
|
const xHeaders = {};
|
|
1206
1388
|
|
|
1207
1389
|
const response = await PlatformAPIClient.execute(
|
|
1208
1390
|
this.config,
|
|
1209
1391
|
"get",
|
|
1210
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
1392
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/list`,
|
|
1211
1393
|
query_params,
|
|
1212
1394
|
undefined,
|
|
1213
1395
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1221,10 +1403,10 @@ class Serviceability {
|
|
|
1221
1403
|
|
|
1222
1404
|
const {
|
|
1223
1405
|
error: res_error,
|
|
1224
|
-
} = ServiceabilityPlatformModel.
|
|
1225
|
-
|
|
1226
|
-
allowUnknown: true
|
|
1227
|
-
|
|
1406
|
+
} = ServiceabilityPlatformModel.InstallCourierPartnerResponseSchema().validate(
|
|
1407
|
+
responseData,
|
|
1408
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1409
|
+
);
|
|
1228
1410
|
|
|
1229
1411
|
if (res_error) {
|
|
1230
1412
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1232,7 +1414,7 @@ class Serviceability {
|
|
|
1232
1414
|
} else {
|
|
1233
1415
|
Logger({
|
|
1234
1416
|
level: "WARN",
|
|
1235
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1417
|
+
message: `Response Validation Warnings for platform > Serviceability > getInstalledCourierPartnerExtensions \n ${res_error}`,
|
|
1236
1418
|
});
|
|
1237
1419
|
}
|
|
1238
1420
|
}
|
|
@@ -1244,9 +1426,8 @@ class Serviceability {
|
|
|
1244
1426
|
* @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object
|
|
1245
1427
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1246
1428
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1247
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1248
|
-
*
|
|
1249
|
-
*
|
|
1429
|
+
* @returns {Promise<ServiceabilityPlatformModel.OptimalLocationsResult>} -
|
|
1430
|
+
* Success response
|
|
1250
1431
|
* @name getOptimalLocations
|
|
1251
1432
|
* @summary: Get selling locations
|
|
1252
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/).
|
|
@@ -1304,7 +1485,7 @@ class Serviceability {
|
|
|
1304
1485
|
|
|
1305
1486
|
const {
|
|
1306
1487
|
error: res_error,
|
|
1307
|
-
} = ServiceabilityPlatformModel.
|
|
1488
|
+
} = ServiceabilityPlatformModel.OptimalLocationsResult().validate(
|
|
1308
1489
|
responseData,
|
|
1309
1490
|
{ abortEarly: false, allowUnknown: true }
|
|
1310
1491
|
);
|
|
@@ -1329,7 +1510,7 @@ class Serviceability {
|
|
|
1329
1510
|
*
|
|
1330
1511
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1331
1512
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1332
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1513
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackagesListResult>} -
|
|
1333
1514
|
* Success response
|
|
1334
1515
|
* @name getPackageMaterialList
|
|
1335
1516
|
* @summary: Get packaging materials
|
|
@@ -1403,7 +1584,7 @@ class Serviceability {
|
|
|
1403
1584
|
|
|
1404
1585
|
const {
|
|
1405
1586
|
error: res_error,
|
|
1406
|
-
} = ServiceabilityPlatformModel.
|
|
1587
|
+
} = ServiceabilityPlatformModel.PackagesListResult().validate(
|
|
1407
1588
|
responseData,
|
|
1408
1589
|
{ abortEarly: false, allowUnknown: true }
|
|
1409
1590
|
);
|
|
@@ -1507,31 +1688,110 @@ class Serviceability {
|
|
|
1507
1688
|
}
|
|
1508
1689
|
|
|
1509
1690
|
/**
|
|
1510
|
-
* @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
|
|
1511
1773
|
* - Arg object
|
|
1512
1774
|
*
|
|
1513
1775
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1514
1776
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1515
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1516
|
-
* Success response
|
|
1517
|
-
*
|
|
1518
|
-
* @
|
|
1519
|
-
* @
|
|
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/).
|
|
1520
1783
|
*/
|
|
1521
|
-
async
|
|
1522
|
-
{
|
|
1523
|
-
requestHeaders: {},
|
|
1524
|
-
},
|
|
1784
|
+
async getSampleFileServiceabilityStatus(
|
|
1785
|
+
{ pageNo, pageSize, batchId, requestHeaders } = { requestHeaders: {} },
|
|
1525
1786
|
{ responseHeaders } = { responseHeaders: false }
|
|
1526
1787
|
) {
|
|
1527
1788
|
const {
|
|
1528
1789
|
error,
|
|
1529
|
-
} = ServiceabilityPlatformValidator.
|
|
1790
|
+
} = ServiceabilityPlatformValidator.getSampleFileServiceabilityStatus().validate(
|
|
1530
1791
|
{
|
|
1531
|
-
ruleId,
|
|
1532
1792
|
pageNo,
|
|
1533
1793
|
pageSize,
|
|
1534
|
-
|
|
1794
|
+
batchId,
|
|
1535
1795
|
},
|
|
1536
1796
|
{ abortEarly: false, allowUnknown: true }
|
|
1537
1797
|
);
|
|
@@ -1542,33 +1802,32 @@ class Serviceability {
|
|
|
1542
1802
|
// Showing warrnings if extra unknown parameters are found
|
|
1543
1803
|
const {
|
|
1544
1804
|
error: warrning,
|
|
1545
|
-
} = ServiceabilityPlatformValidator.
|
|
1805
|
+
} = ServiceabilityPlatformValidator.getSampleFileServiceabilityStatus().validate(
|
|
1546
1806
|
{
|
|
1547
|
-
ruleId,
|
|
1548
1807
|
pageNo,
|
|
1549
1808
|
pageSize,
|
|
1550
|
-
|
|
1809
|
+
batchId,
|
|
1551
1810
|
},
|
|
1552
1811
|
{ abortEarly: false, allowUnknown: false }
|
|
1553
1812
|
);
|
|
1554
1813
|
if (warrning) {
|
|
1555
1814
|
Logger({
|
|
1556
1815
|
level: "WARN",
|
|
1557
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1816
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getSampleFileServiceabilityStatus \n ${warrning}`,
|
|
1558
1817
|
});
|
|
1559
1818
|
}
|
|
1560
1819
|
|
|
1561
1820
|
const query_params = {};
|
|
1562
1821
|
query_params["page_no"] = pageNo;
|
|
1563
1822
|
query_params["page_size"] = pageSize;
|
|
1564
|
-
query_params["
|
|
1823
|
+
query_params["batch_id"] = batchId;
|
|
1565
1824
|
|
|
1566
1825
|
const xHeaders = {};
|
|
1567
1826
|
|
|
1568
1827
|
const response = await PlatformAPIClient.execute(
|
|
1569
1828
|
this.config,
|
|
1570
1829
|
"get",
|
|
1571
|
-
`/service/platform/logistics/
|
|
1830
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/localities/bulk-sample`,
|
|
1572
1831
|
query_params,
|
|
1573
1832
|
undefined,
|
|
1574
1833
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1582,7 +1841,84 @@ class Serviceability {
|
|
|
1582
1841
|
|
|
1583
1842
|
const {
|
|
1584
1843
|
error: res_error,
|
|
1585
|
-
} = 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, {
|
|
1586
1922
|
abortEarly: false,
|
|
1587
1923
|
allowUnknown: true,
|
|
1588
1924
|
});
|
|
@@ -1593,7 +1929,7 @@ class Serviceability {
|
|
|
1593
1929
|
} else {
|
|
1594
1930
|
Logger({
|
|
1595
1931
|
level: "WARN",
|
|
1596
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
1932
|
+
message: `Response Validation Warnings for platform > Serviceability > getSelfShipDetails \n ${res_error}`,
|
|
1597
1933
|
});
|
|
1598
1934
|
}
|
|
1599
1935
|
}
|
|
@@ -1602,25 +1938,27 @@ class Serviceability {
|
|
|
1602
1938
|
}
|
|
1603
1939
|
|
|
1604
1940
|
/**
|
|
1605
|
-
* @param {ServiceabilityPlatformValidator.
|
|
1941
|
+
* @param {ServiceabilityPlatformValidator.SampleFileServiceabilityParam} arg
|
|
1942
|
+
* - Arg object
|
|
1943
|
+
*
|
|
1606
1944
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1607
1945
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1608
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1946
|
+
* @returns {Promise<ServiceabilityPlatformModel.BulkRegionServiceabilityTatResultItemData>}
|
|
1609
1947
|
* - Success response
|
|
1610
1948
|
*
|
|
1611
|
-
* @name
|
|
1612
|
-
* @summary:
|
|
1613
|
-
* @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/).
|
|
1614
1952
|
*/
|
|
1615
|
-
async
|
|
1616
|
-
{
|
|
1953
|
+
async sampleFileServiceability(
|
|
1954
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1617
1955
|
{ responseHeaders } = { responseHeaders: false }
|
|
1618
1956
|
) {
|
|
1619
1957
|
const {
|
|
1620
1958
|
error,
|
|
1621
|
-
} = ServiceabilityPlatformValidator.
|
|
1959
|
+
} = ServiceabilityPlatformValidator.sampleFileServiceability().validate(
|
|
1622
1960
|
{
|
|
1623
|
-
|
|
1961
|
+
body,
|
|
1624
1962
|
},
|
|
1625
1963
|
{ abortEarly: false, allowUnknown: true }
|
|
1626
1964
|
);
|
|
@@ -1631,16 +1969,16 @@ class Serviceability {
|
|
|
1631
1969
|
// Showing warrnings if extra unknown parameters are found
|
|
1632
1970
|
const {
|
|
1633
1971
|
error: warrning,
|
|
1634
|
-
} = ServiceabilityPlatformValidator.
|
|
1972
|
+
} = ServiceabilityPlatformValidator.sampleFileServiceability().validate(
|
|
1635
1973
|
{
|
|
1636
|
-
|
|
1974
|
+
body,
|
|
1637
1975
|
},
|
|
1638
1976
|
{ abortEarly: false, allowUnknown: false }
|
|
1639
1977
|
);
|
|
1640
1978
|
if (warrning) {
|
|
1641
1979
|
Logger({
|
|
1642
1980
|
level: "WARN",
|
|
1643
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
1981
|
+
message: `Parameter Validation warrnings for platform > Serviceability > sampleFileServiceability \n ${warrning}`,
|
|
1644
1982
|
});
|
|
1645
1983
|
}
|
|
1646
1984
|
|
|
@@ -1650,10 +1988,10 @@ class Serviceability {
|
|
|
1650
1988
|
|
|
1651
1989
|
const response = await PlatformAPIClient.execute(
|
|
1652
1990
|
this.config,
|
|
1653
|
-
"
|
|
1654
|
-
`/service/platform/logistics/
|
|
1991
|
+
"post",
|
|
1992
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/localities/bulk-sample`,
|
|
1655
1993
|
query_params,
|
|
1656
|
-
|
|
1994
|
+
body,
|
|
1657
1995
|
{ ...xHeaders, ...requestHeaders },
|
|
1658
1996
|
{ responseHeaders }
|
|
1659
1997
|
);
|
|
@@ -1665,7 +2003,7 @@ class Serviceability {
|
|
|
1665
2003
|
|
|
1666
2004
|
const {
|
|
1667
2005
|
error: res_error,
|
|
1668
|
-
} = ServiceabilityPlatformModel.
|
|
2006
|
+
} = ServiceabilityPlatformModel.BulkRegionServiceabilityTatResultItemData().validate(
|
|
1669
2007
|
responseData,
|
|
1670
2008
|
{ abortEarly: false, allowUnknown: true }
|
|
1671
2009
|
);
|
|
@@ -1676,7 +2014,7 @@ class Serviceability {
|
|
|
1676
2014
|
} else {
|
|
1677
2015
|
Logger({
|
|
1678
2016
|
level: "WARN",
|
|
1679
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2017
|
+
message: `Response Validation Warnings for platform > Serviceability > sampleFileServiceability \n ${res_error}`,
|
|
1680
2018
|
});
|
|
1681
2019
|
}
|
|
1682
2020
|
}
|
|
@@ -1768,24 +2106,27 @@ class Serviceability {
|
|
|
1768
2106
|
}
|
|
1769
2107
|
|
|
1770
2108
|
/**
|
|
1771
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2109
|
+
* @param {ServiceabilityPlatformValidator.UpdateCourierPartnerAccountParam} arg
|
|
1772
2110
|
* - Arg object
|
|
1773
2111
|
*
|
|
1774
2112
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1775
2113
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1776
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1777
|
-
*
|
|
1778
|
-
*
|
|
1779
|
-
* @
|
|
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/).
|
|
1780
2120
|
*/
|
|
1781
|
-
async
|
|
1782
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2121
|
+
async updateCourierPartnerAccount(
|
|
2122
|
+
{ accountId, body, requestHeaders } = { requestHeaders: {} },
|
|
1783
2123
|
{ responseHeaders } = { responseHeaders: false }
|
|
1784
2124
|
) {
|
|
1785
2125
|
const {
|
|
1786
2126
|
error,
|
|
1787
|
-
} = ServiceabilityPlatformValidator.
|
|
2127
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerAccount().validate(
|
|
1788
2128
|
{
|
|
2129
|
+
accountId,
|
|
1789
2130
|
body,
|
|
1790
2131
|
},
|
|
1791
2132
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1797,8 +2138,9 @@ class Serviceability {
|
|
|
1797
2138
|
// Showing warrnings if extra unknown parameters are found
|
|
1798
2139
|
const {
|
|
1799
2140
|
error: warrning,
|
|
1800
|
-
} = ServiceabilityPlatformValidator.
|
|
2141
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerAccount().validate(
|
|
1801
2142
|
{
|
|
2143
|
+
accountId,
|
|
1802
2144
|
body,
|
|
1803
2145
|
},
|
|
1804
2146
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1806,7 +2148,7 @@ class Serviceability {
|
|
|
1806
2148
|
if (warrning) {
|
|
1807
2149
|
Logger({
|
|
1808
2150
|
level: "WARN",
|
|
1809
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2151
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateCourierPartnerAccount \n ${warrning}`,
|
|
1810
2152
|
});
|
|
1811
2153
|
}
|
|
1812
2154
|
|
|
@@ -1816,8 +2158,8 @@ class Serviceability {
|
|
|
1816
2158
|
|
|
1817
2159
|
const response = await PlatformAPIClient.execute(
|
|
1818
2160
|
this.config,
|
|
1819
|
-
"
|
|
1820
|
-
`/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}`,
|
|
1821
2163
|
query_params,
|
|
1822
2164
|
body,
|
|
1823
2165
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1831,10 +2173,10 @@ class Serviceability {
|
|
|
1831
2173
|
|
|
1832
2174
|
const {
|
|
1833
2175
|
error: res_error,
|
|
1834
|
-
} = ServiceabilityPlatformModel.
|
|
1835
|
-
|
|
1836
|
-
allowUnknown: true
|
|
1837
|
-
|
|
2176
|
+
} = ServiceabilityPlatformModel.CourierAccountDetailsBody().validate(
|
|
2177
|
+
responseData,
|
|
2178
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2179
|
+
);
|
|
1838
2180
|
|
|
1839
2181
|
if (res_error) {
|
|
1840
2182
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1842,7 +2184,7 @@ class Serviceability {
|
|
|
1842
2184
|
} else {
|
|
1843
2185
|
Logger({
|
|
1844
2186
|
level: "WARN",
|
|
1845
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2187
|
+
message: `Response Validation Warnings for platform > Serviceability > updateCourierPartnerAccount \n ${res_error}`,
|
|
1846
2188
|
});
|
|
1847
2189
|
}
|
|
1848
2190
|
}
|
|
@@ -1851,25 +2193,28 @@ class Serviceability {
|
|
|
1851
2193
|
}
|
|
1852
2194
|
|
|
1853
2195
|
/**
|
|
1854
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2196
|
+
* @param {ServiceabilityPlatformValidator.UpdateCourierPartnerSchemeParam} arg
|
|
1855
2197
|
* - Arg object
|
|
1856
2198
|
*
|
|
1857
2199
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1858
2200
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1859
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1860
|
-
*
|
|
1861
|
-
*
|
|
1862
|
-
* @
|
|
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/).
|
|
1863
2207
|
*/
|
|
1864
|
-
async
|
|
1865
|
-
{
|
|
2208
|
+
async updateCourierPartnerScheme(
|
|
2209
|
+
{ schemeId, body, requestHeaders } = { requestHeaders: {} },
|
|
1866
2210
|
{ responseHeaders } = { responseHeaders: false }
|
|
1867
2211
|
) {
|
|
1868
2212
|
const {
|
|
1869
2213
|
error,
|
|
1870
|
-
} = ServiceabilityPlatformValidator.
|
|
2214
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerScheme().validate(
|
|
1871
2215
|
{
|
|
1872
|
-
|
|
2216
|
+
schemeId,
|
|
2217
|
+
|
|
1873
2218
|
body,
|
|
1874
2219
|
},
|
|
1875
2220
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1881,9 +2226,10 @@ class Serviceability {
|
|
|
1881
2226
|
// Showing warrnings if extra unknown parameters are found
|
|
1882
2227
|
const {
|
|
1883
2228
|
error: warrning,
|
|
1884
|
-
} = ServiceabilityPlatformValidator.
|
|
2229
|
+
} = ServiceabilityPlatformValidator.updateCourierPartnerScheme().validate(
|
|
1885
2230
|
{
|
|
1886
|
-
|
|
2231
|
+
schemeId,
|
|
2232
|
+
|
|
1887
2233
|
body,
|
|
1888
2234
|
},
|
|
1889
2235
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1891,7 +2237,7 @@ class Serviceability {
|
|
|
1891
2237
|
if (warrning) {
|
|
1892
2238
|
Logger({
|
|
1893
2239
|
level: "WARN",
|
|
1894
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2240
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateCourierPartnerScheme \n ${warrning}`,
|
|
1895
2241
|
});
|
|
1896
2242
|
}
|
|
1897
2243
|
|
|
@@ -1902,7 +2248,7 @@ class Serviceability {
|
|
|
1902
2248
|
const response = await PlatformAPIClient.execute(
|
|
1903
2249
|
this.config,
|
|
1904
2250
|
"put",
|
|
1905
|
-
`/service/platform/logistics/
|
|
2251
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/courier-partner/scheme/${schemeId}`,
|
|
1906
2252
|
query_params,
|
|
1907
2253
|
body,
|
|
1908
2254
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1916,10 +2262,10 @@ class Serviceability {
|
|
|
1916
2262
|
|
|
1917
2263
|
const {
|
|
1918
2264
|
error: res_error,
|
|
1919
|
-
} = ServiceabilityPlatformModel.
|
|
1920
|
-
|
|
1921
|
-
allowUnknown: true
|
|
1922
|
-
|
|
2265
|
+
} = ServiceabilityPlatformModel.CourierPartnerSchemeModelSchema().validate(
|
|
2266
|
+
responseData,
|
|
2267
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2268
|
+
);
|
|
1923
2269
|
|
|
1924
2270
|
if (res_error) {
|
|
1925
2271
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1927,7 +2273,7 @@ class Serviceability {
|
|
|
1927
2273
|
} else {
|
|
1928
2274
|
Logger({
|
|
1929
2275
|
level: "WARN",
|
|
1930
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2276
|
+
message: `Response Validation Warnings for platform > Serviceability > updateCourierPartnerScheme \n ${res_error}`,
|
|
1931
2277
|
});
|
|
1932
2278
|
}
|
|
1933
2279
|
}
|
|
@@ -2027,9 +2373,8 @@ class Serviceability {
|
|
|
2027
2373
|
*
|
|
2028
2374
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2029
2375
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2030
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2031
|
-
*
|
|
2032
|
-
*
|
|
2376
|
+
* @returns {Promise<ServiceabilityPlatformModel.PackageMaterialResult>} -
|
|
2377
|
+
* Success response
|
|
2033
2378
|
* @name updatePackageMaterials
|
|
2034
2379
|
* @summary: Update packaging material
|
|
2035
2380
|
* @description: Update an existing packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterials/).
|
|
@@ -2089,7 +2434,7 @@ class Serviceability {
|
|
|
2089
2434
|
|
|
2090
2435
|
const {
|
|
2091
2436
|
error: res_error,
|
|
2092
|
-
} = ServiceabilityPlatformModel.
|
|
2437
|
+
} = ServiceabilityPlatformModel.PackageMaterialResult().validate(
|
|
2093
2438
|
responseData,
|
|
2094
2439
|
{ abortEarly: false, allowUnknown: true }
|
|
2095
2440
|
);
|
|
@@ -2109,27 +2454,24 @@ class Serviceability {
|
|
|
2109
2454
|
}
|
|
2110
2455
|
|
|
2111
2456
|
/**
|
|
2112
|
-
* @param {ServiceabilityPlatformValidator.
|
|
2457
|
+
* @param {ServiceabilityPlatformValidator.UpdateSelfShipDetailsParam} arg
|
|
2458
|
+
* - Arg object
|
|
2459
|
+
*
|
|
2113
2460
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2114
2461
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2115
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
2116
|
-
*
|
|
2117
|
-
* @
|
|
2118
|
-
* @
|
|
2119
|
-
* @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/).
|
|
2120
2466
|
*/
|
|
2121
|
-
async
|
|
2122
|
-
{
|
|
2123
|
-
requestHeaders: {},
|
|
2124
|
-
},
|
|
2467
|
+
async updateSelfShipDetails(
|
|
2468
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2125
2469
|
{ responseHeaders } = { responseHeaders: false }
|
|
2126
2470
|
) {
|
|
2127
2471
|
const {
|
|
2128
2472
|
error,
|
|
2129
|
-
} = ServiceabilityPlatformValidator.
|
|
2473
|
+
} = ServiceabilityPlatformValidator.updateSelfShipDetails().validate(
|
|
2130
2474
|
{
|
|
2131
|
-
countryIsoCode,
|
|
2132
|
-
templateName,
|
|
2133
2475
|
body,
|
|
2134
2476
|
},
|
|
2135
2477
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2141,10 +2483,8 @@ class Serviceability {
|
|
|
2141
2483
|
// Showing warrnings if extra unknown parameters are found
|
|
2142
2484
|
const {
|
|
2143
2485
|
error: warrning,
|
|
2144
|
-
} = ServiceabilityPlatformValidator.
|
|
2486
|
+
} = ServiceabilityPlatformValidator.updateSelfShipDetails().validate(
|
|
2145
2487
|
{
|
|
2146
|
-
countryIsoCode,
|
|
2147
|
-
templateName,
|
|
2148
2488
|
body,
|
|
2149
2489
|
},
|
|
2150
2490
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2152,7 +2492,7 @@ class Serviceability {
|
|
|
2152
2492
|
if (warrning) {
|
|
2153
2493
|
Logger({
|
|
2154
2494
|
level: "WARN",
|
|
2155
|
-
message: `Parameter Validation warrnings for platform > Serviceability >
|
|
2495
|
+
message: `Parameter Validation warrnings for platform > Serviceability > updateSelfShipDetails \n ${warrning}`,
|
|
2156
2496
|
});
|
|
2157
2497
|
}
|
|
2158
2498
|
|
|
@@ -2162,8 +2502,8 @@ class Serviceability {
|
|
|
2162
2502
|
|
|
2163
2503
|
const response = await PlatformAPIClient.execute(
|
|
2164
2504
|
this.config,
|
|
2165
|
-
"
|
|
2166
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/
|
|
2505
|
+
"patch",
|
|
2506
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/selfship`,
|
|
2167
2507
|
query_params,
|
|
2168
2508
|
body,
|
|
2169
2509
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2177,10 +2517,10 @@ class Serviceability {
|
|
|
2177
2517
|
|
|
2178
2518
|
const {
|
|
2179
2519
|
error: res_error,
|
|
2180
|
-
} = ServiceabilityPlatformModel.
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
);
|
|
2520
|
+
} = ServiceabilityPlatformModel.SelfshipSchema().validate(responseData, {
|
|
2521
|
+
abortEarly: false,
|
|
2522
|
+
allowUnknown: true,
|
|
2523
|
+
});
|
|
2184
2524
|
|
|
2185
2525
|
if (res_error) {
|
|
2186
2526
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2188,7 +2528,7 @@ class Serviceability {
|
|
|
2188
2528
|
} else {
|
|
2189
2529
|
Logger({
|
|
2190
2530
|
level: "WARN",
|
|
2191
|
-
message: `Response Validation Warnings for platform > Serviceability >
|
|
2531
|
+
message: `Response Validation Warnings for platform > Serviceability > updateSelfShipDetails \n ${res_error}`,
|
|
2192
2532
|
});
|
|
2193
2533
|
}
|
|
2194
2534
|
}
|