@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 OrderApplicationModel = require("./OrderApplicationModel");
|
|
10
|
-
const { Logger } = require("./../../common/Logger");
|
|
11
|
-
const Joi = require("joi");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
12
10
|
|
|
13
11
|
class Order {
|
|
14
12
|
constructor(_conf) {
|
|
@@ -20,8 +18,6 @@ class Order {
|
|
|
20
18
|
"/service/application/order/v1.0/orders/shipments/{shipment_id}/invoice",
|
|
21
19
|
getOrderById: "/service/application/order/v1.0/orders/{order_id}",
|
|
22
20
|
getOrders: "/service/application/order/v1.0/orders",
|
|
23
|
-
getPosOrderById:
|
|
24
|
-
"/service/application/order/v1.0/orders/pos-order/{order_id}",
|
|
25
21
|
getShipmentBagReasons:
|
|
26
22
|
"/service/application/order/v1.0/orders/shipments/{shipment_id}/bags/{bag_id}/reasons",
|
|
27
23
|
getShipmentById:
|
|
@@ -54,14 +50,9 @@ class Order {
|
|
|
54
50
|
}
|
|
55
51
|
|
|
56
52
|
/**
|
|
57
|
-
* @param {OrderApplicationValidator.GetCustomerDetailsByShipmentIdParam} arg
|
|
58
|
-
* - Arg object.
|
|
59
|
-
*
|
|
60
53
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
61
54
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
62
|
-
* @returns {Promise<
|
|
63
|
-
* - Success response
|
|
64
|
-
*
|
|
55
|
+
* @returns {Promise<CustomerDetailsResponse>} - Success response
|
|
65
56
|
* @name getCustomerDetailsByShipmentId
|
|
66
57
|
* @summary: Get shipment's customer
|
|
67
58
|
* @description: Get customer details such as mobile number using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getCustomerDetailsByShipmentId/).
|
|
@@ -70,28 +61,16 @@ class Order {
|
|
|
70
61
|
{ orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
71
62
|
{ responseHeaders } = { responseHeaders: false }
|
|
72
63
|
) {
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// Showing warrnings if extra unknown parameters are found
|
|
84
|
-
const {
|
|
85
|
-
error: warrning,
|
|
86
|
-
} = OrderApplicationValidator.getCustomerDetailsByShipmentId().validate(
|
|
87
|
-
{ orderId, shipmentId },
|
|
88
|
-
{ abortEarly: false, allowUnknown: false }
|
|
89
|
-
);
|
|
90
|
-
if (warrning) {
|
|
91
|
-
Logger({
|
|
92
|
-
level: "WARN",
|
|
93
|
-
message: `Parameter Validation warrnings for application > Order > getCustomerDetailsByShipmentId \n ${warrning}`,
|
|
64
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
65
|
+
"orderId",
|
|
66
|
+
"shipmentId",
|
|
67
|
+
]);
|
|
68
|
+
if (errors.length > 0) {
|
|
69
|
+
const error = new FDKClientValidationError({
|
|
70
|
+
message: "Missing required field",
|
|
71
|
+
details: errors,
|
|
94
72
|
});
|
|
73
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
95
74
|
}
|
|
96
75
|
|
|
97
76
|
const query_params = {};
|
|
@@ -116,33 +95,13 @@ class Order {
|
|
|
116
95
|
responseData = response[0];
|
|
117
96
|
}
|
|
118
97
|
|
|
119
|
-
const {
|
|
120
|
-
error: res_error,
|
|
121
|
-
} = OrderApplicationModel.CustomerDetailsResponseSchema().validate(
|
|
122
|
-
responseData,
|
|
123
|
-
{ abortEarly: false, allowUnknown: true }
|
|
124
|
-
);
|
|
125
|
-
|
|
126
|
-
if (res_error) {
|
|
127
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
128
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
129
|
-
} else {
|
|
130
|
-
Logger({
|
|
131
|
-
level: "WARN",
|
|
132
|
-
message: `Response Validation Warnings for application > Order > getCustomerDetailsByShipmentId \n ${res_error}`,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
98
|
return response;
|
|
138
99
|
}
|
|
139
100
|
|
|
140
101
|
/**
|
|
141
|
-
* @param {OrderApplicationValidator.GetInvoiceByShipmentIdParam} arg - Arg object.
|
|
142
102
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
143
103
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
144
|
-
* @returns {Promise<
|
|
145
|
-
* Success response
|
|
104
|
+
* @returns {Promise<ResponseGetInvoiceShipment>} - Success response
|
|
146
105
|
* @name getInvoiceByShipmentId
|
|
147
106
|
* @summary: Retrieves invoice for shipment
|
|
148
107
|
* @description: Get invoice corresponding to a specific shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getInvoiceByShipmentId/).
|
|
@@ -151,28 +110,13 @@ class Order {
|
|
|
151
110
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
152
111
|
{ responseHeaders } = { responseHeaders: false }
|
|
153
112
|
) {
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
);
|
|
160
|
-
if (error) {
|
|
161
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// Showing warrnings if extra unknown parameters are found
|
|
165
|
-
const {
|
|
166
|
-
error: warrning,
|
|
167
|
-
} = OrderApplicationValidator.getInvoiceByShipmentId().validate(
|
|
168
|
-
{ shipmentId },
|
|
169
|
-
{ abortEarly: false, allowUnknown: false }
|
|
170
|
-
);
|
|
171
|
-
if (warrning) {
|
|
172
|
-
Logger({
|
|
173
|
-
level: "WARN",
|
|
174
|
-
message: `Parameter Validation warrnings for application > Order > getInvoiceByShipmentId \n ${warrning}`,
|
|
113
|
+
const errors = validateRequiredParams(arguments[0], ["shipmentId"]);
|
|
114
|
+
if (errors.length > 0) {
|
|
115
|
+
const error = new FDKClientValidationError({
|
|
116
|
+
message: "Missing required field",
|
|
117
|
+
details: errors,
|
|
175
118
|
});
|
|
119
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
176
120
|
}
|
|
177
121
|
|
|
178
122
|
const query_params = {};
|
|
@@ -197,32 +141,13 @@ class Order {
|
|
|
197
141
|
responseData = response[0];
|
|
198
142
|
}
|
|
199
143
|
|
|
200
|
-
const {
|
|
201
|
-
error: res_error,
|
|
202
|
-
} = OrderApplicationModel.ResponseGetInvoiceShipment().validate(
|
|
203
|
-
responseData,
|
|
204
|
-
{ abortEarly: false, allowUnknown: true }
|
|
205
|
-
);
|
|
206
|
-
|
|
207
|
-
if (res_error) {
|
|
208
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
209
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
210
|
-
} else {
|
|
211
|
-
Logger({
|
|
212
|
-
level: "WARN",
|
|
213
|
-
message: `Response Validation Warnings for application > Order > getInvoiceByShipmentId \n ${res_error}`,
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
144
|
return response;
|
|
219
145
|
}
|
|
220
146
|
|
|
221
147
|
/**
|
|
222
|
-
* @param {OrderApplicationValidator.GetOrderByIdParam} arg - Arg object.
|
|
223
148
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
224
149
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
225
|
-
* @returns {Promise<
|
|
150
|
+
* @returns {Promise<OrderById>} - Success response
|
|
226
151
|
* @name getOrderById
|
|
227
152
|
* @summary: Get an order
|
|
228
153
|
* @description: Get order details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrderById/).
|
|
@@ -231,26 +156,13 @@ class Order {
|
|
|
231
156
|
{ orderId, allowInactive, requestHeaders } = { requestHeaders: {} },
|
|
232
157
|
{ responseHeaders } = { responseHeaders: false }
|
|
233
158
|
) {
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
// Showing warrnings if extra unknown parameters are found
|
|
243
|
-
const {
|
|
244
|
-
error: warrning,
|
|
245
|
-
} = OrderApplicationValidator.getOrderById().validate(
|
|
246
|
-
{ orderId, allowInactive },
|
|
247
|
-
{ abortEarly: false, allowUnknown: false }
|
|
248
|
-
);
|
|
249
|
-
if (warrning) {
|
|
250
|
-
Logger({
|
|
251
|
-
level: "WARN",
|
|
252
|
-
message: `Parameter Validation warrnings for application > Order > getOrderById \n ${warrning}`,
|
|
159
|
+
const errors = validateRequiredParams(arguments[0], ["orderId"]);
|
|
160
|
+
if (errors.length > 0) {
|
|
161
|
+
const error = new FDKClientValidationError({
|
|
162
|
+
message: "Missing required field",
|
|
163
|
+
details: errors,
|
|
253
164
|
});
|
|
165
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
254
166
|
}
|
|
255
167
|
|
|
256
168
|
const query_params = {};
|
|
@@ -276,32 +188,13 @@ class Order {
|
|
|
276
188
|
responseData = response[0];
|
|
277
189
|
}
|
|
278
190
|
|
|
279
|
-
const {
|
|
280
|
-
error: res_error,
|
|
281
|
-
} = OrderApplicationModel.OrderById().validate(responseData, {
|
|
282
|
-
abortEarly: false,
|
|
283
|
-
allowUnknown: true,
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
if (res_error) {
|
|
287
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
288
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
289
|
-
} else {
|
|
290
|
-
Logger({
|
|
291
|
-
level: "WARN",
|
|
292
|
-
message: `Response Validation Warnings for application > Order > getOrderById \n ${res_error}`,
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
191
|
return response;
|
|
298
192
|
}
|
|
299
193
|
|
|
300
194
|
/**
|
|
301
|
-
* @param {OrderApplicationValidator.GetOrdersParam} arg - Arg object.
|
|
302
195
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
303
196
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
304
|
-
* @returns {Promise<
|
|
197
|
+
* @returns {Promise<OrderList>} - Success response
|
|
305
198
|
* @name getOrders
|
|
306
199
|
* @summary: List customer orders
|
|
307
200
|
* @description: Get all orders associated with a customer account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrders/).
|
|
@@ -321,46 +214,6 @@ class Order {
|
|
|
321
214
|
} = { requestHeaders: {} },
|
|
322
215
|
{ responseHeaders } = { responseHeaders: false }
|
|
323
216
|
) {
|
|
324
|
-
const { error } = OrderApplicationValidator.getOrders().validate(
|
|
325
|
-
{
|
|
326
|
-
status,
|
|
327
|
-
pageNo,
|
|
328
|
-
pageSize,
|
|
329
|
-
fromDate,
|
|
330
|
-
toDate,
|
|
331
|
-
startDate,
|
|
332
|
-
endDate,
|
|
333
|
-
customMeta,
|
|
334
|
-
allowInactive,
|
|
335
|
-
},
|
|
336
|
-
{ abortEarly: false, allowUnknown: true }
|
|
337
|
-
);
|
|
338
|
-
if (error) {
|
|
339
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
// Showing warrnings if extra unknown parameters are found
|
|
343
|
-
const { error: warrning } = OrderApplicationValidator.getOrders().validate(
|
|
344
|
-
{
|
|
345
|
-
status,
|
|
346
|
-
pageNo,
|
|
347
|
-
pageSize,
|
|
348
|
-
fromDate,
|
|
349
|
-
toDate,
|
|
350
|
-
startDate,
|
|
351
|
-
endDate,
|
|
352
|
-
customMeta,
|
|
353
|
-
allowInactive,
|
|
354
|
-
},
|
|
355
|
-
{ abortEarly: false, allowUnknown: false }
|
|
356
|
-
);
|
|
357
|
-
if (warrning) {
|
|
358
|
-
Logger({
|
|
359
|
-
level: "WARN",
|
|
360
|
-
message: `Parameter Validation warrnings for application > Order > getOrders \n ${warrning}`,
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
|
|
364
217
|
const query_params = {};
|
|
365
218
|
query_params["status"] = status;
|
|
366
219
|
query_params["page_no"] = pageNo;
|
|
@@ -392,110 +245,13 @@ class Order {
|
|
|
392
245
|
responseData = response[0];
|
|
393
246
|
}
|
|
394
247
|
|
|
395
|
-
const {
|
|
396
|
-
error: res_error,
|
|
397
|
-
} = OrderApplicationModel.OrderList().validate(responseData, {
|
|
398
|
-
abortEarly: false,
|
|
399
|
-
allowUnknown: true,
|
|
400
|
-
});
|
|
401
|
-
|
|
402
|
-
if (res_error) {
|
|
403
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
404
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
405
|
-
} else {
|
|
406
|
-
Logger({
|
|
407
|
-
level: "WARN",
|
|
408
|
-
message: `Response Validation Warnings for application > Order > getOrders \n ${res_error}`,
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
|
|
413
248
|
return response;
|
|
414
249
|
}
|
|
415
250
|
|
|
416
251
|
/**
|
|
417
|
-
* @param {OrderApplicationValidator.GetPosOrderByIdParam} arg - Arg object.
|
|
418
252
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
419
253
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
420
|
-
* @returns {Promise<
|
|
421
|
-
* @name getPosOrderById
|
|
422
|
-
* @summary: Retrieves POS order details
|
|
423
|
-
* @description: Retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getPosOrderById/).
|
|
424
|
-
*/
|
|
425
|
-
async getPosOrderById(
|
|
426
|
-
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
427
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
428
|
-
) {
|
|
429
|
-
const { error } = OrderApplicationValidator.getPosOrderById().validate(
|
|
430
|
-
{ orderId },
|
|
431
|
-
{ abortEarly: false, allowUnknown: true }
|
|
432
|
-
);
|
|
433
|
-
if (error) {
|
|
434
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
// Showing warrnings if extra unknown parameters are found
|
|
438
|
-
const {
|
|
439
|
-
error: warrning,
|
|
440
|
-
} = OrderApplicationValidator.getPosOrderById().validate(
|
|
441
|
-
{ orderId },
|
|
442
|
-
{ abortEarly: false, allowUnknown: false }
|
|
443
|
-
);
|
|
444
|
-
if (warrning) {
|
|
445
|
-
Logger({
|
|
446
|
-
level: "WARN",
|
|
447
|
-
message: `Parameter Validation warrnings for application > Order > getPosOrderById \n ${warrning}`,
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
const query_params = {};
|
|
452
|
-
|
|
453
|
-
const xHeaders = {};
|
|
454
|
-
|
|
455
|
-
const response = await ApplicationAPIClient.execute(
|
|
456
|
-
this._conf,
|
|
457
|
-
"get",
|
|
458
|
-
constructUrl({
|
|
459
|
-
url: this._urls["getPosOrderById"],
|
|
460
|
-
params: { orderId },
|
|
461
|
-
}),
|
|
462
|
-
query_params,
|
|
463
|
-
undefined,
|
|
464
|
-
{ ...xHeaders, ...requestHeaders },
|
|
465
|
-
{ responseHeaders }
|
|
466
|
-
);
|
|
467
|
-
|
|
468
|
-
let responseData = response;
|
|
469
|
-
if (responseHeaders) {
|
|
470
|
-
responseData = response[0];
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
const {
|
|
474
|
-
error: res_error,
|
|
475
|
-
} = OrderApplicationModel.OrderById().validate(responseData, {
|
|
476
|
-
abortEarly: false,
|
|
477
|
-
allowUnknown: true,
|
|
478
|
-
});
|
|
479
|
-
|
|
480
|
-
if (res_error) {
|
|
481
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
482
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
483
|
-
} else {
|
|
484
|
-
Logger({
|
|
485
|
-
level: "WARN",
|
|
486
|
-
message: `Response Validation Warnings for application > Order > getPosOrderById \n ${res_error}`,
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
return response;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
* @param {OrderApplicationValidator.GetShipmentBagReasonsParam} arg - Arg object.
|
|
496
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
497
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
498
|
-
* @returns {Promise<OrderApplicationModel.ShipmentBagReasons>} - Success response
|
|
254
|
+
* @returns {Promise<ShipmentBagReasons>} - Success response
|
|
499
255
|
* @name getShipmentBagReasons
|
|
500
256
|
* @summary: List bag cancellation reasons
|
|
501
257
|
* @description: Get reasons to perform full or partial cancellation of a bag. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentBagReasons/).
|
|
@@ -504,28 +260,16 @@ class Order {
|
|
|
504
260
|
{ shipmentId, bagId, requestHeaders } = { requestHeaders: {} },
|
|
505
261
|
{ responseHeaders } = { responseHeaders: false }
|
|
506
262
|
) {
|
|
507
|
-
const
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
// Showing warrnings if extra unknown parameters are found
|
|
518
|
-
const {
|
|
519
|
-
error: warrning,
|
|
520
|
-
} = OrderApplicationValidator.getShipmentBagReasons().validate(
|
|
521
|
-
{ shipmentId, bagId },
|
|
522
|
-
{ abortEarly: false, allowUnknown: false }
|
|
523
|
-
);
|
|
524
|
-
if (warrning) {
|
|
525
|
-
Logger({
|
|
526
|
-
level: "WARN",
|
|
527
|
-
message: `Parameter Validation warrnings for application > Order > getShipmentBagReasons \n ${warrning}`,
|
|
263
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
264
|
+
"shipmentId",
|
|
265
|
+
"bagId",
|
|
266
|
+
]);
|
|
267
|
+
if (errors.length > 0) {
|
|
268
|
+
const error = new FDKClientValidationError({
|
|
269
|
+
message: "Missing required field",
|
|
270
|
+
details: errors,
|
|
528
271
|
});
|
|
272
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
529
273
|
}
|
|
530
274
|
|
|
531
275
|
const query_params = {};
|
|
@@ -550,32 +294,13 @@ class Order {
|
|
|
550
294
|
responseData = response[0];
|
|
551
295
|
}
|
|
552
296
|
|
|
553
|
-
const {
|
|
554
|
-
error: res_error,
|
|
555
|
-
} = OrderApplicationModel.ShipmentBagReasons().validate(responseData, {
|
|
556
|
-
abortEarly: false,
|
|
557
|
-
allowUnknown: true,
|
|
558
|
-
});
|
|
559
|
-
|
|
560
|
-
if (res_error) {
|
|
561
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
562
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
563
|
-
} else {
|
|
564
|
-
Logger({
|
|
565
|
-
level: "WARN",
|
|
566
|
-
message: `Response Validation Warnings for application > Order > getShipmentBagReasons \n ${res_error}`,
|
|
567
|
-
});
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
|
|
571
297
|
return response;
|
|
572
298
|
}
|
|
573
299
|
|
|
574
300
|
/**
|
|
575
|
-
* @param {OrderApplicationValidator.GetShipmentByIdParam} arg - Arg object.
|
|
576
301
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
577
302
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
578
|
-
* @returns {Promise<
|
|
303
|
+
* @returns {Promise<ShipmentById>} - Success response
|
|
579
304
|
* @name getShipmentById
|
|
580
305
|
* @summary: Get a Shipment
|
|
581
306
|
* @description: Get shipment details such as price breakup, tracking details, store information, etc. using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentById/).
|
|
@@ -584,26 +309,13 @@ class Order {
|
|
|
584
309
|
{ shipmentId, allowInactive, requestHeaders } = { requestHeaders: {} },
|
|
585
310
|
{ responseHeaders } = { responseHeaders: false }
|
|
586
311
|
) {
|
|
587
|
-
const
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
// Showing warrnings if extra unknown parameters are found
|
|
596
|
-
const {
|
|
597
|
-
error: warrning,
|
|
598
|
-
} = OrderApplicationValidator.getShipmentById().validate(
|
|
599
|
-
{ shipmentId, allowInactive },
|
|
600
|
-
{ abortEarly: false, allowUnknown: false }
|
|
601
|
-
);
|
|
602
|
-
if (warrning) {
|
|
603
|
-
Logger({
|
|
604
|
-
level: "WARN",
|
|
605
|
-
message: `Parameter Validation warrnings for application > Order > getShipmentById \n ${warrning}`,
|
|
312
|
+
const errors = validateRequiredParams(arguments[0], ["shipmentId"]);
|
|
313
|
+
if (errors.length > 0) {
|
|
314
|
+
const error = new FDKClientValidationError({
|
|
315
|
+
message: "Missing required field",
|
|
316
|
+
details: errors,
|
|
606
317
|
});
|
|
318
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
607
319
|
}
|
|
608
320
|
|
|
609
321
|
const query_params = {};
|
|
@@ -629,32 +341,13 @@ class Order {
|
|
|
629
341
|
responseData = response[0];
|
|
630
342
|
}
|
|
631
343
|
|
|
632
|
-
const {
|
|
633
|
-
error: res_error,
|
|
634
|
-
} = OrderApplicationModel.ShipmentById().validate(responseData, {
|
|
635
|
-
abortEarly: false,
|
|
636
|
-
allowUnknown: true,
|
|
637
|
-
});
|
|
638
|
-
|
|
639
|
-
if (res_error) {
|
|
640
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
641
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
642
|
-
} else {
|
|
643
|
-
Logger({
|
|
644
|
-
level: "WARN",
|
|
645
|
-
message: `Response Validation Warnings for application > Order > getShipmentById \n ${res_error}`,
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
|
|
650
344
|
return response;
|
|
651
345
|
}
|
|
652
346
|
|
|
653
347
|
/**
|
|
654
|
-
* @param {OrderApplicationValidator.GetShipmentReasonsParam} arg - Arg object.
|
|
655
348
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
656
349
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
657
|
-
* @returns {Promise<
|
|
350
|
+
* @returns {Promise<ShipmentReasons>} - Success response
|
|
658
351
|
* @name getShipmentReasons
|
|
659
352
|
* @summary: List shipment cancellation reasons
|
|
660
353
|
* @description: Get reasons to perform full or partial cancellation of a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentReasons/).
|
|
@@ -663,26 +356,13 @@ class Order {
|
|
|
663
356
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
664
357
|
{ responseHeaders } = { responseHeaders: false }
|
|
665
358
|
) {
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
// Showing warrnings if extra unknown parameters are found
|
|
675
|
-
const {
|
|
676
|
-
error: warrning,
|
|
677
|
-
} = OrderApplicationValidator.getShipmentReasons().validate(
|
|
678
|
-
{ shipmentId },
|
|
679
|
-
{ abortEarly: false, allowUnknown: false }
|
|
680
|
-
);
|
|
681
|
-
if (warrning) {
|
|
682
|
-
Logger({
|
|
683
|
-
level: "WARN",
|
|
684
|
-
message: `Parameter Validation warrnings for application > Order > getShipmentReasons \n ${warrning}`,
|
|
359
|
+
const errors = validateRequiredParams(arguments[0], ["shipmentId"]);
|
|
360
|
+
if (errors.length > 0) {
|
|
361
|
+
const error = new FDKClientValidationError({
|
|
362
|
+
message: "Missing required field",
|
|
363
|
+
details: errors,
|
|
685
364
|
});
|
|
365
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
686
366
|
}
|
|
687
367
|
|
|
688
368
|
const query_params = {};
|
|
@@ -707,34 +387,13 @@ class Order {
|
|
|
707
387
|
responseData = response[0];
|
|
708
388
|
}
|
|
709
389
|
|
|
710
|
-
const {
|
|
711
|
-
error: res_error,
|
|
712
|
-
} = OrderApplicationModel.ShipmentReasons().validate(responseData, {
|
|
713
|
-
abortEarly: false,
|
|
714
|
-
allowUnknown: true,
|
|
715
|
-
});
|
|
716
|
-
|
|
717
|
-
if (res_error) {
|
|
718
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
719
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
720
|
-
} else {
|
|
721
|
-
Logger({
|
|
722
|
-
level: "WARN",
|
|
723
|
-
message: `Response Validation Warnings for application > Order > getShipmentReasons \n ${res_error}`,
|
|
724
|
-
});
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
|
|
728
390
|
return response;
|
|
729
391
|
}
|
|
730
392
|
|
|
731
393
|
/**
|
|
732
|
-
* @param {OrderApplicationValidator.SendOtpToShipmentCustomerParam} arg - Arg object.
|
|
733
394
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
734
395
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
735
|
-
* @returns {Promise<
|
|
736
|
-
* - Success response
|
|
737
|
-
*
|
|
396
|
+
* @returns {Promise<SendOtpToCustomerResponse>} - Success response
|
|
738
397
|
* @name sendOtpToShipmentCustomer
|
|
739
398
|
* @summary: Send OTP to customer
|
|
740
399
|
* @description: Send OTP to the customer for shipment verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/sendOtpToShipmentCustomer/).
|
|
@@ -743,28 +402,16 @@ class Order {
|
|
|
743
402
|
{ orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
744
403
|
{ responseHeaders } = { responseHeaders: false }
|
|
745
404
|
) {
|
|
746
|
-
const
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
// Showing warrnings if extra unknown parameters are found
|
|
757
|
-
const {
|
|
758
|
-
error: warrning,
|
|
759
|
-
} = OrderApplicationValidator.sendOtpToShipmentCustomer().validate(
|
|
760
|
-
{ orderId, shipmentId },
|
|
761
|
-
{ abortEarly: false, allowUnknown: false }
|
|
762
|
-
);
|
|
763
|
-
if (warrning) {
|
|
764
|
-
Logger({
|
|
765
|
-
level: "WARN",
|
|
766
|
-
message: `Parameter Validation warrnings for application > Order > sendOtpToShipmentCustomer \n ${warrning}`,
|
|
405
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
406
|
+
"orderId",
|
|
407
|
+
"shipmentId",
|
|
408
|
+
]);
|
|
409
|
+
if (errors.length > 0) {
|
|
410
|
+
const error = new FDKClientValidationError({
|
|
411
|
+
message: "Missing required field",
|
|
412
|
+
details: errors,
|
|
767
413
|
});
|
|
414
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
768
415
|
}
|
|
769
416
|
|
|
770
417
|
const query_params = {};
|
|
@@ -789,32 +436,13 @@ class Order {
|
|
|
789
436
|
responseData = response[0];
|
|
790
437
|
}
|
|
791
438
|
|
|
792
|
-
const {
|
|
793
|
-
error: res_error,
|
|
794
|
-
} = OrderApplicationModel.SendOtpToCustomerResponseSchema().validate(
|
|
795
|
-
responseData,
|
|
796
|
-
{ abortEarly: false, allowUnknown: true }
|
|
797
|
-
);
|
|
798
|
-
|
|
799
|
-
if (res_error) {
|
|
800
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
801
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
802
|
-
} else {
|
|
803
|
-
Logger({
|
|
804
|
-
level: "WARN",
|
|
805
|
-
message: `Response Validation Warnings for application > Order > sendOtpToShipmentCustomer \n ${res_error}`,
|
|
806
|
-
});
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
|
|
810
439
|
return response;
|
|
811
440
|
}
|
|
812
441
|
|
|
813
442
|
/**
|
|
814
|
-
* @param {OrderApplicationValidator.TrackShipmentParam} arg - Arg object.
|
|
815
443
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
816
444
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
817
|
-
* @returns {Promise<
|
|
445
|
+
* @returns {Promise<ShipmentTrack>} - Success response
|
|
818
446
|
* @name trackShipment
|
|
819
447
|
* @summary: Track shipment status
|
|
820
448
|
* @description: Track Shipment by shipment id, for application based on application Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/trackShipment/).
|
|
@@ -823,26 +451,13 @@ class Order {
|
|
|
823
451
|
{ shipmentId, requestHeaders } = { requestHeaders: {} },
|
|
824
452
|
{ responseHeaders } = { responseHeaders: false }
|
|
825
453
|
) {
|
|
826
|
-
const
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
// Showing warrnings if extra unknown parameters are found
|
|
835
|
-
const {
|
|
836
|
-
error: warrning,
|
|
837
|
-
} = OrderApplicationValidator.trackShipment().validate(
|
|
838
|
-
{ shipmentId },
|
|
839
|
-
{ abortEarly: false, allowUnknown: false }
|
|
840
|
-
);
|
|
841
|
-
if (warrning) {
|
|
842
|
-
Logger({
|
|
843
|
-
level: "WARN",
|
|
844
|
-
message: `Parameter Validation warrnings for application > Order > trackShipment \n ${warrning}`,
|
|
454
|
+
const errors = validateRequiredParams(arguments[0], ["shipmentId"]);
|
|
455
|
+
if (errors.length > 0) {
|
|
456
|
+
const error = new FDKClientValidationError({
|
|
457
|
+
message: "Missing required field",
|
|
458
|
+
details: errors,
|
|
845
459
|
});
|
|
460
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
846
461
|
}
|
|
847
462
|
|
|
848
463
|
const query_params = {};
|
|
@@ -867,34 +482,13 @@ class Order {
|
|
|
867
482
|
responseData = response[0];
|
|
868
483
|
}
|
|
869
484
|
|
|
870
|
-
const {
|
|
871
|
-
error: res_error,
|
|
872
|
-
} = OrderApplicationModel.ShipmentTrack().validate(responseData, {
|
|
873
|
-
abortEarly: false,
|
|
874
|
-
allowUnknown: true,
|
|
875
|
-
});
|
|
876
|
-
|
|
877
|
-
if (res_error) {
|
|
878
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
879
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
880
|
-
} else {
|
|
881
|
-
Logger({
|
|
882
|
-
level: "WARN",
|
|
883
|
-
message: `Response Validation Warnings for application > Order > trackShipment \n ${res_error}`,
|
|
884
|
-
});
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
|
|
888
485
|
return response;
|
|
889
486
|
}
|
|
890
487
|
|
|
891
488
|
/**
|
|
892
|
-
* @param {OrderApplicationValidator.UpdateShipmentStatusParam} arg - Arg object.
|
|
893
489
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
894
490
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
895
|
-
* @returns {Promise<
|
|
896
|
-
* - Success response
|
|
897
|
-
*
|
|
491
|
+
* @returns {Promise<ShipmentApplicationStatusResponse>} - Success response
|
|
898
492
|
* @name updateShipmentStatus
|
|
899
493
|
* @summary: Updates shipment status
|
|
900
494
|
* @description: Update current status of a specific shipment using its shipment ID. Supports both partial and full transition as per the configured settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/updateShipmentStatus/).
|
|
@@ -903,26 +497,13 @@ class Order {
|
|
|
903
497
|
{ shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
904
498
|
{ responseHeaders } = { responseHeaders: false }
|
|
905
499
|
) {
|
|
906
|
-
const
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
// Showing warrnings if extra unknown parameters are found
|
|
915
|
-
const {
|
|
916
|
-
error: warrning,
|
|
917
|
-
} = OrderApplicationValidator.updateShipmentStatus().validate(
|
|
918
|
-
{ shipmentId, body },
|
|
919
|
-
{ abortEarly: false, allowUnknown: false }
|
|
920
|
-
);
|
|
921
|
-
if (warrning) {
|
|
922
|
-
Logger({
|
|
923
|
-
level: "WARN",
|
|
924
|
-
message: `Parameter Validation warrnings for application > Order > updateShipmentStatus \n ${warrning}`,
|
|
500
|
+
const errors = validateRequiredParams(arguments[0], ["shipmentId"]);
|
|
501
|
+
if (errors.length > 0) {
|
|
502
|
+
const error = new FDKClientValidationError({
|
|
503
|
+
message: "Missing required field",
|
|
504
|
+
details: errors,
|
|
925
505
|
});
|
|
506
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
926
507
|
}
|
|
927
508
|
|
|
928
509
|
const query_params = {};
|
|
@@ -947,33 +528,13 @@ class Order {
|
|
|
947
528
|
responseData = response[0];
|
|
948
529
|
}
|
|
949
530
|
|
|
950
|
-
const {
|
|
951
|
-
error: res_error,
|
|
952
|
-
} = OrderApplicationModel.ShipmentApplicationStatusResponseSchema().validate(
|
|
953
|
-
responseData,
|
|
954
|
-
{ abortEarly: false, allowUnknown: true }
|
|
955
|
-
);
|
|
956
|
-
|
|
957
|
-
if (res_error) {
|
|
958
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
959
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
960
|
-
} else {
|
|
961
|
-
Logger({
|
|
962
|
-
level: "WARN",
|
|
963
|
-
message: `Response Validation Warnings for application > Order > updateShipmentStatus \n ${res_error}`,
|
|
964
|
-
});
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
|
|
968
531
|
return response;
|
|
969
532
|
}
|
|
970
533
|
|
|
971
534
|
/**
|
|
972
|
-
* @param {OrderApplicationValidator.VerifyOtpShipmentCustomerParam} arg - Arg object.
|
|
973
535
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
974
536
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
975
|
-
* @returns {Promise<
|
|
976
|
-
* Success response
|
|
537
|
+
* @returns {Promise<VerifyOtpResponse>} - Success response
|
|
977
538
|
* @name verifyOtpShipmentCustomer
|
|
978
539
|
* @summary: Verifies OTP
|
|
979
540
|
* @description: Verify OTP sent by customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/verifyOtpShipmentCustomer/).
|
|
@@ -982,28 +543,16 @@ class Order {
|
|
|
982
543
|
{ orderId, shipmentId, body, requestHeaders } = { requestHeaders: {} },
|
|
983
544
|
{ responseHeaders } = { responseHeaders: false }
|
|
984
545
|
) {
|
|
985
|
-
const
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
// Showing warrnings if extra unknown parameters are found
|
|
996
|
-
const {
|
|
997
|
-
error: warrning,
|
|
998
|
-
} = OrderApplicationValidator.verifyOtpShipmentCustomer().validate(
|
|
999
|
-
{ orderId, shipmentId, body },
|
|
1000
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1001
|
-
);
|
|
1002
|
-
if (warrning) {
|
|
1003
|
-
Logger({
|
|
1004
|
-
level: "WARN",
|
|
1005
|
-
message: `Parameter Validation warrnings for application > Order > verifyOtpShipmentCustomer \n ${warrning}`,
|
|
546
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
547
|
+
"orderId",
|
|
548
|
+
"shipmentId",
|
|
549
|
+
]);
|
|
550
|
+
if (errors.length > 0) {
|
|
551
|
+
const error = new FDKClientValidationError({
|
|
552
|
+
message: "Missing required field",
|
|
553
|
+
details: errors,
|
|
1006
554
|
});
|
|
555
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1007
556
|
}
|
|
1008
557
|
|
|
1009
558
|
const query_params = {};
|
|
@@ -1028,24 +577,6 @@ class Order {
|
|
|
1028
577
|
responseData = response[0];
|
|
1029
578
|
}
|
|
1030
579
|
|
|
1031
|
-
const {
|
|
1032
|
-
error: res_error,
|
|
1033
|
-
} = OrderApplicationModel.VerifyOtpResponseSchema().validate(responseData, {
|
|
1034
|
-
abortEarly: false,
|
|
1035
|
-
allowUnknown: true,
|
|
1036
|
-
});
|
|
1037
|
-
|
|
1038
|
-
if (res_error) {
|
|
1039
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1040
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1041
|
-
} else {
|
|
1042
|
-
Logger({
|
|
1043
|
-
level: "WARN",
|
|
1044
|
-
message: `Response Validation Warnings for application > Order > verifyOtpShipmentCustomer \n ${res_error}`,
|
|
1045
|
-
});
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
580
|
return response;
|
|
1050
581
|
}
|
|
1051
582
|
}
|