@gofynd/fdk-client-javascript 1.1.6 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/index.js +0 -3
- package/package.json +1 -1
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +8 -1
- package/sdk/application/ApplicationClient.d.ts +37 -6
- package/sdk/application/ApplicationClient.js +31 -0
- package/sdk/application/ApplicationConfig.d.ts +52 -12
- package/sdk/application/ApplicationConfig.js +37 -2
- package/sdk/application/ApplicationModels.d.ts +46 -1
- package/sdk/application/ApplicationModels.js +18 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
- package/sdk/application/Cart/CartApplicationClient.js +620 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
- package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
- package/sdk/application/Common/CommonApplicationClient.js +50 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
- package/sdk/application/Common/CommonApplicationModel.js +224 -16
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
- package/sdk/application/Content/ContentApplicationClient.js +409 -277
- package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
- package/sdk/application/Content/ContentApplicationModel.js +1202 -109
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
- package/sdk/application/Lead/LeadApplicationClient.js +169 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
- package/sdk/application/Lead/LeadApplicationModel.js +619 -73
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
- package/sdk/application/Order/OrderApplicationClient.js +297 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
- package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
- package/sdk/application/Share/ShareApplicationClient.js +165 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
- package/sdk/application/Share/ShareApplicationModel.js +154 -16
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +219 -303
- package/sdk/application/User/UserApplicationClient.js +819 -522
- package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
- package/sdk/application/User/UserApplicationModel.js +983 -44
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +8 -2
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/partner/PartnerAPIClient.d.ts +15 -1
- package/sdk/partner/PartnerAPIClient.js +8 -1
- package/sdk/partner/PartnerClient.d.ts +20 -3
- package/sdk/partner/PartnerClient.js +17 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
- package/sdk/platform/Common/CommonPlatformClient.js +48 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
- package/sdk/platform/Common/CommonPlatformModel.js +224 -16
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
- package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
- package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
- package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
- package/sdk/platform/Order/OrderPlatformClient.js +969 -762
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
- package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +29 -12579
- package/sdk/platform/PlatformClient.js +26 -15085
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
- package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +165 -17
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
- package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
- package/sdk/platform/User/UserPlatformModel.js +983 -44
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
- package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/PublicClient.d.ts +19 -3
- package/sdk/public/PublicClient.js +16 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
|
@@ -2,8 +2,8 @@ const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const constructUrl = require("../constructUrl");
|
|
4
4
|
const Paginator = require("../../common/Paginator");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const OrderApplicationValidator = require("./OrderApplicationValidator");
|
|
6
|
+
const OrderApplicationModel = require("./OrderApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
8
|
const Joi = require("joi");
|
|
9
9
|
|
|
@@ -51,18 +51,23 @@ class Order {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
* @param {
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @
|
|
59
|
-
*
|
|
60
|
-
* @
|
|
54
|
+
* @param {OrderApplicationValidator.GetCustomerDetailsByShipmentIdParam} arg
|
|
55
|
+
* - Arg object.
|
|
56
|
+
*
|
|
57
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
58
|
+
* @returns {Promise<OrderApplicationModel.CustomerDetailsResponse>} -
|
|
59
|
+
* Success response
|
|
60
|
+
* @name getCustomerDetailsByShipmentId
|
|
61
61
|
* @summary: Get Customer Details by Shipment Id
|
|
62
|
-
* @description: Use this API to retrieve customer details such as mobileno using Shipment ID.
|
|
62
|
+
* @description: Use this API to retrieve customer details such as mobileno using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getCustomerDetailsByShipmentId/).
|
|
63
63
|
*/
|
|
64
|
-
async getCustomerDetailsByShipmentId(
|
|
65
|
-
|
|
64
|
+
async getCustomerDetailsByShipmentId(
|
|
65
|
+
{ orderId, shipmentId } = {},
|
|
66
|
+
{ headers } = { headers: false }
|
|
67
|
+
) {
|
|
68
|
+
const {
|
|
69
|
+
error,
|
|
70
|
+
} = OrderApplicationValidator.getCustomerDetailsByShipmentId().validate(
|
|
66
71
|
{ orderId, shipmentId },
|
|
67
72
|
{ abortEarly: false, allowUnknown: true }
|
|
68
73
|
);
|
|
@@ -73,17 +78,15 @@ class Order {
|
|
|
73
78
|
// Showing warrnings if extra unknown parameters are found
|
|
74
79
|
const {
|
|
75
80
|
error: warrning,
|
|
76
|
-
} =
|
|
81
|
+
} = OrderApplicationValidator.getCustomerDetailsByShipmentId().validate(
|
|
77
82
|
{ orderId, shipmentId },
|
|
78
83
|
{ abortEarly: false, allowUnknown: false }
|
|
79
84
|
);
|
|
80
85
|
if (warrning) {
|
|
81
86
|
Logger({
|
|
82
87
|
level: "WARN",
|
|
83
|
-
message:
|
|
84
|
-
"Parameter Validation warrnings for getCustomerDetailsByShipmentId",
|
|
88
|
+
message: `Parameter Validation warrnings for application > Order > getCustomerDetailsByShipmentId \n ${warrning}`,
|
|
85
89
|
});
|
|
86
|
-
Logger({ level: "WARN", message: warrning });
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
const query_params = {};
|
|
@@ -99,12 +102,18 @@ class Order {
|
|
|
99
102
|
}),
|
|
100
103
|
query_params,
|
|
101
104
|
undefined,
|
|
102
|
-
xHeaders
|
|
105
|
+
xHeaders,
|
|
106
|
+
{ headers }
|
|
103
107
|
);
|
|
104
108
|
|
|
109
|
+
let responseData = response;
|
|
110
|
+
if (headers) {
|
|
111
|
+
responseData = response[0];
|
|
112
|
+
}
|
|
113
|
+
|
|
105
114
|
const {
|
|
106
115
|
error: res_error,
|
|
107
|
-
} =
|
|
116
|
+
} = OrderApplicationModel.CustomerDetailsResponse().validate(responseData, {
|
|
108
117
|
abortEarly: false,
|
|
109
118
|
allowUnknown: false,
|
|
110
119
|
});
|
|
@@ -112,24 +121,29 @@ class Order {
|
|
|
112
121
|
if (res_error) {
|
|
113
122
|
Logger({
|
|
114
123
|
level: "WARN",
|
|
115
|
-
message:
|
|
116
|
-
"Response Validation Warnnings for getCustomerDetailsByShipmentId",
|
|
124
|
+
message: `Response Validation Warnnings for application > Order > getCustomerDetailsByShipmentId \n ${res_error}`,
|
|
117
125
|
});
|
|
118
|
-
Logger({ level: "WARN", message: res_error });
|
|
119
126
|
}
|
|
120
127
|
|
|
121
128
|
return response;
|
|
122
129
|
}
|
|
123
130
|
|
|
124
131
|
/**
|
|
125
|
-
* @param {
|
|
126
|
-
* @param {
|
|
127
|
-
* @returns {Promise<ResponseGetInvoiceShipment>} -
|
|
132
|
+
* @param {OrderApplicationValidator.GetInvoiceByShipmentIdParam} arg - Arg object.
|
|
133
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
134
|
+
* @returns {Promise<OrderApplicationModel.ResponseGetInvoiceShipment>} -
|
|
135
|
+
* Success response
|
|
136
|
+
* @name getInvoiceByShipmentId
|
|
128
137
|
* @summary: Get Invoice of a shipment
|
|
129
|
-
* @description: Use this API to retrieve shipment invoice.
|
|
138
|
+
* @description: Use this API to retrieve shipment invoice. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getInvoiceByShipmentId/).
|
|
130
139
|
*/
|
|
131
|
-
async getInvoiceByShipmentId(
|
|
132
|
-
|
|
140
|
+
async getInvoiceByShipmentId(
|
|
141
|
+
{ shipmentId } = {},
|
|
142
|
+
{ headers } = { headers: false }
|
|
143
|
+
) {
|
|
144
|
+
const {
|
|
145
|
+
error,
|
|
146
|
+
} = OrderApplicationValidator.getInvoiceByShipmentId().validate(
|
|
133
147
|
{ shipmentId },
|
|
134
148
|
{ abortEarly: false, allowUnknown: true }
|
|
135
149
|
);
|
|
@@ -140,16 +154,15 @@ class Order {
|
|
|
140
154
|
// Showing warrnings if extra unknown parameters are found
|
|
141
155
|
const {
|
|
142
156
|
error: warrning,
|
|
143
|
-
} =
|
|
157
|
+
} = OrderApplicationValidator.getInvoiceByShipmentId().validate(
|
|
144
158
|
{ shipmentId },
|
|
145
159
|
{ abortEarly: false, allowUnknown: false }
|
|
146
160
|
);
|
|
147
161
|
if (warrning) {
|
|
148
162
|
Logger({
|
|
149
163
|
level: "WARN",
|
|
150
|
-
message:
|
|
164
|
+
message: `Parameter Validation warrnings for application > Order > getInvoiceByShipmentId \n ${warrning}`,
|
|
151
165
|
});
|
|
152
|
-
Logger({ level: "WARN", message: warrning });
|
|
153
166
|
}
|
|
154
167
|
|
|
155
168
|
const query_params = {};
|
|
@@ -165,37 +178,42 @@ class Order {
|
|
|
165
178
|
}),
|
|
166
179
|
query_params,
|
|
167
180
|
undefined,
|
|
168
|
-
xHeaders
|
|
181
|
+
xHeaders,
|
|
182
|
+
{ headers }
|
|
169
183
|
);
|
|
170
184
|
|
|
185
|
+
let responseData = response;
|
|
186
|
+
if (headers) {
|
|
187
|
+
responseData = response[0];
|
|
188
|
+
}
|
|
189
|
+
|
|
171
190
|
const {
|
|
172
191
|
error: res_error,
|
|
173
|
-
} =
|
|
174
|
-
|
|
175
|
-
allowUnknown: false
|
|
176
|
-
|
|
192
|
+
} = OrderApplicationModel.ResponseGetInvoiceShipment().validate(
|
|
193
|
+
responseData,
|
|
194
|
+
{ abortEarly: false, allowUnknown: false }
|
|
195
|
+
);
|
|
177
196
|
|
|
178
197
|
if (res_error) {
|
|
179
198
|
Logger({
|
|
180
199
|
level: "WARN",
|
|
181
|
-
message:
|
|
200
|
+
message: `Response Validation Warnnings for application > Order > getInvoiceByShipmentId \n ${res_error}`,
|
|
182
201
|
});
|
|
183
|
-
Logger({ level: "WARN", message: res_error });
|
|
184
202
|
}
|
|
185
203
|
|
|
186
204
|
return response;
|
|
187
205
|
}
|
|
188
206
|
|
|
189
207
|
/**
|
|
190
|
-
* @param {
|
|
191
|
-
* @param {
|
|
192
|
-
*
|
|
193
|
-
* @
|
|
208
|
+
* @param {OrderApplicationValidator.GetOrderByIdParam} arg - Arg object.
|
|
209
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
210
|
+
* @returns {Promise<OrderApplicationModel.OrderById>} - Success response
|
|
211
|
+
* @name getOrderById
|
|
194
212
|
* @summary: Get details of an order
|
|
195
|
-
* @description: Use this API to retrieve order details such as tracking details, shipment, store information using Fynd Order ID.
|
|
213
|
+
* @description: Use this API to retrieve 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/).
|
|
196
214
|
*/
|
|
197
|
-
async getOrderById({ orderId } = {}) {
|
|
198
|
-
const { error } =
|
|
215
|
+
async getOrderById({ orderId } = {}, { headers } = { headers: false }) {
|
|
216
|
+
const { error } = OrderApplicationValidator.getOrderById().validate(
|
|
199
217
|
{ orderId },
|
|
200
218
|
{ abortEarly: false, allowUnknown: true }
|
|
201
219
|
);
|
|
@@ -204,16 +222,17 @@ class Order {
|
|
|
204
222
|
}
|
|
205
223
|
|
|
206
224
|
// Showing warrnings if extra unknown parameters are found
|
|
207
|
-
const {
|
|
225
|
+
const {
|
|
226
|
+
error: warrning,
|
|
227
|
+
} = OrderApplicationValidator.getOrderById().validate(
|
|
208
228
|
{ orderId },
|
|
209
229
|
{ abortEarly: false, allowUnknown: false }
|
|
210
230
|
);
|
|
211
231
|
if (warrning) {
|
|
212
232
|
Logger({
|
|
213
233
|
level: "WARN",
|
|
214
|
-
message:
|
|
234
|
+
message: `Parameter Validation warrnings for application > Order > getOrderById \n ${warrning}`,
|
|
215
235
|
});
|
|
216
|
-
Logger({ level: "WARN", message: warrning });
|
|
217
236
|
}
|
|
218
237
|
|
|
219
238
|
const query_params = {};
|
|
@@ -229,10 +248,18 @@ class Order {
|
|
|
229
248
|
}),
|
|
230
249
|
query_params,
|
|
231
250
|
undefined,
|
|
232
|
-
xHeaders
|
|
251
|
+
xHeaders,
|
|
252
|
+
{ headers }
|
|
233
253
|
);
|
|
234
254
|
|
|
235
|
-
|
|
255
|
+
let responseData = response;
|
|
256
|
+
if (headers) {
|
|
257
|
+
responseData = response[0];
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const {
|
|
261
|
+
error: res_error,
|
|
262
|
+
} = OrderApplicationModel.OrderById().validate(responseData, {
|
|
236
263
|
abortEarly: false,
|
|
237
264
|
allowUnknown: false,
|
|
238
265
|
});
|
|
@@ -240,40 +267,26 @@ class Order {
|
|
|
240
267
|
if (res_error) {
|
|
241
268
|
Logger({
|
|
242
269
|
level: "WARN",
|
|
243
|
-
message:
|
|
270
|
+
message: `Response Validation Warnnings for application > Order > getOrderById \n ${res_error}`,
|
|
244
271
|
});
|
|
245
|
-
Logger({ level: "WARN", message: res_error });
|
|
246
272
|
}
|
|
247
273
|
|
|
248
274
|
return response;
|
|
249
275
|
}
|
|
250
276
|
|
|
251
277
|
/**
|
|
252
|
-
* @param {
|
|
253
|
-
* @param {
|
|
254
|
-
*
|
|
255
|
-
* @
|
|
256
|
-
* given set of results. Default value is 1.
|
|
257
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
258
|
-
* page. Default value is 10.
|
|
259
|
-
* @param {string} [arg.fromDate] - The date from which the orders should be
|
|
260
|
-
* retrieved.
|
|
261
|
-
* @param {string} [arg.toDate] - The date till which the orders should be retrieved.
|
|
262
|
-
* @param {string} [arg.customMeta] - A filter and retrieve data using
|
|
263
|
-
* special fields included for special use-cases
|
|
264
|
-
* @returns {Promise<OrderList>} - Success response
|
|
278
|
+
* @param {OrderApplicationValidator.GetOrdersParam} arg - Arg object.
|
|
279
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
280
|
+
* @returns {Promise<OrderApplicationModel.OrderList>} - Success response
|
|
281
|
+
* @name getOrders
|
|
265
282
|
* @summary: Get all orders
|
|
266
|
-
* @description: Use this API to retrieve all the orders.
|
|
283
|
+
* @description: Use this API to retrieve all the orders. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrders/).
|
|
267
284
|
*/
|
|
268
|
-
async getOrders(
|
|
269
|
-
status,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
toDate,
|
|
274
|
-
customMeta,
|
|
275
|
-
} = {}) {
|
|
276
|
-
const { error } = OrderValidator.getOrders().validate(
|
|
285
|
+
async getOrders(
|
|
286
|
+
{ status, pageNo, pageSize, fromDate, toDate, customMeta } = {},
|
|
287
|
+
{ headers } = { headers: false }
|
|
288
|
+
) {
|
|
289
|
+
const { error } = OrderApplicationValidator.getOrders().validate(
|
|
277
290
|
{ status, pageNo, pageSize, fromDate, toDate, customMeta },
|
|
278
291
|
{ abortEarly: false, allowUnknown: true }
|
|
279
292
|
);
|
|
@@ -282,16 +295,15 @@ class Order {
|
|
|
282
295
|
}
|
|
283
296
|
|
|
284
297
|
// Showing warrnings if extra unknown parameters are found
|
|
285
|
-
const { error: warrning } =
|
|
298
|
+
const { error: warrning } = OrderApplicationValidator.getOrders().validate(
|
|
286
299
|
{ status, pageNo, pageSize, fromDate, toDate, customMeta },
|
|
287
300
|
{ abortEarly: false, allowUnknown: false }
|
|
288
301
|
);
|
|
289
302
|
if (warrning) {
|
|
290
303
|
Logger({
|
|
291
304
|
level: "WARN",
|
|
292
|
-
message:
|
|
305
|
+
message: `Parameter Validation warrnings for application > Order > getOrders \n ${warrning}`,
|
|
293
306
|
});
|
|
294
|
-
Logger({ level: "WARN", message: warrning });
|
|
295
307
|
}
|
|
296
308
|
|
|
297
309
|
const query_params = {};
|
|
@@ -313,10 +325,18 @@ class Order {
|
|
|
313
325
|
}),
|
|
314
326
|
query_params,
|
|
315
327
|
undefined,
|
|
316
|
-
xHeaders
|
|
328
|
+
xHeaders,
|
|
329
|
+
{ headers }
|
|
317
330
|
);
|
|
318
331
|
|
|
319
|
-
|
|
332
|
+
let responseData = response;
|
|
333
|
+
if (headers) {
|
|
334
|
+
responseData = response[0];
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const {
|
|
338
|
+
error: res_error,
|
|
339
|
+
} = OrderApplicationModel.OrderList().validate(responseData, {
|
|
320
340
|
abortEarly: false,
|
|
321
341
|
allowUnknown: false,
|
|
322
342
|
});
|
|
@@ -324,24 +344,23 @@ class Order {
|
|
|
324
344
|
if (res_error) {
|
|
325
345
|
Logger({
|
|
326
346
|
level: "WARN",
|
|
327
|
-
message:
|
|
347
|
+
message: `Response Validation Warnnings for application > Order > getOrders \n ${res_error}`,
|
|
328
348
|
});
|
|
329
|
-
Logger({ level: "WARN", message: res_error });
|
|
330
349
|
}
|
|
331
350
|
|
|
332
351
|
return response;
|
|
333
352
|
}
|
|
334
353
|
|
|
335
354
|
/**
|
|
336
|
-
* @param {
|
|
337
|
-
* @param {
|
|
338
|
-
*
|
|
339
|
-
* @
|
|
355
|
+
* @param {OrderApplicationValidator.GetPosOrderByIdParam} arg - Arg object.
|
|
356
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
357
|
+
* @returns {Promise<OrderApplicationModel.OrderById>} - Success response
|
|
358
|
+
* @name getPosOrderById
|
|
340
359
|
* @summary: Get POS Order
|
|
341
|
-
* @description: Use this API to retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID.
|
|
360
|
+
* @description: Use this API to 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/).
|
|
342
361
|
*/
|
|
343
|
-
async getPosOrderById({ orderId } = {}) {
|
|
344
|
-
const { error } =
|
|
362
|
+
async getPosOrderById({ orderId } = {}, { headers } = { headers: false }) {
|
|
363
|
+
const { error } = OrderApplicationValidator.getPosOrderById().validate(
|
|
345
364
|
{ orderId },
|
|
346
365
|
{ abortEarly: false, allowUnknown: true }
|
|
347
366
|
);
|
|
@@ -350,16 +369,17 @@ class Order {
|
|
|
350
369
|
}
|
|
351
370
|
|
|
352
371
|
// Showing warrnings if extra unknown parameters are found
|
|
353
|
-
const {
|
|
372
|
+
const {
|
|
373
|
+
error: warrning,
|
|
374
|
+
} = OrderApplicationValidator.getPosOrderById().validate(
|
|
354
375
|
{ orderId },
|
|
355
376
|
{ abortEarly: false, allowUnknown: false }
|
|
356
377
|
);
|
|
357
378
|
if (warrning) {
|
|
358
379
|
Logger({
|
|
359
380
|
level: "WARN",
|
|
360
|
-
message:
|
|
381
|
+
message: `Parameter Validation warrnings for application > Order > getPosOrderById \n ${warrning}`,
|
|
361
382
|
});
|
|
362
|
-
Logger({ level: "WARN", message: warrning });
|
|
363
383
|
}
|
|
364
384
|
|
|
365
385
|
const query_params = {};
|
|
@@ -375,10 +395,18 @@ class Order {
|
|
|
375
395
|
}),
|
|
376
396
|
query_params,
|
|
377
397
|
undefined,
|
|
378
|
-
xHeaders
|
|
398
|
+
xHeaders,
|
|
399
|
+
{ headers }
|
|
379
400
|
);
|
|
380
401
|
|
|
381
|
-
|
|
402
|
+
let responseData = response;
|
|
403
|
+
if (headers) {
|
|
404
|
+
responseData = response[0];
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
const {
|
|
408
|
+
error: res_error,
|
|
409
|
+
} = OrderApplicationModel.OrderById().validate(responseData, {
|
|
382
410
|
abortEarly: false,
|
|
383
411
|
allowUnknown: false,
|
|
384
412
|
});
|
|
@@ -386,27 +414,28 @@ class Order {
|
|
|
386
414
|
if (res_error) {
|
|
387
415
|
Logger({
|
|
388
416
|
level: "WARN",
|
|
389
|
-
message:
|
|
417
|
+
message: `Response Validation Warnnings for application > Order > getPosOrderById \n ${res_error}`,
|
|
390
418
|
});
|
|
391
|
-
Logger({ level: "WARN", message: res_error });
|
|
392
419
|
}
|
|
393
420
|
|
|
394
421
|
return response;
|
|
395
422
|
}
|
|
396
423
|
|
|
397
424
|
/**
|
|
398
|
-
* @param {
|
|
399
|
-
* @param {
|
|
400
|
-
*
|
|
401
|
-
*
|
|
402
|
-
* @param {string} arg.bagId - ID of the bag. An order may contain multiple
|
|
403
|
-
* items and may get divided into one or more shipment, each having its own ID.
|
|
404
|
-
* @returns {Promise<ShipmentBagReasons>} - Success response
|
|
425
|
+
* @param {OrderApplicationValidator.GetShipmentBagReasonsParam} arg - Arg object.
|
|
426
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
427
|
+
* @returns {Promise<OrderApplicationModel.ShipmentBagReasons>} - Success response
|
|
428
|
+
* @name getShipmentBagReasons
|
|
405
429
|
* @summary: Get reasons behind full or partial cancellation of a shipment
|
|
406
|
-
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
|
|
430
|
+
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentBagReasons/).
|
|
407
431
|
*/
|
|
408
|
-
async getShipmentBagReasons(
|
|
409
|
-
|
|
432
|
+
async getShipmentBagReasons(
|
|
433
|
+
{ shipmentId, bagId } = {},
|
|
434
|
+
{ headers } = { headers: false }
|
|
435
|
+
) {
|
|
436
|
+
const {
|
|
437
|
+
error,
|
|
438
|
+
} = OrderApplicationValidator.getShipmentBagReasons().validate(
|
|
410
439
|
{ shipmentId, bagId },
|
|
411
440
|
{ abortEarly: false, allowUnknown: true }
|
|
412
441
|
);
|
|
@@ -415,16 +444,17 @@ class Order {
|
|
|
415
444
|
}
|
|
416
445
|
|
|
417
446
|
// Showing warrnings if extra unknown parameters are found
|
|
418
|
-
const {
|
|
447
|
+
const {
|
|
448
|
+
error: warrning,
|
|
449
|
+
} = OrderApplicationValidator.getShipmentBagReasons().validate(
|
|
419
450
|
{ shipmentId, bagId },
|
|
420
451
|
{ abortEarly: false, allowUnknown: false }
|
|
421
452
|
);
|
|
422
453
|
if (warrning) {
|
|
423
454
|
Logger({
|
|
424
455
|
level: "WARN",
|
|
425
|
-
message:
|
|
456
|
+
message: `Parameter Validation warrnings for application > Order > getShipmentBagReasons \n ${warrning}`,
|
|
426
457
|
});
|
|
427
|
-
Logger({ level: "WARN", message: warrning });
|
|
428
458
|
}
|
|
429
459
|
|
|
430
460
|
const query_params = {};
|
|
@@ -440,12 +470,18 @@ class Order {
|
|
|
440
470
|
}),
|
|
441
471
|
query_params,
|
|
442
472
|
undefined,
|
|
443
|
-
xHeaders
|
|
473
|
+
xHeaders,
|
|
474
|
+
{ headers }
|
|
444
475
|
);
|
|
445
476
|
|
|
477
|
+
let responseData = response;
|
|
478
|
+
if (headers) {
|
|
479
|
+
responseData = response[0];
|
|
480
|
+
}
|
|
481
|
+
|
|
446
482
|
const {
|
|
447
483
|
error: res_error,
|
|
448
|
-
} =
|
|
484
|
+
} = OrderApplicationModel.ShipmentBagReasons().validate(responseData, {
|
|
449
485
|
abortEarly: false,
|
|
450
486
|
allowUnknown: false,
|
|
451
487
|
});
|
|
@@ -453,25 +489,23 @@ class Order {
|
|
|
453
489
|
if (res_error) {
|
|
454
490
|
Logger({
|
|
455
491
|
level: "WARN",
|
|
456
|
-
message:
|
|
492
|
+
message: `Response Validation Warnnings for application > Order > getShipmentBagReasons \n ${res_error}`,
|
|
457
493
|
});
|
|
458
|
-
Logger({ level: "WARN", message: res_error });
|
|
459
494
|
}
|
|
460
495
|
|
|
461
496
|
return response;
|
|
462
497
|
}
|
|
463
498
|
|
|
464
499
|
/**
|
|
465
|
-
* @param {
|
|
466
|
-
* @param {
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
* @returns {Promise<ShipmentById>} - Success response
|
|
500
|
+
* @param {OrderApplicationValidator.GetShipmentByIdParam} arg - Arg object.
|
|
501
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
502
|
+
* @returns {Promise<OrderApplicationModel.ShipmentById>} - Success response
|
|
503
|
+
* @name getShipmentById
|
|
470
504
|
* @summary: Get details of a shipment
|
|
471
|
-
* @description: Use this API to retrieve shipment details such as price breakup, tracking details, store information, etc. using Shipment ID.
|
|
505
|
+
* @description: Use this API to retrieve 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/).
|
|
472
506
|
*/
|
|
473
|
-
async getShipmentById({ shipmentId } = {}) {
|
|
474
|
-
const { error } =
|
|
507
|
+
async getShipmentById({ shipmentId } = {}, { headers } = { headers: false }) {
|
|
508
|
+
const { error } = OrderApplicationValidator.getShipmentById().validate(
|
|
475
509
|
{ shipmentId },
|
|
476
510
|
{ abortEarly: false, allowUnknown: true }
|
|
477
511
|
);
|
|
@@ -480,16 +514,17 @@ class Order {
|
|
|
480
514
|
}
|
|
481
515
|
|
|
482
516
|
// Showing warrnings if extra unknown parameters are found
|
|
483
|
-
const {
|
|
517
|
+
const {
|
|
518
|
+
error: warrning,
|
|
519
|
+
} = OrderApplicationValidator.getShipmentById().validate(
|
|
484
520
|
{ shipmentId },
|
|
485
521
|
{ abortEarly: false, allowUnknown: false }
|
|
486
522
|
);
|
|
487
523
|
if (warrning) {
|
|
488
524
|
Logger({
|
|
489
525
|
level: "WARN",
|
|
490
|
-
message:
|
|
526
|
+
message: `Parameter Validation warrnings for application > Order > getShipmentById \n ${warrning}`,
|
|
491
527
|
});
|
|
492
|
-
Logger({ level: "WARN", message: warrning });
|
|
493
528
|
}
|
|
494
529
|
|
|
495
530
|
const query_params = {};
|
|
@@ -505,10 +540,18 @@ class Order {
|
|
|
505
540
|
}),
|
|
506
541
|
query_params,
|
|
507
542
|
undefined,
|
|
508
|
-
xHeaders
|
|
543
|
+
xHeaders,
|
|
544
|
+
{ headers }
|
|
509
545
|
);
|
|
510
546
|
|
|
511
|
-
|
|
547
|
+
let responseData = response;
|
|
548
|
+
if (headers) {
|
|
549
|
+
responseData = response[0];
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
const {
|
|
553
|
+
error: res_error,
|
|
554
|
+
} = OrderApplicationModel.ShipmentById().validate(responseData, {
|
|
512
555
|
abortEarly: false,
|
|
513
556
|
allowUnknown: false,
|
|
514
557
|
});
|
|
@@ -516,25 +559,26 @@ class Order {
|
|
|
516
559
|
if (res_error) {
|
|
517
560
|
Logger({
|
|
518
561
|
level: "WARN",
|
|
519
|
-
message:
|
|
562
|
+
message: `Response Validation Warnnings for application > Order > getShipmentById \n ${res_error}`,
|
|
520
563
|
});
|
|
521
|
-
Logger({ level: "WARN", message: res_error });
|
|
522
564
|
}
|
|
523
565
|
|
|
524
566
|
return response;
|
|
525
567
|
}
|
|
526
568
|
|
|
527
569
|
/**
|
|
528
|
-
* @param {
|
|
529
|
-
* @param {
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
* @returns {Promise<ShipmentReasons>} - Success response
|
|
570
|
+
* @param {OrderApplicationValidator.GetShipmentReasonsParam} arg - Arg object.
|
|
571
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
572
|
+
* @returns {Promise<OrderApplicationModel.ShipmentReasons>} - Success response
|
|
573
|
+
* @name getShipmentReasons
|
|
533
574
|
* @summary: Get reasons behind full or partial cancellation of a shipment
|
|
534
|
-
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
|
|
575
|
+
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentReasons/).
|
|
535
576
|
*/
|
|
536
|
-
async getShipmentReasons(
|
|
537
|
-
|
|
577
|
+
async getShipmentReasons(
|
|
578
|
+
{ shipmentId } = {},
|
|
579
|
+
{ headers } = { headers: false }
|
|
580
|
+
) {
|
|
581
|
+
const { error } = OrderApplicationValidator.getShipmentReasons().validate(
|
|
538
582
|
{ shipmentId },
|
|
539
583
|
{ abortEarly: false, allowUnknown: true }
|
|
540
584
|
);
|
|
@@ -543,16 +587,17 @@ class Order {
|
|
|
543
587
|
}
|
|
544
588
|
|
|
545
589
|
// Showing warrnings if extra unknown parameters are found
|
|
546
|
-
const {
|
|
590
|
+
const {
|
|
591
|
+
error: warrning,
|
|
592
|
+
} = OrderApplicationValidator.getShipmentReasons().validate(
|
|
547
593
|
{ shipmentId },
|
|
548
594
|
{ abortEarly: false, allowUnknown: false }
|
|
549
595
|
);
|
|
550
596
|
if (warrning) {
|
|
551
597
|
Logger({
|
|
552
598
|
level: "WARN",
|
|
553
|
-
message:
|
|
599
|
+
message: `Parameter Validation warrnings for application > Order > getShipmentReasons \n ${warrning}`,
|
|
554
600
|
});
|
|
555
|
-
Logger({ level: "WARN", message: warrning });
|
|
556
601
|
}
|
|
557
602
|
|
|
558
603
|
const query_params = {};
|
|
@@ -568,38 +613,48 @@ class Order {
|
|
|
568
613
|
}),
|
|
569
614
|
query_params,
|
|
570
615
|
undefined,
|
|
571
|
-
xHeaders
|
|
616
|
+
xHeaders,
|
|
617
|
+
{ headers }
|
|
572
618
|
);
|
|
573
619
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
620
|
+
let responseData = response;
|
|
621
|
+
if (headers) {
|
|
622
|
+
responseData = response[0];
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
const {
|
|
626
|
+
error: res_error,
|
|
627
|
+
} = OrderApplicationModel.ShipmentReasons().validate(responseData, {
|
|
628
|
+
abortEarly: false,
|
|
629
|
+
allowUnknown: false,
|
|
630
|
+
});
|
|
578
631
|
|
|
579
632
|
if (res_error) {
|
|
580
633
|
Logger({
|
|
581
634
|
level: "WARN",
|
|
582
|
-
message:
|
|
635
|
+
message: `Response Validation Warnnings for application > Order > getShipmentReasons \n ${res_error}`,
|
|
583
636
|
});
|
|
584
|
-
Logger({ level: "WARN", message: res_error });
|
|
585
637
|
}
|
|
586
638
|
|
|
587
639
|
return response;
|
|
588
640
|
}
|
|
589
641
|
|
|
590
642
|
/**
|
|
591
|
-
* @param {
|
|
592
|
-
* @param {
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
* having its own ID.
|
|
597
|
-
* @returns {Promise<SendOtpToCustomerResponse>} - Success response
|
|
643
|
+
* @param {OrderApplicationValidator.SendOtpToShipmentCustomerParam} arg - Arg object.
|
|
644
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
645
|
+
* @returns {Promise<OrderApplicationModel.SendOtpToCustomerResponse>} -
|
|
646
|
+
* Success response
|
|
647
|
+
* @name sendOtpToShipmentCustomer
|
|
598
648
|
* @summary: Send and Resend Otp code to Order-Shipment customer
|
|
599
|
-
* @description: Use this API to send OTP to the customer of the mapped Shipment.
|
|
649
|
+
* @description: Use this API to send OTP to the customer of the mapped Shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/sendOtpToShipmentCustomer/).
|
|
600
650
|
*/
|
|
601
|
-
async sendOtpToShipmentCustomer(
|
|
602
|
-
|
|
651
|
+
async sendOtpToShipmentCustomer(
|
|
652
|
+
{ orderId, shipmentId } = {},
|
|
653
|
+
{ headers } = { headers: false }
|
|
654
|
+
) {
|
|
655
|
+
const {
|
|
656
|
+
error,
|
|
657
|
+
} = OrderApplicationValidator.sendOtpToShipmentCustomer().validate(
|
|
603
658
|
{ orderId, shipmentId },
|
|
604
659
|
{ abortEarly: false, allowUnknown: true }
|
|
605
660
|
);
|
|
@@ -610,16 +665,15 @@ class Order {
|
|
|
610
665
|
// Showing warrnings if extra unknown parameters are found
|
|
611
666
|
const {
|
|
612
667
|
error: warrning,
|
|
613
|
-
} =
|
|
668
|
+
} = OrderApplicationValidator.sendOtpToShipmentCustomer().validate(
|
|
614
669
|
{ orderId, shipmentId },
|
|
615
670
|
{ abortEarly: false, allowUnknown: false }
|
|
616
671
|
);
|
|
617
672
|
if (warrning) {
|
|
618
673
|
Logger({
|
|
619
674
|
level: "WARN",
|
|
620
|
-
message:
|
|
675
|
+
message: `Parameter Validation warrnings for application > Order > sendOtpToShipmentCustomer \n ${warrning}`,
|
|
621
676
|
});
|
|
622
|
-
Logger({ level: "WARN", message: warrning });
|
|
623
677
|
}
|
|
624
678
|
|
|
625
679
|
const query_params = {};
|
|
@@ -635,38 +689,42 @@ class Order {
|
|
|
635
689
|
}),
|
|
636
690
|
query_params,
|
|
637
691
|
undefined,
|
|
638
|
-
xHeaders
|
|
692
|
+
xHeaders,
|
|
693
|
+
{ headers }
|
|
639
694
|
);
|
|
640
695
|
|
|
696
|
+
let responseData = response;
|
|
697
|
+
if (headers) {
|
|
698
|
+
responseData = response[0];
|
|
699
|
+
}
|
|
700
|
+
|
|
641
701
|
const {
|
|
642
702
|
error: res_error,
|
|
643
|
-
} =
|
|
644
|
-
|
|
645
|
-
allowUnknown: false
|
|
646
|
-
|
|
703
|
+
} = OrderApplicationModel.SendOtpToCustomerResponse().validate(
|
|
704
|
+
responseData,
|
|
705
|
+
{ abortEarly: false, allowUnknown: false }
|
|
706
|
+
);
|
|
647
707
|
|
|
648
708
|
if (res_error) {
|
|
649
709
|
Logger({
|
|
650
710
|
level: "WARN",
|
|
651
|
-
message:
|
|
711
|
+
message: `Response Validation Warnnings for application > Order > sendOtpToShipmentCustomer \n ${res_error}`,
|
|
652
712
|
});
|
|
653
|
-
Logger({ level: "WARN", message: res_error });
|
|
654
713
|
}
|
|
655
714
|
|
|
656
715
|
return response;
|
|
657
716
|
}
|
|
658
717
|
|
|
659
718
|
/**
|
|
660
|
-
* @param {
|
|
661
|
-
* @param {
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
* @returns {Promise<ShipmentTrack>} - Success response
|
|
719
|
+
* @param {OrderApplicationValidator.TrackShipmentParam} arg - Arg object.
|
|
720
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
721
|
+
* @returns {Promise<OrderApplicationModel.ShipmentTrack>} - Success response
|
|
722
|
+
* @name trackShipment
|
|
665
723
|
* @summary: Track shipment
|
|
666
|
-
* @description: Track Shipment by shipment id, for application based on application Id
|
|
724
|
+
* @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/).
|
|
667
725
|
*/
|
|
668
|
-
async trackShipment({ shipmentId } = {}) {
|
|
669
|
-
const { error } =
|
|
726
|
+
async trackShipment({ shipmentId } = {}, { headers } = { headers: false }) {
|
|
727
|
+
const { error } = OrderApplicationValidator.trackShipment().validate(
|
|
670
728
|
{ shipmentId },
|
|
671
729
|
{ abortEarly: false, allowUnknown: true }
|
|
672
730
|
);
|
|
@@ -675,16 +733,17 @@ class Order {
|
|
|
675
733
|
}
|
|
676
734
|
|
|
677
735
|
// Showing warrnings if extra unknown parameters are found
|
|
678
|
-
const {
|
|
736
|
+
const {
|
|
737
|
+
error: warrning,
|
|
738
|
+
} = OrderApplicationValidator.trackShipment().validate(
|
|
679
739
|
{ shipmentId },
|
|
680
740
|
{ abortEarly: false, allowUnknown: false }
|
|
681
741
|
);
|
|
682
742
|
if (warrning) {
|
|
683
743
|
Logger({
|
|
684
744
|
level: "WARN",
|
|
685
|
-
message:
|
|
745
|
+
message: `Parameter Validation warrnings for application > Order > trackShipment \n ${warrning}`,
|
|
686
746
|
});
|
|
687
|
-
Logger({ level: "WARN", message: warrning });
|
|
688
747
|
}
|
|
689
748
|
|
|
690
749
|
const query_params = {};
|
|
@@ -700,10 +759,18 @@ class Order {
|
|
|
700
759
|
}),
|
|
701
760
|
query_params,
|
|
702
761
|
undefined,
|
|
703
|
-
xHeaders
|
|
762
|
+
xHeaders,
|
|
763
|
+
{ headers }
|
|
704
764
|
);
|
|
705
765
|
|
|
706
|
-
|
|
766
|
+
let responseData = response;
|
|
767
|
+
if (headers) {
|
|
768
|
+
responseData = response[0];
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
const {
|
|
772
|
+
error: res_error,
|
|
773
|
+
} = OrderApplicationModel.ShipmentTrack().validate(responseData, {
|
|
707
774
|
abortEarly: false,
|
|
708
775
|
allowUnknown: false,
|
|
709
776
|
});
|
|
@@ -711,26 +778,28 @@ class Order {
|
|
|
711
778
|
if (res_error) {
|
|
712
779
|
Logger({
|
|
713
780
|
level: "WARN",
|
|
714
|
-
message:
|
|
781
|
+
message: `Response Validation Warnnings for application > Order > trackShipment \n ${res_error}`,
|
|
715
782
|
});
|
|
716
|
-
Logger({ level: "WARN", message: res_error });
|
|
717
783
|
}
|
|
718
784
|
|
|
719
785
|
return response;
|
|
720
786
|
}
|
|
721
787
|
|
|
722
788
|
/**
|
|
723
|
-
* @param {
|
|
724
|
-
* @param {
|
|
725
|
-
*
|
|
726
|
-
*
|
|
727
|
-
*
|
|
728
|
-
* @
|
|
789
|
+
* @param {OrderApplicationValidator.UpdateShipmentStatusParam} arg - Arg object.
|
|
790
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
791
|
+
* @returns {Promise<OrderApplicationModel.ShipmentApplicationStatusResponse>}
|
|
792
|
+
* - Success response
|
|
793
|
+
*
|
|
794
|
+
* @name updateShipmentStatus
|
|
729
795
|
* @summary: Update the shipment status
|
|
730
|
-
* @description: Use this API to update the status of a shipment using its shipment ID.
|
|
796
|
+
* @description: Use this API to update the status of a shipment using its shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/updateShipmentStatus/).
|
|
731
797
|
*/
|
|
732
|
-
async updateShipmentStatus(
|
|
733
|
-
|
|
798
|
+
async updateShipmentStatus(
|
|
799
|
+
{ shipmentId, body } = {},
|
|
800
|
+
{ headers } = { headers: false }
|
|
801
|
+
) {
|
|
802
|
+
const { error } = OrderApplicationValidator.updateShipmentStatus().validate(
|
|
734
803
|
{ shipmentId, body },
|
|
735
804
|
{ abortEarly: false, allowUnknown: true }
|
|
736
805
|
);
|
|
@@ -739,16 +808,17 @@ class Order {
|
|
|
739
808
|
}
|
|
740
809
|
|
|
741
810
|
// Showing warrnings if extra unknown parameters are found
|
|
742
|
-
const {
|
|
811
|
+
const {
|
|
812
|
+
error: warrning,
|
|
813
|
+
} = OrderApplicationValidator.updateShipmentStatus().validate(
|
|
743
814
|
{ shipmentId, body },
|
|
744
815
|
{ abortEarly: false, allowUnknown: false }
|
|
745
816
|
);
|
|
746
817
|
if (warrning) {
|
|
747
818
|
Logger({
|
|
748
819
|
level: "WARN",
|
|
749
|
-
message:
|
|
820
|
+
message: `Parameter Validation warrnings for application > Order > updateShipmentStatus \n ${warrning}`,
|
|
750
821
|
});
|
|
751
|
-
Logger({ level: "WARN", message: warrning });
|
|
752
822
|
}
|
|
753
823
|
|
|
754
824
|
const query_params = {};
|
|
@@ -764,41 +834,47 @@ class Order {
|
|
|
764
834
|
}),
|
|
765
835
|
query_params,
|
|
766
836
|
body,
|
|
767
|
-
xHeaders
|
|
837
|
+
xHeaders,
|
|
838
|
+
{ headers }
|
|
768
839
|
);
|
|
769
840
|
|
|
841
|
+
let responseData = response;
|
|
842
|
+
if (headers) {
|
|
843
|
+
responseData = response[0];
|
|
844
|
+
}
|
|
845
|
+
|
|
770
846
|
const {
|
|
771
847
|
error: res_error,
|
|
772
|
-
} =
|
|
773
|
-
|
|
774
|
-
allowUnknown: false
|
|
775
|
-
|
|
848
|
+
} = OrderApplicationModel.ShipmentApplicationStatusResponse().validate(
|
|
849
|
+
responseData,
|
|
850
|
+
{ abortEarly: false, allowUnknown: false }
|
|
851
|
+
);
|
|
776
852
|
|
|
777
853
|
if (res_error) {
|
|
778
854
|
Logger({
|
|
779
855
|
level: "WARN",
|
|
780
|
-
message:
|
|
856
|
+
message: `Response Validation Warnnings for application > Order > updateShipmentStatus \n ${res_error}`,
|
|
781
857
|
});
|
|
782
|
-
Logger({ level: "WARN", message: res_error });
|
|
783
858
|
}
|
|
784
859
|
|
|
785
860
|
return response;
|
|
786
861
|
}
|
|
787
862
|
|
|
788
863
|
/**
|
|
789
|
-
* @param {
|
|
790
|
-
* @param {
|
|
791
|
-
*
|
|
792
|
-
* @
|
|
793
|
-
* multiple items and may get divided into one or more shipment, each
|
|
794
|
-
* having its own ID.
|
|
795
|
-
* @param {VerifyOtp} arg.body
|
|
796
|
-
* @returns {Promise<VerifyOtpResponse>} - Success response
|
|
864
|
+
* @param {OrderApplicationValidator.VerifyOtpShipmentCustomerParam} arg - Arg object.
|
|
865
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
866
|
+
* @returns {Promise<OrderApplicationModel.VerifyOtpResponse>} - Success response
|
|
867
|
+
* @name verifyOtpShipmentCustomer
|
|
797
868
|
* @summary: Verify Otp code
|
|
798
|
-
* @description: Use this API to verify OTP and create a session token with custom payload.
|
|
869
|
+
* @description: Use this API to verify OTP and create a session token with custom payload. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/verifyOtpShipmentCustomer/).
|
|
799
870
|
*/
|
|
800
|
-
async verifyOtpShipmentCustomer(
|
|
801
|
-
|
|
871
|
+
async verifyOtpShipmentCustomer(
|
|
872
|
+
{ orderId, shipmentId, body } = {},
|
|
873
|
+
{ headers } = { headers: false }
|
|
874
|
+
) {
|
|
875
|
+
const {
|
|
876
|
+
error,
|
|
877
|
+
} = OrderApplicationValidator.verifyOtpShipmentCustomer().validate(
|
|
802
878
|
{ orderId, shipmentId, body },
|
|
803
879
|
{ abortEarly: false, allowUnknown: true }
|
|
804
880
|
);
|
|
@@ -809,16 +885,15 @@ class Order {
|
|
|
809
885
|
// Showing warrnings if extra unknown parameters are found
|
|
810
886
|
const {
|
|
811
887
|
error: warrning,
|
|
812
|
-
} =
|
|
888
|
+
} = OrderApplicationValidator.verifyOtpShipmentCustomer().validate(
|
|
813
889
|
{ orderId, shipmentId, body },
|
|
814
890
|
{ abortEarly: false, allowUnknown: false }
|
|
815
891
|
);
|
|
816
892
|
if (warrning) {
|
|
817
893
|
Logger({
|
|
818
894
|
level: "WARN",
|
|
819
|
-
message:
|
|
895
|
+
message: `Parameter Validation warrnings for application > Order > verifyOtpShipmentCustomer \n ${warrning}`,
|
|
820
896
|
});
|
|
821
|
-
Logger({ level: "WARN", message: warrning });
|
|
822
897
|
}
|
|
823
898
|
|
|
824
899
|
const query_params = {};
|
|
@@ -834,12 +909,18 @@ class Order {
|
|
|
834
909
|
}),
|
|
835
910
|
query_params,
|
|
836
911
|
body,
|
|
837
|
-
xHeaders
|
|
912
|
+
xHeaders,
|
|
913
|
+
{ headers }
|
|
838
914
|
);
|
|
839
915
|
|
|
916
|
+
let responseData = response;
|
|
917
|
+
if (headers) {
|
|
918
|
+
responseData = response[0];
|
|
919
|
+
}
|
|
920
|
+
|
|
840
921
|
const {
|
|
841
922
|
error: res_error,
|
|
842
|
-
} =
|
|
923
|
+
} = OrderApplicationModel.VerifyOtpResponse().validate(responseData, {
|
|
843
924
|
abortEarly: false,
|
|
844
925
|
allowUnknown: false,
|
|
845
926
|
});
|
|
@@ -847,9 +928,8 @@ class Order {
|
|
|
847
928
|
if (res_error) {
|
|
848
929
|
Logger({
|
|
849
930
|
level: "WARN",
|
|
850
|
-
message:
|
|
931
|
+
message: `Response Validation Warnnings for application > Order > verifyOtpShipmentCustomer \n ${res_error}`,
|
|
851
932
|
});
|
|
852
|
-
Logger({ level: "WARN", message: res_error });
|
|
853
933
|
}
|
|
854
934
|
|
|
855
935
|
return response;
|