@gofynd/fdk-client-javascript 1.4.2-beta.7 → 1.4.4
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 +1 -10
- package/application.d.ts +3 -3
- package/common.d.ts +3 -3
- package/index.d.ts +15 -15
- package/package.json +5 -3
- package/partner.d.ts +3 -3
- package/platform.d.ts +3 -3
- package/public.d.ts +2 -2
- package/sdk/application/ApplicationAPIClient.d.ts +1 -1
- package/sdk/application/ApplicationAPIClient.js +0 -1
- package/sdk/application/ApplicationClient.d.ts +17 -17
- package/sdk/application/ApplicationConfig.d.ts +3 -3
- package/sdk/application/Cart/CartApplicationClient.d.ts +58 -58
- package/sdk/application/Cart/CartApplicationClient.js +56 -56
- package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -1
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +72 -72
- package/sdk/application/Catalog/CatalogApplicationClient.js +69 -69
- package/sdk/application/Common/CommonApplicationClient.d.ts +6 -6
- package/sdk/application/Common/CommonApplicationClient.js +4 -4
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +8 -8
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -6
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +34 -34
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +32 -32
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +1 -1
- package/sdk/application/Content/ContentApplicationClient.d.ts +48 -48
- package/sdk/application/Content/ContentApplicationClient.js +45 -45
- package/sdk/application/Content/ContentApplicationModel.d.ts +18 -18
- package/sdk/application/Content/ContentApplicationModel.js +26 -26
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +7 -7
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +15 -9
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
- package/sdk/application/Lead/LeadApplicationClient.d.ts +12 -12
- package/sdk/application/Lead/LeadApplicationClient.js +10 -10
- package/sdk/application/Lead/LeadApplicationModel.d.ts +64 -77
- package/sdk/application/Lead/LeadApplicationModel.js +42 -52
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +24 -24
- package/sdk/application/Logistic/LogisticApplicationClient.js +22 -22
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -1
- package/sdk/application/Order/OrderApplicationClient.d.ts +19 -30
- package/sdk/application/Order/OrderApplicationClient.js +17 -97
- package/sdk/application/Order/OrderApplicationValidator.d.ts +2 -16
- package/sdk/application/Order/OrderApplicationValidator.js +0 -13
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -91
- package/sdk/application/Payment/PaymentApplicationClient.js +94 -94
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +5 -2
- package/sdk/application/Payment/PaymentApplicationModel.js +4 -2
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +6 -6
- package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +29 -29
- package/sdk/application/PosCart/PosCartApplicationClient.js +27 -27
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +9 -9
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +1 -1
- package/sdk/application/Share/ShareApplicationClient.d.ts +9 -9
- package/sdk/application/Share/ShareApplicationClient.js +7 -7
- package/sdk/application/Share/ShareApplicationModel.d.ts +2 -0
- package/sdk/application/Share/ShareApplicationModel.js +2 -0
- package/sdk/application/Share/ShareApplicationValidator.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +10 -10
- package/sdk/application/Theme/ThemeApplicationClient.js +8 -8
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +25 -32
- package/sdk/application/Theme/ThemeApplicationModel.js +30 -40
- package/sdk/application/User/UserApplicationClient.d.ts +76 -76
- package/sdk/application/User/UserApplicationClient.js +74 -74
- package/sdk/application/User/UserApplicationModel.d.ts +44 -13
- package/sdk/application/User/UserApplicationModel.js +17 -13
- package/sdk/application/User/UserApplicationValidator.d.ts +1 -1
- package/sdk/application/index.d.ts +18 -18
- package/sdk/common/AxiosHelper.d.ts +1 -1
- package/sdk/common/AxiosHelper.js +38 -17
- package/sdk/common/Clickstream.js +22 -16
- package/sdk/common/curlHelper.js +1 -3
- package/sdk/common/utils.d.ts +15 -0
- package/sdk/common/utils.js +30 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +3 -3
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +3 -3
- package/sdk/partner/Lead/LeadPartnerClient.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +5 -5
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +4 -4
- package/sdk/partner/OAuthClient.d.ts +4 -4
- package/sdk/partner/PartnerAPIClient.d.ts +1 -1
- package/sdk/partner/PartnerAPIClient.js +0 -1
- package/sdk/partner/PartnerClient.d.ts +6 -6
- package/sdk/partner/PartnerConfig.d.ts +4 -4
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +20 -20
- package/sdk/partner/Theme/ThemePartnerClient.js +19 -19
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +25 -32
- package/sdk/partner/Theme/ThemePartnerModel.js +30 -40
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +3 -3
- package/sdk/partner/Webhook/WebhookPartnerClient.js +2 -2
- package/sdk/partner/index.d.ts +7 -7
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -8
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +6 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +25 -25
- package/sdk/platform/Billing/BillingPlatformClient.js +23 -23
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +115 -115
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +113 -113
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +147 -146
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +146 -145
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +156 -156
- package/sdk/platform/Catalog/CatalogPlatformClient.js +153 -153
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +65 -28
- package/sdk/platform/Catalog/CatalogPlatformModel.js +68 -36
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1 -1
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -5
- package/sdk/platform/Common/CommonPlatformClient.js +3 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +133 -133
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +131 -131
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +4 -4
- package/sdk/platform/Communication/CommunicationPlatformClient.js +2 -2
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +12 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +12 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +28 -28
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +25 -25
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +2 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +2 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +1 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +52 -52
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +50 -50
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +31 -31
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +29 -29
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +1 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +128 -128
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +131 -131
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +5 -5
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +4 -4
- package/sdk/platform/Content/ContentPlatformClient.d.ts +33 -33
- package/sdk/platform/Content/ContentPlatformClient.js +37 -37
- package/sdk/platform/Content/ContentPlatformModel.d.ts +18 -18
- package/sdk/platform/Content/ContentPlatformModel.js +26 -26
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +5 -5
- package/sdk/platform/Content/ContentPlatformValidator.js +4 -4
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +24 -24
- package/sdk/platform/Discount/DiscountPlatformClient.js +22 -22
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +24 -23
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +32 -25
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +15 -15
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +28 -19
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +12 -1
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +16 -2
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +1 -1
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +30 -30
- package/sdk/platform/Finance/FinancePlatformClient.js +28 -28
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -1
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +20 -20
- package/sdk/platform/Lead/LeadPlatformClient.js +18 -18
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +62 -77
- package/sdk/platform/Lead/LeadPlatformModel.js +40 -52
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +1 -1
- package/sdk/platform/OAuthClient.d.ts +3 -3
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +10 -10
- package/sdk/platform/Order/OrderPlatformClient.d.ts +111 -122
- package/sdk/platform/Order/OrderPlatformClient.js +109 -204
- package/sdk/platform/Order/OrderPlatformModel.d.ts +18 -2
- package/sdk/platform/Order/OrderPlatformModel.js +12 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -34
- package/sdk/platform/Order/OrderPlatformValidator.js +0 -20
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +4 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +97 -97
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +95 -95
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +13 -13
- package/sdk/platform/Payment/PaymentPlatformClient.js +11 -11
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +7 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +3 -0
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +1 -1
- package/sdk/platform/PlatformAPIClient.d.ts +1 -1
- package/sdk/platform/PlatformAPIClient.js +0 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +16 -16
- package/sdk/platform/PlatformClient.d.ts +19 -21
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/PlatformConfig.d.ts +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +14 -14
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +12 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +42 -42
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +40 -40
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +55 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +53 -52
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +2 -2
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +4 -2
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
- package/sdk/platform/Share/SharePlatformApplicationClient.js +5 -5
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformModel.d.ts +4 -0
- package/sdk/platform/Share/SharePlatformModel.js +4 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +42 -112
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +40 -597
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +2 -101
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -92
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -8
- package/sdk/platform/Theme/ThemePlatformClient.js +6 -6
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +25 -32
- package/sdk/platform/Theme/ThemePlatformModel.js +30 -40
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +1 -1
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +37 -37
- package/sdk/platform/User/UserPlatformApplicationClient.js +35 -35
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/User/UserPlatformModel.d.ts +48 -13
- package/sdk/platform/User/UserPlatformModel.js +21 -13
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +20 -19
- package/sdk/platform/Webhook/WebhookPlatformClient.js +18 -17
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +2 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.js +1 -1
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +1 -1
- package/sdk/platform/index.d.ts +24 -25
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Billing/BillingPublicClient.d.ts +3 -3
- package/sdk/public/Billing/BillingPublicClient.js +4 -4
- package/sdk/public/Billing/BillingPublicValidator.d.ts +2 -2
- package/sdk/public/Billing/BillingPublicValidator.js +2 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -1
- package/sdk/public/Content/ContentPublicClient.d.ts +2 -2
- package/sdk/public/Content/ContentPublicValidator.d.ts +2 -2
- package/sdk/public/Content/ContentPublicValidator.js +3 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +2 -2
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +8 -8
- package/sdk/public/Inventory/InventoryPublicModel.js +8 -8
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.d.ts +3 -3
- package/sdk/public/Partner/PartnerPublicClient.js +1 -1
- package/sdk/public/PublicAPIClient.d.ts +1 -1
- package/sdk/public/PublicClient.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -1
- package/sdk/public/index.d.ts +8 -8
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +0 -152
- package/sdk/platform/Inventory/InventoryPlatformClient.js +0 -1017
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +0 -1355
- package/sdk/platform/Inventory/InventoryPlatformModel.js +0 -1544
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +0 -171
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +0 -159
|
@@ -9,7 +9,7 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel");
|
|
|
9
9
|
const { Logger } = require("./../../common/Logger");
|
|
10
10
|
const Joi = require("joi");
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const { fdkAxios } = require("../../common/AxiosHelper.js");
|
|
13
13
|
|
|
14
14
|
class FileStorage {
|
|
15
15
|
constructor(config, applicationId) {
|
|
@@ -25,8 +25,8 @@ class FileStorage {
|
|
|
25
25
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
26
26
|
* @returns {Promise<FileStoragePlatformModel.CompleteResponse>} - Success response
|
|
27
27
|
* @name appCompleteUpload
|
|
28
|
-
* @summary:
|
|
29
|
-
* @description:
|
|
28
|
+
* @summary: Complete file upload for Application
|
|
29
|
+
* @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database on platform at application level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCompleteUpload/).
|
|
30
30
|
*/
|
|
31
31
|
async appCompleteUpload(
|
|
32
32
|
{ namespace, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -108,8 +108,8 @@ class FileStorage {
|
|
|
108
108
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
109
109
|
* @returns {Promise<Object>} - Success response
|
|
110
110
|
* @name appCopyFiles
|
|
111
|
-
* @summary:
|
|
112
|
-
* @description:
|
|
111
|
+
* @summary: Copy files for Application
|
|
112
|
+
* @description: Handle multiple file uploads, updating progress and providing detailed status reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCopyFiles/).
|
|
113
113
|
*/
|
|
114
114
|
async appCopyFiles(
|
|
115
115
|
{ body, sync, requestHeaders } = { requestHeaders: {} },
|
|
@@ -190,8 +190,8 @@ class FileStorage {
|
|
|
190
190
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
191
191
|
* @returns {Promise<FileStoragePlatformModel.StartResponse>} - Success response
|
|
192
192
|
* @name appStartUpload
|
|
193
|
-
* @summary:
|
|
194
|
-
* @description:
|
|
193
|
+
* @summary: Initiates file upload for Application
|
|
194
|
+
* @description: Inititates the process of uploading a file to storage location, and returns a storage link in response on platofrm at application level. Please refer group description for more details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appStartUpload/).
|
|
195
195
|
*/
|
|
196
196
|
async appStartUpload(
|
|
197
197
|
{ namespace, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -273,8 +273,8 @@ class FileStorage {
|
|
|
273
273
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
274
274
|
* @returns {Promise<Object>} - Success response
|
|
275
275
|
* @name appbrowse
|
|
276
|
-
* @summary:
|
|
277
|
-
* @description:
|
|
276
|
+
* @summary: Browse files for Application
|
|
277
|
+
* @description: View and navigate through available files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/).
|
|
278
278
|
*/
|
|
279
279
|
async appbrowse(
|
|
280
280
|
{ namespace, page, limit, search, requestHeaders } = { requestHeaders: {} },
|
|
@@ -361,8 +361,8 @@ class FileStorage {
|
|
|
361
361
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
362
362
|
* @returns {Promise<Object>} - Success response
|
|
363
363
|
* @name browsefiles
|
|
364
|
-
* @summary: Browse
|
|
365
|
-
* @description:
|
|
364
|
+
* @summary: Browse files for Application
|
|
365
|
+
* @description: View and navigate through available files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browsefiles/).
|
|
366
366
|
*/
|
|
367
367
|
async browsefiles(
|
|
368
368
|
{ namespace, body, page, limit, search, requestHeaders } = {
|
|
@@ -455,7 +455,7 @@ class FileStorage {
|
|
|
455
455
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
456
456
|
* @returns {Promise<Object>} - Success response
|
|
457
457
|
* @name generatePaymentReceipt
|
|
458
|
-
* @summary: Generate payment receipt
|
|
458
|
+
* @summary: Generate payment receipt
|
|
459
459
|
* @description: Generate Payment Receipt for Jiomart Digital - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/generatePaymentReceipt/).
|
|
460
460
|
*/
|
|
461
461
|
async generatePaymentReceipt(
|
|
@@ -534,8 +534,9 @@ class FileStorage {
|
|
|
534
534
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
535
535
|
* @returns {Promise<FileStoragePlatformModel.PdfConfigSuccess>} - Success response
|
|
536
536
|
* @name getDefaultHtmlTemplate
|
|
537
|
-
* @summary: Get html template for
|
|
538
|
-
* @description: Get
|
|
537
|
+
* @summary: Get html template for Application
|
|
538
|
+
* @description: Get the saved html template for provided sales channel
|
|
539
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultHtmlTemplate/).
|
|
539
540
|
*/
|
|
540
541
|
async getDefaultHtmlTemplate(
|
|
541
542
|
{ pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} },
|
|
@@ -623,8 +624,8 @@ class FileStorage {
|
|
|
623
624
|
* @returns {Promise<FileStoragePlatformModel.DummyTemplateDataItems>} -
|
|
624
625
|
* Success response
|
|
625
626
|
* @name getDefaultPdfData
|
|
626
|
-
* @summary: Get default PDF data
|
|
627
|
-
* @description: Retrieve default data for
|
|
627
|
+
* @summary: Get default PDF data
|
|
628
|
+
* @description: Retrieve default pdf payload data for invoice generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/).
|
|
628
629
|
*/
|
|
629
630
|
async getDefaultPdfData(
|
|
630
631
|
{ pdfTypeId, countryCode, requestHeaders } = { requestHeaders: {} },
|
|
@@ -709,8 +710,8 @@ class FileStorage {
|
|
|
709
710
|
* @returns {Promise<FileStoragePlatformModel.PdfDefaultTemplateSuccess>} -
|
|
710
711
|
* Success response
|
|
711
712
|
* @name getDefaultPdfTemplate
|
|
712
|
-
* @summary: Get default PDF template
|
|
713
|
-
* @description: Retrieve the default
|
|
713
|
+
* @summary: Get default PDF template
|
|
714
|
+
* @description: Retrieve to get the default Invoice template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/).
|
|
714
715
|
*/
|
|
715
716
|
async getDefaultPdfTemplate(
|
|
716
717
|
{ pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} },
|
|
@@ -796,8 +797,8 @@ class FileStorage {
|
|
|
796
797
|
* @returns {Promise<FileStoragePlatformModel.InvoiceTypesResponse>} -
|
|
797
798
|
* Success response
|
|
798
799
|
* @name getPdfTypes
|
|
799
|
-
* @summary: Get PDF types
|
|
800
|
-
* @description: Retrieve a list of available
|
|
800
|
+
* @summary: Get PDF types
|
|
801
|
+
* @description: Retrieve a list of available invoice types. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/).
|
|
801
802
|
*/
|
|
802
803
|
async getPdfTypes(
|
|
803
804
|
{ countryCode, requestHeaders } = { requestHeaders: {} },
|
|
@@ -879,8 +880,8 @@ class FileStorage {
|
|
|
879
880
|
* @returns {Promise<FileStoragePlatformModel.PdfConfigSaveSuccess>} -
|
|
880
881
|
* Success response
|
|
881
882
|
* @name saveHtmlTemplate
|
|
882
|
-
* @summary: Save
|
|
883
|
-
* @description:
|
|
883
|
+
* @summary: Save PDF template
|
|
884
|
+
* @description: Save html template for provided sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/saveHtmlTemplate/).
|
|
884
885
|
*/
|
|
885
886
|
async saveHtmlTemplate(
|
|
886
887
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1065,10 +1066,16 @@ FileStorage.prototype.upload = function ({
|
|
|
1065
1066
|
},
|
|
1066
1067
|
});
|
|
1067
1068
|
if (dataObj.upload && dataObj.upload.url) {
|
|
1068
|
-
|
|
1069
|
+
let rawRequest = {
|
|
1070
|
+
method: "PUT",
|
|
1071
|
+
url: dataObj.upload.url,
|
|
1072
|
+
data: data,
|
|
1073
|
+
headers: {
|
|
1074
|
+
"Content-Type": content_type,
|
|
1075
|
+
},
|
|
1069
1076
|
withCredentials: false,
|
|
1070
|
-
|
|
1071
|
-
|
|
1077
|
+
};
|
|
1078
|
+
await fdkAxios.request(rawRequest);
|
|
1072
1079
|
} else {
|
|
1073
1080
|
reject({ message: "Failed to upload file" });
|
|
1074
1081
|
}
|
|
@@ -201,4 +201,4 @@ type UpdateHtmlTemplateParam = {
|
|
|
201
201
|
id: string;
|
|
202
202
|
body: FileStoragePlatformModel.PdfConfig;
|
|
203
203
|
};
|
|
204
|
-
import FileStoragePlatformModel = require("
|
|
204
|
+
import FileStoragePlatformModel = require("sdk/output/javascript/code/sdk/platform/FileStorage/FileStoragePlatformModel");
|
|
@@ -8,7 +8,7 @@ declare class FileStorage {
|
|
|
8
8
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
9
9
|
* @returns {Promise<Object>} - Success response
|
|
10
10
|
* @name browse
|
|
11
|
-
* @summary: Browse files
|
|
11
|
+
* @summary: Browse files
|
|
12
12
|
* @description: View and navigate through available files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browse/).
|
|
13
13
|
*/
|
|
14
14
|
browse({ namespace, page, limit, requestHeaders }?: FileStoragePlatformValidator.BrowseParam, { responseHeaders }?: object): Promise<any>;
|
|
@@ -18,8 +18,8 @@ declare class FileStorage {
|
|
|
18
18
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
19
19
|
* @returns {Promise<FileStoragePlatformModel.CompleteResponse>} - Success response
|
|
20
20
|
* @name completeUpload
|
|
21
|
-
* @summary: Complete file upload
|
|
22
|
-
* @description:
|
|
21
|
+
* @summary: Complete file upload
|
|
22
|
+
* @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database at platform level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/completeUpload/).
|
|
23
23
|
*/
|
|
24
24
|
completeUpload({ namespace, body, requestHeaders }?: FileStoragePlatformValidator.CompleteUploadParam, { responseHeaders }?: object): Promise<FileStoragePlatformModel.CompleteResponse>;
|
|
25
25
|
/**
|
|
@@ -28,8 +28,8 @@ declare class FileStorage {
|
|
|
28
28
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
29
29
|
* @returns {Promise<Object>} - Success response
|
|
30
30
|
* @name copyFiles
|
|
31
|
-
* @summary: Copy files
|
|
32
|
-
* @description:
|
|
31
|
+
* @summary: Copy files
|
|
32
|
+
* @description: Handle multiple file uploads, updating progress and providing detailed status reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/copyFiles/).
|
|
33
33
|
*/
|
|
34
34
|
copyFiles({ body, sync, requestHeaders }?: FileStoragePlatformValidator.CopyFilesParam, { responseHeaders }?: object): Promise<any>;
|
|
35
35
|
/**
|
|
@@ -38,28 +38,28 @@ declare class FileStorage {
|
|
|
38
38
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
39
39
|
* @returns {Promise<FileStoragePlatformModel.SignUrlResponse>} - Success response
|
|
40
40
|
* @name getSignUrls
|
|
41
|
-
* @summary: Get signed URLs
|
|
42
|
-
* @description:
|
|
41
|
+
* @summary: Get signed URLs
|
|
42
|
+
* @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored resources inside private bucket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getSignUrls/).
|
|
43
43
|
*/
|
|
44
44
|
getSignUrls({ body, requestHeaders }?: FileStoragePlatformValidator.GetSignUrlsParam, { responseHeaders }?: object): Promise<FileStoragePlatformModel.SignUrlResponse>;
|
|
45
45
|
/**
|
|
46
46
|
* @param {FileStoragePlatformValidator.ProxyParam} arg - Arg object
|
|
47
47
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
48
48
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
49
|
-
* @returns {Promise<
|
|
49
|
+
* @returns {Promise<FileStoragePlatformModel.ProxyResponse>} - Success response
|
|
50
50
|
* @name proxy
|
|
51
|
-
* @summary:
|
|
52
|
-
* @description:
|
|
51
|
+
* @summary: Access files through a proxy
|
|
52
|
+
* @description: It enables the communication between two entities by directing client requests to the correct server and sending responses back to the client. Please refer group description for more details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/proxy/).
|
|
53
53
|
*/
|
|
54
|
-
proxy({ url, requestHeaders }?: FileStoragePlatformValidator.ProxyParam, { responseHeaders }?: object): Promise<
|
|
54
|
+
proxy({ url, requestHeaders }?: FileStoragePlatformValidator.ProxyParam, { responseHeaders }?: object): Promise<FileStoragePlatformModel.ProxyResponse>;
|
|
55
55
|
/**
|
|
56
56
|
* @param {FileStoragePlatformValidator.StartUploadParam} arg - Arg object
|
|
57
57
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
58
58
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
59
59
|
* @returns {Promise<FileStoragePlatformModel.StartResponse>} - Success response
|
|
60
60
|
* @name startUpload
|
|
61
|
-
* @summary: Start file upload
|
|
62
|
-
* @description: Inititates the process of uploading a file to storage location, and returns a storage link in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/startUpload/).
|
|
61
|
+
* @summary: Start file upload
|
|
62
|
+
* @description: Inititates the process of uploading a file to storage location, and returns a storage link in response at platform level. Please refer group description for more details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/startUpload/).
|
|
63
63
|
*/
|
|
64
64
|
startUpload({ namespace, body, requestHeaders }?: FileStoragePlatformValidator.StartUploadParam, { responseHeaders }?: object): Promise<FileStoragePlatformModel.StartResponse>;
|
|
65
65
|
/**
|
|
@@ -79,5 +79,5 @@ declare class FileStorage {
|
|
|
79
79
|
tags: any;
|
|
80
80
|
}): Promise<any>;
|
|
81
81
|
}
|
|
82
|
-
import FileStoragePlatformValidator = require("
|
|
83
|
-
import FileStoragePlatformModel = require("
|
|
82
|
+
import FileStoragePlatformValidator = require("sdk/output/javascript/code/sdk/platform/FileStorage/FileStoragePlatformValidator");
|
|
83
|
+
import FileStoragePlatformModel = require("sdk/output/javascript/code/sdk/platform/FileStorage/FileStoragePlatformModel");
|
|
@@ -9,7 +9,7 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel");
|
|
|
9
9
|
const { Logger } = require("./../../common/Logger");
|
|
10
10
|
const Joi = require("joi");
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const { fdkAxios } = require("../../common/AxiosHelper.js");
|
|
13
13
|
|
|
14
14
|
class FileStorage {
|
|
15
15
|
constructor(config) {
|
|
@@ -22,7 +22,7 @@ class FileStorage {
|
|
|
22
22
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
23
23
|
* @returns {Promise<Object>} - Success response
|
|
24
24
|
* @name browse
|
|
25
|
-
* @summary: Browse files
|
|
25
|
+
* @summary: Browse files
|
|
26
26
|
* @description: View and navigate through available files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browse/).
|
|
27
27
|
*/
|
|
28
28
|
async browse(
|
|
@@ -105,8 +105,8 @@ class FileStorage {
|
|
|
105
105
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
106
106
|
* @returns {Promise<FileStoragePlatformModel.CompleteResponse>} - Success response
|
|
107
107
|
* @name completeUpload
|
|
108
|
-
* @summary: Complete file upload
|
|
109
|
-
* @description:
|
|
108
|
+
* @summary: Complete file upload
|
|
109
|
+
* @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database at platform level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/completeUpload/).
|
|
110
110
|
*/
|
|
111
111
|
async completeUpload(
|
|
112
112
|
{ namespace, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -188,8 +188,8 @@ class FileStorage {
|
|
|
188
188
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
189
189
|
* @returns {Promise<Object>} - Success response
|
|
190
190
|
* @name copyFiles
|
|
191
|
-
* @summary: Copy files
|
|
192
|
-
* @description:
|
|
191
|
+
* @summary: Copy files
|
|
192
|
+
* @description: Handle multiple file uploads, updating progress and providing detailed status reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/copyFiles/).
|
|
193
193
|
*/
|
|
194
194
|
async copyFiles(
|
|
195
195
|
{ body, sync, requestHeaders } = { requestHeaders: {} },
|
|
@@ -268,8 +268,8 @@ class FileStorage {
|
|
|
268
268
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
269
269
|
* @returns {Promise<FileStoragePlatformModel.SignUrlResponse>} - Success response
|
|
270
270
|
* @name getSignUrls
|
|
271
|
-
* @summary: Get signed URLs
|
|
272
|
-
* @description:
|
|
271
|
+
* @summary: Get signed URLs
|
|
272
|
+
* @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored resources inside private bucket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getSignUrls/).
|
|
273
273
|
*/
|
|
274
274
|
async getSignUrls(
|
|
275
275
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -345,10 +345,10 @@ class FileStorage {
|
|
|
345
345
|
* @param {FileStoragePlatformValidator.ProxyParam} arg - Arg object
|
|
346
346
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
347
347
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
348
|
-
* @returns {Promise<
|
|
348
|
+
* @returns {Promise<FileStoragePlatformModel.ProxyResponse>} - Success response
|
|
349
349
|
* @name proxy
|
|
350
|
-
* @summary:
|
|
351
|
-
* @description:
|
|
350
|
+
* @summary: Access files through a proxy
|
|
351
|
+
* @description: It enables the communication between two entities by directing client requests to the correct server and sending responses back to the client. Please refer group description for more details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/proxy/).
|
|
352
352
|
*/
|
|
353
353
|
async proxy(
|
|
354
354
|
{ url, requestHeaders } = { requestHeaders: {} },
|
|
@@ -398,9 +398,12 @@ class FileStorage {
|
|
|
398
398
|
responseData = response[0];
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
const {
|
|
402
|
-
|
|
403
|
-
|
|
401
|
+
const {
|
|
402
|
+
error: res_error,
|
|
403
|
+
} = FileStoragePlatformModel.ProxyResponse().validate(responseData, {
|
|
404
|
+
abortEarly: false,
|
|
405
|
+
allowUnknown: true,
|
|
406
|
+
});
|
|
404
407
|
|
|
405
408
|
if (res_error) {
|
|
406
409
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -422,8 +425,8 @@ class FileStorage {
|
|
|
422
425
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
423
426
|
* @returns {Promise<FileStoragePlatformModel.StartResponse>} - Success response
|
|
424
427
|
* @name startUpload
|
|
425
|
-
* @summary: Start file upload
|
|
426
|
-
* @description: Inititates the process of uploading a file to storage location, and returns a storage link in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/startUpload/).
|
|
428
|
+
* @summary: Start file upload
|
|
429
|
+
* @description: Inititates the process of uploading a file to storage location, and returns a storage link in response at platform level. Please refer group description for more details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/startUpload/).
|
|
427
430
|
*/
|
|
428
431
|
async startUpload(
|
|
429
432
|
{ namespace, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -528,10 +531,16 @@ FileStorage.prototype.upload = function ({
|
|
|
528
531
|
},
|
|
529
532
|
});
|
|
530
533
|
if (dataObj.upload && dataObj.upload.url) {
|
|
531
|
-
|
|
534
|
+
let rawRequest = {
|
|
535
|
+
method: "PUT",
|
|
536
|
+
url: dataObj.upload.url,
|
|
537
|
+
data: data,
|
|
538
|
+
headers: {
|
|
539
|
+
"Content-Type": content_type,
|
|
540
|
+
},
|
|
532
541
|
withCredentials: false,
|
|
533
|
-
|
|
534
|
-
|
|
542
|
+
};
|
|
543
|
+
await fdkAxios.request(rawRequest);
|
|
535
544
|
} else {
|
|
536
545
|
reject({ message: "Failed to upload file" });
|
|
537
546
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export = FileStoragePlatformModel;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef ProxyResponse
|
|
4
|
+
* @property {Object} [data]
|
|
5
|
+
* @property {Object} [support]
|
|
6
|
+
*/
|
|
2
7
|
/**
|
|
3
8
|
* @typedef FailedResponse
|
|
4
9
|
* @property {string} message
|
|
@@ -556,8 +561,14 @@ export = FileStoragePlatformModel;
|
|
|
556
561
|
declare class FileStoragePlatformModel {
|
|
557
562
|
}
|
|
558
563
|
declare namespace FileStoragePlatformModel {
|
|
559
|
-
export { FailedResponse, CDN, Upload, StartResponse, Params, StartRequest, CreatedBy, CompleteResponse, DestinationNamespace, CopyFiles, Urls, SignUrlResponse, SignUrlRequest, InvoiceTypesDataResponse, InvoiceTypesResponse, ConversionRate, DeliveryPartnerDetail, Image, PaymentData, InvoiceDetail, CompanyDetail, StoreDetail, CustomerBillingDetail, CustomerShippingDetail, ReturnDetail, Brand, Cgst, Sgst, Igst, Tax, ItemsProductTable, ProductTable, Taxes, TaxTable, RegisteredCompanyDetail, Kwargs, ShipmentIdBarcodeGenerator, SignedQrcodeGenerator, KwargsUpiQrcode, UpiQrcodeGenerator, DigitalsignatureGenerator, KwargsAwbNumber, AwbNumberLabelBarcodeGenerator, AwbNumberBarcodeGenerator, MetaProperty, Meta, DummyTemplateDataPayload, DummyTemplateData, DummyTemplateDataItems, PdfConfig, PdfConfigSuccessData, PdfConfigSuccess, PdfConfigSaveSuccessData, PdfConfigSaveSuccess, PdfDefaultTemplateSuccess, Document, PaymentReceiptRequestBody, PaymentReceiptOrderDetails, PaymentReceiptCustomerDetails, PaymentReceiptPayments, PaymentReceiptFormat, PaymentReceiptService, PaymentReceiptTaxes, PaymentReceiptPayload, PaymentReceiptMeta, ExtensionSlug };
|
|
564
|
+
export { ProxyResponse, FailedResponse, CDN, Upload, StartResponse, Params, StartRequest, CreatedBy, CompleteResponse, DestinationNamespace, CopyFiles, Urls, SignUrlResponse, SignUrlRequest, InvoiceTypesDataResponse, InvoiceTypesResponse, ConversionRate, DeliveryPartnerDetail, Image, PaymentData, InvoiceDetail, CompanyDetail, StoreDetail, CustomerBillingDetail, CustomerShippingDetail, ReturnDetail, Brand, Cgst, Sgst, Igst, Tax, ItemsProductTable, ProductTable, Taxes, TaxTable, RegisteredCompanyDetail, Kwargs, ShipmentIdBarcodeGenerator, SignedQrcodeGenerator, KwargsUpiQrcode, UpiQrcodeGenerator, DigitalsignatureGenerator, KwargsAwbNumber, AwbNumberLabelBarcodeGenerator, AwbNumberBarcodeGenerator, MetaProperty, Meta, DummyTemplateDataPayload, DummyTemplateData, DummyTemplateDataItems, PdfConfig, PdfConfigSuccessData, PdfConfigSuccess, PdfConfigSaveSuccessData, PdfConfigSaveSuccess, PdfDefaultTemplateSuccess, Document, PaymentReceiptRequestBody, PaymentReceiptOrderDetails, PaymentReceiptCustomerDetails, PaymentReceiptPayments, PaymentReceiptFormat, PaymentReceiptService, PaymentReceiptTaxes, PaymentReceiptPayload, PaymentReceiptMeta, ExtensionSlug };
|
|
560
565
|
}
|
|
566
|
+
/** @returns {ProxyResponse} */
|
|
567
|
+
declare function ProxyResponse(): ProxyResponse;
|
|
568
|
+
type ProxyResponse = {
|
|
569
|
+
data?: any;
|
|
570
|
+
support?: any;
|
|
571
|
+
};
|
|
561
572
|
/** @returns {FailedResponse} */
|
|
562
573
|
declare function FailedResponse(): FailedResponse;
|
|
563
574
|
type FailedResponse = {
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef ProxyResponse
|
|
5
|
+
* @property {Object} [data]
|
|
6
|
+
* @property {Object} [support]
|
|
7
|
+
*/
|
|
8
|
+
|
|
3
9
|
/**
|
|
4
10
|
* @typedef FailedResponse
|
|
5
11
|
* @property {string} message
|
|
@@ -621,6 +627,14 @@ const Joi = require("joi");
|
|
|
621
627
|
*/
|
|
622
628
|
|
|
623
629
|
class FileStoragePlatformModel {
|
|
630
|
+
/** @returns {ProxyResponse} */
|
|
631
|
+
static ProxyResponse() {
|
|
632
|
+
return Joi.object({
|
|
633
|
+
data: Joi.object().pattern(/\S/, Joi.any()),
|
|
634
|
+
support: Joi.object().pattern(/\S/, Joi.any()),
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
|
|
624
638
|
/** @returns {FailedResponse} */
|
|
625
639
|
static FailedResponse() {
|
|
626
640
|
return Joi.object({
|
|
@@ -840,9 +854,9 @@ class FileStoragePlatformModel {
|
|
|
840
854
|
zip_code: Joi.number(),
|
|
841
855
|
state_code: Joi.string().allow(""),
|
|
842
856
|
country_code: Joi.string().allow(""),
|
|
843
|
-
gstin: Joi.string().allow(""),
|
|
857
|
+
gstin: Joi.string().allow("").allow(null),
|
|
844
858
|
pan: Joi.string().allow("").allow(null),
|
|
845
|
-
phone_no: Joi.string().allow(""),
|
|
859
|
+
phone_no: Joi.string().allow("").allow(null),
|
|
846
860
|
cin: Joi.string().allow(""),
|
|
847
861
|
website_url: Joi.string().allow(""),
|
|
848
862
|
email: Joi.string().allow(""),
|
|
@@ -104,4 +104,4 @@ type StartUploadParam = {
|
|
|
104
104
|
namespace: string;
|
|
105
105
|
body: FileStoragePlatformModel.StartRequest;
|
|
106
106
|
};
|
|
107
|
-
import FileStoragePlatformModel = require("
|
|
107
|
+
import FileStoragePlatformModel = require("sdk/output/javascript/code/sdk/platform/FileStorage/FileStoragePlatformModel");
|