@gofynd/fdk-client-javascript 1.0.1 → 1.0.3
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/documentation/application/CART.md +5934 -4502
- package/documentation/application/CATALOG.md +6338 -7245
- package/documentation/application/COMMON.md +95 -222
- package/documentation/application/COMMUNICATION.md +106 -186
- package/documentation/application/CONFIGURATION.md +903 -1597
- package/documentation/application/CONTENT.md +562 -1270
- package/documentation/application/FILESTORAGE.md +84 -220
- package/documentation/application/LEAD.md +314 -660
- package/documentation/application/LOGISTIC.md +229 -305
- package/documentation/application/ORDER.md +642 -1137
- package/documentation/application/PAYMENT.md +2285 -3031
- package/documentation/application/POSCART.md +6079 -4642
- package/documentation/application/REWARDS.md +94 -248
- package/documentation/application/SHARE.md +152 -250
- package/documentation/application/THEME.md +952 -1235
- package/documentation/application/USER.md +1228 -1765
- package/documentation/platform/ANALYTICS.md +207 -349
- package/documentation/platform/AUDITTRAIL.md +121 -204
- package/documentation/platform/BILLING.md +865 -1376
- package/documentation/platform/CART.md +2814 -3662
- package/documentation/platform/CATALOG.md +15266 -17619
- package/documentation/platform/COMMON.md +95 -222
- package/documentation/platform/COMMUNICATION.md +1632 -2380
- package/documentation/platform/COMPANYPROFILE.md +572 -957
- package/documentation/platform/CONFIGURATION.md +3050 -4073
- package/documentation/platform/CONTENT.md +3509 -4121
- package/documentation/platform/DISCOUNT.md +140 -236
- package/documentation/platform/FILESTORAGE.md +187 -323
- package/documentation/platform/INVENTORY.md +268 -911
- package/documentation/platform/LEAD.md +2195 -2541
- package/documentation/platform/ORDER.md +3750 -5636
- package/documentation/platform/PARTNER.md +9 -36
- package/documentation/platform/PAYMENT.md +903 -1213
- package/documentation/platform/REWARDS.md +183 -347
- package/documentation/platform/SHARE.md +120 -213
- package/documentation/platform/THEME.md +12956 -13239
- package/documentation/platform/USER.md +975 -1120
- package/documentation/platform/WEBHOOK.md +78 -184
- package/documentation/public/CONFIGURATION.md +95 -222
- package/documentation/public/INVENTORY.md +100 -282
- package/documentation/public/WEBHOOK.md +27 -133
- package/package.json +1 -1
- package/sdk/application/ApplicationConfig.js +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +1058 -547
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +489 -886
- package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
- package/sdk/application/Cart/CartApplicationValidator.js +98 -98
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
- package/sdk/application/Catalog/CatalogApplicationClient.js +1545 -949
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +692 -1258
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
- package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
- package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
- package/sdk/application/Common/CommonApplicationClient.js +76 -36
- package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
- package/sdk/application/Common/CommonApplicationModel.js +83 -160
- package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
- package/sdk/application/Common/CommonApplicationValidator.js +6 -6
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
- package/sdk/application/Communication/CommunicationApplicationClient.js +92 -31
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
- package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
- package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +638 -312
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
- package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
- package/sdk/application/Content/ContentApplicationClient.js +581 -213
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -75
- package/sdk/application/Content/ContentApplicationModel.js +468 -875
- package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
- package/sdk/application/Content/ContentApplicationValidator.js +24 -24
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +121 -59
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
- package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
- package/sdk/application/Lead/LeadApplicationClient.js +230 -96
- package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
- package/sdk/application/Lead/LeadApplicationModel.js +267 -474
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
- package/sdk/application/Logistic/LogisticApplicationClient.js +196 -47
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
- package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
- package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +86 -86
- package/sdk/application/Order/OrderApplicationClient.js +448 -215
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +357 -661
- package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
- package/sdk/application/Order/OrderApplicationValidator.js +28 -28
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
- package/sdk/application/Payment/PaymentApplicationClient.js +1525 -750
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +565 -1033
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
- package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
- package/sdk/application/PosCart/PosCartApplicationClient.js +1137 -606
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +61 -60
- package/sdk/application/PosCart/PosCartApplicationModel.js +477 -873
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
- package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
- package/sdk/application/Rewards/RewardsApplicationClient.js +253 -113
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
- package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
- package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
- package/sdk/application/Share/ShareApplicationClient.js +221 -96
- package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
- package/sdk/application/Share/ShareApplicationModel.js +63 -123
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationValidator.js +12 -12
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
- package/sdk/application/Theme/ThemeApplicationClient.js +115 -37
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
- package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
- package/sdk/application/User/UserApplicationClient.d.ts +280 -280
- package/sdk/application/User/UserApplicationClient.js +1201 -543
- package/sdk/application/User/UserApplicationModel.d.ts +79 -72
- package/sdk/application/User/UserApplicationModel.js +440 -689
- package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
- package/sdk/application/User/UserApplicationValidator.js +89 -89
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +55 -47
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +308 -151
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +103 -16
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +16 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +131 -44
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +68 -56
- package/sdk/platform/Billing/BillingPlatformClient.js +416 -171
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
- package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
- package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +176 -159
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +837 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
- package/sdk/platform/Cart/CartPlatformModel.d.ts +86 -85
- package/sdk/platform/Cart/CartPlatformModel.js +677 -1211
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +582 -529
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2642 -1533
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +708 -590
- package/sdk/platform/Catalog/CatalogPlatformClient.js +3103 -1362
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +293 -284
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2149 -3660
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -64
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +235 -216
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -12
- package/sdk/platform/Common/CommonPlatformClient.js +80 -37
- package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformModel.js +83 -160
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
- package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +333 -293
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1687 -855
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +28 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +70 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +463 -182
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -28
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +294 -557
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +175 -137
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1168 -521
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +137 -119
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +691 -316
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +542 -461
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +2600 -1160
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -49
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +159 -152
- package/sdk/platform/Content/ContentPlatformModel.d.ts +79 -75
- package/sdk/platform/Content/ContentPlatformModel.js +486 -867
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +72 -61
- package/sdk/platform/Discount/DiscountPlatformClient.js +424 -198
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +26 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +145 -59
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +58 -52
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +240 -114
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +76 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +461 -197
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
- package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +84 -71
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +441 -182
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +86 -75
- package/sdk/platform/Lead/LeadPlatformClient.js +434 -212
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
- package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
- package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
- package/sdk/platform/OAuthClient.js +8 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +14 -11
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +113 -49
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +367 -315
- package/sdk/platform/Order/OrderPlatformClient.js +1775 -893
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -192
- package/sdk/platform/Order/OrderPlatformModel.js +1591 -2822
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +160 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -8
- package/sdk/platform/Partner/PartnerPlatformModel.js +6 -22
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +65 -54
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +395 -164
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +55 -45
- package/sdk/platform/Payment/PaymentPlatformClient.js +362 -147
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +220 -408
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10153
- package/sdk/platform/PlatformApplicationClient.js +1584 -13691
- package/sdk/platform/PlatformClient.d.ts +7918 -7666
- package/sdk/platform/PlatformClient.js +8701 -9926
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +91 -78
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +507 -253
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
- package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -12
- package/sdk/platform/Share/SharePlatformApplicationClient.js +130 -52
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
- package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
- package/sdk/platform/Share/SharePlatformModel.js +60 -118
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +148 -124
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +770 -295
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
- package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +146 -67
- package/sdk/platform/User/UserPlatformApplicationClient.js +742 -155
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
- package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
- package/sdk/platform/User/UserPlatformModel.js +440 -689
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +35 -29
- package/sdk/platform/Webhook/WebhookPlatformClient.js +218 -91
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
- package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +81 -38
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
- package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
- package/sdk/public/Inventory/InventoryPublicClient.js +228 -105
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
- package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
- package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
- package/sdk/public/Webhook/WebhookPublicClient.js +51 -10
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/tests/application/catalog.spec.js +7 -0
|
@@ -2,6 +2,9 @@ const Paginator = require("../../common/Paginator");
|
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
4
4
|
const FileStorageValidator = require("./FileStoragePlatformValidator");
|
|
5
|
+
const FileStorageModel = require("./FileStoragePlatformModel");
|
|
6
|
+
const { Logger } = require("./../../common/Logger");
|
|
7
|
+
|
|
5
8
|
class FileStorage {
|
|
6
9
|
constructor(config) {
|
|
7
10
|
this.config = config;
|
|
@@ -10,32 +13,16 @@ class FileStorage {
|
|
|
10
13
|
/**
|
|
11
14
|
* @param {Object} arg - Arg object.
|
|
12
15
|
* @param {string} arg.namespace - Bucket name
|
|
13
|
-
* @param {
|
|
14
|
-
* @
|
|
15
|
-
* @
|
|
16
|
-
*
|
|
17
|
-
* It has three Major Steps:
|
|
18
|
-
* Start
|
|
19
|
-
* Upload
|
|
20
|
-
* Complete
|
|
21
|
-
*
|
|
22
|
-
* ### Start
|
|
23
|
-
* Initiates the assets upload using `startUpload`.
|
|
24
|
-
* It returns the storage link in response.
|
|
25
|
-
*
|
|
26
|
-
* ### Upload
|
|
27
|
-
* Use the storage link to upload a file (Buffer or Blob) to the File Storage.
|
|
28
|
-
* Make a `PUT` request on storage link received from `startUpload` api with file (Buffer or Blob) as a request body.
|
|
29
|
-
*
|
|
30
|
-
* ### Complete
|
|
31
|
-
* After successfully upload, call `completeUpload` api to complete the upload process.
|
|
32
|
-
* This operation will return the url for the uploaded file.
|
|
16
|
+
* @param {number} [arg.pageNo] - Page no
|
|
17
|
+
* @returns {Promise<BrowseResponse>} - Success response
|
|
18
|
+
* @summary: Browse Files
|
|
19
|
+
* @description: Browse Files
|
|
33
20
|
*/
|
|
34
|
-
|
|
35
|
-
const { error } = FileStorageValidator.
|
|
21
|
+
async browse({ namespace, pageNo } = {}) {
|
|
22
|
+
const { error } = FileStorageValidator.browse().validate(
|
|
36
23
|
{
|
|
37
24
|
namespace,
|
|
38
|
-
|
|
25
|
+
pageNo,
|
|
39
26
|
},
|
|
40
27
|
{ abortEarly: false, allowUnknown: true }
|
|
41
28
|
);
|
|
@@ -44,36 +31,84 @@ class FileStorage {
|
|
|
44
31
|
}
|
|
45
32
|
|
|
46
33
|
// Showing warrnings if extra unknown parameters are found
|
|
47
|
-
const { error: warrning } = FileStorageValidator.
|
|
34
|
+
const { error: warrning } = FileStorageValidator.browse().validate(
|
|
48
35
|
{
|
|
49
36
|
namespace,
|
|
50
|
-
|
|
37
|
+
pageNo,
|
|
51
38
|
},
|
|
52
39
|
{ abortEarly: false, allowUnknown: false }
|
|
53
40
|
);
|
|
54
41
|
if (warrning) {
|
|
55
|
-
|
|
56
|
-
|
|
42
|
+
Logger({
|
|
43
|
+
level: "WARN",
|
|
44
|
+
message: "Parameter Validation warrnings for browse",
|
|
45
|
+
});
|
|
46
|
+
Logger({ level: "WARN", message: warrning });
|
|
57
47
|
}
|
|
58
48
|
|
|
59
49
|
const query_params = {};
|
|
50
|
+
query_params["page_no"] = pageNo;
|
|
60
51
|
|
|
61
52
|
const xHeaders = {};
|
|
62
53
|
|
|
63
|
-
|
|
54
|
+
const response = await PlatformAPIClient.execute(
|
|
64
55
|
this.config,
|
|
65
|
-
"
|
|
66
|
-
`/service/platform/assets/v1.0/company/${this.config.companyId}/namespaces/${namespace}/
|
|
56
|
+
"get",
|
|
57
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/namespaces/${namespace}/browse/`,
|
|
67
58
|
query_params,
|
|
68
|
-
|
|
59
|
+
undefined,
|
|
69
60
|
xHeaders
|
|
70
61
|
);
|
|
62
|
+
|
|
63
|
+
const {
|
|
64
|
+
error: res_error,
|
|
65
|
+
} = FileStorageModel.BrowseResponse().validate(response, {
|
|
66
|
+
abortEarly: false,
|
|
67
|
+
allowUnknown: false,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
if (res_error) {
|
|
71
|
+
Logger({
|
|
72
|
+
level: "WARN",
|
|
73
|
+
message: "Response Validation Warnnings for browse",
|
|
74
|
+
});
|
|
75
|
+
Logger({ level: "WARN", message: res_error });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return response;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @param {Object} arg - Arg object.
|
|
83
|
+
* @param {string} arg.namespace - Bucket name
|
|
84
|
+
* @summary: Browse Files
|
|
85
|
+
* @description: Browse Files
|
|
86
|
+
*/
|
|
87
|
+
browsePaginator({ namespace } = {}) {
|
|
88
|
+
const paginator = new Paginator();
|
|
89
|
+
const callback = async () => {
|
|
90
|
+
const pageId = paginator.nextId;
|
|
91
|
+
const pageNo = paginator.pageNo;
|
|
92
|
+
const pageType = "number";
|
|
93
|
+
const data = await this.browse({
|
|
94
|
+
namespace: namespace,
|
|
95
|
+
pageNo: pageNo,
|
|
96
|
+
});
|
|
97
|
+
paginator.setPaginator({
|
|
98
|
+
hasNext: data.page.has_next ? true : false,
|
|
99
|
+
nextId: data.page.next_id,
|
|
100
|
+
});
|
|
101
|
+
return data;
|
|
102
|
+
};
|
|
103
|
+
paginator.setCallback(callback);
|
|
104
|
+
return paginator;
|
|
71
105
|
}
|
|
72
106
|
|
|
73
107
|
/**
|
|
74
108
|
* @param {Object} arg - Arg object.
|
|
75
109
|
* @param {string} arg.namespace - Bucket name
|
|
76
110
|
* @param {StartResponse} arg.body
|
|
111
|
+
* @returns {Promise<CompleteResponse>} - Success response
|
|
77
112
|
* @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
|
|
78
113
|
* @description: Uploads an arbitrarily sized buffer or blob.
|
|
79
114
|
*
|
|
@@ -94,7 +129,7 @@ class FileStorage {
|
|
|
94
129
|
* After successfully upload, call `completeUpload` api to complete the upload process.
|
|
95
130
|
* This operation will return the url for the uploaded file.
|
|
96
131
|
*/
|
|
97
|
-
completeUpload({ namespace, body } = {}) {
|
|
132
|
+
async completeUpload({ namespace, body } = {}) {
|
|
98
133
|
const { error } = FileStorageValidator.completeUpload().validate(
|
|
99
134
|
{
|
|
100
135
|
namespace,
|
|
@@ -115,15 +150,18 @@ class FileStorage {
|
|
|
115
150
|
{ abortEarly: false, allowUnknown: false }
|
|
116
151
|
);
|
|
117
152
|
if (warrning) {
|
|
118
|
-
|
|
119
|
-
|
|
153
|
+
Logger({
|
|
154
|
+
level: "WARN",
|
|
155
|
+
message: "Parameter Validation warrnings for completeUpload",
|
|
156
|
+
});
|
|
157
|
+
Logger({ level: "WARN", message: warrning });
|
|
120
158
|
}
|
|
121
159
|
|
|
122
160
|
const query_params = {};
|
|
123
161
|
|
|
124
162
|
const xHeaders = {};
|
|
125
163
|
|
|
126
|
-
|
|
164
|
+
const response = await PlatformAPIClient.execute(
|
|
127
165
|
this.config,
|
|
128
166
|
"post",
|
|
129
167
|
`/service/platform/assets/v1.0/company/${this.config.companyId}/namespaces/${namespace}/upload/complete/`,
|
|
@@ -131,18 +169,38 @@ class FileStorage {
|
|
|
131
169
|
body,
|
|
132
170
|
xHeaders
|
|
133
171
|
);
|
|
172
|
+
|
|
173
|
+
const {
|
|
174
|
+
error: res_error,
|
|
175
|
+
} = FileStorageModel.CompleteResponse().validate(response, {
|
|
176
|
+
abortEarly: false,
|
|
177
|
+
allowUnknown: false,
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
if (res_error) {
|
|
181
|
+
Logger({
|
|
182
|
+
level: "WARN",
|
|
183
|
+
message: "Response Validation Warnnings for completeUpload",
|
|
184
|
+
});
|
|
185
|
+
Logger({ level: "WARN", message: res_error });
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return response;
|
|
134
189
|
}
|
|
135
190
|
|
|
136
191
|
/**
|
|
137
192
|
* @param {Object} arg - Arg object.
|
|
138
|
-
* @param {
|
|
139
|
-
* @
|
|
140
|
-
* @
|
|
193
|
+
* @param {boolean} [arg.sync] - Sync
|
|
194
|
+
* @param {BulkRequest} arg.body
|
|
195
|
+
* @returns {Promise<BulkUploadResponse>} - Success response
|
|
196
|
+
* @summary: Copy Files
|
|
197
|
+
* @description: Copy Files
|
|
141
198
|
*/
|
|
142
|
-
|
|
143
|
-
const { error } = FileStorageValidator.
|
|
199
|
+
async copyFiles({ body, sync } = {}) {
|
|
200
|
+
const { error } = FileStorageValidator.copyFiles().validate(
|
|
144
201
|
{
|
|
145
202
|
body,
|
|
203
|
+
sync,
|
|
146
204
|
},
|
|
147
205
|
{ abortEarly: false, allowUnknown: true }
|
|
148
206
|
);
|
|
@@ -151,43 +209,64 @@ class FileStorage {
|
|
|
151
209
|
}
|
|
152
210
|
|
|
153
211
|
// Showing warrnings if extra unknown parameters are found
|
|
154
|
-
const { error: warrning } = FileStorageValidator.
|
|
212
|
+
const { error: warrning } = FileStorageValidator.copyFiles().validate(
|
|
155
213
|
{
|
|
156
214
|
body,
|
|
215
|
+
sync,
|
|
157
216
|
},
|
|
158
217
|
{ abortEarly: false, allowUnknown: false }
|
|
159
218
|
);
|
|
160
219
|
if (warrning) {
|
|
161
|
-
|
|
162
|
-
|
|
220
|
+
Logger({
|
|
221
|
+
level: "WARN",
|
|
222
|
+
message: "Parameter Validation warrnings for copyFiles",
|
|
223
|
+
});
|
|
224
|
+
Logger({ level: "WARN", message: warrning });
|
|
163
225
|
}
|
|
164
226
|
|
|
165
227
|
const query_params = {};
|
|
228
|
+
query_params["sync"] = sync;
|
|
166
229
|
|
|
167
230
|
const xHeaders = {};
|
|
168
231
|
|
|
169
|
-
|
|
232
|
+
const response = await PlatformAPIClient.execute(
|
|
170
233
|
this.config,
|
|
171
234
|
"post",
|
|
172
|
-
`/service/platform/assets/v1.0/company/${this.config.companyId}/
|
|
235
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/uploads/copy/`,
|
|
173
236
|
query_params,
|
|
174
237
|
body,
|
|
175
238
|
xHeaders
|
|
176
239
|
);
|
|
240
|
+
|
|
241
|
+
const {
|
|
242
|
+
error: res_error,
|
|
243
|
+
} = FileStorageModel.BulkUploadResponse().validate(response, {
|
|
244
|
+
abortEarly: false,
|
|
245
|
+
allowUnknown: false,
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
if (res_error) {
|
|
249
|
+
Logger({
|
|
250
|
+
level: "WARN",
|
|
251
|
+
message: "Response Validation Warnnings for copyFiles",
|
|
252
|
+
});
|
|
253
|
+
Logger({ level: "WARN", message: res_error });
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
return response;
|
|
177
257
|
}
|
|
178
258
|
|
|
179
259
|
/**
|
|
180
260
|
* @param {Object} arg - Arg object.
|
|
181
|
-
* @param {
|
|
182
|
-
* @
|
|
183
|
-
* @summary:
|
|
184
|
-
* @description:
|
|
261
|
+
* @param {SignUrlRequest} arg.body
|
|
262
|
+
* @returns {Promise<SignUrlResponse>} - Success response
|
|
263
|
+
* @summary: Gives signed urls to access private files
|
|
264
|
+
* @description: Describe here
|
|
185
265
|
*/
|
|
186
|
-
|
|
187
|
-
const { error } = FileStorageValidator.
|
|
266
|
+
async getSignUrls({ body } = {}) {
|
|
267
|
+
const { error } = FileStorageValidator.getSignUrls().validate(
|
|
188
268
|
{
|
|
189
269
|
body,
|
|
190
|
-
sync,
|
|
191
270
|
},
|
|
192
271
|
{ abortEarly: false, allowUnknown: true }
|
|
193
272
|
);
|
|
@@ -196,45 +275,62 @@ class FileStorage {
|
|
|
196
275
|
}
|
|
197
276
|
|
|
198
277
|
// Showing warrnings if extra unknown parameters are found
|
|
199
|
-
const { error: warrning } = FileStorageValidator.
|
|
278
|
+
const { error: warrning } = FileStorageValidator.getSignUrls().validate(
|
|
200
279
|
{
|
|
201
280
|
body,
|
|
202
|
-
sync,
|
|
203
281
|
},
|
|
204
282
|
{ abortEarly: false, allowUnknown: false }
|
|
205
283
|
);
|
|
206
284
|
if (warrning) {
|
|
207
|
-
|
|
208
|
-
|
|
285
|
+
Logger({
|
|
286
|
+
level: "WARN",
|
|
287
|
+
message: "Parameter Validation warrnings for getSignUrls",
|
|
288
|
+
});
|
|
289
|
+
Logger({ level: "WARN", message: warrning });
|
|
209
290
|
}
|
|
210
291
|
|
|
211
292
|
const query_params = {};
|
|
212
|
-
query_params["sync"] = sync;
|
|
213
293
|
|
|
214
294
|
const xHeaders = {};
|
|
215
295
|
|
|
216
|
-
|
|
296
|
+
const response = await PlatformAPIClient.execute(
|
|
217
297
|
this.config,
|
|
218
298
|
"post",
|
|
219
|
-
`/service/platform/assets/v1.0/company/${this.config.companyId}/
|
|
299
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/sign-urls/`,
|
|
220
300
|
query_params,
|
|
221
301
|
body,
|
|
222
302
|
xHeaders
|
|
223
303
|
);
|
|
304
|
+
|
|
305
|
+
const {
|
|
306
|
+
error: res_error,
|
|
307
|
+
} = FileStorageModel.SignUrlResponse().validate(response, {
|
|
308
|
+
abortEarly: false,
|
|
309
|
+
allowUnknown: false,
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
if (res_error) {
|
|
313
|
+
Logger({
|
|
314
|
+
level: "WARN",
|
|
315
|
+
message: "Response Validation Warnnings for getSignUrls",
|
|
316
|
+
});
|
|
317
|
+
Logger({ level: "WARN", message: res_error });
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
return response;
|
|
224
321
|
}
|
|
225
322
|
|
|
226
323
|
/**
|
|
227
324
|
* @param {Object} arg - Arg object.
|
|
228
|
-
* @param {string} arg.
|
|
229
|
-
* @
|
|
230
|
-
* @summary:
|
|
231
|
-
* @description:
|
|
325
|
+
* @param {string} arg.url - Url
|
|
326
|
+
* @returns {Promise<string>} - Success response
|
|
327
|
+
* @summary: Proxy
|
|
328
|
+
* @description: Proxy
|
|
232
329
|
*/
|
|
233
|
-
|
|
234
|
-
const { error } = FileStorageValidator.
|
|
330
|
+
async proxy({ url } = {}) {
|
|
331
|
+
const { error } = FileStorageValidator.proxy().validate(
|
|
235
332
|
{
|
|
236
|
-
|
|
237
|
-
pageNo,
|
|
333
|
+
url,
|
|
238
334
|
},
|
|
239
335
|
{ abortEarly: false, allowUnknown: true }
|
|
240
336
|
);
|
|
@@ -243,69 +339,79 @@ class FileStorage {
|
|
|
243
339
|
}
|
|
244
340
|
|
|
245
341
|
// Showing warrnings if extra unknown parameters are found
|
|
246
|
-
const { error: warrning } = FileStorageValidator.
|
|
342
|
+
const { error: warrning } = FileStorageValidator.proxy().validate(
|
|
247
343
|
{
|
|
248
|
-
|
|
249
|
-
pageNo,
|
|
344
|
+
url,
|
|
250
345
|
},
|
|
251
346
|
{ abortEarly: false, allowUnknown: false }
|
|
252
347
|
);
|
|
253
348
|
if (warrning) {
|
|
254
|
-
|
|
255
|
-
|
|
349
|
+
Logger({
|
|
350
|
+
level: "WARN",
|
|
351
|
+
message: "Parameter Validation warrnings for proxy",
|
|
352
|
+
});
|
|
353
|
+
Logger({ level: "WARN", message: warrning });
|
|
256
354
|
}
|
|
257
355
|
|
|
258
356
|
const query_params = {};
|
|
259
|
-
query_params["
|
|
357
|
+
query_params["url"] = url;
|
|
260
358
|
|
|
261
359
|
const xHeaders = {};
|
|
262
360
|
|
|
263
|
-
|
|
361
|
+
const response = await PlatformAPIClient.execute(
|
|
264
362
|
this.config,
|
|
265
|
-
"
|
|
266
|
-
`/service/platform/assets/v1.0/company/${this.config.companyId}/
|
|
363
|
+
"post",
|
|
364
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/proxy/`,
|
|
267
365
|
query_params,
|
|
268
366
|
undefined,
|
|
269
367
|
xHeaders
|
|
270
368
|
);
|
|
271
|
-
}
|
|
272
369
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
const callback = async () => {
|
|
282
|
-
const pageId = paginator.nextId;
|
|
283
|
-
const pageNo = paginator.pageNo;
|
|
284
|
-
const pageType = "number";
|
|
285
|
-
const data = await this.browse({
|
|
286
|
-
namespace: namespace,
|
|
287
|
-
pageNo: pageNo,
|
|
288
|
-
});
|
|
289
|
-
paginator.setPaginator({
|
|
290
|
-
hasNext: data.page.has_next ? true : false,
|
|
291
|
-
nextId: data.page.next_id,
|
|
370
|
+
const { error: res_error } = Joi.string()
|
|
371
|
+
.allow("")
|
|
372
|
+
.validate(response, { abortEarly: false, allowUnknown: false });
|
|
373
|
+
|
|
374
|
+
if (res_error) {
|
|
375
|
+
Logger({
|
|
376
|
+
level: "WARN",
|
|
377
|
+
message: "Response Validation Warnnings for proxy",
|
|
292
378
|
});
|
|
293
|
-
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
return
|
|
379
|
+
Logger({ level: "WARN", message: res_error });
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
return response;
|
|
297
383
|
}
|
|
298
384
|
|
|
299
385
|
/**
|
|
300
386
|
* @param {Object} arg - Arg object.
|
|
301
|
-
* @param {string} arg.
|
|
302
|
-
* @
|
|
303
|
-
* @
|
|
387
|
+
* @param {string} arg.namespace - Bucket name
|
|
388
|
+
* @param {StartRequest} arg.body
|
|
389
|
+
* @returns {Promise<StartResponse>} - Success response
|
|
390
|
+
* @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.
|
|
391
|
+
* @description: Uploads an arbitrarily sized buffer or blob.
|
|
392
|
+
*
|
|
393
|
+
* It has three Major Steps:
|
|
394
|
+
* Start
|
|
395
|
+
* Upload
|
|
396
|
+
* Complete
|
|
397
|
+
*
|
|
398
|
+
* ### Start
|
|
399
|
+
* Initiates the assets upload using `startUpload`.
|
|
400
|
+
* It returns the storage link in response.
|
|
401
|
+
*
|
|
402
|
+
* ### Upload
|
|
403
|
+
* Use the storage link to upload a file (Buffer or Blob) to the File Storage.
|
|
404
|
+
* Make a `PUT` request on storage link received from `startUpload` api with file (Buffer or Blob) as a request body.
|
|
405
|
+
*
|
|
406
|
+
* ### Complete
|
|
407
|
+
* After successfully upload, call `completeUpload` api to complete the upload process.
|
|
408
|
+
* This operation will return the url for the uploaded file.
|
|
304
409
|
*/
|
|
305
|
-
|
|
306
|
-
const { error } = FileStorageValidator.
|
|
410
|
+
async startUpload({ namespace, body } = {}) {
|
|
411
|
+
const { error } = FileStorageValidator.startUpload().validate(
|
|
307
412
|
{
|
|
308
|
-
|
|
413
|
+
namespace,
|
|
414
|
+
body,
|
|
309
415
|
},
|
|
310
416
|
{ abortEarly: false, allowUnknown: true }
|
|
311
417
|
);
|
|
@@ -314,30 +420,50 @@ class FileStorage {
|
|
|
314
420
|
}
|
|
315
421
|
|
|
316
422
|
// Showing warrnings if extra unknown parameters are found
|
|
317
|
-
const { error: warrning } = FileStorageValidator.
|
|
423
|
+
const { error: warrning } = FileStorageValidator.startUpload().validate(
|
|
318
424
|
{
|
|
319
|
-
|
|
425
|
+
namespace,
|
|
426
|
+
body,
|
|
320
427
|
},
|
|
321
428
|
{ abortEarly: false, allowUnknown: false }
|
|
322
429
|
);
|
|
323
430
|
if (warrning) {
|
|
324
|
-
|
|
325
|
-
|
|
431
|
+
Logger({
|
|
432
|
+
level: "WARN",
|
|
433
|
+
message: "Parameter Validation warrnings for startUpload",
|
|
434
|
+
});
|
|
435
|
+
Logger({ level: "WARN", message: warrning });
|
|
326
436
|
}
|
|
327
437
|
|
|
328
438
|
const query_params = {};
|
|
329
|
-
query_params["url"] = url;
|
|
330
439
|
|
|
331
440
|
const xHeaders = {};
|
|
332
441
|
|
|
333
|
-
|
|
442
|
+
const response = await PlatformAPIClient.execute(
|
|
334
443
|
this.config,
|
|
335
444
|
"post",
|
|
336
|
-
`/service/platform/assets/v1.0/company/${this.config.companyId}/
|
|
445
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/namespaces/${namespace}/upload/start/`,
|
|
337
446
|
query_params,
|
|
338
|
-
|
|
447
|
+
body,
|
|
339
448
|
xHeaders
|
|
340
449
|
);
|
|
450
|
+
|
|
451
|
+
const {
|
|
452
|
+
error: res_error,
|
|
453
|
+
} = FileStorageModel.StartResponse().validate(response, {
|
|
454
|
+
abortEarly: false,
|
|
455
|
+
allowUnknown: false,
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
if (res_error) {
|
|
459
|
+
Logger({
|
|
460
|
+
level: "WARN",
|
|
461
|
+
message: "Response Validation Warnnings for startUpload",
|
|
462
|
+
});
|
|
463
|
+
Logger({ level: "WARN", message: res_error });
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return response;
|
|
341
467
|
}
|
|
342
468
|
}
|
|
343
469
|
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export = FileStorageModel;
|
|
2
2
|
declare class FileStorageModel {
|
|
3
|
-
static
|
|
3
|
+
static BrowseResponse(): any;
|
|
4
|
+
static BulkRequest(): any;
|
|
5
|
+
static BulkUploadResponse(): any;
|
|
4
6
|
static CDN(): any;
|
|
5
|
-
static Upload(): any;
|
|
6
|
-
static StartResponse(): any;
|
|
7
|
-
static StartRequest(): any;
|
|
8
7
|
static CompleteResponse(): any;
|
|
9
|
-
static Opts(): any;
|
|
10
8
|
static CopyFileTask(): any;
|
|
11
|
-
static
|
|
12
|
-
static ReqConfiguration(): any;
|
|
9
|
+
static DbRecord(): any;
|
|
13
10
|
static Destination(): any;
|
|
14
|
-
static
|
|
15
|
-
static
|
|
16
|
-
static SignUrlResponse(): any;
|
|
17
|
-
static SignUrlRequest(): any;
|
|
11
|
+
static FailedResponse(): any;
|
|
12
|
+
static Opts(): any;
|
|
18
13
|
static Page(): any;
|
|
19
|
-
static
|
|
20
|
-
static
|
|
14
|
+
static ReqConfiguration(): any;
|
|
15
|
+
static SignUrlRequest(): any;
|
|
16
|
+
static SignUrlResponse(): any;
|
|
17
|
+
static StartRequest(): any;
|
|
18
|
+
static StartResponse(): any;
|
|
19
|
+
static Upload(): any;
|
|
20
|
+
static Urls(): any;
|
|
21
21
|
}
|