@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
|
@@ -11,7 +11,7 @@ export = FileStorageApplicationModel;
|
|
|
11
11
|
* @property {string} url - The signed URL for uploading the file.
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
|
-
* @typedef
|
|
14
|
+
* @typedef FileUpload
|
|
15
15
|
* @property {string} file_name - The name of the file that was uploaded.
|
|
16
16
|
* @property {string} file_path - The path to the file in the storage location.
|
|
17
17
|
* @property {string} content_type - The content type of the file.
|
|
@@ -20,7 +20,6 @@ export = FileStorageApplicationModel;
|
|
|
20
20
|
* @property {string} operation - The operation to be performed on the storage service.
|
|
21
21
|
* @property {number} size - The size of the file in bytes.
|
|
22
22
|
* @property {Upload} upload
|
|
23
|
-
* @property {CDN} cdn
|
|
24
23
|
* @property {string[]} [tags] - Tags associated with the file.
|
|
25
24
|
*/
|
|
26
25
|
/**
|
|
@@ -29,7 +28,7 @@ export = FileStorageApplicationModel;
|
|
|
29
28
|
* within the storage structure where the file should be placed or is located.
|
|
30
29
|
*/
|
|
31
30
|
/**
|
|
32
|
-
* @typedef
|
|
31
|
+
* @typedef FileUploadStart
|
|
33
32
|
* @property {string} file_name - The name of the file to be uploaded.
|
|
34
33
|
* @property {string} content_type - The name of the file to be uploaded.
|
|
35
34
|
* @property {number} size - The size of the file in bytes.
|
|
@@ -41,7 +40,7 @@ export = FileStorageApplicationModel;
|
|
|
41
40
|
* @property {string} [username] - The username of the user who created the file.
|
|
42
41
|
*/
|
|
43
42
|
/**
|
|
44
|
-
* @typedef
|
|
43
|
+
* @typedef FileUploadComplete
|
|
45
44
|
* @property {string} _id - The unique identifier of the uploaded file.
|
|
46
45
|
* @property {string} file_name - The name of the file that was uploaded.
|
|
47
46
|
* @property {string} file_path - The path to the file in the storage location.
|
|
@@ -65,18 +64,18 @@ export = FileStorageApplicationModel;
|
|
|
65
64
|
* @property {number} expiry - The expiration time for the signed URL.
|
|
66
65
|
*/
|
|
67
66
|
/**
|
|
68
|
-
* @typedef
|
|
67
|
+
* @typedef SignUrlResult
|
|
69
68
|
* @property {Urls[]} urls - Signed URL object.
|
|
70
69
|
*/
|
|
71
70
|
/**
|
|
72
|
-
* @typedef
|
|
71
|
+
* @typedef SignUrl
|
|
73
72
|
* @property {number} expiry - The expiration time for the signed URL.
|
|
74
|
-
* @property {string[]} urls - List of asset URLs to be signed.
|
|
73
|
+
* @property {string[]} urls - List of asset URLs to be signed.
|
|
75
74
|
*/
|
|
76
75
|
declare class FileStorageApplicationModel {
|
|
77
76
|
}
|
|
78
77
|
declare namespace FileStorageApplicationModel {
|
|
79
|
-
export { CDN, Upload,
|
|
78
|
+
export { CDN, Upload, FileUpload, Params, FileUploadStart, CreatedBy, FileUploadComplete, Urls, SignUrlResult, SignUrl };
|
|
80
79
|
}
|
|
81
80
|
/** @returns {CDN} */
|
|
82
81
|
declare function CDN(): CDN;
|
|
@@ -106,9 +105,9 @@ type Upload = {
|
|
|
106
105
|
*/
|
|
107
106
|
url: string;
|
|
108
107
|
};
|
|
109
|
-
/** @returns {
|
|
110
|
-
declare function
|
|
111
|
-
type
|
|
108
|
+
/** @returns {FileUpload} */
|
|
109
|
+
declare function FileUpload(): FileUpload;
|
|
110
|
+
type FileUpload = {
|
|
112
111
|
/**
|
|
113
112
|
* - The name of the file that was uploaded.
|
|
114
113
|
*/
|
|
@@ -138,7 +137,6 @@ type StartResponse = {
|
|
|
138
137
|
*/
|
|
139
138
|
size: number;
|
|
140
139
|
upload: Upload;
|
|
141
|
-
cdn: CDN;
|
|
142
140
|
/**
|
|
143
141
|
* - Tags associated with the file.
|
|
144
142
|
*/
|
|
@@ -153,9 +151,9 @@ type Params = {
|
|
|
153
151
|
*/
|
|
154
152
|
subpath?: string;
|
|
155
153
|
};
|
|
156
|
-
/** @returns {
|
|
157
|
-
declare function
|
|
158
|
-
type
|
|
154
|
+
/** @returns {FileUploadStart} */
|
|
155
|
+
declare function FileUploadStart(): FileUploadStart;
|
|
156
|
+
type FileUploadStart = {
|
|
159
157
|
/**
|
|
160
158
|
* - The name of the file to be uploaded.
|
|
161
159
|
*/
|
|
@@ -182,9 +180,9 @@ type CreatedBy = {
|
|
|
182
180
|
*/
|
|
183
181
|
username?: string;
|
|
184
182
|
};
|
|
185
|
-
/** @returns {
|
|
186
|
-
declare function
|
|
187
|
-
type
|
|
183
|
+
/** @returns {FileUploadComplete} */
|
|
184
|
+
declare function FileUploadComplete(): FileUploadComplete;
|
|
185
|
+
type FileUploadComplete = {
|
|
188
186
|
/**
|
|
189
187
|
* - The unique identifier of the uploaded file.
|
|
190
188
|
*/
|
|
@@ -250,23 +248,23 @@ type Urls = {
|
|
|
250
248
|
*/
|
|
251
249
|
expiry: number;
|
|
252
250
|
};
|
|
253
|
-
/** @returns {
|
|
254
|
-
declare function
|
|
255
|
-
type
|
|
251
|
+
/** @returns {SignUrlResult} */
|
|
252
|
+
declare function SignUrlResult(): SignUrlResult;
|
|
253
|
+
type SignUrlResult = {
|
|
256
254
|
/**
|
|
257
255
|
* - Signed URL object.
|
|
258
256
|
*/
|
|
259
257
|
urls: Urls[];
|
|
260
258
|
};
|
|
261
|
-
/** @returns {
|
|
262
|
-
declare function
|
|
263
|
-
type
|
|
259
|
+
/** @returns {SignUrl} */
|
|
260
|
+
declare function SignUrl(): SignUrl;
|
|
261
|
+
type SignUrl = {
|
|
264
262
|
/**
|
|
265
263
|
* - The expiration time for the signed URL.
|
|
266
264
|
*/
|
|
267
265
|
expiry: number;
|
|
268
266
|
/**
|
|
269
|
-
* - List of asset URLs to be signed.
|
|
267
|
+
* - List of asset URLs to be signed.
|
|
270
268
|
*/
|
|
271
269
|
urls: string[];
|
|
272
270
|
};
|
|
@@ -14,7 +14,7 @@ const Joi = require("joi");
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* @typedef
|
|
17
|
+
* @typedef FileUpload
|
|
18
18
|
* @property {string} file_name - The name of the file that was uploaded.
|
|
19
19
|
* @property {string} file_path - The path to the file in the storage location.
|
|
20
20
|
* @property {string} content_type - The content type of the file.
|
|
@@ -23,7 +23,6 @@ const Joi = require("joi");
|
|
|
23
23
|
* @property {string} operation - The operation to be performed on the storage service.
|
|
24
24
|
* @property {number} size - The size of the file in bytes.
|
|
25
25
|
* @property {Upload} upload
|
|
26
|
-
* @property {CDN} cdn
|
|
27
26
|
* @property {string[]} [tags] - Tags associated with the file.
|
|
28
27
|
*/
|
|
29
28
|
|
|
@@ -34,7 +33,7 @@ const Joi = require("joi");
|
|
|
34
33
|
*/
|
|
35
34
|
|
|
36
35
|
/**
|
|
37
|
-
* @typedef
|
|
36
|
+
* @typedef FileUploadStart
|
|
38
37
|
* @property {string} file_name - The name of the file to be uploaded.
|
|
39
38
|
* @property {string} content_type - The name of the file to be uploaded.
|
|
40
39
|
* @property {number} size - The size of the file in bytes.
|
|
@@ -48,7 +47,7 @@ const Joi = require("joi");
|
|
|
48
47
|
*/
|
|
49
48
|
|
|
50
49
|
/**
|
|
51
|
-
* @typedef
|
|
50
|
+
* @typedef FileUploadComplete
|
|
52
51
|
* @property {string} _id - The unique identifier of the uploaded file.
|
|
53
52
|
* @property {string} file_name - The name of the file that was uploaded.
|
|
54
53
|
* @property {string} file_path - The path to the file in the storage location.
|
|
@@ -74,14 +73,14 @@ const Joi = require("joi");
|
|
|
74
73
|
*/
|
|
75
74
|
|
|
76
75
|
/**
|
|
77
|
-
* @typedef
|
|
76
|
+
* @typedef SignUrlResult
|
|
78
77
|
* @property {Urls[]} urls - Signed URL object.
|
|
79
78
|
*/
|
|
80
79
|
|
|
81
80
|
/**
|
|
82
|
-
* @typedef
|
|
81
|
+
* @typedef SignUrl
|
|
83
82
|
* @property {number} expiry - The expiration time for the signed URL.
|
|
84
|
-
* @property {string[]} urls - List of asset URLs to be signed.
|
|
83
|
+
* @property {string[]} urls - List of asset URLs to be signed.
|
|
85
84
|
*/
|
|
86
85
|
|
|
87
86
|
class FileStorageApplicationModel {
|
|
@@ -102,8 +101,8 @@ class FileStorageApplicationModel {
|
|
|
102
101
|
});
|
|
103
102
|
}
|
|
104
103
|
|
|
105
|
-
/** @returns {
|
|
106
|
-
static
|
|
104
|
+
/** @returns {FileUpload} */
|
|
105
|
+
static FileUpload() {
|
|
107
106
|
return Joi.object({
|
|
108
107
|
file_name: Joi.string().allow("").required(),
|
|
109
108
|
file_path: Joi.string().allow("").required(),
|
|
@@ -113,7 +112,6 @@ class FileStorageApplicationModel {
|
|
|
113
112
|
operation: Joi.string().allow("").required(),
|
|
114
113
|
size: Joi.number().required(),
|
|
115
114
|
upload: FileStorageApplicationModel.Upload().required(),
|
|
116
|
-
cdn: FileStorageApplicationModel.CDN().required(),
|
|
117
115
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
118
116
|
});
|
|
119
117
|
}
|
|
@@ -125,8 +123,8 @@ class FileStorageApplicationModel {
|
|
|
125
123
|
});
|
|
126
124
|
}
|
|
127
125
|
|
|
128
|
-
/** @returns {
|
|
129
|
-
static
|
|
126
|
+
/** @returns {FileUploadStart} */
|
|
127
|
+
static FileUploadStart() {
|
|
130
128
|
return Joi.object({
|
|
131
129
|
file_name: Joi.string().allow("").required(),
|
|
132
130
|
content_type: Joi.string().allow("").required(),
|
|
@@ -143,8 +141,8 @@ class FileStorageApplicationModel {
|
|
|
143
141
|
});
|
|
144
142
|
}
|
|
145
143
|
|
|
146
|
-
/** @returns {
|
|
147
|
-
static
|
|
144
|
+
/** @returns {FileUploadComplete} */
|
|
145
|
+
static FileUploadComplete() {
|
|
148
146
|
return Joi.object({
|
|
149
147
|
_id: Joi.string().allow("").required(),
|
|
150
148
|
file_name: Joi.string().allow("").required(),
|
|
@@ -172,15 +170,15 @@ class FileStorageApplicationModel {
|
|
|
172
170
|
});
|
|
173
171
|
}
|
|
174
172
|
|
|
175
|
-
/** @returns {
|
|
176
|
-
static
|
|
173
|
+
/** @returns {SignUrlResult} */
|
|
174
|
+
static SignUrlResult() {
|
|
177
175
|
return Joi.object({
|
|
178
176
|
urls: Joi.array().items(FileStorageApplicationModel.Urls()).required(),
|
|
179
177
|
});
|
|
180
178
|
}
|
|
181
179
|
|
|
182
|
-
/** @returns {
|
|
183
|
-
static
|
|
180
|
+
/** @returns {SignUrl} */
|
|
181
|
+
static SignUrl() {
|
|
184
182
|
return Joi.object({
|
|
185
183
|
expiry: Joi.number().required(),
|
|
186
184
|
urls: Joi.array().items(Joi.string().allow("")).required(),
|
|
@@ -5,11 +5,11 @@ export = FileStorageApplicationValidator;
|
|
|
5
5
|
* files(products, orders, logistics etc), Required for validating the data of
|
|
6
6
|
* the file being uploaded, decides where exactly the file will be stored
|
|
7
7
|
* inside the storage bucket.
|
|
8
|
-
* @property {FileStorageApplicationModel.
|
|
8
|
+
* @property {FileStorageApplicationModel.FileUpload} body
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* @typedef SignUrlsParam
|
|
12
|
-
* @property {FileStorageApplicationModel.
|
|
12
|
+
* @property {FileStorageApplicationModel.SignUrl} body
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
15
|
* @typedef StartUploadParam
|
|
@@ -17,7 +17,7 @@ export = FileStorageApplicationValidator;
|
|
|
17
17
|
* files(products, orders, logistics etc), Required for validating the data of
|
|
18
18
|
* the file being uploaded, decides where exactly the file will be stored
|
|
19
19
|
* inside the storage bucket.
|
|
20
|
-
* @property {FileStorageApplicationModel.
|
|
20
|
+
* @property {FileStorageApplicationModel.FileUploadStart} body
|
|
21
21
|
*/
|
|
22
22
|
declare class FileStorageApplicationValidator {
|
|
23
23
|
/** @returns {CompleteUploadParam} */
|
|
@@ -38,10 +38,10 @@ type CompleteUploadParam = {
|
|
|
38
38
|
* inside the storage bucket.
|
|
39
39
|
*/
|
|
40
40
|
namespace: string;
|
|
41
|
-
body: FileStorageApplicationModel.
|
|
41
|
+
body: FileStorageApplicationModel.FileUpload;
|
|
42
42
|
};
|
|
43
43
|
type SignUrlsParam = {
|
|
44
|
-
body: FileStorageApplicationModel.
|
|
44
|
+
body: FileStorageApplicationModel.SignUrl;
|
|
45
45
|
};
|
|
46
46
|
type StartUploadParam = {
|
|
47
47
|
/**
|
|
@@ -51,6 +51,6 @@ type StartUploadParam = {
|
|
|
51
51
|
* inside the storage bucket.
|
|
52
52
|
*/
|
|
53
53
|
namespace: string;
|
|
54
|
-
body: FileStorageApplicationModel.
|
|
54
|
+
body: FileStorageApplicationModel.FileUploadStart;
|
|
55
55
|
};
|
|
56
56
|
import FileStorageApplicationModel = require("./FileStorageApplicationModel");
|
|
@@ -8,12 +8,12 @@ const FileStorageApplicationModel = require("./FileStorageApplicationModel");
|
|
|
8
8
|
* files(products, orders, logistics etc), Required for validating the data of
|
|
9
9
|
* the file being uploaded, decides where exactly the file will be stored
|
|
10
10
|
* inside the storage bucket.
|
|
11
|
-
* @property {FileStorageApplicationModel.
|
|
11
|
+
* @property {FileStorageApplicationModel.FileUpload} body
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @typedef SignUrlsParam
|
|
16
|
-
* @property {FileStorageApplicationModel.
|
|
16
|
+
* @property {FileStorageApplicationModel.SignUrl} body
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -22,7 +22,7 @@ const FileStorageApplicationModel = require("./FileStorageApplicationModel");
|
|
|
22
22
|
* files(products, orders, logistics etc), Required for validating the data of
|
|
23
23
|
* the file being uploaded, decides where exactly the file will be stored
|
|
24
24
|
* inside the storage bucket.
|
|
25
|
-
* @property {FileStorageApplicationModel.
|
|
25
|
+
* @property {FileStorageApplicationModel.FileUploadStart} body
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
class FileStorageApplicationValidator {
|
|
@@ -30,14 +30,14 @@ class FileStorageApplicationValidator {
|
|
|
30
30
|
static completeUpload() {
|
|
31
31
|
return Joi.object({
|
|
32
32
|
namespace: Joi.string().allow("").required(),
|
|
33
|
-
body: FileStorageApplicationModel.
|
|
33
|
+
body: FileStorageApplicationModel.FileUpload().required(),
|
|
34
34
|
}).required();
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/** @returns {SignUrlsParam} */
|
|
38
38
|
static signUrls() {
|
|
39
39
|
return Joi.object({
|
|
40
|
-
body: FileStorageApplicationModel.
|
|
40
|
+
body: FileStorageApplicationModel.SignUrl().required(),
|
|
41
41
|
}).required();
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ class FileStorageApplicationValidator {
|
|
|
45
45
|
static startUpload() {
|
|
46
46
|
return Joi.object({
|
|
47
47
|
namespace: Joi.string().allow("").required(),
|
|
48
|
-
body: FileStorageApplicationModel.
|
|
48
|
+
body: FileStorageApplicationModel.FileUploadStart().required(),
|
|
49
49
|
}).required();
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export = Finance;
|
|
2
|
+
declare class Finance {
|
|
3
|
+
constructor(_conf: any);
|
|
4
|
+
_conf: any;
|
|
5
|
+
_relativeUrls: {
|
|
6
|
+
customerCreditBalance: string;
|
|
7
|
+
lockUnlockCreditNote: string;
|
|
8
|
+
};
|
|
9
|
+
_urls: {};
|
|
10
|
+
updateUrls(urls: any): void;
|
|
11
|
+
/**
|
|
12
|
+
* @param {FinanceApplicationValidator.CustomerCreditBalanceParam} arg - Arg object.
|
|
13
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
14
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
15
|
+
* @returns {Promise<FinanceApplicationModel.CustomerCreditBalanceResponseSchema>}
|
|
16
|
+
* - Success response
|
|
17
|
+
*
|
|
18
|
+
* @name customerCreditBalance
|
|
19
|
+
* @summary: This API will provide customer's credit balance against phone number or email and seller*affiliate id
|
|
20
|
+
* @description: This API will provide customer's credit balance against phone number or email and seller*affiliate id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/finance/customerCreditBalance/).
|
|
21
|
+
*/
|
|
22
|
+
customerCreditBalance({ body, requestHeaders }?: FinanceApplicationValidator.CustomerCreditBalanceParam, { responseHeaders }?: object): Promise<FinanceApplicationModel.CustomerCreditBalanceResponseSchema>;
|
|
23
|
+
/**
|
|
24
|
+
* @param {FinanceApplicationValidator.LockUnlockCreditNoteParam} arg - Arg object.
|
|
25
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
26
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
27
|
+
* @returns {Promise<FinanceApplicationModel.LockUnlockResponseSchema>} -
|
|
28
|
+
* Success response
|
|
29
|
+
* @name lockUnlockCreditNote
|
|
30
|
+
* @summary: Lock or Unlock requested credit note.
|
|
31
|
+
* @description: Used to lock or unlock requested credit note. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/finance/lockUnlockCreditNote/).
|
|
32
|
+
*/
|
|
33
|
+
lockUnlockCreditNote({ body, requestHeaders }?: FinanceApplicationValidator.LockUnlockCreditNoteParam, { responseHeaders }?: object): Promise<FinanceApplicationModel.LockUnlockResponseSchema>;
|
|
34
|
+
}
|
|
35
|
+
import FinanceApplicationValidator = require("./FinanceApplicationValidator");
|
|
36
|
+
import FinanceApplicationModel = require("./FinanceApplicationModel");
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
+
const {
|
|
3
|
+
FDKClientValidationError,
|
|
4
|
+
FDKResponseValidationError,
|
|
5
|
+
} = require("../../common/FDKError");
|
|
6
|
+
const constructUrl = require("../constructUrl");
|
|
7
|
+
const Paginator = require("../../common/Paginator");
|
|
8
|
+
const FinanceApplicationValidator = require("./FinanceApplicationValidator");
|
|
9
|
+
const FinanceApplicationModel = require("./FinanceApplicationModel");
|
|
10
|
+
const { Logger } = require("./../../common/Logger");
|
|
11
|
+
const Joi = require("joi");
|
|
12
|
+
|
|
13
|
+
class Finance {
|
|
14
|
+
constructor(_conf) {
|
|
15
|
+
this._conf = _conf;
|
|
16
|
+
this._relativeUrls = {
|
|
17
|
+
customerCreditBalance:
|
|
18
|
+
"/service/application/finance/v1.0/customer-credit-balance",
|
|
19
|
+
lockUnlockCreditNote:
|
|
20
|
+
"/service/application/finance/v1.0/lock-unlock-credit-note",
|
|
21
|
+
};
|
|
22
|
+
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
23
|
+
(urls, [method, relativeUrl]) => {
|
|
24
|
+
urls[method] = `${_conf.domain}${relativeUrl}`;
|
|
25
|
+
return urls;
|
|
26
|
+
},
|
|
27
|
+
{}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
updateUrls(urls) {
|
|
32
|
+
this._urls = {
|
|
33
|
+
...this._urls,
|
|
34
|
+
...urls,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @param {FinanceApplicationValidator.CustomerCreditBalanceParam} arg - Arg object.
|
|
40
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
41
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
42
|
+
* @returns {Promise<FinanceApplicationModel.CustomerCreditBalanceResponseSchema>}
|
|
43
|
+
* - Success response
|
|
44
|
+
*
|
|
45
|
+
* @name customerCreditBalance
|
|
46
|
+
* @summary: This API will provide customer's credit balance against phone number or email and seller*affiliate id
|
|
47
|
+
* @description: This API will provide customer's credit balance against phone number or email and seller*affiliate id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/finance/customerCreditBalance/).
|
|
48
|
+
*/
|
|
49
|
+
async customerCreditBalance(
|
|
50
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
51
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
52
|
+
) {
|
|
53
|
+
const {
|
|
54
|
+
error,
|
|
55
|
+
} = FinanceApplicationValidator.customerCreditBalance().validate(
|
|
56
|
+
{ body },
|
|
57
|
+
{ abortEarly: false, allowUnknown: true }
|
|
58
|
+
);
|
|
59
|
+
if (error) {
|
|
60
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Showing warrnings if extra unknown parameters are found
|
|
64
|
+
const {
|
|
65
|
+
error: warrning,
|
|
66
|
+
} = FinanceApplicationValidator.customerCreditBalance().validate(
|
|
67
|
+
{ body },
|
|
68
|
+
{ abortEarly: false, allowUnknown: false }
|
|
69
|
+
);
|
|
70
|
+
if (warrning) {
|
|
71
|
+
Logger({
|
|
72
|
+
level: "WARN",
|
|
73
|
+
message: `Parameter Validation warrnings for application > Finance > customerCreditBalance \n ${warrning}`,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const query_params = {};
|
|
78
|
+
|
|
79
|
+
const xHeaders = {};
|
|
80
|
+
|
|
81
|
+
const response = await ApplicationAPIClient.execute(
|
|
82
|
+
this._conf,
|
|
83
|
+
"post",
|
|
84
|
+
constructUrl({
|
|
85
|
+
url: this._urls["customerCreditBalance"],
|
|
86
|
+
params: {},
|
|
87
|
+
}),
|
|
88
|
+
query_params,
|
|
89
|
+
body,
|
|
90
|
+
{ ...xHeaders, ...requestHeaders },
|
|
91
|
+
{ responseHeaders }
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
let responseData = response;
|
|
95
|
+
if (responseHeaders) {
|
|
96
|
+
responseData = response[0];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const {
|
|
100
|
+
error: res_error,
|
|
101
|
+
} = FinanceApplicationModel.CustomerCreditBalanceResponseSchema().validate(
|
|
102
|
+
responseData,
|
|
103
|
+
{ abortEarly: false, allowUnknown: true }
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
if (res_error) {
|
|
107
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
108
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
109
|
+
} else {
|
|
110
|
+
Logger({
|
|
111
|
+
level: "WARN",
|
|
112
|
+
message: `Response Validation Warnings for application > Finance > customerCreditBalance \n ${res_error}`,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return response;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @param {FinanceApplicationValidator.LockUnlockCreditNoteParam} arg - Arg object.
|
|
122
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
123
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
124
|
+
* @returns {Promise<FinanceApplicationModel.LockUnlockResponseSchema>} -
|
|
125
|
+
* Success response
|
|
126
|
+
* @name lockUnlockCreditNote
|
|
127
|
+
* @summary: Lock or Unlock requested credit note.
|
|
128
|
+
* @description: Used to lock or unlock requested credit note. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/finance/lockUnlockCreditNote/).
|
|
129
|
+
*/
|
|
130
|
+
async lockUnlockCreditNote(
|
|
131
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
132
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
133
|
+
) {
|
|
134
|
+
const {
|
|
135
|
+
error,
|
|
136
|
+
} = FinanceApplicationValidator.lockUnlockCreditNote().validate(
|
|
137
|
+
{ body },
|
|
138
|
+
{ abortEarly: false, allowUnknown: true }
|
|
139
|
+
);
|
|
140
|
+
if (error) {
|
|
141
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Showing warrnings if extra unknown parameters are found
|
|
145
|
+
const {
|
|
146
|
+
error: warrning,
|
|
147
|
+
} = FinanceApplicationValidator.lockUnlockCreditNote().validate(
|
|
148
|
+
{ body },
|
|
149
|
+
{ abortEarly: false, allowUnknown: false }
|
|
150
|
+
);
|
|
151
|
+
if (warrning) {
|
|
152
|
+
Logger({
|
|
153
|
+
level: "WARN",
|
|
154
|
+
message: `Parameter Validation warrnings for application > Finance > lockUnlockCreditNote \n ${warrning}`,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const query_params = {};
|
|
159
|
+
|
|
160
|
+
const xHeaders = {};
|
|
161
|
+
|
|
162
|
+
const response = await ApplicationAPIClient.execute(
|
|
163
|
+
this._conf,
|
|
164
|
+
"post",
|
|
165
|
+
constructUrl({
|
|
166
|
+
url: this._urls["lockUnlockCreditNote"],
|
|
167
|
+
params: {},
|
|
168
|
+
}),
|
|
169
|
+
query_params,
|
|
170
|
+
body,
|
|
171
|
+
{ ...xHeaders, ...requestHeaders },
|
|
172
|
+
{ responseHeaders }
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
let responseData = response;
|
|
176
|
+
if (responseHeaders) {
|
|
177
|
+
responseData = response[0];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const {
|
|
181
|
+
error: res_error,
|
|
182
|
+
} = FinanceApplicationModel.LockUnlockResponseSchema().validate(
|
|
183
|
+
responseData,
|
|
184
|
+
{ abortEarly: false, allowUnknown: true }
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
if (res_error) {
|
|
188
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
189
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
190
|
+
} else {
|
|
191
|
+
Logger({
|
|
192
|
+
level: "WARN",
|
|
193
|
+
message: `Response Validation Warnings for application > Finance > lockUnlockCreditNote \n ${res_error}`,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return response;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
module.exports = Finance;
|