@gofynd/fdk-client-javascript 1.4.13 → 1.4.14
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 +1 -1
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +60 -53
- package/sdk/application/Cart/CartApplicationClient.js +130 -53
- package/sdk/application/Cart/CartApplicationModel.d.ts +489 -143
- package/sdk/application/Cart/CartApplicationModel.js +380 -159
- package/sdk/application/Cart/CartApplicationValidator.d.ts +38 -19
- package/sdk/application/Cart/CartApplicationValidator.js +34 -18
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +88 -68
- package/sdk/application/Catalog/CatalogApplicationClient.js +114 -94
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +194 -142
- package/sdk/application/Catalog/CatalogApplicationModel.js +171 -133
- package/sdk/application/Common/CommonApplicationClient.d.ts +3 -2
- package/sdk/application/Common/CommonApplicationClient.js +6 -5
- package/sdk/application/Common/CommonApplicationModel.d.ts +9 -9
- package/sdk/application/Common/CommonApplicationModel.js +6 -6
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +34 -27
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +34 -27
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +45 -57
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +35 -47
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +2 -2
- package/sdk/application/Content/ContentApplicationClient.d.ts +23 -33
- package/sdk/application/Content/ContentApplicationClient.js +54 -75
- package/sdk/application/Content/ContentApplicationModel.d.ts +93 -37
- package/sdk/application/Content/ContentApplicationModel.js +83 -32
- package/sdk/application/Content/ContentApplicationValidator.d.ts +23 -17
- package/sdk/application/Content/ContentApplicationValidator.js +15 -10
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -8
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +23 -25
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +16 -18
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +6 -6
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +36 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +202 -0
- package/sdk/application/Finance/FinanceApplicationModel.d.ts +289 -0
- package/sdk/application/Finance/FinanceApplicationModel.js +208 -0
- package/sdk/application/Finance/FinanceApplicationValidator.d.ts +25 -0
- package/sdk/application/Finance/FinanceApplicationValidator.js +31 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -3
- package/sdk/application/Lead/LeadApplicationClient.js +2 -3
- package/sdk/application/Lead/LeadApplicationModel.d.ts +11 -11
- package/sdk/application/Lead/LeadApplicationModel.js +19 -19
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +39 -16
- package/sdk/application/Logistic/LogisticApplicationClient.js +189 -21
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +532 -173
- package/sdk/application/Logistic/LogisticApplicationModel.js +409 -139
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +54 -9
- package/sdk/application/Logistic/LogisticApplicationValidator.js +42 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -10
- package/sdk/application/Order/OrderApplicationClient.js +96 -13
- package/sdk/application/Order/OrderApplicationModel.d.ts +434 -102
- package/sdk/application/Order/OrderApplicationModel.js +278 -73
- package/sdk/application/Order/OrderApplicationValidator.d.ts +17 -3
- package/sdk/application/Order/OrderApplicationValidator.js +15 -2
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +96 -99
- package/sdk/application/Payment/PaymentApplicationClient.js +111 -114
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +293 -289
- package/sdk/application/Payment/PaymentApplicationModel.js +243 -241
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +46 -46
- package/sdk/application/Payment/PaymentApplicationValidator.js +46 -46
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -16
- package/sdk/application/Rewards/RewardsApplicationClient.js +19 -22
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +37 -37
- package/sdk/application/Rewards/RewardsApplicationModel.js +29 -29
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +6 -6
- package/sdk/application/Rewards/RewardsApplicationValidator.js +6 -6
- package/sdk/application/Share/ShareApplicationModel.js +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
- package/sdk/application/Theme/ThemeApplicationClient.js +8 -6
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +48 -17
- package/sdk/application/Theme/ThemeApplicationModel.js +42 -22
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +16 -3
- package/sdk/application/Theme/ThemeApplicationValidator.js +9 -2
- package/sdk/application/User/UserApplicationClient.d.ts +10 -10
- package/sdk/application/User/UserApplicationClient.js +10 -10
- package/sdk/application/User/UserApplicationModel.d.ts +17 -17
- package/sdk/application/User/UserApplicationModel.js +16 -16
- package/sdk/application/User/UserApplicationValidator.d.ts +2 -2
- package/sdk/application/User/UserApplicationValidator.js +2 -2
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -4
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +11 -9
- package/sdk/application/Webhook/WebhookApplicationModel.js +8 -6
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +2 -2
- package/sdk/application/Webhook/WebhookApplicationValidator.js +2 -2
- package/sdk/application/index.d.ts +1 -0
- package/sdk/application/index.js +2 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +126 -20
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +970 -20
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +767 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +429 -76
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +120 -6
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
- package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
- package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- 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 +134 -103
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +407 -112
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +111 -65
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +106 -44
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4978 -1303
- package/sdk/platform/Cart/CartPlatformModel.js +1922 -1217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +208 -183
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +383 -358
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +122 -126
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +66 -68
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +141 -118
- package/sdk/platform/Catalog/CatalogPlatformClient.js +193 -170
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1516 -1766
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1393 -1224
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
- package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
- package/sdk/platform/Common/CommonPlatformClient.js +3 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
- package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +124 -141
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +449 -422
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +179 -141
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +168 -130
- package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
- package/sdk/platform/Content/ContentPlatformClient.js +523 -336
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1241 -395
- package/sdk/platform/Content/ContentPlatformModel.js +521 -390
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
- package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
- package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +94 -36
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +15 -4
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +83 -5
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +25 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +178 -97
- package/sdk/platform/Order/OrderPlatformClient.js +589 -229
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5447 -3071
- package/sdk/platform/Order/OrderPlatformModel.js +3496 -1653
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +241 -176
- package/sdk/platform/Order/OrderPlatformValidator.js +153 -97
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +327 -313
- package/sdk/platform/Payment/PaymentPlatformModel.js +283 -273
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +45 -35
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +117 -38
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +22 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +24 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +40 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +58 -64
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +602 -341
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +483 -284
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +8 -8
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +36 -5
- package/sdk/platform/Share/SharePlatformModel.js +27 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
- package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
- package/sdk/platform/User/UserPlatformModel.js +23 -23
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
- package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +6 -5
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
- package/sdk/public/Content/ContentPublicClient.js +791 -5
- package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
- package/sdk/public/Content/ContentPublicModel.js +649 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
- package/sdk/public/Content/ContentPublicValidator.js +88 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
- package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- 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
|
@@ -23,10 +23,10 @@ class FileStorage {
|
|
|
23
23
|
*
|
|
24
24
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
25
25
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
26
|
-
* @returns {Promise<FileStoragePlatformModel.
|
|
26
|
+
* @returns {Promise<FileStoragePlatformModel.FileUploadComplete>} - Success response
|
|
27
27
|
* @name appCompleteUpload
|
|
28
|
-
* @summary:
|
|
29
|
-
* @description:
|
|
28
|
+
* @summary: Application complete upload.
|
|
29
|
+
* @description: Finish uploading a file from an application. - 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: {} },
|
|
@@ -69,7 +69,7 @@ class FileStorage {
|
|
|
69
69
|
const response = await PlatformAPIClient.execute(
|
|
70
70
|
this.config,
|
|
71
71
|
"post",
|
|
72
|
-
`/service/platform/assets/
|
|
72
|
+
`/service/platform/assets/v2.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/complete`,
|
|
73
73
|
query_params,
|
|
74
74
|
body,
|
|
75
75
|
requestHeaders,
|
|
@@ -83,7 +83,7 @@ class FileStorage {
|
|
|
83
83
|
|
|
84
84
|
const {
|
|
85
85
|
error: res_error,
|
|
86
|
-
} = FileStoragePlatformModel.
|
|
86
|
+
} = FileStoragePlatformModel.FileUploadComplete().validate(responseData, {
|
|
87
87
|
abortEarly: false,
|
|
88
88
|
allowUnknown: true,
|
|
89
89
|
});
|
|
@@ -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: Application copy files.
|
|
112
|
+
* @description: Copy files from an application to another location. - 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: {} },
|
|
@@ -188,10 +188,10 @@ class FileStorage {
|
|
|
188
188
|
*
|
|
189
189
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
190
190
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
191
|
-
* @returns {Promise<FileStoragePlatformModel.
|
|
191
|
+
* @returns {Promise<FileStoragePlatformModel.FileUpload>} - Success response
|
|
192
192
|
* @name appStartUpload
|
|
193
|
-
* @summary:
|
|
194
|
-
* @description:
|
|
193
|
+
* @summary: Application start upload.
|
|
194
|
+
* @description: Start uploading a file from an application and returns a storage link in response. - 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: {} },
|
|
@@ -234,7 +234,7 @@ class FileStorage {
|
|
|
234
234
|
const response = await PlatformAPIClient.execute(
|
|
235
235
|
this.config,
|
|
236
236
|
"post",
|
|
237
|
-
`/service/platform/assets/
|
|
237
|
+
`/service/platform/assets/v2.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/start`,
|
|
238
238
|
query_params,
|
|
239
239
|
body,
|
|
240
240
|
requestHeaders,
|
|
@@ -248,7 +248,7 @@ class FileStorage {
|
|
|
248
248
|
|
|
249
249
|
const {
|
|
250
250
|
error: res_error,
|
|
251
|
-
} = FileStoragePlatformModel.
|
|
251
|
+
} = FileStoragePlatformModel.FileUpload().validate(responseData, {
|
|
252
252
|
abortEarly: false,
|
|
253
253
|
allowUnknown: true,
|
|
254
254
|
});
|
|
@@ -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: Application browse files.
|
|
277
|
+
* @description: Browse files within an application. - 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
|
|
365
|
+
* @description: Browse 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 } = {
|
|
@@ -447,6 +447,248 @@ class FileStorage {
|
|
|
447
447
|
return response;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
+
/**
|
|
451
|
+
* @param {FileStoragePlatformApplicationValidator.DeletePdfGeneratorConfigParam} arg
|
|
452
|
+
* - Arg object
|
|
453
|
+
*
|
|
454
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
455
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
456
|
+
* @returns {Promise<Object>} - Success response
|
|
457
|
+
* @name deletePdfGeneratorConfig
|
|
458
|
+
* @summary: Delete a PDF generator configuration
|
|
459
|
+
* @description: Deletes a specific PDF generator configuration based on the provided id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/deletePdfGeneratorConfig/).
|
|
460
|
+
*/
|
|
461
|
+
async deletePdfGeneratorConfig(
|
|
462
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
463
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
464
|
+
) {
|
|
465
|
+
const {
|
|
466
|
+
error,
|
|
467
|
+
} = FileStoragePlatformApplicationValidator.deletePdfGeneratorConfig().validate(
|
|
468
|
+
{
|
|
469
|
+
id,
|
|
470
|
+
},
|
|
471
|
+
{ abortEarly: false, allowUnknown: true }
|
|
472
|
+
);
|
|
473
|
+
if (error) {
|
|
474
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// Showing warrnings if extra unknown parameters are found
|
|
478
|
+
const {
|
|
479
|
+
error: warrning,
|
|
480
|
+
} = FileStoragePlatformApplicationValidator.deletePdfGeneratorConfig().validate(
|
|
481
|
+
{
|
|
482
|
+
id,
|
|
483
|
+
},
|
|
484
|
+
{ abortEarly: false, allowUnknown: false }
|
|
485
|
+
);
|
|
486
|
+
if (warrning) {
|
|
487
|
+
Logger({
|
|
488
|
+
level: "WARN",
|
|
489
|
+
message: `Parameter Validation warrnings for platform > FileStorage > deletePdfGeneratorConfig \n ${warrning}`,
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
const query_params = {};
|
|
494
|
+
|
|
495
|
+
const response = await PlatformAPIClient.execute(
|
|
496
|
+
this.config,
|
|
497
|
+
"delete",
|
|
498
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config/${id}`,
|
|
499
|
+
query_params,
|
|
500
|
+
undefined,
|
|
501
|
+
requestHeaders,
|
|
502
|
+
{ responseHeaders }
|
|
503
|
+
);
|
|
504
|
+
|
|
505
|
+
let responseData = response;
|
|
506
|
+
if (responseHeaders) {
|
|
507
|
+
responseData = response[0];
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
511
|
+
abortEarly: false,
|
|
512
|
+
allowUnknown: true,
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
if (res_error) {
|
|
516
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
517
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
518
|
+
} else {
|
|
519
|
+
Logger({
|
|
520
|
+
level: "WARN",
|
|
521
|
+
message: `Response Validation Warnings for platform > FileStorage > deletePdfGeneratorConfig \n ${res_error}`,
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
return response;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* @param {FileStoragePlatformApplicationValidator.FetchPdfDefaultTemplateByIdParam} arg
|
|
531
|
+
* - Arg object
|
|
532
|
+
*
|
|
533
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
534
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
535
|
+
* @returns {Promise<FileStoragePlatformModel.PdfDefaultTemplateById>} -
|
|
536
|
+
* Success response
|
|
537
|
+
* @name fetchPdfDefaultTemplateById
|
|
538
|
+
* @summary: get default html template for invoice or label
|
|
539
|
+
* @description: get default html template for invoice such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/fetchPdfDefaultTemplateById/).
|
|
540
|
+
*/
|
|
541
|
+
async fetchPdfDefaultTemplateById(
|
|
542
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
543
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
544
|
+
) {
|
|
545
|
+
const {
|
|
546
|
+
error,
|
|
547
|
+
} = FileStoragePlatformApplicationValidator.fetchPdfDefaultTemplateById().validate(
|
|
548
|
+
{
|
|
549
|
+
id,
|
|
550
|
+
},
|
|
551
|
+
{ abortEarly: false, allowUnknown: true }
|
|
552
|
+
);
|
|
553
|
+
if (error) {
|
|
554
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
// Showing warrnings if extra unknown parameters are found
|
|
558
|
+
const {
|
|
559
|
+
error: warrning,
|
|
560
|
+
} = FileStoragePlatformApplicationValidator.fetchPdfDefaultTemplateById().validate(
|
|
561
|
+
{
|
|
562
|
+
id,
|
|
563
|
+
},
|
|
564
|
+
{ abortEarly: false, allowUnknown: false }
|
|
565
|
+
);
|
|
566
|
+
if (warrning) {
|
|
567
|
+
Logger({
|
|
568
|
+
level: "WARN",
|
|
569
|
+
message: `Parameter Validation warrnings for platform > FileStorage > fetchPdfDefaultTemplateById \n ${warrning}`,
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
const query_params = {};
|
|
574
|
+
|
|
575
|
+
const response = await PlatformAPIClient.execute(
|
|
576
|
+
this.config,
|
|
577
|
+
"get",
|
|
578
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/default-template/${id}`,
|
|
579
|
+
query_params,
|
|
580
|
+
undefined,
|
|
581
|
+
requestHeaders,
|
|
582
|
+
{ responseHeaders }
|
|
583
|
+
);
|
|
584
|
+
|
|
585
|
+
let responseData = response;
|
|
586
|
+
if (responseHeaders) {
|
|
587
|
+
responseData = response[0];
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
const {
|
|
591
|
+
error: res_error,
|
|
592
|
+
} = FileStoragePlatformModel.PdfDefaultTemplateById().validate(
|
|
593
|
+
responseData,
|
|
594
|
+
{ abortEarly: false, allowUnknown: true }
|
|
595
|
+
);
|
|
596
|
+
|
|
597
|
+
if (res_error) {
|
|
598
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
599
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
600
|
+
} else {
|
|
601
|
+
Logger({
|
|
602
|
+
level: "WARN",
|
|
603
|
+
message: `Response Validation Warnings for platform > FileStorage > fetchPdfDefaultTemplateById \n ${res_error}`,
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
return response;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* @param {FileStoragePlatformApplicationValidator.FetchPdfTypeByIdParam} arg
|
|
613
|
+
* - Arg object
|
|
614
|
+
*
|
|
615
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
616
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
617
|
+
* @returns {Promise<FileStoragePlatformModel.PdfTypeByIdDetails>} - Success response
|
|
618
|
+
* @name fetchPdfTypeById
|
|
619
|
+
* @summary: Get the pdf types of by id
|
|
620
|
+
* @description: Get the pdf types of PDF formats for filter - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/fetchPdfTypeById/).
|
|
621
|
+
*/
|
|
622
|
+
async fetchPdfTypeById(
|
|
623
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
624
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
625
|
+
) {
|
|
626
|
+
const {
|
|
627
|
+
error,
|
|
628
|
+
} = FileStoragePlatformApplicationValidator.fetchPdfTypeById().validate(
|
|
629
|
+
{
|
|
630
|
+
id,
|
|
631
|
+
},
|
|
632
|
+
{ abortEarly: false, allowUnknown: true }
|
|
633
|
+
);
|
|
634
|
+
if (error) {
|
|
635
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
// Showing warrnings if extra unknown parameters are found
|
|
639
|
+
const {
|
|
640
|
+
error: warrning,
|
|
641
|
+
} = FileStoragePlatformApplicationValidator.fetchPdfTypeById().validate(
|
|
642
|
+
{
|
|
643
|
+
id,
|
|
644
|
+
},
|
|
645
|
+
{ abortEarly: false, allowUnknown: false }
|
|
646
|
+
);
|
|
647
|
+
if (warrning) {
|
|
648
|
+
Logger({
|
|
649
|
+
level: "WARN",
|
|
650
|
+
message: `Parameter Validation warrnings for platform > FileStorage > fetchPdfTypeById \n ${warrning}`,
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
const query_params = {};
|
|
655
|
+
|
|
656
|
+
const response = await PlatformAPIClient.execute(
|
|
657
|
+
this.config,
|
|
658
|
+
"get",
|
|
659
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/types/${id}`,
|
|
660
|
+
query_params,
|
|
661
|
+
undefined,
|
|
662
|
+
requestHeaders,
|
|
663
|
+
{ responseHeaders }
|
|
664
|
+
);
|
|
665
|
+
|
|
666
|
+
let responseData = response;
|
|
667
|
+
if (responseHeaders) {
|
|
668
|
+
responseData = response[0];
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
const {
|
|
672
|
+
error: res_error,
|
|
673
|
+
} = FileStoragePlatformModel.PdfTypeByIdDetails().validate(responseData, {
|
|
674
|
+
abortEarly: false,
|
|
675
|
+
allowUnknown: true,
|
|
676
|
+
});
|
|
677
|
+
|
|
678
|
+
if (res_error) {
|
|
679
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
680
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
681
|
+
} else {
|
|
682
|
+
Logger({
|
|
683
|
+
level: "WARN",
|
|
684
|
+
message: `Response Validation Warnings for platform > FileStorage > fetchPdfTypeById \n ${res_error}`,
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
return response;
|
|
690
|
+
}
|
|
691
|
+
|
|
450
692
|
/**
|
|
451
693
|
* @param {FileStoragePlatformApplicationValidator.GeneratePaymentReceiptParam} arg
|
|
452
694
|
* - Arg object
|
|
@@ -455,7 +697,7 @@ class FileStorage {
|
|
|
455
697
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
456
698
|
* @returns {Promise<Object>} - Success response
|
|
457
699
|
* @name generatePaymentReceipt
|
|
458
|
-
* @summary: Generate payment receipt
|
|
700
|
+
* @summary: Generate payment receipt.
|
|
459
701
|
* @description: Generate Payment Receipt for Jiomart Digital - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/generatePaymentReceipt/).
|
|
460
702
|
*/
|
|
461
703
|
async generatePaymentReceipt(
|
|
@@ -527,28 +769,25 @@ class FileStorage {
|
|
|
527
769
|
}
|
|
528
770
|
|
|
529
771
|
/**
|
|
530
|
-
* @param {FileStoragePlatformApplicationValidator.
|
|
772
|
+
* @param {FileStoragePlatformApplicationValidator.GetConfigHtmlTemplateByIdParam} arg
|
|
531
773
|
* - Arg object
|
|
532
774
|
*
|
|
533
775
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
534
776
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
535
|
-
* @returns {Promise<
|
|
536
|
-
* @name
|
|
537
|
-
* @summary:
|
|
538
|
-
* @description:
|
|
539
|
-
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultHtmlTemplate/).
|
|
777
|
+
* @returns {Promise<Object>} - Success response
|
|
778
|
+
* @name getConfigHtmlTemplateById
|
|
779
|
+
* @summary: Update html template for invoice or label
|
|
780
|
+
* @description: Update html template for invoice such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getConfigHtmlTemplateById/).
|
|
540
781
|
*/
|
|
541
|
-
async
|
|
542
|
-
{
|
|
782
|
+
async getConfigHtmlTemplateById(
|
|
783
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
543
784
|
{ responseHeaders } = { responseHeaders: false }
|
|
544
785
|
) {
|
|
545
786
|
const {
|
|
546
787
|
error,
|
|
547
|
-
} = FileStoragePlatformApplicationValidator.
|
|
788
|
+
} = FileStoragePlatformApplicationValidator.getConfigHtmlTemplateById().validate(
|
|
548
789
|
{
|
|
549
|
-
|
|
550
|
-
format,
|
|
551
|
-
countryCode,
|
|
790
|
+
id,
|
|
552
791
|
},
|
|
553
792
|
{ abortEarly: false, allowUnknown: true }
|
|
554
793
|
);
|
|
@@ -559,30 +798,25 @@ class FileStorage {
|
|
|
559
798
|
// Showing warrnings if extra unknown parameters are found
|
|
560
799
|
const {
|
|
561
800
|
error: warrning,
|
|
562
|
-
} = FileStoragePlatformApplicationValidator.
|
|
801
|
+
} = FileStoragePlatformApplicationValidator.getConfigHtmlTemplateById().validate(
|
|
563
802
|
{
|
|
564
|
-
|
|
565
|
-
format,
|
|
566
|
-
countryCode,
|
|
803
|
+
id,
|
|
567
804
|
},
|
|
568
805
|
{ abortEarly: false, allowUnknown: false }
|
|
569
806
|
);
|
|
570
807
|
if (warrning) {
|
|
571
808
|
Logger({
|
|
572
809
|
level: "WARN",
|
|
573
|
-
message: `Parameter Validation warrnings for platform > FileStorage >
|
|
810
|
+
message: `Parameter Validation warrnings for platform > FileStorage > getConfigHtmlTemplateById \n ${warrning}`,
|
|
574
811
|
});
|
|
575
812
|
}
|
|
576
813
|
|
|
577
814
|
const query_params = {};
|
|
578
|
-
query_params["pdf_type_id"] = pdfTypeId;
|
|
579
|
-
query_params["format"] = format;
|
|
580
|
-
query_params["country_code"] = countryCode;
|
|
581
815
|
|
|
582
816
|
const response = await PlatformAPIClient.execute(
|
|
583
817
|
this.config,
|
|
584
818
|
"get",
|
|
585
|
-
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`,
|
|
819
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config/${id}`,
|
|
586
820
|
query_params,
|
|
587
821
|
undefined,
|
|
588
822
|
requestHeaders,
|
|
@@ -594,9 +828,7 @@ class FileStorage {
|
|
|
594
828
|
responseData = response[0];
|
|
595
829
|
}
|
|
596
830
|
|
|
597
|
-
const {
|
|
598
|
-
error: res_error,
|
|
599
|
-
} = FileStoragePlatformModel.PdfConfigSuccess().validate(responseData, {
|
|
831
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
600
832
|
abortEarly: false,
|
|
601
833
|
allowUnknown: true,
|
|
602
834
|
});
|
|
@@ -607,7 +839,7 @@ class FileStorage {
|
|
|
607
839
|
} else {
|
|
608
840
|
Logger({
|
|
609
841
|
level: "WARN",
|
|
610
|
-
message: `Response Validation Warnings for platform > FileStorage >
|
|
842
|
+
message: `Response Validation Warnings for platform > FileStorage > getConfigHtmlTemplateById \n ${res_error}`,
|
|
611
843
|
});
|
|
612
844
|
}
|
|
613
845
|
}
|
|
@@ -621,11 +853,10 @@ class FileStorage {
|
|
|
621
853
|
*
|
|
622
854
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
623
855
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
624
|
-
* @returns {Promise<FileStoragePlatformModel.
|
|
625
|
-
* Success response
|
|
856
|
+
* @returns {Promise<FileStoragePlatformModel.PdfDataItemsDetails>} - Success response
|
|
626
857
|
* @name getDefaultPdfData
|
|
627
|
-
* @summary: Get default PDF data
|
|
628
|
-
* @description: Retrieve default
|
|
858
|
+
* @summary: Get default PDF data.
|
|
859
|
+
* @description: Retrieve default data for PDF generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/).
|
|
629
860
|
*/
|
|
630
861
|
async getDefaultPdfData(
|
|
631
862
|
{ pdfTypeId, countryCode, requestHeaders } = { requestHeaders: {} },
|
|
@@ -682,10 +913,10 @@ class FileStorage {
|
|
|
682
913
|
|
|
683
914
|
const {
|
|
684
915
|
error: res_error,
|
|
685
|
-
} = FileStoragePlatformModel.
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
);
|
|
916
|
+
} = FileStoragePlatformModel.PdfDataItemsDetails().validate(responseData, {
|
|
917
|
+
abortEarly: false,
|
|
918
|
+
allowUnknown: true,
|
|
919
|
+
});
|
|
689
920
|
|
|
690
921
|
if (res_error) {
|
|
691
922
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -710,8 +941,8 @@ class FileStorage {
|
|
|
710
941
|
* @returns {Promise<FileStoragePlatformModel.PdfDefaultTemplateSuccess>} -
|
|
711
942
|
* Success response
|
|
712
943
|
* @name getDefaultPdfTemplate
|
|
713
|
-
* @summary: Get default PDF template
|
|
714
|
-
* @description: Retrieve
|
|
944
|
+
* @summary: Get default PDF template.
|
|
945
|
+
* @description: Retrieve the default PDF template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/).
|
|
715
946
|
*/
|
|
716
947
|
async getDefaultPdfTemplate(
|
|
717
948
|
{ pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} },
|
|
@@ -790,24 +1021,193 @@ class FileStorage {
|
|
|
790
1021
|
return response;
|
|
791
1022
|
}
|
|
792
1023
|
|
|
1024
|
+
/**
|
|
1025
|
+
* @param {FileStoragePlatformApplicationValidator.GetHtmlTemplateConfigParam} arg
|
|
1026
|
+
* - Arg object
|
|
1027
|
+
*
|
|
1028
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1029
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1030
|
+
* @returns {Promise<FileStoragePlatformModel.PdfConfigSuccess>} - Success response
|
|
1031
|
+
* @name getHtmlTemplateConfig
|
|
1032
|
+
* @summary: Get html template for sales channel
|
|
1033
|
+
* @description: Get default html template for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getHtmlTemplateConfig/).
|
|
1034
|
+
*/
|
|
1035
|
+
async getHtmlTemplateConfig(
|
|
1036
|
+
{ pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} },
|
|
1037
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1038
|
+
) {
|
|
1039
|
+
const {
|
|
1040
|
+
error,
|
|
1041
|
+
} = FileStoragePlatformApplicationValidator.getHtmlTemplateConfig().validate(
|
|
1042
|
+
{
|
|
1043
|
+
pdfTypeId,
|
|
1044
|
+
format,
|
|
1045
|
+
countryCode,
|
|
1046
|
+
},
|
|
1047
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1048
|
+
);
|
|
1049
|
+
if (error) {
|
|
1050
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1054
|
+
const {
|
|
1055
|
+
error: warrning,
|
|
1056
|
+
} = FileStoragePlatformApplicationValidator.getHtmlTemplateConfig().validate(
|
|
1057
|
+
{
|
|
1058
|
+
pdfTypeId,
|
|
1059
|
+
format,
|
|
1060
|
+
countryCode,
|
|
1061
|
+
},
|
|
1062
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1063
|
+
);
|
|
1064
|
+
if (warrning) {
|
|
1065
|
+
Logger({
|
|
1066
|
+
level: "WARN",
|
|
1067
|
+
message: `Parameter Validation warrnings for platform > FileStorage > getHtmlTemplateConfig \n ${warrning}`,
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
const query_params = {};
|
|
1072
|
+
query_params["pdf_type_id"] = pdfTypeId;
|
|
1073
|
+
query_params["format"] = format;
|
|
1074
|
+
query_params["country_code"] = countryCode;
|
|
1075
|
+
|
|
1076
|
+
const response = await PlatformAPIClient.execute(
|
|
1077
|
+
this.config,
|
|
1078
|
+
"get",
|
|
1079
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`,
|
|
1080
|
+
query_params,
|
|
1081
|
+
undefined,
|
|
1082
|
+
requestHeaders,
|
|
1083
|
+
{ responseHeaders }
|
|
1084
|
+
);
|
|
1085
|
+
|
|
1086
|
+
let responseData = response;
|
|
1087
|
+
if (responseHeaders) {
|
|
1088
|
+
responseData = response[0];
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
const {
|
|
1092
|
+
error: res_error,
|
|
1093
|
+
} = FileStoragePlatformModel.PdfConfigSuccess().validate(responseData, {
|
|
1094
|
+
abortEarly: false,
|
|
1095
|
+
allowUnknown: true,
|
|
1096
|
+
});
|
|
1097
|
+
|
|
1098
|
+
if (res_error) {
|
|
1099
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1100
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1101
|
+
} else {
|
|
1102
|
+
Logger({
|
|
1103
|
+
level: "WARN",
|
|
1104
|
+
message: `Response Validation Warnings for platform > FileStorage > getHtmlTemplateConfig \n ${res_error}`,
|
|
1105
|
+
});
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
return response;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* @param {FileStoragePlatformApplicationValidator.GetPdfPayloadByIdParam} arg
|
|
1114
|
+
* - Arg object
|
|
1115
|
+
*
|
|
1116
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1117
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1118
|
+
* @returns {Promise<FileStoragePlatformModel.MapperDetails>} - Success response
|
|
1119
|
+
* @name getPdfPayloadById
|
|
1120
|
+
* @summary: Get default PDF data.
|
|
1121
|
+
* @description: Retrieve default data for PDF generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfPayloadById/).
|
|
1122
|
+
*/
|
|
1123
|
+
async getPdfPayloadById(
|
|
1124
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
1125
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1126
|
+
) {
|
|
1127
|
+
const {
|
|
1128
|
+
error,
|
|
1129
|
+
} = FileStoragePlatformApplicationValidator.getPdfPayloadById().validate(
|
|
1130
|
+
{
|
|
1131
|
+
id,
|
|
1132
|
+
},
|
|
1133
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1134
|
+
);
|
|
1135
|
+
if (error) {
|
|
1136
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1140
|
+
const {
|
|
1141
|
+
error: warrning,
|
|
1142
|
+
} = FileStoragePlatformApplicationValidator.getPdfPayloadById().validate(
|
|
1143
|
+
{
|
|
1144
|
+
id,
|
|
1145
|
+
},
|
|
1146
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1147
|
+
);
|
|
1148
|
+
if (warrning) {
|
|
1149
|
+
Logger({
|
|
1150
|
+
level: "WARN",
|
|
1151
|
+
message: `Parameter Validation warrnings for platform > FileStorage > getPdfPayloadById \n ${warrning}`,
|
|
1152
|
+
});
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
const query_params = {};
|
|
1156
|
+
|
|
1157
|
+
const response = await PlatformAPIClient.execute(
|
|
1158
|
+
this.config,
|
|
1159
|
+
"get",
|
|
1160
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/mapper/${id}`,
|
|
1161
|
+
query_params,
|
|
1162
|
+
undefined,
|
|
1163
|
+
requestHeaders,
|
|
1164
|
+
{ responseHeaders }
|
|
1165
|
+
);
|
|
1166
|
+
|
|
1167
|
+
let responseData = response;
|
|
1168
|
+
if (responseHeaders) {
|
|
1169
|
+
responseData = response[0];
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
const {
|
|
1173
|
+
error: res_error,
|
|
1174
|
+
} = FileStoragePlatformModel.MapperDetails().validate(responseData, {
|
|
1175
|
+
abortEarly: false,
|
|
1176
|
+
allowUnknown: true,
|
|
1177
|
+
});
|
|
1178
|
+
|
|
1179
|
+
if (res_error) {
|
|
1180
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1181
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1182
|
+
} else {
|
|
1183
|
+
Logger({
|
|
1184
|
+
level: "WARN",
|
|
1185
|
+
message: `Response Validation Warnings for platform > FileStorage > getPdfPayloadById \n ${res_error}`,
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
return response;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
793
1193
|
/**
|
|
794
1194
|
* @param {FileStoragePlatformApplicationValidator.GetPdfTypesParam} arg - Arg object
|
|
795
1195
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
796
1196
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
797
|
-
* @returns {Promise<FileStoragePlatformModel.
|
|
798
|
-
* Success response
|
|
1197
|
+
* @returns {Promise<FileStoragePlatformModel.InvoiceTypes>} - Success response
|
|
799
1198
|
* @name getPdfTypes
|
|
800
|
-
* @summary: Get
|
|
801
|
-
* @description:
|
|
1199
|
+
* @summary: Get all the supported invoice pdf types
|
|
1200
|
+
* @description: Get all the supported invoice pdf types such as Invoice, Label, Delivery challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/).
|
|
802
1201
|
*/
|
|
803
1202
|
async getPdfTypes(
|
|
804
|
-
{ countryCode, requestHeaders } = { requestHeaders: {} },
|
|
1203
|
+
{ storeOs, countryCode, requestHeaders } = { requestHeaders: {} },
|
|
805
1204
|
{ responseHeaders } = { responseHeaders: false }
|
|
806
1205
|
) {
|
|
807
1206
|
const {
|
|
808
1207
|
error,
|
|
809
1208
|
} = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
|
|
810
1209
|
{
|
|
1210
|
+
storeOs,
|
|
811
1211
|
countryCode,
|
|
812
1212
|
},
|
|
813
1213
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -821,6 +1221,7 @@ class FileStorage {
|
|
|
821
1221
|
error: warrning,
|
|
822
1222
|
} = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
|
|
823
1223
|
{
|
|
1224
|
+
storeOs,
|
|
824
1225
|
countryCode,
|
|
825
1226
|
},
|
|
826
1227
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -834,6 +1235,7 @@ class FileStorage {
|
|
|
834
1235
|
|
|
835
1236
|
const query_params = {};
|
|
836
1237
|
query_params["country_code"] = countryCode;
|
|
1238
|
+
query_params["store_os"] = storeOs;
|
|
837
1239
|
|
|
838
1240
|
const response = await PlatformAPIClient.execute(
|
|
839
1241
|
this.config,
|
|
@@ -852,7 +1254,7 @@ class FileStorage {
|
|
|
852
1254
|
|
|
853
1255
|
const {
|
|
854
1256
|
error: res_error,
|
|
855
|
-
} = FileStoragePlatformModel.
|
|
1257
|
+
} = FileStoragePlatformModel.InvoiceTypes().validate(responseData, {
|
|
856
1258
|
abortEarly: false,
|
|
857
1259
|
allowUnknown: true,
|
|
858
1260
|
});
|
|
@@ -880,8 +1282,8 @@ class FileStorage {
|
|
|
880
1282
|
* @returns {Promise<FileStoragePlatformModel.PdfConfigSaveSuccess>} -
|
|
881
1283
|
* Success response
|
|
882
1284
|
* @name saveHtmlTemplate
|
|
883
|
-
* @summary: Save
|
|
884
|
-
* @description:
|
|
1285
|
+
* @summary: Save HTML template.
|
|
1286
|
+
* @description: Store an HTML template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/saveHtmlTemplate/).
|
|
885
1287
|
*/
|
|
886
1288
|
async saveHtmlTemplate(
|
|
887
1289
|
{ body, requestHeaders } = { requestHeaders: {} },
|