@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 CompanyProfilePlatformValidator = require("./CompanyProfilePlatformValidator");
|
|
5
|
+
const CompanyProfilePlatformModel = require("./CompanyProfilePlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -12,13 +12,17 @@ class CompanyProfile {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @param {
|
|
16
|
-
* @
|
|
15
|
+
* @param {CompanyProfilePlatformValidator.CbsOnboardGetParam} arg - Arg object
|
|
16
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
17
|
+
* @returns {Promise<CompanyProfilePlatformModel.GetCompanyProfileSerializerResponse>}
|
|
18
|
+
* - Success response
|
|
19
|
+
*
|
|
20
|
+
* @name cbsOnboardGet
|
|
17
21
|
* @summary: Get company profile
|
|
18
|
-
* @description: This API allows to view the company profile of the seller account.
|
|
22
|
+
* @description: This API allows to view the company profile of the seller account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/cbsOnboardGet/).
|
|
19
23
|
*/
|
|
20
|
-
async cbsOnboardGet({} = {}) {
|
|
21
|
-
const { error } =
|
|
24
|
+
async cbsOnboardGet({ headers } = { headers: false }) {
|
|
25
|
+
const { error } = CompanyProfilePlatformValidator.cbsOnboardGet().validate(
|
|
22
26
|
{},
|
|
23
27
|
{ abortEarly: false, allowUnknown: true }
|
|
24
28
|
);
|
|
@@ -29,16 +33,15 @@ class CompanyProfile {
|
|
|
29
33
|
// Showing warrnings if extra unknown parameters are found
|
|
30
34
|
const {
|
|
31
35
|
error: warrning,
|
|
32
|
-
} =
|
|
36
|
+
} = CompanyProfilePlatformValidator.cbsOnboardGet().validate(
|
|
33
37
|
{},
|
|
34
38
|
{ abortEarly: false, allowUnknown: false }
|
|
35
39
|
);
|
|
36
40
|
if (warrning) {
|
|
37
41
|
Logger({
|
|
38
42
|
level: "WARN",
|
|
39
|
-
message:
|
|
43
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > cbsOnboardGet \n ${warrning}`,
|
|
40
44
|
});
|
|
41
|
-
Logger({ level: "WARN", message: warrning });
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
const query_params = {};
|
|
@@ -51,36 +54,43 @@ class CompanyProfile {
|
|
|
51
54
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
|
|
52
55
|
query_params,
|
|
53
56
|
undefined,
|
|
54
|
-
xHeaders
|
|
57
|
+
xHeaders,
|
|
58
|
+
{ headers }
|
|
55
59
|
);
|
|
56
60
|
|
|
61
|
+
let responseData = response;
|
|
62
|
+
if (headers) {
|
|
63
|
+
responseData = response[0];
|
|
64
|
+
}
|
|
65
|
+
|
|
57
66
|
const {
|
|
58
67
|
error: res_error,
|
|
59
|
-
} =
|
|
60
|
-
|
|
68
|
+
} = CompanyProfilePlatformModel.GetCompanyProfileSerializerResponse().validate(
|
|
69
|
+
responseData,
|
|
61
70
|
{ abortEarly: false, allowUnknown: false }
|
|
62
71
|
);
|
|
63
72
|
|
|
64
73
|
if (res_error) {
|
|
65
74
|
Logger({
|
|
66
75
|
level: "WARN",
|
|
67
|
-
message:
|
|
76
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > cbsOnboardGet \n ${res_error}`,
|
|
68
77
|
});
|
|
69
|
-
Logger({ level: "WARN", message: res_error });
|
|
70
78
|
}
|
|
71
79
|
|
|
72
80
|
return response;
|
|
73
81
|
}
|
|
74
82
|
|
|
75
83
|
/**
|
|
76
|
-
* @param {
|
|
77
|
-
* @param {
|
|
78
|
-
* @returns {Promise<ProfileSuccessResponse>} -
|
|
84
|
+
* @param {CompanyProfilePlatformValidator.CreateBrandParam} arg - Arg object
|
|
85
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
86
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
87
|
+
* Success response
|
|
88
|
+
* @name createBrand
|
|
79
89
|
* @summary: Create a Brand.
|
|
80
|
-
* @description: This API allows to create a brand associated to a company.
|
|
90
|
+
* @description: This API allows to create a brand associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createBrand/).
|
|
81
91
|
*/
|
|
82
|
-
async createBrand({ body } = {}) {
|
|
83
|
-
const { error } =
|
|
92
|
+
async createBrand({ body } = {}, { headers } = { headers: false }) {
|
|
93
|
+
const { error } = CompanyProfilePlatformValidator.createBrand().validate(
|
|
84
94
|
{
|
|
85
95
|
body,
|
|
86
96
|
},
|
|
@@ -91,7 +101,9 @@ class CompanyProfile {
|
|
|
91
101
|
}
|
|
92
102
|
|
|
93
103
|
// Showing warrnings if extra unknown parameters are found
|
|
94
|
-
const {
|
|
104
|
+
const {
|
|
105
|
+
error: warrning,
|
|
106
|
+
} = CompanyProfilePlatformValidator.createBrand().validate(
|
|
95
107
|
{
|
|
96
108
|
body,
|
|
97
109
|
},
|
|
@@ -100,9 +112,8 @@ class CompanyProfile {
|
|
|
100
112
|
if (warrning) {
|
|
101
113
|
Logger({
|
|
102
114
|
level: "WARN",
|
|
103
|
-
message:
|
|
115
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > createBrand \n ${warrning}`,
|
|
104
116
|
});
|
|
105
|
-
Logger({ level: "WARN", message: warrning });
|
|
106
117
|
}
|
|
107
118
|
|
|
108
119
|
const query_params = {};
|
|
@@ -115,38 +126,50 @@ class CompanyProfile {
|
|
|
115
126
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/`,
|
|
116
127
|
query_params,
|
|
117
128
|
body,
|
|
118
|
-
xHeaders
|
|
129
|
+
xHeaders,
|
|
130
|
+
{ headers }
|
|
119
131
|
);
|
|
120
132
|
|
|
133
|
+
let responseData = response;
|
|
134
|
+
if (headers) {
|
|
135
|
+
responseData = response[0];
|
|
136
|
+
}
|
|
137
|
+
|
|
121
138
|
const {
|
|
122
139
|
error: res_error,
|
|
123
|
-
} =
|
|
124
|
-
|
|
125
|
-
allowUnknown: false
|
|
126
|
-
|
|
140
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
141
|
+
responseData,
|
|
142
|
+
{ abortEarly: false, allowUnknown: false }
|
|
143
|
+
);
|
|
127
144
|
|
|
128
145
|
if (res_error) {
|
|
129
146
|
Logger({
|
|
130
147
|
level: "WARN",
|
|
131
|
-
message:
|
|
148
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > createBrand \n ${res_error}`,
|
|
132
149
|
});
|
|
133
|
-
Logger({ level: "WARN", message: res_error });
|
|
134
150
|
}
|
|
135
151
|
|
|
136
152
|
return response;
|
|
137
153
|
}
|
|
138
154
|
|
|
139
155
|
/**
|
|
140
|
-
* @param {
|
|
141
|
-
*
|
|
142
|
-
*
|
|
156
|
+
* @param {CompanyProfilePlatformValidator.CreateCompanyBrandMappingParam} arg
|
|
157
|
+
* - Arg object
|
|
158
|
+
*
|
|
159
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
160
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
161
|
+
* Success response
|
|
162
|
+
* @name createCompanyBrandMapping
|
|
143
163
|
* @summary: Create a company brand mapping.
|
|
144
|
-
* @description: This API allows to create a company brand mapping, for a already existing brand in the system.
|
|
164
|
+
* @description: This API allows to create a company brand mapping, for a already existing brand in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createCompanyBrandMapping/).
|
|
145
165
|
*/
|
|
146
|
-
async createCompanyBrandMapping(
|
|
166
|
+
async createCompanyBrandMapping(
|
|
167
|
+
{ body } = {},
|
|
168
|
+
{ headers } = { headers: false }
|
|
169
|
+
) {
|
|
147
170
|
const {
|
|
148
171
|
error,
|
|
149
|
-
} =
|
|
172
|
+
} = CompanyProfilePlatformValidator.createCompanyBrandMapping().validate(
|
|
150
173
|
{
|
|
151
174
|
body,
|
|
152
175
|
},
|
|
@@ -159,7 +182,7 @@ class CompanyProfile {
|
|
|
159
182
|
// Showing warrnings if extra unknown parameters are found
|
|
160
183
|
const {
|
|
161
184
|
error: warrning,
|
|
162
|
-
} =
|
|
185
|
+
} = CompanyProfilePlatformValidator.createCompanyBrandMapping().validate(
|
|
163
186
|
{
|
|
164
187
|
body,
|
|
165
188
|
},
|
|
@@ -168,9 +191,8 @@ class CompanyProfile {
|
|
|
168
191
|
if (warrning) {
|
|
169
192
|
Logger({
|
|
170
193
|
level: "WARN",
|
|
171
|
-
message:
|
|
194
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > createCompanyBrandMapping \n ${warrning}`,
|
|
172
195
|
});
|
|
173
|
-
Logger({ level: "WARN", message: warrning });
|
|
174
196
|
}
|
|
175
197
|
|
|
176
198
|
const query_params = {};
|
|
@@ -183,36 +205,43 @@ class CompanyProfile {
|
|
|
183
205
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
|
|
184
206
|
query_params,
|
|
185
207
|
body,
|
|
186
|
-
xHeaders
|
|
208
|
+
xHeaders,
|
|
209
|
+
{ headers }
|
|
187
210
|
);
|
|
188
211
|
|
|
212
|
+
let responseData = response;
|
|
213
|
+
if (headers) {
|
|
214
|
+
responseData = response[0];
|
|
215
|
+
}
|
|
216
|
+
|
|
189
217
|
const {
|
|
190
218
|
error: res_error,
|
|
191
|
-
} =
|
|
192
|
-
|
|
193
|
-
allowUnknown: false
|
|
194
|
-
|
|
219
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
220
|
+
responseData,
|
|
221
|
+
{ abortEarly: false, allowUnknown: false }
|
|
222
|
+
);
|
|
195
223
|
|
|
196
224
|
if (res_error) {
|
|
197
225
|
Logger({
|
|
198
226
|
level: "WARN",
|
|
199
|
-
message:
|
|
227
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > createCompanyBrandMapping \n ${res_error}`,
|
|
200
228
|
});
|
|
201
|
-
Logger({ level: "WARN", message: res_error });
|
|
202
229
|
}
|
|
203
230
|
|
|
204
231
|
return response;
|
|
205
232
|
}
|
|
206
233
|
|
|
207
234
|
/**
|
|
208
|
-
* @param {
|
|
209
|
-
* @param {
|
|
210
|
-
* @returns {Promise<ProfileSuccessResponse>} -
|
|
235
|
+
* @param {CompanyProfilePlatformValidator.CreateLocationParam} arg - Arg object
|
|
236
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
237
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
238
|
+
* Success response
|
|
239
|
+
* @name createLocation
|
|
211
240
|
* @summary: Create a location associated to a company.
|
|
212
|
-
* @description: This API allows to edit a location associated to a company.
|
|
241
|
+
* @description: This API allows to edit a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createLocation/).
|
|
213
242
|
*/
|
|
214
|
-
async createLocation({ body } = {}) {
|
|
215
|
-
const { error } =
|
|
243
|
+
async createLocation({ body } = {}, { headers } = { headers: false }) {
|
|
244
|
+
const { error } = CompanyProfilePlatformValidator.createLocation().validate(
|
|
216
245
|
{
|
|
217
246
|
body,
|
|
218
247
|
},
|
|
@@ -225,7 +254,7 @@ class CompanyProfile {
|
|
|
225
254
|
// Showing warrnings if extra unknown parameters are found
|
|
226
255
|
const {
|
|
227
256
|
error: warrning,
|
|
228
|
-
} =
|
|
257
|
+
} = CompanyProfilePlatformValidator.createLocation().validate(
|
|
229
258
|
{
|
|
230
259
|
body,
|
|
231
260
|
},
|
|
@@ -234,9 +263,8 @@ class CompanyProfile {
|
|
|
234
263
|
if (warrning) {
|
|
235
264
|
Logger({
|
|
236
265
|
level: "WARN",
|
|
237
|
-
message:
|
|
266
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > createLocation \n ${warrning}`,
|
|
238
267
|
});
|
|
239
|
-
Logger({ level: "WARN", message: warrning });
|
|
240
268
|
}
|
|
241
269
|
|
|
242
270
|
const query_params = {};
|
|
@@ -249,36 +277,45 @@ class CompanyProfile {
|
|
|
249
277
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
|
|
250
278
|
query_params,
|
|
251
279
|
body,
|
|
252
|
-
xHeaders
|
|
280
|
+
xHeaders,
|
|
281
|
+
{ headers }
|
|
253
282
|
);
|
|
254
283
|
|
|
284
|
+
let responseData = response;
|
|
285
|
+
if (headers) {
|
|
286
|
+
responseData = response[0];
|
|
287
|
+
}
|
|
288
|
+
|
|
255
289
|
const {
|
|
256
290
|
error: res_error,
|
|
257
|
-
} =
|
|
258
|
-
|
|
259
|
-
allowUnknown: false
|
|
260
|
-
|
|
291
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
292
|
+
responseData,
|
|
293
|
+
{ abortEarly: false, allowUnknown: false }
|
|
294
|
+
);
|
|
261
295
|
|
|
262
296
|
if (res_error) {
|
|
263
297
|
Logger({
|
|
264
298
|
level: "WARN",
|
|
265
|
-
message:
|
|
299
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > createLocation \n ${res_error}`,
|
|
266
300
|
});
|
|
267
|
-
Logger({ level: "WARN", message: res_error });
|
|
268
301
|
}
|
|
269
302
|
|
|
270
303
|
return response;
|
|
271
304
|
}
|
|
272
305
|
|
|
273
306
|
/**
|
|
274
|
-
* @param {
|
|
275
|
-
* @param {
|
|
276
|
-
* @returns {Promise<ProfileSuccessResponse>} -
|
|
307
|
+
* @param {CompanyProfilePlatformValidator.CreateLocationBulkParam} arg - Arg object
|
|
308
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
309
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
310
|
+
* Success response
|
|
311
|
+
* @name createLocationBulk
|
|
277
312
|
* @summary: Create a location asscoiated to a company in bulk.
|
|
278
|
-
* @description: This API allows to create a location associated to a company.
|
|
313
|
+
* @description: This API allows to create a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createLocationBulk/).
|
|
279
314
|
*/
|
|
280
|
-
async createLocationBulk({ body } = {}) {
|
|
281
|
-
const {
|
|
315
|
+
async createLocationBulk({ body } = {}, { headers } = { headers: false }) {
|
|
316
|
+
const {
|
|
317
|
+
error,
|
|
318
|
+
} = CompanyProfilePlatformValidator.createLocationBulk().validate(
|
|
282
319
|
{
|
|
283
320
|
body,
|
|
284
321
|
},
|
|
@@ -291,7 +328,7 @@ class CompanyProfile {
|
|
|
291
328
|
// Showing warrnings if extra unknown parameters are found
|
|
292
329
|
const {
|
|
293
330
|
error: warrning,
|
|
294
|
-
} =
|
|
331
|
+
} = CompanyProfilePlatformValidator.createLocationBulk().validate(
|
|
295
332
|
{
|
|
296
333
|
body,
|
|
297
334
|
},
|
|
@@ -300,9 +337,8 @@ class CompanyProfile {
|
|
|
300
337
|
if (warrning) {
|
|
301
338
|
Logger({
|
|
302
339
|
level: "WARN",
|
|
303
|
-
message:
|
|
340
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > createLocationBulk \n ${warrning}`,
|
|
304
341
|
});
|
|
305
|
-
Logger({ level: "WARN", message: warrning });
|
|
306
342
|
}
|
|
307
343
|
|
|
308
344
|
const query_params = {};
|
|
@@ -315,37 +351,43 @@ class CompanyProfile {
|
|
|
315
351
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/bulk`,
|
|
316
352
|
query_params,
|
|
317
353
|
body,
|
|
318
|
-
xHeaders
|
|
354
|
+
xHeaders,
|
|
355
|
+
{ headers }
|
|
319
356
|
);
|
|
320
357
|
|
|
358
|
+
let responseData = response;
|
|
359
|
+
if (headers) {
|
|
360
|
+
responseData = response[0];
|
|
361
|
+
}
|
|
362
|
+
|
|
321
363
|
const {
|
|
322
364
|
error: res_error,
|
|
323
|
-
} =
|
|
324
|
-
|
|
325
|
-
allowUnknown: false
|
|
326
|
-
|
|
365
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
366
|
+
responseData,
|
|
367
|
+
{ abortEarly: false, allowUnknown: false }
|
|
368
|
+
);
|
|
327
369
|
|
|
328
370
|
if (res_error) {
|
|
329
371
|
Logger({
|
|
330
372
|
level: "WARN",
|
|
331
|
-
message:
|
|
373
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > createLocationBulk \n ${res_error}`,
|
|
332
374
|
});
|
|
333
|
-
Logger({ level: "WARN", message: res_error });
|
|
334
375
|
}
|
|
335
376
|
|
|
336
377
|
return response;
|
|
337
378
|
}
|
|
338
379
|
|
|
339
380
|
/**
|
|
340
|
-
* @param {
|
|
341
|
-
* @param {
|
|
342
|
-
* @
|
|
343
|
-
*
|
|
381
|
+
* @param {CompanyProfilePlatformValidator.EditBrandParam} arg - Arg object
|
|
382
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
383
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
384
|
+
* Success response
|
|
385
|
+
* @name editBrand
|
|
344
386
|
* @summary: Edit a brand.
|
|
345
|
-
* @description: This API allows to edit meta of a brand.
|
|
387
|
+
* @description: This API allows to edit meta of a brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/editBrand/).
|
|
346
388
|
*/
|
|
347
|
-
async editBrand({ brandId, body } = {}) {
|
|
348
|
-
const { error } =
|
|
389
|
+
async editBrand({ brandId, body } = {}, { headers } = { headers: false }) {
|
|
390
|
+
const { error } = CompanyProfilePlatformValidator.editBrand().validate(
|
|
349
391
|
{
|
|
350
392
|
brandId,
|
|
351
393
|
body,
|
|
@@ -357,7 +399,9 @@ class CompanyProfile {
|
|
|
357
399
|
}
|
|
358
400
|
|
|
359
401
|
// Showing warrnings if extra unknown parameters are found
|
|
360
|
-
const {
|
|
402
|
+
const {
|
|
403
|
+
error: warrning,
|
|
404
|
+
} = CompanyProfilePlatformValidator.editBrand().validate(
|
|
361
405
|
{
|
|
362
406
|
brandId,
|
|
363
407
|
body,
|
|
@@ -367,9 +411,8 @@ class CompanyProfile {
|
|
|
367
411
|
if (warrning) {
|
|
368
412
|
Logger({
|
|
369
413
|
level: "WARN",
|
|
370
|
-
message:
|
|
414
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > editBrand \n ${warrning}`,
|
|
371
415
|
});
|
|
372
|
-
Logger({ level: "WARN", message: warrning });
|
|
373
416
|
}
|
|
374
417
|
|
|
375
418
|
const query_params = {};
|
|
@@ -382,36 +425,44 @@ class CompanyProfile {
|
|
|
382
425
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
|
|
383
426
|
query_params,
|
|
384
427
|
body,
|
|
385
|
-
xHeaders
|
|
428
|
+
xHeaders,
|
|
429
|
+
{ headers }
|
|
386
430
|
);
|
|
387
431
|
|
|
432
|
+
let responseData = response;
|
|
433
|
+
if (headers) {
|
|
434
|
+
responseData = response[0];
|
|
435
|
+
}
|
|
436
|
+
|
|
388
437
|
const {
|
|
389
438
|
error: res_error,
|
|
390
|
-
} =
|
|
391
|
-
|
|
392
|
-
allowUnknown: false
|
|
393
|
-
|
|
439
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
440
|
+
responseData,
|
|
441
|
+
{ abortEarly: false, allowUnknown: false }
|
|
442
|
+
);
|
|
394
443
|
|
|
395
444
|
if (res_error) {
|
|
396
445
|
Logger({
|
|
397
446
|
level: "WARN",
|
|
398
|
-
message:
|
|
447
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > editBrand \n ${res_error}`,
|
|
399
448
|
});
|
|
400
|
-
Logger({ level: "WARN", message: res_error });
|
|
401
449
|
}
|
|
402
450
|
|
|
403
451
|
return response;
|
|
404
452
|
}
|
|
405
453
|
|
|
406
454
|
/**
|
|
407
|
-
* @param {
|
|
408
|
-
* @param {
|
|
409
|
-
* @returns {Promise<GetBrandResponseSerializer>}
|
|
455
|
+
* @param {CompanyProfilePlatformValidator.GetBrandParam} arg - Arg object
|
|
456
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
457
|
+
* @returns {Promise<CompanyProfilePlatformModel.GetBrandResponseSerializer>}
|
|
458
|
+
* - Success response
|
|
459
|
+
*
|
|
460
|
+
* @name getBrand
|
|
410
461
|
* @summary: Get a single company brand.
|
|
411
|
-
* @description: This API helps to get data associated to a particular company brand.
|
|
462
|
+
* @description: This API helps to get data associated to a particular company brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getBrand/).
|
|
412
463
|
*/
|
|
413
|
-
async getBrand({ brandId } = {}) {
|
|
414
|
-
const { error } =
|
|
464
|
+
async getBrand({ brandId } = {}, { headers } = { headers: false }) {
|
|
465
|
+
const { error } = CompanyProfilePlatformValidator.getBrand().validate(
|
|
415
466
|
{
|
|
416
467
|
brandId,
|
|
417
468
|
},
|
|
@@ -422,7 +473,9 @@ class CompanyProfile {
|
|
|
422
473
|
}
|
|
423
474
|
|
|
424
475
|
// Showing warrnings if extra unknown parameters are found
|
|
425
|
-
const {
|
|
476
|
+
const {
|
|
477
|
+
error: warrning,
|
|
478
|
+
} = CompanyProfilePlatformValidator.getBrand().validate(
|
|
426
479
|
{
|
|
427
480
|
brandId,
|
|
428
481
|
},
|
|
@@ -431,9 +484,8 @@ class CompanyProfile {
|
|
|
431
484
|
if (warrning) {
|
|
432
485
|
Logger({
|
|
433
486
|
level: "WARN",
|
|
434
|
-
message:
|
|
487
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > getBrand \n ${warrning}`,
|
|
435
488
|
});
|
|
436
|
-
Logger({ level: "WARN", message: warrning });
|
|
437
489
|
}
|
|
438
490
|
|
|
439
491
|
const query_params = {};
|
|
@@ -446,40 +498,47 @@ class CompanyProfile {
|
|
|
446
498
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
|
|
447
499
|
query_params,
|
|
448
500
|
undefined,
|
|
449
|
-
xHeaders
|
|
501
|
+
xHeaders,
|
|
502
|
+
{ headers }
|
|
450
503
|
);
|
|
451
504
|
|
|
505
|
+
let responseData = response;
|
|
506
|
+
if (headers) {
|
|
507
|
+
responseData = response[0];
|
|
508
|
+
}
|
|
509
|
+
|
|
452
510
|
const {
|
|
453
511
|
error: res_error,
|
|
454
|
-
} =
|
|
455
|
-
|
|
456
|
-
allowUnknown: false
|
|
457
|
-
|
|
512
|
+
} = CompanyProfilePlatformModel.GetBrandResponseSerializer().validate(
|
|
513
|
+
responseData,
|
|
514
|
+
{ abortEarly: false, allowUnknown: false }
|
|
515
|
+
);
|
|
458
516
|
|
|
459
517
|
if (res_error) {
|
|
460
518
|
Logger({
|
|
461
519
|
level: "WARN",
|
|
462
|
-
message:
|
|
520
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > getBrand \n ${res_error}`,
|
|
463
521
|
});
|
|
464
|
-
Logger({ level: "WARN", message: res_error });
|
|
465
522
|
}
|
|
466
523
|
|
|
467
524
|
return response;
|
|
468
525
|
}
|
|
469
526
|
|
|
470
527
|
/**
|
|
471
|
-
* @param {
|
|
472
|
-
* @param {
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
* @
|
|
477
|
-
* @returns {Promise<CompanyBrandListSerializer>} - Success response
|
|
528
|
+
* @param {CompanyProfilePlatformValidator.GetBrandsParam} arg - Arg object
|
|
529
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
530
|
+
* @returns {Promise<CompanyProfilePlatformModel.CompanyBrandListSerializer>}
|
|
531
|
+
* - Success response
|
|
532
|
+
*
|
|
533
|
+
* @name getBrands
|
|
478
534
|
* @summary: Get brands associated to a company
|
|
479
|
-
* @description: This API helps to get view brands associated to a particular company.
|
|
535
|
+
* @description: This API helps to get view brands associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getBrands/).
|
|
480
536
|
*/
|
|
481
|
-
async getBrands(
|
|
482
|
-
|
|
537
|
+
async getBrands(
|
|
538
|
+
{ pageNo, pageSize, q } = {},
|
|
539
|
+
{ headers } = { headers: false }
|
|
540
|
+
) {
|
|
541
|
+
const { error } = CompanyProfilePlatformValidator.getBrands().validate(
|
|
483
542
|
{
|
|
484
543
|
pageNo,
|
|
485
544
|
pageSize,
|
|
@@ -492,7 +551,9 @@ class CompanyProfile {
|
|
|
492
551
|
}
|
|
493
552
|
|
|
494
553
|
// Showing warrnings if extra unknown parameters are found
|
|
495
|
-
const {
|
|
554
|
+
const {
|
|
555
|
+
error: warrning,
|
|
556
|
+
} = CompanyProfilePlatformValidator.getBrands().validate(
|
|
496
557
|
{
|
|
497
558
|
pageNo,
|
|
498
559
|
pageSize,
|
|
@@ -503,9 +564,8 @@ class CompanyProfile {
|
|
|
503
564
|
if (warrning) {
|
|
504
565
|
Logger({
|
|
505
566
|
level: "WARN",
|
|
506
|
-
message:
|
|
567
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > getBrands \n ${warrning}`,
|
|
507
568
|
});
|
|
508
|
-
Logger({ level: "WARN", message: warrning });
|
|
509
569
|
}
|
|
510
570
|
|
|
511
571
|
const query_params = {};
|
|
@@ -521,22 +581,27 @@ class CompanyProfile {
|
|
|
521
581
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
|
|
522
582
|
query_params,
|
|
523
583
|
undefined,
|
|
524
|
-
xHeaders
|
|
584
|
+
xHeaders,
|
|
585
|
+
{ headers }
|
|
525
586
|
);
|
|
526
587
|
|
|
588
|
+
let responseData = response;
|
|
589
|
+
if (headers) {
|
|
590
|
+
responseData = response[0];
|
|
591
|
+
}
|
|
592
|
+
|
|
527
593
|
const {
|
|
528
594
|
error: res_error,
|
|
529
|
-
} =
|
|
530
|
-
|
|
531
|
-
allowUnknown: false
|
|
532
|
-
|
|
595
|
+
} = CompanyProfilePlatformModel.CompanyBrandListSerializer().validate(
|
|
596
|
+
responseData,
|
|
597
|
+
{ abortEarly: false, allowUnknown: false }
|
|
598
|
+
);
|
|
533
599
|
|
|
534
600
|
if (res_error) {
|
|
535
601
|
Logger({
|
|
536
602
|
level: "WARN",
|
|
537
|
-
message:
|
|
603
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > getBrands \n ${res_error}`,
|
|
538
604
|
});
|
|
539
|
-
Logger({ level: "WARN", message: res_error });
|
|
540
605
|
}
|
|
541
606
|
|
|
542
607
|
return response;
|
|
@@ -547,6 +612,7 @@ class CompanyProfile {
|
|
|
547
612
|
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
548
613
|
* page. Default is 10.
|
|
549
614
|
* @param {string} [arg.q] - Search term for name.
|
|
615
|
+
* @returns {Paginator<CompanyProfilePlatformModel.CompanyBrandListSerializer>}
|
|
550
616
|
* @summary: Get brands associated to a company
|
|
551
617
|
* @description: This API helps to get view brands associated to a particular company.
|
|
552
618
|
*/
|
|
@@ -572,13 +638,18 @@ class CompanyProfile {
|
|
|
572
638
|
}
|
|
573
639
|
|
|
574
640
|
/**
|
|
575
|
-
* @param {
|
|
576
|
-
* @
|
|
641
|
+
* @param {CompanyProfilePlatformValidator.GetCompanyMetricsParam} arg - Arg object
|
|
642
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
643
|
+
* @returns {Promise<CompanyProfilePlatformModel.MetricsSerializer>} -
|
|
644
|
+
* Success response
|
|
645
|
+
* @name getCompanyMetrics
|
|
577
646
|
* @summary: Get company metrics
|
|
578
|
-
* @description: This API allows to view the company metrics, i.e. the status of its brand and stores. Also its allows to view the number of products, company documents & store documents which are verified and unverified.
|
|
647
|
+
* @description: This API allows to view the company metrics, i.e. the status of its brand and stores. Also its allows to view the number of products, company documents & store documents which are verified and unverified. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getCompanyMetrics/).
|
|
579
648
|
*/
|
|
580
|
-
async getCompanyMetrics({} = {}) {
|
|
581
|
-
const {
|
|
649
|
+
async getCompanyMetrics({ headers } = { headers: false }) {
|
|
650
|
+
const {
|
|
651
|
+
error,
|
|
652
|
+
} = CompanyProfilePlatformValidator.getCompanyMetrics().validate(
|
|
582
653
|
{},
|
|
583
654
|
{ abortEarly: false, allowUnknown: true }
|
|
584
655
|
);
|
|
@@ -589,16 +660,15 @@ class CompanyProfile {
|
|
|
589
660
|
// Showing warrnings if extra unknown parameters are found
|
|
590
661
|
const {
|
|
591
662
|
error: warrning,
|
|
592
|
-
} =
|
|
663
|
+
} = CompanyProfilePlatformValidator.getCompanyMetrics().validate(
|
|
593
664
|
{},
|
|
594
665
|
{ abortEarly: false, allowUnknown: false }
|
|
595
666
|
);
|
|
596
667
|
if (warrning) {
|
|
597
668
|
Logger({
|
|
598
669
|
level: "WARN",
|
|
599
|
-
message:
|
|
670
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > getCompanyMetrics \n ${warrning}`,
|
|
600
671
|
});
|
|
601
|
-
Logger({ level: "WARN", message: warrning });
|
|
602
672
|
}
|
|
603
673
|
|
|
604
674
|
const query_params = {};
|
|
@@ -611,12 +681,18 @@ class CompanyProfile {
|
|
|
611
681
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/metrics`,
|
|
612
682
|
query_params,
|
|
613
683
|
undefined,
|
|
614
|
-
xHeaders
|
|
684
|
+
xHeaders,
|
|
685
|
+
{ headers }
|
|
615
686
|
);
|
|
616
687
|
|
|
688
|
+
let responseData = response;
|
|
689
|
+
if (headers) {
|
|
690
|
+
responseData = response[0];
|
|
691
|
+
}
|
|
692
|
+
|
|
617
693
|
const {
|
|
618
694
|
error: res_error,
|
|
619
|
-
} =
|
|
695
|
+
} = CompanyProfilePlatformModel.MetricsSerializer().validate(responseData, {
|
|
620
696
|
abortEarly: false,
|
|
621
697
|
allowUnknown: false,
|
|
622
698
|
});
|
|
@@ -624,23 +700,29 @@ class CompanyProfile {
|
|
|
624
700
|
if (res_error) {
|
|
625
701
|
Logger({
|
|
626
702
|
level: "WARN",
|
|
627
|
-
message:
|
|
703
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > getCompanyMetrics \n ${res_error}`,
|
|
628
704
|
});
|
|
629
|
-
Logger({ level: "WARN", message: res_error });
|
|
630
705
|
}
|
|
631
706
|
|
|
632
707
|
return response;
|
|
633
708
|
}
|
|
634
709
|
|
|
635
710
|
/**
|
|
636
|
-
* @param {
|
|
637
|
-
* @param {
|
|
638
|
-
* @returns {Promise<GetLocationSerializer>} -
|
|
711
|
+
* @param {CompanyProfilePlatformValidator.GetLocationDetailParam} arg - Arg object
|
|
712
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
713
|
+
* @returns {Promise<CompanyProfilePlatformModel.GetLocationSerializer>} -
|
|
714
|
+
* Success response
|
|
715
|
+
* @name getLocationDetail
|
|
639
716
|
* @summary: Get details of a specific location.
|
|
640
|
-
* @description: This API helps to get data associated to a specific location.
|
|
717
|
+
* @description: This API helps to get data associated to a specific location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocationDetail/).
|
|
641
718
|
*/
|
|
642
|
-
async getLocationDetail(
|
|
643
|
-
|
|
719
|
+
async getLocationDetail(
|
|
720
|
+
{ locationId } = {},
|
|
721
|
+
{ headers } = { headers: false }
|
|
722
|
+
) {
|
|
723
|
+
const {
|
|
724
|
+
error,
|
|
725
|
+
} = CompanyProfilePlatformValidator.getLocationDetail().validate(
|
|
644
726
|
{
|
|
645
727
|
locationId,
|
|
646
728
|
},
|
|
@@ -653,7 +735,7 @@ class CompanyProfile {
|
|
|
653
735
|
// Showing warrnings if extra unknown parameters are found
|
|
654
736
|
const {
|
|
655
737
|
error: warrning,
|
|
656
|
-
} =
|
|
738
|
+
} = CompanyProfilePlatformValidator.getLocationDetail().validate(
|
|
657
739
|
{
|
|
658
740
|
locationId,
|
|
659
741
|
},
|
|
@@ -662,9 +744,8 @@ class CompanyProfile {
|
|
|
662
744
|
if (warrning) {
|
|
663
745
|
Logger({
|
|
664
746
|
level: "WARN",
|
|
665
|
-
message:
|
|
747
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > getLocationDetail \n ${warrning}`,
|
|
666
748
|
});
|
|
667
|
-
Logger({ level: "WARN", message: warrning });
|
|
668
749
|
}
|
|
669
750
|
|
|
670
751
|
const query_params = {};
|
|
@@ -677,52 +758,46 @@ class CompanyProfile {
|
|
|
677
758
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
|
|
678
759
|
query_params,
|
|
679
760
|
undefined,
|
|
680
|
-
xHeaders
|
|
761
|
+
xHeaders,
|
|
762
|
+
{ headers }
|
|
681
763
|
);
|
|
682
764
|
|
|
765
|
+
let responseData = response;
|
|
766
|
+
if (headers) {
|
|
767
|
+
responseData = response[0];
|
|
768
|
+
}
|
|
769
|
+
|
|
683
770
|
const {
|
|
684
771
|
error: res_error,
|
|
685
|
-
} =
|
|
686
|
-
|
|
687
|
-
allowUnknown: false
|
|
688
|
-
|
|
772
|
+
} = CompanyProfilePlatformModel.GetLocationSerializer().validate(
|
|
773
|
+
responseData,
|
|
774
|
+
{ abortEarly: false, allowUnknown: false }
|
|
775
|
+
);
|
|
689
776
|
|
|
690
777
|
if (res_error) {
|
|
691
778
|
Logger({
|
|
692
779
|
level: "WARN",
|
|
693
|
-
message:
|
|
780
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > getLocationDetail \n ${res_error}`,
|
|
694
781
|
});
|
|
695
|
-
Logger({ level: "WARN", message: res_error });
|
|
696
782
|
}
|
|
697
783
|
|
|
698
784
|
return response;
|
|
699
785
|
}
|
|
700
786
|
|
|
701
787
|
/**
|
|
702
|
-
* @param {
|
|
703
|
-
* @param {
|
|
704
|
-
*
|
|
705
|
-
*
|
|
706
|
-
* @
|
|
707
|
-
* unverified companies.
|
|
708
|
-
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
709
|
-
* given set of results
|
|
710
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
711
|
-
* page. Default is 10.
|
|
712
|
-
* @param {number[]} [arg.locationIds] - Helps to filter stores on the basis of uids.
|
|
713
|
-
* @returns {Promise<LocationListSerializer>} - Success response
|
|
788
|
+
* @param {CompanyProfilePlatformValidator.GetLocationsParam} arg - Arg object
|
|
789
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
790
|
+
* @returns {Promise<CompanyProfilePlatformModel.LocationListSerializer>} -
|
|
791
|
+
* Success response
|
|
792
|
+
* @name getLocations
|
|
714
793
|
* @summary: Get list of locations
|
|
715
|
-
* @description: This API allows to view all the locations associated to a company.
|
|
794
|
+
* @description: This API allows to view all the locations associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocations/).
|
|
716
795
|
*/
|
|
717
|
-
async getLocations(
|
|
718
|
-
storeType,
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
pageSize,
|
|
723
|
-
locationIds,
|
|
724
|
-
} = {}) {
|
|
725
|
-
const { error } = CompanyProfileValidator.getLocations().validate(
|
|
796
|
+
async getLocations(
|
|
797
|
+
{ storeType, q, stage, pageNo, pageSize, locationIds } = {},
|
|
798
|
+
{ headers } = { headers: false }
|
|
799
|
+
) {
|
|
800
|
+
const { error } = CompanyProfilePlatformValidator.getLocations().validate(
|
|
726
801
|
{
|
|
727
802
|
storeType,
|
|
728
803
|
q,
|
|
@@ -738,7 +813,9 @@ class CompanyProfile {
|
|
|
738
813
|
}
|
|
739
814
|
|
|
740
815
|
// Showing warrnings if extra unknown parameters are found
|
|
741
|
-
const {
|
|
816
|
+
const {
|
|
817
|
+
error: warrning,
|
|
818
|
+
} = CompanyProfilePlatformValidator.getLocations().validate(
|
|
742
819
|
{
|
|
743
820
|
storeType,
|
|
744
821
|
q,
|
|
@@ -752,9 +829,8 @@ class CompanyProfile {
|
|
|
752
829
|
if (warrning) {
|
|
753
830
|
Logger({
|
|
754
831
|
level: "WARN",
|
|
755
|
-
message:
|
|
832
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > getLocations \n ${warrning}`,
|
|
756
833
|
});
|
|
757
|
-
Logger({ level: "WARN", message: warrning });
|
|
758
834
|
}
|
|
759
835
|
|
|
760
836
|
const query_params = {};
|
|
@@ -773,22 +849,27 @@ class CompanyProfile {
|
|
|
773
849
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
|
|
774
850
|
query_params,
|
|
775
851
|
undefined,
|
|
776
|
-
xHeaders
|
|
852
|
+
xHeaders,
|
|
853
|
+
{ headers }
|
|
777
854
|
);
|
|
778
855
|
|
|
856
|
+
let responseData = response;
|
|
857
|
+
if (headers) {
|
|
858
|
+
responseData = response[0];
|
|
859
|
+
}
|
|
860
|
+
|
|
779
861
|
const {
|
|
780
862
|
error: res_error,
|
|
781
|
-
} =
|
|
782
|
-
|
|
783
|
-
allowUnknown: false
|
|
784
|
-
|
|
863
|
+
} = CompanyProfilePlatformModel.LocationListSerializer().validate(
|
|
864
|
+
responseData,
|
|
865
|
+
{ abortEarly: false, allowUnknown: false }
|
|
866
|
+
);
|
|
785
867
|
|
|
786
868
|
if (res_error) {
|
|
787
869
|
Logger({
|
|
788
870
|
level: "WARN",
|
|
789
|
-
message:
|
|
871
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > getLocations \n ${res_error}`,
|
|
790
872
|
});
|
|
791
|
-
Logger({ level: "WARN", message: res_error });
|
|
792
873
|
}
|
|
793
874
|
|
|
794
875
|
return response;
|
|
@@ -804,6 +885,7 @@ class CompanyProfile {
|
|
|
804
885
|
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
805
886
|
* page. Default is 10.
|
|
806
887
|
* @param {number[]} [arg.locationIds] - Helps to filter stores on the basis of uids.
|
|
888
|
+
* @returns {Paginator<CompanyProfilePlatformModel.LocationListSerializer>}
|
|
807
889
|
* @summary: Get list of locations
|
|
808
890
|
* @description: This API allows to view all the locations associated to a company.
|
|
809
891
|
*/
|
|
@@ -832,14 +914,16 @@ class CompanyProfile {
|
|
|
832
914
|
}
|
|
833
915
|
|
|
834
916
|
/**
|
|
835
|
-
* @param {
|
|
836
|
-
* @param {
|
|
837
|
-
* @returns {Promise<ProfileSuccessResponse>} -
|
|
917
|
+
* @param {CompanyProfilePlatformValidator.UpdateCompanyParam} arg - Arg object
|
|
918
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
919
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
920
|
+
* Success response
|
|
921
|
+
* @name updateCompany
|
|
838
922
|
* @summary: Edit company profile
|
|
839
|
-
* @description: This API allows to edit the company profile of the seller account.
|
|
923
|
+
* @description: This API allows to edit the company profile of the seller account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/updateCompany/).
|
|
840
924
|
*/
|
|
841
|
-
async updateCompany({ body } = {}) {
|
|
842
|
-
const { error } =
|
|
925
|
+
async updateCompany({ body } = {}, { headers } = { headers: false }) {
|
|
926
|
+
const { error } = CompanyProfilePlatformValidator.updateCompany().validate(
|
|
843
927
|
{
|
|
844
928
|
body,
|
|
845
929
|
},
|
|
@@ -852,7 +936,7 @@ class CompanyProfile {
|
|
|
852
936
|
// Showing warrnings if extra unknown parameters are found
|
|
853
937
|
const {
|
|
854
938
|
error: warrning,
|
|
855
|
-
} =
|
|
939
|
+
} = CompanyProfilePlatformValidator.updateCompany().validate(
|
|
856
940
|
{
|
|
857
941
|
body,
|
|
858
942
|
},
|
|
@@ -861,9 +945,8 @@ class CompanyProfile {
|
|
|
861
945
|
if (warrning) {
|
|
862
946
|
Logger({
|
|
863
947
|
level: "WARN",
|
|
864
|
-
message:
|
|
948
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > updateCompany \n ${warrning}`,
|
|
865
949
|
});
|
|
866
|
-
Logger({ level: "WARN", message: warrning });
|
|
867
950
|
}
|
|
868
951
|
|
|
869
952
|
const query_params = {};
|
|
@@ -876,37 +959,46 @@ class CompanyProfile {
|
|
|
876
959
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
|
|
877
960
|
query_params,
|
|
878
961
|
body,
|
|
879
|
-
xHeaders
|
|
962
|
+
xHeaders,
|
|
963
|
+
{ headers }
|
|
880
964
|
);
|
|
881
965
|
|
|
966
|
+
let responseData = response;
|
|
967
|
+
if (headers) {
|
|
968
|
+
responseData = response[0];
|
|
969
|
+
}
|
|
970
|
+
|
|
882
971
|
const {
|
|
883
972
|
error: res_error,
|
|
884
|
-
} =
|
|
885
|
-
|
|
886
|
-
allowUnknown: false
|
|
887
|
-
|
|
973
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
974
|
+
responseData,
|
|
975
|
+
{ abortEarly: false, allowUnknown: false }
|
|
976
|
+
);
|
|
888
977
|
|
|
889
978
|
if (res_error) {
|
|
890
979
|
Logger({
|
|
891
980
|
level: "WARN",
|
|
892
|
-
message:
|
|
981
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > updateCompany \n ${res_error}`,
|
|
893
982
|
});
|
|
894
|
-
Logger({ level: "WARN", message: res_error });
|
|
895
983
|
}
|
|
896
984
|
|
|
897
985
|
return response;
|
|
898
986
|
}
|
|
899
987
|
|
|
900
988
|
/**
|
|
901
|
-
* @param {
|
|
902
|
-
* @param {
|
|
903
|
-
* @
|
|
904
|
-
*
|
|
989
|
+
* @param {CompanyProfilePlatformValidator.UpdateLocationParam} arg - Arg object
|
|
990
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
991
|
+
* @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
|
|
992
|
+
* Success response
|
|
993
|
+
* @name updateLocation
|
|
905
994
|
* @summary: Edit a location asscoiated to a company.
|
|
906
|
-
* @description: This API allows to edit a location associated to a company.
|
|
995
|
+
* @description: This API allows to edit a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/updateLocation/).
|
|
907
996
|
*/
|
|
908
|
-
async updateLocation(
|
|
909
|
-
|
|
997
|
+
async updateLocation(
|
|
998
|
+
{ locationId, body } = {},
|
|
999
|
+
{ headers } = { headers: false }
|
|
1000
|
+
) {
|
|
1001
|
+
const { error } = CompanyProfilePlatformValidator.updateLocation().validate(
|
|
910
1002
|
{
|
|
911
1003
|
locationId,
|
|
912
1004
|
body,
|
|
@@ -920,7 +1012,7 @@ class CompanyProfile {
|
|
|
920
1012
|
// Showing warrnings if extra unknown parameters are found
|
|
921
1013
|
const {
|
|
922
1014
|
error: warrning,
|
|
923
|
-
} =
|
|
1015
|
+
} = CompanyProfilePlatformValidator.updateLocation().validate(
|
|
924
1016
|
{
|
|
925
1017
|
locationId,
|
|
926
1018
|
body,
|
|
@@ -930,9 +1022,8 @@ class CompanyProfile {
|
|
|
930
1022
|
if (warrning) {
|
|
931
1023
|
Logger({
|
|
932
1024
|
level: "WARN",
|
|
933
|
-
message:
|
|
1025
|
+
message: `Parameter Validation warrnings for platform > CompanyProfile > updateLocation \n ${warrning}`,
|
|
934
1026
|
});
|
|
935
|
-
Logger({ level: "WARN", message: warrning });
|
|
936
1027
|
}
|
|
937
1028
|
|
|
938
1029
|
const query_params = {};
|
|
@@ -945,22 +1036,27 @@ class CompanyProfile {
|
|
|
945
1036
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
|
|
946
1037
|
query_params,
|
|
947
1038
|
body,
|
|
948
|
-
xHeaders
|
|
1039
|
+
xHeaders,
|
|
1040
|
+
{ headers }
|
|
949
1041
|
);
|
|
950
1042
|
|
|
1043
|
+
let responseData = response;
|
|
1044
|
+
if (headers) {
|
|
1045
|
+
responseData = response[0];
|
|
1046
|
+
}
|
|
1047
|
+
|
|
951
1048
|
const {
|
|
952
1049
|
error: res_error,
|
|
953
|
-
} =
|
|
954
|
-
|
|
955
|
-
allowUnknown: false
|
|
956
|
-
|
|
1050
|
+
} = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
|
|
1051
|
+
responseData,
|
|
1052
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1053
|
+
);
|
|
957
1054
|
|
|
958
1055
|
if (res_error) {
|
|
959
1056
|
Logger({
|
|
960
1057
|
level: "WARN",
|
|
961
|
-
message:
|
|
1058
|
+
message: `Response Validation Warnnings for platform > CompanyProfile > updateLocation \n ${res_error}`,
|
|
962
1059
|
});
|
|
963
|
-
Logger({ level: "WARN", message: res_error });
|
|
964
1060
|
}
|
|
965
1061
|
|
|
966
1062
|
return response;
|