@gofynd/fdk-client-javascript 1.4.1 → 1.4.2-beta.10
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 -1
- package/package.json +3 -2
- package/sdk/application/ApplicationClient.js +20 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +3 -5
- package/sdk/application/Cart/CartApplicationModel.d.ts +1634 -1742
- package/sdk/application/Cart/CartApplicationModel.js +1388 -1464
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -4
- package/sdk/application/Cart/CartApplicationValidator.js +0 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
- package/sdk/application/Catalog/CatalogApplicationClient.js +20 -7
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1613 -1613
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +14 -0
- package/sdk/application/Catalog/CatalogApplicationValidator.js +6 -0
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1492 -1626
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1038 -1180
- package/sdk/application/Content/ContentApplicationClient.d.ts +0 -36
- package/sdk/application/Content/ContentApplicationClient.js +0 -246
- package/sdk/application/Content/ContentApplicationModel.d.ts +546 -753
- package/sdk/application/Content/ContentApplicationModel.js +565 -817
- package/sdk/application/Content/ContentApplicationValidator.d.ts +1 -40
- package/sdk/application/Content/ContentApplicationValidator.js +0 -41
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +0 -67
- package/sdk/application/Logistic/LogisticApplicationClient.js +0 -547
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +257 -712
- package/sdk/application/Logistic/LogisticApplicationModel.js +267 -755
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -211
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -131
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +8 -32
- package/sdk/application/Order/OrderApplicationModel.d.ts +845 -853
- package/sdk/application/Order/OrderApplicationModel.js +816 -824
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -20
- package/sdk/application/Order/OrderApplicationValidator.js +0 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -46
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -341
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +1892 -2199
- package/sdk/application/Payment/PaymentApplicationModel.js +1235 -1506
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +14 -59
- package/sdk/application/Payment/PaymentApplicationValidator.js +10 -64
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1396 -1429
- package/sdk/application/PosCart/PosCartApplicationModel.js +1233 -1257
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +3 -7
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +783 -969
- package/sdk/application/Theme/ThemeApplicationModel.js +571 -867
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -10
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -4
- package/sdk/application/User/UserApplicationClient.d.ts +0 -33
- package/sdk/application/User/UserApplicationClient.js +0 -239
- package/sdk/application/User/UserApplicationModel.d.ts +753 -768
- package/sdk/application/User/UserApplicationModel.js +731 -755
- package/sdk/application/User/UserApplicationValidator.d.ts +1 -34
- package/sdk/application/User/UserApplicationValidator.js +0 -36
- package/sdk/common/Clickstream.d.ts +1 -0
- package/sdk/common/Clickstream.js +254 -0
- package/sdk/common/Utility.js +1 -4
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +72 -60
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +70 -58
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +0 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +0 -80
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1178 -1153
- package/sdk/partner/Theme/ThemePartnerModel.js +830 -974
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +0 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +0 -9
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +1 -11
- package/sdk/platform/Billing/BillingPlatformClient.js +3 -110
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +734 -800
- package/sdk/platform/Billing/BillingPlatformModel.js +732 -810
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +4 -43
- package/sdk/platform/Billing/BillingPlatformValidator.js +2 -29
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +81 -7
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -5
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -4
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3223 -3328
- package/sdk/platform/Cart/CartPlatformModel.js +2875 -2946
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +11 -15
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +21 -52
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -27
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -11
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +15 -27
- package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -189
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +617 -920
- package/sdk/platform/Catalog/CatalogPlatformModel.js +584 -919
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +27 -41
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -31
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +37 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +52 -737
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +3 -133
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -113
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1079 -1228
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1090 -1262
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +4 -32
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +629 -658
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +641 -675
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +0 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +0 -6
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2992 -3231
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2092 -2303
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -391
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1074 -3656
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -351
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -410
- package/sdk/platform/Content/ContentPlatformModel.d.ts +972 -2071
- package/sdk/platform/Content/ContentPlatformModel.js +1039 -2355
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +174 -259
- package/sdk/platform/Discount/DiscountPlatformModel.js +163 -257
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +6 -16
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +8 -117
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -55
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -39
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +821 -892
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +833 -901
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -33
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -240
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +910 -1056
- package/sdk/platform/Finance/FinancePlatformModel.js +884 -1070
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -38
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -38
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +28 -38
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +56 -137
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +29 -41
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +21 -33
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +601 -610
- package/sdk/platform/Lead/LeadPlatformModel.js +457 -471
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -11
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +1 -93
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -143
- package/sdk/platform/Order/OrderPlatformClient.js +160 -1190
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4451 -5275
- package/sdk/platform/Order/OrderPlatformModel.js +4039 -4994
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +21 -257
- package/sdk/platform/Order/OrderPlatformValidator.js +15 -216
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -119
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +40 -750
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -143
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +6 -133
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2067 -2929
- package/sdk/platform/Payment/PaymentPlatformModel.js +1427 -2090
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +2 -4
- package/sdk/platform/PlatformClient.js +4 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +66 -142
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +147 -645
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +63 -131
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +47 -126
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +105 -217
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +349 -1138
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +990 -1589
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +986 -1702
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +133 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +102 -266
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +1 -11
- package/sdk/platform/Theme/ThemePlatformClient.js +3 -87
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +765 -1133
- package/sdk/platform/Theme/ThemePlatformModel.js +561 -1009
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +4 -28
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -21
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -116
- package/sdk/platform/User/UserPlatformApplicationClient.js +86 -932
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -224
- package/sdk/platform/User/UserPlatformApplicationValidator.js +5 -173
- package/sdk/platform/User/UserPlatformModel.d.ts +428 -765
- package/sdk/platform/User/UserPlatformModel.js +428 -679
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +37 -45
- package/sdk/platform/Webhook/WebhookPlatformClient.js +57 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +403 -448
- package/sdk/platform/Webhook/WebhookPlatformModel.js +309 -369
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/PublicClient.d.ts +0 -4
- package/sdk/public/PublicClient.js +0 -8
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +0 -33
- package/sdk/public/Webhook/WebhookPublicClient.js +0 -242
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +15 -161
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -189
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -23
- package/sdk/public/Webhook/WebhookPublicValidator.js +0 -31
- package/sdk/public/index.d.ts +0 -2
- package/sdk/public/index.js +0 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -125
- package/sdk/partner/Lead/LeadPartnerClient.js +0 -785
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +0 -1127
- package/sdk/partner/Lead/LeadPartnerModel.js +0 -896
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -12
- package/sdk/partner/Lead/LeadPartnerValidator.js +0 -67
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +0 -155
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +0 -1195
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +0 -372
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +0 -442
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -16
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +0 -123
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +0 -99
- package/sdk/partner/Webhook/WebhookPartnerClient.js +0 -753
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +0 -566
- package/sdk/partner/Webhook/WebhookPartnerModel.js +0 -583
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -12
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +0 -74
- package/sdk/platform/Content/ContentPlatformClient.d.ts +0 -277
- package/sdk/platform/Content/ContentPlatformClient.js +0 -2011
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +0 -247
- package/sdk/platform/Content/ContentPlatformValidator.js +0 -319
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -23
- package/sdk/public/Billing/BillingPublicClient.js +0 -116
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -92
- package/sdk/public/Billing/BillingPublicModel.js +0 -96
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -18
- package/sdk/public/Billing/BillingPublicValidator.js +0 -19
- package/sdk/public/Content/ContentPublicClient.d.ts +0 -22
- package/sdk/public/Content/ContentPublicClient.js +0 -114
- package/sdk/public/Content/ContentPublicModel.d.ts +0 -53
- package/sdk/public/Content/ContentPublicModel.js +0 -60
- package/sdk/public/Content/ContentPublicValidator.d.ts +0 -18
- package/sdk/public/Content/ContentPublicValidator.js +0 -19
|
@@ -313,7 +313,7 @@ class FileStorage {
|
|
|
313
313
|
* @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/).
|
|
314
314
|
*/
|
|
315
315
|
async appbrowse(
|
|
316
|
-
{ namespace, page, limit,
|
|
316
|
+
{ namespace, page, limit, requestHeaders } = { requestHeaders: {} },
|
|
317
317
|
{ responseHeaders } = { responseHeaders: false }
|
|
318
318
|
) {
|
|
319
319
|
const {
|
|
@@ -324,7 +324,6 @@ class FileStorage {
|
|
|
324
324
|
|
|
325
325
|
page,
|
|
326
326
|
limit,
|
|
327
|
-
search,
|
|
328
327
|
},
|
|
329
328
|
{ abortEarly: false, allowUnknown: true }
|
|
330
329
|
);
|
|
@@ -341,7 +340,6 @@ class FileStorage {
|
|
|
341
340
|
|
|
342
341
|
page,
|
|
343
342
|
limit,
|
|
344
|
-
search,
|
|
345
343
|
},
|
|
346
344
|
{ abortEarly: false, allowUnknown: false }
|
|
347
345
|
);
|
|
@@ -355,7 +353,6 @@ class FileStorage {
|
|
|
355
353
|
const query_params = {};
|
|
356
354
|
query_params["page"] = page;
|
|
357
355
|
query_params["limit"] = limit;
|
|
358
|
-
query_params["search"] = search;
|
|
359
356
|
|
|
360
357
|
const response = await PlatformAPIClient.execute(
|
|
361
358
|
this.config,
|
|
@@ -391,98 +388,6 @@ class FileStorage {
|
|
|
391
388
|
return response;
|
|
392
389
|
}
|
|
393
390
|
|
|
394
|
-
/**
|
|
395
|
-
* @param {FileStoragePlatformApplicationValidator.BrowsefilesParam} arg - Arg object
|
|
396
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
397
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
398
|
-
* @returns {Promise<Object>} - Success response
|
|
399
|
-
* @name browsefiles
|
|
400
|
-
* @summary: Browse Files
|
|
401
|
-
* @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browsefiles/).
|
|
402
|
-
*/
|
|
403
|
-
async browsefiles(
|
|
404
|
-
{ namespace, body, page, limit, search, requestHeaders } = {
|
|
405
|
-
requestHeaders: {},
|
|
406
|
-
},
|
|
407
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
408
|
-
) {
|
|
409
|
-
const {
|
|
410
|
-
error,
|
|
411
|
-
} = FileStoragePlatformApplicationValidator.browsefiles().validate(
|
|
412
|
-
{
|
|
413
|
-
namespace,
|
|
414
|
-
|
|
415
|
-
body,
|
|
416
|
-
page,
|
|
417
|
-
limit,
|
|
418
|
-
search,
|
|
419
|
-
},
|
|
420
|
-
{ abortEarly: false, allowUnknown: true }
|
|
421
|
-
);
|
|
422
|
-
if (error) {
|
|
423
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
// Showing warrnings if extra unknown parameters are found
|
|
427
|
-
const {
|
|
428
|
-
error: warrning,
|
|
429
|
-
} = FileStoragePlatformApplicationValidator.browsefiles().validate(
|
|
430
|
-
{
|
|
431
|
-
namespace,
|
|
432
|
-
|
|
433
|
-
body,
|
|
434
|
-
page,
|
|
435
|
-
limit,
|
|
436
|
-
search,
|
|
437
|
-
},
|
|
438
|
-
{ abortEarly: false, allowUnknown: false }
|
|
439
|
-
);
|
|
440
|
-
if (warrning) {
|
|
441
|
-
Logger({
|
|
442
|
-
level: "WARN",
|
|
443
|
-
message: `Parameter Validation warrnings for platform > FileStorage > browsefiles \n ${warrning}`,
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
const query_params = {};
|
|
448
|
-
query_params["page"] = page;
|
|
449
|
-
query_params["limit"] = limit;
|
|
450
|
-
query_params["search"] = search;
|
|
451
|
-
|
|
452
|
-
const response = await PlatformAPIClient.execute(
|
|
453
|
-
this.config,
|
|
454
|
-
"post",
|
|
455
|
-
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/browse`,
|
|
456
|
-
query_params,
|
|
457
|
-
body,
|
|
458
|
-
requestHeaders,
|
|
459
|
-
{ responseHeaders }
|
|
460
|
-
);
|
|
461
|
-
|
|
462
|
-
let responseData = response;
|
|
463
|
-
if (responseHeaders) {
|
|
464
|
-
responseData = response[0];
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
const { error: res_error } = Joi.any().validate(responseData, {
|
|
468
|
-
abortEarly: false,
|
|
469
|
-
allowUnknown: true,
|
|
470
|
-
});
|
|
471
|
-
|
|
472
|
-
if (res_error) {
|
|
473
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
474
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
475
|
-
} else {
|
|
476
|
-
Logger({
|
|
477
|
-
level: "WARN",
|
|
478
|
-
message: `Response Validation Warnings for platform > FileStorage > browsefiles \n ${res_error}`,
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
return response;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
391
|
/**
|
|
487
392
|
* @param {FileStoragePlatformApplicationValidator.GeneratePaymentReceiptParam} arg
|
|
488
393
|
* - Arg object
|
|
@@ -574,7 +479,7 @@ class FileStorage {
|
|
|
574
479
|
* @description: Get default html template for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultHtmlTemplate/).
|
|
575
480
|
*/
|
|
576
481
|
async getDefaultHtmlTemplate(
|
|
577
|
-
{ pdfTypeId, format,
|
|
482
|
+
{ pdfTypeId, format, requestHeaders } = { requestHeaders: {} },
|
|
578
483
|
{ responseHeaders } = { responseHeaders: false }
|
|
579
484
|
) {
|
|
580
485
|
const {
|
|
@@ -583,7 +488,6 @@ class FileStorage {
|
|
|
583
488
|
{
|
|
584
489
|
pdfTypeId,
|
|
585
490
|
format,
|
|
586
|
-
countryCode,
|
|
587
491
|
},
|
|
588
492
|
{ abortEarly: false, allowUnknown: true }
|
|
589
493
|
);
|
|
@@ -598,7 +502,6 @@ class FileStorage {
|
|
|
598
502
|
{
|
|
599
503
|
pdfTypeId,
|
|
600
504
|
format,
|
|
601
|
-
countryCode,
|
|
602
505
|
},
|
|
603
506
|
{ abortEarly: false, allowUnknown: false }
|
|
604
507
|
);
|
|
@@ -612,7 +515,6 @@ class FileStorage {
|
|
|
612
515
|
const query_params = {};
|
|
613
516
|
query_params["pdf_type_id"] = pdfTypeId;
|
|
614
517
|
query_params["format"] = format;
|
|
615
|
-
query_params["country_code"] = countryCode;
|
|
616
518
|
|
|
617
519
|
const response = await PlatformAPIClient.execute(
|
|
618
520
|
this.config,
|
|
@@ -663,7 +565,7 @@ class FileStorage {
|
|
|
663
565
|
* @description: Get Dummy pdf data for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/).
|
|
664
566
|
*/
|
|
665
567
|
async getDefaultPdfData(
|
|
666
|
-
{ pdfTypeId,
|
|
568
|
+
{ pdfTypeId, requestHeaders } = { requestHeaders: {} },
|
|
667
569
|
{ responseHeaders } = { responseHeaders: false }
|
|
668
570
|
) {
|
|
669
571
|
const {
|
|
@@ -671,7 +573,6 @@ class FileStorage {
|
|
|
671
573
|
} = FileStoragePlatformApplicationValidator.getDefaultPdfData().validate(
|
|
672
574
|
{
|
|
673
575
|
pdfTypeId,
|
|
674
|
-
countryCode,
|
|
675
576
|
},
|
|
676
577
|
{ abortEarly: false, allowUnknown: true }
|
|
677
578
|
);
|
|
@@ -685,7 +586,6 @@ class FileStorage {
|
|
|
685
586
|
} = FileStoragePlatformApplicationValidator.getDefaultPdfData().validate(
|
|
686
587
|
{
|
|
687
588
|
pdfTypeId,
|
|
688
|
-
countryCode,
|
|
689
589
|
},
|
|
690
590
|
{ abortEarly: false, allowUnknown: false }
|
|
691
591
|
);
|
|
@@ -698,7 +598,6 @@ class FileStorage {
|
|
|
698
598
|
|
|
699
599
|
const query_params = {};
|
|
700
600
|
query_params["pdf_type_id"] = pdfTypeId;
|
|
701
|
-
query_params["country_code"] = countryCode;
|
|
702
601
|
|
|
703
602
|
const response = await PlatformAPIClient.execute(
|
|
704
603
|
this.config,
|
|
@@ -749,7 +648,7 @@ class FileStorage {
|
|
|
749
648
|
* @description: Get default html template data for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/).
|
|
750
649
|
*/
|
|
751
650
|
async getDefaultPdfTemplate(
|
|
752
|
-
{ pdfTypeId, format,
|
|
651
|
+
{ pdfTypeId, format, requestHeaders } = { requestHeaders: {} },
|
|
753
652
|
{ responseHeaders } = { responseHeaders: false }
|
|
754
653
|
) {
|
|
755
654
|
const {
|
|
@@ -758,7 +657,6 @@ class FileStorage {
|
|
|
758
657
|
{
|
|
759
658
|
pdfTypeId,
|
|
760
659
|
format,
|
|
761
|
-
countryCode,
|
|
762
660
|
},
|
|
763
661
|
{ abortEarly: false, allowUnknown: true }
|
|
764
662
|
);
|
|
@@ -773,7 +671,6 @@ class FileStorage {
|
|
|
773
671
|
{
|
|
774
672
|
pdfTypeId,
|
|
775
673
|
format,
|
|
776
|
-
countryCode,
|
|
777
674
|
},
|
|
778
675
|
{ abortEarly: false, allowUnknown: false }
|
|
779
676
|
);
|
|
@@ -787,7 +684,6 @@ class FileStorage {
|
|
|
787
684
|
const query_params = {};
|
|
788
685
|
query_params["pdf_type_id"] = pdfTypeId;
|
|
789
686
|
query_params["format"] = format;
|
|
790
|
-
query_params["country_code"] = countryCode;
|
|
791
687
|
|
|
792
688
|
const response = await PlatformAPIClient.execute(
|
|
793
689
|
this.config,
|
|
@@ -833,18 +729,16 @@ class FileStorage {
|
|
|
833
729
|
* Success response
|
|
834
730
|
* @name getPdfTypes
|
|
835
731
|
* @summary: Get all the supported invoice pdf types
|
|
836
|
-
* @description: Get all the supported invoice pdf types such as Invoice, Label,
|
|
732
|
+
* @description: Get all the supported invoice pdf types such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/).
|
|
837
733
|
*/
|
|
838
734
|
async getPdfTypes(
|
|
839
|
-
{
|
|
735
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
840
736
|
{ responseHeaders } = { responseHeaders: false }
|
|
841
737
|
) {
|
|
842
738
|
const {
|
|
843
739
|
error,
|
|
844
740
|
} = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
|
|
845
|
-
{
|
|
846
|
-
countryCode,
|
|
847
|
-
},
|
|
741
|
+
{},
|
|
848
742
|
{ abortEarly: false, allowUnknown: true }
|
|
849
743
|
);
|
|
850
744
|
if (error) {
|
|
@@ -855,9 +749,7 @@ class FileStorage {
|
|
|
855
749
|
const {
|
|
856
750
|
error: warrning,
|
|
857
751
|
} = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
|
|
858
|
-
{
|
|
859
|
-
countryCode,
|
|
860
|
-
},
|
|
752
|
+
{},
|
|
861
753
|
{ abortEarly: false, allowUnknown: false }
|
|
862
754
|
);
|
|
863
755
|
if (warrning) {
|
|
@@ -868,7 +760,6 @@ class FileStorage {
|
|
|
868
760
|
}
|
|
869
761
|
|
|
870
762
|
const query_params = {};
|
|
871
|
-
query_params["country_code"] = countryCode;
|
|
872
763
|
|
|
873
764
|
const response = await PlatformAPIClient.execute(
|
|
874
765
|
this.config,
|
|
@@ -28,18 +28,6 @@ export = FileStoragePlatformApplicationValidator;
|
|
|
28
28
|
* inside the storage bucket.
|
|
29
29
|
* @property {number} [page] - Page no
|
|
30
30
|
* @property {number} [limit] - Limit
|
|
31
|
-
* @property {string} [search] - Search
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* @typedef BrowsefilesParam
|
|
35
|
-
* @property {string} namespace - Segregation of different types of
|
|
36
|
-
* files(products, orders, logistics etc), Required for validating the data of
|
|
37
|
-
* the file being uploaded, decides where exactly the file will be stored
|
|
38
|
-
* inside the storage bucket.
|
|
39
|
-
* @property {number} [page] - Page no
|
|
40
|
-
* @property {number} [limit] - Limit
|
|
41
|
-
* @property {string} [search] - Search
|
|
42
|
-
* @property {FileStoragePlatformModel.ExtensionSlug} body
|
|
43
31
|
*/
|
|
44
32
|
/**
|
|
45
33
|
* @typedef GeneratePaymentReceiptParam
|
|
@@ -49,23 +37,17 @@ export = FileStoragePlatformApplicationValidator;
|
|
|
49
37
|
* @typedef GetDefaultHtmlTemplateParam
|
|
50
38
|
* @property {number} pdfTypeId
|
|
51
39
|
* @property {string} format
|
|
52
|
-
* @property {string} [countryCode]
|
|
53
40
|
*/
|
|
54
41
|
/**
|
|
55
42
|
* @typedef GetDefaultPdfDataParam
|
|
56
43
|
* @property {number} pdfTypeId
|
|
57
|
-
* @property {string} [countryCode]
|
|
58
44
|
*/
|
|
59
45
|
/**
|
|
60
46
|
* @typedef GetDefaultPdfTemplateParam
|
|
61
47
|
* @property {number} pdfTypeId
|
|
62
48
|
* @property {string} format
|
|
63
|
-
* @property {string} [countryCode]
|
|
64
|
-
*/
|
|
65
|
-
/**
|
|
66
|
-
* @typedef GetPdfTypesParam
|
|
67
|
-
* @property {string} [countryCode]
|
|
68
49
|
*/
|
|
50
|
+
/** @typedef GetPdfTypesParam */
|
|
69
51
|
/**
|
|
70
52
|
* @typedef SaveHtmlTemplateParam
|
|
71
53
|
* @property {FileStoragePlatformModel.PdfConfig} body
|
|
@@ -84,8 +66,6 @@ declare class FileStoragePlatformApplicationValidator {
|
|
|
84
66
|
static appStartUpload(): AppStartUploadParam;
|
|
85
67
|
/** @returns {AppbrowseParam} */
|
|
86
68
|
static appbrowse(): AppbrowseParam;
|
|
87
|
-
/** @returns {BrowsefilesParam} */
|
|
88
|
-
static browsefiles(): BrowsefilesParam;
|
|
89
69
|
/** @returns {GeneratePaymentReceiptParam} */
|
|
90
70
|
static generatePaymentReceipt(): GeneratePaymentReceiptParam;
|
|
91
71
|
/** @returns {GetDefaultHtmlTemplateParam} */
|
|
@@ -95,14 +75,14 @@ declare class FileStoragePlatformApplicationValidator {
|
|
|
95
75
|
/** @returns {GetDefaultPdfTemplateParam} */
|
|
96
76
|
static getDefaultPdfTemplate(): GetDefaultPdfTemplateParam;
|
|
97
77
|
/** @returns {GetPdfTypesParam} */
|
|
98
|
-
static getPdfTypes():
|
|
78
|
+
static getPdfTypes(): any;
|
|
99
79
|
/** @returns {SaveHtmlTemplateParam} */
|
|
100
80
|
static saveHtmlTemplate(): SaveHtmlTemplateParam;
|
|
101
81
|
/** @returns {UpdateHtmlTemplateParam} */
|
|
102
82
|
static updateHtmlTemplate(): UpdateHtmlTemplateParam;
|
|
103
83
|
}
|
|
104
84
|
declare namespace FileStoragePlatformApplicationValidator {
|
|
105
|
-
export { AppCompleteUploadParam, AppCopyFilesParam, AppStartUploadParam, AppbrowseParam,
|
|
85
|
+
export { AppCompleteUploadParam, AppCopyFilesParam, AppStartUploadParam, AppbrowseParam, GeneratePaymentReceiptParam, GetDefaultHtmlTemplateParam, GetDefaultPdfDataParam, GetDefaultPdfTemplateParam, GetPdfTypesParam, SaveHtmlTemplateParam, UpdateHtmlTemplateParam };
|
|
106
86
|
}
|
|
107
87
|
type AppCompleteUploadParam = {
|
|
108
88
|
/**
|
|
@@ -147,32 +127,6 @@ type AppbrowseParam = {
|
|
|
147
127
|
* - Limit
|
|
148
128
|
*/
|
|
149
129
|
limit?: number;
|
|
150
|
-
/**
|
|
151
|
-
* - Search
|
|
152
|
-
*/
|
|
153
|
-
search?: string;
|
|
154
|
-
};
|
|
155
|
-
type BrowsefilesParam = {
|
|
156
|
-
/**
|
|
157
|
-
* - Segregation of different types of
|
|
158
|
-
* files(products, orders, logistics etc), Required for validating the data of
|
|
159
|
-
* the file being uploaded, decides where exactly the file will be stored
|
|
160
|
-
* inside the storage bucket.
|
|
161
|
-
*/
|
|
162
|
-
namespace: string;
|
|
163
|
-
/**
|
|
164
|
-
* - Page no
|
|
165
|
-
*/
|
|
166
|
-
page?: number;
|
|
167
|
-
/**
|
|
168
|
-
* - Limit
|
|
169
|
-
*/
|
|
170
|
-
limit?: number;
|
|
171
|
-
/**
|
|
172
|
-
* - Search
|
|
173
|
-
*/
|
|
174
|
-
search?: string;
|
|
175
|
-
body: FileStoragePlatformModel.ExtensionSlug;
|
|
176
130
|
};
|
|
177
131
|
type GeneratePaymentReceiptParam = {
|
|
178
132
|
body: FileStoragePlatformModel.PaymentReceiptRequestBody;
|
|
@@ -180,19 +134,13 @@ type GeneratePaymentReceiptParam = {
|
|
|
180
134
|
type GetDefaultHtmlTemplateParam = {
|
|
181
135
|
pdfTypeId: number;
|
|
182
136
|
format: string;
|
|
183
|
-
countryCode?: string;
|
|
184
137
|
};
|
|
185
138
|
type GetDefaultPdfDataParam = {
|
|
186
139
|
pdfTypeId: number;
|
|
187
|
-
countryCode?: string;
|
|
188
140
|
};
|
|
189
141
|
type GetDefaultPdfTemplateParam = {
|
|
190
142
|
pdfTypeId: number;
|
|
191
143
|
format: string;
|
|
192
|
-
countryCode?: string;
|
|
193
|
-
};
|
|
194
|
-
type GetPdfTypesParam = {
|
|
195
|
-
countryCode?: string;
|
|
196
144
|
};
|
|
197
145
|
type SaveHtmlTemplateParam = {
|
|
198
146
|
body: FileStoragePlatformModel.PdfConfig;
|
|
@@ -201,4 +149,5 @@ type UpdateHtmlTemplateParam = {
|
|
|
201
149
|
id: string;
|
|
202
150
|
body: FileStoragePlatformModel.PdfConfig;
|
|
203
151
|
};
|
|
152
|
+
type GetPdfTypesParam = any;
|
|
204
153
|
import FileStoragePlatformModel = require("./FileStoragePlatformModel");
|
|
@@ -34,19 +34,6 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel");
|
|
|
34
34
|
* inside the storage bucket.
|
|
35
35
|
* @property {number} [page] - Page no
|
|
36
36
|
* @property {number} [limit] - Limit
|
|
37
|
-
* @property {string} [search] - Search
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @typedef BrowsefilesParam
|
|
42
|
-
* @property {string} namespace - Segregation of different types of
|
|
43
|
-
* files(products, orders, logistics etc), Required for validating the data of
|
|
44
|
-
* the file being uploaded, decides where exactly the file will be stored
|
|
45
|
-
* inside the storage bucket.
|
|
46
|
-
* @property {number} [page] - Page no
|
|
47
|
-
* @property {number} [limit] - Limit
|
|
48
|
-
* @property {string} [search] - Search
|
|
49
|
-
* @property {FileStoragePlatformModel.ExtensionSlug} body
|
|
50
37
|
*/
|
|
51
38
|
|
|
52
39
|
/**
|
|
@@ -58,26 +45,20 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel");
|
|
|
58
45
|
* @typedef GetDefaultHtmlTemplateParam
|
|
59
46
|
* @property {number} pdfTypeId
|
|
60
47
|
* @property {string} format
|
|
61
|
-
* @property {string} [countryCode]
|
|
62
48
|
*/
|
|
63
49
|
|
|
64
50
|
/**
|
|
65
51
|
* @typedef GetDefaultPdfDataParam
|
|
66
52
|
* @property {number} pdfTypeId
|
|
67
|
-
* @property {string} [countryCode]
|
|
68
53
|
*/
|
|
69
54
|
|
|
70
55
|
/**
|
|
71
56
|
* @typedef GetDefaultPdfTemplateParam
|
|
72
57
|
* @property {number} pdfTypeId
|
|
73
58
|
* @property {string} format
|
|
74
|
-
* @property {string} [countryCode]
|
|
75
59
|
*/
|
|
76
60
|
|
|
77
|
-
/**
|
|
78
|
-
* @typedef GetPdfTypesParam
|
|
79
|
-
* @property {string} [countryCode]
|
|
80
|
-
*/
|
|
61
|
+
/** @typedef GetPdfTypesParam */
|
|
81
62
|
|
|
82
63
|
/**
|
|
83
64
|
* @typedef SaveHtmlTemplateParam
|
|
@@ -125,19 +106,6 @@ class FileStoragePlatformApplicationValidator {
|
|
|
125
106
|
|
|
126
107
|
page: Joi.number(),
|
|
127
108
|
limit: Joi.number(),
|
|
128
|
-
search: Joi.string().allow(""),
|
|
129
|
-
}).required();
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/** @returns {BrowsefilesParam} */
|
|
133
|
-
static browsefiles() {
|
|
134
|
-
return Joi.object({
|
|
135
|
-
namespace: Joi.string().allow("").required(),
|
|
136
|
-
|
|
137
|
-
page: Joi.number(),
|
|
138
|
-
limit: Joi.number(),
|
|
139
|
-
search: Joi.string().allow(""),
|
|
140
|
-
body: FileStoragePlatformModel.ExtensionSlug().required(),
|
|
141
109
|
}).required();
|
|
142
110
|
}
|
|
143
111
|
|
|
@@ -153,7 +121,6 @@ class FileStoragePlatformApplicationValidator {
|
|
|
153
121
|
return Joi.object({
|
|
154
122
|
pdfTypeId: Joi.number().required(),
|
|
155
123
|
format: Joi.string().allow("").required(),
|
|
156
|
-
countryCode: Joi.string().allow(""),
|
|
157
124
|
}).required();
|
|
158
125
|
}
|
|
159
126
|
|
|
@@ -161,7 +128,6 @@ class FileStoragePlatformApplicationValidator {
|
|
|
161
128
|
static getDefaultPdfData() {
|
|
162
129
|
return Joi.object({
|
|
163
130
|
pdfTypeId: Joi.number().required(),
|
|
164
|
-
countryCode: Joi.string().allow(""),
|
|
165
131
|
}).required();
|
|
166
132
|
}
|
|
167
133
|
|
|
@@ -170,15 +136,12 @@ class FileStoragePlatformApplicationValidator {
|
|
|
170
136
|
return Joi.object({
|
|
171
137
|
pdfTypeId: Joi.number().required(),
|
|
172
138
|
format: Joi.string().allow("").required(),
|
|
173
|
-
countryCode: Joi.string().allow(""),
|
|
174
139
|
}).required();
|
|
175
140
|
}
|
|
176
141
|
|
|
177
142
|
/** @returns {GetPdfTypesParam} */
|
|
178
143
|
static getPdfTypes() {
|
|
179
|
-
return Joi.object({
|
|
180
|
-
countryCode: Joi.string().allow(""),
|
|
181
|
-
}).required();
|
|
144
|
+
return Joi.object({}).required();
|
|
182
145
|
}
|
|
183
146
|
|
|
184
147
|
/** @returns {SaveHtmlTemplateParam} */
|