@gofynd/fdk-client-javascript 1.4.14 → 1.4.15-beta.10
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 +2 -2
- package/application.d.ts +1 -2
- package/application.js +2 -3
- package/index.d.ts +1 -2
- package/index.js +7 -1
- package/package.json +2 -3
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -20
- package/sdk/application/Cart/CartApplicationClient.d.ts +55 -97
- package/sdk/application/Cart/CartApplicationClient.js +60 -1262
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +80 -162
- package/sdk/application/Catalog/CatalogApplicationClient.js +148 -1313
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -9
- package/sdk/application/Common/CommonApplicationClient.js +5 -90
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -145
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -80
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +31 -725
- package/sdk/application/Content/ContentApplicationClient.d.ts +63 -85
- package/sdk/application/Content/ContentApplicationClient.js +126 -942
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -15
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +26 -130
- package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -17
- package/sdk/application/Lead/LeadApplicationClient.js +32 -201
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -62
- package/sdk/application/Logistic/LogisticApplicationClient.js +51 -647
- package/sdk/application/Order/OrderApplicationClient.d.ts +22 -56
- package/sdk/application/Order/OrderApplicationClient.js +86 -555
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -209
- package/sdk/application/Payment/PaymentApplicationClient.js +57 -2099
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -26
- package/sdk/application/Rewards/RewardsApplicationClient.js +17 -303
- package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
- package/sdk/application/Share/ShareApplicationClient.js +34 -294
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
- package/sdk/application/Theme/ThemeApplicationClient.js +30 -166
- package/sdk/application/User/UserApplicationClient.d.ts +87 -138
- package/sdk/application/User/UserApplicationClient.js +47 -1817
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
- package/sdk/application/Webhook/WebhookApplicationClient.js +6 -49
- package/sdk/application/index.d.ts +0 -19
- package/sdk/application/index.js +0 -35
- 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 +12 -86
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +21 -116
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +16 -121
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +85 -767
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +76 -429
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +6 -120
- package/sdk/partner/OAuthClient.js +1 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
- package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +39 -135
- package/sdk/partner/Theme/ThemePartnerModel.js +38 -114
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
- package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
- package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +112 -407
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -111
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -106
- package/sdk/platform/Cart/CartPlatformModel.d.ts +1328 -4975
- package/sdk/platform/Cart/CartPlatformModel.js +1229 -1922
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -208
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +358 -383
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +126 -122
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +68 -66
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +118 -141
- package/sdk/platform/Catalog/CatalogPlatformClient.js +170 -193
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1744 -1501
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1211 -1383
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
- package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
- package/sdk/platform/Common/CommonPlatformClient.js +2 -3
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +138 -283
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +100 -219
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -124
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +422 -449
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -179
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -168
- package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
- package/sdk/platform/Content/ContentPlatformClient.js +336 -523
- package/sdk/platform/Content/ContentPlatformModel.d.ts +395 -1241
- package/sdk/platform/Content/ContentPlatformModel.js +390 -521
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
- package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
- package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +39 -95
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +63 -462
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +22 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +24 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -370
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +104 -313
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -175
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +4 -52
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +3 -34
- package/sdk/platform/Order/OrderPlatformClient.d.ts +103 -174
- package/sdk/platform/Order/OrderPlatformClient.js +275 -528
- package/sdk/platform/Order/OrderPlatformModel.d.ts +3078 -5449
- package/sdk/platform/Order/OrderPlatformModel.js +1659 -3501
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +219 -234
- package/sdk/platform/Order/OrderPlatformValidator.js +118 -146
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +106 -94
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +146 -131
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -64
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -62
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +507 -386
- package/sdk/platform/Payment/PaymentPlatformModel.js +376 -323
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +10 -10
- package/sdk/platform/Payment/PaymentPlatformValidator.js +10 -10
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +35 -45
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +38 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +13 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +12 -24
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +68 -62
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +396 -620
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +326 -501
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +11 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -36
- package/sdk/platform/Share/SharePlatformModel.js +4 -27
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +13 -76
- package/sdk/platform/Theme/ThemePlatformModel.js +17 -57
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
- package/sdk/platform/User/UserPlatformModel.js +23 -23
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
- package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -8
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
- package/sdk/public/Content/ContentPublicClient.js +19 -793
- package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
- package/sdk/public/Content/ContentPublicModel.js +3 -649
- package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
- package/sdk/public/Content/ContentPublicValidator.js +2 -88
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +14 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +13 -10
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
- package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/application/Cart/CartApplicationModel.d.ts +0 -4340
- package/sdk/application/Cart/CartApplicationModel.js +0 -2718
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -788
- package/sdk/application/Cart/CartApplicationValidator.js +0 -546
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3909
- package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2667
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
- package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
- package/sdk/application/Common/CommonApplicationModel.js +0 -308
- package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
- package/sdk/application/Common/CommonApplicationValidator.js +0 -38
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
- package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2544
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1875
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
- package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2189
- package/sdk/application/Content/ContentApplicationModel.js +0 -1640
- package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -290
- package/sdk/application/Content/ContentApplicationValidator.js +0 -269
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -270
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -188
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -36
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -202
- package/sdk/application/Finance/FinanceApplicationModel.d.ts +0 -289
- package/sdk/application/Finance/FinanceApplicationModel.js +0 -208
- package/sdk/application/Finance/FinanceApplicationValidator.d.ts +0 -25
- package/sdk/application/Finance/FinanceApplicationValidator.js +0 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
- package/sdk/application/Lead/LeadApplicationModel.js +0 -480
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -2034
- package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1391
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -299
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -224
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2612
- package/sdk/application/Order/OrderApplicationModel.js +0 -1669
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -279
- package/sdk/application/Order/OrderApplicationValidator.js +0 -210
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4062
- package/sdk/application/Payment/PaymentApplicationModel.js +0 -2632
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
- package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
- package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
- package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
- package/sdk/application/Share/ShareApplicationModel.js +0 -234
- package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
- package/sdk/application/Share/ShareApplicationValidator.js +0 -91
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1744
- package/sdk/application/Theme/ThemeApplicationModel.js +0 -1446
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -79
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -65
- package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
- package/sdk/application/User/UserApplicationModel.js +0 -1382
- package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
- package/sdk/application/User/UserApplicationValidator.js +0 -573
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -54
- package/sdk/application/Webhook/WebhookApplicationModel.js +0 -48
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
- package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
- package/sdk/common/Clickstream.d.ts +0 -1
- package/sdk/common/Clickstream.js +0 -464
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
1
|
const {
|
|
3
2
|
FDKClientValidationError,
|
|
4
3
|
FDKResponseValidationError,
|
|
5
4
|
} = require("../../common/FDKError");
|
|
5
|
+
|
|
6
|
+
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
6
7
|
const constructUrl = require("../constructUrl");
|
|
7
8
|
const Paginator = require("../../common/Paginator");
|
|
8
|
-
const
|
|
9
|
-
const LogisticApplicationModel = require("./LogisticApplicationModel");
|
|
10
|
-
const { Logger } = require("./../../common/Logger");
|
|
11
|
-
const Joi = require("joi");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
12
10
|
|
|
13
11
|
class Logistic {
|
|
14
12
|
constructor(_conf) {
|
|
@@ -18,10 +16,6 @@ class Logistic {
|
|
|
18
16
|
getCountries: "/service/application/logistics/v2.0/countries",
|
|
19
17
|
getCountry:
|
|
20
18
|
"/service/application/logistics/v1.0/countries/{country_iso_code}",
|
|
21
|
-
getCourierPartners:
|
|
22
|
-
"/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/shipment/courier-partners",
|
|
23
|
-
getDeliveryPromise:
|
|
24
|
-
"/service/application/logistics/v1.0/delivery-promise",
|
|
25
19
|
getLocalities:
|
|
26
20
|
"/service/application/logistics/v1.0/localities/{locality_type}",
|
|
27
21
|
getLocality:
|
|
@@ -52,10 +46,9 @@ class Logistic {
|
|
|
52
46
|
}
|
|
53
47
|
|
|
54
48
|
/**
|
|
55
|
-
* @param {LogisticApplicationValidator.GetAllCountriesParam} arg - Arg object.
|
|
56
49
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
57
50
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
58
|
-
* @returns {Promise<
|
|
51
|
+
* @returns {Promise<CountryListResponse>} - Success response
|
|
59
52
|
* @name getAllCountries
|
|
60
53
|
* @summary: Get deliverable countries
|
|
61
54
|
* @description: Get a list of countries within the specified delivery zones for that application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getAllCountries/).
|
|
@@ -64,28 +57,6 @@ class Logistic {
|
|
|
64
57
|
{ requestHeaders } = { requestHeaders: {} },
|
|
65
58
|
{ responseHeaders } = { responseHeaders: false }
|
|
66
59
|
) {
|
|
67
|
-
const { error } = LogisticApplicationValidator.getAllCountries().validate(
|
|
68
|
-
{},
|
|
69
|
-
{ abortEarly: false, allowUnknown: true }
|
|
70
|
-
);
|
|
71
|
-
if (error) {
|
|
72
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Showing warrnings if extra unknown parameters are found
|
|
76
|
-
const {
|
|
77
|
-
error: warrning,
|
|
78
|
-
} = LogisticApplicationValidator.getAllCountries().validate(
|
|
79
|
-
{},
|
|
80
|
-
{ abortEarly: false, allowUnknown: false }
|
|
81
|
-
);
|
|
82
|
-
if (warrning) {
|
|
83
|
-
Logger({
|
|
84
|
-
level: "WARN",
|
|
85
|
-
message: `Parameter Validation warrnings for application > Logistic > getAllCountries \n ${warrning}`,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
|
|
89
60
|
const query_params = {};
|
|
90
61
|
|
|
91
62
|
const xHeaders = {};
|
|
@@ -108,70 +79,28 @@ class Logistic {
|
|
|
108
79
|
responseData = response[0];
|
|
109
80
|
}
|
|
110
81
|
|
|
111
|
-
const {
|
|
112
|
-
error: res_error,
|
|
113
|
-
} = LogisticApplicationModel.CountryListResult().validate(responseData, {
|
|
114
|
-
abortEarly: false,
|
|
115
|
-
allowUnknown: true,
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
if (res_error) {
|
|
119
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
120
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
121
|
-
} else {
|
|
122
|
-
Logger({
|
|
123
|
-
level: "WARN",
|
|
124
|
-
message: `Response Validation Warnings for application > Logistic > getAllCountries \n ${res_error}`,
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
82
|
return response;
|
|
130
83
|
}
|
|
131
84
|
|
|
132
85
|
/**
|
|
133
|
-
* @param {LogisticApplicationValidator.GetCountriesParam} arg - Arg object.
|
|
134
86
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
135
87
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
136
|
-
* @returns {Promise<
|
|
88
|
+
* @returns {Promise<GetCountries>} - Success response
|
|
137
89
|
* @name getCountries
|
|
138
90
|
* @summary: Get countries
|
|
139
91
|
* @description: List of supported countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountries/).
|
|
140
92
|
*/
|
|
141
93
|
async getCountries(
|
|
142
|
-
{ onboarding, pageNo, pageSize, q,
|
|
94
|
+
{ onboarding, pageNo, pageSize, q, requestHeaders } = {
|
|
143
95
|
requestHeaders: {},
|
|
144
96
|
},
|
|
145
97
|
{ responseHeaders } = { responseHeaders: false }
|
|
146
98
|
) {
|
|
147
|
-
const { error } = LogisticApplicationValidator.getCountries().validate(
|
|
148
|
-
{ onboarding, pageNo, pageSize, q, hierarchy },
|
|
149
|
-
{ abortEarly: false, allowUnknown: true }
|
|
150
|
-
);
|
|
151
|
-
if (error) {
|
|
152
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// Showing warrnings if extra unknown parameters are found
|
|
156
|
-
const {
|
|
157
|
-
error: warrning,
|
|
158
|
-
} = LogisticApplicationValidator.getCountries().validate(
|
|
159
|
-
{ onboarding, pageNo, pageSize, q, hierarchy },
|
|
160
|
-
{ abortEarly: false, allowUnknown: false }
|
|
161
|
-
);
|
|
162
|
-
if (warrning) {
|
|
163
|
-
Logger({
|
|
164
|
-
level: "WARN",
|
|
165
|
-
message: `Parameter Validation warrnings for application > Logistic > getCountries \n ${warrning}`,
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
|
|
169
99
|
const query_params = {};
|
|
170
100
|
query_params["onboarding"] = onboarding;
|
|
171
101
|
query_params["page_no"] = pageNo;
|
|
172
102
|
query_params["page_size"] = pageSize;
|
|
173
103
|
query_params["q"] = q;
|
|
174
|
-
query_params["hierarchy"] = hierarchy;
|
|
175
104
|
|
|
176
105
|
const xHeaders = {};
|
|
177
106
|
|
|
@@ -193,32 +122,13 @@ class Logistic {
|
|
|
193
122
|
responseData = response[0];
|
|
194
123
|
}
|
|
195
124
|
|
|
196
|
-
const {
|
|
197
|
-
error: res_error,
|
|
198
|
-
} = LogisticApplicationModel.GetCountries().validate(responseData, {
|
|
199
|
-
abortEarly: false,
|
|
200
|
-
allowUnknown: true,
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
if (res_error) {
|
|
204
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
205
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
206
|
-
} else {
|
|
207
|
-
Logger({
|
|
208
|
-
level: "WARN",
|
|
209
|
-
message: `Response Validation Warnings for application > Logistic > getCountries \n ${res_error}`,
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
125
|
return response;
|
|
215
126
|
}
|
|
216
127
|
|
|
217
128
|
/**
|
|
218
|
-
* @param {LogisticApplicationValidator.GetCountryParam} arg - Arg object.
|
|
219
129
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
220
130
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
221
|
-
* @returns {Promise<
|
|
131
|
+
* @returns {Promise<GetCountry>} - Success response
|
|
222
132
|
* @name getCountry
|
|
223
133
|
* @summary: Get country details
|
|
224
134
|
* @description: Get details about a particular country and its address format customized for different business scenarios. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountry/).
|
|
@@ -227,26 +137,13 @@ class Logistic {
|
|
|
227
137
|
{ countryIsoCode, requestHeaders } = { requestHeaders: {} },
|
|
228
138
|
{ responseHeaders } = { responseHeaders: false }
|
|
229
139
|
) {
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// Showing warrnings if extra unknown parameters are found
|
|
239
|
-
const {
|
|
240
|
-
error: warrning,
|
|
241
|
-
} = LogisticApplicationValidator.getCountry().validate(
|
|
242
|
-
{ countryIsoCode },
|
|
243
|
-
{ abortEarly: false, allowUnknown: false }
|
|
244
|
-
);
|
|
245
|
-
if (warrning) {
|
|
246
|
-
Logger({
|
|
247
|
-
level: "WARN",
|
|
248
|
-
message: `Parameter Validation warrnings for application > Logistic > getCountry \n ${warrning}`,
|
|
140
|
+
const errors = validateRequiredParams(arguments[0], ["countryIsoCode"]);
|
|
141
|
+
if (errors.length > 0) {
|
|
142
|
+
const error = new FDKClientValidationError({
|
|
143
|
+
message: "Missing required field",
|
|
144
|
+
details: errors,
|
|
249
145
|
});
|
|
146
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
250
147
|
}
|
|
251
148
|
|
|
252
149
|
const query_params = {};
|
|
@@ -271,196 +168,13 @@ class Logistic {
|
|
|
271
168
|
responseData = response[0];
|
|
272
169
|
}
|
|
273
170
|
|
|
274
|
-
const {
|
|
275
|
-
error: res_error,
|
|
276
|
-
} = LogisticApplicationModel.GetCountry().validate(responseData, {
|
|
277
|
-
abortEarly: false,
|
|
278
|
-
allowUnknown: true,
|
|
279
|
-
});
|
|
280
|
-
|
|
281
|
-
if (res_error) {
|
|
282
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
283
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
284
|
-
} else {
|
|
285
|
-
Logger({
|
|
286
|
-
level: "WARN",
|
|
287
|
-
message: `Response Validation Warnings for application > Logistic > getCountry \n ${res_error}`,
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
return response;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* @param {LogisticApplicationValidator.GetCourierPartnersParam} arg - Arg object.
|
|
297
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
298
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
299
|
-
* @returns {Promise<LogisticApplicationModel.ShipmentCourierPartnerResult>}
|
|
300
|
-
* - Success response
|
|
301
|
-
*
|
|
302
|
-
* @name getCourierPartners
|
|
303
|
-
* @summary: Serviceable Courier Partners.
|
|
304
|
-
* @description: Get all the serviceable courier partners of a destination and the shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCourierPartners/).
|
|
305
|
-
*/
|
|
306
|
-
async getCourierPartners(
|
|
307
|
-
{ companyId, applicationId, body, requestHeaders } = { requestHeaders: {} },
|
|
308
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
309
|
-
) {
|
|
310
|
-
const {
|
|
311
|
-
error,
|
|
312
|
-
} = LogisticApplicationValidator.getCourierPartners().validate(
|
|
313
|
-
{ companyId, applicationId, body },
|
|
314
|
-
{ abortEarly: false, allowUnknown: true }
|
|
315
|
-
);
|
|
316
|
-
if (error) {
|
|
317
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
// Showing warrnings if extra unknown parameters are found
|
|
321
|
-
const {
|
|
322
|
-
error: warrning,
|
|
323
|
-
} = LogisticApplicationValidator.getCourierPartners().validate(
|
|
324
|
-
{ companyId, applicationId, body },
|
|
325
|
-
{ abortEarly: false, allowUnknown: false }
|
|
326
|
-
);
|
|
327
|
-
if (warrning) {
|
|
328
|
-
Logger({
|
|
329
|
-
level: "WARN",
|
|
330
|
-
message: `Parameter Validation warrnings for application > Logistic > getCourierPartners \n ${warrning}`,
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
const query_params = {};
|
|
335
|
-
|
|
336
|
-
const xHeaders = {};
|
|
337
|
-
|
|
338
|
-
const response = await ApplicationAPIClient.execute(
|
|
339
|
-
this._conf,
|
|
340
|
-
"post",
|
|
341
|
-
constructUrl({
|
|
342
|
-
url: this._urls["getCourierPartners"],
|
|
343
|
-
params: { companyId, applicationId },
|
|
344
|
-
}),
|
|
345
|
-
query_params,
|
|
346
|
-
body,
|
|
347
|
-
{ ...xHeaders, ...requestHeaders },
|
|
348
|
-
{ responseHeaders }
|
|
349
|
-
);
|
|
350
|
-
|
|
351
|
-
let responseData = response;
|
|
352
|
-
if (responseHeaders) {
|
|
353
|
-
responseData = response[0];
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
const {
|
|
357
|
-
error: res_error,
|
|
358
|
-
} = LogisticApplicationModel.ShipmentCourierPartnerResult().validate(
|
|
359
|
-
responseData,
|
|
360
|
-
{ abortEarly: false, allowUnknown: true }
|
|
361
|
-
);
|
|
362
|
-
|
|
363
|
-
if (res_error) {
|
|
364
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
365
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
366
|
-
} else {
|
|
367
|
-
Logger({
|
|
368
|
-
level: "WARN",
|
|
369
|
-
message: `Response Validation Warnings for application > Logistic > getCourierPartners \n ${res_error}`,
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
return response;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* @param {LogisticApplicationValidator.GetDeliveryPromiseParam} arg - Arg object.
|
|
379
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
380
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
381
|
-
* @returns {Promise<LogisticApplicationModel.GetPromiseDetails>} - Success response
|
|
382
|
-
* @name getDeliveryPromise
|
|
383
|
-
* @summary: Get delivery promise
|
|
384
|
-
* @description: Get delivery promises for both global and store levels based on a specific locality type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getDeliveryPromise/).
|
|
385
|
-
*/
|
|
386
|
-
async getDeliveryPromise(
|
|
387
|
-
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
388
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
389
|
-
) {
|
|
390
|
-
const {
|
|
391
|
-
error,
|
|
392
|
-
} = LogisticApplicationValidator.getDeliveryPromise().validate(
|
|
393
|
-
{ pageNo, pageSize },
|
|
394
|
-
{ abortEarly: false, allowUnknown: true }
|
|
395
|
-
);
|
|
396
|
-
if (error) {
|
|
397
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
// Showing warrnings if extra unknown parameters are found
|
|
401
|
-
const {
|
|
402
|
-
error: warrning,
|
|
403
|
-
} = LogisticApplicationValidator.getDeliveryPromise().validate(
|
|
404
|
-
{ pageNo, pageSize },
|
|
405
|
-
{ abortEarly: false, allowUnknown: false }
|
|
406
|
-
);
|
|
407
|
-
if (warrning) {
|
|
408
|
-
Logger({
|
|
409
|
-
level: "WARN",
|
|
410
|
-
message: `Parameter Validation warrnings for application > Logistic > getDeliveryPromise \n ${warrning}`,
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
const query_params = {};
|
|
415
|
-
query_params["page_no"] = pageNo;
|
|
416
|
-
query_params["page_size"] = pageSize;
|
|
417
|
-
|
|
418
|
-
const xHeaders = {};
|
|
419
|
-
|
|
420
|
-
const response = await ApplicationAPIClient.execute(
|
|
421
|
-
this._conf,
|
|
422
|
-
"get",
|
|
423
|
-
constructUrl({
|
|
424
|
-
url: this._urls["getDeliveryPromise"],
|
|
425
|
-
params: {},
|
|
426
|
-
}),
|
|
427
|
-
query_params,
|
|
428
|
-
undefined,
|
|
429
|
-
{ ...xHeaders, ...requestHeaders },
|
|
430
|
-
{ responseHeaders }
|
|
431
|
-
);
|
|
432
|
-
|
|
433
|
-
let responseData = response;
|
|
434
|
-
if (responseHeaders) {
|
|
435
|
-
responseData = response[0];
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
const {
|
|
439
|
-
error: res_error,
|
|
440
|
-
} = LogisticApplicationModel.GetPromiseDetails().validate(responseData, {
|
|
441
|
-
abortEarly: false,
|
|
442
|
-
allowUnknown: true,
|
|
443
|
-
});
|
|
444
|
-
|
|
445
|
-
if (res_error) {
|
|
446
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
447
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
448
|
-
} else {
|
|
449
|
-
Logger({
|
|
450
|
-
level: "WARN",
|
|
451
|
-
message: `Response Validation Warnings for application > Logistic > getDeliveryPromise \n ${res_error}`,
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
|
|
456
171
|
return response;
|
|
457
172
|
}
|
|
458
173
|
|
|
459
174
|
/**
|
|
460
|
-
* @param {LogisticApplicationValidator.GetLocalitiesParam} arg - Arg object.
|
|
461
175
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
462
176
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
463
|
-
* @returns {Promise<
|
|
177
|
+
* @returns {Promise<GetLocalities>} - Success response
|
|
464
178
|
* @name getLocalities
|
|
465
179
|
* @summary: Get localities
|
|
466
180
|
* @description: Get geographical data for a specific type of locality based on the provided filters. For instance, obtain a list of cities for a given country and state. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalities/).
|
|
@@ -478,26 +192,13 @@ class Logistic {
|
|
|
478
192
|
} = { requestHeaders: {} },
|
|
479
193
|
{ responseHeaders } = { responseHeaders: false }
|
|
480
194
|
) {
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
// Showing warrnings if extra unknown parameters are found
|
|
490
|
-
const {
|
|
491
|
-
error: warrning,
|
|
492
|
-
} = LogisticApplicationValidator.getLocalities().validate(
|
|
493
|
-
{ localityType, country, state, city, pageNo, pageSize, q },
|
|
494
|
-
{ abortEarly: false, allowUnknown: false }
|
|
495
|
-
);
|
|
496
|
-
if (warrning) {
|
|
497
|
-
Logger({
|
|
498
|
-
level: "WARN",
|
|
499
|
-
message: `Parameter Validation warrnings for application > Logistic > getLocalities \n ${warrning}`,
|
|
195
|
+
const errors = validateRequiredParams(arguments[0], ["localityType"]);
|
|
196
|
+
if (errors.length > 0) {
|
|
197
|
+
const error = new FDKClientValidationError({
|
|
198
|
+
message: "Missing required field",
|
|
199
|
+
details: errors,
|
|
500
200
|
});
|
|
201
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
501
202
|
}
|
|
502
203
|
|
|
503
204
|
const query_params = {};
|
|
@@ -528,32 +229,13 @@ class Logistic {
|
|
|
528
229
|
responseData = response[0];
|
|
529
230
|
}
|
|
530
231
|
|
|
531
|
-
const {
|
|
532
|
-
error: res_error,
|
|
533
|
-
} = LogisticApplicationModel.GetLocalities().validate(responseData, {
|
|
534
|
-
abortEarly: false,
|
|
535
|
-
allowUnknown: true,
|
|
536
|
-
});
|
|
537
|
-
|
|
538
|
-
if (res_error) {
|
|
539
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
540
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
541
|
-
} else {
|
|
542
|
-
Logger({
|
|
543
|
-
level: "WARN",
|
|
544
|
-
message: `Response Validation Warnings for application > Logistic > getLocalities \n ${res_error}`,
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
|
|
549
232
|
return response;
|
|
550
233
|
}
|
|
551
234
|
|
|
552
235
|
/**
|
|
553
|
-
* @param {LogisticApplicationValidator.GetLocalityParam} arg - Arg object.
|
|
554
236
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
555
237
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
556
|
-
* @returns {Promise<
|
|
238
|
+
* @returns {Promise<GetLocality>} - Success response
|
|
557
239
|
* @name getLocality
|
|
558
240
|
* @summary: Get locality detail
|
|
559
241
|
* @description: Get detailed geographical data for a specific locality, such as a pincode. For example, for a pincode value of 400603, the service returns its parent locations, including city, state, and country details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocality/).
|
|
@@ -564,26 +246,16 @@ class Logistic {
|
|
|
564
246
|
},
|
|
565
247
|
{ responseHeaders } = { responseHeaders: false }
|
|
566
248
|
) {
|
|
567
|
-
const
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
);
|
|
571
|
-
if (
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
// Showing warrnings if extra unknown parameters are found
|
|
576
|
-
const {
|
|
577
|
-
error: warrning,
|
|
578
|
-
} = LogisticApplicationValidator.getLocality().validate(
|
|
579
|
-
{ localityType, localityValue, country, state, city },
|
|
580
|
-
{ abortEarly: false, allowUnknown: false }
|
|
581
|
-
);
|
|
582
|
-
if (warrning) {
|
|
583
|
-
Logger({
|
|
584
|
-
level: "WARN",
|
|
585
|
-
message: `Parameter Validation warrnings for application > Logistic > getLocality \n ${warrning}`,
|
|
249
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
250
|
+
"localityType",
|
|
251
|
+
"localityValue",
|
|
252
|
+
]);
|
|
253
|
+
if (errors.length > 0) {
|
|
254
|
+
const error = new FDKClientValidationError({
|
|
255
|
+
message: "Missing required field",
|
|
256
|
+
details: errors,
|
|
586
257
|
});
|
|
258
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
587
259
|
}
|
|
588
260
|
|
|
589
261
|
const query_params = {};
|
|
@@ -611,32 +283,13 @@ class Logistic {
|
|
|
611
283
|
responseData = response[0];
|
|
612
284
|
}
|
|
613
285
|
|
|
614
|
-
const {
|
|
615
|
-
error: res_error,
|
|
616
|
-
} = LogisticApplicationModel.GetLocality().validate(responseData, {
|
|
617
|
-
abortEarly: false,
|
|
618
|
-
allowUnknown: true,
|
|
619
|
-
});
|
|
620
|
-
|
|
621
|
-
if (res_error) {
|
|
622
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
623
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
624
|
-
} else {
|
|
625
|
-
Logger({
|
|
626
|
-
level: "WARN",
|
|
627
|
-
message: `Response Validation Warnings for application > Logistic > getLocality \n ${res_error}`,
|
|
628
|
-
});
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
|
|
632
286
|
return response;
|
|
633
287
|
}
|
|
634
288
|
|
|
635
289
|
/**
|
|
636
|
-
* @param {LogisticApplicationValidator.GetLocationsParam} arg - Arg object.
|
|
637
290
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
638
291
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
639
|
-
* @returns {Promise<
|
|
292
|
+
* @returns {Promise<GetStoreResponse>} - Success response
|
|
640
293
|
* @name getLocations
|
|
641
294
|
* @summary: Get available selling locations
|
|
642
295
|
* @description: Get stores available for the application based on Delivery Zones and Order Orchestration rules. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocations/).
|
|
@@ -656,48 +309,6 @@ class Logistic {
|
|
|
656
309
|
} = { requestHeaders: {} },
|
|
657
310
|
{ responseHeaders } = { responseHeaders: false }
|
|
658
311
|
) {
|
|
659
|
-
const { error } = LogisticApplicationValidator.getLocations().validate(
|
|
660
|
-
{
|
|
661
|
-
xApplicationId,
|
|
662
|
-
xApplicationData,
|
|
663
|
-
country,
|
|
664
|
-
state,
|
|
665
|
-
city,
|
|
666
|
-
pincode,
|
|
667
|
-
sector,
|
|
668
|
-
pageNo,
|
|
669
|
-
pageSize,
|
|
670
|
-
},
|
|
671
|
-
{ abortEarly: false, allowUnknown: true }
|
|
672
|
-
);
|
|
673
|
-
if (error) {
|
|
674
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
// Showing warrnings if extra unknown parameters are found
|
|
678
|
-
const {
|
|
679
|
-
error: warrning,
|
|
680
|
-
} = LogisticApplicationValidator.getLocations().validate(
|
|
681
|
-
{
|
|
682
|
-
xApplicationId,
|
|
683
|
-
xApplicationData,
|
|
684
|
-
country,
|
|
685
|
-
state,
|
|
686
|
-
city,
|
|
687
|
-
pincode,
|
|
688
|
-
sector,
|
|
689
|
-
pageNo,
|
|
690
|
-
pageSize,
|
|
691
|
-
},
|
|
692
|
-
{ abortEarly: false, allowUnknown: false }
|
|
693
|
-
);
|
|
694
|
-
if (warrning) {
|
|
695
|
-
Logger({
|
|
696
|
-
level: "WARN",
|
|
697
|
-
message: `Parameter Validation warrnings for application > Logistic > getLocations \n ${warrning}`,
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
|
|
701
312
|
const query_params = {};
|
|
702
313
|
query_params["x-application-id"] = xApplicationId;
|
|
703
314
|
query_params["x-application-data"] = xApplicationData;
|
|
@@ -729,32 +340,13 @@ class Logistic {
|
|
|
729
340
|
responseData = response[0];
|
|
730
341
|
}
|
|
731
342
|
|
|
732
|
-
const {
|
|
733
|
-
error: res_error,
|
|
734
|
-
} = LogisticApplicationModel.GetStoreResult().validate(responseData, {
|
|
735
|
-
abortEarly: false,
|
|
736
|
-
allowUnknown: true,
|
|
737
|
-
});
|
|
738
|
-
|
|
739
|
-
if (res_error) {
|
|
740
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
741
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
742
|
-
} else {
|
|
743
|
-
Logger({
|
|
744
|
-
level: "WARN",
|
|
745
|
-
message: `Response Validation Warnings for application > Logistic > getLocations \n ${res_error}`,
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
|
|
750
343
|
return response;
|
|
751
344
|
}
|
|
752
345
|
|
|
753
346
|
/**
|
|
754
|
-
* @param {LogisticApplicationValidator.GetOptimalLocationsParam} arg - Arg object.
|
|
755
347
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
756
348
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
757
|
-
* @returns {Promise<
|
|
349
|
+
* @returns {Promise<ReAssignStoreResponse>} - Success response
|
|
758
350
|
* @name getOptimalLocations
|
|
759
351
|
* @summary: Get selling locations
|
|
760
352
|
* @description: Get optimal fulfillment centre for customers by analyzing their location, product availability, and inventory levels. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getOptimalLocations/).
|
|
@@ -763,30 +355,6 @@ class Logistic {
|
|
|
763
355
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
764
356
|
{ responseHeaders } = { responseHeaders: false }
|
|
765
357
|
) {
|
|
766
|
-
const {
|
|
767
|
-
error,
|
|
768
|
-
} = LogisticApplicationValidator.getOptimalLocations().validate(
|
|
769
|
-
{ body },
|
|
770
|
-
{ abortEarly: false, allowUnknown: true }
|
|
771
|
-
);
|
|
772
|
-
if (error) {
|
|
773
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
// Showing warrnings if extra unknown parameters are found
|
|
777
|
-
const {
|
|
778
|
-
error: warrning,
|
|
779
|
-
} = LogisticApplicationValidator.getOptimalLocations().validate(
|
|
780
|
-
{ body },
|
|
781
|
-
{ abortEarly: false, allowUnknown: false }
|
|
782
|
-
);
|
|
783
|
-
if (warrning) {
|
|
784
|
-
Logger({
|
|
785
|
-
level: "WARN",
|
|
786
|
-
message: `Parameter Validation warrnings for application > Logistic > getOptimalLocations \n ${warrning}`,
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
|
|
790
358
|
const query_params = {};
|
|
791
359
|
|
|
792
360
|
const xHeaders = {};
|
|
@@ -809,32 +377,13 @@ class Logistic {
|
|
|
809
377
|
responseData = response[0];
|
|
810
378
|
}
|
|
811
379
|
|
|
812
|
-
const {
|
|
813
|
-
error: res_error,
|
|
814
|
-
} = LogisticApplicationModel.ReAssignStoreResult().validate(responseData, {
|
|
815
|
-
abortEarly: false,
|
|
816
|
-
allowUnknown: true,
|
|
817
|
-
});
|
|
818
|
-
|
|
819
|
-
if (res_error) {
|
|
820
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
821
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
822
|
-
} else {
|
|
823
|
-
Logger({
|
|
824
|
-
level: "WARN",
|
|
825
|
-
message: `Response Validation Warnings for application > Logistic > getOptimalLocations \n ${res_error}`,
|
|
826
|
-
});
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
|
|
830
380
|
return response;
|
|
831
381
|
}
|
|
832
382
|
|
|
833
383
|
/**
|
|
834
|
-
* @param {LogisticApplicationValidator.GetPincodeCityParam} arg - Arg object.
|
|
835
384
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
836
385
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
837
|
-
* @returns {Promise<
|
|
386
|
+
* @returns {Promise<PincodeApiResponse>} - Success response
|
|
838
387
|
* @name getPincodeCity
|
|
839
388
|
* @summary: Get pincode details
|
|
840
389
|
* @description: Get details of a specific pincode, such as obtaining its city and state information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getPincodeCity/).
|
|
@@ -843,26 +392,13 @@ class Logistic {
|
|
|
843
392
|
{ pincode, requestHeaders } = { requestHeaders: {} },
|
|
844
393
|
{ responseHeaders } = { responseHeaders: false }
|
|
845
394
|
) {
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
// Showing warrnings if extra unknown parameters are found
|
|
855
|
-
const {
|
|
856
|
-
error: warrning,
|
|
857
|
-
} = LogisticApplicationValidator.getPincodeCity().validate(
|
|
858
|
-
{ pincode },
|
|
859
|
-
{ abortEarly: false, allowUnknown: false }
|
|
860
|
-
);
|
|
861
|
-
if (warrning) {
|
|
862
|
-
Logger({
|
|
863
|
-
level: "WARN",
|
|
864
|
-
message: `Parameter Validation warrnings for application > Logistic > getPincodeCity \n ${warrning}`,
|
|
395
|
+
const errors = validateRequiredParams(arguments[0], ["pincode"]);
|
|
396
|
+
if (errors.length > 0) {
|
|
397
|
+
const error = new FDKClientValidationError({
|
|
398
|
+
message: "Missing required field",
|
|
399
|
+
details: errors,
|
|
865
400
|
});
|
|
401
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
866
402
|
}
|
|
867
403
|
|
|
868
404
|
const query_params = {};
|
|
@@ -887,34 +423,13 @@ class Logistic {
|
|
|
887
423
|
responseData = response[0];
|
|
888
424
|
}
|
|
889
425
|
|
|
890
|
-
const {
|
|
891
|
-
error: res_error,
|
|
892
|
-
} = LogisticApplicationModel.PincodeDetails().validate(responseData, {
|
|
893
|
-
abortEarly: false,
|
|
894
|
-
allowUnknown: true,
|
|
895
|
-
});
|
|
896
|
-
|
|
897
|
-
if (res_error) {
|
|
898
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
899
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
900
|
-
} else {
|
|
901
|
-
Logger({
|
|
902
|
-
level: "WARN",
|
|
903
|
-
message: `Response Validation Warnings for application > Logistic > getPincodeCity \n ${res_error}`,
|
|
904
|
-
});
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
|
|
908
426
|
return response;
|
|
909
427
|
}
|
|
910
428
|
|
|
911
429
|
/**
|
|
912
|
-
* @param {LogisticApplicationValidator.GetPincodeZonesParam} arg - Arg object.
|
|
913
430
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
914
431
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
915
|
-
* @returns {Promise<
|
|
916
|
-
* - Success response
|
|
917
|
-
*
|
|
432
|
+
* @returns {Promise<GetZoneFromPincodeViewResponse>} - Success response
|
|
918
433
|
* @name getPincodeZones
|
|
919
434
|
* @summary: Get zones
|
|
920
435
|
* @description: Get the delivery zone associated with a given pincode. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getPincodeZones/).
|
|
@@ -923,28 +438,6 @@ class Logistic {
|
|
|
923
438
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
924
439
|
{ responseHeaders } = { responseHeaders: false }
|
|
925
440
|
) {
|
|
926
|
-
const { error } = LogisticApplicationValidator.getPincodeZones().validate(
|
|
927
|
-
{ body },
|
|
928
|
-
{ abortEarly: false, allowUnknown: true }
|
|
929
|
-
);
|
|
930
|
-
if (error) {
|
|
931
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
// Showing warrnings if extra unknown parameters are found
|
|
935
|
-
const {
|
|
936
|
-
error: warrning,
|
|
937
|
-
} = LogisticApplicationValidator.getPincodeZones().validate(
|
|
938
|
-
{ body },
|
|
939
|
-
{ abortEarly: false, allowUnknown: false }
|
|
940
|
-
);
|
|
941
|
-
if (warrning) {
|
|
942
|
-
Logger({
|
|
943
|
-
level: "WARN",
|
|
944
|
-
message: `Parameter Validation warrnings for application > Logistic > getPincodeZones \n ${warrning}`,
|
|
945
|
-
});
|
|
946
|
-
}
|
|
947
|
-
|
|
948
441
|
const query_params = {};
|
|
949
442
|
|
|
950
443
|
const xHeaders = {};
|
|
@@ -967,32 +460,13 @@ class Logistic {
|
|
|
967
460
|
responseData = response[0];
|
|
968
461
|
}
|
|
969
462
|
|
|
970
|
-
const {
|
|
971
|
-
error: res_error,
|
|
972
|
-
} = LogisticApplicationModel.GetZoneFromPincodeViewResult().validate(
|
|
973
|
-
responseData,
|
|
974
|
-
{ abortEarly: false, allowUnknown: true }
|
|
975
|
-
);
|
|
976
|
-
|
|
977
|
-
if (res_error) {
|
|
978
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
979
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
980
|
-
} else {
|
|
981
|
-
Logger({
|
|
982
|
-
level: "WARN",
|
|
983
|
-
message: `Response Validation Warnings for application > Logistic > getPincodeZones \n ${res_error}`,
|
|
984
|
-
});
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
|
|
988
463
|
return response;
|
|
989
464
|
}
|
|
990
465
|
|
|
991
466
|
/**
|
|
992
|
-
* @param {LogisticApplicationValidator.GetTatProductParam} arg - Arg object.
|
|
993
467
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
994
468
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
995
|
-
* @returns {Promise<
|
|
469
|
+
* @returns {Promise<TATViewResponse>} - Success response
|
|
996
470
|
* @name getTatProduct
|
|
997
471
|
* @summary: Get product's turnaround time
|
|
998
472
|
* @description: Get the estimated delivery time frame for a specific product from a designated store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getTatProduct/).
|
|
@@ -1001,28 +475,6 @@ class Logistic {
|
|
|
1001
475
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1002
476
|
{ responseHeaders } = { responseHeaders: false }
|
|
1003
477
|
) {
|
|
1004
|
-
const { error } = LogisticApplicationValidator.getTatProduct().validate(
|
|
1005
|
-
{ body },
|
|
1006
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1007
|
-
);
|
|
1008
|
-
if (error) {
|
|
1009
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1013
|
-
const {
|
|
1014
|
-
error: warrning,
|
|
1015
|
-
} = LogisticApplicationValidator.getTatProduct().validate(
|
|
1016
|
-
{ body },
|
|
1017
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1018
|
-
);
|
|
1019
|
-
if (warrning) {
|
|
1020
|
-
Logger({
|
|
1021
|
-
level: "WARN",
|
|
1022
|
-
message: `Parameter Validation warrnings for application > Logistic > getTatProduct \n ${warrning}`,
|
|
1023
|
-
});
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
478
|
const query_params = {};
|
|
1027
479
|
|
|
1028
480
|
const xHeaders = {};
|
|
@@ -1045,33 +497,13 @@ class Logistic {
|
|
|
1045
497
|
responseData = response[0];
|
|
1046
498
|
}
|
|
1047
499
|
|
|
1048
|
-
const {
|
|
1049
|
-
error: res_error,
|
|
1050
|
-
} = LogisticApplicationModel.TATViewResult().validate(responseData, {
|
|
1051
|
-
abortEarly: false,
|
|
1052
|
-
allowUnknown: true,
|
|
1053
|
-
});
|
|
1054
|
-
|
|
1055
|
-
if (res_error) {
|
|
1056
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1057
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1058
|
-
} else {
|
|
1059
|
-
Logger({
|
|
1060
|
-
level: "WARN",
|
|
1061
|
-
message: `Response Validation Warnings for application > Logistic > getTatProduct \n ${res_error}`,
|
|
1062
|
-
});
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
500
|
return response;
|
|
1067
501
|
}
|
|
1068
502
|
|
|
1069
503
|
/**
|
|
1070
|
-
* @param {LogisticApplicationValidator.ValidateAddressParam} arg - Arg object.
|
|
1071
504
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1072
505
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1073
|
-
* @returns {Promise<
|
|
1074
|
-
* Success response
|
|
506
|
+
* @returns {Promise<ValidateAddressRequest>} - Success response
|
|
1075
507
|
* @name validateAddress
|
|
1076
508
|
* @summary: Validate address
|
|
1077
509
|
* @description: Validate addresses using specific templates customized for each country and tailored to various business scenarios. This validation ensures that the data conforms to the information currently stored in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/validateAddress/).
|
|
@@ -1082,26 +514,16 @@ class Logistic {
|
|
|
1082
514
|
},
|
|
1083
515
|
{ responseHeaders } = { responseHeaders: false }
|
|
1084
516
|
) {
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
);
|
|
1089
|
-
if (
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1094
|
-
const {
|
|
1095
|
-
error: warrning,
|
|
1096
|
-
} = LogisticApplicationValidator.validateAddress().validate(
|
|
1097
|
-
{ countryIsoCode, templateName, body },
|
|
1098
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1099
|
-
);
|
|
1100
|
-
if (warrning) {
|
|
1101
|
-
Logger({
|
|
1102
|
-
level: "WARN",
|
|
1103
|
-
message: `Parameter Validation warrnings for application > Logistic > validateAddress \n ${warrning}`,
|
|
517
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
518
|
+
"countryIsoCode",
|
|
519
|
+
"templateName",
|
|
520
|
+
]);
|
|
521
|
+
if (errors.length > 0) {
|
|
522
|
+
const error = new FDKClientValidationError({
|
|
523
|
+
message: "Missing required field",
|
|
524
|
+
details: errors,
|
|
1104
525
|
});
|
|
526
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1105
527
|
}
|
|
1106
528
|
|
|
1107
529
|
const query_params = {};
|
|
@@ -1126,24 +548,6 @@ class Logistic {
|
|
|
1126
548
|
responseData = response[0];
|
|
1127
549
|
}
|
|
1128
550
|
|
|
1129
|
-
const {
|
|
1130
|
-
error: res_error,
|
|
1131
|
-
} = LogisticApplicationModel.ValidateAddressDetails().validate(
|
|
1132
|
-
responseData,
|
|
1133
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1134
|
-
);
|
|
1135
|
-
|
|
1136
|
-
if (res_error) {
|
|
1137
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1138
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1139
|
-
} else {
|
|
1140
|
-
Logger({
|
|
1141
|
-
level: "WARN",
|
|
1142
|
-
message: `Response Validation Warnings for application > Logistic > validateAddress \n ${res_error}`,
|
|
1143
|
-
});
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
551
|
return response;
|
|
1148
552
|
}
|
|
1149
553
|
}
|