@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 DiscountPlatformValidator = require("./DiscountPlatformValidator");
|
|
5
|
+
const DiscountPlatformModel = require("./DiscountPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -12,14 +12,15 @@ class Discount {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @param {
|
|
16
|
-
* @param {
|
|
17
|
-
* @returns {Promise<CancelJobResponse>} - Success response
|
|
15
|
+
* @param {DiscountPlatformValidator.CancelDownloadJobParam} arg - Arg object
|
|
16
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
17
|
+
* @returns {Promise<DiscountPlatformModel.CancelJobResponse>} - Success response
|
|
18
|
+
* @name cancelDownloadJob
|
|
18
19
|
* @summary: Cancel Download Job.
|
|
19
|
-
* @description: Cancel Download Job.
|
|
20
|
+
* @description: Cancel Download Job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/cancelDownloadJob/).
|
|
20
21
|
*/
|
|
21
|
-
async cancelDownloadJob({ id } = {}) {
|
|
22
|
-
const { error } =
|
|
22
|
+
async cancelDownloadJob({ id } = {}, { headers } = { headers: false }) {
|
|
23
|
+
const { error } = DiscountPlatformValidator.cancelDownloadJob().validate(
|
|
23
24
|
{
|
|
24
25
|
id,
|
|
25
26
|
},
|
|
@@ -30,7 +31,9 @@ class Discount {
|
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
// Showing warrnings if extra unknown parameters are found
|
|
33
|
-
const {
|
|
34
|
+
const {
|
|
35
|
+
error: warrning,
|
|
36
|
+
} = DiscountPlatformValidator.cancelDownloadJob().validate(
|
|
34
37
|
{
|
|
35
38
|
id,
|
|
36
39
|
},
|
|
@@ -39,9 +42,8 @@ class Discount {
|
|
|
39
42
|
if (warrning) {
|
|
40
43
|
Logger({
|
|
41
44
|
level: "WARN",
|
|
42
|
-
message:
|
|
45
|
+
message: `Parameter Validation warrnings for platform > Discount > cancelDownloadJob \n ${warrning}`,
|
|
43
46
|
});
|
|
44
|
-
Logger({ level: "WARN", message: warrning });
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
const query_params = {};
|
|
@@ -54,12 +56,18 @@ class Discount {
|
|
|
54
56
|
`/service/platform/discount/v1.0/company/${this.config.companyId}/file/download/${id}/`,
|
|
55
57
|
query_params,
|
|
56
58
|
undefined,
|
|
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
|
+
} = DiscountPlatformModel.CancelJobResponse().validate(responseData, {
|
|
63
71
|
abortEarly: false,
|
|
64
72
|
allowUnknown: false,
|
|
65
73
|
});
|
|
@@ -67,23 +75,23 @@ class Discount {
|
|
|
67
75
|
if (res_error) {
|
|
68
76
|
Logger({
|
|
69
77
|
level: "WARN",
|
|
70
|
-
message:
|
|
78
|
+
message: `Response Validation Warnnings for platform > Discount > cancelDownloadJob \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<CancelJobResponse>} - Success response
|
|
86
|
+
* @param {DiscountPlatformValidator.CancelValidationJobParam} arg - Arg object
|
|
87
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
88
|
+
* @returns {Promise<DiscountPlatformModel.CancelJobResponse>} - Success response
|
|
89
|
+
* @name cancelValidationJob
|
|
82
90
|
* @summary: Cancel Validation Job.
|
|
83
|
-
* @description: Cancel Validation Job.
|
|
91
|
+
* @description: Cancel Validation Job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/cancelValidationJob/).
|
|
84
92
|
*/
|
|
85
|
-
async cancelValidationJob({ id } = {}) {
|
|
86
|
-
const { error } =
|
|
93
|
+
async cancelValidationJob({ id } = {}, { headers } = { headers: false }) {
|
|
94
|
+
const { error } = DiscountPlatformValidator.cancelValidationJob().validate(
|
|
87
95
|
{
|
|
88
96
|
id,
|
|
89
97
|
},
|
|
@@ -96,7 +104,7 @@ class Discount {
|
|
|
96
104
|
// Showing warrnings if extra unknown parameters are found
|
|
97
105
|
const {
|
|
98
106
|
error: warrning,
|
|
99
|
-
} =
|
|
107
|
+
} = DiscountPlatformValidator.cancelValidationJob().validate(
|
|
100
108
|
{
|
|
101
109
|
id,
|
|
102
110
|
},
|
|
@@ -105,9 +113,8 @@ class Discount {
|
|
|
105
113
|
if (warrning) {
|
|
106
114
|
Logger({
|
|
107
115
|
level: "WARN",
|
|
108
|
-
message:
|
|
116
|
+
message: `Parameter Validation warrnings for platform > Discount > cancelValidationJob \n ${warrning}`,
|
|
109
117
|
});
|
|
110
|
-
Logger({ level: "WARN", message: warrning });
|
|
111
118
|
}
|
|
112
119
|
|
|
113
120
|
const query_params = {};
|
|
@@ -120,12 +127,18 @@ class Discount {
|
|
|
120
127
|
`/service/platform/discount/v1.0/company/${this.config.companyId}/file/validation/${id}/`,
|
|
121
128
|
query_params,
|
|
122
129
|
undefined,
|
|
123
|
-
xHeaders
|
|
130
|
+
xHeaders,
|
|
131
|
+
{ headers }
|
|
124
132
|
);
|
|
125
133
|
|
|
134
|
+
let responseData = response;
|
|
135
|
+
if (headers) {
|
|
136
|
+
responseData = response[0];
|
|
137
|
+
}
|
|
138
|
+
|
|
126
139
|
const {
|
|
127
140
|
error: res_error,
|
|
128
|
-
} =
|
|
141
|
+
} = DiscountPlatformModel.CancelJobResponse().validate(responseData, {
|
|
129
142
|
abortEarly: false,
|
|
130
143
|
allowUnknown: false,
|
|
131
144
|
});
|
|
@@ -133,23 +146,23 @@ class Discount {
|
|
|
133
146
|
if (res_error) {
|
|
134
147
|
Logger({
|
|
135
148
|
level: "WARN",
|
|
136
|
-
message:
|
|
149
|
+
message: `Response Validation Warnnings for platform > Discount > cancelValidationJob \n ${res_error}`,
|
|
137
150
|
});
|
|
138
|
-
Logger({ level: "WARN", message: res_error });
|
|
139
151
|
}
|
|
140
152
|
|
|
141
153
|
return response;
|
|
142
154
|
}
|
|
143
155
|
|
|
144
156
|
/**
|
|
145
|
-
* @param {
|
|
146
|
-
* @param {
|
|
147
|
-
* @returns {Promise<DiscountJob>} - Success response
|
|
157
|
+
* @param {DiscountPlatformValidator.CreateDiscountParam} arg - Arg object
|
|
158
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
159
|
+
* @returns {Promise<DiscountPlatformModel.DiscountJob>} - Success response
|
|
160
|
+
* @name createDiscount
|
|
148
161
|
* @summary: Create Discount.
|
|
149
|
-
* @description: Create Discount.
|
|
162
|
+
* @description: Create Discount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/createDiscount/).
|
|
150
163
|
*/
|
|
151
|
-
async createDiscount({ body } = {}) {
|
|
152
|
-
const { error } =
|
|
164
|
+
async createDiscount({ body } = {}, { headers } = { headers: false }) {
|
|
165
|
+
const { error } = DiscountPlatformValidator.createDiscount().validate(
|
|
153
166
|
{
|
|
154
167
|
body,
|
|
155
168
|
},
|
|
@@ -160,7 +173,9 @@ class Discount {
|
|
|
160
173
|
}
|
|
161
174
|
|
|
162
175
|
// Showing warrnings if extra unknown parameters are found
|
|
163
|
-
const {
|
|
176
|
+
const {
|
|
177
|
+
error: warrning,
|
|
178
|
+
} = DiscountPlatformValidator.createDiscount().validate(
|
|
164
179
|
{
|
|
165
180
|
body,
|
|
166
181
|
},
|
|
@@ -169,9 +184,8 @@ class Discount {
|
|
|
169
184
|
if (warrning) {
|
|
170
185
|
Logger({
|
|
171
186
|
level: "WARN",
|
|
172
|
-
message:
|
|
187
|
+
message: `Parameter Validation warrnings for platform > Discount > createDiscount \n ${warrning}`,
|
|
173
188
|
});
|
|
174
|
-
Logger({ level: "WARN", message: warrning });
|
|
175
189
|
}
|
|
176
190
|
|
|
177
191
|
const query_params = {};
|
|
@@ -184,35 +198,45 @@ class Discount {
|
|
|
184
198
|
`/service/platform/discount/v1.0/company/${this.config.companyId}/job/`,
|
|
185
199
|
query_params,
|
|
186
200
|
body,
|
|
187
|
-
xHeaders
|
|
201
|
+
xHeaders,
|
|
202
|
+
{ headers }
|
|
188
203
|
);
|
|
189
204
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
205
|
+
let responseData = response;
|
|
206
|
+
if (headers) {
|
|
207
|
+
responseData = response[0];
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const {
|
|
211
|
+
error: res_error,
|
|
212
|
+
} = DiscountPlatformModel.DiscountJob().validate(responseData, {
|
|
213
|
+
abortEarly: false,
|
|
214
|
+
allowUnknown: false,
|
|
215
|
+
});
|
|
194
216
|
|
|
195
217
|
if (res_error) {
|
|
196
218
|
Logger({
|
|
197
219
|
level: "WARN",
|
|
198
|
-
message:
|
|
220
|
+
message: `Response Validation Warnnings for platform > Discount > createDiscount \n ${res_error}`,
|
|
199
221
|
});
|
|
200
|
-
Logger({ level: "WARN", message: res_error });
|
|
201
222
|
}
|
|
202
223
|
|
|
203
224
|
return response;
|
|
204
225
|
}
|
|
205
226
|
|
|
206
227
|
/**
|
|
207
|
-
* @param {
|
|
208
|
-
* @param {
|
|
209
|
-
* @
|
|
210
|
-
* @
|
|
228
|
+
* @param {DiscountPlatformValidator.DownloadDiscountFileParam} arg - Arg object
|
|
229
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
230
|
+
* @returns {Promise<DiscountPlatformModel.FileJobResponse>} - Success response
|
|
231
|
+
* @name downloadDiscountFile
|
|
211
232
|
* @summary: Validate File.
|
|
212
|
-
* @description: Validate File.
|
|
233
|
+
* @description: Validate File. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/downloadDiscountFile/).
|
|
213
234
|
*/
|
|
214
|
-
async downloadDiscountFile(
|
|
215
|
-
|
|
235
|
+
async downloadDiscountFile(
|
|
236
|
+
{ type, body } = {},
|
|
237
|
+
{ headers } = { headers: false }
|
|
238
|
+
) {
|
|
239
|
+
const { error } = DiscountPlatformValidator.downloadDiscountFile().validate(
|
|
216
240
|
{
|
|
217
241
|
type,
|
|
218
242
|
body,
|
|
@@ -226,7 +250,7 @@ class Discount {
|
|
|
226
250
|
// Showing warrnings if extra unknown parameters are found
|
|
227
251
|
const {
|
|
228
252
|
error: warrning,
|
|
229
|
-
} =
|
|
253
|
+
} = DiscountPlatformValidator.downloadDiscountFile().validate(
|
|
230
254
|
{
|
|
231
255
|
type,
|
|
232
256
|
body,
|
|
@@ -236,9 +260,8 @@ class Discount {
|
|
|
236
260
|
if (warrning) {
|
|
237
261
|
Logger({
|
|
238
262
|
level: "WARN",
|
|
239
|
-
message:
|
|
263
|
+
message: `Parameter Validation warrnings for platform > Discount > downloadDiscountFile \n ${warrning}`,
|
|
240
264
|
});
|
|
241
|
-
Logger({ level: "WARN", message: warrning });
|
|
242
265
|
}
|
|
243
266
|
|
|
244
267
|
const query_params = {};
|
|
@@ -251,12 +274,18 @@ class Discount {
|
|
|
251
274
|
`/service/platform/discount/v1.0/company/${this.config.companyId}/file/${type}/download/`,
|
|
252
275
|
query_params,
|
|
253
276
|
body,
|
|
254
|
-
xHeaders
|
|
277
|
+
xHeaders,
|
|
278
|
+
{ headers }
|
|
255
279
|
);
|
|
256
280
|
|
|
281
|
+
let responseData = response;
|
|
282
|
+
if (headers) {
|
|
283
|
+
responseData = response[0];
|
|
284
|
+
}
|
|
285
|
+
|
|
257
286
|
const {
|
|
258
287
|
error: res_error,
|
|
259
|
-
} =
|
|
288
|
+
} = DiscountPlatformModel.FileJobResponse().validate(responseData, {
|
|
260
289
|
abortEarly: false,
|
|
261
290
|
allowUnknown: false,
|
|
262
291
|
});
|
|
@@ -264,23 +293,23 @@ class Discount {
|
|
|
264
293
|
if (res_error) {
|
|
265
294
|
Logger({
|
|
266
295
|
level: "WARN",
|
|
267
|
-
message:
|
|
296
|
+
message: `Response Validation Warnnings for platform > Discount > downloadDiscountFile \n ${res_error}`,
|
|
268
297
|
});
|
|
269
|
-
Logger({ level: "WARN", message: res_error });
|
|
270
298
|
}
|
|
271
299
|
|
|
272
300
|
return response;
|
|
273
301
|
}
|
|
274
302
|
|
|
275
303
|
/**
|
|
276
|
-
* @param {
|
|
277
|
-
* @param {
|
|
278
|
-
* @returns {Promise<DiscountJob>} - Success response
|
|
304
|
+
* @param {DiscountPlatformValidator.GetDiscountParam} arg - Arg object
|
|
305
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
306
|
+
* @returns {Promise<DiscountPlatformModel.DiscountJob>} - Success response
|
|
307
|
+
* @name getDiscount
|
|
279
308
|
* @summary: Fetch discount.
|
|
280
|
-
* @description: Fetch discount.
|
|
309
|
+
* @description: Fetch discount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/getDiscount/).
|
|
281
310
|
*/
|
|
282
|
-
async getDiscount({ id } = {}) {
|
|
283
|
-
const { error } =
|
|
311
|
+
async getDiscount({ id } = {}, { headers } = { headers: false }) {
|
|
312
|
+
const { error } = DiscountPlatformValidator.getDiscount().validate(
|
|
284
313
|
{
|
|
285
314
|
id,
|
|
286
315
|
},
|
|
@@ -291,7 +320,9 @@ class Discount {
|
|
|
291
320
|
}
|
|
292
321
|
|
|
293
322
|
// Showing warrnings if extra unknown parameters are found
|
|
294
|
-
const {
|
|
323
|
+
const {
|
|
324
|
+
error: warrning,
|
|
325
|
+
} = DiscountPlatformValidator.getDiscount().validate(
|
|
295
326
|
{
|
|
296
327
|
id,
|
|
297
328
|
},
|
|
@@ -300,9 +331,8 @@ class Discount {
|
|
|
300
331
|
if (warrning) {
|
|
301
332
|
Logger({
|
|
302
333
|
level: "WARN",
|
|
303
|
-
message:
|
|
334
|
+
message: `Parameter Validation warrnings for platform > Discount > getDiscount \n ${warrning}`,
|
|
304
335
|
});
|
|
305
|
-
Logger({ level: "WARN", message: warrning });
|
|
306
336
|
}
|
|
307
337
|
|
|
308
338
|
const query_params = {};
|
|
@@ -315,53 +345,45 @@ class Discount {
|
|
|
315
345
|
`/service/platform/discount/v1.0/company/${this.config.companyId}/job/${id}/`,
|
|
316
346
|
query_params,
|
|
317
347
|
undefined,
|
|
318
|
-
xHeaders
|
|
348
|
+
xHeaders,
|
|
349
|
+
{ headers }
|
|
319
350
|
);
|
|
320
351
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
352
|
+
let responseData = response;
|
|
353
|
+
if (headers) {
|
|
354
|
+
responseData = response[0];
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
const {
|
|
358
|
+
error: res_error,
|
|
359
|
+
} = DiscountPlatformModel.DiscountJob().validate(responseData, {
|
|
360
|
+
abortEarly: false,
|
|
361
|
+
allowUnknown: false,
|
|
362
|
+
});
|
|
325
363
|
|
|
326
364
|
if (res_error) {
|
|
327
365
|
Logger({
|
|
328
366
|
level: "WARN",
|
|
329
|
-
message:
|
|
367
|
+
message: `Response Validation Warnnings for platform > Discount > getDiscount \n ${res_error}`,
|
|
330
368
|
});
|
|
331
|
-
Logger({ level: "WARN", message: res_error });
|
|
332
369
|
}
|
|
333
370
|
|
|
334
371
|
return response;
|
|
335
372
|
}
|
|
336
373
|
|
|
337
374
|
/**
|
|
338
|
-
* @param {
|
|
339
|
-
* @param {
|
|
340
|
-
* @
|
|
341
|
-
*
|
|
342
|
-
* @param {number} [arg.pageNo] - Page number. Default is 1.
|
|
343
|
-
* @param {number} [arg.pageSize] - Page size. Default is 12.
|
|
344
|
-
* @param {boolean} [arg.archived] - Archived. Default is false.
|
|
345
|
-
* @param {number} [arg.month] - Month. Default is current month.
|
|
346
|
-
* @param {number} [arg.year] - Year. Default is current year.
|
|
347
|
-
* @param {string} [arg.type] - Basic or custom.
|
|
348
|
-
* @param {string[]} [arg.appIds] - Application ids.
|
|
349
|
-
* @returns {Promise<ListOrCalender>} - Success response
|
|
375
|
+
* @param {DiscountPlatformValidator.GetDiscountsParam} arg - Arg object
|
|
376
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
377
|
+
* @returns {Promise<DiscountPlatformModel.ListOrCalender>} - Success response
|
|
378
|
+
* @name getDiscounts
|
|
350
379
|
* @summary: Fetch discount list.
|
|
351
|
-
* @description: Fetch discount list.
|
|
380
|
+
* @description: Fetch discount list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/getDiscounts/).
|
|
352
381
|
*/
|
|
353
|
-
async getDiscounts(
|
|
354
|
-
view,
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
archived,
|
|
359
|
-
month,
|
|
360
|
-
year,
|
|
361
|
-
type,
|
|
362
|
-
appIds,
|
|
363
|
-
} = {}) {
|
|
364
|
-
const { error } = DiscountValidator.getDiscounts().validate(
|
|
382
|
+
async getDiscounts(
|
|
383
|
+
{ view, q, pageNo, pageSize, archived, month, year, type, appIds } = {},
|
|
384
|
+
{ headers } = { headers: false }
|
|
385
|
+
) {
|
|
386
|
+
const { error } = DiscountPlatformValidator.getDiscounts().validate(
|
|
365
387
|
{
|
|
366
388
|
view,
|
|
367
389
|
q,
|
|
@@ -380,7 +402,9 @@ class Discount {
|
|
|
380
402
|
}
|
|
381
403
|
|
|
382
404
|
// Showing warrnings if extra unknown parameters are found
|
|
383
|
-
const {
|
|
405
|
+
const {
|
|
406
|
+
error: warrning,
|
|
407
|
+
} = DiscountPlatformValidator.getDiscounts().validate(
|
|
384
408
|
{
|
|
385
409
|
view,
|
|
386
410
|
q,
|
|
@@ -397,9 +421,8 @@ class Discount {
|
|
|
397
421
|
if (warrning) {
|
|
398
422
|
Logger({
|
|
399
423
|
level: "WARN",
|
|
400
|
-
message:
|
|
424
|
+
message: `Parameter Validation warrnings for platform > Discount > getDiscounts \n ${warrning}`,
|
|
401
425
|
});
|
|
402
|
-
Logger({ level: "WARN", message: warrning });
|
|
403
426
|
}
|
|
404
427
|
|
|
405
428
|
const query_params = {};
|
|
@@ -421,12 +444,18 @@ class Discount {
|
|
|
421
444
|
`/service/platform/discount/v1.0/company/${this.config.companyId}/job/`,
|
|
422
445
|
query_params,
|
|
423
446
|
undefined,
|
|
424
|
-
xHeaders
|
|
447
|
+
xHeaders,
|
|
448
|
+
{ headers }
|
|
425
449
|
);
|
|
426
450
|
|
|
451
|
+
let responseData = response;
|
|
452
|
+
if (headers) {
|
|
453
|
+
responseData = response[0];
|
|
454
|
+
}
|
|
455
|
+
|
|
427
456
|
const {
|
|
428
457
|
error: res_error,
|
|
429
|
-
} =
|
|
458
|
+
} = DiscountPlatformModel.ListOrCalender().validate(responseData, {
|
|
430
459
|
abortEarly: false,
|
|
431
460
|
allowUnknown: false,
|
|
432
461
|
});
|
|
@@ -434,23 +463,23 @@ class Discount {
|
|
|
434
463
|
if (res_error) {
|
|
435
464
|
Logger({
|
|
436
465
|
level: "WARN",
|
|
437
|
-
message:
|
|
466
|
+
message: `Response Validation Warnnings for platform > Discount > getDiscounts \n ${res_error}`,
|
|
438
467
|
});
|
|
439
|
-
Logger({ level: "WARN", message: res_error });
|
|
440
468
|
}
|
|
441
469
|
|
|
442
470
|
return response;
|
|
443
471
|
}
|
|
444
472
|
|
|
445
473
|
/**
|
|
446
|
-
* @param {
|
|
447
|
-
* @param {
|
|
448
|
-
* @returns {Promise<FileJobResponse>} - Success response
|
|
474
|
+
* @param {DiscountPlatformValidator.GetDownloadJobParam} arg - Arg object
|
|
475
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
476
|
+
* @returns {Promise<DiscountPlatformModel.FileJobResponse>} - Success response
|
|
477
|
+
* @name getDownloadJob
|
|
449
478
|
* @summary: Download File Job.
|
|
450
|
-
* @description: Download File Job.
|
|
479
|
+
* @description: Download File Job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/getDownloadJob/).
|
|
451
480
|
*/
|
|
452
|
-
async getDownloadJob({ id } = {}) {
|
|
453
|
-
const { error } =
|
|
481
|
+
async getDownloadJob({ id } = {}, { headers } = { headers: false }) {
|
|
482
|
+
const { error } = DiscountPlatformValidator.getDownloadJob().validate(
|
|
454
483
|
{
|
|
455
484
|
id,
|
|
456
485
|
},
|
|
@@ -461,7 +490,9 @@ class Discount {
|
|
|
461
490
|
}
|
|
462
491
|
|
|
463
492
|
// Showing warrnings if extra unknown parameters are found
|
|
464
|
-
const {
|
|
493
|
+
const {
|
|
494
|
+
error: warrning,
|
|
495
|
+
} = DiscountPlatformValidator.getDownloadJob().validate(
|
|
465
496
|
{
|
|
466
497
|
id,
|
|
467
498
|
},
|
|
@@ -470,9 +501,8 @@ class Discount {
|
|
|
470
501
|
if (warrning) {
|
|
471
502
|
Logger({
|
|
472
503
|
level: "WARN",
|
|
473
|
-
message:
|
|
504
|
+
message: `Parameter Validation warrnings for platform > Discount > getDownloadJob \n ${warrning}`,
|
|
474
505
|
});
|
|
475
|
-
Logger({ level: "WARN", message: warrning });
|
|
476
506
|
}
|
|
477
507
|
|
|
478
508
|
const query_params = {};
|
|
@@ -485,12 +515,18 @@ class Discount {
|
|
|
485
515
|
`/service/platform/discount/v1.0/company/${this.config.companyId}/file/download/${id}/`,
|
|
486
516
|
query_params,
|
|
487
517
|
undefined,
|
|
488
|
-
xHeaders
|
|
518
|
+
xHeaders,
|
|
519
|
+
{ headers }
|
|
489
520
|
);
|
|
490
521
|
|
|
522
|
+
let responseData = response;
|
|
523
|
+
if (headers) {
|
|
524
|
+
responseData = response[0];
|
|
525
|
+
}
|
|
526
|
+
|
|
491
527
|
const {
|
|
492
528
|
error: res_error,
|
|
493
|
-
} =
|
|
529
|
+
} = DiscountPlatformModel.FileJobResponse().validate(responseData, {
|
|
494
530
|
abortEarly: false,
|
|
495
531
|
allowUnknown: false,
|
|
496
532
|
});
|
|
@@ -498,23 +534,23 @@ class Discount {
|
|
|
498
534
|
if (res_error) {
|
|
499
535
|
Logger({
|
|
500
536
|
level: "WARN",
|
|
501
|
-
message:
|
|
537
|
+
message: `Response Validation Warnnings for platform > Discount > getDownloadJob \n ${res_error}`,
|
|
502
538
|
});
|
|
503
|
-
Logger({ level: "WARN", message: res_error });
|
|
504
539
|
}
|
|
505
540
|
|
|
506
541
|
return response;
|
|
507
542
|
}
|
|
508
543
|
|
|
509
544
|
/**
|
|
510
|
-
* @param {
|
|
511
|
-
* @param {
|
|
512
|
-
* @returns {Promise<FileJobResponse>} - Success response
|
|
545
|
+
* @param {DiscountPlatformValidator.GetValidationJobParam} arg - Arg object
|
|
546
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
547
|
+
* @returns {Promise<DiscountPlatformModel.FileJobResponse>} - Success response
|
|
548
|
+
* @name getValidationJob
|
|
513
549
|
* @summary: Validate File Job.
|
|
514
|
-
* @description: Validate File Job.
|
|
550
|
+
* @description: Validate File Job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/getValidationJob/).
|
|
515
551
|
*/
|
|
516
|
-
async getValidationJob({ id } = {}) {
|
|
517
|
-
const { error } =
|
|
552
|
+
async getValidationJob({ id } = {}, { headers } = { headers: false }) {
|
|
553
|
+
const { error } = DiscountPlatformValidator.getValidationJob().validate(
|
|
518
554
|
{
|
|
519
555
|
id,
|
|
520
556
|
},
|
|
@@ -525,7 +561,9 @@ class Discount {
|
|
|
525
561
|
}
|
|
526
562
|
|
|
527
563
|
// Showing warrnings if extra unknown parameters are found
|
|
528
|
-
const {
|
|
564
|
+
const {
|
|
565
|
+
error: warrning,
|
|
566
|
+
} = DiscountPlatformValidator.getValidationJob().validate(
|
|
529
567
|
{
|
|
530
568
|
id,
|
|
531
569
|
},
|
|
@@ -534,9 +572,8 @@ class Discount {
|
|
|
534
572
|
if (warrning) {
|
|
535
573
|
Logger({
|
|
536
574
|
level: "WARN",
|
|
537
|
-
message:
|
|
575
|
+
message: `Parameter Validation warrnings for platform > Discount > getValidationJob \n ${warrning}`,
|
|
538
576
|
});
|
|
539
|
-
Logger({ level: "WARN", message: warrning });
|
|
540
577
|
}
|
|
541
578
|
|
|
542
579
|
const query_params = {};
|
|
@@ -549,12 +586,18 @@ class Discount {
|
|
|
549
586
|
`/service/platform/discount/v1.0/company/${this.config.companyId}/file/validation/${id}/`,
|
|
550
587
|
query_params,
|
|
551
588
|
undefined,
|
|
552
|
-
xHeaders
|
|
589
|
+
xHeaders,
|
|
590
|
+
{ headers }
|
|
553
591
|
);
|
|
554
592
|
|
|
593
|
+
let responseData = response;
|
|
594
|
+
if (headers) {
|
|
595
|
+
responseData = response[0];
|
|
596
|
+
}
|
|
597
|
+
|
|
555
598
|
const {
|
|
556
599
|
error: res_error,
|
|
557
|
-
} =
|
|
600
|
+
} = DiscountPlatformModel.FileJobResponse().validate(responseData, {
|
|
558
601
|
abortEarly: false,
|
|
559
602
|
allowUnknown: false,
|
|
560
603
|
});
|
|
@@ -562,24 +605,23 @@ class Discount {
|
|
|
562
605
|
if (res_error) {
|
|
563
606
|
Logger({
|
|
564
607
|
level: "WARN",
|
|
565
|
-
message:
|
|
608
|
+
message: `Response Validation Warnnings for platform > Discount > getValidationJob \n ${res_error}`,
|
|
566
609
|
});
|
|
567
|
-
Logger({ level: "WARN", message: res_error });
|
|
568
610
|
}
|
|
569
611
|
|
|
570
612
|
return response;
|
|
571
613
|
}
|
|
572
614
|
|
|
573
615
|
/**
|
|
574
|
-
* @param {
|
|
575
|
-
* @param {
|
|
576
|
-
* @
|
|
577
|
-
* @
|
|
616
|
+
* @param {DiscountPlatformValidator.UpdateDiscountParam} arg - Arg object
|
|
617
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
618
|
+
* @returns {Promise<DiscountPlatformModel.DiscountJob>} - Success response
|
|
619
|
+
* @name updateDiscount
|
|
578
620
|
* @summary: Create Discount.
|
|
579
|
-
* @description: Create Discount.
|
|
621
|
+
* @description: Create Discount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/updateDiscount/).
|
|
580
622
|
*/
|
|
581
|
-
async updateDiscount({ id, body } = {}) {
|
|
582
|
-
const { error } =
|
|
623
|
+
async updateDiscount({ id, body } = {}, { headers } = { headers: false }) {
|
|
624
|
+
const { error } = DiscountPlatformValidator.updateDiscount().validate(
|
|
583
625
|
{
|
|
584
626
|
id,
|
|
585
627
|
body,
|
|
@@ -591,7 +633,9 @@ class Discount {
|
|
|
591
633
|
}
|
|
592
634
|
|
|
593
635
|
// Showing warrnings if extra unknown parameters are found
|
|
594
|
-
const {
|
|
636
|
+
const {
|
|
637
|
+
error: warrning,
|
|
638
|
+
} = DiscountPlatformValidator.updateDiscount().validate(
|
|
595
639
|
{
|
|
596
640
|
id,
|
|
597
641
|
body,
|
|
@@ -601,9 +645,8 @@ class Discount {
|
|
|
601
645
|
if (warrning) {
|
|
602
646
|
Logger({
|
|
603
647
|
level: "WARN",
|
|
604
|
-
message:
|
|
648
|
+
message: `Parameter Validation warrnings for platform > Discount > updateDiscount \n ${warrning}`,
|
|
605
649
|
});
|
|
606
|
-
Logger({ level: "WARN", message: warrning });
|
|
607
650
|
}
|
|
608
651
|
|
|
609
652
|
const query_params = {};
|
|
@@ -616,35 +659,45 @@ class Discount {
|
|
|
616
659
|
`/service/platform/discount/v1.0/company/${this.config.companyId}/job/${id}/`,
|
|
617
660
|
query_params,
|
|
618
661
|
body,
|
|
619
|
-
xHeaders
|
|
662
|
+
xHeaders,
|
|
663
|
+
{ headers }
|
|
620
664
|
);
|
|
621
665
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
666
|
+
let responseData = response;
|
|
667
|
+
if (headers) {
|
|
668
|
+
responseData = response[0];
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
const {
|
|
672
|
+
error: res_error,
|
|
673
|
+
} = DiscountPlatformModel.DiscountJob().validate(responseData, {
|
|
674
|
+
abortEarly: false,
|
|
675
|
+
allowUnknown: false,
|
|
676
|
+
});
|
|
626
677
|
|
|
627
678
|
if (res_error) {
|
|
628
679
|
Logger({
|
|
629
680
|
level: "WARN",
|
|
630
|
-
message:
|
|
681
|
+
message: `Response Validation Warnnings for platform > Discount > updateDiscount \n ${res_error}`,
|
|
631
682
|
});
|
|
632
|
-
Logger({ level: "WARN", message: res_error });
|
|
633
683
|
}
|
|
634
684
|
|
|
635
685
|
return response;
|
|
636
686
|
}
|
|
637
687
|
|
|
638
688
|
/**
|
|
639
|
-
* @param {
|
|
640
|
-
* @param {
|
|
641
|
-
* @param {BulkDiscount} arg.body
|
|
689
|
+
* @param {DiscountPlatformValidator.UpsertDiscountItemsParam} arg - Arg object
|
|
690
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
642
691
|
* @returns {Promise<Object>} - Success response
|
|
692
|
+
* @name upsertDiscountItems
|
|
643
693
|
* @summary: Create custom discount from bulk.
|
|
644
|
-
* @description: Create custom discounts through API.
|
|
694
|
+
* @description: Create custom discounts through API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/upsertDiscountItems/).
|
|
645
695
|
*/
|
|
646
|
-
async upsertDiscountItems(
|
|
647
|
-
|
|
696
|
+
async upsertDiscountItems(
|
|
697
|
+
{ id, body } = {},
|
|
698
|
+
{ headers } = { headers: false }
|
|
699
|
+
) {
|
|
700
|
+
const { error } = DiscountPlatformValidator.upsertDiscountItems().validate(
|
|
648
701
|
{
|
|
649
702
|
id,
|
|
650
703
|
body,
|
|
@@ -658,7 +711,7 @@ class Discount {
|
|
|
658
711
|
// Showing warrnings if extra unknown parameters are found
|
|
659
712
|
const {
|
|
660
713
|
error: warrning,
|
|
661
|
-
} =
|
|
714
|
+
} = DiscountPlatformValidator.upsertDiscountItems().validate(
|
|
662
715
|
{
|
|
663
716
|
id,
|
|
664
717
|
body,
|
|
@@ -668,9 +721,8 @@ class Discount {
|
|
|
668
721
|
if (warrning) {
|
|
669
722
|
Logger({
|
|
670
723
|
level: "WARN",
|
|
671
|
-
message:
|
|
724
|
+
message: `Parameter Validation warrnings for platform > Discount > upsertDiscountItems \n ${warrning}`,
|
|
672
725
|
});
|
|
673
|
-
Logger({ level: "WARN", message: warrning });
|
|
674
726
|
}
|
|
675
727
|
|
|
676
728
|
const query_params = {};
|
|
@@ -683,10 +735,16 @@ class Discount {
|
|
|
683
735
|
`/service/platform/discount/v1.0/company/${this.config.companyId}/job/${id}/items/`,
|
|
684
736
|
query_params,
|
|
685
737
|
body,
|
|
686
|
-
xHeaders
|
|
738
|
+
xHeaders,
|
|
739
|
+
{ headers }
|
|
687
740
|
);
|
|
688
741
|
|
|
689
|
-
|
|
742
|
+
let responseData = response;
|
|
743
|
+
if (headers) {
|
|
744
|
+
responseData = response[0];
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
690
748
|
abortEarly: false,
|
|
691
749
|
allowUnknown: false,
|
|
692
750
|
});
|
|
@@ -694,24 +752,26 @@ class Discount {
|
|
|
694
752
|
if (res_error) {
|
|
695
753
|
Logger({
|
|
696
754
|
level: "WARN",
|
|
697
|
-
message:
|
|
755
|
+
message: `Response Validation Warnnings for platform > Discount > upsertDiscountItems \n ${res_error}`,
|
|
698
756
|
});
|
|
699
|
-
Logger({ level: "WARN", message: res_error });
|
|
700
757
|
}
|
|
701
758
|
|
|
702
759
|
return response;
|
|
703
760
|
}
|
|
704
761
|
|
|
705
762
|
/**
|
|
706
|
-
* @param {
|
|
707
|
-
* @param {
|
|
708
|
-
* @
|
|
709
|
-
* @
|
|
763
|
+
* @param {DiscountPlatformValidator.ValidateDiscountFileParam} arg - Arg object
|
|
764
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
765
|
+
* @returns {Promise<DiscountPlatformModel.FileJobResponse>} - Success response
|
|
766
|
+
* @name validateDiscountFile
|
|
710
767
|
* @summary: Validate File.
|
|
711
|
-
* @description: Validate File.
|
|
768
|
+
* @description: Validate File. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/validateDiscountFile/).
|
|
712
769
|
*/
|
|
713
|
-
async validateDiscountFile(
|
|
714
|
-
|
|
770
|
+
async validateDiscountFile(
|
|
771
|
+
{ body, discount } = {},
|
|
772
|
+
{ headers } = { headers: false }
|
|
773
|
+
) {
|
|
774
|
+
const { error } = DiscountPlatformValidator.validateDiscountFile().validate(
|
|
715
775
|
{
|
|
716
776
|
body,
|
|
717
777
|
discount,
|
|
@@ -725,7 +785,7 @@ class Discount {
|
|
|
725
785
|
// Showing warrnings if extra unknown parameters are found
|
|
726
786
|
const {
|
|
727
787
|
error: warrning,
|
|
728
|
-
} =
|
|
788
|
+
} = DiscountPlatformValidator.validateDiscountFile().validate(
|
|
729
789
|
{
|
|
730
790
|
body,
|
|
731
791
|
discount,
|
|
@@ -735,9 +795,8 @@ class Discount {
|
|
|
735
795
|
if (warrning) {
|
|
736
796
|
Logger({
|
|
737
797
|
level: "WARN",
|
|
738
|
-
message:
|
|
798
|
+
message: `Parameter Validation warrnings for platform > Discount > validateDiscountFile \n ${warrning}`,
|
|
739
799
|
});
|
|
740
|
-
Logger({ level: "WARN", message: warrning });
|
|
741
800
|
}
|
|
742
801
|
|
|
743
802
|
const query_params = {};
|
|
@@ -751,12 +810,18 @@ class Discount {
|
|
|
751
810
|
`/service/platform/discount/v1.0/company/${this.config.companyId}/file/validation/`,
|
|
752
811
|
query_params,
|
|
753
812
|
body,
|
|
754
|
-
xHeaders
|
|
813
|
+
xHeaders,
|
|
814
|
+
{ headers }
|
|
755
815
|
);
|
|
756
816
|
|
|
817
|
+
let responseData = response;
|
|
818
|
+
if (headers) {
|
|
819
|
+
responseData = response[0];
|
|
820
|
+
}
|
|
821
|
+
|
|
757
822
|
const {
|
|
758
823
|
error: res_error,
|
|
759
|
-
} =
|
|
824
|
+
} = DiscountPlatformModel.FileJobResponse().validate(responseData, {
|
|
760
825
|
abortEarly: false,
|
|
761
826
|
allowUnknown: false,
|
|
762
827
|
});
|
|
@@ -764,9 +829,8 @@ class Discount {
|
|
|
764
829
|
if (res_error) {
|
|
765
830
|
Logger({
|
|
766
831
|
level: "WARN",
|
|
767
|
-
message:
|
|
832
|
+
message: `Response Validation Warnnings for platform > Discount > validateDiscountFile \n ${res_error}`,
|
|
768
833
|
});
|
|
769
|
-
Logger({ level: "WARN", message: res_error });
|
|
770
834
|
}
|
|
771
835
|
|
|
772
836
|
return response;
|