@gofynd/fdk-client-javascript 1.4.15-beta.14 → 1.4.15-beta.15
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 +23 -26
- package/package.json +5 -1
- package/sdk/application/ApplicationClient.d.ts +5 -6
- package/sdk/application/ApplicationClient.js +24 -20
- package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
- package/sdk/application/Cart/CartApplicationClient.js +444 -76
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
- package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -4
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
- package/sdk/application/Content/ContentApplicationClient.js +274 -111
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
- package/sdk/application/Lead/LeadApplicationClient.js +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
- package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
- package/sdk/application/Order/OrderApplicationClient.js +217 -17
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
- package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
- package/sdk/application/User/UserApplicationClient.d.ts +103 -53
- package/sdk/application/User/UserApplicationClient.js +308 -49
- package/sdk/common/AxiosHelper.js +11 -4
- package/sdk/common/Constant.d.ts +27 -4
- package/sdk/common/Constant.js +33 -6
- package/sdk/common/utils.d.ts +10 -0
- package/sdk/common/utils.js +24 -3
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
- package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
- package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
- package/sdk/partner/PartnerClient.d.ts +5 -2
- package/sdk/partner/PartnerClient.js +21 -7
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
- package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
- package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
- package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
- package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
- package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9573 -2678
- package/sdk/platform/Catalog/CatalogPlatformModel.js +5033 -1973
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
- package/sdk/platform/Common/CommonPlatformModel.js +25 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
- package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
- package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
- package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
- package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
- package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
- package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
- package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
- package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
- package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
- package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
- package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
- package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
- package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/PlatformClient.d.ts +5 -4
- package/sdk/platform/PlatformClient.js +32 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
- package/sdk/platform/Share/SharePlatformModel.js +31 -6
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
- package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
- package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
- package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
- package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
- package/sdk/platform/User/UserPlatformModel.js +607 -46
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
- package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
- package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -2
- package/sdk/platform/index.js +0 -4
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
- package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
- package/sdk/public/Content/ContentPublicClient.js +1067 -17
- package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
- package/sdk/public/Content/ContentPublicModel.js +751 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
- package/sdk/public/Content/ContentPublicValidator.js +119 -2
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +1 -1
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +5 -2
- package/sdk/public/PublicClient.js +16 -6
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
- package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/utility.d.ts +3 -0
- package/utility.js +7 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
- package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
- package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
|
@@ -15,12 +15,12 @@ class FileStorage {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @param {FileStoragePartnerValidator.
|
|
18
|
+
* @param {FileStoragePartnerValidator.CompleteUploadParam} arg - Arg object.
|
|
19
19
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
20
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
21
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
22
|
-
* @name
|
|
23
|
-
* @summary: This
|
|
21
|
+
* @returns {Promise<FileStoragePartnerModel.FileUploadComplete>} - Success response
|
|
22
|
+
* @name completeUpload
|
|
23
|
+
* @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
|
|
24
24
|
* @description: Uploads an arbitrarily sized buffer or blob.
|
|
25
25
|
*
|
|
26
26
|
* It has three Major Steps:
|
|
@@ -39,13 +39,13 @@ class FileStorage {
|
|
|
39
39
|
* ### Complete
|
|
40
40
|
* After successfully upload, call `completeUpload` api to complete the upload process.
|
|
41
41
|
* This operation will return the url for the uploaded file.
|
|
42
|
-
* - Check out [method documentation](https://
|
|
42
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/partner/filestorage/completeUpload/).
|
|
43
43
|
*/
|
|
44
|
-
async
|
|
44
|
+
async completeUpload(
|
|
45
45
|
{ namespace, body, requestHeaders } = { requestHeaders: {} },
|
|
46
46
|
{ responseHeaders } = { responseHeaders: false }
|
|
47
47
|
) {
|
|
48
|
-
const { error } = FileStoragePartnerValidator.
|
|
48
|
+
const { error } = FileStoragePartnerValidator.completeUpload().validate(
|
|
49
49
|
{
|
|
50
50
|
namespace,
|
|
51
51
|
body,
|
|
@@ -59,7 +59,7 @@ class FileStorage {
|
|
|
59
59
|
// Showing warrnings if extra unknown parameters are found
|
|
60
60
|
const {
|
|
61
61
|
error: warrning,
|
|
62
|
-
} = FileStoragePartnerValidator.
|
|
62
|
+
} = FileStoragePartnerValidator.completeUpload().validate(
|
|
63
63
|
{
|
|
64
64
|
namespace,
|
|
65
65
|
|
|
@@ -70,7 +70,7 @@ class FileStorage {
|
|
|
70
70
|
if (warrning) {
|
|
71
71
|
Logger({
|
|
72
72
|
level: "WARN",
|
|
73
|
-
message: `Parameter Validation warrnings for partner > FileStorage >
|
|
73
|
+
message: `Parameter Validation warrnings for partner > FileStorage > completeUpload \n ${warrning}`,
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -79,7 +79,7 @@ class FileStorage {
|
|
|
79
79
|
const response = await PartnerAPIClient.execute(
|
|
80
80
|
this.config,
|
|
81
81
|
"post",
|
|
82
|
-
`/service/partner/assets/
|
|
82
|
+
`/service/partner/assets/v2.0/organization/${this.config.organizationId}/namespaces/${namespace}/upload/complete`,
|
|
83
83
|
query_params,
|
|
84
84
|
body,
|
|
85
85
|
requestHeaders,
|
|
@@ -93,7 +93,7 @@ class FileStorage {
|
|
|
93
93
|
|
|
94
94
|
const {
|
|
95
95
|
error: res_error,
|
|
96
|
-
} = FileStoragePartnerModel.
|
|
96
|
+
} = FileStoragePartnerModel.FileUploadComplete().validate(responseData, {
|
|
97
97
|
abortEarly: false,
|
|
98
98
|
allowUnknown: true,
|
|
99
99
|
});
|
|
@@ -104,7 +104,7 @@ class FileStorage {
|
|
|
104
104
|
} else {
|
|
105
105
|
Logger({
|
|
106
106
|
level: "WARN",
|
|
107
|
-
message: `Response Validation Warnings for partner > FileStorage >
|
|
107
|
+
message: `Response Validation Warnings for partner > FileStorage > completeUpload \n ${res_error}`,
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -113,12 +113,12 @@ class FileStorage {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
|
-
* @param {FileStoragePartnerValidator.
|
|
116
|
+
* @param {FileStoragePartnerValidator.StartUploadParam} arg - Arg object.
|
|
117
117
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
118
118
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
119
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
120
|
-
* @name
|
|
121
|
-
* @summary: This
|
|
119
|
+
* @returns {Promise<FileStoragePartnerModel.FileUpload>} - Success response
|
|
120
|
+
* @name startUpload
|
|
121
|
+
* @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.
|
|
122
122
|
* @description: Uploads an arbitrarily sized buffer or blob.
|
|
123
123
|
*
|
|
124
124
|
* It has three Major Steps:
|
|
@@ -137,13 +137,13 @@ class FileStorage {
|
|
|
137
137
|
* ### Complete
|
|
138
138
|
* After successfully upload, call `completeUpload` api to complete the upload process.
|
|
139
139
|
* This operation will return the url for the uploaded file.
|
|
140
|
-
* - Check out [method documentation](https://
|
|
140
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/partner/filestorage/startUpload/).
|
|
141
141
|
*/
|
|
142
|
-
async
|
|
142
|
+
async startUpload(
|
|
143
143
|
{ namespace, body, requestHeaders } = { requestHeaders: {} },
|
|
144
144
|
{ responseHeaders } = { responseHeaders: false }
|
|
145
145
|
) {
|
|
146
|
-
const { error } = FileStoragePartnerValidator.
|
|
146
|
+
const { error } = FileStoragePartnerValidator.startUpload().validate(
|
|
147
147
|
{
|
|
148
148
|
namespace,
|
|
149
149
|
body,
|
|
@@ -157,7 +157,7 @@ class FileStorage {
|
|
|
157
157
|
// Showing warrnings if extra unknown parameters are found
|
|
158
158
|
const {
|
|
159
159
|
error: warrning,
|
|
160
|
-
} = FileStoragePartnerValidator.
|
|
160
|
+
} = FileStoragePartnerValidator.startUpload().validate(
|
|
161
161
|
{
|
|
162
162
|
namespace,
|
|
163
163
|
|
|
@@ -168,7 +168,7 @@ class FileStorage {
|
|
|
168
168
|
if (warrning) {
|
|
169
169
|
Logger({
|
|
170
170
|
level: "WARN",
|
|
171
|
-
message: `Parameter Validation warrnings for partner > FileStorage >
|
|
171
|
+
message: `Parameter Validation warrnings for partner > FileStorage > startUpload \n ${warrning}`,
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -177,7 +177,7 @@ class FileStorage {
|
|
|
177
177
|
const response = await PartnerAPIClient.execute(
|
|
178
178
|
this.config,
|
|
179
179
|
"post",
|
|
180
|
-
`/service/partner/assets/
|
|
180
|
+
`/service/partner/assets/v2.0/organization/${this.config.organizationId}/namespaces/${namespace}/upload/start`,
|
|
181
181
|
query_params,
|
|
182
182
|
body,
|
|
183
183
|
requestHeaders,
|
|
@@ -191,7 +191,7 @@ class FileStorage {
|
|
|
191
191
|
|
|
192
192
|
const {
|
|
193
193
|
error: res_error,
|
|
194
|
-
} = FileStoragePartnerModel.
|
|
194
|
+
} = FileStoragePartnerModel.FileUpload().validate(responseData, {
|
|
195
195
|
abortEarly: false,
|
|
196
196
|
allowUnknown: true,
|
|
197
197
|
});
|
|
@@ -202,7 +202,7 @@ class FileStorage {
|
|
|
202
202
|
} else {
|
|
203
203
|
Logger({
|
|
204
204
|
level: "WARN",
|
|
205
|
-
message: `Response Validation Warnings for partner > FileStorage >
|
|
205
|
+
message: `Response Validation Warnings for partner > FileStorage > startUpload \n ${res_error}`,
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
}
|
|
@@ -211,25 +211,21 @@ class FileStorage {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
|
-
* @param {FileStoragePartnerValidator.
|
|
214
|
+
* @param {FileStoragePartnerValidator.BrowseFilesParam} arg - Arg object.
|
|
215
215
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
216
216
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
217
217
|
* @returns {Promise<Object>} - Success response
|
|
218
|
-
* @name
|
|
218
|
+
* @name browseFiles
|
|
219
219
|
* @summary: Browse Files
|
|
220
|
-
* @description: Browse Files - Check out [method documentation](https://
|
|
220
|
+
* @description: Browse Files - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/partner/filestorage/browseFiles/).
|
|
221
221
|
*/
|
|
222
|
-
async
|
|
223
|
-
{ namespace,
|
|
224
|
-
requestHeaders: {},
|
|
225
|
-
},
|
|
222
|
+
async browseFiles(
|
|
223
|
+
{ namespace, page, limit, requestHeaders } = { requestHeaders: {} },
|
|
226
224
|
{ responseHeaders } = { responseHeaders: false }
|
|
227
225
|
) {
|
|
228
|
-
const { error } = FileStoragePartnerValidator.
|
|
226
|
+
const { error } = FileStoragePartnerValidator.browseFiles().validate(
|
|
229
227
|
{
|
|
230
228
|
namespace,
|
|
231
|
-
applicationId,
|
|
232
|
-
companyId,
|
|
233
229
|
page,
|
|
234
230
|
limit,
|
|
235
231
|
},
|
|
@@ -240,12 +236,12 @@ class FileStorage {
|
|
|
240
236
|
}
|
|
241
237
|
|
|
242
238
|
// Showing warrnings if extra unknown parameters are found
|
|
243
|
-
const {
|
|
239
|
+
const {
|
|
240
|
+
error: warrning,
|
|
241
|
+
} = FileStoragePartnerValidator.browseFiles().validate(
|
|
244
242
|
{
|
|
245
243
|
namespace,
|
|
246
244
|
|
|
247
|
-
applicationId,
|
|
248
|
-
companyId,
|
|
249
245
|
page,
|
|
250
246
|
limit,
|
|
251
247
|
},
|
|
@@ -254,7 +250,7 @@ class FileStorage {
|
|
|
254
250
|
if (warrning) {
|
|
255
251
|
Logger({
|
|
256
252
|
level: "WARN",
|
|
257
|
-
message: `Parameter Validation warrnings for partner > FileStorage >
|
|
253
|
+
message: `Parameter Validation warrnings for partner > FileStorage > browseFiles \n ${warrning}`,
|
|
258
254
|
});
|
|
259
255
|
}
|
|
260
256
|
|
|
@@ -265,7 +261,7 @@ class FileStorage {
|
|
|
265
261
|
const response = await PartnerAPIClient.execute(
|
|
266
262
|
this.config,
|
|
267
263
|
"get",
|
|
268
|
-
`/service/partner/assets/v1.0/organization/${this.config.organizationId}/
|
|
264
|
+
`/service/partner/assets/v1.0/organization/${this.config.organizationId}/namespaces/${namespace}/browse`,
|
|
269
265
|
query_params,
|
|
270
266
|
undefined,
|
|
271
267
|
requestHeaders,
|
|
@@ -288,7 +284,237 @@ class FileStorage {
|
|
|
288
284
|
} else {
|
|
289
285
|
Logger({
|
|
290
286
|
level: "WARN",
|
|
291
|
-
message: `Response Validation Warnings for partner > FileStorage >
|
|
287
|
+
message: `Response Validation Warnings for partner > FileStorage > browseFiles \n ${res_error}`,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
return response;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* @param {FileStoragePartnerValidator.FetchProxyParam} arg - Arg object.
|
|
297
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
298
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
299
|
+
* @returns {Promise<FileStoragePartnerModel.FetchProxyDetails>} - Success response
|
|
300
|
+
* @name fetchProxy
|
|
301
|
+
* @summary: Proxy
|
|
302
|
+
* @description: Proxy - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/partner/filestorage/fetchProxy/).
|
|
303
|
+
*/
|
|
304
|
+
async fetchProxy(
|
|
305
|
+
{ url, requestHeaders } = { requestHeaders: {} },
|
|
306
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
307
|
+
) {
|
|
308
|
+
const { error } = FileStoragePartnerValidator.fetchProxy().validate(
|
|
309
|
+
{
|
|
310
|
+
url,
|
|
311
|
+
},
|
|
312
|
+
{ abortEarly: false, allowUnknown: true }
|
|
313
|
+
);
|
|
314
|
+
if (error) {
|
|
315
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// Showing warrnings if extra unknown parameters are found
|
|
319
|
+
const {
|
|
320
|
+
error: warrning,
|
|
321
|
+
} = FileStoragePartnerValidator.fetchProxy().validate(
|
|
322
|
+
{
|
|
323
|
+
url,
|
|
324
|
+
},
|
|
325
|
+
{ abortEarly: false, allowUnknown: false }
|
|
326
|
+
);
|
|
327
|
+
if (warrning) {
|
|
328
|
+
Logger({
|
|
329
|
+
level: "WARN",
|
|
330
|
+
message: `Parameter Validation warrnings for partner > FileStorage > fetchProxy \n ${warrning}`,
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const query_params = {};
|
|
335
|
+
query_params["url"] = url;
|
|
336
|
+
|
|
337
|
+
const response = await PartnerAPIClient.execute(
|
|
338
|
+
this.config,
|
|
339
|
+
"get",
|
|
340
|
+
`/service/partner/assets/v1.0/organization/${this.config.organizationId}/proxy/fetch`,
|
|
341
|
+
query_params,
|
|
342
|
+
undefined,
|
|
343
|
+
requestHeaders,
|
|
344
|
+
{ responseHeaders }
|
|
345
|
+
);
|
|
346
|
+
|
|
347
|
+
let responseData = response;
|
|
348
|
+
if (responseHeaders) {
|
|
349
|
+
responseData = response[0];
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
const {
|
|
353
|
+
error: res_error,
|
|
354
|
+
} = FileStoragePartnerModel.FetchProxyDetails().validate(responseData, {
|
|
355
|
+
abortEarly: false,
|
|
356
|
+
allowUnknown: true,
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
if (res_error) {
|
|
360
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
361
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
362
|
+
} else {
|
|
363
|
+
Logger({
|
|
364
|
+
level: "WARN",
|
|
365
|
+
message: `Response Validation Warnings for partner > FileStorage > fetchProxy \n ${res_error}`,
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
return response;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* @param {FileStoragePartnerValidator.SaveProxyDetailsParam} arg - Arg object.
|
|
375
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
376
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
377
|
+
* @returns {Promise<FileStoragePartnerModel.SaveProxy>} - Success response
|
|
378
|
+
* @name saveProxyDetails
|
|
379
|
+
* @summary: Proxy
|
|
380
|
+
* @description: Proxy - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/partner/filestorage/saveProxyDetails/).
|
|
381
|
+
*/
|
|
382
|
+
async saveProxyDetails(
|
|
383
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
384
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
385
|
+
) {
|
|
386
|
+
const { error } = FileStoragePartnerValidator.saveProxyDetails().validate(
|
|
387
|
+
{
|
|
388
|
+
body,
|
|
389
|
+
},
|
|
390
|
+
{ abortEarly: false, allowUnknown: true }
|
|
391
|
+
);
|
|
392
|
+
if (error) {
|
|
393
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// Showing warrnings if extra unknown parameters are found
|
|
397
|
+
const {
|
|
398
|
+
error: warrning,
|
|
399
|
+
} = FileStoragePartnerValidator.saveProxyDetails().validate(
|
|
400
|
+
{
|
|
401
|
+
body,
|
|
402
|
+
},
|
|
403
|
+
{ abortEarly: false, allowUnknown: false }
|
|
404
|
+
);
|
|
405
|
+
if (warrning) {
|
|
406
|
+
Logger({
|
|
407
|
+
level: "WARN",
|
|
408
|
+
message: `Parameter Validation warrnings for partner > FileStorage > saveProxyDetails \n ${warrning}`,
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
const query_params = {};
|
|
413
|
+
|
|
414
|
+
const response = await PartnerAPIClient.execute(
|
|
415
|
+
this.config,
|
|
416
|
+
"post",
|
|
417
|
+
`/service/partner/assets/v1.0/organization/${this.config.organizationId}/proxy/fetch`,
|
|
418
|
+
query_params,
|
|
419
|
+
body,
|
|
420
|
+
requestHeaders,
|
|
421
|
+
{ responseHeaders }
|
|
422
|
+
);
|
|
423
|
+
|
|
424
|
+
let responseData = response;
|
|
425
|
+
if (responseHeaders) {
|
|
426
|
+
responseData = response[0];
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
const {
|
|
430
|
+
error: res_error,
|
|
431
|
+
} = FileStoragePartnerModel.SaveProxy().validate(responseData, {
|
|
432
|
+
abortEarly: false,
|
|
433
|
+
allowUnknown: true,
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
if (res_error) {
|
|
437
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
438
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
439
|
+
} else {
|
|
440
|
+
Logger({
|
|
441
|
+
level: "WARN",
|
|
442
|
+
message: `Response Validation Warnings for partner > FileStorage > saveProxyDetails \n ${res_error}`,
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return response;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* @param {FileStoragePartnerValidator.SignUrlsParam} arg - Arg object.
|
|
452
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
453
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
454
|
+
* @returns {Promise<FileStoragePartnerModel.SignUrlResult>} - Success response
|
|
455
|
+
* @name signUrls
|
|
456
|
+
* @summary: Get signed URLs.
|
|
457
|
+
* @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored files. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/partner/filestorage/signUrls/).
|
|
458
|
+
*/
|
|
459
|
+
async signUrls(
|
|
460
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
461
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
462
|
+
) {
|
|
463
|
+
const { error } = FileStoragePartnerValidator.signUrls().validate(
|
|
464
|
+
{
|
|
465
|
+
body,
|
|
466
|
+
},
|
|
467
|
+
{ abortEarly: false, allowUnknown: true }
|
|
468
|
+
);
|
|
469
|
+
if (error) {
|
|
470
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
// Showing warrnings if extra unknown parameters are found
|
|
474
|
+
const { error: warrning } = FileStoragePartnerValidator.signUrls().validate(
|
|
475
|
+
{
|
|
476
|
+
body,
|
|
477
|
+
},
|
|
478
|
+
{ abortEarly: false, allowUnknown: false }
|
|
479
|
+
);
|
|
480
|
+
if (warrning) {
|
|
481
|
+
Logger({
|
|
482
|
+
level: "WARN",
|
|
483
|
+
message: `Parameter Validation warrnings for partner > FileStorage > signUrls \n ${warrning}`,
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
const query_params = {};
|
|
488
|
+
|
|
489
|
+
const response = await PartnerAPIClient.execute(
|
|
490
|
+
this.config,
|
|
491
|
+
"post",
|
|
492
|
+
`/service/partner/assets/v1.0/organization/${this.config.organizationId}/sign-urls`,
|
|
493
|
+
query_params,
|
|
494
|
+
body,
|
|
495
|
+
requestHeaders,
|
|
496
|
+
{ responseHeaders }
|
|
497
|
+
);
|
|
498
|
+
|
|
499
|
+
let responseData = response;
|
|
500
|
+
if (responseHeaders) {
|
|
501
|
+
responseData = response[0];
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
const {
|
|
505
|
+
error: res_error,
|
|
506
|
+
} = FileStoragePartnerModel.SignUrlResult().validate(responseData, {
|
|
507
|
+
abortEarly: false,
|
|
508
|
+
allowUnknown: true,
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
if (res_error) {
|
|
512
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
513
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
514
|
+
} else {
|
|
515
|
+
Logger({
|
|
516
|
+
level: "WARN",
|
|
517
|
+
message: `Response Validation Warnings for partner > FileStorage > signUrls \n ${res_error}`,
|
|
292
518
|
});
|
|
293
519
|
}
|
|
294
520
|
}
|