@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 ConfigurationPlatformValidator = require("./ConfigurationPlatformValidator");
|
|
5
|
+
const ConfigurationPlatformModel = require("./ConfigurationPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -12,14 +12,17 @@ class Configuration {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @param {
|
|
16
|
-
* @param {
|
|
17
|
-
* @returns {Promise<CreateAppResponse>} - Success response
|
|
15
|
+
* @param {ConfigurationPlatformValidator.CreateApplicationParam} arg - Arg object
|
|
16
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
17
|
+
* @returns {Promise<ConfigurationPlatformModel.CreateAppResponse>} - Success response
|
|
18
|
+
* @name createApplication
|
|
18
19
|
* @summary: Create a new sales channel
|
|
19
|
-
* @description: Applications are sales channel websites which can be configured, personalized and customized. Use this API to create a new application in the current company.
|
|
20
|
+
* @description: Applications are sales channel websites which can be configured, personalized and customized. Use this API to create a new application in the current company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/createApplication/).
|
|
20
21
|
*/
|
|
21
|
-
async createApplication({ body } = {}) {
|
|
22
|
-
const {
|
|
22
|
+
async createApplication({ body } = {}, { headers } = { headers: false }) {
|
|
23
|
+
const {
|
|
24
|
+
error,
|
|
25
|
+
} = ConfigurationPlatformValidator.createApplication().validate(
|
|
23
26
|
{
|
|
24
27
|
body,
|
|
25
28
|
},
|
|
@@ -32,7 +35,7 @@ class Configuration {
|
|
|
32
35
|
// Showing warrnings if extra unknown parameters are found
|
|
33
36
|
const {
|
|
34
37
|
error: warrning,
|
|
35
|
-
} =
|
|
38
|
+
} = ConfigurationPlatformValidator.createApplication().validate(
|
|
36
39
|
{
|
|
37
40
|
body,
|
|
38
41
|
},
|
|
@@ -41,9 +44,8 @@ class Configuration {
|
|
|
41
44
|
if (warrning) {
|
|
42
45
|
Logger({
|
|
43
46
|
level: "WARN",
|
|
44
|
-
message:
|
|
47
|
+
message: `Parameter Validation warrnings for platform > Configuration > createApplication \n ${warrning}`,
|
|
45
48
|
});
|
|
46
|
-
Logger({ level: "WARN", message: warrning });
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
const query_params = {};
|
|
@@ -56,12 +58,18 @@ class Configuration {
|
|
|
56
58
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application`,
|
|
57
59
|
query_params,
|
|
58
60
|
body,
|
|
59
|
-
xHeaders
|
|
61
|
+
xHeaders,
|
|
62
|
+
{ headers }
|
|
60
63
|
);
|
|
61
64
|
|
|
65
|
+
let responseData = response;
|
|
66
|
+
if (headers) {
|
|
67
|
+
responseData = response[0];
|
|
68
|
+
}
|
|
69
|
+
|
|
62
70
|
const {
|
|
63
71
|
error: res_error,
|
|
64
|
-
} =
|
|
72
|
+
} = ConfigurationPlatformModel.CreateAppResponse().validate(responseData, {
|
|
65
73
|
abortEarly: false,
|
|
66
74
|
allowUnknown: false,
|
|
67
75
|
});
|
|
@@ -69,25 +77,27 @@ class Configuration {
|
|
|
69
77
|
if (res_error) {
|
|
70
78
|
Logger({
|
|
71
79
|
level: "WARN",
|
|
72
|
-
message:
|
|
80
|
+
message: `Response Validation Warnnings for platform > Configuration > createApplication \n ${res_error}`,
|
|
73
81
|
});
|
|
74
|
-
Logger({ level: "WARN", message: res_error });
|
|
75
82
|
}
|
|
76
83
|
|
|
77
84
|
return response;
|
|
78
85
|
}
|
|
79
86
|
|
|
80
87
|
/**
|
|
81
|
-
* @param {
|
|
82
|
-
* @param {
|
|
83
|
-
* @
|
|
84
|
-
*
|
|
85
|
-
* @
|
|
88
|
+
* @param {ConfigurationPlatformValidator.GetApplicationsParam} arg - Arg object
|
|
89
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
90
|
+
* @returns {Promise<ConfigurationPlatformModel.ApplicationsResponse>} -
|
|
91
|
+
* Success response
|
|
92
|
+
* @name getApplications
|
|
86
93
|
* @summary: Get list of registered sales channels under company
|
|
87
|
-
* @description: Applications are sales channel websites which can be configured, personalized and customised. Use this API to fetch a list of applications created within a company.
|
|
94
|
+
* @description: Applications are sales channel websites which can be configured, personalized and customised. Use this API to fetch a list of applications created within a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getApplications/).
|
|
88
95
|
*/
|
|
89
|
-
async getApplications(
|
|
90
|
-
|
|
96
|
+
async getApplications(
|
|
97
|
+
{ pageNo, pageSize, q } = {},
|
|
98
|
+
{ headers } = { headers: false }
|
|
99
|
+
) {
|
|
100
|
+
const { error } = ConfigurationPlatformValidator.getApplications().validate(
|
|
91
101
|
{
|
|
92
102
|
pageNo,
|
|
93
103
|
pageSize,
|
|
@@ -102,7 +112,7 @@ class Configuration {
|
|
|
102
112
|
// Showing warrnings if extra unknown parameters are found
|
|
103
113
|
const {
|
|
104
114
|
error: warrning,
|
|
105
|
-
} =
|
|
115
|
+
} = ConfigurationPlatformValidator.getApplications().validate(
|
|
106
116
|
{
|
|
107
117
|
pageNo,
|
|
108
118
|
pageSize,
|
|
@@ -113,9 +123,8 @@ class Configuration {
|
|
|
113
123
|
if (warrning) {
|
|
114
124
|
Logger({
|
|
115
125
|
level: "WARN",
|
|
116
|
-
message:
|
|
126
|
+
message: `Parameter Validation warrnings for platform > Configuration > getApplications \n ${warrning}`,
|
|
117
127
|
});
|
|
118
|
-
Logger({ level: "WARN", message: warrning });
|
|
119
128
|
}
|
|
120
129
|
|
|
121
130
|
const query_params = {};
|
|
@@ -131,22 +140,27 @@ class Configuration {
|
|
|
131
140
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application`,
|
|
132
141
|
query_params,
|
|
133
142
|
undefined,
|
|
134
|
-
xHeaders
|
|
143
|
+
xHeaders,
|
|
144
|
+
{ headers }
|
|
135
145
|
);
|
|
136
146
|
|
|
147
|
+
let responseData = response;
|
|
148
|
+
if (headers) {
|
|
149
|
+
responseData = response[0];
|
|
150
|
+
}
|
|
151
|
+
|
|
137
152
|
const {
|
|
138
153
|
error: res_error,
|
|
139
|
-
} =
|
|
140
|
-
|
|
141
|
-
allowUnknown: false
|
|
142
|
-
|
|
154
|
+
} = ConfigurationPlatformModel.ApplicationsResponse().validate(
|
|
155
|
+
responseData,
|
|
156
|
+
{ abortEarly: false, allowUnknown: false }
|
|
157
|
+
);
|
|
143
158
|
|
|
144
159
|
if (res_error) {
|
|
145
160
|
Logger({
|
|
146
161
|
level: "WARN",
|
|
147
|
-
message:
|
|
162
|
+
message: `Response Validation Warnnings for platform > Configuration > getApplications \n ${res_error}`,
|
|
148
163
|
});
|
|
149
|
-
Logger({ level: "WARN", message: res_error });
|
|
150
164
|
}
|
|
151
165
|
|
|
152
166
|
return response;
|
|
@@ -156,6 +170,7 @@ class Configuration {
|
|
|
156
170
|
* @param {Object} arg - Arg object.
|
|
157
171
|
* @param {number} [arg.pageSize] -
|
|
158
172
|
* @param {string} [arg.q] - Search param by name or domain
|
|
173
|
+
* @returns {Paginator<ConfigurationPlatformModel.ApplicationsResponse>}
|
|
159
174
|
* @summary: Get list of registered sales channels under company
|
|
160
175
|
* @description: Applications are sales channel websites which can be configured, personalized and customised. Use this API to fetch a list of applications created within a company.
|
|
161
176
|
*/
|
|
@@ -181,17 +196,22 @@ class Configuration {
|
|
|
181
196
|
}
|
|
182
197
|
|
|
183
198
|
/**
|
|
184
|
-
* @param {
|
|
185
|
-
* @param {
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
* @
|
|
199
|
+
* @param {ConfigurationPlatformValidator.GetAvailableOptInsParam} arg - Arg object
|
|
200
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
201
|
+
* @returns {Promise<ConfigurationPlatformModel.GetIntegrationsOptInsResponse>}
|
|
202
|
+
* - Success response
|
|
203
|
+
*
|
|
204
|
+
* @name getAvailableOptIns
|
|
190
205
|
* @summary: Get all available integration opt-ins
|
|
191
|
-
* @description: Use this API to get a list of all available integrations in a company
|
|
206
|
+
* @description: Use this API to get a list of all available integrations in a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAvailableOptIns/).
|
|
192
207
|
*/
|
|
193
|
-
async getAvailableOptIns(
|
|
194
|
-
|
|
208
|
+
async getAvailableOptIns(
|
|
209
|
+
{ pageNo, pageSize } = {},
|
|
210
|
+
{ headers } = { headers: false }
|
|
211
|
+
) {
|
|
212
|
+
const {
|
|
213
|
+
error,
|
|
214
|
+
} = ConfigurationPlatformValidator.getAvailableOptIns().validate(
|
|
195
215
|
{
|
|
196
216
|
pageNo,
|
|
197
217
|
pageSize,
|
|
@@ -205,7 +225,7 @@ class Configuration {
|
|
|
205
225
|
// Showing warrnings if extra unknown parameters are found
|
|
206
226
|
const {
|
|
207
227
|
error: warrning,
|
|
208
|
-
} =
|
|
228
|
+
} = ConfigurationPlatformValidator.getAvailableOptIns().validate(
|
|
209
229
|
{
|
|
210
230
|
pageNo,
|
|
211
231
|
pageSize,
|
|
@@ -215,9 +235,8 @@ class Configuration {
|
|
|
215
235
|
if (warrning) {
|
|
216
236
|
Logger({
|
|
217
237
|
level: "WARN",
|
|
218
|
-
message:
|
|
238
|
+
message: `Parameter Validation warrnings for platform > Configuration > getAvailableOptIns \n ${warrning}`,
|
|
219
239
|
});
|
|
220
|
-
Logger({ level: "WARN", message: warrning });
|
|
221
240
|
}
|
|
222
241
|
|
|
223
242
|
const query_params = {};
|
|
@@ -232,22 +251,27 @@ class Configuration {
|
|
|
232
251
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/available`,
|
|
233
252
|
query_params,
|
|
234
253
|
undefined,
|
|
235
|
-
xHeaders
|
|
254
|
+
xHeaders,
|
|
255
|
+
{ headers }
|
|
236
256
|
);
|
|
237
257
|
|
|
258
|
+
let responseData = response;
|
|
259
|
+
if (headers) {
|
|
260
|
+
responseData = response[0];
|
|
261
|
+
}
|
|
262
|
+
|
|
238
263
|
const {
|
|
239
264
|
error: res_error,
|
|
240
|
-
} =
|
|
241
|
-
|
|
242
|
-
allowUnknown: false
|
|
243
|
-
|
|
265
|
+
} = ConfigurationPlatformModel.GetIntegrationsOptInsResponse().validate(
|
|
266
|
+
responseData,
|
|
267
|
+
{ abortEarly: false, allowUnknown: false }
|
|
268
|
+
);
|
|
244
269
|
|
|
245
270
|
if (res_error) {
|
|
246
271
|
Logger({
|
|
247
272
|
level: "WARN",
|
|
248
|
-
message:
|
|
273
|
+
message: `Response Validation Warnnings for platform > Configuration > getAvailableOptIns \n ${res_error}`,
|
|
249
274
|
});
|
|
250
|
-
Logger({ level: "WARN", message: res_error });
|
|
251
275
|
}
|
|
252
276
|
|
|
253
277
|
return response;
|
|
@@ -255,13 +279,45 @@ class Configuration {
|
|
|
255
279
|
|
|
256
280
|
/**
|
|
257
281
|
* @param {Object} arg - Arg object.
|
|
258
|
-
* @param {
|
|
259
|
-
*
|
|
282
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
283
|
+
* page. Default value is 10.
|
|
284
|
+
* @returns {Paginator<ConfigurationPlatformModel.GetIntegrationsOptInsResponse>}
|
|
285
|
+
* @summary: Get all available integration opt-ins
|
|
286
|
+
* @description: Use this API to get a list of all available integrations in a company
|
|
287
|
+
*/
|
|
288
|
+
getAvailableOptInsPaginator({ pageSize } = {}) {
|
|
289
|
+
const paginator = new Paginator();
|
|
290
|
+
const callback = async () => {
|
|
291
|
+
const pageId = paginator.nextId;
|
|
292
|
+
const pageNo = paginator.pageNo;
|
|
293
|
+
const pageType = "number";
|
|
294
|
+
const data = await this.getAvailableOptIns({
|
|
295
|
+
pageNo: pageNo,
|
|
296
|
+
pageSize: pageSize,
|
|
297
|
+
});
|
|
298
|
+
paginator.setPaginator({
|
|
299
|
+
hasNext: data.page.has_next ? true : false,
|
|
300
|
+
nextId: data.page.next_id,
|
|
301
|
+
});
|
|
302
|
+
return data;
|
|
303
|
+
};
|
|
304
|
+
paginator.setCallback(callback.bind(this));
|
|
305
|
+
return paginator;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* @param {ConfigurationPlatformValidator.GetBrandsByCompanyParam} arg - Arg object
|
|
310
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
311
|
+
* @returns {Promise<ConfigurationPlatformModel.BrandsByCompanyResponse>} -
|
|
312
|
+
* Success response
|
|
313
|
+
* @name getBrandsByCompany
|
|
260
314
|
* @summary: Get brands by company.
|
|
261
|
-
* @description: Use this API to get all the brands added in a company. Get all the brand names, along with URLs of their logo, banner, and portrait image.
|
|
315
|
+
* @description: Use this API to get all the brands added in a company. Get all the brand names, along with URLs of their logo, banner, and portrait image. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getBrandsByCompany/).
|
|
262
316
|
*/
|
|
263
|
-
async getBrandsByCompany({ q } = {}) {
|
|
264
|
-
const {
|
|
317
|
+
async getBrandsByCompany({ q } = {}, { headers } = { headers: false }) {
|
|
318
|
+
const {
|
|
319
|
+
error,
|
|
320
|
+
} = ConfigurationPlatformValidator.getBrandsByCompany().validate(
|
|
265
321
|
{
|
|
266
322
|
q,
|
|
267
323
|
},
|
|
@@ -274,7 +330,7 @@ class Configuration {
|
|
|
274
330
|
// Showing warrnings if extra unknown parameters are found
|
|
275
331
|
const {
|
|
276
332
|
error: warrning,
|
|
277
|
-
} =
|
|
333
|
+
} = ConfigurationPlatformValidator.getBrandsByCompany().validate(
|
|
278
334
|
{
|
|
279
335
|
q,
|
|
280
336
|
},
|
|
@@ -283,9 +339,8 @@ class Configuration {
|
|
|
283
339
|
if (warrning) {
|
|
284
340
|
Logger({
|
|
285
341
|
level: "WARN",
|
|
286
|
-
message:
|
|
342
|
+
message: `Parameter Validation warrnings for platform > Configuration > getBrandsByCompany \n ${warrning}`,
|
|
287
343
|
});
|
|
288
|
-
Logger({ level: "WARN", message: warrning });
|
|
289
344
|
}
|
|
290
345
|
|
|
291
346
|
const query_params = {};
|
|
@@ -299,40 +354,48 @@ class Configuration {
|
|
|
299
354
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/brands-by-companies`,
|
|
300
355
|
query_params,
|
|
301
356
|
undefined,
|
|
302
|
-
xHeaders
|
|
357
|
+
xHeaders,
|
|
358
|
+
{ headers }
|
|
303
359
|
);
|
|
304
360
|
|
|
361
|
+
let responseData = response;
|
|
362
|
+
if (headers) {
|
|
363
|
+
responseData = response[0];
|
|
364
|
+
}
|
|
365
|
+
|
|
305
366
|
const {
|
|
306
367
|
error: res_error,
|
|
307
|
-
} =
|
|
308
|
-
|
|
309
|
-
allowUnknown: false
|
|
310
|
-
|
|
368
|
+
} = ConfigurationPlatformModel.BrandsByCompanyResponse().validate(
|
|
369
|
+
responseData,
|
|
370
|
+
{ abortEarly: false, allowUnknown: false }
|
|
371
|
+
);
|
|
311
372
|
|
|
312
373
|
if (res_error) {
|
|
313
374
|
Logger({
|
|
314
375
|
level: "WARN",
|
|
315
|
-
message:
|
|
376
|
+
message: `Response Validation Warnnings for platform > Configuration > getBrandsByCompany \n ${res_error}`,
|
|
316
377
|
});
|
|
317
|
-
Logger({ level: "WARN", message: res_error });
|
|
318
378
|
}
|
|
319
379
|
|
|
320
380
|
return response;
|
|
321
381
|
}
|
|
322
382
|
|
|
323
383
|
/**
|
|
324
|
-
* @param {
|
|
325
|
-
* @param {
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
* @param {CompanyByBrandsRequest} arg.body
|
|
330
|
-
* @returns {Promise<CompanyByBrandsResponse>} - Success response
|
|
384
|
+
* @param {ConfigurationPlatformValidator.GetCompanyByBrandsParam} arg - Arg object
|
|
385
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
386
|
+
* @returns {Promise<ConfigurationPlatformModel.CompanyByBrandsResponse>} -
|
|
387
|
+
* Success response
|
|
388
|
+
* @name getCompanyByBrands
|
|
331
389
|
* @summary: Get company by brand uids
|
|
332
|
-
* @description: Use this API to get a list of companies by the brands they deal
|
|
390
|
+
* @description: Use this API to get a list of companies by the brands they deal - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getCompanyByBrands/).
|
|
333
391
|
*/
|
|
334
|
-
async getCompanyByBrands(
|
|
335
|
-
|
|
392
|
+
async getCompanyByBrands(
|
|
393
|
+
{ body, pageNo, pageSize } = {},
|
|
394
|
+
{ headers } = { headers: false }
|
|
395
|
+
) {
|
|
396
|
+
const {
|
|
397
|
+
error,
|
|
398
|
+
} = ConfigurationPlatformValidator.getCompanyByBrands().validate(
|
|
336
399
|
{
|
|
337
400
|
body,
|
|
338
401
|
pageNo,
|
|
@@ -347,7 +410,7 @@ class Configuration {
|
|
|
347
410
|
// Showing warrnings if extra unknown parameters are found
|
|
348
411
|
const {
|
|
349
412
|
error: warrning,
|
|
350
|
-
} =
|
|
413
|
+
} = ConfigurationPlatformValidator.getCompanyByBrands().validate(
|
|
351
414
|
{
|
|
352
415
|
body,
|
|
353
416
|
pageNo,
|
|
@@ -358,9 +421,8 @@ class Configuration {
|
|
|
358
421
|
if (warrning) {
|
|
359
422
|
Logger({
|
|
360
423
|
level: "WARN",
|
|
361
|
-
message:
|
|
424
|
+
message: `Parameter Validation warrnings for platform > Configuration > getCompanyByBrands \n ${warrning}`,
|
|
362
425
|
});
|
|
363
|
-
Logger({ level: "WARN", message: warrning });
|
|
364
426
|
}
|
|
365
427
|
|
|
366
428
|
const query_params = {};
|
|
@@ -375,22 +437,27 @@ class Configuration {
|
|
|
375
437
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/companies-by-brands`,
|
|
376
438
|
query_params,
|
|
377
439
|
body,
|
|
378
|
-
xHeaders
|
|
440
|
+
xHeaders,
|
|
441
|
+
{ headers }
|
|
379
442
|
);
|
|
380
443
|
|
|
444
|
+
let responseData = response;
|
|
445
|
+
if (headers) {
|
|
446
|
+
responseData = response[0];
|
|
447
|
+
}
|
|
448
|
+
|
|
381
449
|
const {
|
|
382
450
|
error: res_error,
|
|
383
|
-
} =
|
|
384
|
-
|
|
385
|
-
allowUnknown: false
|
|
386
|
-
|
|
451
|
+
} = ConfigurationPlatformModel.CompanyByBrandsResponse().validate(
|
|
452
|
+
responseData,
|
|
453
|
+
{ abortEarly: false, allowUnknown: false }
|
|
454
|
+
);
|
|
387
455
|
|
|
388
456
|
if (res_error) {
|
|
389
457
|
Logger({
|
|
390
458
|
level: "WARN",
|
|
391
|
-
message:
|
|
459
|
+
message: `Response Validation Warnnings for platform > Configuration > getCompanyByBrands \n ${res_error}`,
|
|
392
460
|
});
|
|
393
|
-
Logger({ level: "WARN", message: res_error });
|
|
394
461
|
}
|
|
395
462
|
|
|
396
463
|
return response;
|
|
@@ -400,7 +467,8 @@ class Configuration {
|
|
|
400
467
|
* @param {Object} arg - Arg object.
|
|
401
468
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
402
469
|
* page. Default value is 10.
|
|
403
|
-
* @param {CompanyByBrandsRequest} arg.body
|
|
470
|
+
* @param {ConfigurationPlatformModel.CompanyByBrandsRequest} arg.body
|
|
471
|
+
* @returns {Paginator<ConfigurationPlatformModel.CompanyByBrandsResponse>}
|
|
404
472
|
* @summary: Get company by brand uids
|
|
405
473
|
* @description: Use this API to get a list of companies by the brands they deal
|
|
406
474
|
*/
|
|
@@ -426,13 +494,16 @@ class Configuration {
|
|
|
426
494
|
}
|
|
427
495
|
|
|
428
496
|
/**
|
|
429
|
-
* @param {
|
|
430
|
-
* @
|
|
497
|
+
* @param {ConfigurationPlatformValidator.GetCurrenciesParam} arg - Arg object
|
|
498
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
499
|
+
* @returns {Promise<ConfigurationPlatformModel.CurrenciesResponse>} -
|
|
500
|
+
* Success response
|
|
501
|
+
* @name getCurrencies
|
|
431
502
|
* @summary: Get all currencies
|
|
432
|
-
* @description: Use this API to get a list of currencies allowed in the company. Moreover, get the name, code, symbol, and the decimal digits of the currencies.
|
|
503
|
+
* @description: Use this API to get a list of currencies allowed in the company. Moreover, get the name, code, symbol, and the decimal digits of the currencies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getCurrencies/).
|
|
433
504
|
*/
|
|
434
|
-
async getCurrencies({} = {}) {
|
|
435
|
-
const { error } =
|
|
505
|
+
async getCurrencies({ headers } = { headers: false }) {
|
|
506
|
+
const { error } = ConfigurationPlatformValidator.getCurrencies().validate(
|
|
436
507
|
{},
|
|
437
508
|
{ abortEarly: false, allowUnknown: true }
|
|
438
509
|
);
|
|
@@ -441,16 +512,17 @@ class Configuration {
|
|
|
441
512
|
}
|
|
442
513
|
|
|
443
514
|
// Showing warrnings if extra unknown parameters are found
|
|
444
|
-
const {
|
|
515
|
+
const {
|
|
516
|
+
error: warrning,
|
|
517
|
+
} = ConfigurationPlatformValidator.getCurrencies().validate(
|
|
445
518
|
{},
|
|
446
519
|
{ abortEarly: false, allowUnknown: false }
|
|
447
520
|
);
|
|
448
521
|
if (warrning) {
|
|
449
522
|
Logger({
|
|
450
523
|
level: "WARN",
|
|
451
|
-
message:
|
|
524
|
+
message: `Parameter Validation warrnings for platform > Configuration > getCurrencies \n ${warrning}`,
|
|
452
525
|
});
|
|
453
|
-
Logger({ level: "WARN", message: warrning });
|
|
454
526
|
}
|
|
455
527
|
|
|
456
528
|
const query_params = {};
|
|
@@ -463,12 +535,18 @@ class Configuration {
|
|
|
463
535
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/currencies`,
|
|
464
536
|
query_params,
|
|
465
537
|
undefined,
|
|
466
|
-
xHeaders
|
|
538
|
+
xHeaders,
|
|
539
|
+
{ headers }
|
|
467
540
|
);
|
|
468
541
|
|
|
542
|
+
let responseData = response;
|
|
543
|
+
if (headers) {
|
|
544
|
+
responseData = response[0];
|
|
545
|
+
}
|
|
546
|
+
|
|
469
547
|
const {
|
|
470
548
|
error: res_error,
|
|
471
|
-
} =
|
|
549
|
+
} = ConfigurationPlatformModel.CurrenciesResponse().validate(responseData, {
|
|
472
550
|
abortEarly: false,
|
|
473
551
|
allowUnknown: false,
|
|
474
552
|
});
|
|
@@ -476,23 +554,27 @@ class Configuration {
|
|
|
476
554
|
if (res_error) {
|
|
477
555
|
Logger({
|
|
478
556
|
level: "WARN",
|
|
479
|
-
message:
|
|
557
|
+
message: `Response Validation Warnnings for platform > Configuration > getCurrencies \n ${res_error}`,
|
|
480
558
|
});
|
|
481
|
-
Logger({ level: "WARN", message: res_error });
|
|
482
559
|
}
|
|
483
560
|
|
|
484
561
|
return response;
|
|
485
562
|
}
|
|
486
563
|
|
|
487
564
|
/**
|
|
488
|
-
* @param {
|
|
489
|
-
* @param {
|
|
490
|
-
* @returns {Promise<DomainSuggestionsResponse>}
|
|
565
|
+
* @param {ConfigurationPlatformValidator.GetDomainAvailibilityParam} arg - Arg object
|
|
566
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
567
|
+
* @returns {Promise<ConfigurationPlatformModel.DomainSuggestionsResponse>}
|
|
568
|
+
* - Success response
|
|
569
|
+
*
|
|
570
|
+
* @name getDomainAvailibility
|
|
491
571
|
* @summary: Check domain availability before linking to application
|
|
492
|
-
* @description: Use this API to check the domain availability before linking it to application. Also sends domain suggestions that are similar to the queried domain. Note - Custom domain search is currently powered by GoDaddy provider.
|
|
572
|
+
* @description: Use this API to check the domain availability before linking it to application. Also sends domain suggestions that are similar to the queried domain. Note - Custom domain search is currently powered by GoDaddy provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getDomainAvailibility/).
|
|
493
573
|
*/
|
|
494
|
-
async getDomainAvailibility({ body } = {}) {
|
|
495
|
-
const {
|
|
574
|
+
async getDomainAvailibility({ body } = {}, { headers } = { headers: false }) {
|
|
575
|
+
const {
|
|
576
|
+
error,
|
|
577
|
+
} = ConfigurationPlatformValidator.getDomainAvailibility().validate(
|
|
496
578
|
{
|
|
497
579
|
body,
|
|
498
580
|
},
|
|
@@ -505,7 +587,7 @@ class Configuration {
|
|
|
505
587
|
// Showing warrnings if extra unknown parameters are found
|
|
506
588
|
const {
|
|
507
589
|
error: warrning,
|
|
508
|
-
} =
|
|
590
|
+
} = ConfigurationPlatformValidator.getDomainAvailibility().validate(
|
|
509
591
|
{
|
|
510
592
|
body,
|
|
511
593
|
},
|
|
@@ -514,9 +596,8 @@ class Configuration {
|
|
|
514
596
|
if (warrning) {
|
|
515
597
|
Logger({
|
|
516
598
|
level: "WARN",
|
|
517
|
-
message:
|
|
599
|
+
message: `Parameter Validation warrnings for platform > Configuration > getDomainAvailibility \n ${warrning}`,
|
|
518
600
|
});
|
|
519
|
-
Logger({ level: "WARN", message: warrning });
|
|
520
601
|
}
|
|
521
602
|
|
|
522
603
|
const query_params = {};
|
|
@@ -529,36 +610,44 @@ class Configuration {
|
|
|
529
610
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/domain/suggestions`,
|
|
530
611
|
query_params,
|
|
531
612
|
body,
|
|
532
|
-
xHeaders
|
|
613
|
+
xHeaders,
|
|
614
|
+
{ headers }
|
|
533
615
|
);
|
|
534
616
|
|
|
617
|
+
let responseData = response;
|
|
618
|
+
if (headers) {
|
|
619
|
+
responseData = response[0];
|
|
620
|
+
}
|
|
621
|
+
|
|
535
622
|
const {
|
|
536
623
|
error: res_error,
|
|
537
|
-
} =
|
|
538
|
-
|
|
539
|
-
allowUnknown: false
|
|
540
|
-
|
|
624
|
+
} = ConfigurationPlatformModel.DomainSuggestionsResponse().validate(
|
|
625
|
+
responseData,
|
|
626
|
+
{ abortEarly: false, allowUnknown: false }
|
|
627
|
+
);
|
|
541
628
|
|
|
542
629
|
if (res_error) {
|
|
543
630
|
Logger({
|
|
544
631
|
level: "WARN",
|
|
545
|
-
message:
|
|
632
|
+
message: `Response Validation Warnnings for platform > Configuration > getDomainAvailibility \n ${res_error}`,
|
|
546
633
|
});
|
|
547
|
-
Logger({ level: "WARN", message: res_error });
|
|
548
634
|
}
|
|
549
635
|
|
|
550
636
|
return response;
|
|
551
637
|
}
|
|
552
638
|
|
|
553
639
|
/**
|
|
554
|
-
* @param {
|
|
555
|
-
* @param {
|
|
556
|
-
* @returns {Promise<Integration>} - Success response
|
|
640
|
+
* @param {ConfigurationPlatformValidator.GetIntegrationByIdParam} arg - Arg object
|
|
641
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
642
|
+
* @returns {Promise<ConfigurationPlatformModel.Integration>} - Success response
|
|
643
|
+
* @name getIntegrationById
|
|
557
644
|
* @summary: Get integration data by its ID
|
|
558
|
-
* @description: Use this API to fetch the details of an integration (such as Ginesys, SAP, etc.) using its ID
|
|
645
|
+
* @description: Use this API to fetch the details of an integration (such as Ginesys, SAP, etc.) using its ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getIntegrationById/).
|
|
559
646
|
*/
|
|
560
|
-
async getIntegrationById({ id } = {}) {
|
|
561
|
-
const {
|
|
647
|
+
async getIntegrationById({ id } = {}, { headers } = { headers: false }) {
|
|
648
|
+
const {
|
|
649
|
+
error,
|
|
650
|
+
} = ConfigurationPlatformValidator.getIntegrationById().validate(
|
|
562
651
|
{
|
|
563
652
|
id,
|
|
564
653
|
},
|
|
@@ -571,7 +660,7 @@ class Configuration {
|
|
|
571
660
|
// Showing warrnings if extra unknown parameters are found
|
|
572
661
|
const {
|
|
573
662
|
error: warrning,
|
|
574
|
-
} =
|
|
663
|
+
} = ConfigurationPlatformValidator.getIntegrationById().validate(
|
|
575
664
|
{
|
|
576
665
|
id,
|
|
577
666
|
},
|
|
@@ -580,9 +669,8 @@ class Configuration {
|
|
|
580
669
|
if (warrning) {
|
|
581
670
|
Logger({
|
|
582
671
|
level: "WARN",
|
|
583
|
-
message:
|
|
672
|
+
message: `Parameter Validation warrnings for platform > Configuration > getIntegrationById \n ${warrning}`,
|
|
584
673
|
});
|
|
585
|
-
Logger({ level: "WARN", message: warrning });
|
|
586
674
|
}
|
|
587
675
|
|
|
588
676
|
const query_params = {};
|
|
@@ -595,12 +683,18 @@ class Configuration {
|
|
|
595
683
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration/${id}`,
|
|
596
684
|
query_params,
|
|
597
685
|
undefined,
|
|
598
|
-
xHeaders
|
|
686
|
+
xHeaders,
|
|
687
|
+
{ headers }
|
|
599
688
|
);
|
|
600
689
|
|
|
690
|
+
let responseData = response;
|
|
691
|
+
if (headers) {
|
|
692
|
+
responseData = response[0];
|
|
693
|
+
}
|
|
694
|
+
|
|
601
695
|
const {
|
|
602
696
|
error: res_error,
|
|
603
|
-
} =
|
|
697
|
+
} = ConfigurationPlatformModel.Integration().validate(responseData, {
|
|
604
698
|
abortEarly: false,
|
|
605
699
|
allowUnknown: false,
|
|
606
700
|
});
|
|
@@ -608,25 +702,30 @@ class Configuration {
|
|
|
608
702
|
if (res_error) {
|
|
609
703
|
Logger({
|
|
610
704
|
level: "WARN",
|
|
611
|
-
message:
|
|
705
|
+
message: `Response Validation Warnnings for platform > Configuration > getIntegrationById \n ${res_error}`,
|
|
612
706
|
});
|
|
613
|
-
Logger({ level: "WARN", message: res_error });
|
|
614
707
|
}
|
|
615
708
|
|
|
616
709
|
return response;
|
|
617
710
|
}
|
|
618
711
|
|
|
619
712
|
/**
|
|
620
|
-
* @param {
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
* @param {
|
|
624
|
-
* @returns {Promise<IntegrationLevel>} - Success response
|
|
713
|
+
* @param {ConfigurationPlatformValidator.GetIntegrationByLevelIdParam} arg
|
|
714
|
+
* - Arg object
|
|
715
|
+
*
|
|
716
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
717
|
+
* @returns {Promise<ConfigurationPlatformModel.IntegrationLevel>} - Success response
|
|
718
|
+
* @name getIntegrationByLevelId
|
|
625
719
|
* @summary: Get integration config at a particular level (store/company)
|
|
626
|
-
* @description: Use this API to get the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. at a particular level (store/company).
|
|
720
|
+
* @description: Use this API to get the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. at a particular level (store/company). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getIntegrationByLevelId/).
|
|
627
721
|
*/
|
|
628
|
-
async getIntegrationByLevelId(
|
|
629
|
-
|
|
722
|
+
async getIntegrationByLevelId(
|
|
723
|
+
{ id, level, uid } = {},
|
|
724
|
+
{ headers } = { headers: false }
|
|
725
|
+
) {
|
|
726
|
+
const {
|
|
727
|
+
error,
|
|
728
|
+
} = ConfigurationPlatformValidator.getIntegrationByLevelId().validate(
|
|
630
729
|
{
|
|
631
730
|
id,
|
|
632
731
|
level,
|
|
@@ -641,7 +740,7 @@ class Configuration {
|
|
|
641
740
|
// Showing warrnings if extra unknown parameters are found
|
|
642
741
|
const {
|
|
643
742
|
error: warrning,
|
|
644
|
-
} =
|
|
743
|
+
} = ConfigurationPlatformValidator.getIntegrationByLevelId().validate(
|
|
645
744
|
{
|
|
646
745
|
id,
|
|
647
746
|
level,
|
|
@@ -652,9 +751,8 @@ class Configuration {
|
|
|
652
751
|
if (warrning) {
|
|
653
752
|
Logger({
|
|
654
753
|
level: "WARN",
|
|
655
|
-
message:
|
|
754
|
+
message: `Parameter Validation warrnings for platform > Configuration > getIntegrationByLevelId \n ${warrning}`,
|
|
656
755
|
});
|
|
657
|
-
Logger({ level: "WARN", message: warrning });
|
|
658
756
|
}
|
|
659
757
|
|
|
660
758
|
const query_params = {};
|
|
@@ -667,12 +765,18 @@ class Configuration {
|
|
|
667
765
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
|
|
668
766
|
query_params,
|
|
669
767
|
undefined,
|
|
670
|
-
xHeaders
|
|
768
|
+
xHeaders,
|
|
769
|
+
{ headers }
|
|
671
770
|
);
|
|
672
771
|
|
|
772
|
+
let responseData = response;
|
|
773
|
+
if (headers) {
|
|
774
|
+
responseData = response[0];
|
|
775
|
+
}
|
|
776
|
+
|
|
673
777
|
const {
|
|
674
778
|
error: res_error,
|
|
675
|
-
} =
|
|
779
|
+
} = ConfigurationPlatformModel.IntegrationLevel().validate(responseData, {
|
|
676
780
|
abortEarly: false,
|
|
677
781
|
allowUnknown: false,
|
|
678
782
|
});
|
|
@@ -680,30 +784,32 @@ class Configuration {
|
|
|
680
784
|
if (res_error) {
|
|
681
785
|
Logger({
|
|
682
786
|
level: "WARN",
|
|
683
|
-
message:
|
|
787
|
+
message: `Response Validation Warnnings for platform > Configuration > getIntegrationByLevelId \n ${res_error}`,
|
|
684
788
|
});
|
|
685
|
-
Logger({ level: "WARN", message: res_error });
|
|
686
789
|
}
|
|
687
790
|
|
|
688
791
|
return response;
|
|
689
792
|
}
|
|
690
793
|
|
|
691
794
|
/**
|
|
692
|
-
* @param {
|
|
693
|
-
*
|
|
694
|
-
*
|
|
695
|
-
* @param {
|
|
696
|
-
*
|
|
697
|
-
*
|
|
698
|
-
*
|
|
699
|
-
* @
|
|
795
|
+
* @param {ConfigurationPlatformValidator.GetIntegrationLevelConfigParam} arg
|
|
796
|
+
* - Arg object
|
|
797
|
+
*
|
|
798
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
799
|
+
* @returns {Promise<ConfigurationPlatformModel.IntegrationConfigResponse>}
|
|
800
|
+
* - Success response
|
|
801
|
+
*
|
|
802
|
+
* @name getIntegrationLevelConfig
|
|
700
803
|
* @summary: Get integration level config
|
|
701
|
-
* @description: Use this API to get the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc.
|
|
804
|
+
* @description: Use this API to get the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getIntegrationLevelConfig/).
|
|
702
805
|
*/
|
|
703
|
-
async getIntegrationLevelConfig(
|
|
806
|
+
async getIntegrationLevelConfig(
|
|
807
|
+
{ id, level, opted, checkPermission } = {},
|
|
808
|
+
{ headers } = { headers: false }
|
|
809
|
+
) {
|
|
704
810
|
const {
|
|
705
811
|
error,
|
|
706
|
-
} =
|
|
812
|
+
} = ConfigurationPlatformValidator.getIntegrationLevelConfig().validate(
|
|
707
813
|
{
|
|
708
814
|
id,
|
|
709
815
|
level,
|
|
@@ -719,7 +825,7 @@ class Configuration {
|
|
|
719
825
|
// Showing warrnings if extra unknown parameters are found
|
|
720
826
|
const {
|
|
721
827
|
error: warrning,
|
|
722
|
-
} =
|
|
828
|
+
} = ConfigurationPlatformValidator.getIntegrationLevelConfig().validate(
|
|
723
829
|
{
|
|
724
830
|
id,
|
|
725
831
|
level,
|
|
@@ -731,9 +837,8 @@ class Configuration {
|
|
|
731
837
|
if (warrning) {
|
|
732
838
|
Logger({
|
|
733
839
|
level: "WARN",
|
|
734
|
-
message:
|
|
840
|
+
message: `Parameter Validation warrnings for platform > Configuration > getIntegrationLevelConfig \n ${warrning}`,
|
|
735
841
|
});
|
|
736
|
-
Logger({ level: "WARN", message: warrning });
|
|
737
842
|
}
|
|
738
843
|
|
|
739
844
|
const query_params = {};
|
|
@@ -748,40 +853,50 @@ class Configuration {
|
|
|
748
853
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
|
|
749
854
|
query_params,
|
|
750
855
|
undefined,
|
|
751
|
-
xHeaders
|
|
856
|
+
xHeaders,
|
|
857
|
+
{ headers }
|
|
752
858
|
);
|
|
753
859
|
|
|
860
|
+
let responseData = response;
|
|
861
|
+
if (headers) {
|
|
862
|
+
responseData = response[0];
|
|
863
|
+
}
|
|
864
|
+
|
|
754
865
|
const {
|
|
755
866
|
error: res_error,
|
|
756
|
-
} =
|
|
757
|
-
|
|
758
|
-
allowUnknown: false
|
|
759
|
-
|
|
867
|
+
} = ConfigurationPlatformModel.IntegrationConfigResponse().validate(
|
|
868
|
+
responseData,
|
|
869
|
+
{ abortEarly: false, allowUnknown: false }
|
|
870
|
+
);
|
|
760
871
|
|
|
761
872
|
if (res_error) {
|
|
762
873
|
Logger({
|
|
763
874
|
level: "WARN",
|
|
764
|
-
message:
|
|
875
|
+
message: `Response Validation Warnnings for platform > Configuration > getIntegrationLevelConfig \n ${res_error}`,
|
|
765
876
|
});
|
|
766
|
-
Logger({ level: "WARN", message: res_error });
|
|
767
877
|
}
|
|
768
878
|
|
|
769
879
|
return response;
|
|
770
880
|
}
|
|
771
881
|
|
|
772
882
|
/**
|
|
773
|
-
* @param {
|
|
774
|
-
*
|
|
775
|
-
*
|
|
776
|
-
* @param {
|
|
777
|
-
* @returns {Promise<OptedStoreIntegration>} -
|
|
883
|
+
* @param {ConfigurationPlatformValidator.GetLevelActiveIntegrationsParam} arg
|
|
884
|
+
* - Arg object
|
|
885
|
+
*
|
|
886
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
887
|
+
* @returns {Promise<ConfigurationPlatformModel.OptedStoreIntegration>} -
|
|
888
|
+
* Success response
|
|
889
|
+
* @name getLevelActiveIntegrations
|
|
778
890
|
* @summary: Check active integration at store
|
|
779
|
-
* @description: Use this API to check if a store is already opted-in for any integration
|
|
891
|
+
* @description: Use this API to check if a store is already opted-in for any integration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getLevelActiveIntegrations/).
|
|
780
892
|
*/
|
|
781
|
-
async getLevelActiveIntegrations(
|
|
893
|
+
async getLevelActiveIntegrations(
|
|
894
|
+
{ id, level, uid } = {},
|
|
895
|
+
{ headers } = { headers: false }
|
|
896
|
+
) {
|
|
782
897
|
const {
|
|
783
898
|
error,
|
|
784
|
-
} =
|
|
899
|
+
} = ConfigurationPlatformValidator.getLevelActiveIntegrations().validate(
|
|
785
900
|
{
|
|
786
901
|
id,
|
|
787
902
|
level,
|
|
@@ -796,7 +911,7 @@ class Configuration {
|
|
|
796
911
|
// Showing warrnings if extra unknown parameters are found
|
|
797
912
|
const {
|
|
798
913
|
error: warrning,
|
|
799
|
-
} =
|
|
914
|
+
} = ConfigurationPlatformValidator.getLevelActiveIntegrations().validate(
|
|
800
915
|
{
|
|
801
916
|
id,
|
|
802
917
|
level,
|
|
@@ -807,10 +922,8 @@ class Configuration {
|
|
|
807
922
|
if (warrning) {
|
|
808
923
|
Logger({
|
|
809
924
|
level: "WARN",
|
|
810
|
-
message:
|
|
811
|
-
"Parameter Validation warrnings for getLevelActiveIntegrations",
|
|
925
|
+
message: `Parameter Validation warrnings for platform > Configuration > getLevelActiveIntegrations \n ${warrning}`,
|
|
812
926
|
});
|
|
813
|
-
Logger({ level: "WARN", message: warrning });
|
|
814
927
|
}
|
|
815
928
|
|
|
816
929
|
const query_params = {};
|
|
@@ -823,38 +936,51 @@ class Configuration {
|
|
|
823
936
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/check/configuration/${id}/${level}/${uid}`,
|
|
824
937
|
query_params,
|
|
825
938
|
undefined,
|
|
826
|
-
xHeaders
|
|
939
|
+
xHeaders,
|
|
940
|
+
{ headers }
|
|
827
941
|
);
|
|
828
942
|
|
|
943
|
+
let responseData = response;
|
|
944
|
+
if (headers) {
|
|
945
|
+
responseData = response[0];
|
|
946
|
+
}
|
|
947
|
+
|
|
829
948
|
const {
|
|
830
949
|
error: res_error,
|
|
831
|
-
} =
|
|
832
|
-
|
|
833
|
-
allowUnknown: false
|
|
834
|
-
|
|
950
|
+
} = ConfigurationPlatformModel.OptedStoreIntegration().validate(
|
|
951
|
+
responseData,
|
|
952
|
+
{ abortEarly: false, allowUnknown: false }
|
|
953
|
+
);
|
|
835
954
|
|
|
836
955
|
if (res_error) {
|
|
837
956
|
Logger({
|
|
838
957
|
level: "WARN",
|
|
839
|
-
message:
|
|
958
|
+
message: `Response Validation Warnnings for platform > Configuration > getLevelActiveIntegrations \n ${res_error}`,
|
|
840
959
|
});
|
|
841
|
-
Logger({ level: "WARN", message: res_error });
|
|
842
960
|
}
|
|
843
961
|
|
|
844
962
|
return response;
|
|
845
963
|
}
|
|
846
964
|
|
|
847
965
|
/**
|
|
848
|
-
* @param {
|
|
849
|
-
*
|
|
850
|
-
*
|
|
966
|
+
* @param {ConfigurationPlatformValidator.GetOtherSellerApplicationByIdParam} arg
|
|
967
|
+
* - Arg object
|
|
968
|
+
*
|
|
969
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
970
|
+
* @returns {Promise<ConfigurationPlatformModel.OptedApplicationResponse>}
|
|
971
|
+
* - Success response
|
|
972
|
+
*
|
|
973
|
+
* @name getOtherSellerApplicationById
|
|
851
974
|
* @summary: Get other seller's sales channel by ID
|
|
852
|
-
* @description: Use application ID to fetch details of a seller application that was not created within the current company. but has opted for the current company's inventory
|
|
975
|
+
* @description: Use application ID to fetch details of a seller application that was not created within the current company. but has opted for the current company's inventory - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOtherSellerApplicationById/).
|
|
853
976
|
*/
|
|
854
|
-
async getOtherSellerApplicationById(
|
|
977
|
+
async getOtherSellerApplicationById(
|
|
978
|
+
{ id } = {},
|
|
979
|
+
{ headers } = { headers: false }
|
|
980
|
+
) {
|
|
855
981
|
const {
|
|
856
982
|
error,
|
|
857
|
-
} =
|
|
983
|
+
} = ConfigurationPlatformValidator.getOtherSellerApplicationById().validate(
|
|
858
984
|
{
|
|
859
985
|
id,
|
|
860
986
|
},
|
|
@@ -867,7 +993,7 @@ class Configuration {
|
|
|
867
993
|
// Showing warrnings if extra unknown parameters are found
|
|
868
994
|
const {
|
|
869
995
|
error: warrning,
|
|
870
|
-
} =
|
|
996
|
+
} = ConfigurationPlatformValidator.getOtherSellerApplicationById().validate(
|
|
871
997
|
{
|
|
872
998
|
id,
|
|
873
999
|
},
|
|
@@ -876,10 +1002,8 @@ class Configuration {
|
|
|
876
1002
|
if (warrning) {
|
|
877
1003
|
Logger({
|
|
878
1004
|
level: "WARN",
|
|
879
|
-
message:
|
|
880
|
-
"Parameter Validation warrnings for getOtherSellerApplicationById",
|
|
1005
|
+
message: `Parameter Validation warrnings for platform > Configuration > getOtherSellerApplicationById \n ${warrning}`,
|
|
881
1006
|
});
|
|
882
|
-
Logger({ level: "WARN", message: warrning });
|
|
883
1007
|
}
|
|
884
1008
|
|
|
885
1009
|
const query_params = {};
|
|
@@ -892,42 +1016,50 @@ class Configuration {
|
|
|
892
1016
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}`,
|
|
893
1017
|
query_params,
|
|
894
1018
|
undefined,
|
|
895
|
-
xHeaders
|
|
1019
|
+
xHeaders,
|
|
1020
|
+
{ headers }
|
|
896
1021
|
);
|
|
897
1022
|
|
|
1023
|
+
let responseData = response;
|
|
1024
|
+
if (headers) {
|
|
1025
|
+
responseData = response[0];
|
|
1026
|
+
}
|
|
1027
|
+
|
|
898
1028
|
const {
|
|
899
1029
|
error: res_error,
|
|
900
|
-
} =
|
|
901
|
-
|
|
902
|
-
allowUnknown: false
|
|
903
|
-
|
|
1030
|
+
} = ConfigurationPlatformModel.OptedApplicationResponse().validate(
|
|
1031
|
+
responseData,
|
|
1032
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1033
|
+
);
|
|
904
1034
|
|
|
905
1035
|
if (res_error) {
|
|
906
1036
|
Logger({
|
|
907
1037
|
level: "WARN",
|
|
908
|
-
message:
|
|
909
|
-
"Response Validation Warnnings for getOtherSellerApplicationById",
|
|
1038
|
+
message: `Response Validation Warnnings for platform > Configuration > getOtherSellerApplicationById \n ${res_error}`,
|
|
910
1039
|
});
|
|
911
|
-
Logger({ level: "WARN", message: res_error });
|
|
912
1040
|
}
|
|
913
1041
|
|
|
914
1042
|
return response;
|
|
915
1043
|
}
|
|
916
1044
|
|
|
917
1045
|
/**
|
|
918
|
-
* @param {
|
|
919
|
-
*
|
|
920
|
-
*
|
|
921
|
-
* @param {
|
|
922
|
-
*
|
|
923
|
-
*
|
|
1046
|
+
* @param {ConfigurationPlatformValidator.GetOtherSellerApplicationsParam} arg
|
|
1047
|
+
* - Arg object
|
|
1048
|
+
*
|
|
1049
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1050
|
+
* @returns {Promise<ConfigurationPlatformModel.OtherSellerApplications>} -
|
|
1051
|
+
* Success response
|
|
1052
|
+
* @name getOtherSellerApplications
|
|
924
1053
|
* @summary: Get other seller sales channels
|
|
925
|
-
* @description: Use this API to fetch all other seller applications that were not created within the current company. but have opted for the current company's inventory
|
|
1054
|
+
* @description: Use this API to fetch all other seller applications that were not created within the current company. but have opted for the current company's inventory - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOtherSellerApplications/).
|
|
926
1055
|
*/
|
|
927
|
-
async getOtherSellerApplications(
|
|
1056
|
+
async getOtherSellerApplications(
|
|
1057
|
+
{ pageNo, pageSize } = {},
|
|
1058
|
+
{ headers } = { headers: false }
|
|
1059
|
+
) {
|
|
928
1060
|
const {
|
|
929
1061
|
error,
|
|
930
|
-
} =
|
|
1062
|
+
} = ConfigurationPlatformValidator.getOtherSellerApplications().validate(
|
|
931
1063
|
{
|
|
932
1064
|
pageNo,
|
|
933
1065
|
pageSize,
|
|
@@ -941,7 +1073,7 @@ class Configuration {
|
|
|
941
1073
|
// Showing warrnings if extra unknown parameters are found
|
|
942
1074
|
const {
|
|
943
1075
|
error: warrning,
|
|
944
|
-
} =
|
|
1076
|
+
} = ConfigurationPlatformValidator.getOtherSellerApplications().validate(
|
|
945
1077
|
{
|
|
946
1078
|
pageNo,
|
|
947
1079
|
pageSize,
|
|
@@ -951,10 +1083,8 @@ class Configuration {
|
|
|
951
1083
|
if (warrning) {
|
|
952
1084
|
Logger({
|
|
953
1085
|
level: "WARN",
|
|
954
|
-
message:
|
|
955
|
-
"Parameter Validation warrnings for getOtherSellerApplications",
|
|
1086
|
+
message: `Parameter Validation warrnings for platform > Configuration > getOtherSellerApplications \n ${warrning}`,
|
|
956
1087
|
});
|
|
957
|
-
Logger({ level: "WARN", message: warrning });
|
|
958
1088
|
}
|
|
959
1089
|
|
|
960
1090
|
const query_params = {};
|
|
@@ -969,22 +1099,27 @@ class Configuration {
|
|
|
969
1099
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/`,
|
|
970
1100
|
query_params,
|
|
971
1101
|
undefined,
|
|
972
|
-
xHeaders
|
|
1102
|
+
xHeaders,
|
|
1103
|
+
{ headers }
|
|
973
1104
|
);
|
|
974
1105
|
|
|
1106
|
+
let responseData = response;
|
|
1107
|
+
if (headers) {
|
|
1108
|
+
responseData = response[0];
|
|
1109
|
+
}
|
|
1110
|
+
|
|
975
1111
|
const {
|
|
976
1112
|
error: res_error,
|
|
977
|
-
} =
|
|
978
|
-
|
|
979
|
-
allowUnknown: false
|
|
980
|
-
|
|
1113
|
+
} = ConfigurationPlatformModel.OtherSellerApplications().validate(
|
|
1114
|
+
responseData,
|
|
1115
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1116
|
+
);
|
|
981
1117
|
|
|
982
1118
|
if (res_error) {
|
|
983
1119
|
Logger({
|
|
984
1120
|
level: "WARN",
|
|
985
|
-
message:
|
|
1121
|
+
message: `Response Validation Warnnings for platform > Configuration > getOtherSellerApplications \n ${res_error}`,
|
|
986
1122
|
});
|
|
987
|
-
Logger({ level: "WARN", message: res_error });
|
|
988
1123
|
}
|
|
989
1124
|
|
|
990
1125
|
return response;
|
|
@@ -994,6 +1129,7 @@ class Configuration {
|
|
|
994
1129
|
* @param {Object} arg - Arg object.
|
|
995
1130
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
996
1131
|
* page. Default value is 10.
|
|
1132
|
+
* @returns {Paginator<ConfigurationPlatformModel.OtherSellerApplications>}
|
|
997
1133
|
* @summary: Get other seller sales channels
|
|
998
1134
|
* @description: Use this API to fetch all other seller applications that were not created within the current company. but have opted for the current company's inventory
|
|
999
1135
|
*/
|
|
@@ -1018,19 +1154,22 @@ class Configuration {
|
|
|
1018
1154
|
}
|
|
1019
1155
|
|
|
1020
1156
|
/**
|
|
1021
|
-
* @param {
|
|
1022
|
-
* @param {
|
|
1023
|
-
* @
|
|
1024
|
-
*
|
|
1025
|
-
*
|
|
1026
|
-
* @
|
|
1027
|
-
* page. Default value is 10.
|
|
1028
|
-
* @returns {Promise<GetIntegrationsOptInsResponse>} - Success response
|
|
1157
|
+
* @param {ConfigurationPlatformValidator.GetSelectedOptInsParam} arg - Arg object
|
|
1158
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1159
|
+
* @returns {Promise<ConfigurationPlatformModel.GetIntegrationsOptInsResponse>}
|
|
1160
|
+
* - Success response
|
|
1161
|
+
*
|
|
1162
|
+
* @name getSelectedOptIns
|
|
1029
1163
|
* @summary: Get company/store level integration opt-ins
|
|
1030
|
-
* @description: Use this API to get the store-level/company-level integrations configured in a company
|
|
1164
|
+
* @description: Use this API to get the store-level/company-level integrations configured in a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getSelectedOptIns/).
|
|
1031
1165
|
*/
|
|
1032
|
-
async getSelectedOptIns(
|
|
1033
|
-
|
|
1166
|
+
async getSelectedOptIns(
|
|
1167
|
+
{ level, uid, pageNo, pageSize } = {},
|
|
1168
|
+
{ headers } = { headers: false }
|
|
1169
|
+
) {
|
|
1170
|
+
const {
|
|
1171
|
+
error,
|
|
1172
|
+
} = ConfigurationPlatformValidator.getSelectedOptIns().validate(
|
|
1034
1173
|
{
|
|
1035
1174
|
level,
|
|
1036
1175
|
uid,
|
|
@@ -1046,7 +1185,7 @@ class Configuration {
|
|
|
1046
1185
|
// Showing warrnings if extra unknown parameters are found
|
|
1047
1186
|
const {
|
|
1048
1187
|
error: warrning,
|
|
1049
|
-
} =
|
|
1188
|
+
} = ConfigurationPlatformValidator.getSelectedOptIns().validate(
|
|
1050
1189
|
{
|
|
1051
1190
|
level,
|
|
1052
1191
|
uid,
|
|
@@ -1058,9 +1197,8 @@ class Configuration {
|
|
|
1058
1197
|
if (warrning) {
|
|
1059
1198
|
Logger({
|
|
1060
1199
|
level: "WARN",
|
|
1061
|
-
message:
|
|
1200
|
+
message: `Parameter Validation warrnings for platform > Configuration > getSelectedOptIns \n ${warrning}`,
|
|
1062
1201
|
});
|
|
1063
|
-
Logger({ level: "WARN", message: warrning });
|
|
1064
1202
|
}
|
|
1065
1203
|
|
|
1066
1204
|
const query_params = {};
|
|
@@ -1075,22 +1213,27 @@ class Configuration {
|
|
|
1075
1213
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/selected/${level}/${uid}`,
|
|
1076
1214
|
query_params,
|
|
1077
1215
|
undefined,
|
|
1078
|
-
xHeaders
|
|
1216
|
+
xHeaders,
|
|
1217
|
+
{ headers }
|
|
1079
1218
|
);
|
|
1080
1219
|
|
|
1220
|
+
let responseData = response;
|
|
1221
|
+
if (headers) {
|
|
1222
|
+
responseData = response[0];
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1081
1225
|
const {
|
|
1082
1226
|
error: res_error,
|
|
1083
|
-
} =
|
|
1084
|
-
|
|
1085
|
-
allowUnknown: false
|
|
1086
|
-
|
|
1227
|
+
} = ConfigurationPlatformModel.GetIntegrationsOptInsResponse().validate(
|
|
1228
|
+
responseData,
|
|
1229
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1230
|
+
);
|
|
1087
1231
|
|
|
1088
1232
|
if (res_error) {
|
|
1089
1233
|
Logger({
|
|
1090
1234
|
level: "WARN",
|
|
1091
|
-
message:
|
|
1235
|
+
message: `Response Validation Warnnings for platform > Configuration > getSelectedOptIns \n ${res_error}`,
|
|
1092
1236
|
});
|
|
1093
|
-
Logger({ level: "WARN", message: res_error });
|
|
1094
1237
|
}
|
|
1095
1238
|
|
|
1096
1239
|
return response;
|
|
@@ -1098,17 +1241,52 @@ class Configuration {
|
|
|
1098
1241
|
|
|
1099
1242
|
/**
|
|
1100
1243
|
* @param {Object} arg - Arg object.
|
|
1101
|
-
* @param {
|
|
1102
|
-
*
|
|
1244
|
+
* @param {string} arg.level - Store or company
|
|
1245
|
+
* @param {number} arg.uid - Unique identifier of the selected integration level.
|
|
1103
1246
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
1104
1247
|
* page. Default value is 10.
|
|
1105
|
-
* @
|
|
1106
|
-
* @
|
|
1248
|
+
* @returns {Paginator<ConfigurationPlatformModel.GetIntegrationsOptInsResponse>}
|
|
1249
|
+
* @summary: Get company/store level integration opt-ins
|
|
1250
|
+
* @description: Use this API to get the store-level/company-level integrations configured in a company
|
|
1251
|
+
*/
|
|
1252
|
+
getSelectedOptInsPaginator({ level, uid, pageSize } = {}) {
|
|
1253
|
+
const paginator = new Paginator();
|
|
1254
|
+
const callback = async () => {
|
|
1255
|
+
const pageId = paginator.nextId;
|
|
1256
|
+
const pageNo = paginator.pageNo;
|
|
1257
|
+
const pageType = "number";
|
|
1258
|
+
const data = await this.getSelectedOptIns({
|
|
1259
|
+
level: level,
|
|
1260
|
+
uid: uid,
|
|
1261
|
+
pageNo: pageNo,
|
|
1262
|
+
pageSize: pageSize,
|
|
1263
|
+
});
|
|
1264
|
+
paginator.setPaginator({
|
|
1265
|
+
hasNext: data.page.has_next ? true : false,
|
|
1266
|
+
nextId: data.page.next_id,
|
|
1267
|
+
});
|
|
1268
|
+
return data;
|
|
1269
|
+
};
|
|
1270
|
+
paginator.setCallback(callback.bind(this));
|
|
1271
|
+
return paginator;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* @param {ConfigurationPlatformValidator.GetStoreByBrandsParam} arg - Arg object
|
|
1276
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1277
|
+
* @returns {Promise<ConfigurationPlatformModel.StoreByBrandsResponse>} -
|
|
1278
|
+
* Success response
|
|
1279
|
+
* @name getStoreByBrands
|
|
1107
1280
|
* @summary: Get stores by brand uids for the current company
|
|
1108
|
-
* @description: Use this API to get a list of selling locations (stores) by the brands they deal. Store has information about store name, store type, store code, store address, and company detail.
|
|
1281
|
+
* @description: Use this API to get a list of selling locations (stores) by the brands they deal. Store has information about store name, store type, store code, store address, and company detail. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getStoreByBrands/).
|
|
1109
1282
|
*/
|
|
1110
|
-
async getStoreByBrands(
|
|
1111
|
-
|
|
1283
|
+
async getStoreByBrands(
|
|
1284
|
+
{ body, pageNo, pageSize } = {},
|
|
1285
|
+
{ headers } = { headers: false }
|
|
1286
|
+
) {
|
|
1287
|
+
const {
|
|
1288
|
+
error,
|
|
1289
|
+
} = ConfigurationPlatformValidator.getStoreByBrands().validate(
|
|
1112
1290
|
{
|
|
1113
1291
|
body,
|
|
1114
1292
|
pageNo,
|
|
@@ -1123,7 +1301,7 @@ class Configuration {
|
|
|
1123
1301
|
// Showing warrnings if extra unknown parameters are found
|
|
1124
1302
|
const {
|
|
1125
1303
|
error: warrning,
|
|
1126
|
-
} =
|
|
1304
|
+
} = ConfigurationPlatformValidator.getStoreByBrands().validate(
|
|
1127
1305
|
{
|
|
1128
1306
|
body,
|
|
1129
1307
|
pageNo,
|
|
@@ -1134,9 +1312,8 @@ class Configuration {
|
|
|
1134
1312
|
if (warrning) {
|
|
1135
1313
|
Logger({
|
|
1136
1314
|
level: "WARN",
|
|
1137
|
-
message:
|
|
1315
|
+
message: `Parameter Validation warrnings for platform > Configuration > getStoreByBrands \n ${warrning}`,
|
|
1138
1316
|
});
|
|
1139
|
-
Logger({ level: "WARN", message: warrning });
|
|
1140
1317
|
}
|
|
1141
1318
|
|
|
1142
1319
|
const query_params = {};
|
|
@@ -1151,22 +1328,27 @@ class Configuration {
|
|
|
1151
1328
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/stores-by-brands`,
|
|
1152
1329
|
query_params,
|
|
1153
1330
|
body,
|
|
1154
|
-
xHeaders
|
|
1331
|
+
xHeaders,
|
|
1332
|
+
{ headers }
|
|
1155
1333
|
);
|
|
1156
1334
|
|
|
1335
|
+
let responseData = response;
|
|
1336
|
+
if (headers) {
|
|
1337
|
+
responseData = response[0];
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1157
1340
|
const {
|
|
1158
1341
|
error: res_error,
|
|
1159
|
-
} =
|
|
1160
|
-
|
|
1161
|
-
allowUnknown: false
|
|
1162
|
-
|
|
1342
|
+
} = ConfigurationPlatformModel.StoreByBrandsResponse().validate(
|
|
1343
|
+
responseData,
|
|
1344
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1345
|
+
);
|
|
1163
1346
|
|
|
1164
1347
|
if (res_error) {
|
|
1165
1348
|
Logger({
|
|
1166
1349
|
level: "WARN",
|
|
1167
|
-
message:
|
|
1350
|
+
message: `Response Validation Warnnings for platform > Configuration > getStoreByBrands \n ${res_error}`,
|
|
1168
1351
|
});
|
|
1169
|
-
Logger({ level: "WARN", message: res_error });
|
|
1170
1352
|
}
|
|
1171
1353
|
|
|
1172
1354
|
return response;
|
|
@@ -1176,7 +1358,8 @@ class Configuration {
|
|
|
1176
1358
|
* @param {Object} arg - Arg object.
|
|
1177
1359
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
1178
1360
|
* page. Default value is 10.
|
|
1179
|
-
* @param {StoreByBrandsRequest} arg.body
|
|
1361
|
+
* @param {ConfigurationPlatformModel.StoreByBrandsRequest} arg.body
|
|
1362
|
+
* @returns {Paginator<ConfigurationPlatformModel.StoreByBrandsResponse>}
|
|
1180
1363
|
* @summary: Get stores by brand uids for the current company
|
|
1181
1364
|
* @description: Use this API to get a list of selling locations (stores) by the brands they deal. Store has information about store name, store type, store code, store address, and company detail.
|
|
1182
1365
|
*/
|
|
@@ -1202,16 +1385,21 @@ class Configuration {
|
|
|
1202
1385
|
}
|
|
1203
1386
|
|
|
1204
1387
|
/**
|
|
1205
|
-
* @param {
|
|
1206
|
-
* @param {
|
|
1207
|
-
*
|
|
1208
|
-
*
|
|
1209
|
-
* @
|
|
1388
|
+
* @param {ConfigurationPlatformValidator.OptOutFromApplicationParam} arg - Arg object
|
|
1389
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1390
|
+
* @returns {Promise<ConfigurationPlatformModel.SuccessMessageResponse>} -
|
|
1391
|
+
* Success response
|
|
1392
|
+
* @name optOutFromApplication
|
|
1210
1393
|
* @summary: Opt-out company or store from other seller application
|
|
1211
|
-
* @description: Use this API to opt-out your company or store from other seller application. The specific seller application will no longer fetch inventory from your company or store.
|
|
1394
|
+
* @description: Use this API to opt-out your company or store from other seller application. The specific seller application will no longer fetch inventory from your company or store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/optOutFromApplication/).
|
|
1212
1395
|
*/
|
|
1213
|
-
async optOutFromApplication(
|
|
1214
|
-
|
|
1396
|
+
async optOutFromApplication(
|
|
1397
|
+
{ id, body } = {},
|
|
1398
|
+
{ headers } = { headers: false }
|
|
1399
|
+
) {
|
|
1400
|
+
const {
|
|
1401
|
+
error,
|
|
1402
|
+
} = ConfigurationPlatformValidator.optOutFromApplication().validate(
|
|
1215
1403
|
{
|
|
1216
1404
|
id,
|
|
1217
1405
|
body,
|
|
@@ -1225,7 +1413,7 @@ class Configuration {
|
|
|
1225
1413
|
// Showing warrnings if extra unknown parameters are found
|
|
1226
1414
|
const {
|
|
1227
1415
|
error: warrning,
|
|
1228
|
-
} =
|
|
1416
|
+
} = ConfigurationPlatformValidator.optOutFromApplication().validate(
|
|
1229
1417
|
{
|
|
1230
1418
|
id,
|
|
1231
1419
|
body,
|
|
@@ -1235,9 +1423,8 @@ class Configuration {
|
|
|
1235
1423
|
if (warrning) {
|
|
1236
1424
|
Logger({
|
|
1237
1425
|
level: "WARN",
|
|
1238
|
-
message:
|
|
1426
|
+
message: `Parameter Validation warrnings for platform > Configuration > optOutFromApplication \n ${warrning}`,
|
|
1239
1427
|
});
|
|
1240
|
-
Logger({ level: "WARN", message: warrning });
|
|
1241
1428
|
}
|
|
1242
1429
|
|
|
1243
1430
|
const query_params = {};
|
|
@@ -1250,38 +1437,49 @@ class Configuration {
|
|
|
1250
1437
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}/opt_out`,
|
|
1251
1438
|
query_params,
|
|
1252
1439
|
body,
|
|
1253
|
-
xHeaders
|
|
1440
|
+
xHeaders,
|
|
1441
|
+
{ headers }
|
|
1254
1442
|
);
|
|
1255
1443
|
|
|
1444
|
+
let responseData = response;
|
|
1445
|
+
if (headers) {
|
|
1446
|
+
responseData = response[0];
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1256
1449
|
const {
|
|
1257
1450
|
error: res_error,
|
|
1258
|
-
} =
|
|
1259
|
-
|
|
1260
|
-
allowUnknown: false
|
|
1261
|
-
|
|
1451
|
+
} = ConfigurationPlatformModel.SuccessMessageResponse().validate(
|
|
1452
|
+
responseData,
|
|
1453
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1454
|
+
);
|
|
1262
1455
|
|
|
1263
1456
|
if (res_error) {
|
|
1264
1457
|
Logger({
|
|
1265
1458
|
level: "WARN",
|
|
1266
|
-
message:
|
|
1459
|
+
message: `Response Validation Warnnings for platform > Configuration > optOutFromApplication \n ${res_error}`,
|
|
1267
1460
|
});
|
|
1268
|
-
Logger({ level: "WARN", message: res_error });
|
|
1269
1461
|
}
|
|
1270
1462
|
|
|
1271
1463
|
return response;
|
|
1272
1464
|
}
|
|
1273
1465
|
|
|
1274
1466
|
/**
|
|
1275
|
-
* @param {
|
|
1276
|
-
*
|
|
1277
|
-
*
|
|
1278
|
-
* @param {
|
|
1279
|
-
* @returns {Promise<IntegrationLevel>} - Success response
|
|
1467
|
+
* @param {ConfigurationPlatformValidator.UpdateLevelIntegrationParam} arg
|
|
1468
|
+
* - Arg object
|
|
1469
|
+
*
|
|
1470
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1471
|
+
* @returns {Promise<ConfigurationPlatformModel.IntegrationLevel>} - Success response
|
|
1472
|
+
* @name updateLevelIntegration
|
|
1280
1473
|
* @summary: Update a store level integration you opted
|
|
1281
|
-
* @description: Use this API to update the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. at a particular level (store/company).
|
|
1474
|
+
* @description: Use this API to update the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. at a particular level (store/company). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateLevelIntegration/).
|
|
1282
1475
|
*/
|
|
1283
|
-
async updateLevelIntegration(
|
|
1284
|
-
|
|
1476
|
+
async updateLevelIntegration(
|
|
1477
|
+
{ id, level, body } = {},
|
|
1478
|
+
{ headers } = { headers: false }
|
|
1479
|
+
) {
|
|
1480
|
+
const {
|
|
1481
|
+
error,
|
|
1482
|
+
} = ConfigurationPlatformValidator.updateLevelIntegration().validate(
|
|
1285
1483
|
{
|
|
1286
1484
|
id,
|
|
1287
1485
|
level,
|
|
@@ -1296,7 +1494,7 @@ class Configuration {
|
|
|
1296
1494
|
// Showing warrnings if extra unknown parameters are found
|
|
1297
1495
|
const {
|
|
1298
1496
|
error: warrning,
|
|
1299
|
-
} =
|
|
1497
|
+
} = ConfigurationPlatformValidator.updateLevelIntegration().validate(
|
|
1300
1498
|
{
|
|
1301
1499
|
id,
|
|
1302
1500
|
level,
|
|
@@ -1307,9 +1505,8 @@ class Configuration {
|
|
|
1307
1505
|
if (warrning) {
|
|
1308
1506
|
Logger({
|
|
1309
1507
|
level: "WARN",
|
|
1310
|
-
message:
|
|
1508
|
+
message: `Parameter Validation warrnings for platform > Configuration > updateLevelIntegration \n ${warrning}`,
|
|
1311
1509
|
});
|
|
1312
|
-
Logger({ level: "WARN", message: warrning });
|
|
1313
1510
|
}
|
|
1314
1511
|
|
|
1315
1512
|
const query_params = {};
|
|
@@ -1322,12 +1519,18 @@ class Configuration {
|
|
|
1322
1519
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
|
|
1323
1520
|
query_params,
|
|
1324
1521
|
body,
|
|
1325
|
-
xHeaders
|
|
1522
|
+
xHeaders,
|
|
1523
|
+
{ headers }
|
|
1326
1524
|
);
|
|
1327
1525
|
|
|
1526
|
+
let responseData = response;
|
|
1527
|
+
if (headers) {
|
|
1528
|
+
responseData = response[0];
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1328
1531
|
const {
|
|
1329
1532
|
error: res_error,
|
|
1330
|
-
} =
|
|
1533
|
+
} = ConfigurationPlatformModel.IntegrationLevel().validate(responseData, {
|
|
1331
1534
|
abortEarly: false,
|
|
1332
1535
|
allowUnknown: false,
|
|
1333
1536
|
});
|
|
@@ -1335,28 +1538,30 @@ class Configuration {
|
|
|
1335
1538
|
if (res_error) {
|
|
1336
1539
|
Logger({
|
|
1337
1540
|
level: "WARN",
|
|
1338
|
-
message:
|
|
1541
|
+
message: `Response Validation Warnnings for platform > Configuration > updateLevelIntegration \n ${res_error}`,
|
|
1339
1542
|
});
|
|
1340
|
-
Logger({ level: "WARN", message: res_error });
|
|
1341
1543
|
}
|
|
1342
1544
|
|
|
1343
1545
|
return response;
|
|
1344
1546
|
}
|
|
1345
1547
|
|
|
1346
1548
|
/**
|
|
1347
|
-
* @param {
|
|
1348
|
-
*
|
|
1349
|
-
*
|
|
1350
|
-
* @param {
|
|
1351
|
-
* @
|
|
1352
|
-
* @
|
|
1549
|
+
* @param {ConfigurationPlatformValidator.UpdateLevelUidIntegrationParam} arg
|
|
1550
|
+
* - Arg object
|
|
1551
|
+
*
|
|
1552
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1553
|
+
* @returns {Promise<ConfigurationPlatformModel.IntegrationLevel>} - Success response
|
|
1554
|
+
* @name updateLevelUidIntegration
|
|
1353
1555
|
* @summary: Update integration level by store UID
|
|
1354
|
-
* @description: Update the level of integration by store UID
|
|
1556
|
+
* @description: Update the level of integration by store UID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateLevelUidIntegration/).
|
|
1355
1557
|
*/
|
|
1356
|
-
async updateLevelUidIntegration(
|
|
1558
|
+
async updateLevelUidIntegration(
|
|
1559
|
+
{ id, level, uid, body } = {},
|
|
1560
|
+
{ headers } = { headers: false }
|
|
1561
|
+
) {
|
|
1357
1562
|
const {
|
|
1358
1563
|
error,
|
|
1359
|
-
} =
|
|
1564
|
+
} = ConfigurationPlatformValidator.updateLevelUidIntegration().validate(
|
|
1360
1565
|
{
|
|
1361
1566
|
id,
|
|
1362
1567
|
level,
|
|
@@ -1372,7 +1577,7 @@ class Configuration {
|
|
|
1372
1577
|
// Showing warrnings if extra unknown parameters are found
|
|
1373
1578
|
const {
|
|
1374
1579
|
error: warrning,
|
|
1375
|
-
} =
|
|
1580
|
+
} = ConfigurationPlatformValidator.updateLevelUidIntegration().validate(
|
|
1376
1581
|
{
|
|
1377
1582
|
id,
|
|
1378
1583
|
level,
|
|
@@ -1384,9 +1589,8 @@ class Configuration {
|
|
|
1384
1589
|
if (warrning) {
|
|
1385
1590
|
Logger({
|
|
1386
1591
|
level: "WARN",
|
|
1387
|
-
message:
|
|
1592
|
+
message: `Parameter Validation warrnings for platform > Configuration > updateLevelUidIntegration \n ${warrning}`,
|
|
1388
1593
|
});
|
|
1389
|
-
Logger({ level: "WARN", message: warrning });
|
|
1390
1594
|
}
|
|
1391
1595
|
|
|
1392
1596
|
const query_params = {};
|
|
@@ -1399,12 +1603,18 @@ class Configuration {
|
|
|
1399
1603
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
|
|
1400
1604
|
query_params,
|
|
1401
1605
|
body,
|
|
1402
|
-
xHeaders
|
|
1606
|
+
xHeaders,
|
|
1607
|
+
{ headers }
|
|
1403
1608
|
);
|
|
1404
1609
|
|
|
1610
|
+
let responseData = response;
|
|
1611
|
+
if (headers) {
|
|
1612
|
+
responseData = response[0];
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1405
1615
|
const {
|
|
1406
1616
|
error: res_error,
|
|
1407
|
-
} =
|
|
1617
|
+
} = ConfigurationPlatformModel.IntegrationLevel().validate(responseData, {
|
|
1408
1618
|
abortEarly: false,
|
|
1409
1619
|
allowUnknown: false,
|
|
1410
1620
|
});
|
|
@@ -1412,9 +1622,8 @@ class Configuration {
|
|
|
1412
1622
|
if (res_error) {
|
|
1413
1623
|
Logger({
|
|
1414
1624
|
level: "WARN",
|
|
1415
|
-
message:
|
|
1625
|
+
message: `Response Validation Warnnings for platform > Configuration > updateLevelUidIntegration \n ${res_error}`,
|
|
1416
1626
|
});
|
|
1417
|
-
Logger({ level: "WARN", message: res_error });
|
|
1418
1627
|
}
|
|
1419
1628
|
|
|
1420
1629
|
return response;
|