@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const Paginator = require("../../common/Paginator");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const OrderPlatformValidator = require("./OrderPlatformValidator");
|
|
5
|
+
const OrderPlatformModel = require("./OrderPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -12,14 +12,15 @@ class Order {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @param {
|
|
16
|
-
* @param {
|
|
17
|
-
* @returns {Promise<AttachOrderUserResponse>} - Success response
|
|
15
|
+
* @param {OrderPlatformValidator.AttachOrderUserParam} arg - Arg object
|
|
16
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
17
|
+
* @returns {Promise<OrderPlatformModel.AttachOrderUserResponse>} - Success response
|
|
18
|
+
* @name attachOrderUser
|
|
18
19
|
* @summary:
|
|
19
|
-
* @description:
|
|
20
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/attachOrderUser/).
|
|
20
21
|
*/
|
|
21
|
-
async attachOrderUser({ body } = {}) {
|
|
22
|
-
const { error } =
|
|
22
|
+
async attachOrderUser({ body } = {}, { headers } = { headers: false }) {
|
|
23
|
+
const { error } = OrderPlatformValidator.attachOrderUser().validate(
|
|
23
24
|
{
|
|
24
25
|
body,
|
|
25
26
|
},
|
|
@@ -30,7 +31,9 @@ class Order {
|
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
// Showing warrnings if extra unknown parameters are found
|
|
33
|
-
const {
|
|
34
|
+
const {
|
|
35
|
+
error: warrning,
|
|
36
|
+
} = OrderPlatformValidator.attachOrderUser().validate(
|
|
34
37
|
{
|
|
35
38
|
body,
|
|
36
39
|
},
|
|
@@ -39,9 +42,8 @@ class Order {
|
|
|
39
42
|
if (warrning) {
|
|
40
43
|
Logger({
|
|
41
44
|
level: "WARN",
|
|
42
|
-
message:
|
|
45
|
+
message: `Parameter Validation warrnings for platform > Order > attachOrderUser \n ${warrning}`,
|
|
43
46
|
});
|
|
44
|
-
Logger({ level: "WARN", message: warrning });
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
const query_params = {};
|
|
@@ -54,12 +56,18 @@ class Order {
|
|
|
54
56
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/attach`,
|
|
55
57
|
query_params,
|
|
56
58
|
body,
|
|
57
|
-
xHeaders
|
|
59
|
+
xHeaders,
|
|
60
|
+
{ headers }
|
|
58
61
|
);
|
|
59
62
|
|
|
63
|
+
let responseData = response;
|
|
64
|
+
if (headers) {
|
|
65
|
+
responseData = response[0];
|
|
66
|
+
}
|
|
67
|
+
|
|
60
68
|
const {
|
|
61
69
|
error: res_error,
|
|
62
|
-
} =
|
|
70
|
+
} = OrderPlatformModel.AttachOrderUserResponse().validate(responseData, {
|
|
63
71
|
abortEarly: false,
|
|
64
72
|
allowUnknown: false,
|
|
65
73
|
});
|
|
@@ -67,23 +75,23 @@ class Order {
|
|
|
67
75
|
if (res_error) {
|
|
68
76
|
Logger({
|
|
69
77
|
level: "WARN",
|
|
70
|
-
message:
|
|
78
|
+
message: `Response Validation Warnnings for platform > Order > attachOrderUser \n ${res_error}`,
|
|
71
79
|
});
|
|
72
|
-
Logger({ level: "WARN", message: res_error });
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
return response;
|
|
76
83
|
}
|
|
77
84
|
|
|
78
85
|
/**
|
|
79
|
-
* @param {
|
|
80
|
-
* @param {
|
|
81
|
-
* @returns {Promise<OrderStatusResult>} - Success response
|
|
86
|
+
* @param {OrderPlatformValidator.CheckOrderStatusParam} arg - Arg object
|
|
87
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
88
|
+
* @returns {Promise<OrderPlatformModel.OrderStatusResult>} - Success response
|
|
89
|
+
* @name checkOrderStatus
|
|
82
90
|
* @summary:
|
|
83
|
-
* @description:
|
|
91
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/checkOrderStatus/).
|
|
84
92
|
*/
|
|
85
|
-
async checkOrderStatus({ body } = {}) {
|
|
86
|
-
const { error } =
|
|
93
|
+
async checkOrderStatus({ body } = {}, { headers } = { headers: false }) {
|
|
94
|
+
const { error } = OrderPlatformValidator.checkOrderStatus().validate(
|
|
87
95
|
{
|
|
88
96
|
body,
|
|
89
97
|
},
|
|
@@ -94,7 +102,9 @@ class Order {
|
|
|
94
102
|
}
|
|
95
103
|
|
|
96
104
|
// Showing warrnings if extra unknown parameters are found
|
|
97
|
-
const {
|
|
105
|
+
const {
|
|
106
|
+
error: warrning,
|
|
107
|
+
} = OrderPlatformValidator.checkOrderStatus().validate(
|
|
98
108
|
{
|
|
99
109
|
body,
|
|
100
110
|
},
|
|
@@ -103,9 +113,8 @@ class Order {
|
|
|
103
113
|
if (warrning) {
|
|
104
114
|
Logger({
|
|
105
115
|
level: "WARN",
|
|
106
|
-
message:
|
|
116
|
+
message: `Parameter Validation warrnings for platform > Order > checkOrderStatus \n ${warrning}`,
|
|
107
117
|
});
|
|
108
|
-
Logger({ level: "WARN", message: warrning });
|
|
109
118
|
}
|
|
110
119
|
|
|
111
120
|
const query_params = {};
|
|
@@ -118,12 +127,18 @@ class Order {
|
|
|
118
127
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/debug/order_status`,
|
|
119
128
|
query_params,
|
|
120
129
|
body,
|
|
121
|
-
xHeaders
|
|
130
|
+
xHeaders,
|
|
131
|
+
{ headers }
|
|
122
132
|
);
|
|
123
133
|
|
|
134
|
+
let responseData = response;
|
|
135
|
+
if (headers) {
|
|
136
|
+
responseData = response[0];
|
|
137
|
+
}
|
|
138
|
+
|
|
124
139
|
const {
|
|
125
140
|
error: res_error,
|
|
126
|
-
} =
|
|
141
|
+
} = OrderPlatformModel.OrderStatusResult().validate(responseData, {
|
|
127
142
|
abortEarly: false,
|
|
128
143
|
allowUnknown: false,
|
|
129
144
|
});
|
|
@@ -131,34 +146,26 @@ class Order {
|
|
|
131
146
|
if (res_error) {
|
|
132
147
|
Logger({
|
|
133
148
|
level: "WARN",
|
|
134
|
-
message:
|
|
149
|
+
message: `Response Validation Warnnings for platform > Order > checkOrderStatus \n ${res_error}`,
|
|
135
150
|
});
|
|
136
|
-
Logger({ level: "WARN", message: res_error });
|
|
137
151
|
}
|
|
138
152
|
|
|
139
153
|
return response;
|
|
140
154
|
}
|
|
141
155
|
|
|
142
156
|
/**
|
|
143
|
-
* @param {
|
|
144
|
-
* @param {
|
|
145
|
-
* @
|
|
146
|
-
* @
|
|
147
|
-
* @param {string} [arg.callerId] - Caller Id
|
|
148
|
-
* @param {string} [arg.method] - Provider Method to Call
|
|
149
|
-
* @returns {Promise<Click2CallResponse>} - Success response
|
|
157
|
+
* @param {OrderPlatformValidator.Click2CallParam} arg - Arg object
|
|
158
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
159
|
+
* @returns {Promise<OrderPlatformModel.Click2CallResponse>} - Success response
|
|
160
|
+
* @name click2Call
|
|
150
161
|
* @summary:
|
|
151
|
-
* @description:
|
|
162
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/click2Call/).
|
|
152
163
|
*/
|
|
153
|
-
async click2Call(
|
|
154
|
-
caller,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
callerId,
|
|
159
|
-
method,
|
|
160
|
-
} = {}) {
|
|
161
|
-
const { error } = OrderValidator.click2Call().validate(
|
|
164
|
+
async click2Call(
|
|
165
|
+
{ caller, receiver, bagId, callerId, method } = {},
|
|
166
|
+
{ headers } = { headers: false }
|
|
167
|
+
) {
|
|
168
|
+
const { error } = OrderPlatformValidator.click2Call().validate(
|
|
162
169
|
{
|
|
163
170
|
caller,
|
|
164
171
|
receiver,
|
|
@@ -174,7 +181,7 @@ class Order {
|
|
|
174
181
|
}
|
|
175
182
|
|
|
176
183
|
// Showing warrnings if extra unknown parameters are found
|
|
177
|
-
const { error: warrning } =
|
|
184
|
+
const { error: warrning } = OrderPlatformValidator.click2Call().validate(
|
|
178
185
|
{
|
|
179
186
|
caller,
|
|
180
187
|
receiver,
|
|
@@ -188,9 +195,8 @@ class Order {
|
|
|
188
195
|
if (warrning) {
|
|
189
196
|
Logger({
|
|
190
197
|
level: "WARN",
|
|
191
|
-
message:
|
|
198
|
+
message: `Parameter Validation warrnings for platform > Order > click2Call \n ${warrning}`,
|
|
192
199
|
});
|
|
193
|
-
Logger({ level: "WARN", message: warrning });
|
|
194
200
|
}
|
|
195
201
|
|
|
196
202
|
const query_params = {};
|
|
@@ -208,12 +214,18 @@ class Order {
|
|
|
208
214
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/ninja/click2call`,
|
|
209
215
|
query_params,
|
|
210
216
|
undefined,
|
|
211
|
-
xHeaders
|
|
217
|
+
xHeaders,
|
|
218
|
+
{ headers }
|
|
212
219
|
);
|
|
213
220
|
|
|
221
|
+
let responseData = response;
|
|
222
|
+
if (headers) {
|
|
223
|
+
responseData = response[0];
|
|
224
|
+
}
|
|
225
|
+
|
|
214
226
|
const {
|
|
215
227
|
error: res_error,
|
|
216
|
-
} =
|
|
228
|
+
} = OrderPlatformModel.Click2CallResponse().validate(responseData, {
|
|
217
229
|
abortEarly: false,
|
|
218
230
|
allowUnknown: false,
|
|
219
231
|
});
|
|
@@ -221,23 +233,24 @@ class Order {
|
|
|
221
233
|
if (res_error) {
|
|
222
234
|
Logger({
|
|
223
235
|
level: "WARN",
|
|
224
|
-
message:
|
|
236
|
+
message: `Response Validation Warnnings for platform > Order > click2Call \n ${res_error}`,
|
|
225
237
|
});
|
|
226
|
-
Logger({ level: "WARN", message: res_error });
|
|
227
238
|
}
|
|
228
239
|
|
|
229
240
|
return response;
|
|
230
241
|
}
|
|
231
242
|
|
|
232
243
|
/**
|
|
233
|
-
* @param {
|
|
234
|
-
* @param {
|
|
235
|
-
* @returns {Promise<CreateChannelConfigResponse>} -
|
|
244
|
+
* @param {OrderPlatformValidator.CreateChannelConfigParam} arg - Arg object
|
|
245
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
246
|
+
* @returns {Promise<OrderPlatformModel.CreateChannelConfigResponse>} -
|
|
247
|
+
* Success response
|
|
248
|
+
* @name createChannelConfig
|
|
236
249
|
* @summary:
|
|
237
|
-
* @description: createChannelConfig
|
|
250
|
+
* @description: createChannelConfig - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createChannelConfig/).
|
|
238
251
|
*/
|
|
239
|
-
async createChannelConfig({ body } = {}) {
|
|
240
|
-
const { error } =
|
|
252
|
+
async createChannelConfig({ body } = {}, { headers } = { headers: false }) {
|
|
253
|
+
const { error } = OrderPlatformValidator.createChannelConfig().validate(
|
|
241
254
|
{
|
|
242
255
|
body,
|
|
243
256
|
},
|
|
@@ -248,7 +261,9 @@ class Order {
|
|
|
248
261
|
}
|
|
249
262
|
|
|
250
263
|
// Showing warrnings if extra unknown parameters are found
|
|
251
|
-
const {
|
|
264
|
+
const {
|
|
265
|
+
error: warrning,
|
|
266
|
+
} = OrderPlatformValidator.createChannelConfig().validate(
|
|
252
267
|
{
|
|
253
268
|
body,
|
|
254
269
|
},
|
|
@@ -257,9 +272,8 @@ class Order {
|
|
|
257
272
|
if (warrning) {
|
|
258
273
|
Logger({
|
|
259
274
|
level: "WARN",
|
|
260
|
-
message:
|
|
275
|
+
message: `Parameter Validation warrnings for platform > Order > createChannelConfig \n ${warrning}`,
|
|
261
276
|
});
|
|
262
|
-
Logger({ level: "WARN", message: warrning });
|
|
263
277
|
}
|
|
264
278
|
|
|
265
279
|
const query_params = {};
|
|
@@ -272,36 +286,42 @@ class Order {
|
|
|
272
286
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
273
287
|
query_params,
|
|
274
288
|
body,
|
|
275
|
-
xHeaders
|
|
289
|
+
xHeaders,
|
|
290
|
+
{ headers }
|
|
276
291
|
);
|
|
277
292
|
|
|
293
|
+
let responseData = response;
|
|
294
|
+
if (headers) {
|
|
295
|
+
responseData = response[0];
|
|
296
|
+
}
|
|
297
|
+
|
|
278
298
|
const {
|
|
279
299
|
error: res_error,
|
|
280
|
-
} =
|
|
281
|
-
|
|
282
|
-
allowUnknown: false
|
|
283
|
-
|
|
300
|
+
} = OrderPlatformModel.CreateChannelConfigResponse().validate(
|
|
301
|
+
responseData,
|
|
302
|
+
{ abortEarly: false, allowUnknown: false }
|
|
303
|
+
);
|
|
284
304
|
|
|
285
305
|
if (res_error) {
|
|
286
306
|
Logger({
|
|
287
307
|
level: "WARN",
|
|
288
|
-
message:
|
|
308
|
+
message: `Response Validation Warnnings for platform > Order > createChannelConfig \n ${res_error}`,
|
|
289
309
|
});
|
|
290
|
-
Logger({ level: "WARN", message: res_error });
|
|
291
310
|
}
|
|
292
311
|
|
|
293
312
|
return response;
|
|
294
313
|
}
|
|
295
314
|
|
|
296
315
|
/**
|
|
297
|
-
* @param {
|
|
298
|
-
* @param {
|
|
299
|
-
* @returns {Promise<CreateOrderResponse>} - Success response
|
|
316
|
+
* @param {OrderPlatformValidator.CreateOrderParam} arg - Arg object
|
|
317
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
318
|
+
* @returns {Promise<OrderPlatformModel.CreateOrderResponse>} - Success response
|
|
319
|
+
* @name createOrder
|
|
300
320
|
* @summary:
|
|
301
|
-
* @description:
|
|
321
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/).
|
|
302
322
|
*/
|
|
303
|
-
async createOrder({ body } = {}) {
|
|
304
|
-
const { error } =
|
|
323
|
+
async createOrder({ body } = {}, { headers } = { headers: false }) {
|
|
324
|
+
const { error } = OrderPlatformValidator.createOrder().validate(
|
|
305
325
|
{
|
|
306
326
|
body,
|
|
307
327
|
},
|
|
@@ -312,7 +332,7 @@ class Order {
|
|
|
312
332
|
}
|
|
313
333
|
|
|
314
334
|
// Showing warrnings if extra unknown parameters are found
|
|
315
|
-
const { error: warrning } =
|
|
335
|
+
const { error: warrning } = OrderPlatformValidator.createOrder().validate(
|
|
316
336
|
{
|
|
317
337
|
body,
|
|
318
338
|
},
|
|
@@ -321,9 +341,8 @@ class Order {
|
|
|
321
341
|
if (warrning) {
|
|
322
342
|
Logger({
|
|
323
343
|
level: "WARN",
|
|
324
|
-
message:
|
|
344
|
+
message: `Parameter Validation warrnings for platform > Order > createOrder \n ${warrning}`,
|
|
325
345
|
});
|
|
326
|
-
Logger({ level: "WARN", message: warrning });
|
|
327
346
|
}
|
|
328
347
|
|
|
329
348
|
const query_params = {};
|
|
@@ -336,12 +355,18 @@ class Order {
|
|
|
336
355
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/create-order`,
|
|
337
356
|
query_params,
|
|
338
357
|
body,
|
|
339
|
-
xHeaders
|
|
358
|
+
xHeaders,
|
|
359
|
+
{ headers }
|
|
340
360
|
);
|
|
341
361
|
|
|
362
|
+
let responseData = response;
|
|
363
|
+
if (headers) {
|
|
364
|
+
responseData = response[0];
|
|
365
|
+
}
|
|
366
|
+
|
|
342
367
|
const {
|
|
343
368
|
error: res_error,
|
|
344
|
-
} =
|
|
369
|
+
} = OrderPlatformModel.CreateOrderResponse().validate(responseData, {
|
|
345
370
|
abortEarly: false,
|
|
346
371
|
allowUnknown: false,
|
|
347
372
|
});
|
|
@@ -349,23 +374,23 @@ class Order {
|
|
|
349
374
|
if (res_error) {
|
|
350
375
|
Logger({
|
|
351
376
|
level: "WARN",
|
|
352
|
-
message:
|
|
377
|
+
message: `Response Validation Warnnings for platform > Order > createOrder \n ${res_error}`,
|
|
353
378
|
});
|
|
354
|
-
Logger({ level: "WARN", message: res_error });
|
|
355
379
|
}
|
|
356
380
|
|
|
357
381
|
return response;
|
|
358
382
|
}
|
|
359
383
|
|
|
360
384
|
/**
|
|
361
|
-
* @param {
|
|
362
|
-
* @param {
|
|
363
|
-
* @returns {Promise<SuccessResponse>} - Success response
|
|
385
|
+
* @param {OrderPlatformValidator.DispatchManifestParam} arg - Arg object
|
|
386
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
387
|
+
* @returns {Promise<OrderPlatformModel.SuccessResponse>} - Success response
|
|
388
|
+
* @name dispatchManifest
|
|
364
389
|
* @summary:
|
|
365
|
-
* @description:
|
|
390
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifest/).
|
|
366
391
|
*/
|
|
367
|
-
async dispatchManifest({ body } = {}) {
|
|
368
|
-
const { error } =
|
|
392
|
+
async dispatchManifest({ body } = {}, { headers } = { headers: false }) {
|
|
393
|
+
const { error } = OrderPlatformValidator.dispatchManifest().validate(
|
|
369
394
|
{
|
|
370
395
|
body,
|
|
371
396
|
},
|
|
@@ -376,7 +401,9 @@ class Order {
|
|
|
376
401
|
}
|
|
377
402
|
|
|
378
403
|
// Showing warrnings if extra unknown parameters are found
|
|
379
|
-
const {
|
|
404
|
+
const {
|
|
405
|
+
error: warrning,
|
|
406
|
+
} = OrderPlatformValidator.dispatchManifest().validate(
|
|
380
407
|
{
|
|
381
408
|
body,
|
|
382
409
|
},
|
|
@@ -385,9 +412,8 @@ class Order {
|
|
|
385
412
|
if (warrning) {
|
|
386
413
|
Logger({
|
|
387
414
|
level: "WARN",
|
|
388
|
-
message:
|
|
415
|
+
message: `Parameter Validation warrnings for platform > Order > dispatchManifest \n ${warrning}`,
|
|
389
416
|
});
|
|
390
|
-
Logger({ level: "WARN", message: warrning });
|
|
391
417
|
}
|
|
392
418
|
|
|
393
419
|
const query_params = {};
|
|
@@ -400,34 +426,47 @@ class Order {
|
|
|
400
426
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/dispatch`,
|
|
401
427
|
query_params,
|
|
402
428
|
body,
|
|
403
|
-
xHeaders
|
|
429
|
+
xHeaders,
|
|
430
|
+
{ headers }
|
|
404
431
|
);
|
|
405
432
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
433
|
+
let responseData = response;
|
|
434
|
+
if (headers) {
|
|
435
|
+
responseData = response[0];
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
const {
|
|
439
|
+
error: res_error,
|
|
440
|
+
} = OrderPlatformModel.SuccessResponse().validate(responseData, {
|
|
441
|
+
abortEarly: false,
|
|
442
|
+
allowUnknown: false,
|
|
443
|
+
});
|
|
410
444
|
|
|
411
445
|
if (res_error) {
|
|
412
446
|
Logger({
|
|
413
447
|
level: "WARN",
|
|
414
|
-
message:
|
|
448
|
+
message: `Response Validation Warnnings for platform > Order > dispatchManifest \n ${res_error}`,
|
|
415
449
|
});
|
|
416
|
-
Logger({ level: "WARN", message: res_error });
|
|
417
450
|
}
|
|
418
451
|
|
|
419
452
|
return response;
|
|
420
453
|
}
|
|
421
454
|
|
|
422
455
|
/**
|
|
423
|
-
* @param {
|
|
424
|
-
* @param {
|
|
425
|
-
* @returns {Promise<FileResponse>} - Success response
|
|
456
|
+
* @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object
|
|
457
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
458
|
+
* @returns {Promise<OrderPlatformModel.FileResponse>} - Success response
|
|
459
|
+
* @name downloadBulkActionTemplate
|
|
426
460
|
* @summary:
|
|
427
|
-
* @description:
|
|
461
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadBulkActionTemplate/).
|
|
428
462
|
*/
|
|
429
|
-
async downloadBulkActionTemplate(
|
|
430
|
-
|
|
463
|
+
async downloadBulkActionTemplate(
|
|
464
|
+
{ templateSlug } = {},
|
|
465
|
+
{ headers } = { headers: false }
|
|
466
|
+
) {
|
|
467
|
+
const {
|
|
468
|
+
error,
|
|
469
|
+
} = OrderPlatformValidator.downloadBulkActionTemplate().validate(
|
|
431
470
|
{
|
|
432
471
|
templateSlug,
|
|
433
472
|
},
|
|
@@ -440,7 +479,7 @@ class Order {
|
|
|
440
479
|
// Showing warrnings if extra unknown parameters are found
|
|
441
480
|
const {
|
|
442
481
|
error: warrning,
|
|
443
|
-
} =
|
|
482
|
+
} = OrderPlatformValidator.downloadBulkActionTemplate().validate(
|
|
444
483
|
{
|
|
445
484
|
templateSlug,
|
|
446
485
|
},
|
|
@@ -449,10 +488,8 @@ class Order {
|
|
|
449
488
|
if (warrning) {
|
|
450
489
|
Logger({
|
|
451
490
|
level: "WARN",
|
|
452
|
-
message:
|
|
453
|
-
"Parameter Validation warrnings for downloadBulkActionTemplate",
|
|
491
|
+
message: `Parameter Validation warrnings for platform > Order > downloadBulkActionTemplate \n ${warrning}`,
|
|
454
492
|
});
|
|
455
|
-
Logger({ level: "WARN", message: warrning });
|
|
456
493
|
}
|
|
457
494
|
|
|
458
495
|
const query_params = {};
|
|
@@ -466,10 +503,18 @@ class Order {
|
|
|
466
503
|
`/service/platform/order/v1.0/company/${this.config.companyId}/bulk-action/download-seller-templates`,
|
|
467
504
|
query_params,
|
|
468
505
|
undefined,
|
|
469
|
-
xHeaders
|
|
506
|
+
xHeaders,
|
|
507
|
+
{ headers }
|
|
470
508
|
);
|
|
471
509
|
|
|
472
|
-
|
|
510
|
+
let responseData = response;
|
|
511
|
+
if (headers) {
|
|
512
|
+
responseData = response[0];
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
const {
|
|
516
|
+
error: res_error,
|
|
517
|
+
} = OrderPlatformModel.FileResponse().validate(responseData, {
|
|
473
518
|
abortEarly: false,
|
|
474
519
|
allowUnknown: false,
|
|
475
520
|
});
|
|
@@ -477,23 +522,30 @@ class Order {
|
|
|
477
522
|
if (res_error) {
|
|
478
523
|
Logger({
|
|
479
524
|
level: "WARN",
|
|
480
|
-
message:
|
|
525
|
+
message: `Response Validation Warnnings for platform > Order > downloadBulkActionTemplate \n ${res_error}`,
|
|
481
526
|
});
|
|
482
|
-
Logger({ level: "WARN", message: res_error });
|
|
483
527
|
}
|
|
484
528
|
|
|
485
529
|
return response;
|
|
486
530
|
}
|
|
487
531
|
|
|
488
532
|
/**
|
|
489
|
-
* @param {
|
|
490
|
-
* @param {
|
|
491
|
-
* @returns {Promise<FetchCreditBalanceResponsePayload>}
|
|
533
|
+
* @param {OrderPlatformValidator.FetchCreditBalanceDetailParam} arg - Arg object
|
|
534
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
535
|
+
* @returns {Promise<OrderPlatformModel.FetchCreditBalanceResponsePayload>}
|
|
536
|
+
* - Success response
|
|
537
|
+
*
|
|
538
|
+
* @name fetchCreditBalanceDetail
|
|
492
539
|
* @summary:
|
|
493
|
-
* @description:
|
|
540
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchCreditBalanceDetail/).
|
|
494
541
|
*/
|
|
495
|
-
async fetchCreditBalanceDetail(
|
|
496
|
-
|
|
542
|
+
async fetchCreditBalanceDetail(
|
|
543
|
+
{ body } = {},
|
|
544
|
+
{ headers } = { headers: false }
|
|
545
|
+
) {
|
|
546
|
+
const {
|
|
547
|
+
error,
|
|
548
|
+
} = OrderPlatformValidator.fetchCreditBalanceDetail().validate(
|
|
497
549
|
{
|
|
498
550
|
body,
|
|
499
551
|
},
|
|
@@ -506,7 +558,7 @@ class Order {
|
|
|
506
558
|
// Showing warrnings if extra unknown parameters are found
|
|
507
559
|
const {
|
|
508
560
|
error: warrning,
|
|
509
|
-
} =
|
|
561
|
+
} = OrderPlatformValidator.fetchCreditBalanceDetail().validate(
|
|
510
562
|
{
|
|
511
563
|
body,
|
|
512
564
|
},
|
|
@@ -515,9 +567,8 @@ class Order {
|
|
|
515
567
|
if (warrning) {
|
|
516
568
|
Logger({
|
|
517
569
|
level: "WARN",
|
|
518
|
-
message:
|
|
570
|
+
message: `Parameter Validation warrnings for platform > Order > fetchCreditBalanceDetail \n ${warrning}`,
|
|
519
571
|
});
|
|
520
|
-
Logger({ level: "WARN", message: warrning });
|
|
521
572
|
}
|
|
522
573
|
|
|
523
574
|
const query_params = {};
|
|
@@ -530,36 +581,43 @@ class Order {
|
|
|
530
581
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/customer-credit-balance`,
|
|
531
582
|
query_params,
|
|
532
583
|
body,
|
|
533
|
-
xHeaders
|
|
584
|
+
xHeaders,
|
|
585
|
+
{ headers }
|
|
534
586
|
);
|
|
535
587
|
|
|
588
|
+
let responseData = response;
|
|
589
|
+
if (headers) {
|
|
590
|
+
responseData = response[0];
|
|
591
|
+
}
|
|
592
|
+
|
|
536
593
|
const {
|
|
537
594
|
error: res_error,
|
|
538
|
-
} =
|
|
539
|
-
|
|
540
|
-
allowUnknown: false
|
|
541
|
-
|
|
595
|
+
} = OrderPlatformModel.FetchCreditBalanceResponsePayload().validate(
|
|
596
|
+
responseData,
|
|
597
|
+
{ abortEarly: false, allowUnknown: false }
|
|
598
|
+
);
|
|
542
599
|
|
|
543
600
|
if (res_error) {
|
|
544
601
|
Logger({
|
|
545
602
|
level: "WARN",
|
|
546
|
-
message:
|
|
603
|
+
message: `Response Validation Warnnings for platform > Order > fetchCreditBalanceDetail \n ${res_error}`,
|
|
547
604
|
});
|
|
548
|
-
Logger({ level: "WARN", message: res_error });
|
|
549
605
|
}
|
|
550
606
|
|
|
551
607
|
return response;
|
|
552
608
|
}
|
|
553
609
|
|
|
554
610
|
/**
|
|
555
|
-
* @param {
|
|
556
|
-
* @param {
|
|
557
|
-
* @returns {Promise<RefundModeConfigResponsePayload>} -
|
|
611
|
+
* @param {OrderPlatformValidator.FetchRefundModeConfigParam} arg - Arg object
|
|
612
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
613
|
+
* @returns {Promise<OrderPlatformModel.RefundModeConfigResponsePayload>} -
|
|
614
|
+
* Success response
|
|
615
|
+
* @name fetchRefundModeConfig
|
|
558
616
|
* @summary:
|
|
559
|
-
* @description:
|
|
617
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchRefundModeConfig/).
|
|
560
618
|
*/
|
|
561
|
-
async fetchRefundModeConfig({ body } = {}) {
|
|
562
|
-
const { error } =
|
|
619
|
+
async fetchRefundModeConfig({ body } = {}, { headers } = { headers: false }) {
|
|
620
|
+
const { error } = OrderPlatformValidator.fetchRefundModeConfig().validate(
|
|
563
621
|
{
|
|
564
622
|
body,
|
|
565
623
|
},
|
|
@@ -570,7 +628,9 @@ class Order {
|
|
|
570
628
|
}
|
|
571
629
|
|
|
572
630
|
// Showing warrnings if extra unknown parameters are found
|
|
573
|
-
const {
|
|
631
|
+
const {
|
|
632
|
+
error: warrning,
|
|
633
|
+
} = OrderPlatformValidator.fetchRefundModeConfig().validate(
|
|
574
634
|
{
|
|
575
635
|
body,
|
|
576
636
|
},
|
|
@@ -579,9 +639,8 @@ class Order {
|
|
|
579
639
|
if (warrning) {
|
|
580
640
|
Logger({
|
|
581
641
|
level: "WARN",
|
|
582
|
-
message:
|
|
642
|
+
message: `Parameter Validation warrnings for platform > Order > fetchRefundModeConfig \n ${warrning}`,
|
|
583
643
|
});
|
|
584
|
-
Logger({ level: "WARN", message: warrning });
|
|
585
644
|
}
|
|
586
645
|
|
|
587
646
|
const query_params = {};
|
|
@@ -594,42 +653,48 @@ class Order {
|
|
|
594
653
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund-mode-config`,
|
|
595
654
|
query_params,
|
|
596
655
|
body,
|
|
597
|
-
xHeaders
|
|
656
|
+
xHeaders,
|
|
657
|
+
{ headers }
|
|
598
658
|
);
|
|
599
659
|
|
|
660
|
+
let responseData = response;
|
|
661
|
+
if (headers) {
|
|
662
|
+
responseData = response[0];
|
|
663
|
+
}
|
|
664
|
+
|
|
600
665
|
const {
|
|
601
666
|
error: res_error,
|
|
602
|
-
} =
|
|
603
|
-
|
|
604
|
-
allowUnknown: false
|
|
605
|
-
|
|
667
|
+
} = OrderPlatformModel.RefundModeConfigResponsePayload().validate(
|
|
668
|
+
responseData,
|
|
669
|
+
{ abortEarly: false, allowUnknown: false }
|
|
670
|
+
);
|
|
606
671
|
|
|
607
672
|
if (res_error) {
|
|
608
673
|
Logger({
|
|
609
674
|
level: "WARN",
|
|
610
|
-
message:
|
|
675
|
+
message: `Response Validation Warnnings for platform > Order > fetchRefundModeConfig \n ${res_error}`,
|
|
611
676
|
});
|
|
612
|
-
Logger({ level: "WARN", message: res_error });
|
|
613
677
|
}
|
|
614
678
|
|
|
615
679
|
return response;
|
|
616
680
|
}
|
|
617
681
|
|
|
618
682
|
/**
|
|
619
|
-
* @param {
|
|
620
|
-
* @param {
|
|
621
|
-
* @
|
|
622
|
-
*
|
|
623
|
-
* @
|
|
683
|
+
* @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object
|
|
684
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
685
|
+
* @returns {Promise<OrderPlatformModel.GeneratePosOrderReceiptResponse>} -
|
|
686
|
+
* Success response
|
|
687
|
+
* @name generatePOSReceiptByOrderId
|
|
624
688
|
* @summary:
|
|
625
|
-
* @description:
|
|
689
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generatePOSReceiptByOrderId/).
|
|
626
690
|
*/
|
|
627
|
-
async generatePOSReceiptByOrderId(
|
|
628
|
-
orderId,
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
691
|
+
async generatePOSReceiptByOrderId(
|
|
692
|
+
{ orderId, shipmentId, documentType } = {},
|
|
693
|
+
{ headers } = { headers: false }
|
|
694
|
+
) {
|
|
695
|
+
const {
|
|
696
|
+
error,
|
|
697
|
+
} = OrderPlatformValidator.generatePOSReceiptByOrderId().validate(
|
|
633
698
|
{
|
|
634
699
|
orderId,
|
|
635
700
|
shipmentId,
|
|
@@ -644,7 +709,7 @@ class Order {
|
|
|
644
709
|
// Showing warrnings if extra unknown parameters are found
|
|
645
710
|
const {
|
|
646
711
|
error: warrning,
|
|
647
|
-
} =
|
|
712
|
+
} = OrderPlatformValidator.generatePOSReceiptByOrderId().validate(
|
|
648
713
|
{
|
|
649
714
|
orderId,
|
|
650
715
|
shipmentId,
|
|
@@ -655,10 +720,8 @@ class Order {
|
|
|
655
720
|
if (warrning) {
|
|
656
721
|
Logger({
|
|
657
722
|
level: "WARN",
|
|
658
|
-
message:
|
|
659
|
-
"Parameter Validation warrnings for generatePOSReceiptByOrderId",
|
|
723
|
+
message: `Parameter Validation warrnings for platform > Order > generatePOSReceiptByOrderId \n ${warrning}`,
|
|
660
724
|
});
|
|
661
|
-
Logger({ level: "WARN", message: warrning });
|
|
662
725
|
}
|
|
663
726
|
|
|
664
727
|
const query_params = {};
|
|
@@ -673,38 +736,42 @@ class Order {
|
|
|
673
736
|
`/service/platform/order/v1.0/company/${this.config.companyId}/orders/${orderId}/generate/pos-receipt`,
|
|
674
737
|
query_params,
|
|
675
738
|
undefined,
|
|
676
|
-
xHeaders
|
|
739
|
+
xHeaders,
|
|
740
|
+
{ headers }
|
|
677
741
|
);
|
|
678
742
|
|
|
743
|
+
let responseData = response;
|
|
744
|
+
if (headers) {
|
|
745
|
+
responseData = response[0];
|
|
746
|
+
}
|
|
747
|
+
|
|
679
748
|
const {
|
|
680
749
|
error: res_error,
|
|
681
|
-
} =
|
|
682
|
-
|
|
683
|
-
allowUnknown: false
|
|
684
|
-
|
|
750
|
+
} = OrderPlatformModel.GeneratePosOrderReceiptResponse().validate(
|
|
751
|
+
responseData,
|
|
752
|
+
{ abortEarly: false, allowUnknown: false }
|
|
753
|
+
);
|
|
685
754
|
|
|
686
755
|
if (res_error) {
|
|
687
756
|
Logger({
|
|
688
757
|
level: "WARN",
|
|
689
|
-
message:
|
|
690
|
-
"Response Validation Warnnings for generatePOSReceiptByOrderId",
|
|
758
|
+
message: `Response Validation Warnnings for platform > Order > generatePOSReceiptByOrderId \n ${res_error}`,
|
|
691
759
|
});
|
|
692
|
-
Logger({ level: "WARN", message: res_error });
|
|
693
760
|
}
|
|
694
761
|
|
|
695
762
|
return response;
|
|
696
763
|
}
|
|
697
764
|
|
|
698
765
|
/**
|
|
699
|
-
* @param {
|
|
700
|
-
* @param {
|
|
701
|
-
*
|
|
702
|
-
* @
|
|
766
|
+
* @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object
|
|
767
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
768
|
+
* @returns {Promise<OrderPlatformModel.AnnouncementsResponse>} - Success response
|
|
769
|
+
* @name getAnnouncements
|
|
703
770
|
* @summary:
|
|
704
|
-
* @description:
|
|
771
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAnnouncements/).
|
|
705
772
|
*/
|
|
706
|
-
async getAnnouncements({ date } = {}) {
|
|
707
|
-
const { error } =
|
|
773
|
+
async getAnnouncements({ date } = {}, { headers } = { headers: false }) {
|
|
774
|
+
const { error } = OrderPlatformValidator.getAnnouncements().validate(
|
|
708
775
|
{
|
|
709
776
|
date,
|
|
710
777
|
},
|
|
@@ -715,7 +782,9 @@ class Order {
|
|
|
715
782
|
}
|
|
716
783
|
|
|
717
784
|
// Showing warrnings if extra unknown parameters are found
|
|
718
|
-
const {
|
|
785
|
+
const {
|
|
786
|
+
error: warrning,
|
|
787
|
+
} = OrderPlatformValidator.getAnnouncements().validate(
|
|
719
788
|
{
|
|
720
789
|
date,
|
|
721
790
|
},
|
|
@@ -724,9 +793,8 @@ class Order {
|
|
|
724
793
|
if (warrning) {
|
|
725
794
|
Logger({
|
|
726
795
|
level: "WARN",
|
|
727
|
-
message:
|
|
796
|
+
message: `Parameter Validation warrnings for platform > Order > getAnnouncements \n ${warrning}`,
|
|
728
797
|
});
|
|
729
|
-
Logger({ level: "WARN", message: warrning });
|
|
730
798
|
}
|
|
731
799
|
|
|
732
800
|
const query_params = {};
|
|
@@ -740,12 +808,18 @@ class Order {
|
|
|
740
808
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/announcements`,
|
|
741
809
|
query_params,
|
|
742
810
|
undefined,
|
|
743
|
-
xHeaders
|
|
811
|
+
xHeaders,
|
|
812
|
+
{ headers }
|
|
744
813
|
);
|
|
745
814
|
|
|
815
|
+
let responseData = response;
|
|
816
|
+
if (headers) {
|
|
817
|
+
responseData = response[0];
|
|
818
|
+
}
|
|
819
|
+
|
|
746
820
|
const {
|
|
747
821
|
error: res_error,
|
|
748
|
-
} =
|
|
822
|
+
} = OrderPlatformModel.AnnouncementsResponse().validate(responseData, {
|
|
749
823
|
abortEarly: false,
|
|
750
824
|
allowUnknown: false,
|
|
751
825
|
});
|
|
@@ -753,25 +827,27 @@ class Order {
|
|
|
753
827
|
if (res_error) {
|
|
754
828
|
Logger({
|
|
755
829
|
level: "WARN",
|
|
756
|
-
message:
|
|
830
|
+
message: `Response Validation Warnnings for platform > Order > getAnnouncements \n ${res_error}`,
|
|
757
831
|
});
|
|
758
|
-
Logger({ level: "WARN", message: res_error });
|
|
759
832
|
}
|
|
760
833
|
|
|
761
834
|
return response;
|
|
762
835
|
}
|
|
763
836
|
|
|
764
837
|
/**
|
|
765
|
-
* @param {
|
|
766
|
-
* @param {
|
|
767
|
-
* @
|
|
768
|
-
*
|
|
769
|
-
* @
|
|
838
|
+
* @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object
|
|
839
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
840
|
+
* @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponse>} -
|
|
841
|
+
* Success response
|
|
842
|
+
* @name getBagById
|
|
770
843
|
* @summary:
|
|
771
|
-
* @description:
|
|
844
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
|
|
772
845
|
*/
|
|
773
|
-
async getBagById(
|
|
774
|
-
|
|
846
|
+
async getBagById(
|
|
847
|
+
{ bagId, channelBagId, channelId } = {},
|
|
848
|
+
{ headers } = { headers: false }
|
|
849
|
+
) {
|
|
850
|
+
const { error } = OrderPlatformValidator.getBagById().validate(
|
|
775
851
|
{
|
|
776
852
|
bagId,
|
|
777
853
|
channelBagId,
|
|
@@ -784,7 +860,7 @@ class Order {
|
|
|
784
860
|
}
|
|
785
861
|
|
|
786
862
|
// Showing warrnings if extra unknown parameters are found
|
|
787
|
-
const { error: warrning } =
|
|
863
|
+
const { error: warrning } = OrderPlatformValidator.getBagById().validate(
|
|
788
864
|
{
|
|
789
865
|
bagId,
|
|
790
866
|
channelBagId,
|
|
@@ -795,9 +871,8 @@ class Order {
|
|
|
795
871
|
if (warrning) {
|
|
796
872
|
Logger({
|
|
797
873
|
level: "WARN",
|
|
798
|
-
message:
|
|
874
|
+
message: `Parameter Validation warrnings for platform > Order > getBagById \n ${warrning}`,
|
|
799
875
|
});
|
|
800
|
-
Logger({ level: "WARN", message: warrning });
|
|
801
876
|
}
|
|
802
877
|
|
|
803
878
|
const query_params = {};
|
|
@@ -813,12 +888,18 @@ class Order {
|
|
|
813
888
|
`/service/platform/order/v1.0/company/${this.config.companyId}/bag-details/`,
|
|
814
889
|
query_params,
|
|
815
890
|
undefined,
|
|
816
|
-
xHeaders
|
|
891
|
+
xHeaders,
|
|
892
|
+
{ headers }
|
|
817
893
|
);
|
|
818
894
|
|
|
895
|
+
let responseData = response;
|
|
896
|
+
if (headers) {
|
|
897
|
+
responseData = response[0];
|
|
898
|
+
}
|
|
899
|
+
|
|
819
900
|
const {
|
|
820
901
|
error: res_error,
|
|
821
|
-
} =
|
|
902
|
+
} = OrderPlatformModel.BagDetailsPlatformResponse().validate(responseData, {
|
|
822
903
|
abortEarly: false,
|
|
823
904
|
allowUnknown: false,
|
|
824
905
|
});
|
|
@@ -826,42 +907,36 @@ class Order {
|
|
|
826
907
|
if (res_error) {
|
|
827
908
|
Logger({
|
|
828
909
|
level: "WARN",
|
|
829
|
-
message:
|
|
910
|
+
message: `Response Validation Warnnings for platform > Order > getBagById \n ${res_error}`,
|
|
830
911
|
});
|
|
831
|
-
Logger({ level: "WARN", message: res_error });
|
|
832
912
|
}
|
|
833
913
|
|
|
834
914
|
return response;
|
|
835
915
|
}
|
|
836
916
|
|
|
837
917
|
/**
|
|
838
|
-
* @param {
|
|
839
|
-
* @param {
|
|
840
|
-
* @
|
|
841
|
-
* @
|
|
842
|
-
* @param {string} [arg.channelBagIds] - Comma separated values of app bag ids
|
|
843
|
-
* @param {string} [arg.channelShipmentIds] - Comma separated values of app
|
|
844
|
-
* shipment ids
|
|
845
|
-
* @param {string} [arg.channelOrderIds] - Comma separated values of app order ids
|
|
846
|
-
* @param {string} [arg.channelId] - Comma separated values of app ids
|
|
847
|
-
* @param {number} [arg.pageNo] - Page number for paginated data
|
|
848
|
-
* @param {number} [arg.pageSize] - Page size of data received per page
|
|
849
|
-
* @returns {Promise<GetBagsPlatformResponse>} - Success response
|
|
918
|
+
* @param {OrderPlatformValidator.GetBagsParam} arg - Arg object
|
|
919
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
920
|
+
* @returns {Promise<OrderPlatformModel.GetBagsPlatformResponse>} - Success response
|
|
921
|
+
* @name getBags
|
|
850
922
|
* @summary:
|
|
851
|
-
* @description:
|
|
923
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBags/).
|
|
852
924
|
*/
|
|
853
|
-
async getBags(
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
925
|
+
async getBags(
|
|
926
|
+
{
|
|
927
|
+
bagIds,
|
|
928
|
+
shipmentIds,
|
|
929
|
+
orderIds,
|
|
930
|
+
channelBagIds,
|
|
931
|
+
channelShipmentIds,
|
|
932
|
+
channelOrderIds,
|
|
933
|
+
channelId,
|
|
934
|
+
pageNo,
|
|
935
|
+
pageSize,
|
|
936
|
+
} = {},
|
|
937
|
+
{ headers } = { headers: false }
|
|
938
|
+
) {
|
|
939
|
+
const { error } = OrderPlatformValidator.getBags().validate(
|
|
865
940
|
{
|
|
866
941
|
bagIds,
|
|
867
942
|
shipmentIds,
|
|
@@ -880,7 +955,7 @@ class Order {
|
|
|
880
955
|
}
|
|
881
956
|
|
|
882
957
|
// Showing warrnings if extra unknown parameters are found
|
|
883
|
-
const { error: warrning } =
|
|
958
|
+
const { error: warrning } = OrderPlatformValidator.getBags().validate(
|
|
884
959
|
{
|
|
885
960
|
bagIds,
|
|
886
961
|
shipmentIds,
|
|
@@ -897,9 +972,8 @@ class Order {
|
|
|
897
972
|
if (warrning) {
|
|
898
973
|
Logger({
|
|
899
974
|
level: "WARN",
|
|
900
|
-
message:
|
|
975
|
+
message: `Parameter Validation warrnings for platform > Order > getBags \n ${warrning}`,
|
|
901
976
|
});
|
|
902
|
-
Logger({ level: "WARN", message: warrning });
|
|
903
977
|
}
|
|
904
978
|
|
|
905
979
|
const query_params = {};
|
|
@@ -921,12 +995,18 @@ class Order {
|
|
|
921
995
|
`/service/platform/order/v1.0/company/${this.config.companyId}/bags`,
|
|
922
996
|
query_params,
|
|
923
997
|
undefined,
|
|
924
|
-
xHeaders
|
|
998
|
+
xHeaders,
|
|
999
|
+
{ headers }
|
|
925
1000
|
);
|
|
926
1001
|
|
|
1002
|
+
let responseData = response;
|
|
1003
|
+
if (headers) {
|
|
1004
|
+
responseData = response[0];
|
|
1005
|
+
}
|
|
1006
|
+
|
|
927
1007
|
const {
|
|
928
1008
|
error: res_error,
|
|
929
|
-
} =
|
|
1009
|
+
} = OrderPlatformModel.GetBagsPlatformResponse().validate(responseData, {
|
|
930
1010
|
abortEarly: false,
|
|
931
1011
|
allowUnknown: false,
|
|
932
1012
|
});
|
|
@@ -934,22 +1014,24 @@ class Order {
|
|
|
934
1014
|
if (res_error) {
|
|
935
1015
|
Logger({
|
|
936
1016
|
level: "WARN",
|
|
937
|
-
message:
|
|
1017
|
+
message: `Response Validation Warnnings for platform > Order > getBags \n ${res_error}`,
|
|
938
1018
|
});
|
|
939
|
-
Logger({ level: "WARN", message: res_error });
|
|
940
1019
|
}
|
|
941
1020
|
|
|
942
1021
|
return response;
|
|
943
1022
|
}
|
|
944
1023
|
|
|
945
1024
|
/**
|
|
946
|
-
* @param {
|
|
947
|
-
* @
|
|
1025
|
+
* @param {OrderPlatformValidator.GetBulkActionTemplateParam} arg - Arg object
|
|
1026
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1027
|
+
* @returns {Promise<OrderPlatformModel.BulkActionTemplateResponse>} -
|
|
1028
|
+
* Success response
|
|
1029
|
+
* @name getBulkActionTemplate
|
|
948
1030
|
* @summary:
|
|
949
|
-
* @description:
|
|
1031
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkActionTemplate/).
|
|
950
1032
|
*/
|
|
951
|
-
async getBulkActionTemplate({} = {}) {
|
|
952
|
-
const { error } =
|
|
1033
|
+
async getBulkActionTemplate({ headers } = { headers: false }) {
|
|
1034
|
+
const { error } = OrderPlatformValidator.getBulkActionTemplate().validate(
|
|
953
1035
|
{},
|
|
954
1036
|
{ abortEarly: false, allowUnknown: true }
|
|
955
1037
|
);
|
|
@@ -958,16 +1040,17 @@ class Order {
|
|
|
958
1040
|
}
|
|
959
1041
|
|
|
960
1042
|
// Showing warrnings if extra unknown parameters are found
|
|
961
|
-
const {
|
|
1043
|
+
const {
|
|
1044
|
+
error: warrning,
|
|
1045
|
+
} = OrderPlatformValidator.getBulkActionTemplate().validate(
|
|
962
1046
|
{},
|
|
963
1047
|
{ abortEarly: false, allowUnknown: false }
|
|
964
1048
|
);
|
|
965
1049
|
if (warrning) {
|
|
966
1050
|
Logger({
|
|
967
1051
|
level: "WARN",
|
|
968
|
-
message:
|
|
1052
|
+
message: `Parameter Validation warrnings for platform > Order > getBulkActionTemplate \n ${warrning}`,
|
|
969
1053
|
});
|
|
970
|
-
Logger({ level: "WARN", message: warrning });
|
|
971
1054
|
}
|
|
972
1055
|
|
|
973
1056
|
const query_params = {};
|
|
@@ -980,12 +1063,18 @@ class Order {
|
|
|
980
1063
|
`/service/platform/order/v1.0/company/${this.config.companyId}/bulk-action/get-seller-templates`,
|
|
981
1064
|
query_params,
|
|
982
1065
|
undefined,
|
|
983
|
-
xHeaders
|
|
1066
|
+
xHeaders,
|
|
1067
|
+
{ headers }
|
|
984
1068
|
);
|
|
985
1069
|
|
|
1070
|
+
let responseData = response;
|
|
1071
|
+
if (headers) {
|
|
1072
|
+
responseData = response[0];
|
|
1073
|
+
}
|
|
1074
|
+
|
|
986
1075
|
const {
|
|
987
1076
|
error: res_error,
|
|
988
|
-
} =
|
|
1077
|
+
} = OrderPlatformModel.BulkActionTemplateResponse().validate(responseData, {
|
|
989
1078
|
abortEarly: false,
|
|
990
1079
|
allowUnknown: false,
|
|
991
1080
|
});
|
|
@@ -993,47 +1082,41 @@ class Order {
|
|
|
993
1082
|
if (res_error) {
|
|
994
1083
|
Logger({
|
|
995
1084
|
level: "WARN",
|
|
996
|
-
message:
|
|
1085
|
+
message: `Response Validation Warnnings for platform > Order > getBulkActionTemplate \n ${res_error}`,
|
|
997
1086
|
});
|
|
998
|
-
Logger({ level: "WARN", message: res_error });
|
|
999
1087
|
}
|
|
1000
1088
|
|
|
1001
1089
|
return response;
|
|
1002
1090
|
}
|
|
1003
1091
|
|
|
1004
1092
|
/**
|
|
1005
|
-
* @param {
|
|
1006
|
-
* @param {
|
|
1007
|
-
* @
|
|
1008
|
-
* @
|
|
1009
|
-
* @param {string} [arg.toDate] - End Date in DD-MM-YYYY format
|
|
1010
|
-
* @param {string} [arg.stores] - Comma separated values of store ids
|
|
1011
|
-
* @param {string} [arg.tags] - Comma separated values of tags
|
|
1012
|
-
* @param {string} [arg.bagStatus] - Comma separated values of bag statuses
|
|
1013
|
-
* @param {string} [arg.paymentMethods] - Comma separated values of payment methods
|
|
1014
|
-
* @param {string} [arg.fileType] - File type to be downloaded
|
|
1015
|
-
* @param {number} [arg.timeToDispatch] - Sla breached or not breached
|
|
1016
|
-
* @param {number} [arg.pageNo] -
|
|
1017
|
-
* @param {number} [arg.pageSize] -
|
|
1018
|
-
* @returns {Promise<FileResponse>} - Success response
|
|
1093
|
+
* @param {OrderPlatformValidator.GetBulkShipmentExcelFileParam} arg - Arg object
|
|
1094
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1095
|
+
* @returns {Promise<OrderPlatformModel.FileResponse>} - Success response
|
|
1096
|
+
* @name getBulkShipmentExcelFile
|
|
1019
1097
|
* @summary:
|
|
1020
|
-
* @description:
|
|
1098
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkShipmentExcelFile/).
|
|
1021
1099
|
*/
|
|
1022
|
-
async getBulkShipmentExcelFile(
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1100
|
+
async getBulkShipmentExcelFile(
|
|
1101
|
+
{
|
|
1102
|
+
salesChannels,
|
|
1103
|
+
dpIds,
|
|
1104
|
+
fromDate,
|
|
1105
|
+
toDate,
|
|
1106
|
+
stores,
|
|
1107
|
+
tags,
|
|
1108
|
+
bagStatus,
|
|
1109
|
+
paymentMethods,
|
|
1110
|
+
fileType,
|
|
1111
|
+
timeToDispatch,
|
|
1112
|
+
pageNo,
|
|
1113
|
+
pageSize,
|
|
1114
|
+
} = {},
|
|
1115
|
+
{ headers } = { headers: false }
|
|
1116
|
+
) {
|
|
1117
|
+
const {
|
|
1118
|
+
error,
|
|
1119
|
+
} = OrderPlatformValidator.getBulkShipmentExcelFile().validate(
|
|
1037
1120
|
{
|
|
1038
1121
|
salesChannels,
|
|
1039
1122
|
dpIds,
|
|
@@ -1057,7 +1140,7 @@ class Order {
|
|
|
1057
1140
|
// Showing warrnings if extra unknown parameters are found
|
|
1058
1141
|
const {
|
|
1059
1142
|
error: warrning,
|
|
1060
|
-
} =
|
|
1143
|
+
} = OrderPlatformValidator.getBulkShipmentExcelFile().validate(
|
|
1061
1144
|
{
|
|
1062
1145
|
salesChannels,
|
|
1063
1146
|
dpIds,
|
|
@@ -1077,9 +1160,8 @@ class Order {
|
|
|
1077
1160
|
if (warrning) {
|
|
1078
1161
|
Logger({
|
|
1079
1162
|
level: "WARN",
|
|
1080
|
-
message:
|
|
1163
|
+
message: `Parameter Validation warrnings for platform > Order > getBulkShipmentExcelFile \n ${warrning}`,
|
|
1081
1164
|
});
|
|
1082
|
-
Logger({ level: "WARN", message: warrning });
|
|
1083
1165
|
}
|
|
1084
1166
|
|
|
1085
1167
|
const query_params = {};
|
|
@@ -1104,10 +1186,18 @@ class Order {
|
|
|
1104
1186
|
`/service/platform/order/v1.0/company/${this.config.companyId}/generate/file`,
|
|
1105
1187
|
query_params,
|
|
1106
1188
|
undefined,
|
|
1107
|
-
xHeaders
|
|
1189
|
+
xHeaders,
|
|
1190
|
+
{ headers }
|
|
1108
1191
|
);
|
|
1109
1192
|
|
|
1110
|
-
|
|
1193
|
+
let responseData = response;
|
|
1194
|
+
if (headers) {
|
|
1195
|
+
responseData = response[0];
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
const {
|
|
1199
|
+
error: res_error,
|
|
1200
|
+
} = OrderPlatformModel.FileResponse().validate(responseData, {
|
|
1111
1201
|
abortEarly: false,
|
|
1112
1202
|
allowUnknown: false,
|
|
1113
1203
|
});
|
|
@@ -1115,22 +1205,23 @@ class Order {
|
|
|
1115
1205
|
if (res_error) {
|
|
1116
1206
|
Logger({
|
|
1117
1207
|
level: "WARN",
|
|
1118
|
-
message:
|
|
1208
|
+
message: `Response Validation Warnnings for platform > Order > getBulkShipmentExcelFile \n ${res_error}`,
|
|
1119
1209
|
});
|
|
1120
|
-
Logger({ level: "WARN", message: res_error });
|
|
1121
1210
|
}
|
|
1122
1211
|
|
|
1123
1212
|
return response;
|
|
1124
1213
|
}
|
|
1125
1214
|
|
|
1126
1215
|
/**
|
|
1127
|
-
* @param {
|
|
1128
|
-
* @
|
|
1216
|
+
* @param {OrderPlatformValidator.GetChannelConfigParam} arg - Arg object
|
|
1217
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1218
|
+
* @returns {Promise<OrderPlatformModel.CreateChannelConfigData>} - Success response
|
|
1219
|
+
* @name getChannelConfig
|
|
1129
1220
|
* @summary:
|
|
1130
|
-
* @description: getChannelConfig
|
|
1221
|
+
* @description: getChannelConfig - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getChannelConfig/).
|
|
1131
1222
|
*/
|
|
1132
|
-
async getChannelConfig({} = {}) {
|
|
1133
|
-
const { error } =
|
|
1223
|
+
async getChannelConfig({ headers } = { headers: false }) {
|
|
1224
|
+
const { error } = OrderPlatformValidator.getChannelConfig().validate(
|
|
1134
1225
|
{},
|
|
1135
1226
|
{ abortEarly: false, allowUnknown: true }
|
|
1136
1227
|
);
|
|
@@ -1139,16 +1230,17 @@ class Order {
|
|
|
1139
1230
|
}
|
|
1140
1231
|
|
|
1141
1232
|
// Showing warrnings if extra unknown parameters are found
|
|
1142
|
-
const {
|
|
1233
|
+
const {
|
|
1234
|
+
error: warrning,
|
|
1235
|
+
} = OrderPlatformValidator.getChannelConfig().validate(
|
|
1143
1236
|
{},
|
|
1144
1237
|
{ abortEarly: false, allowUnknown: false }
|
|
1145
1238
|
);
|
|
1146
1239
|
if (warrning) {
|
|
1147
1240
|
Logger({
|
|
1148
1241
|
level: "WARN",
|
|
1149
|
-
message:
|
|
1242
|
+
message: `Parameter Validation warrnings for platform > Order > getChannelConfig \n ${warrning}`,
|
|
1150
1243
|
});
|
|
1151
|
-
Logger({ level: "WARN", message: warrning });
|
|
1152
1244
|
}
|
|
1153
1245
|
|
|
1154
1246
|
const query_params = {};
|
|
@@ -1161,12 +1253,18 @@ class Order {
|
|
|
1161
1253
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
|
|
1162
1254
|
query_params,
|
|
1163
1255
|
undefined,
|
|
1164
|
-
xHeaders
|
|
1256
|
+
xHeaders,
|
|
1257
|
+
{ headers }
|
|
1165
1258
|
);
|
|
1166
1259
|
|
|
1260
|
+
let responseData = response;
|
|
1261
|
+
if (headers) {
|
|
1262
|
+
responseData = response[0];
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1167
1265
|
const {
|
|
1168
1266
|
error: res_error,
|
|
1169
|
-
} =
|
|
1267
|
+
} = OrderPlatformModel.CreateChannelConfigData().validate(responseData, {
|
|
1170
1268
|
abortEarly: false,
|
|
1171
1269
|
allowUnknown: false,
|
|
1172
1270
|
});
|
|
@@ -1174,53 +1272,42 @@ class Order {
|
|
|
1174
1272
|
if (res_error) {
|
|
1175
1273
|
Logger({
|
|
1176
1274
|
level: "WARN",
|
|
1177
|
-
message:
|
|
1275
|
+
message: `Response Validation Warnnings for platform > Order > getChannelConfig \n ${res_error}`,
|
|
1178
1276
|
});
|
|
1179
|
-
Logger({ level: "WARN", message: res_error });
|
|
1180
1277
|
}
|
|
1181
1278
|
|
|
1182
1279
|
return response;
|
|
1183
1280
|
}
|
|
1184
1281
|
|
|
1185
1282
|
/**
|
|
1186
|
-
* @param {
|
|
1187
|
-
* @param {
|
|
1188
|
-
* @
|
|
1189
|
-
* @
|
|
1190
|
-
* @param {string} [arg.toDate] - End Date in DD-MM-YYYY format
|
|
1191
|
-
* @param {string} [arg.dpIds] - Comma separated values of delivery partner ids
|
|
1192
|
-
* @param {string} [arg.stores] - Comma separated values of store ids
|
|
1193
|
-
* @param {string} [arg.salesChannels] -
|
|
1194
|
-
* @param {string} [arg.paymentMode] - Comma separated values of payment modes
|
|
1195
|
-
* @param {string} [arg.bagStatus] - Comma separated values of bag statuses
|
|
1196
|
-
* @param {string} [arg.searchType] -
|
|
1197
|
-
* @param {string} [arg.searchValue] -
|
|
1198
|
-
* @param {string} [arg.tags] -
|
|
1199
|
-
* @param {string} [arg.timeToDispatch] -
|
|
1200
|
-
* @param {string} [arg.paymentMethods] -
|
|
1201
|
-
* @param {boolean} [arg.myOrders] -
|
|
1202
|
-
* @returns {Promise<LaneConfigResponse>} - Success response
|
|
1283
|
+
* @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object
|
|
1284
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1285
|
+
* @returns {Promise<OrderPlatformModel.LaneConfigResponse>} - Success response
|
|
1286
|
+
* @name getLaneConfig
|
|
1203
1287
|
* @summary:
|
|
1204
|
-
* @description:
|
|
1288
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
|
|
1205
1289
|
*/
|
|
1206
|
-
async getLaneConfig(
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1290
|
+
async getLaneConfig(
|
|
1291
|
+
{
|
|
1292
|
+
superLane,
|
|
1293
|
+
groupEntity,
|
|
1294
|
+
fromDate,
|
|
1295
|
+
toDate,
|
|
1296
|
+
dpIds,
|
|
1297
|
+
stores,
|
|
1298
|
+
salesChannels,
|
|
1299
|
+
paymentMode,
|
|
1300
|
+
bagStatus,
|
|
1301
|
+
searchType,
|
|
1302
|
+
searchValue,
|
|
1303
|
+
tags,
|
|
1304
|
+
timeToDispatch,
|
|
1305
|
+
paymentMethods,
|
|
1306
|
+
myOrders,
|
|
1307
|
+
} = {},
|
|
1308
|
+
{ headers } = { headers: false }
|
|
1309
|
+
) {
|
|
1310
|
+
const { error } = OrderPlatformValidator.getLaneConfig().validate(
|
|
1224
1311
|
{
|
|
1225
1312
|
superLane,
|
|
1226
1313
|
groupEntity,
|
|
@@ -1245,7 +1332,7 @@ class Order {
|
|
|
1245
1332
|
}
|
|
1246
1333
|
|
|
1247
1334
|
// Showing warrnings if extra unknown parameters are found
|
|
1248
|
-
const { error: warrning } =
|
|
1335
|
+
const { error: warrning } = OrderPlatformValidator.getLaneConfig().validate(
|
|
1249
1336
|
{
|
|
1250
1337
|
superLane,
|
|
1251
1338
|
groupEntity,
|
|
@@ -1268,9 +1355,8 @@ class Order {
|
|
|
1268
1355
|
if (warrning) {
|
|
1269
1356
|
Logger({
|
|
1270
1357
|
level: "WARN",
|
|
1271
|
-
message:
|
|
1358
|
+
message: `Parameter Validation warrnings for platform > Order > getLaneConfig \n ${warrning}`,
|
|
1272
1359
|
});
|
|
1273
|
-
Logger({ level: "WARN", message: warrning });
|
|
1274
1360
|
}
|
|
1275
1361
|
|
|
1276
1362
|
const query_params = {};
|
|
@@ -1298,12 +1384,18 @@ class Order {
|
|
|
1298
1384
|
`/service/platform/order/v1.0/company/${this.config.companyId}/lane-config/`,
|
|
1299
1385
|
query_params,
|
|
1300
1386
|
undefined,
|
|
1301
|
-
xHeaders
|
|
1387
|
+
xHeaders,
|
|
1388
|
+
{ headers }
|
|
1302
1389
|
);
|
|
1303
1390
|
|
|
1391
|
+
let responseData = response;
|
|
1392
|
+
if (headers) {
|
|
1393
|
+
responseData = response[0];
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1304
1396
|
const {
|
|
1305
1397
|
error: res_error,
|
|
1306
|
-
} =
|
|
1398
|
+
} = OrderPlatformModel.LaneConfigResponse().validate(responseData, {
|
|
1307
1399
|
abortEarly: false,
|
|
1308
1400
|
allowUnknown: false,
|
|
1309
1401
|
});
|
|
@@ -1311,23 +1403,23 @@ class Order {
|
|
|
1311
1403
|
if (res_error) {
|
|
1312
1404
|
Logger({
|
|
1313
1405
|
level: "WARN",
|
|
1314
|
-
message:
|
|
1406
|
+
message: `Response Validation Warnnings for platform > Order > getLaneConfig \n ${res_error}`,
|
|
1315
1407
|
});
|
|
1316
|
-
Logger({ level: "WARN", message: res_error });
|
|
1317
1408
|
}
|
|
1318
1409
|
|
|
1319
1410
|
return response;
|
|
1320
1411
|
}
|
|
1321
1412
|
|
|
1322
1413
|
/**
|
|
1323
|
-
* @param {
|
|
1324
|
-
* @param {
|
|
1325
|
-
* @returns {Promise<OrderDetailsResponse>} - Success response
|
|
1414
|
+
* @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object
|
|
1415
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1416
|
+
* @returns {Promise<OrderPlatformModel.OrderDetailsResponse>} - Success response
|
|
1417
|
+
* @name getOrderById
|
|
1326
1418
|
* @summary:
|
|
1327
|
-
* @description:
|
|
1419
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/).
|
|
1328
1420
|
*/
|
|
1329
|
-
async getOrderById({ orderId } = {}) {
|
|
1330
|
-
const { error } =
|
|
1421
|
+
async getOrderById({ orderId } = {}, { headers } = { headers: false }) {
|
|
1422
|
+
const { error } = OrderPlatformValidator.getOrderById().validate(
|
|
1331
1423
|
{
|
|
1332
1424
|
orderId,
|
|
1333
1425
|
},
|
|
@@ -1338,7 +1430,7 @@ class Order {
|
|
|
1338
1430
|
}
|
|
1339
1431
|
|
|
1340
1432
|
// Showing warrnings if extra unknown parameters are found
|
|
1341
|
-
const { error: warrning } =
|
|
1433
|
+
const { error: warrning } = OrderPlatformValidator.getOrderById().validate(
|
|
1342
1434
|
{
|
|
1343
1435
|
orderId,
|
|
1344
1436
|
},
|
|
@@ -1347,9 +1439,8 @@ class Order {
|
|
|
1347
1439
|
if (warrning) {
|
|
1348
1440
|
Logger({
|
|
1349
1441
|
level: "WARN",
|
|
1350
|
-
message:
|
|
1442
|
+
message: `Parameter Validation warrnings for platform > Order > getOrderById \n ${warrning}`,
|
|
1351
1443
|
});
|
|
1352
|
-
Logger({ level: "WARN", message: warrning });
|
|
1353
1444
|
}
|
|
1354
1445
|
|
|
1355
1446
|
const query_params = {};
|
|
@@ -1363,12 +1454,18 @@ class Order {
|
|
|
1363
1454
|
`/service/platform/order/v1.0/company/${this.config.companyId}/order-details`,
|
|
1364
1455
|
query_params,
|
|
1365
1456
|
undefined,
|
|
1366
|
-
xHeaders
|
|
1457
|
+
xHeaders,
|
|
1458
|
+
{ headers }
|
|
1367
1459
|
);
|
|
1368
1460
|
|
|
1461
|
+
let responseData = response;
|
|
1462
|
+
if (headers) {
|
|
1463
|
+
responseData = response[0];
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1369
1466
|
const {
|
|
1370
1467
|
error: res_error,
|
|
1371
|
-
} =
|
|
1468
|
+
} = OrderPlatformModel.OrderDetailsResponse().validate(responseData, {
|
|
1372
1469
|
abortEarly: false,
|
|
1373
1470
|
allowUnknown: false,
|
|
1374
1471
|
});
|
|
@@ -1376,63 +1473,44 @@ class Order {
|
|
|
1376
1473
|
if (res_error) {
|
|
1377
1474
|
Logger({
|
|
1378
1475
|
level: "WARN",
|
|
1379
|
-
message:
|
|
1476
|
+
message: `Response Validation Warnnings for platform > Order > getOrderById \n ${res_error}`,
|
|
1380
1477
|
});
|
|
1381
|
-
Logger({ level: "WARN", message: res_error });
|
|
1382
1478
|
}
|
|
1383
1479
|
|
|
1384
1480
|
return response;
|
|
1385
1481
|
}
|
|
1386
1482
|
|
|
1387
1483
|
/**
|
|
1388
|
-
* @param {
|
|
1389
|
-
* @param {
|
|
1390
|
-
*
|
|
1391
|
-
* @
|
|
1392
|
-
* will be used as the target for the search operation
|
|
1393
|
-
* @param {string} [arg.bagStatus] - Bag_status refers to status of the
|
|
1394
|
-
* entity. Filters orders based on the status.
|
|
1395
|
-
* @param {string} [arg.timeToDispatch] - Time_to_dispatch refers to
|
|
1396
|
-
* estimated SLA time.
|
|
1397
|
-
* @param {string} [arg.paymentMethods] -
|
|
1398
|
-
* @param {string} [arg.tags] - Tags refers to additional descriptive labels
|
|
1399
|
-
* associated with the order
|
|
1400
|
-
* @param {string} [arg.searchValue] - Search_value is matched against the
|
|
1401
|
-
* field specified by the search_type
|
|
1402
|
-
* @param {string} [arg.fromDate] -
|
|
1403
|
-
* @param {string} [arg.toDate] -
|
|
1404
|
-
* @param {string} [arg.dpIds] - Delivery Partner IDs to which shipments are assigned.
|
|
1405
|
-
* @param {string} [arg.stores] -
|
|
1406
|
-
* @param {string} [arg.salesChannels] -
|
|
1407
|
-
* @param {number} [arg.pageNo] -
|
|
1408
|
-
* @param {number} [arg.pageSize] -
|
|
1409
|
-
* @param {boolean} [arg.isPrioritySort] -
|
|
1410
|
-
* @param {string} [arg.customMeta] -
|
|
1411
|
-
* @param {boolean} [arg.myOrders] -
|
|
1412
|
-
* @returns {Promise<OrderListingResponse>} - Success response
|
|
1484
|
+
* @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object
|
|
1485
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1486
|
+
* @returns {Promise<OrderPlatformModel.OrderListingResponse>} - Success response
|
|
1487
|
+
* @name getOrders
|
|
1413
1488
|
* @summary:
|
|
1414
|
-
* @description:
|
|
1489
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/).
|
|
1415
1490
|
*/
|
|
1416
|
-
async getOrders(
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1491
|
+
async getOrders(
|
|
1492
|
+
{
|
|
1493
|
+
lane,
|
|
1494
|
+
searchType,
|
|
1495
|
+
bagStatus,
|
|
1496
|
+
timeToDispatch,
|
|
1497
|
+
paymentMethods,
|
|
1498
|
+
tags,
|
|
1499
|
+
searchValue,
|
|
1500
|
+
fromDate,
|
|
1501
|
+
toDate,
|
|
1502
|
+
dpIds,
|
|
1503
|
+
stores,
|
|
1504
|
+
salesChannels,
|
|
1505
|
+
pageNo,
|
|
1506
|
+
pageSize,
|
|
1507
|
+
isPrioritySort,
|
|
1508
|
+
customMeta,
|
|
1509
|
+
myOrders,
|
|
1510
|
+
} = {},
|
|
1511
|
+
{ headers } = { headers: false }
|
|
1512
|
+
) {
|
|
1513
|
+
const { error } = OrderPlatformValidator.getOrders().validate(
|
|
1436
1514
|
{
|
|
1437
1515
|
lane,
|
|
1438
1516
|
searchType,
|
|
@@ -1459,7 +1537,7 @@ class Order {
|
|
|
1459
1537
|
}
|
|
1460
1538
|
|
|
1461
1539
|
// Showing warrnings if extra unknown parameters are found
|
|
1462
|
-
const { error: warrning } =
|
|
1540
|
+
const { error: warrning } = OrderPlatformValidator.getOrders().validate(
|
|
1463
1541
|
{
|
|
1464
1542
|
lane,
|
|
1465
1543
|
searchType,
|
|
@@ -1484,9 +1562,8 @@ class Order {
|
|
|
1484
1562
|
if (warrning) {
|
|
1485
1563
|
Logger({
|
|
1486
1564
|
level: "WARN",
|
|
1487
|
-
message:
|
|
1565
|
+
message: `Parameter Validation warrnings for platform > Order > getOrders \n ${warrning}`,
|
|
1488
1566
|
});
|
|
1489
|
-
Logger({ level: "WARN", message: warrning });
|
|
1490
1567
|
}
|
|
1491
1568
|
|
|
1492
1569
|
const query_params = {};
|
|
@@ -1516,12 +1593,18 @@ class Order {
|
|
|
1516
1593
|
`/service/platform/order/v1.0/company/${this.config.companyId}/orders-listing`,
|
|
1517
1594
|
query_params,
|
|
1518
1595
|
undefined,
|
|
1519
|
-
xHeaders
|
|
1596
|
+
xHeaders,
|
|
1597
|
+
{ headers }
|
|
1520
1598
|
);
|
|
1521
1599
|
|
|
1600
|
+
let responseData = response;
|
|
1601
|
+
if (headers) {
|
|
1602
|
+
responseData = response[0];
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1522
1605
|
const {
|
|
1523
1606
|
error: res_error,
|
|
1524
|
-
} =
|
|
1607
|
+
} = OrderPlatformModel.OrderListingResponse().validate(responseData, {
|
|
1525
1608
|
abortEarly: false,
|
|
1526
1609
|
allowUnknown: false,
|
|
1527
1610
|
});
|
|
@@ -1529,22 +1612,23 @@ class Order {
|
|
|
1529
1612
|
if (res_error) {
|
|
1530
1613
|
Logger({
|
|
1531
1614
|
level: "WARN",
|
|
1532
|
-
message:
|
|
1615
|
+
message: `Response Validation Warnnings for platform > Order > getOrders \n ${res_error}`,
|
|
1533
1616
|
});
|
|
1534
|
-
Logger({ level: "WARN", message: res_error });
|
|
1535
1617
|
}
|
|
1536
1618
|
|
|
1537
1619
|
return response;
|
|
1538
1620
|
}
|
|
1539
1621
|
|
|
1540
1622
|
/**
|
|
1541
|
-
* @param {
|
|
1542
|
-
* @
|
|
1623
|
+
* @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object
|
|
1624
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1625
|
+
* @returns {Promise<OrderPlatformModel.GetActionsResponse>} - Success response
|
|
1626
|
+
* @name getRoleBasedActions
|
|
1543
1627
|
* @summary:
|
|
1544
|
-
* @description:
|
|
1628
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRoleBasedActions/).
|
|
1545
1629
|
*/
|
|
1546
|
-
async getRoleBasedActions({} = {}) {
|
|
1547
|
-
const { error } =
|
|
1630
|
+
async getRoleBasedActions({ headers } = { headers: false }) {
|
|
1631
|
+
const { error } = OrderPlatformValidator.getRoleBasedActions().validate(
|
|
1548
1632
|
{},
|
|
1549
1633
|
{ abortEarly: false, allowUnknown: true }
|
|
1550
1634
|
);
|
|
@@ -1553,16 +1637,17 @@ class Order {
|
|
|
1553
1637
|
}
|
|
1554
1638
|
|
|
1555
1639
|
// Showing warrnings if extra unknown parameters are found
|
|
1556
|
-
const {
|
|
1640
|
+
const {
|
|
1641
|
+
error: warrning,
|
|
1642
|
+
} = OrderPlatformValidator.getRoleBasedActions().validate(
|
|
1557
1643
|
{},
|
|
1558
1644
|
{ abortEarly: false, allowUnknown: false }
|
|
1559
1645
|
);
|
|
1560
1646
|
if (warrning) {
|
|
1561
1647
|
Logger({
|
|
1562
1648
|
level: "WARN",
|
|
1563
|
-
message:
|
|
1649
|
+
message: `Parameter Validation warrnings for platform > Order > getRoleBasedActions \n ${warrning}`,
|
|
1564
1650
|
});
|
|
1565
|
-
Logger({ level: "WARN", message: warrning });
|
|
1566
1651
|
}
|
|
1567
1652
|
|
|
1568
1653
|
const query_params = {};
|
|
@@ -1575,12 +1660,18 @@ class Order {
|
|
|
1575
1660
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/roles`,
|
|
1576
1661
|
query_params,
|
|
1577
1662
|
undefined,
|
|
1578
|
-
xHeaders
|
|
1663
|
+
xHeaders,
|
|
1664
|
+
{ headers }
|
|
1579
1665
|
);
|
|
1580
1666
|
|
|
1667
|
+
let responseData = response;
|
|
1668
|
+
if (headers) {
|
|
1669
|
+
responseData = response[0];
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1581
1672
|
const {
|
|
1582
1673
|
error: res_error,
|
|
1583
|
-
} =
|
|
1674
|
+
} = OrderPlatformModel.GetActionsResponse().validate(responseData, {
|
|
1584
1675
|
abortEarly: false,
|
|
1585
1676
|
allowUnknown: false,
|
|
1586
1677
|
});
|
|
@@ -1588,24 +1679,26 @@ class Order {
|
|
|
1588
1679
|
if (res_error) {
|
|
1589
1680
|
Logger({
|
|
1590
1681
|
level: "WARN",
|
|
1591
|
-
message:
|
|
1682
|
+
message: `Response Validation Warnnings for platform > Order > getRoleBasedActions \n ${res_error}`,
|
|
1592
1683
|
});
|
|
1593
|
-
Logger({ level: "WARN", message: res_error });
|
|
1594
1684
|
}
|
|
1595
1685
|
|
|
1596
1686
|
return response;
|
|
1597
1687
|
}
|
|
1598
1688
|
|
|
1599
1689
|
/**
|
|
1600
|
-
* @param {
|
|
1601
|
-
* @param {
|
|
1602
|
-
* @
|
|
1603
|
-
* @
|
|
1690
|
+
* @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object
|
|
1691
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1692
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInfoResponse>} - Success response
|
|
1693
|
+
* @name getShipmentById
|
|
1604
1694
|
* @summary:
|
|
1605
|
-
* @description:
|
|
1695
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
|
|
1606
1696
|
*/
|
|
1607
|
-
async getShipmentById(
|
|
1608
|
-
|
|
1697
|
+
async getShipmentById(
|
|
1698
|
+
{ channelShipmentId, shipmentId } = {},
|
|
1699
|
+
{ headers } = { headers: false }
|
|
1700
|
+
) {
|
|
1701
|
+
const { error } = OrderPlatformValidator.getShipmentById().validate(
|
|
1609
1702
|
{
|
|
1610
1703
|
channelShipmentId,
|
|
1611
1704
|
shipmentId,
|
|
@@ -1617,7 +1710,9 @@ class Order {
|
|
|
1617
1710
|
}
|
|
1618
1711
|
|
|
1619
1712
|
// Showing warrnings if extra unknown parameters are found
|
|
1620
|
-
const {
|
|
1713
|
+
const {
|
|
1714
|
+
error: warrning,
|
|
1715
|
+
} = OrderPlatformValidator.getShipmentById().validate(
|
|
1621
1716
|
{
|
|
1622
1717
|
channelShipmentId,
|
|
1623
1718
|
shipmentId,
|
|
@@ -1627,9 +1722,8 @@ class Order {
|
|
|
1627
1722
|
if (warrning) {
|
|
1628
1723
|
Logger({
|
|
1629
1724
|
level: "WARN",
|
|
1630
|
-
message:
|
|
1725
|
+
message: `Parameter Validation warrnings for platform > Order > getShipmentById \n ${warrning}`,
|
|
1631
1726
|
});
|
|
1632
|
-
Logger({ level: "WARN", message: warrning });
|
|
1633
1727
|
}
|
|
1634
1728
|
|
|
1635
1729
|
const query_params = {};
|
|
@@ -1644,12 +1738,18 @@ class Order {
|
|
|
1644
1738
|
`/service/platform/order/v1.0/company/${this.config.companyId}/shipment-details`,
|
|
1645
1739
|
query_params,
|
|
1646
1740
|
undefined,
|
|
1647
|
-
xHeaders
|
|
1741
|
+
xHeaders,
|
|
1742
|
+
{ headers }
|
|
1648
1743
|
);
|
|
1649
1744
|
|
|
1745
|
+
let responseData = response;
|
|
1746
|
+
if (headers) {
|
|
1747
|
+
responseData = response[0];
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1650
1750
|
const {
|
|
1651
1751
|
error: res_error,
|
|
1652
|
-
} =
|
|
1752
|
+
} = OrderPlatformModel.ShipmentInfoResponse().validate(responseData, {
|
|
1653
1753
|
abortEarly: false,
|
|
1654
1754
|
allowUnknown: false,
|
|
1655
1755
|
});
|
|
@@ -1657,24 +1757,26 @@ class Order {
|
|
|
1657
1757
|
if (res_error) {
|
|
1658
1758
|
Logger({
|
|
1659
1759
|
level: "WARN",
|
|
1660
|
-
message:
|
|
1760
|
+
message: `Response Validation Warnnings for platform > Order > getShipmentById \n ${res_error}`,
|
|
1661
1761
|
});
|
|
1662
|
-
Logger({ level: "WARN", message: res_error });
|
|
1663
1762
|
}
|
|
1664
1763
|
|
|
1665
1764
|
return response;
|
|
1666
1765
|
}
|
|
1667
1766
|
|
|
1668
1767
|
/**
|
|
1669
|
-
* @param {
|
|
1670
|
-
* @param {
|
|
1671
|
-
* @
|
|
1672
|
-
* @
|
|
1768
|
+
* @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object
|
|
1769
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1770
|
+
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponse>} - Success response
|
|
1771
|
+
* @name getShipmentHistory
|
|
1673
1772
|
* @summary:
|
|
1674
|
-
* @description:
|
|
1773
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/).
|
|
1675
1774
|
*/
|
|
1676
|
-
async getShipmentHistory(
|
|
1677
|
-
|
|
1775
|
+
async getShipmentHistory(
|
|
1776
|
+
{ shipmentId, bagId } = {},
|
|
1777
|
+
{ headers } = { headers: false }
|
|
1778
|
+
) {
|
|
1779
|
+
const { error } = OrderPlatformValidator.getShipmentHistory().validate(
|
|
1678
1780
|
{
|
|
1679
1781
|
shipmentId,
|
|
1680
1782
|
bagId,
|
|
@@ -1686,7 +1788,9 @@ class Order {
|
|
|
1686
1788
|
}
|
|
1687
1789
|
|
|
1688
1790
|
// Showing warrnings if extra unknown parameters are found
|
|
1689
|
-
const {
|
|
1791
|
+
const {
|
|
1792
|
+
error: warrning,
|
|
1793
|
+
} = OrderPlatformValidator.getShipmentHistory().validate(
|
|
1690
1794
|
{
|
|
1691
1795
|
shipmentId,
|
|
1692
1796
|
bagId,
|
|
@@ -1696,9 +1800,8 @@ class Order {
|
|
|
1696
1800
|
if (warrning) {
|
|
1697
1801
|
Logger({
|
|
1698
1802
|
level: "WARN",
|
|
1699
|
-
message:
|
|
1803
|
+
message: `Parameter Validation warrnings for platform > Order > getShipmentHistory \n ${warrning}`,
|
|
1700
1804
|
});
|
|
1701
|
-
Logger({ level: "WARN", message: warrning });
|
|
1702
1805
|
}
|
|
1703
1806
|
|
|
1704
1807
|
const query_params = {};
|
|
@@ -1713,12 +1816,18 @@ class Order {
|
|
|
1713
1816
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/history`,
|
|
1714
1817
|
query_params,
|
|
1715
1818
|
undefined,
|
|
1716
|
-
xHeaders
|
|
1819
|
+
xHeaders,
|
|
1820
|
+
{ headers }
|
|
1717
1821
|
);
|
|
1718
1822
|
|
|
1823
|
+
let responseData = response;
|
|
1824
|
+
if (headers) {
|
|
1825
|
+
responseData = response[0];
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1719
1828
|
const {
|
|
1720
1829
|
error: res_error,
|
|
1721
|
-
} =
|
|
1830
|
+
} = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, {
|
|
1722
1831
|
abortEarly: false,
|
|
1723
1832
|
allowUnknown: false,
|
|
1724
1833
|
});
|
|
@@ -1726,28 +1835,27 @@ class Order {
|
|
|
1726
1835
|
if (res_error) {
|
|
1727
1836
|
Logger({
|
|
1728
1837
|
level: "WARN",
|
|
1729
|
-
message:
|
|
1838
|
+
message: `Response Validation Warnnings for platform > Order > getShipmentHistory \n ${res_error}`,
|
|
1730
1839
|
});
|
|
1731
|
-
Logger({ level: "WARN", message: res_error });
|
|
1732
1840
|
}
|
|
1733
1841
|
|
|
1734
1842
|
return response;
|
|
1735
1843
|
}
|
|
1736
1844
|
|
|
1737
1845
|
/**
|
|
1738
|
-
* @param {
|
|
1739
|
-
* @param {
|
|
1740
|
-
*
|
|
1741
|
-
*
|
|
1742
|
-
* @
|
|
1743
|
-
* items and may get divided into one or more shipment, each having its own ID.
|
|
1744
|
-
* @param {string} arg.state - State for which reasons are required.
|
|
1745
|
-
* @returns {Promise<PlatformShipmentReasonsResponse>} - Success response
|
|
1846
|
+
* @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object
|
|
1847
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1848
|
+
* @returns {Promise<OrderPlatformModel.PlatformShipmentReasonsResponse>} -
|
|
1849
|
+
* Success response
|
|
1850
|
+
* @name getShipmentReasons
|
|
1746
1851
|
* @summary: Get reasons behind full or partial cancellation of a shipment
|
|
1747
|
-
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
|
|
1852
|
+
* @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/platform/order/getShipmentReasons/).
|
|
1748
1853
|
*/
|
|
1749
|
-
async getShipmentReasons(
|
|
1750
|
-
|
|
1854
|
+
async getShipmentReasons(
|
|
1855
|
+
{ shipmentId, bagId, state } = {},
|
|
1856
|
+
{ headers } = { headers: false }
|
|
1857
|
+
) {
|
|
1858
|
+
const { error } = OrderPlatformValidator.getShipmentReasons().validate(
|
|
1751
1859
|
{
|
|
1752
1860
|
shipmentId,
|
|
1753
1861
|
bagId,
|
|
@@ -1760,7 +1868,9 @@ class Order {
|
|
|
1760
1868
|
}
|
|
1761
1869
|
|
|
1762
1870
|
// Showing warrnings if extra unknown parameters are found
|
|
1763
|
-
const {
|
|
1871
|
+
const {
|
|
1872
|
+
error: warrning,
|
|
1873
|
+
} = OrderPlatformValidator.getShipmentReasons().validate(
|
|
1764
1874
|
{
|
|
1765
1875
|
shipmentId,
|
|
1766
1876
|
bagId,
|
|
@@ -1771,9 +1881,8 @@ class Order {
|
|
|
1771
1881
|
if (warrning) {
|
|
1772
1882
|
Logger({
|
|
1773
1883
|
level: "WARN",
|
|
1774
|
-
message:
|
|
1884
|
+
message: `Parameter Validation warrnings for platform > Order > getShipmentReasons \n ${warrning}`,
|
|
1775
1885
|
});
|
|
1776
|
-
Logger({ level: "WARN", message: warrning });
|
|
1777
1886
|
}
|
|
1778
1887
|
|
|
1779
1888
|
const query_params = {};
|
|
@@ -1786,85 +1895,72 @@ class Order {
|
|
|
1786
1895
|
`/service/platform/order/v1.0/company/${this.config.companyId}/shipments/${shipmentId}/bags/${bagId}/state/${state}/reasons`,
|
|
1787
1896
|
query_params,
|
|
1788
1897
|
undefined,
|
|
1789
|
-
xHeaders
|
|
1898
|
+
xHeaders,
|
|
1899
|
+
{ headers }
|
|
1790
1900
|
);
|
|
1791
1901
|
|
|
1902
|
+
let responseData = response;
|
|
1903
|
+
if (headers) {
|
|
1904
|
+
responseData = response[0];
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1792
1907
|
const {
|
|
1793
1908
|
error: res_error,
|
|
1794
|
-
} =
|
|
1795
|
-
|
|
1796
|
-
allowUnknown: false
|
|
1797
|
-
|
|
1909
|
+
} = OrderPlatformModel.PlatformShipmentReasonsResponse().validate(
|
|
1910
|
+
responseData,
|
|
1911
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1912
|
+
);
|
|
1798
1913
|
|
|
1799
1914
|
if (res_error) {
|
|
1800
1915
|
Logger({
|
|
1801
1916
|
level: "WARN",
|
|
1802
|
-
message:
|
|
1917
|
+
message: `Response Validation Warnnings for platform > Order > getShipmentReasons \n ${res_error}`,
|
|
1803
1918
|
});
|
|
1804
|
-
Logger({ level: "WARN", message: res_error });
|
|
1805
1919
|
}
|
|
1806
1920
|
|
|
1807
1921
|
return response;
|
|
1808
1922
|
}
|
|
1809
1923
|
|
|
1810
1924
|
/**
|
|
1811
|
-
* @param {
|
|
1812
|
-
* @param {
|
|
1813
|
-
* @
|
|
1814
|
-
*
|
|
1815
|
-
*
|
|
1816
|
-
* @
|
|
1817
|
-
* @param {string} [arg.searchType] - Search type key
|
|
1818
|
-
* @param {string} [arg.searchValue] - Search type value
|
|
1819
|
-
* @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format
|
|
1820
|
-
* @param {string} [arg.toDate] - End Date in DD-MM-YYYY format
|
|
1821
|
-
* @param {string} [arg.dpIds] - Comma separated values of delivery partner ids
|
|
1822
|
-
* @param {string} [arg.stores] - Comma separated values of store ids
|
|
1823
|
-
* @param {string} [arg.salesChannels] - Comma separated values of sales channel ids
|
|
1824
|
-
* @param {number} [arg.pageNo] - Page number for paginated data
|
|
1825
|
-
* @param {number} [arg.pageSize] - Page size of data received per page
|
|
1826
|
-
* @param {boolean} [arg.fetchActiveShipment] - Flag to fetch active shipments
|
|
1827
|
-
* @param {boolean} [arg.excludeLockedShipments] - Flag to fetch locked shipments
|
|
1828
|
-
* @param {string} [arg.paymentMethods] - Comma separated values of payment methods
|
|
1829
|
-
* @param {string} [arg.channelShipmentId] - App Shipment Id
|
|
1830
|
-
* @param {string} [arg.channelOrderId] - App Order Id
|
|
1831
|
-
* @param {string} [arg.customMeta] -
|
|
1832
|
-
* @param {string} [arg.orderingChannel] -
|
|
1833
|
-
* @param {string} [arg.companyAffiliateTag] -
|
|
1834
|
-
* @param {boolean} [arg.myOrders] -
|
|
1835
|
-
* @param {string} [arg.platformUserId] -
|
|
1836
|
-
* @param {string} [arg.tags] - Comma separated values of tags
|
|
1837
|
-
* @returns {Promise<ShipmentInternalPlatformViewResponse>} - Success response
|
|
1925
|
+
* @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object
|
|
1926
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1927
|
+
* @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponse>}
|
|
1928
|
+
* - Success response
|
|
1929
|
+
*
|
|
1930
|
+
* @name getShipments
|
|
1838
1931
|
* @summary:
|
|
1839
|
-
* @description:
|
|
1932
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipments/).
|
|
1840
1933
|
*/
|
|
1841
|
-
async getShipments(
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1934
|
+
async getShipments(
|
|
1935
|
+
{
|
|
1936
|
+
lane,
|
|
1937
|
+
bagStatus,
|
|
1938
|
+
statusOverrideLane,
|
|
1939
|
+
timeToDispatch,
|
|
1940
|
+
searchType,
|
|
1941
|
+
searchValue,
|
|
1942
|
+
fromDate,
|
|
1943
|
+
toDate,
|
|
1944
|
+
dpIds,
|
|
1945
|
+
stores,
|
|
1946
|
+
salesChannels,
|
|
1947
|
+
pageNo,
|
|
1948
|
+
pageSize,
|
|
1949
|
+
fetchActiveShipment,
|
|
1950
|
+
excludeLockedShipments,
|
|
1951
|
+
paymentMethods,
|
|
1952
|
+
channelShipmentId,
|
|
1953
|
+
channelOrderId,
|
|
1954
|
+
customMeta,
|
|
1955
|
+
orderingChannel,
|
|
1956
|
+
companyAffiliateTag,
|
|
1957
|
+
myOrders,
|
|
1958
|
+
platformUserId,
|
|
1959
|
+
tags,
|
|
1960
|
+
} = {},
|
|
1961
|
+
{ headers } = { headers: false }
|
|
1962
|
+
) {
|
|
1963
|
+
const { error } = OrderPlatformValidator.getShipments().validate(
|
|
1868
1964
|
{
|
|
1869
1965
|
lane,
|
|
1870
1966
|
bagStatus,
|
|
@@ -1898,7 +1994,7 @@ class Order {
|
|
|
1898
1994
|
}
|
|
1899
1995
|
|
|
1900
1996
|
// Showing warrnings if extra unknown parameters are found
|
|
1901
|
-
const { error: warrning } =
|
|
1997
|
+
const { error: warrning } = OrderPlatformValidator.getShipments().validate(
|
|
1902
1998
|
{
|
|
1903
1999
|
lane,
|
|
1904
2000
|
bagStatus,
|
|
@@ -1930,9 +2026,8 @@ class Order {
|
|
|
1930
2026
|
if (warrning) {
|
|
1931
2027
|
Logger({
|
|
1932
2028
|
level: "WARN",
|
|
1933
|
-
message:
|
|
2029
|
+
message: `Parameter Validation warrnings for platform > Order > getShipments \n ${warrning}`,
|
|
1934
2030
|
});
|
|
1935
|
-
Logger({ level: "WARN", message: warrning });
|
|
1936
2031
|
}
|
|
1937
2032
|
|
|
1938
2033
|
const query_params = {};
|
|
@@ -1969,35 +2064,42 @@ class Order {
|
|
|
1969
2064
|
`/service/platform/order/v1.0/company/${this.config.companyId}/shipments-listing`,
|
|
1970
2065
|
query_params,
|
|
1971
2066
|
undefined,
|
|
1972
|
-
xHeaders
|
|
2067
|
+
xHeaders,
|
|
2068
|
+
{ headers }
|
|
1973
2069
|
);
|
|
1974
2070
|
|
|
2071
|
+
let responseData = response;
|
|
2072
|
+
if (headers) {
|
|
2073
|
+
responseData = response[0];
|
|
2074
|
+
}
|
|
2075
|
+
|
|
1975
2076
|
const {
|
|
1976
2077
|
error: res_error,
|
|
1977
|
-
} =
|
|
1978
|
-
|
|
1979
|
-
allowUnknown: false
|
|
1980
|
-
|
|
2078
|
+
} = OrderPlatformModel.ShipmentInternalPlatformViewResponse().validate(
|
|
2079
|
+
responseData,
|
|
2080
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2081
|
+
);
|
|
1981
2082
|
|
|
1982
2083
|
if (res_error) {
|
|
1983
2084
|
Logger({
|
|
1984
2085
|
level: "WARN",
|
|
1985
|
-
message:
|
|
2086
|
+
message: `Response Validation Warnnings for platform > Order > getShipments \n ${res_error}`,
|
|
1986
2087
|
});
|
|
1987
|
-
Logger({ level: "WARN", message: res_error });
|
|
1988
2088
|
}
|
|
1989
2089
|
|
|
1990
2090
|
return response;
|
|
1991
2091
|
}
|
|
1992
2092
|
|
|
1993
2093
|
/**
|
|
1994
|
-
* @param {
|
|
1995
|
-
* @
|
|
2094
|
+
* @param {OrderPlatformValidator.GetStateTransitionMapParam} arg - Arg object
|
|
2095
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2096
|
+
* @returns {Promise<OrderPlatformModel.BagStateTransitionMap>} - Success response
|
|
2097
|
+
* @name getStateTransitionMap
|
|
1996
2098
|
* @summary:
|
|
1997
|
-
* @description:
|
|
2099
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionMap/).
|
|
1998
2100
|
*/
|
|
1999
|
-
async getStateTransitionMap({} = {}) {
|
|
2000
|
-
const { error } =
|
|
2101
|
+
async getStateTransitionMap({ headers } = { headers: false }) {
|
|
2102
|
+
const { error } = OrderPlatformValidator.getStateTransitionMap().validate(
|
|
2001
2103
|
{},
|
|
2002
2104
|
{ abortEarly: false, allowUnknown: true }
|
|
2003
2105
|
);
|
|
@@ -2006,16 +2108,17 @@ class Order {
|
|
|
2006
2108
|
}
|
|
2007
2109
|
|
|
2008
2110
|
// Showing warrnings if extra unknown parameters are found
|
|
2009
|
-
const {
|
|
2111
|
+
const {
|
|
2112
|
+
error: warrning,
|
|
2113
|
+
} = OrderPlatformValidator.getStateTransitionMap().validate(
|
|
2010
2114
|
{},
|
|
2011
2115
|
{ abortEarly: false, allowUnknown: false }
|
|
2012
2116
|
);
|
|
2013
2117
|
if (warrning) {
|
|
2014
2118
|
Logger({
|
|
2015
2119
|
level: "WARN",
|
|
2016
|
-
message:
|
|
2120
|
+
message: `Parameter Validation warrnings for platform > Order > getStateTransitionMap \n ${warrning}`,
|
|
2017
2121
|
});
|
|
2018
|
-
Logger({ level: "WARN", message: warrning });
|
|
2019
2122
|
}
|
|
2020
2123
|
|
|
2021
2124
|
const query_params = {};
|
|
@@ -2028,12 +2131,18 @@ class Order {
|
|
|
2028
2131
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/bag/state/transition`,
|
|
2029
2132
|
query_params,
|
|
2030
2133
|
undefined,
|
|
2031
|
-
xHeaders
|
|
2134
|
+
xHeaders,
|
|
2135
|
+
{ headers }
|
|
2032
2136
|
);
|
|
2033
2137
|
|
|
2138
|
+
let responseData = response;
|
|
2139
|
+
if (headers) {
|
|
2140
|
+
responseData = response[0];
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2034
2143
|
const {
|
|
2035
2144
|
error: res_error,
|
|
2036
|
-
} =
|
|
2145
|
+
} = OrderPlatformModel.BagStateTransitionMap().validate(responseData, {
|
|
2037
2146
|
abortEarly: false,
|
|
2038
2147
|
allowUnknown: false,
|
|
2039
2148
|
});
|
|
@@ -2041,24 +2150,26 @@ class Order {
|
|
|
2041
2150
|
if (res_error) {
|
|
2042
2151
|
Logger({
|
|
2043
2152
|
level: "WARN",
|
|
2044
|
-
message:
|
|
2153
|
+
message: `Response Validation Warnnings for platform > Order > getStateTransitionMap \n ${res_error}`,
|
|
2045
2154
|
});
|
|
2046
|
-
Logger({ level: "WARN", message: res_error });
|
|
2047
2155
|
}
|
|
2048
2156
|
|
|
2049
2157
|
return response;
|
|
2050
2158
|
}
|
|
2051
2159
|
|
|
2052
2160
|
/**
|
|
2053
|
-
* @param {
|
|
2054
|
-
* @param {
|
|
2055
|
-
* @
|
|
2056
|
-
* @
|
|
2161
|
+
* @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object
|
|
2162
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2163
|
+
* @returns {Promise<OrderPlatformModel.FiltersResponse>} - Success response
|
|
2164
|
+
* @name getfilters
|
|
2057
2165
|
* @summary:
|
|
2058
|
-
* @description:
|
|
2166
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/).
|
|
2059
2167
|
*/
|
|
2060
|
-
async getfilters(
|
|
2061
|
-
|
|
2168
|
+
async getfilters(
|
|
2169
|
+
{ view, groupEntity } = {},
|
|
2170
|
+
{ headers } = { headers: false }
|
|
2171
|
+
) {
|
|
2172
|
+
const { error } = OrderPlatformValidator.getfilters().validate(
|
|
2062
2173
|
{
|
|
2063
2174
|
view,
|
|
2064
2175
|
groupEntity,
|
|
@@ -2070,7 +2181,7 @@ class Order {
|
|
|
2070
2181
|
}
|
|
2071
2182
|
|
|
2072
2183
|
// Showing warrnings if extra unknown parameters are found
|
|
2073
|
-
const { error: warrning } =
|
|
2184
|
+
const { error: warrning } = OrderPlatformValidator.getfilters().validate(
|
|
2074
2185
|
{
|
|
2075
2186
|
view,
|
|
2076
2187
|
groupEntity,
|
|
@@ -2080,9 +2191,8 @@ class Order {
|
|
|
2080
2191
|
if (warrning) {
|
|
2081
2192
|
Logger({
|
|
2082
2193
|
level: "WARN",
|
|
2083
|
-
message:
|
|
2194
|
+
message: `Parameter Validation warrnings for platform > Order > getfilters \n ${warrning}`,
|
|
2084
2195
|
});
|
|
2085
|
-
Logger({ level: "WARN", message: warrning });
|
|
2086
2196
|
}
|
|
2087
2197
|
|
|
2088
2198
|
const query_params = {};
|
|
@@ -2097,34 +2207,46 @@ class Order {
|
|
|
2097
2207
|
`/service/platform/order/v1.0/company/${this.config.companyId}/filter-listing`,
|
|
2098
2208
|
query_params,
|
|
2099
2209
|
undefined,
|
|
2100
|
-
xHeaders
|
|
2210
|
+
xHeaders,
|
|
2211
|
+
{ headers }
|
|
2101
2212
|
);
|
|
2102
2213
|
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2214
|
+
let responseData = response;
|
|
2215
|
+
if (headers) {
|
|
2216
|
+
responseData = response[0];
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
const {
|
|
2220
|
+
error: res_error,
|
|
2221
|
+
} = OrderPlatformModel.FiltersResponse().validate(responseData, {
|
|
2222
|
+
abortEarly: false,
|
|
2223
|
+
allowUnknown: false,
|
|
2224
|
+
});
|
|
2107
2225
|
|
|
2108
2226
|
if (res_error) {
|
|
2109
2227
|
Logger({
|
|
2110
2228
|
level: "WARN",
|
|
2111
|
-
message:
|
|
2229
|
+
message: `Response Validation Warnnings for platform > Order > getfilters \n ${res_error}`,
|
|
2112
2230
|
});
|
|
2113
|
-
Logger({ level: "WARN", message: res_error });
|
|
2114
2231
|
}
|
|
2115
2232
|
|
|
2116
2233
|
return response;
|
|
2117
2234
|
}
|
|
2118
2235
|
|
|
2119
2236
|
/**
|
|
2120
|
-
* @param {
|
|
2121
|
-
* @param {
|
|
2122
|
-
* @returns {Promise<InvalidateShipmentCacheResponse>} -
|
|
2237
|
+
* @param {OrderPlatformValidator.InvalidateShipmentCacheParam} arg - Arg object
|
|
2238
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2239
|
+
* @returns {Promise<OrderPlatformModel.InvalidateShipmentCacheResponse>} -
|
|
2240
|
+
* Success response
|
|
2241
|
+
* @name invalidateShipmentCache
|
|
2123
2242
|
* @summary:
|
|
2124
|
-
* @description: Invalidate shipment Cache
|
|
2243
|
+
* @description: Invalidate shipment Cache - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/invalidateShipmentCache/).
|
|
2125
2244
|
*/
|
|
2126
|
-
async invalidateShipmentCache(
|
|
2127
|
-
|
|
2245
|
+
async invalidateShipmentCache(
|
|
2246
|
+
{ body } = {},
|
|
2247
|
+
{ headers } = { headers: false }
|
|
2248
|
+
) {
|
|
2249
|
+
const { error } = OrderPlatformValidator.invalidateShipmentCache().validate(
|
|
2128
2250
|
{
|
|
2129
2251
|
body,
|
|
2130
2252
|
},
|
|
@@ -2137,7 +2259,7 @@ class Order {
|
|
|
2137
2259
|
// Showing warrnings if extra unknown parameters are found
|
|
2138
2260
|
const {
|
|
2139
2261
|
error: warrning,
|
|
2140
|
-
} =
|
|
2262
|
+
} = OrderPlatformValidator.invalidateShipmentCache().validate(
|
|
2141
2263
|
{
|
|
2142
2264
|
body,
|
|
2143
2265
|
},
|
|
@@ -2146,9 +2268,8 @@ class Order {
|
|
|
2146
2268
|
if (warrning) {
|
|
2147
2269
|
Logger({
|
|
2148
2270
|
level: "WARN",
|
|
2149
|
-
message:
|
|
2271
|
+
message: `Parameter Validation warrnings for platform > Order > invalidateShipmentCache \n ${warrning}`,
|
|
2150
2272
|
});
|
|
2151
|
-
Logger({ level: "WARN", message: warrning });
|
|
2152
2273
|
}
|
|
2153
2274
|
|
|
2154
2275
|
const query_params = {};
|
|
@@ -2161,36 +2282,42 @@ class Order {
|
|
|
2161
2282
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/update-cache`,
|
|
2162
2283
|
query_params,
|
|
2163
2284
|
body,
|
|
2164
|
-
xHeaders
|
|
2285
|
+
xHeaders,
|
|
2286
|
+
{ headers }
|
|
2165
2287
|
);
|
|
2166
2288
|
|
|
2289
|
+
let responseData = response;
|
|
2290
|
+
if (headers) {
|
|
2291
|
+
responseData = response[0];
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2167
2294
|
const {
|
|
2168
2295
|
error: res_error,
|
|
2169
|
-
} =
|
|
2170
|
-
|
|
2171
|
-
allowUnknown: false
|
|
2172
|
-
|
|
2296
|
+
} = OrderPlatformModel.InvalidateShipmentCacheResponse().validate(
|
|
2297
|
+
responseData,
|
|
2298
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2299
|
+
);
|
|
2173
2300
|
|
|
2174
2301
|
if (res_error) {
|
|
2175
2302
|
Logger({
|
|
2176
2303
|
level: "WARN",
|
|
2177
|
-
message:
|
|
2304
|
+
message: `Response Validation Warnnings for platform > Order > invalidateShipmentCache \n ${res_error}`,
|
|
2178
2305
|
});
|
|
2179
|
-
Logger({ level: "WARN", message: res_error });
|
|
2180
2306
|
}
|
|
2181
2307
|
|
|
2182
2308
|
return response;
|
|
2183
2309
|
}
|
|
2184
2310
|
|
|
2185
2311
|
/**
|
|
2186
|
-
* @param {
|
|
2187
|
-
* @param {
|
|
2188
|
-
* @returns {Promise<ResponseDetail>} - Success response
|
|
2312
|
+
* @param {OrderPlatformValidator.OrderUpdateParam} arg - Arg object
|
|
2313
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2314
|
+
* @returns {Promise<OrderPlatformModel.ResponseDetail>} - Success response
|
|
2315
|
+
* @name orderUpdate
|
|
2189
2316
|
* @summary:
|
|
2190
|
-
* @description:
|
|
2317
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/orderUpdate/).
|
|
2191
2318
|
*/
|
|
2192
|
-
async orderUpdate({ body } = {}) {
|
|
2193
|
-
const { error } =
|
|
2319
|
+
async orderUpdate({ body } = {}, { headers } = { headers: false }) {
|
|
2320
|
+
const { error } = OrderPlatformValidator.orderUpdate().validate(
|
|
2194
2321
|
{
|
|
2195
2322
|
body,
|
|
2196
2323
|
},
|
|
@@ -2201,7 +2328,7 @@ class Order {
|
|
|
2201
2328
|
}
|
|
2202
2329
|
|
|
2203
2330
|
// Showing warrnings if extra unknown parameters are found
|
|
2204
|
-
const { error: warrning } =
|
|
2331
|
+
const { error: warrning } = OrderPlatformValidator.orderUpdate().validate(
|
|
2205
2332
|
{
|
|
2206
2333
|
body,
|
|
2207
2334
|
},
|
|
@@ -2210,9 +2337,8 @@ class Order {
|
|
|
2210
2337
|
if (warrning) {
|
|
2211
2338
|
Logger({
|
|
2212
2339
|
level: "WARN",
|
|
2213
|
-
message:
|
|
2340
|
+
message: `Parameter Validation warrnings for platform > Order > orderUpdate \n ${warrning}`,
|
|
2214
2341
|
});
|
|
2215
|
-
Logger({ level: "WARN", message: warrning });
|
|
2216
2342
|
}
|
|
2217
2343
|
|
|
2218
2344
|
const query_params = {};
|
|
@@ -2225,34 +2351,42 @@ class Order {
|
|
|
2225
2351
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/order/validation`,
|
|
2226
2352
|
query_params,
|
|
2227
2353
|
body,
|
|
2228
|
-
xHeaders
|
|
2354
|
+
xHeaders,
|
|
2355
|
+
{ headers }
|
|
2229
2356
|
);
|
|
2230
2357
|
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2358
|
+
let responseData = response;
|
|
2359
|
+
if (headers) {
|
|
2360
|
+
responseData = response[0];
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
const {
|
|
2364
|
+
error: res_error,
|
|
2365
|
+
} = OrderPlatformModel.ResponseDetail().validate(responseData, {
|
|
2366
|
+
abortEarly: false,
|
|
2367
|
+
allowUnknown: false,
|
|
2368
|
+
});
|
|
2235
2369
|
|
|
2236
2370
|
if (res_error) {
|
|
2237
2371
|
Logger({
|
|
2238
2372
|
level: "WARN",
|
|
2239
|
-
message:
|
|
2373
|
+
message: `Response Validation Warnnings for platform > Order > orderUpdate \n ${res_error}`,
|
|
2240
2374
|
});
|
|
2241
|
-
Logger({ level: "WARN", message: res_error });
|
|
2242
2375
|
}
|
|
2243
2376
|
|
|
2244
2377
|
return response;
|
|
2245
2378
|
}
|
|
2246
2379
|
|
|
2247
2380
|
/**
|
|
2248
|
-
* @param {
|
|
2249
|
-
* @param {
|
|
2250
|
-
* @returns {Promise<ShipmentHistoryResponse>} - Success response
|
|
2381
|
+
* @param {OrderPlatformValidator.PostShipmentHistoryParam} arg - Arg object
|
|
2382
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2383
|
+
* @returns {Promise<OrderPlatformModel.ShipmentHistoryResponse>} - Success response
|
|
2384
|
+
* @name postShipmentHistory
|
|
2251
2385
|
* @summary:
|
|
2252
|
-
* @description:
|
|
2386
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postShipmentHistory/).
|
|
2253
2387
|
*/
|
|
2254
|
-
async postShipmentHistory({ body } = {}) {
|
|
2255
|
-
const { error } =
|
|
2388
|
+
async postShipmentHistory({ body } = {}, { headers } = { headers: false }) {
|
|
2389
|
+
const { error } = OrderPlatformValidator.postShipmentHistory().validate(
|
|
2256
2390
|
{
|
|
2257
2391
|
body,
|
|
2258
2392
|
},
|
|
@@ -2263,7 +2397,9 @@ class Order {
|
|
|
2263
2397
|
}
|
|
2264
2398
|
|
|
2265
2399
|
// Showing warrnings if extra unknown parameters are found
|
|
2266
|
-
const {
|
|
2400
|
+
const {
|
|
2401
|
+
error: warrning,
|
|
2402
|
+
} = OrderPlatformValidator.postShipmentHistory().validate(
|
|
2267
2403
|
{
|
|
2268
2404
|
body,
|
|
2269
2405
|
},
|
|
@@ -2272,9 +2408,8 @@ class Order {
|
|
|
2272
2408
|
if (warrning) {
|
|
2273
2409
|
Logger({
|
|
2274
2410
|
level: "WARN",
|
|
2275
|
-
message:
|
|
2411
|
+
message: `Parameter Validation warrnings for platform > Order > postShipmentHistory \n ${warrning}`,
|
|
2276
2412
|
});
|
|
2277
|
-
Logger({ level: "WARN", message: warrning });
|
|
2278
2413
|
}
|
|
2279
2414
|
|
|
2280
2415
|
const query_params = {};
|
|
@@ -2287,12 +2422,18 @@ class Order {
|
|
|
2287
2422
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/history`,
|
|
2288
2423
|
query_params,
|
|
2289
2424
|
body,
|
|
2290
|
-
xHeaders
|
|
2425
|
+
xHeaders,
|
|
2426
|
+
{ headers }
|
|
2291
2427
|
);
|
|
2292
2428
|
|
|
2429
|
+
let responseData = response;
|
|
2430
|
+
if (headers) {
|
|
2431
|
+
responseData = response[0];
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2293
2434
|
const {
|
|
2294
2435
|
error: res_error,
|
|
2295
|
-
} =
|
|
2436
|
+
} = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, {
|
|
2296
2437
|
abortEarly: false,
|
|
2297
2438
|
allowUnknown: false,
|
|
2298
2439
|
});
|
|
@@ -2300,23 +2441,23 @@ class Order {
|
|
|
2300
2441
|
if (res_error) {
|
|
2301
2442
|
Logger({
|
|
2302
2443
|
level: "WARN",
|
|
2303
|
-
message:
|
|
2444
|
+
message: `Response Validation Warnnings for platform > Order > postShipmentHistory \n ${res_error}`,
|
|
2304
2445
|
});
|
|
2305
|
-
Logger({ level: "WARN", message: res_error });
|
|
2306
2446
|
}
|
|
2307
2447
|
|
|
2308
2448
|
return response;
|
|
2309
2449
|
}
|
|
2310
2450
|
|
|
2311
2451
|
/**
|
|
2312
|
-
* @param {
|
|
2313
|
-
* @param {
|
|
2314
|
-
* @returns {Promise<CreateOrderResponse>} - Success response
|
|
2452
|
+
* @param {OrderPlatformValidator.ProcessManifestParam} arg - Arg object
|
|
2453
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2454
|
+
* @returns {Promise<OrderPlatformModel.CreateOrderResponse>} - Success response
|
|
2455
|
+
* @name processManifest
|
|
2315
2456
|
* @summary:
|
|
2316
|
-
* @description:
|
|
2457
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/processManifest/).
|
|
2317
2458
|
*/
|
|
2318
|
-
async processManifest({ body } = {}) {
|
|
2319
|
-
const { error } =
|
|
2459
|
+
async processManifest({ body } = {}, { headers } = { headers: false }) {
|
|
2460
|
+
const { error } = OrderPlatformValidator.processManifest().validate(
|
|
2320
2461
|
{
|
|
2321
2462
|
body,
|
|
2322
2463
|
},
|
|
@@ -2327,7 +2468,9 @@ class Order {
|
|
|
2327
2468
|
}
|
|
2328
2469
|
|
|
2329
2470
|
// Showing warrnings if extra unknown parameters are found
|
|
2330
|
-
const {
|
|
2471
|
+
const {
|
|
2472
|
+
error: warrning,
|
|
2473
|
+
} = OrderPlatformValidator.processManifest().validate(
|
|
2331
2474
|
{
|
|
2332
2475
|
body,
|
|
2333
2476
|
},
|
|
@@ -2336,9 +2479,8 @@ class Order {
|
|
|
2336
2479
|
if (warrning) {
|
|
2337
2480
|
Logger({
|
|
2338
2481
|
level: "WARN",
|
|
2339
|
-
message:
|
|
2482
|
+
message: `Parameter Validation warrnings for platform > Order > processManifest \n ${warrning}`,
|
|
2340
2483
|
});
|
|
2341
|
-
Logger({ level: "WARN", message: warrning });
|
|
2342
2484
|
}
|
|
2343
2485
|
|
|
2344
2486
|
const query_params = {};
|
|
@@ -2351,12 +2493,18 @@ class Order {
|
|
|
2351
2493
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/process-manifest`,
|
|
2352
2494
|
query_params,
|
|
2353
2495
|
body,
|
|
2354
|
-
xHeaders
|
|
2496
|
+
xHeaders,
|
|
2497
|
+
{ headers }
|
|
2355
2498
|
);
|
|
2356
2499
|
|
|
2500
|
+
let responseData = response;
|
|
2501
|
+
if (headers) {
|
|
2502
|
+
responseData = response[0];
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2357
2505
|
const {
|
|
2358
2506
|
error: res_error,
|
|
2359
|
-
} =
|
|
2507
|
+
} = OrderPlatformModel.CreateOrderResponse().validate(responseData, {
|
|
2360
2508
|
abortEarly: false,
|
|
2361
2509
|
allowUnknown: false,
|
|
2362
2510
|
});
|
|
@@ -2364,23 +2512,23 @@ class Order {
|
|
|
2364
2512
|
if (res_error) {
|
|
2365
2513
|
Logger({
|
|
2366
2514
|
level: "WARN",
|
|
2367
|
-
message:
|
|
2515
|
+
message: `Response Validation Warnnings for platform > Order > processManifest \n ${res_error}`,
|
|
2368
2516
|
});
|
|
2369
|
-
Logger({ level: "WARN", message: res_error });
|
|
2370
2517
|
}
|
|
2371
2518
|
|
|
2372
2519
|
return response;
|
|
2373
2520
|
}
|
|
2374
2521
|
|
|
2375
2522
|
/**
|
|
2376
|
-
* @param {
|
|
2377
|
-
* @param {
|
|
2378
|
-
* @returns {Promise<StoreReassignResponse>} - Success response
|
|
2523
|
+
* @param {OrderPlatformValidator.ReassignLocationParam} arg - Arg object
|
|
2524
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2525
|
+
* @returns {Promise<OrderPlatformModel.StoreReassignResponse>} - Success response
|
|
2526
|
+
* @name reassignLocation
|
|
2379
2527
|
* @summary:
|
|
2380
|
-
* @description: Reassign Location
|
|
2528
|
+
* @description: Reassign Location - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/reassignLocation/).
|
|
2381
2529
|
*/
|
|
2382
|
-
async reassignLocation({ body } = {}) {
|
|
2383
|
-
const { error } =
|
|
2530
|
+
async reassignLocation({ body } = {}, { headers } = { headers: false }) {
|
|
2531
|
+
const { error } = OrderPlatformValidator.reassignLocation().validate(
|
|
2384
2532
|
{
|
|
2385
2533
|
body,
|
|
2386
2534
|
},
|
|
@@ -2391,7 +2539,9 @@ class Order {
|
|
|
2391
2539
|
}
|
|
2392
2540
|
|
|
2393
2541
|
// Showing warrnings if extra unknown parameters are found
|
|
2394
|
-
const {
|
|
2542
|
+
const {
|
|
2543
|
+
error: warrning,
|
|
2544
|
+
} = OrderPlatformValidator.reassignLocation().validate(
|
|
2395
2545
|
{
|
|
2396
2546
|
body,
|
|
2397
2547
|
},
|
|
@@ -2400,9 +2550,8 @@ class Order {
|
|
|
2400
2550
|
if (warrning) {
|
|
2401
2551
|
Logger({
|
|
2402
2552
|
level: "WARN",
|
|
2403
|
-
message:
|
|
2553
|
+
message: `Parameter Validation warrnings for platform > Order > reassignLocation \n ${warrning}`,
|
|
2404
2554
|
});
|
|
2405
|
-
Logger({ level: "WARN", message: warrning });
|
|
2406
2555
|
}
|
|
2407
2556
|
|
|
2408
2557
|
const query_params = {};
|
|
@@ -2415,12 +2564,18 @@ class Order {
|
|
|
2415
2564
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/store/reassign-internal`,
|
|
2416
2565
|
query_params,
|
|
2417
2566
|
body,
|
|
2418
|
-
xHeaders
|
|
2567
|
+
xHeaders,
|
|
2568
|
+
{ headers }
|
|
2419
2569
|
);
|
|
2420
2570
|
|
|
2571
|
+
let responseData = response;
|
|
2572
|
+
if (headers) {
|
|
2573
|
+
responseData = response[0];
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2421
2576
|
const {
|
|
2422
2577
|
error: res_error,
|
|
2423
|
-
} =
|
|
2578
|
+
} = OrderPlatformModel.StoreReassignResponse().validate(responseData, {
|
|
2424
2579
|
abortEarly: false,
|
|
2425
2580
|
allowUnknown: false,
|
|
2426
2581
|
});
|
|
@@ -2428,23 +2583,23 @@ class Order {
|
|
|
2428
2583
|
if (res_error) {
|
|
2429
2584
|
Logger({
|
|
2430
2585
|
level: "WARN",
|
|
2431
|
-
message:
|
|
2586
|
+
message: `Response Validation Warnnings for platform > Order > reassignLocation \n ${res_error}`,
|
|
2432
2587
|
});
|
|
2433
|
-
Logger({ level: "WARN", message: res_error });
|
|
2434
2588
|
}
|
|
2435
2589
|
|
|
2436
2590
|
return response;
|
|
2437
2591
|
}
|
|
2438
2592
|
|
|
2439
2593
|
/**
|
|
2440
|
-
* @param {
|
|
2441
|
-
* @param {
|
|
2442
|
-
* @returns {Promise<OrderStatusResult>} - Success response
|
|
2594
|
+
* @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object
|
|
2595
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2596
|
+
* @returns {Promise<OrderPlatformModel.OrderStatusResult>} - Success response
|
|
2597
|
+
* @name sendSmsNinja
|
|
2443
2598
|
* @summary:
|
|
2444
|
-
* @description:
|
|
2599
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendSmsNinja/).
|
|
2445
2600
|
*/
|
|
2446
|
-
async sendSmsNinja({ body } = {}) {
|
|
2447
|
-
const { error } =
|
|
2601
|
+
async sendSmsNinja({ body } = {}, { headers } = { headers: false }) {
|
|
2602
|
+
const { error } = OrderPlatformValidator.sendSmsNinja().validate(
|
|
2448
2603
|
{
|
|
2449
2604
|
body,
|
|
2450
2605
|
},
|
|
@@ -2455,7 +2610,7 @@ class Order {
|
|
|
2455
2610
|
}
|
|
2456
2611
|
|
|
2457
2612
|
// Showing warrnings if extra unknown parameters are found
|
|
2458
|
-
const { error: warrning } =
|
|
2613
|
+
const { error: warrning } = OrderPlatformValidator.sendSmsNinja().validate(
|
|
2459
2614
|
{
|
|
2460
2615
|
body,
|
|
2461
2616
|
},
|
|
@@ -2464,9 +2619,8 @@ class Order {
|
|
|
2464
2619
|
if (warrning) {
|
|
2465
2620
|
Logger({
|
|
2466
2621
|
level: "WARN",
|
|
2467
|
-
message:
|
|
2622
|
+
message: `Parameter Validation warrnings for platform > Order > sendSmsNinja \n ${warrning}`,
|
|
2468
2623
|
});
|
|
2469
|
-
Logger({ level: "WARN", message: warrning });
|
|
2470
2624
|
}
|
|
2471
2625
|
|
|
2472
2626
|
const query_params = {};
|
|
@@ -2479,12 +2633,18 @@ class Order {
|
|
|
2479
2633
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/ninja/send-sms`,
|
|
2480
2634
|
query_params,
|
|
2481
2635
|
body,
|
|
2482
|
-
xHeaders
|
|
2636
|
+
xHeaders,
|
|
2637
|
+
{ headers }
|
|
2483
2638
|
);
|
|
2484
2639
|
|
|
2640
|
+
let responseData = response;
|
|
2641
|
+
if (headers) {
|
|
2642
|
+
responseData = response[0];
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2485
2645
|
const {
|
|
2486
2646
|
error: res_error,
|
|
2487
|
-
} =
|
|
2647
|
+
} = OrderPlatformModel.OrderStatusResult().validate(responseData, {
|
|
2488
2648
|
abortEarly: false,
|
|
2489
2649
|
allowUnknown: false,
|
|
2490
2650
|
});
|
|
@@ -2492,23 +2652,23 @@ class Order {
|
|
|
2492
2652
|
if (res_error) {
|
|
2493
2653
|
Logger({
|
|
2494
2654
|
level: "WARN",
|
|
2495
|
-
message:
|
|
2655
|
+
message: `Response Validation Warnnings for platform > Order > sendSmsNinja \n ${res_error}`,
|
|
2496
2656
|
});
|
|
2497
|
-
Logger({ level: "WARN", message: res_error });
|
|
2498
2657
|
}
|
|
2499
2658
|
|
|
2500
2659
|
return response;
|
|
2501
2660
|
}
|
|
2502
2661
|
|
|
2503
2662
|
/**
|
|
2504
|
-
* @param {
|
|
2505
|
-
* @param {
|
|
2506
|
-
* @returns {Promise<SendUserMobileOtpResponse>} - Success response
|
|
2663
|
+
* @param {OrderPlatformValidator.SendUserMobileOTPParam} arg - Arg object
|
|
2664
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2665
|
+
* @returns {Promise<OrderPlatformModel.SendUserMobileOtpResponse>} - Success response
|
|
2666
|
+
* @name sendUserMobileOTP
|
|
2507
2667
|
* @summary:
|
|
2508
|
-
* @description:
|
|
2668
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendUserMobileOTP/).
|
|
2509
2669
|
*/
|
|
2510
|
-
async sendUserMobileOTP({ body } = {}) {
|
|
2511
|
-
const { error } =
|
|
2670
|
+
async sendUserMobileOTP({ body } = {}, { headers } = { headers: false }) {
|
|
2671
|
+
const { error } = OrderPlatformValidator.sendUserMobileOTP().validate(
|
|
2512
2672
|
{
|
|
2513
2673
|
body,
|
|
2514
2674
|
},
|
|
@@ -2519,7 +2679,9 @@ class Order {
|
|
|
2519
2679
|
}
|
|
2520
2680
|
|
|
2521
2681
|
// Showing warrnings if extra unknown parameters are found
|
|
2522
|
-
const {
|
|
2682
|
+
const {
|
|
2683
|
+
error: warrning,
|
|
2684
|
+
} = OrderPlatformValidator.sendUserMobileOTP().validate(
|
|
2523
2685
|
{
|
|
2524
2686
|
body,
|
|
2525
2687
|
},
|
|
@@ -2528,9 +2690,8 @@ class Order {
|
|
|
2528
2690
|
if (warrning) {
|
|
2529
2691
|
Logger({
|
|
2530
2692
|
level: "WARN",
|
|
2531
|
-
message:
|
|
2693
|
+
message: `Parameter Validation warrnings for platform > Order > sendUserMobileOTP \n ${warrning}`,
|
|
2532
2694
|
});
|
|
2533
|
-
Logger({ level: "WARN", message: warrning });
|
|
2534
2695
|
}
|
|
2535
2696
|
|
|
2536
2697
|
const query_params = {};
|
|
@@ -2543,12 +2704,18 @@ class Order {
|
|
|
2543
2704
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/send/otp/mobile`,
|
|
2544
2705
|
query_params,
|
|
2545
2706
|
body,
|
|
2546
|
-
xHeaders
|
|
2707
|
+
xHeaders,
|
|
2708
|
+
{ headers }
|
|
2547
2709
|
);
|
|
2548
2710
|
|
|
2711
|
+
let responseData = response;
|
|
2712
|
+
if (headers) {
|
|
2713
|
+
responseData = response[0];
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2549
2716
|
const {
|
|
2550
2717
|
error: res_error,
|
|
2551
|
-
} =
|
|
2718
|
+
} = OrderPlatformModel.SendUserMobileOtpResponse().validate(responseData, {
|
|
2552
2719
|
abortEarly: false,
|
|
2553
2720
|
allowUnknown: false,
|
|
2554
2721
|
});
|
|
@@ -2556,48 +2723,39 @@ class Order {
|
|
|
2556
2723
|
if (res_error) {
|
|
2557
2724
|
Logger({
|
|
2558
2725
|
level: "WARN",
|
|
2559
|
-
message:
|
|
2726
|
+
message: `Response Validation Warnnings for platform > Order > sendUserMobileOTP \n ${res_error}`,
|
|
2560
2727
|
});
|
|
2561
|
-
Logger({ level: "WARN", message: res_error });
|
|
2562
2728
|
}
|
|
2563
2729
|
|
|
2564
2730
|
return response;
|
|
2565
2731
|
}
|
|
2566
2732
|
|
|
2567
2733
|
/**
|
|
2568
|
-
* @param {
|
|
2569
|
-
* @param {
|
|
2570
|
-
* @
|
|
2571
|
-
* @
|
|
2572
|
-
* @param {string} [arg.addressType] -
|
|
2573
|
-
* @param {string} [arg.pincode] -
|
|
2574
|
-
* @param {string} [arg.phone] -
|
|
2575
|
-
* @param {string} [arg.email] -
|
|
2576
|
-
* @param {string} [arg.landmark] -
|
|
2577
|
-
* @param {string} arg.addressCategory -
|
|
2578
|
-
* @param {string} [arg.city] -
|
|
2579
|
-
* @param {string} [arg.state] -
|
|
2580
|
-
* @param {string} [arg.country] -
|
|
2581
|
-
* @returns {Promise<BaseResponse>} - Success response
|
|
2734
|
+
* @param {OrderPlatformValidator.UpdateAddressParam} arg - Arg object
|
|
2735
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2736
|
+
* @returns {Promise<OrderPlatformModel.BaseResponse>} - Success response
|
|
2737
|
+
* @name updateAddress
|
|
2582
2738
|
* @summary:
|
|
2583
|
-
* @description:
|
|
2739
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateAddress/).
|
|
2584
2740
|
*/
|
|
2585
|
-
async updateAddress(
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2741
|
+
async updateAddress(
|
|
2742
|
+
{
|
|
2743
|
+
shipmentId,
|
|
2744
|
+
addressCategory,
|
|
2745
|
+
name,
|
|
2746
|
+
address,
|
|
2747
|
+
addressType,
|
|
2748
|
+
pincode,
|
|
2749
|
+
phone,
|
|
2750
|
+
email,
|
|
2751
|
+
landmark,
|
|
2752
|
+
city,
|
|
2753
|
+
state,
|
|
2754
|
+
country,
|
|
2755
|
+
} = {},
|
|
2756
|
+
{ headers } = { headers: false }
|
|
2757
|
+
) {
|
|
2758
|
+
const { error } = OrderPlatformValidator.updateAddress().validate(
|
|
2601
2759
|
{
|
|
2602
2760
|
shipmentId,
|
|
2603
2761
|
addressCategory,
|
|
@@ -2620,7 +2778,7 @@ class Order {
|
|
|
2620
2778
|
}
|
|
2621
2779
|
|
|
2622
2780
|
// Showing warrnings if extra unknown parameters are found
|
|
2623
|
-
const { error: warrning } =
|
|
2781
|
+
const { error: warrning } = OrderPlatformValidator.updateAddress().validate(
|
|
2624
2782
|
{
|
|
2625
2783
|
shipmentId,
|
|
2626
2784
|
addressCategory,
|
|
@@ -2641,9 +2799,8 @@ class Order {
|
|
|
2641
2799
|
if (warrning) {
|
|
2642
2800
|
Logger({
|
|
2643
2801
|
level: "WARN",
|
|
2644
|
-
message:
|
|
2802
|
+
message: `Parameter Validation warrnings for platform > Order > updateAddress \n ${warrning}`,
|
|
2645
2803
|
});
|
|
2646
|
-
Logger({ level: "WARN", message: warrning });
|
|
2647
2804
|
}
|
|
2648
2805
|
|
|
2649
2806
|
const query_params = {};
|
|
@@ -2668,10 +2825,18 @@ class Order {
|
|
|
2668
2825
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/delight/update-address`,
|
|
2669
2826
|
query_params,
|
|
2670
2827
|
undefined,
|
|
2671
|
-
xHeaders
|
|
2828
|
+
xHeaders,
|
|
2829
|
+
{ headers }
|
|
2672
2830
|
);
|
|
2673
2831
|
|
|
2674
|
-
|
|
2832
|
+
let responseData = response;
|
|
2833
|
+
if (headers) {
|
|
2834
|
+
responseData = response[0];
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
const {
|
|
2838
|
+
error: res_error,
|
|
2839
|
+
} = OrderPlatformModel.BaseResponse().validate(responseData, {
|
|
2675
2840
|
abortEarly: false,
|
|
2676
2841
|
allowUnknown: false,
|
|
2677
2842
|
});
|
|
@@ -2679,23 +2844,30 @@ class Order {
|
|
|
2679
2844
|
if (res_error) {
|
|
2680
2845
|
Logger({
|
|
2681
2846
|
level: "WARN",
|
|
2682
|
-
message:
|
|
2847
|
+
message: `Response Validation Warnnings for platform > Order > updateAddress \n ${res_error}`,
|
|
2683
2848
|
});
|
|
2684
|
-
Logger({ level: "WARN", message: res_error });
|
|
2685
2849
|
}
|
|
2686
2850
|
|
|
2687
2851
|
return response;
|
|
2688
2852
|
}
|
|
2689
2853
|
|
|
2690
2854
|
/**
|
|
2691
|
-
* @param {
|
|
2692
|
-
* @param {
|
|
2693
|
-
* @returns {Promise<UpdatePackagingDimensionsResponse>}
|
|
2855
|
+
* @param {OrderPlatformValidator.UpdatePackagingDimensionsParam} arg - Arg object
|
|
2856
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2857
|
+
* @returns {Promise<OrderPlatformModel.UpdatePackagingDimensionsResponse>}
|
|
2858
|
+
* - Success response
|
|
2859
|
+
*
|
|
2860
|
+
* @name updatePackagingDimensions
|
|
2694
2861
|
* @summary:
|
|
2695
|
-
* @description:
|
|
2862
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePackagingDimensions/).
|
|
2696
2863
|
*/
|
|
2697
|
-
async updatePackagingDimensions(
|
|
2698
|
-
|
|
2864
|
+
async updatePackagingDimensions(
|
|
2865
|
+
{ body } = {},
|
|
2866
|
+
{ headers } = { headers: false }
|
|
2867
|
+
) {
|
|
2868
|
+
const {
|
|
2869
|
+
error,
|
|
2870
|
+
} = OrderPlatformValidator.updatePackagingDimensions().validate(
|
|
2699
2871
|
{
|
|
2700
2872
|
body,
|
|
2701
2873
|
},
|
|
@@ -2708,7 +2880,7 @@ class Order {
|
|
|
2708
2880
|
// Showing warrnings if extra unknown parameters are found
|
|
2709
2881
|
const {
|
|
2710
2882
|
error: warrning,
|
|
2711
|
-
} =
|
|
2883
|
+
} = OrderPlatformValidator.updatePackagingDimensions().validate(
|
|
2712
2884
|
{
|
|
2713
2885
|
body,
|
|
2714
2886
|
},
|
|
@@ -2717,9 +2889,8 @@ class Order {
|
|
|
2717
2889
|
if (warrning) {
|
|
2718
2890
|
Logger({
|
|
2719
2891
|
level: "WARN",
|
|
2720
|
-
message:
|
|
2892
|
+
message: `Parameter Validation warrnings for platform > Order > updatePackagingDimensions \n ${warrning}`,
|
|
2721
2893
|
});
|
|
2722
|
-
Logger({ level: "WARN", message: warrning });
|
|
2723
2894
|
}
|
|
2724
2895
|
|
|
2725
2896
|
const query_params = {};
|
|
@@ -2732,36 +2903,43 @@ class Order {
|
|
|
2732
2903
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/update-packaging-dimension`,
|
|
2733
2904
|
query_params,
|
|
2734
2905
|
body,
|
|
2735
|
-
xHeaders
|
|
2906
|
+
xHeaders,
|
|
2907
|
+
{ headers }
|
|
2736
2908
|
);
|
|
2737
2909
|
|
|
2910
|
+
let responseData = response;
|
|
2911
|
+
if (headers) {
|
|
2912
|
+
responseData = response[0];
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2738
2915
|
const {
|
|
2739
2916
|
error: res_error,
|
|
2740
|
-
} =
|
|
2741
|
-
|
|
2742
|
-
allowUnknown: false
|
|
2743
|
-
|
|
2917
|
+
} = OrderPlatformModel.UpdatePackagingDimensionsResponse().validate(
|
|
2918
|
+
responseData,
|
|
2919
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2920
|
+
);
|
|
2744
2921
|
|
|
2745
2922
|
if (res_error) {
|
|
2746
2923
|
Logger({
|
|
2747
2924
|
level: "WARN",
|
|
2748
|
-
message:
|
|
2925
|
+
message: `Response Validation Warnnings for platform > Order > updatePackagingDimensions \n ${res_error}`,
|
|
2749
2926
|
});
|
|
2750
|
-
Logger({ level: "WARN", message: res_error });
|
|
2751
2927
|
}
|
|
2752
2928
|
|
|
2753
2929
|
return response;
|
|
2754
2930
|
}
|
|
2755
2931
|
|
|
2756
2932
|
/**
|
|
2757
|
-
* @param {
|
|
2758
|
-
* @param {
|
|
2759
|
-
* @returns {Promise<UpdateShipmentLockResponse>} -
|
|
2933
|
+
* @param {OrderPlatformValidator.UpdateShipmentLockParam} arg - Arg object
|
|
2934
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2935
|
+
* @returns {Promise<OrderPlatformModel.UpdateShipmentLockResponse>} -
|
|
2936
|
+
* Success response
|
|
2937
|
+
* @name updateShipmentLock
|
|
2760
2938
|
* @summary:
|
|
2761
|
-
* @description: update shipment/bag lock and check status
|
|
2939
|
+
* @description: update shipment/bag lock and check status - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentLock/).
|
|
2762
2940
|
*/
|
|
2763
|
-
async updateShipmentLock({ body } = {}) {
|
|
2764
|
-
const { error } =
|
|
2941
|
+
async updateShipmentLock({ body } = {}, { headers } = { headers: false }) {
|
|
2942
|
+
const { error } = OrderPlatformValidator.updateShipmentLock().validate(
|
|
2765
2943
|
{
|
|
2766
2944
|
body,
|
|
2767
2945
|
},
|
|
@@ -2772,7 +2950,9 @@ class Order {
|
|
|
2772
2950
|
}
|
|
2773
2951
|
|
|
2774
2952
|
// Showing warrnings if extra unknown parameters are found
|
|
2775
|
-
const {
|
|
2953
|
+
const {
|
|
2954
|
+
error: warrning,
|
|
2955
|
+
} = OrderPlatformValidator.updateShipmentLock().validate(
|
|
2776
2956
|
{
|
|
2777
2957
|
body,
|
|
2778
2958
|
},
|
|
@@ -2781,9 +2961,8 @@ class Order {
|
|
|
2781
2961
|
if (warrning) {
|
|
2782
2962
|
Logger({
|
|
2783
2963
|
level: "WARN",
|
|
2784
|
-
message:
|
|
2964
|
+
message: `Parameter Validation warrnings for platform > Order > updateShipmentLock \n ${warrning}`,
|
|
2785
2965
|
});
|
|
2786
|
-
Logger({ level: "WARN", message: warrning });
|
|
2787
2966
|
}
|
|
2788
2967
|
|
|
2789
2968
|
const query_params = {};
|
|
@@ -2796,12 +2975,18 @@ class Order {
|
|
|
2796
2975
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/entity/lock-manager`,
|
|
2797
2976
|
query_params,
|
|
2798
2977
|
body,
|
|
2799
|
-
xHeaders
|
|
2978
|
+
xHeaders,
|
|
2979
|
+
{ headers }
|
|
2800
2980
|
);
|
|
2801
2981
|
|
|
2982
|
+
let responseData = response;
|
|
2983
|
+
if (headers) {
|
|
2984
|
+
responseData = response[0];
|
|
2985
|
+
}
|
|
2986
|
+
|
|
2802
2987
|
const {
|
|
2803
2988
|
error: res_error,
|
|
2804
|
-
} =
|
|
2989
|
+
} = OrderPlatformModel.UpdateShipmentLockResponse().validate(responseData, {
|
|
2805
2990
|
abortEarly: false,
|
|
2806
2991
|
allowUnknown: false,
|
|
2807
2992
|
});
|
|
@@ -2809,23 +2994,25 @@ class Order {
|
|
|
2809
2994
|
if (res_error) {
|
|
2810
2995
|
Logger({
|
|
2811
2996
|
level: "WARN",
|
|
2812
|
-
message:
|
|
2997
|
+
message: `Response Validation Warnnings for platform > Order > updateShipmentLock \n ${res_error}`,
|
|
2813
2998
|
});
|
|
2814
|
-
Logger({ level: "WARN", message: res_error });
|
|
2815
2999
|
}
|
|
2816
3000
|
|
|
2817
3001
|
return response;
|
|
2818
3002
|
}
|
|
2819
3003
|
|
|
2820
3004
|
/**
|
|
2821
|
-
* @param {
|
|
2822
|
-
* @param {
|
|
2823
|
-
* @returns {Promise<UpdateShipmentStatusResponseBody>}
|
|
3005
|
+
* @param {OrderPlatformValidator.UpdateShipmentStatusParam} arg - Arg object
|
|
3006
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3007
|
+
* @returns {Promise<OrderPlatformModel.UpdateShipmentStatusResponseBody>}
|
|
3008
|
+
* - Success response
|
|
3009
|
+
*
|
|
3010
|
+
* @name updateShipmentStatus
|
|
2824
3011
|
* @summary:
|
|
2825
|
-
* @description: This API is for Shipment State transition or Shipment data update or both below example is for partial state transition with data update
|
|
3012
|
+
* @description: This API is for Shipment State transition or Shipment data update or both below example is for partial state transition with data update - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentStatus/).
|
|
2826
3013
|
*/
|
|
2827
|
-
async updateShipmentStatus({ body } = {}) {
|
|
2828
|
-
const { error } =
|
|
3014
|
+
async updateShipmentStatus({ body } = {}, { headers } = { headers: false }) {
|
|
3015
|
+
const { error } = OrderPlatformValidator.updateShipmentStatus().validate(
|
|
2829
3016
|
{
|
|
2830
3017
|
body,
|
|
2831
3018
|
},
|
|
@@ -2836,7 +3023,9 @@ class Order {
|
|
|
2836
3023
|
}
|
|
2837
3024
|
|
|
2838
3025
|
// Showing warrnings if extra unknown parameters are found
|
|
2839
|
-
const {
|
|
3026
|
+
const {
|
|
3027
|
+
error: warrning,
|
|
3028
|
+
} = OrderPlatformValidator.updateShipmentStatus().validate(
|
|
2840
3029
|
{
|
|
2841
3030
|
body,
|
|
2842
3031
|
},
|
|
@@ -2845,9 +3034,8 @@ class Order {
|
|
|
2845
3034
|
if (warrning) {
|
|
2846
3035
|
Logger({
|
|
2847
3036
|
level: "WARN",
|
|
2848
|
-
message:
|
|
3037
|
+
message: `Parameter Validation warrnings for platform > Order > updateShipmentStatus \n ${warrning}`,
|
|
2849
3038
|
});
|
|
2850
|
-
Logger({ level: "WARN", message: warrning });
|
|
2851
3039
|
}
|
|
2852
3040
|
|
|
2853
3041
|
const query_params = {};
|
|
@@ -2860,36 +3048,42 @@ class Order {
|
|
|
2860
3048
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/status-internal`,
|
|
2861
3049
|
query_params,
|
|
2862
3050
|
body,
|
|
2863
|
-
xHeaders
|
|
3051
|
+
xHeaders,
|
|
3052
|
+
{ headers }
|
|
2864
3053
|
);
|
|
2865
3054
|
|
|
3055
|
+
let responseData = response;
|
|
3056
|
+
if (headers) {
|
|
3057
|
+
responseData = response[0];
|
|
3058
|
+
}
|
|
3059
|
+
|
|
2866
3060
|
const {
|
|
2867
3061
|
error: res_error,
|
|
2868
|
-
} =
|
|
2869
|
-
|
|
2870
|
-
allowUnknown: false
|
|
2871
|
-
|
|
3062
|
+
} = OrderPlatformModel.UpdateShipmentStatusResponseBody().validate(
|
|
3063
|
+
responseData,
|
|
3064
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3065
|
+
);
|
|
2872
3066
|
|
|
2873
3067
|
if (res_error) {
|
|
2874
3068
|
Logger({
|
|
2875
3069
|
level: "WARN",
|
|
2876
|
-
message:
|
|
3070
|
+
message: `Response Validation Warnnings for platform > Order > updateShipmentStatus \n ${res_error}`,
|
|
2877
3071
|
});
|
|
2878
|
-
Logger({ level: "WARN", message: res_error });
|
|
2879
3072
|
}
|
|
2880
3073
|
|
|
2881
3074
|
return response;
|
|
2882
3075
|
}
|
|
2883
3076
|
|
|
2884
3077
|
/**
|
|
2885
|
-
* @param {
|
|
2886
|
-
* @param {
|
|
2887
|
-
* @returns {Promise<SuccessResponse>} - Success response
|
|
3078
|
+
* @param {OrderPlatformValidator.UploadConsentParam} arg - Arg object
|
|
3079
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3080
|
+
* @returns {Promise<OrderPlatformModel.SuccessResponse>} - Success response
|
|
3081
|
+
* @name uploadConsent
|
|
2888
3082
|
* @summary:
|
|
2889
|
-
* @description:
|
|
3083
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsent/).
|
|
2890
3084
|
*/
|
|
2891
|
-
async uploadConsent({ body } = {}) {
|
|
2892
|
-
const { error } =
|
|
3085
|
+
async uploadConsent({ body } = {}, { headers } = { headers: false }) {
|
|
3086
|
+
const { error } = OrderPlatformValidator.uploadConsent().validate(
|
|
2893
3087
|
{
|
|
2894
3088
|
body,
|
|
2895
3089
|
},
|
|
@@ -2900,7 +3094,7 @@ class Order {
|
|
|
2900
3094
|
}
|
|
2901
3095
|
|
|
2902
3096
|
// Showing warrnings if extra unknown parameters are found
|
|
2903
|
-
const { error: warrning } =
|
|
3097
|
+
const { error: warrning } = OrderPlatformValidator.uploadConsent().validate(
|
|
2904
3098
|
{
|
|
2905
3099
|
body,
|
|
2906
3100
|
},
|
|
@@ -2909,9 +3103,8 @@ class Order {
|
|
|
2909
3103
|
if (warrning) {
|
|
2910
3104
|
Logger({
|
|
2911
3105
|
level: "WARN",
|
|
2912
|
-
message:
|
|
3106
|
+
message: `Parameter Validation warrnings for platform > Order > uploadConsent \n ${warrning}`,
|
|
2913
3107
|
});
|
|
2914
|
-
Logger({ level: "WARN", message: warrning });
|
|
2915
3108
|
}
|
|
2916
3109
|
|
|
2917
3110
|
const query_params = {};
|
|
@@ -2924,34 +3117,42 @@ class Order {
|
|
|
2924
3117
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/uploadConsent`,
|
|
2925
3118
|
query_params,
|
|
2926
3119
|
body,
|
|
2927
|
-
xHeaders
|
|
3120
|
+
xHeaders,
|
|
3121
|
+
{ headers }
|
|
2928
3122
|
);
|
|
2929
3123
|
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
3124
|
+
let responseData = response;
|
|
3125
|
+
if (headers) {
|
|
3126
|
+
responseData = response[0];
|
|
3127
|
+
}
|
|
3128
|
+
|
|
3129
|
+
const {
|
|
3130
|
+
error: res_error,
|
|
3131
|
+
} = OrderPlatformModel.SuccessResponse().validate(responseData, {
|
|
3132
|
+
abortEarly: false,
|
|
3133
|
+
allowUnknown: false,
|
|
3134
|
+
});
|
|
2934
3135
|
|
|
2935
3136
|
if (res_error) {
|
|
2936
3137
|
Logger({
|
|
2937
3138
|
level: "WARN",
|
|
2938
|
-
message:
|
|
3139
|
+
message: `Response Validation Warnnings for platform > Order > uploadConsent \n ${res_error}`,
|
|
2939
3140
|
});
|
|
2940
|
-
Logger({ level: "WARN", message: res_error });
|
|
2941
3141
|
}
|
|
2942
3142
|
|
|
2943
3143
|
return response;
|
|
2944
3144
|
}
|
|
2945
3145
|
|
|
2946
3146
|
/**
|
|
2947
|
-
* @param {
|
|
2948
|
-
* @param {
|
|
2949
|
-
* @returns {Promise<VerifyOtpResponse>} - Success response
|
|
3147
|
+
* @param {OrderPlatformValidator.VerifyMobileOTPParam} arg - Arg object
|
|
3148
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3149
|
+
* @returns {Promise<OrderPlatformModel.VerifyOtpResponse>} - Success response
|
|
3150
|
+
* @name verifyMobileOTP
|
|
2950
3151
|
* @summary:
|
|
2951
|
-
* @description:
|
|
3152
|
+
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/verifyMobileOTP/).
|
|
2952
3153
|
*/
|
|
2953
|
-
async verifyMobileOTP({ body } = {}) {
|
|
2954
|
-
const { error } =
|
|
3154
|
+
async verifyMobileOTP({ body } = {}, { headers } = { headers: false }) {
|
|
3155
|
+
const { error } = OrderPlatformValidator.verifyMobileOTP().validate(
|
|
2955
3156
|
{
|
|
2956
3157
|
body,
|
|
2957
3158
|
},
|
|
@@ -2962,7 +3163,9 @@ class Order {
|
|
|
2962
3163
|
}
|
|
2963
3164
|
|
|
2964
3165
|
// Showing warrnings if extra unknown parameters are found
|
|
2965
|
-
const {
|
|
3166
|
+
const {
|
|
3167
|
+
error: warrning,
|
|
3168
|
+
} = OrderPlatformValidator.verifyMobileOTP().validate(
|
|
2966
3169
|
{
|
|
2967
3170
|
body,
|
|
2968
3171
|
},
|
|
@@ -2971,9 +3174,8 @@ class Order {
|
|
|
2971
3174
|
if (warrning) {
|
|
2972
3175
|
Logger({
|
|
2973
3176
|
level: "WARN",
|
|
2974
|
-
message:
|
|
3177
|
+
message: `Parameter Validation warrnings for platform > Order > verifyMobileOTP \n ${warrning}`,
|
|
2975
3178
|
});
|
|
2976
|
-
Logger({ level: "WARN", message: warrning });
|
|
2977
3179
|
}
|
|
2978
3180
|
|
|
2979
3181
|
const query_params = {};
|
|
@@ -2986,12 +3188,18 @@ class Order {
|
|
|
2986
3188
|
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/verify/otp`,
|
|
2987
3189
|
query_params,
|
|
2988
3190
|
body,
|
|
2989
|
-
xHeaders
|
|
3191
|
+
xHeaders,
|
|
3192
|
+
{ headers }
|
|
2990
3193
|
);
|
|
2991
3194
|
|
|
3195
|
+
let responseData = response;
|
|
3196
|
+
if (headers) {
|
|
3197
|
+
responseData = response[0];
|
|
3198
|
+
}
|
|
3199
|
+
|
|
2992
3200
|
const {
|
|
2993
3201
|
error: res_error,
|
|
2994
|
-
} =
|
|
3202
|
+
} = OrderPlatformModel.VerifyOtpResponse().validate(responseData, {
|
|
2995
3203
|
abortEarly: false,
|
|
2996
3204
|
allowUnknown: false,
|
|
2997
3205
|
});
|
|
@@ -2999,9 +3207,8 @@ class Order {
|
|
|
2999
3207
|
if (res_error) {
|
|
3000
3208
|
Logger({
|
|
3001
3209
|
level: "WARN",
|
|
3002
|
-
message:
|
|
3210
|
+
message: `Response Validation Warnnings for platform > Order > verifyMobileOTP \n ${res_error}`,
|
|
3003
3211
|
});
|
|
3004
|
-
Logger({ level: "WARN", message: res_error });
|
|
3005
3212
|
}
|
|
3006
3213
|
|
|
3007
3214
|
return response;
|