@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 FileStoragePlatformValidator = require("./FileStoragePlatformValidator");
|
|
5
|
+
const FileStoragePlatformModel = require("./FileStoragePlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -14,19 +14,15 @@ class FileStorage {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* @param {
|
|
18
|
-
* @param {
|
|
19
|
-
* @
|
|
20
|
-
* @
|
|
17
|
+
* @param {FileStoragePlatformValidator.BrowseParam} arg - Arg object
|
|
18
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
19
|
+
* @returns {Promise<FileStoragePlatformModel.BrowseResponse>} - Success response
|
|
20
|
+
* @name browse
|
|
21
21
|
* @summary: Browse Files
|
|
22
|
-
* @description: Browse Files
|
|
22
|
+
* @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browse/).
|
|
23
23
|
*/
|
|
24
|
-
async browse({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
pageNo,
|
|
28
|
-
} = {}) {
|
|
29
|
-
const { error } = FileStorageValidator.browse().validate(
|
|
24
|
+
async browse({ namespace, pageNo } = {}, { headers } = { headers: false }) {
|
|
25
|
+
const { error } = FileStoragePlatformValidator.browse().validate(
|
|
30
26
|
{
|
|
31
27
|
namespace,
|
|
32
28
|
|
|
@@ -39,7 +35,7 @@ class FileStorage {
|
|
|
39
35
|
}
|
|
40
36
|
|
|
41
37
|
// Showing warrnings if extra unknown parameters are found
|
|
42
|
-
const { error: warrning } =
|
|
38
|
+
const { error: warrning } = FileStoragePlatformValidator.browse().validate(
|
|
43
39
|
{
|
|
44
40
|
namespace,
|
|
45
41
|
|
|
@@ -50,9 +46,8 @@ class FileStorage {
|
|
|
50
46
|
if (warrning) {
|
|
51
47
|
Logger({
|
|
52
48
|
level: "WARN",
|
|
53
|
-
message:
|
|
49
|
+
message: `Parameter Validation warrnings for platform > FileStorage > browse \n ${warrning}`,
|
|
54
50
|
});
|
|
55
|
-
Logger({ level: "WARN", message: warrning });
|
|
56
51
|
}
|
|
57
52
|
|
|
58
53
|
const query_params = {};
|
|
@@ -66,12 +61,18 @@ class FileStorage {
|
|
|
66
61
|
`/service/platform/assets/v1.0/company/${this.config.companyId}/namespaces/${namespace}/browse/`,
|
|
67
62
|
query_params,
|
|
68
63
|
undefined,
|
|
69
|
-
xHeaders
|
|
64
|
+
xHeaders,
|
|
65
|
+
{ headers }
|
|
70
66
|
);
|
|
71
67
|
|
|
68
|
+
let responseData = response;
|
|
69
|
+
if (headers) {
|
|
70
|
+
responseData = response[0];
|
|
71
|
+
}
|
|
72
|
+
|
|
72
73
|
const {
|
|
73
74
|
error: res_error,
|
|
74
|
-
} =
|
|
75
|
+
} = FileStoragePlatformModel.BrowseResponse().validate(responseData, {
|
|
75
76
|
abortEarly: false,
|
|
76
77
|
allowUnknown: false,
|
|
77
78
|
});
|
|
@@ -79,9 +80,8 @@ class FileStorage {
|
|
|
79
80
|
if (res_error) {
|
|
80
81
|
Logger({
|
|
81
82
|
level: "WARN",
|
|
82
|
-
message:
|
|
83
|
+
message: `Response Validation Warnnings for platform > FileStorage > browse \n ${res_error}`,
|
|
83
84
|
});
|
|
84
|
-
Logger({ level: "WARN", message: res_error });
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
return response;
|
|
@@ -90,6 +90,7 @@ class FileStorage {
|
|
|
90
90
|
/**
|
|
91
91
|
* @param {Object} arg - Arg object.
|
|
92
92
|
* @param {string} arg.namespace - Bucket name
|
|
93
|
+
* @returns {Paginator<FileStoragePlatformModel.BrowseResponse>}
|
|
93
94
|
* @summary: Browse Files
|
|
94
95
|
* @description: Browse Files
|
|
95
96
|
*/
|
|
@@ -115,13 +116,10 @@ class FileStorage {
|
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
/**
|
|
118
|
-
* @param {
|
|
119
|
-
* @param {
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* stored inside the storage bucket.
|
|
123
|
-
* @param {StartResponse} arg.body
|
|
124
|
-
* @returns {Promise<CompleteResponse>} - Success response
|
|
119
|
+
* @param {FileStoragePlatformValidator.CompleteUploadParam} arg - Arg object
|
|
120
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
121
|
+
* @returns {Promise<FileStoragePlatformModel.CompleteResponse>} - Success response
|
|
122
|
+
* @name completeUpload
|
|
125
123
|
* @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
|
|
126
124
|
* @description: Uploads an arbitrarily sized buffer or blob.
|
|
127
125
|
*
|
|
@@ -141,13 +139,13 @@ class FileStorage {
|
|
|
141
139
|
* ### Complete
|
|
142
140
|
* After successfully upload, call `completeUpload` api to complete the upload process.
|
|
143
141
|
* This operation will return the url for the uploaded file.
|
|
142
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/completeUpload/).
|
|
144
143
|
*/
|
|
145
|
-
async completeUpload(
|
|
146
|
-
namespace,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
const { error } = FileStorageValidator.completeUpload().validate(
|
|
144
|
+
async completeUpload(
|
|
145
|
+
{ namespace, body } = {},
|
|
146
|
+
{ headers } = { headers: false }
|
|
147
|
+
) {
|
|
148
|
+
const { error } = FileStoragePlatformValidator.completeUpload().validate(
|
|
151
149
|
{
|
|
152
150
|
namespace,
|
|
153
151
|
|
|
@@ -160,7 +158,9 @@ class FileStorage {
|
|
|
160
158
|
}
|
|
161
159
|
|
|
162
160
|
// Showing warrnings if extra unknown parameters are found
|
|
163
|
-
const {
|
|
161
|
+
const {
|
|
162
|
+
error: warrning,
|
|
163
|
+
} = FileStoragePlatformValidator.completeUpload().validate(
|
|
164
164
|
{
|
|
165
165
|
namespace,
|
|
166
166
|
|
|
@@ -171,9 +171,8 @@ class FileStorage {
|
|
|
171
171
|
if (warrning) {
|
|
172
172
|
Logger({
|
|
173
173
|
level: "WARN",
|
|
174
|
-
message:
|
|
174
|
+
message: `Parameter Validation warrnings for platform > FileStorage > completeUpload \n ${warrning}`,
|
|
175
175
|
});
|
|
176
|
-
Logger({ level: "WARN", message: warrning });
|
|
177
176
|
}
|
|
178
177
|
|
|
179
178
|
const query_params = {};
|
|
@@ -186,12 +185,18 @@ class FileStorage {
|
|
|
186
185
|
`/service/platform/assets/v1.0/company/${this.config.companyId}/namespaces/${namespace}/upload/complete/`,
|
|
187
186
|
query_params,
|
|
188
187
|
body,
|
|
189
|
-
xHeaders
|
|
188
|
+
xHeaders,
|
|
189
|
+
{ headers }
|
|
190
190
|
);
|
|
191
191
|
|
|
192
|
+
let responseData = response;
|
|
193
|
+
if (headers) {
|
|
194
|
+
responseData = response[0];
|
|
195
|
+
}
|
|
196
|
+
|
|
192
197
|
const {
|
|
193
198
|
error: res_error,
|
|
194
|
-
} =
|
|
199
|
+
} = FileStoragePlatformModel.CompleteResponse().validate(responseData, {
|
|
195
200
|
abortEarly: false,
|
|
196
201
|
allowUnknown: false,
|
|
197
202
|
});
|
|
@@ -199,24 +204,23 @@ class FileStorage {
|
|
|
199
204
|
if (res_error) {
|
|
200
205
|
Logger({
|
|
201
206
|
level: "WARN",
|
|
202
|
-
message:
|
|
207
|
+
message: `Response Validation Warnnings for platform > FileStorage > completeUpload \n ${res_error}`,
|
|
203
208
|
});
|
|
204
|
-
Logger({ level: "WARN", message: res_error });
|
|
205
209
|
}
|
|
206
210
|
|
|
207
211
|
return response;
|
|
208
212
|
}
|
|
209
213
|
|
|
210
214
|
/**
|
|
211
|
-
* @param {
|
|
212
|
-
* @param {
|
|
213
|
-
* @
|
|
214
|
-
* @
|
|
215
|
+
* @param {FileStoragePlatformValidator.CopyFilesParam} arg - Arg object
|
|
216
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
217
|
+
* @returns {Promise<FileStoragePlatformModel.BulkUploadResponse>} - Success response
|
|
218
|
+
* @name copyFiles
|
|
215
219
|
* @summary: Copy Files
|
|
216
|
-
* @description: Copy Files
|
|
220
|
+
* @description: Copy Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/copyFiles/).
|
|
217
221
|
*/
|
|
218
|
-
async copyFiles({ body, sync } = {}) {
|
|
219
|
-
const { error } =
|
|
222
|
+
async copyFiles({ body, sync } = {}, { headers } = { headers: false }) {
|
|
223
|
+
const { error } = FileStoragePlatformValidator.copyFiles().validate(
|
|
220
224
|
{
|
|
221
225
|
body,
|
|
222
226
|
sync,
|
|
@@ -228,7 +232,9 @@ class FileStorage {
|
|
|
228
232
|
}
|
|
229
233
|
|
|
230
234
|
// Showing warrnings if extra unknown parameters are found
|
|
231
|
-
const {
|
|
235
|
+
const {
|
|
236
|
+
error: warrning,
|
|
237
|
+
} = FileStoragePlatformValidator.copyFiles().validate(
|
|
232
238
|
{
|
|
233
239
|
body,
|
|
234
240
|
sync,
|
|
@@ -238,9 +244,8 @@ class FileStorage {
|
|
|
238
244
|
if (warrning) {
|
|
239
245
|
Logger({
|
|
240
246
|
level: "WARN",
|
|
241
|
-
message:
|
|
247
|
+
message: `Parameter Validation warrnings for platform > FileStorage > copyFiles \n ${warrning}`,
|
|
242
248
|
});
|
|
243
|
-
Logger({ level: "WARN", message: warrning });
|
|
244
249
|
}
|
|
245
250
|
|
|
246
251
|
const query_params = {};
|
|
@@ -254,12 +259,18 @@ class FileStorage {
|
|
|
254
259
|
`/service/platform/assets/v1.0/company/${this.config.companyId}/uploads/copy/`,
|
|
255
260
|
query_params,
|
|
256
261
|
body,
|
|
257
|
-
xHeaders
|
|
262
|
+
xHeaders,
|
|
263
|
+
{ headers }
|
|
258
264
|
);
|
|
259
265
|
|
|
266
|
+
let responseData = response;
|
|
267
|
+
if (headers) {
|
|
268
|
+
responseData = response[0];
|
|
269
|
+
}
|
|
270
|
+
|
|
260
271
|
const {
|
|
261
272
|
error: res_error,
|
|
262
|
-
} =
|
|
273
|
+
} = FileStoragePlatformModel.BulkUploadResponse().validate(responseData, {
|
|
263
274
|
abortEarly: false,
|
|
264
275
|
allowUnknown: false,
|
|
265
276
|
});
|
|
@@ -267,23 +278,23 @@ class FileStorage {
|
|
|
267
278
|
if (res_error) {
|
|
268
279
|
Logger({
|
|
269
280
|
level: "WARN",
|
|
270
|
-
message:
|
|
281
|
+
message: `Response Validation Warnnings for platform > FileStorage > copyFiles \n ${res_error}`,
|
|
271
282
|
});
|
|
272
|
-
Logger({ level: "WARN", message: res_error });
|
|
273
283
|
}
|
|
274
284
|
|
|
275
285
|
return response;
|
|
276
286
|
}
|
|
277
287
|
|
|
278
288
|
/**
|
|
279
|
-
* @param {
|
|
280
|
-
* @param {
|
|
281
|
-
* @returns {Promise<SignUrlResponse>} - Success response
|
|
289
|
+
* @param {FileStoragePlatformValidator.GetSignUrlsParam} arg - Arg object
|
|
290
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
291
|
+
* @returns {Promise<FileStoragePlatformModel.SignUrlResponse>} - Success response
|
|
292
|
+
* @name getSignUrls
|
|
282
293
|
* @summary: Gives signed urls to access private files
|
|
283
|
-
* @description: Describe here
|
|
294
|
+
* @description: Describe here - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getSignUrls/).
|
|
284
295
|
*/
|
|
285
|
-
async getSignUrls({ body } = {}) {
|
|
286
|
-
const { error } =
|
|
296
|
+
async getSignUrls({ body } = {}, { headers } = { headers: false }) {
|
|
297
|
+
const { error } = FileStoragePlatformValidator.getSignUrls().validate(
|
|
287
298
|
{
|
|
288
299
|
body,
|
|
289
300
|
},
|
|
@@ -294,7 +305,9 @@ class FileStorage {
|
|
|
294
305
|
}
|
|
295
306
|
|
|
296
307
|
// Showing warrnings if extra unknown parameters are found
|
|
297
|
-
const {
|
|
308
|
+
const {
|
|
309
|
+
error: warrning,
|
|
310
|
+
} = FileStoragePlatformValidator.getSignUrls().validate(
|
|
298
311
|
{
|
|
299
312
|
body,
|
|
300
313
|
},
|
|
@@ -303,9 +316,8 @@ class FileStorage {
|
|
|
303
316
|
if (warrning) {
|
|
304
317
|
Logger({
|
|
305
318
|
level: "WARN",
|
|
306
|
-
message:
|
|
319
|
+
message: `Parameter Validation warrnings for platform > FileStorage > getSignUrls \n ${warrning}`,
|
|
307
320
|
});
|
|
308
|
-
Logger({ level: "WARN", message: warrning });
|
|
309
321
|
}
|
|
310
322
|
|
|
311
323
|
const query_params = {};
|
|
@@ -318,12 +330,18 @@ class FileStorage {
|
|
|
318
330
|
`/service/platform/assets/v1.0/company/${this.config.companyId}/sign-urls/`,
|
|
319
331
|
query_params,
|
|
320
332
|
body,
|
|
321
|
-
xHeaders
|
|
333
|
+
xHeaders,
|
|
334
|
+
{ headers }
|
|
322
335
|
);
|
|
323
336
|
|
|
337
|
+
let responseData = response;
|
|
338
|
+
if (headers) {
|
|
339
|
+
responseData = response[0];
|
|
340
|
+
}
|
|
341
|
+
|
|
324
342
|
const {
|
|
325
343
|
error: res_error,
|
|
326
|
-
} =
|
|
344
|
+
} = FileStoragePlatformModel.SignUrlResponse().validate(responseData, {
|
|
327
345
|
abortEarly: false,
|
|
328
346
|
allowUnknown: false,
|
|
329
347
|
});
|
|
@@ -331,23 +349,23 @@ class FileStorage {
|
|
|
331
349
|
if (res_error) {
|
|
332
350
|
Logger({
|
|
333
351
|
level: "WARN",
|
|
334
|
-
message:
|
|
352
|
+
message: `Response Validation Warnnings for platform > FileStorage > getSignUrls \n ${res_error}`,
|
|
335
353
|
});
|
|
336
|
-
Logger({ level: "WARN", message: res_error });
|
|
337
354
|
}
|
|
338
355
|
|
|
339
356
|
return response;
|
|
340
357
|
}
|
|
341
358
|
|
|
342
359
|
/**
|
|
343
|
-
* @param {
|
|
344
|
-
* @param {
|
|
360
|
+
* @param {FileStoragePlatformValidator.ProxyParam} arg - Arg object
|
|
361
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
345
362
|
* @returns {Promise<string>} - Success response
|
|
363
|
+
* @name proxy
|
|
346
364
|
* @summary: Proxy
|
|
347
|
-
* @description: Proxy
|
|
365
|
+
* @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/proxy/).
|
|
348
366
|
*/
|
|
349
|
-
async proxy({ url } = {}) {
|
|
350
|
-
const { error } =
|
|
367
|
+
async proxy({ url } = {}, { headers } = { headers: false }) {
|
|
368
|
+
const { error } = FileStoragePlatformValidator.proxy().validate(
|
|
351
369
|
{
|
|
352
370
|
url,
|
|
353
371
|
},
|
|
@@ -358,7 +376,7 @@ class FileStorage {
|
|
|
358
376
|
}
|
|
359
377
|
|
|
360
378
|
// Showing warrnings if extra unknown parameters are found
|
|
361
|
-
const { error: warrning } =
|
|
379
|
+
const { error: warrning } = FileStoragePlatformValidator.proxy().validate(
|
|
362
380
|
{
|
|
363
381
|
url,
|
|
364
382
|
},
|
|
@@ -367,9 +385,8 @@ class FileStorage {
|
|
|
367
385
|
if (warrning) {
|
|
368
386
|
Logger({
|
|
369
387
|
level: "WARN",
|
|
370
|
-
message:
|
|
388
|
+
message: `Parameter Validation warrnings for platform > FileStorage > proxy \n ${warrning}`,
|
|
371
389
|
});
|
|
372
|
-
Logger({ level: "WARN", message: warrning });
|
|
373
390
|
}
|
|
374
391
|
|
|
375
392
|
const query_params = {};
|
|
@@ -383,32 +400,34 @@ class FileStorage {
|
|
|
383
400
|
`/service/platform/assets/v1.0/company/${this.config.companyId}/proxy/`,
|
|
384
401
|
query_params,
|
|
385
402
|
undefined,
|
|
386
|
-
xHeaders
|
|
403
|
+
xHeaders,
|
|
404
|
+
{ headers }
|
|
387
405
|
);
|
|
388
406
|
|
|
407
|
+
let responseData = response;
|
|
408
|
+
if (headers) {
|
|
409
|
+
responseData = response[0];
|
|
410
|
+
}
|
|
411
|
+
|
|
389
412
|
const { error: res_error } = Joi.string()
|
|
390
413
|
.allow("")
|
|
391
|
-
.validate(
|
|
414
|
+
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
392
415
|
|
|
393
416
|
if (res_error) {
|
|
394
417
|
Logger({
|
|
395
418
|
level: "WARN",
|
|
396
|
-
message:
|
|
419
|
+
message: `Response Validation Warnnings for platform > FileStorage > proxy \n ${res_error}`,
|
|
397
420
|
});
|
|
398
|
-
Logger({ level: "WARN", message: res_error });
|
|
399
421
|
}
|
|
400
422
|
|
|
401
423
|
return response;
|
|
402
424
|
}
|
|
403
425
|
|
|
404
426
|
/**
|
|
405
|
-
* @param {
|
|
406
|
-
* @param {
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
* stored inside the storage bucket.
|
|
410
|
-
* @param {StartRequest} arg.body
|
|
411
|
-
* @returns {Promise<StartResponse>} - Success response
|
|
427
|
+
* @param {FileStoragePlatformValidator.StartUploadParam} arg - Arg object
|
|
428
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
429
|
+
* @returns {Promise<FileStoragePlatformModel.StartResponse>} - Success response
|
|
430
|
+
* @name startUpload
|
|
412
431
|
* @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob.
|
|
413
432
|
* @description: Uploads an arbitrarily sized buffer or blob.
|
|
414
433
|
*
|
|
@@ -428,13 +447,13 @@ class FileStorage {
|
|
|
428
447
|
* ### Complete
|
|
429
448
|
* After successfully upload, call `completeUpload` api to complete the upload process.
|
|
430
449
|
* This operation will return the url for the uploaded file.
|
|
450
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/startUpload/).
|
|
431
451
|
*/
|
|
432
|
-
async startUpload(
|
|
433
|
-
namespace,
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
const { error } = FileStorageValidator.startUpload().validate(
|
|
452
|
+
async startUpload(
|
|
453
|
+
{ namespace, body } = {},
|
|
454
|
+
{ headers } = { headers: false }
|
|
455
|
+
) {
|
|
456
|
+
const { error } = FileStoragePlatformValidator.startUpload().validate(
|
|
438
457
|
{
|
|
439
458
|
namespace,
|
|
440
459
|
|
|
@@ -447,7 +466,9 @@ class FileStorage {
|
|
|
447
466
|
}
|
|
448
467
|
|
|
449
468
|
// Showing warrnings if extra unknown parameters are found
|
|
450
|
-
const {
|
|
469
|
+
const {
|
|
470
|
+
error: warrning,
|
|
471
|
+
} = FileStoragePlatformValidator.startUpload().validate(
|
|
451
472
|
{
|
|
452
473
|
namespace,
|
|
453
474
|
|
|
@@ -458,9 +479,8 @@ class FileStorage {
|
|
|
458
479
|
if (warrning) {
|
|
459
480
|
Logger({
|
|
460
481
|
level: "WARN",
|
|
461
|
-
message:
|
|
482
|
+
message: `Parameter Validation warrnings for platform > FileStorage > startUpload \n ${warrning}`,
|
|
462
483
|
});
|
|
463
|
-
Logger({ level: "WARN", message: warrning });
|
|
464
484
|
}
|
|
465
485
|
|
|
466
486
|
const query_params = {};
|
|
@@ -473,12 +493,18 @@ class FileStorage {
|
|
|
473
493
|
`/service/platform/assets/v1.0/company/${this.config.companyId}/namespaces/${namespace}/upload/start/`,
|
|
474
494
|
query_params,
|
|
475
495
|
body,
|
|
476
|
-
xHeaders
|
|
496
|
+
xHeaders,
|
|
497
|
+
{ headers }
|
|
477
498
|
);
|
|
478
499
|
|
|
500
|
+
let responseData = response;
|
|
501
|
+
if (headers) {
|
|
502
|
+
responseData = response[0];
|
|
503
|
+
}
|
|
504
|
+
|
|
479
505
|
const {
|
|
480
506
|
error: res_error,
|
|
481
|
-
} =
|
|
507
|
+
} = FileStoragePlatformModel.StartResponse().validate(responseData, {
|
|
482
508
|
abortEarly: false,
|
|
483
509
|
allowUnknown: false,
|
|
484
510
|
});
|
|
@@ -486,9 +512,8 @@ class FileStorage {
|
|
|
486
512
|
if (res_error) {
|
|
487
513
|
Logger({
|
|
488
514
|
level: "WARN",
|
|
489
|
-
message:
|
|
515
|
+
message: `Response Validation Warnnings for platform > FileStorage > startUpload \n ${res_error}`,
|
|
490
516
|
});
|
|
491
|
-
Logger({ level: "WARN", message: res_error });
|
|
492
517
|
}
|
|
493
518
|
|
|
494
519
|
return response;
|