@gofynd/fdk-client-javascript 1.1.6 → 1.2.0
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 +12 -0
- package/index.js +0 -3
- package/package.json +1 -1
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +8 -1
- package/sdk/application/ApplicationClient.d.ts +37 -6
- package/sdk/application/ApplicationClient.js +31 -0
- package/sdk/application/ApplicationConfig.d.ts +52 -12
- package/sdk/application/ApplicationConfig.js +37 -2
- package/sdk/application/ApplicationModels.d.ts +46 -1
- package/sdk/application/ApplicationModels.js +18 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
- package/sdk/application/Cart/CartApplicationClient.js +620 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
- package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
- package/sdk/application/Common/CommonApplicationClient.js +50 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
- package/sdk/application/Common/CommonApplicationModel.js +224 -16
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
- package/sdk/application/Content/ContentApplicationClient.js +409 -277
- package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
- package/sdk/application/Content/ContentApplicationModel.js +1202 -109
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
- package/sdk/application/Lead/LeadApplicationClient.js +169 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
- package/sdk/application/Lead/LeadApplicationModel.js +619 -73
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
- package/sdk/application/Order/OrderApplicationClient.js +297 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
- package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
- package/sdk/application/Share/ShareApplicationClient.js +165 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
- package/sdk/application/Share/ShareApplicationModel.js +154 -16
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +219 -303
- package/sdk/application/User/UserApplicationClient.js +819 -522
- package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
- package/sdk/application/User/UserApplicationModel.js +983 -44
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +8 -2
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/partner/PartnerAPIClient.d.ts +15 -1
- package/sdk/partner/PartnerAPIClient.js +8 -1
- package/sdk/partner/PartnerClient.d.ts +20 -3
- package/sdk/partner/PartnerClient.js +17 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
- package/sdk/platform/Common/CommonPlatformClient.js +48 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
- package/sdk/platform/Common/CommonPlatformModel.js +224 -16
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
- package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
- package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
- package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
- package/sdk/platform/Order/OrderPlatformClient.js +969 -762
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
- package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +29 -12579
- package/sdk/platform/PlatformClient.js +26 -15085
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
- package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +165 -17
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
- package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
- package/sdk/platform/User/UserPlatformModel.js +983 -44
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
- package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/PublicClient.d.ts +19 -3
- package/sdk/public/PublicClient.js +16 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const Paginator = require("../../common/Paginator");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const PaymentPlatformValidator = require("./PaymentPlatformValidator");
|
|
5
|
+
const PaymentPlatformModel = require("./PaymentPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -12,15 +12,20 @@ class Payment {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @param {
|
|
16
|
-
* @param {
|
|
17
|
-
* @
|
|
18
|
-
* @
|
|
15
|
+
* @param {PaymentPlatformValidator.ActivateAndDectivatePayoutParam} arg - Arg object
|
|
16
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
17
|
+
* @returns {Promise<PaymentPlatformModel.UpdatePayoutResponse>} - Success response
|
|
18
|
+
* @name activateAndDectivatePayout
|
|
19
19
|
* @summary: Partial Update Payout
|
|
20
|
-
* @description: Partial Update Payout
|
|
20
|
+
* @description: Partial Update Payout - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/activateAndDectivatePayout/).
|
|
21
21
|
*/
|
|
22
|
-
async activateAndDectivatePayout(
|
|
23
|
-
|
|
22
|
+
async activateAndDectivatePayout(
|
|
23
|
+
{ uniqueTransferNo, body } = {},
|
|
24
|
+
{ headers } = { headers: false }
|
|
25
|
+
) {
|
|
26
|
+
const {
|
|
27
|
+
error,
|
|
28
|
+
} = PaymentPlatformValidator.activateAndDectivatePayout().validate(
|
|
24
29
|
{
|
|
25
30
|
uniqueTransferNo,
|
|
26
31
|
body,
|
|
@@ -34,7 +39,7 @@ class Payment {
|
|
|
34
39
|
// Showing warrnings if extra unknown parameters are found
|
|
35
40
|
const {
|
|
36
41
|
error: warrning,
|
|
37
|
-
} =
|
|
42
|
+
} = PaymentPlatformValidator.activateAndDectivatePayout().validate(
|
|
38
43
|
{
|
|
39
44
|
uniqueTransferNo,
|
|
40
45
|
body,
|
|
@@ -44,10 +49,8 @@ class Payment {
|
|
|
44
49
|
if (warrning) {
|
|
45
50
|
Logger({
|
|
46
51
|
level: "WARN",
|
|
47
|
-
message:
|
|
48
|
-
"Parameter Validation warrnings for activateAndDectivatePayout",
|
|
52
|
+
message: `Parameter Validation warrnings for platform > Payment > activateAndDectivatePayout \n ${warrning}`,
|
|
49
53
|
});
|
|
50
|
-
Logger({ level: "WARN", message: warrning });
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
const query_params = {};
|
|
@@ -60,12 +63,18 @@ class Payment {
|
|
|
60
63
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts/${uniqueTransferNo}`,
|
|
61
64
|
query_params,
|
|
62
65
|
body,
|
|
63
|
-
xHeaders
|
|
66
|
+
xHeaders,
|
|
67
|
+
{ headers }
|
|
64
68
|
);
|
|
65
69
|
|
|
70
|
+
let responseData = response;
|
|
71
|
+
if (headers) {
|
|
72
|
+
responseData = response[0];
|
|
73
|
+
}
|
|
74
|
+
|
|
66
75
|
const {
|
|
67
76
|
error: res_error,
|
|
68
|
-
} =
|
|
77
|
+
} = PaymentPlatformModel.UpdatePayoutResponse().validate(responseData, {
|
|
69
78
|
abortEarly: false,
|
|
70
79
|
allowUnknown: false,
|
|
71
80
|
});
|
|
@@ -73,23 +82,26 @@ class Payment {
|
|
|
73
82
|
if (res_error) {
|
|
74
83
|
Logger({
|
|
75
84
|
level: "WARN",
|
|
76
|
-
message:
|
|
85
|
+
message: `Response Validation Warnnings for platform > Payment > activateAndDectivatePayout \n ${res_error}`,
|
|
77
86
|
});
|
|
78
|
-
Logger({ level: "WARN", message: res_error });
|
|
79
87
|
}
|
|
80
88
|
|
|
81
89
|
return response;
|
|
82
90
|
}
|
|
83
91
|
|
|
84
92
|
/**
|
|
85
|
-
* @param {
|
|
86
|
-
* @param {
|
|
87
|
-
* @returns {Promise<DeletePayoutResponse>} - Success response
|
|
93
|
+
* @param {PaymentPlatformValidator.DeletePayoutParam} arg - Arg object
|
|
94
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
95
|
+
* @returns {Promise<PaymentPlatformModel.DeletePayoutResponse>} - Success response
|
|
96
|
+
* @name deletePayout
|
|
88
97
|
* @summary: Delete Payout
|
|
89
|
-
* @description: Delete Payout
|
|
98
|
+
* @description: Delete Payout - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/deletePayout/).
|
|
90
99
|
*/
|
|
91
|
-
async deletePayout(
|
|
92
|
-
|
|
100
|
+
async deletePayout(
|
|
101
|
+
{ uniqueTransferNo } = {},
|
|
102
|
+
{ headers } = { headers: false }
|
|
103
|
+
) {
|
|
104
|
+
const { error } = PaymentPlatformValidator.deletePayout().validate(
|
|
93
105
|
{
|
|
94
106
|
uniqueTransferNo,
|
|
95
107
|
},
|
|
@@ -100,7 +112,9 @@ class Payment {
|
|
|
100
112
|
}
|
|
101
113
|
|
|
102
114
|
// Showing warrnings if extra unknown parameters are found
|
|
103
|
-
const {
|
|
115
|
+
const {
|
|
116
|
+
error: warrning,
|
|
117
|
+
} = PaymentPlatformValidator.deletePayout().validate(
|
|
104
118
|
{
|
|
105
119
|
uniqueTransferNo,
|
|
106
120
|
},
|
|
@@ -109,9 +123,8 @@ class Payment {
|
|
|
109
123
|
if (warrning) {
|
|
110
124
|
Logger({
|
|
111
125
|
level: "WARN",
|
|
112
|
-
message:
|
|
126
|
+
message: `Parameter Validation warrnings for platform > Payment > deletePayout \n ${warrning}`,
|
|
113
127
|
});
|
|
114
|
-
Logger({ level: "WARN", message: warrning });
|
|
115
128
|
}
|
|
116
129
|
|
|
117
130
|
const query_params = {};
|
|
@@ -124,12 +137,18 @@ class Payment {
|
|
|
124
137
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts/${uniqueTransferNo}`,
|
|
125
138
|
query_params,
|
|
126
139
|
undefined,
|
|
127
|
-
xHeaders
|
|
140
|
+
xHeaders,
|
|
141
|
+
{ headers }
|
|
128
142
|
);
|
|
129
143
|
|
|
144
|
+
let responseData = response;
|
|
145
|
+
if (headers) {
|
|
146
|
+
responseData = response[0];
|
|
147
|
+
}
|
|
148
|
+
|
|
130
149
|
const {
|
|
131
150
|
error: res_error,
|
|
132
|
-
} =
|
|
151
|
+
} = PaymentPlatformModel.DeletePayoutResponse().validate(responseData, {
|
|
133
152
|
abortEarly: false,
|
|
134
153
|
allowUnknown: false,
|
|
135
154
|
});
|
|
@@ -137,29 +156,32 @@ class Payment {
|
|
|
137
156
|
if (res_error) {
|
|
138
157
|
Logger({
|
|
139
158
|
level: "WARN",
|
|
140
|
-
message:
|
|
159
|
+
message: `Response Validation Warnnings for platform > Payment > deletePayout \n ${res_error}`,
|
|
141
160
|
});
|
|
142
|
-
Logger({ level: "WARN", message: res_error });
|
|
143
161
|
}
|
|
144
162
|
|
|
145
163
|
return response;
|
|
146
164
|
}
|
|
147
165
|
|
|
148
166
|
/**
|
|
149
|
-
* @param {
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* @
|
|
167
|
+
* @param {PaymentPlatformValidator.DeleteSubscriptionPaymentMethodParam} arg
|
|
168
|
+
* - Arg object
|
|
169
|
+
*
|
|
170
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
171
|
+
* @returns {Promise<PaymentPlatformModel.DeleteSubscriptionPaymentMethodResponse>}
|
|
172
|
+
* - Success response
|
|
173
|
+
*
|
|
174
|
+
* @name deleteSubscriptionPaymentMethod
|
|
153
175
|
* @summary: Delete Subscription Payment Method
|
|
154
|
-
* @description: Uses this api to Delete Subscription Payment Method
|
|
176
|
+
* @description: Uses this api to Delete Subscription Payment Method - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/deleteSubscriptionPaymentMethod/).
|
|
155
177
|
*/
|
|
156
|
-
async deleteSubscriptionPaymentMethod(
|
|
157
|
-
uniqueExternalId,
|
|
158
|
-
|
|
159
|
-
|
|
178
|
+
async deleteSubscriptionPaymentMethod(
|
|
179
|
+
{ uniqueExternalId, paymentMethodId } = {},
|
|
180
|
+
{ headers } = { headers: false }
|
|
181
|
+
) {
|
|
160
182
|
const {
|
|
161
183
|
error,
|
|
162
|
-
} =
|
|
184
|
+
} = PaymentPlatformValidator.deleteSubscriptionPaymentMethod().validate(
|
|
163
185
|
{
|
|
164
186
|
uniqueExternalId,
|
|
165
187
|
paymentMethodId,
|
|
@@ -173,7 +195,7 @@ class Payment {
|
|
|
173
195
|
// Showing warrnings if extra unknown parameters are found
|
|
174
196
|
const {
|
|
175
197
|
error: warrning,
|
|
176
|
-
} =
|
|
198
|
+
} = PaymentPlatformValidator.deleteSubscriptionPaymentMethod().validate(
|
|
177
199
|
{
|
|
178
200
|
uniqueExternalId,
|
|
179
201
|
paymentMethodId,
|
|
@@ -183,10 +205,8 @@ class Payment {
|
|
|
183
205
|
if (warrning) {
|
|
184
206
|
Logger({
|
|
185
207
|
level: "WARN",
|
|
186
|
-
message:
|
|
187
|
-
"Parameter Validation warrnings for deleteSubscriptionPaymentMethod",
|
|
208
|
+
message: `Parameter Validation warrnings for platform > Payment > deleteSubscriptionPaymentMethod \n ${warrning}`,
|
|
188
209
|
});
|
|
189
|
-
Logger({ level: "WARN", message: warrning });
|
|
190
210
|
}
|
|
191
211
|
|
|
192
212
|
const query_params = {};
|
|
@@ -201,37 +221,45 @@ class Payment {
|
|
|
201
221
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/subscription/methods`,
|
|
202
222
|
query_params,
|
|
203
223
|
undefined,
|
|
204
|
-
xHeaders
|
|
224
|
+
xHeaders,
|
|
225
|
+
{ headers }
|
|
205
226
|
);
|
|
206
227
|
|
|
228
|
+
let responseData = response;
|
|
229
|
+
if (headers) {
|
|
230
|
+
responseData = response[0];
|
|
231
|
+
}
|
|
232
|
+
|
|
207
233
|
const {
|
|
208
234
|
error: res_error,
|
|
209
|
-
} =
|
|
210
|
-
|
|
235
|
+
} = PaymentPlatformModel.DeleteSubscriptionPaymentMethodResponse().validate(
|
|
236
|
+
responseData,
|
|
211
237
|
{ abortEarly: false, allowUnknown: false }
|
|
212
238
|
);
|
|
213
239
|
|
|
214
240
|
if (res_error) {
|
|
215
241
|
Logger({
|
|
216
242
|
level: "WARN",
|
|
217
|
-
message:
|
|
218
|
-
"Response Validation Warnnings for deleteSubscriptionPaymentMethod",
|
|
243
|
+
message: `Response Validation Warnnings for platform > Payment > deleteSubscriptionPaymentMethod \n ${res_error}`,
|
|
219
244
|
});
|
|
220
|
-
Logger({ level: "WARN", message: res_error });
|
|
221
245
|
}
|
|
222
246
|
|
|
223
247
|
return response;
|
|
224
248
|
}
|
|
225
249
|
|
|
226
250
|
/**
|
|
227
|
-
* @param {
|
|
228
|
-
* @param {
|
|
229
|
-
* @returns {Promise<PayoutsResponse>} - Success response
|
|
251
|
+
* @param {PaymentPlatformValidator.GetAllPayoutsParam} arg - Arg object
|
|
252
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
253
|
+
* @returns {Promise<PaymentPlatformModel.PayoutsResponse>} - Success response
|
|
254
|
+
* @name getAllPayouts
|
|
230
255
|
* @summary: Get All Payouts
|
|
231
|
-
* @description: Get All Payouts
|
|
256
|
+
* @description: Get All Payouts - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getAllPayouts/).
|
|
232
257
|
*/
|
|
233
|
-
async getAllPayouts(
|
|
234
|
-
|
|
258
|
+
async getAllPayouts(
|
|
259
|
+
{ uniqueExternalId } = {},
|
|
260
|
+
{ headers } = { headers: false }
|
|
261
|
+
) {
|
|
262
|
+
const { error } = PaymentPlatformValidator.getAllPayouts().validate(
|
|
235
263
|
{
|
|
236
264
|
uniqueExternalId,
|
|
237
265
|
},
|
|
@@ -242,7 +270,9 @@ class Payment {
|
|
|
242
270
|
}
|
|
243
271
|
|
|
244
272
|
// Showing warrnings if extra unknown parameters are found
|
|
245
|
-
const {
|
|
273
|
+
const {
|
|
274
|
+
error: warrning,
|
|
275
|
+
} = PaymentPlatformValidator.getAllPayouts().validate(
|
|
246
276
|
{
|
|
247
277
|
uniqueExternalId,
|
|
248
278
|
},
|
|
@@ -251,9 +281,8 @@ class Payment {
|
|
|
251
281
|
if (warrning) {
|
|
252
282
|
Logger({
|
|
253
283
|
level: "WARN",
|
|
254
|
-
message:
|
|
284
|
+
message: `Parameter Validation warrnings for platform > Payment > getAllPayouts \n ${warrning}`,
|
|
255
285
|
});
|
|
256
|
-
Logger({ level: "WARN", message: warrning });
|
|
257
286
|
}
|
|
258
287
|
|
|
259
288
|
const query_params = {};
|
|
@@ -267,12 +296,18 @@ class Payment {
|
|
|
267
296
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts`,
|
|
268
297
|
query_params,
|
|
269
298
|
undefined,
|
|
270
|
-
xHeaders
|
|
299
|
+
xHeaders,
|
|
300
|
+
{ headers }
|
|
271
301
|
);
|
|
272
302
|
|
|
303
|
+
let responseData = response;
|
|
304
|
+
if (headers) {
|
|
305
|
+
responseData = response[0];
|
|
306
|
+
}
|
|
307
|
+
|
|
273
308
|
const {
|
|
274
309
|
error: res_error,
|
|
275
|
-
} =
|
|
310
|
+
} = PaymentPlatformModel.PayoutsResponse().validate(responseData, {
|
|
276
311
|
abortEarly: false,
|
|
277
312
|
allowUnknown: false,
|
|
278
313
|
});
|
|
@@ -280,22 +315,24 @@ class Payment {
|
|
|
280
315
|
if (res_error) {
|
|
281
316
|
Logger({
|
|
282
317
|
level: "WARN",
|
|
283
|
-
message:
|
|
318
|
+
message: `Response Validation Warnnings for platform > Payment > getAllPayouts \n ${res_error}`,
|
|
284
319
|
});
|
|
285
|
-
Logger({ level: "WARN", message: res_error });
|
|
286
320
|
}
|
|
287
321
|
|
|
288
322
|
return response;
|
|
289
323
|
}
|
|
290
324
|
|
|
291
325
|
/**
|
|
292
|
-
* @param {
|
|
293
|
-
* @
|
|
326
|
+
* @param {PaymentPlatformValidator.GetSubscriptionConfigParam} arg - Arg object
|
|
327
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
328
|
+
* @returns {Promise<PaymentPlatformModel.SubscriptionConfigResponse>} -
|
|
329
|
+
* Success response
|
|
330
|
+
* @name getSubscriptionConfig
|
|
294
331
|
* @summary: List Subscription Config
|
|
295
|
-
* @description: Get all Subscription Config details
|
|
332
|
+
* @description: Get all Subscription Config details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getSubscriptionConfig/).
|
|
296
333
|
*/
|
|
297
|
-
async getSubscriptionConfig({} = {}) {
|
|
298
|
-
const { error } =
|
|
334
|
+
async getSubscriptionConfig({ headers } = { headers: false }) {
|
|
335
|
+
const { error } = PaymentPlatformValidator.getSubscriptionConfig().validate(
|
|
299
336
|
{},
|
|
300
337
|
{ abortEarly: false, allowUnknown: true }
|
|
301
338
|
);
|
|
@@ -306,16 +343,15 @@ class Payment {
|
|
|
306
343
|
// Showing warrnings if extra unknown parameters are found
|
|
307
344
|
const {
|
|
308
345
|
error: warrning,
|
|
309
|
-
} =
|
|
346
|
+
} = PaymentPlatformValidator.getSubscriptionConfig().validate(
|
|
310
347
|
{},
|
|
311
348
|
{ abortEarly: false, allowUnknown: false }
|
|
312
349
|
);
|
|
313
350
|
if (warrning) {
|
|
314
351
|
Logger({
|
|
315
352
|
level: "WARN",
|
|
316
|
-
message:
|
|
353
|
+
message: `Parameter Validation warrnings for platform > Payment > getSubscriptionConfig \n ${warrning}`,
|
|
317
354
|
});
|
|
318
|
-
Logger({ level: "WARN", message: warrning });
|
|
319
355
|
}
|
|
320
356
|
|
|
321
357
|
const query_params = {};
|
|
@@ -328,36 +364,51 @@ class Payment {
|
|
|
328
364
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/subscription/configs`,
|
|
329
365
|
query_params,
|
|
330
366
|
undefined,
|
|
331
|
-
xHeaders
|
|
367
|
+
xHeaders,
|
|
368
|
+
{ headers }
|
|
332
369
|
);
|
|
333
370
|
|
|
371
|
+
let responseData = response;
|
|
372
|
+
if (headers) {
|
|
373
|
+
responseData = response[0];
|
|
374
|
+
}
|
|
375
|
+
|
|
334
376
|
const {
|
|
335
377
|
error: res_error,
|
|
336
|
-
} =
|
|
337
|
-
|
|
338
|
-
allowUnknown: false
|
|
339
|
-
|
|
378
|
+
} = PaymentPlatformModel.SubscriptionConfigResponse().validate(
|
|
379
|
+
responseData,
|
|
380
|
+
{ abortEarly: false, allowUnknown: false }
|
|
381
|
+
);
|
|
340
382
|
|
|
341
383
|
if (res_error) {
|
|
342
384
|
Logger({
|
|
343
385
|
level: "WARN",
|
|
344
|
-
message:
|
|
386
|
+
message: `Response Validation Warnnings for platform > Payment > getSubscriptionConfig \n ${res_error}`,
|
|
345
387
|
});
|
|
346
|
-
Logger({ level: "WARN", message: res_error });
|
|
347
388
|
}
|
|
348
389
|
|
|
349
390
|
return response;
|
|
350
391
|
}
|
|
351
392
|
|
|
352
393
|
/**
|
|
353
|
-
* @param {
|
|
354
|
-
*
|
|
355
|
-
*
|
|
394
|
+
* @param {PaymentPlatformValidator.GetSubscriptionPaymentMethodParam} arg
|
|
395
|
+
* - Arg object
|
|
396
|
+
*
|
|
397
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
398
|
+
* @returns {Promise<PaymentPlatformModel.SubscriptionPaymentMethodResponse>}
|
|
399
|
+
* - Success response
|
|
400
|
+
*
|
|
401
|
+
* @name getSubscriptionPaymentMethod
|
|
356
402
|
* @summary: List Subscription Payment Method
|
|
357
|
-
* @description: Get all Subscription Payment Method
|
|
403
|
+
* @description: Get all Subscription Payment Method - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getSubscriptionPaymentMethod/).
|
|
358
404
|
*/
|
|
359
|
-
async getSubscriptionPaymentMethod(
|
|
360
|
-
|
|
405
|
+
async getSubscriptionPaymentMethod(
|
|
406
|
+
{ uniqueExternalId } = {},
|
|
407
|
+
{ headers } = { headers: false }
|
|
408
|
+
) {
|
|
409
|
+
const {
|
|
410
|
+
error,
|
|
411
|
+
} = PaymentPlatformValidator.getSubscriptionPaymentMethod().validate(
|
|
361
412
|
{
|
|
362
413
|
uniqueExternalId,
|
|
363
414
|
},
|
|
@@ -370,7 +421,7 @@ class Payment {
|
|
|
370
421
|
// Showing warrnings if extra unknown parameters are found
|
|
371
422
|
const {
|
|
372
423
|
error: warrning,
|
|
373
|
-
} =
|
|
424
|
+
} = PaymentPlatformValidator.getSubscriptionPaymentMethod().validate(
|
|
374
425
|
{
|
|
375
426
|
uniqueExternalId,
|
|
376
427
|
},
|
|
@@ -379,10 +430,8 @@ class Payment {
|
|
|
379
430
|
if (warrning) {
|
|
380
431
|
Logger({
|
|
381
432
|
level: "WARN",
|
|
382
|
-
message:
|
|
383
|
-
"Parameter Validation warrnings for getSubscriptionPaymentMethod",
|
|
433
|
+
message: `Parameter Validation warrnings for platform > Payment > getSubscriptionPaymentMethod \n ${warrning}`,
|
|
384
434
|
});
|
|
385
|
-
Logger({ level: "WARN", message: warrning });
|
|
386
435
|
}
|
|
387
436
|
|
|
388
437
|
const query_params = {};
|
|
@@ -396,37 +445,42 @@ class Payment {
|
|
|
396
445
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/subscription/methods`,
|
|
397
446
|
query_params,
|
|
398
447
|
undefined,
|
|
399
|
-
xHeaders
|
|
448
|
+
xHeaders,
|
|
449
|
+
{ headers }
|
|
400
450
|
);
|
|
401
451
|
|
|
452
|
+
let responseData = response;
|
|
453
|
+
if (headers) {
|
|
454
|
+
responseData = response[0];
|
|
455
|
+
}
|
|
456
|
+
|
|
402
457
|
const {
|
|
403
458
|
error: res_error,
|
|
404
|
-
} =
|
|
405
|
-
|
|
406
|
-
allowUnknown: false
|
|
407
|
-
|
|
459
|
+
} = PaymentPlatformModel.SubscriptionPaymentMethodResponse().validate(
|
|
460
|
+
responseData,
|
|
461
|
+
{ abortEarly: false, allowUnknown: false }
|
|
462
|
+
);
|
|
408
463
|
|
|
409
464
|
if (res_error) {
|
|
410
465
|
Logger({
|
|
411
466
|
level: "WARN",
|
|
412
|
-
message:
|
|
413
|
-
"Response Validation Warnnings for getSubscriptionPaymentMethod",
|
|
467
|
+
message: `Response Validation Warnnings for platform > Payment > getSubscriptionPaymentMethod \n ${res_error}`,
|
|
414
468
|
});
|
|
415
|
-
Logger({ level: "WARN", message: res_error });
|
|
416
469
|
}
|
|
417
470
|
|
|
418
471
|
return response;
|
|
419
472
|
}
|
|
420
473
|
|
|
421
474
|
/**
|
|
422
|
-
* @param {
|
|
423
|
-
* @param {
|
|
424
|
-
* @returns {Promise<PayoutResponse>} - Success response
|
|
475
|
+
* @param {PaymentPlatformValidator.SavePayoutParam} arg - Arg object
|
|
476
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
477
|
+
* @returns {Promise<PaymentPlatformModel.PayoutResponse>} - Success response
|
|
478
|
+
* @name savePayout
|
|
425
479
|
* @summary: Save Payout
|
|
426
|
-
* @description: Save Payout
|
|
480
|
+
* @description: Save Payout - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/savePayout/).
|
|
427
481
|
*/
|
|
428
|
-
async savePayout({ body } = {}) {
|
|
429
|
-
const { error } =
|
|
482
|
+
async savePayout({ body } = {}, { headers } = { headers: false }) {
|
|
483
|
+
const { error } = PaymentPlatformValidator.savePayout().validate(
|
|
430
484
|
{
|
|
431
485
|
body,
|
|
432
486
|
},
|
|
@@ -437,7 +491,7 @@ class Payment {
|
|
|
437
491
|
}
|
|
438
492
|
|
|
439
493
|
// Showing warrnings if extra unknown parameters are found
|
|
440
|
-
const { error: warrning } =
|
|
494
|
+
const { error: warrning } = PaymentPlatformValidator.savePayout().validate(
|
|
441
495
|
{
|
|
442
496
|
body,
|
|
443
497
|
},
|
|
@@ -446,9 +500,8 @@ class Payment {
|
|
|
446
500
|
if (warrning) {
|
|
447
501
|
Logger({
|
|
448
502
|
level: "WARN",
|
|
449
|
-
message:
|
|
503
|
+
message: `Parameter Validation warrnings for platform > Payment > savePayout \n ${warrning}`,
|
|
450
504
|
});
|
|
451
|
-
Logger({ level: "WARN", message: warrning });
|
|
452
505
|
}
|
|
453
506
|
|
|
454
507
|
const query_params = {};
|
|
@@ -461,12 +514,18 @@ class Payment {
|
|
|
461
514
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts`,
|
|
462
515
|
query_params,
|
|
463
516
|
body,
|
|
464
|
-
xHeaders
|
|
517
|
+
xHeaders,
|
|
518
|
+
{ headers }
|
|
465
519
|
);
|
|
466
520
|
|
|
521
|
+
let responseData = response;
|
|
522
|
+
if (headers) {
|
|
523
|
+
responseData = response[0];
|
|
524
|
+
}
|
|
525
|
+
|
|
467
526
|
const {
|
|
468
527
|
error: res_error,
|
|
469
|
-
} =
|
|
528
|
+
} = PaymentPlatformModel.PayoutResponse().validate(responseData, {
|
|
470
529
|
abortEarly: false,
|
|
471
530
|
allowUnknown: false,
|
|
472
531
|
});
|
|
@@ -474,23 +533,30 @@ class Payment {
|
|
|
474
533
|
if (res_error) {
|
|
475
534
|
Logger({
|
|
476
535
|
level: "WARN",
|
|
477
|
-
message:
|
|
536
|
+
message: `Response Validation Warnnings for platform > Payment > savePayout \n ${res_error}`,
|
|
478
537
|
});
|
|
479
|
-
Logger({ level: "WARN", message: res_error });
|
|
480
538
|
}
|
|
481
539
|
|
|
482
540
|
return response;
|
|
483
541
|
}
|
|
484
542
|
|
|
485
543
|
/**
|
|
486
|
-
* @param {
|
|
487
|
-
* @param {
|
|
488
|
-
* @returns {Promise<SaveSubscriptionSetupIntentResponse>}
|
|
544
|
+
* @param {PaymentPlatformValidator.SaveSubscriptionSetupIntentParam} arg - Arg object
|
|
545
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
546
|
+
* @returns {Promise<PaymentPlatformModel.SaveSubscriptionSetupIntentResponse>}
|
|
547
|
+
* - Success response
|
|
548
|
+
*
|
|
549
|
+
* @name saveSubscriptionSetupIntent
|
|
489
550
|
* @summary: Save Subscription Setup Intent
|
|
490
|
-
* @description: Uses this api to Save Subscription Setup Intent
|
|
551
|
+
* @description: Uses this api to Save Subscription Setup Intent - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/saveSubscriptionSetupIntent/).
|
|
491
552
|
*/
|
|
492
|
-
async saveSubscriptionSetupIntent(
|
|
493
|
-
|
|
553
|
+
async saveSubscriptionSetupIntent(
|
|
554
|
+
{ body } = {},
|
|
555
|
+
{ headers } = { headers: false }
|
|
556
|
+
) {
|
|
557
|
+
const {
|
|
558
|
+
error,
|
|
559
|
+
} = PaymentPlatformValidator.saveSubscriptionSetupIntent().validate(
|
|
494
560
|
{
|
|
495
561
|
body,
|
|
496
562
|
},
|
|
@@ -503,7 +569,7 @@ class Payment {
|
|
|
503
569
|
// Showing warrnings if extra unknown parameters are found
|
|
504
570
|
const {
|
|
505
571
|
error: warrning,
|
|
506
|
-
} =
|
|
572
|
+
} = PaymentPlatformValidator.saveSubscriptionSetupIntent().validate(
|
|
507
573
|
{
|
|
508
574
|
body,
|
|
509
575
|
},
|
|
@@ -512,10 +578,8 @@ class Payment {
|
|
|
512
578
|
if (warrning) {
|
|
513
579
|
Logger({
|
|
514
580
|
level: "WARN",
|
|
515
|
-
message:
|
|
516
|
-
"Parameter Validation warrnings for saveSubscriptionSetupIntent",
|
|
581
|
+
message: `Parameter Validation warrnings for platform > Payment > saveSubscriptionSetupIntent \n ${warrning}`,
|
|
517
582
|
});
|
|
518
|
-
Logger({ level: "WARN", message: warrning });
|
|
519
583
|
}
|
|
520
584
|
|
|
521
585
|
const query_params = {};
|
|
@@ -528,38 +592,45 @@ class Payment {
|
|
|
528
592
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/subscription/setup/intent`,
|
|
529
593
|
query_params,
|
|
530
594
|
body,
|
|
531
|
-
xHeaders
|
|
595
|
+
xHeaders,
|
|
596
|
+
{ headers }
|
|
532
597
|
);
|
|
533
598
|
|
|
599
|
+
let responseData = response;
|
|
600
|
+
if (headers) {
|
|
601
|
+
responseData = response[0];
|
|
602
|
+
}
|
|
603
|
+
|
|
534
604
|
const {
|
|
535
605
|
error: res_error,
|
|
536
|
-
} =
|
|
537
|
-
|
|
538
|
-
allowUnknown: false
|
|
539
|
-
|
|
606
|
+
} = PaymentPlatformModel.SaveSubscriptionSetupIntentResponse().validate(
|
|
607
|
+
responseData,
|
|
608
|
+
{ abortEarly: false, allowUnknown: false }
|
|
609
|
+
);
|
|
540
610
|
|
|
541
611
|
if (res_error) {
|
|
542
612
|
Logger({
|
|
543
613
|
level: "WARN",
|
|
544
|
-
message:
|
|
545
|
-
"Response Validation Warnnings for saveSubscriptionSetupIntent",
|
|
614
|
+
message: `Response Validation Warnnings for platform > Payment > saveSubscriptionSetupIntent \n ${res_error}`,
|
|
546
615
|
});
|
|
547
|
-
Logger({ level: "WARN", message: res_error });
|
|
548
616
|
}
|
|
549
617
|
|
|
550
618
|
return response;
|
|
551
619
|
}
|
|
552
620
|
|
|
553
621
|
/**
|
|
554
|
-
* @param {
|
|
555
|
-
* @param {
|
|
556
|
-
* @
|
|
557
|
-
* @
|
|
622
|
+
* @param {PaymentPlatformValidator.UpdatePayoutParam} arg - Arg object
|
|
623
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
624
|
+
* @returns {Promise<PaymentPlatformModel.UpdatePayoutResponse>} - Success response
|
|
625
|
+
* @name updatePayout
|
|
558
626
|
* @summary: Update Payout
|
|
559
|
-
* @description: Update Payout
|
|
627
|
+
* @description: Update Payout - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updatePayout/).
|
|
560
628
|
*/
|
|
561
|
-
async updatePayout(
|
|
562
|
-
|
|
629
|
+
async updatePayout(
|
|
630
|
+
{ uniqueTransferNo, body } = {},
|
|
631
|
+
{ headers } = { headers: false }
|
|
632
|
+
) {
|
|
633
|
+
const { error } = PaymentPlatformValidator.updatePayout().validate(
|
|
563
634
|
{
|
|
564
635
|
uniqueTransferNo,
|
|
565
636
|
body,
|
|
@@ -571,7 +642,9 @@ class Payment {
|
|
|
571
642
|
}
|
|
572
643
|
|
|
573
644
|
// Showing warrnings if extra unknown parameters are found
|
|
574
|
-
const {
|
|
645
|
+
const {
|
|
646
|
+
error: warrning,
|
|
647
|
+
} = PaymentPlatformValidator.updatePayout().validate(
|
|
575
648
|
{
|
|
576
649
|
uniqueTransferNo,
|
|
577
650
|
body,
|
|
@@ -581,9 +654,8 @@ class Payment {
|
|
|
581
654
|
if (warrning) {
|
|
582
655
|
Logger({
|
|
583
656
|
level: "WARN",
|
|
584
|
-
message:
|
|
657
|
+
message: `Parameter Validation warrnings for platform > Payment > updatePayout \n ${warrning}`,
|
|
585
658
|
});
|
|
586
|
-
Logger({ level: "WARN", message: warrning });
|
|
587
659
|
}
|
|
588
660
|
|
|
589
661
|
const query_params = {};
|
|
@@ -596,12 +668,18 @@ class Payment {
|
|
|
596
668
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts/${uniqueTransferNo}`,
|
|
597
669
|
query_params,
|
|
598
670
|
body,
|
|
599
|
-
xHeaders
|
|
671
|
+
xHeaders,
|
|
672
|
+
{ headers }
|
|
600
673
|
);
|
|
601
674
|
|
|
675
|
+
let responseData = response;
|
|
676
|
+
if (headers) {
|
|
677
|
+
responseData = response[0];
|
|
678
|
+
}
|
|
679
|
+
|
|
602
680
|
const {
|
|
603
681
|
error: res_error,
|
|
604
|
-
} =
|
|
682
|
+
} = PaymentPlatformModel.UpdatePayoutResponse().validate(responseData, {
|
|
605
683
|
abortEarly: false,
|
|
606
684
|
allowUnknown: false,
|
|
607
685
|
});
|
|
@@ -609,23 +687,23 @@ class Payment {
|
|
|
609
687
|
if (res_error) {
|
|
610
688
|
Logger({
|
|
611
689
|
level: "WARN",
|
|
612
|
-
message:
|
|
690
|
+
message: `Response Validation Warnnings for platform > Payment > updatePayout \n ${res_error}`,
|
|
613
691
|
});
|
|
614
|
-
Logger({ level: "WARN", message: res_error });
|
|
615
692
|
}
|
|
616
693
|
|
|
617
694
|
return response;
|
|
618
695
|
}
|
|
619
696
|
|
|
620
697
|
/**
|
|
621
|
-
* @param {
|
|
622
|
-
* @param {
|
|
623
|
-
* @returns {Promise<IfscCodeResponse>} - Success response
|
|
698
|
+
* @param {PaymentPlatformValidator.VerifyIfscCodeParam} arg - Arg object
|
|
699
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
700
|
+
* @returns {Promise<PaymentPlatformModel.IfscCodeResponse>} - Success response
|
|
701
|
+
* @name verifyIfscCode
|
|
624
702
|
* @summary: Ifsc Code Verification
|
|
625
|
-
* @description: Get True/False for correct IFSC Code for adding bank details for refund
|
|
703
|
+
* @description: Get True/False for correct IFSC Code for adding bank details for refund - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/verifyIfscCode/).
|
|
626
704
|
*/
|
|
627
|
-
async verifyIfscCode({ ifscCode } = {}) {
|
|
628
|
-
const { error } =
|
|
705
|
+
async verifyIfscCode({ ifscCode } = {}, { headers } = { headers: false }) {
|
|
706
|
+
const { error } = PaymentPlatformValidator.verifyIfscCode().validate(
|
|
629
707
|
{
|
|
630
708
|
ifscCode,
|
|
631
709
|
},
|
|
@@ -636,7 +714,9 @@ class Payment {
|
|
|
636
714
|
}
|
|
637
715
|
|
|
638
716
|
// Showing warrnings if extra unknown parameters are found
|
|
639
|
-
const {
|
|
717
|
+
const {
|
|
718
|
+
error: warrning,
|
|
719
|
+
} = PaymentPlatformValidator.verifyIfscCode().validate(
|
|
640
720
|
{
|
|
641
721
|
ifscCode,
|
|
642
722
|
},
|
|
@@ -645,9 +725,8 @@ class Payment {
|
|
|
645
725
|
if (warrning) {
|
|
646
726
|
Logger({
|
|
647
727
|
level: "WARN",
|
|
648
|
-
message:
|
|
728
|
+
message: `Parameter Validation warrnings for platform > Payment > verifyIfscCode \n ${warrning}`,
|
|
649
729
|
});
|
|
650
|
-
Logger({ level: "WARN", message: warrning });
|
|
651
730
|
}
|
|
652
731
|
|
|
653
732
|
const query_params = {};
|
|
@@ -661,12 +740,18 @@ class Payment {
|
|
|
661
740
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/ifsc-code/verify`,
|
|
662
741
|
query_params,
|
|
663
742
|
undefined,
|
|
664
|
-
xHeaders
|
|
743
|
+
xHeaders,
|
|
744
|
+
{ headers }
|
|
665
745
|
);
|
|
666
746
|
|
|
747
|
+
let responseData = response;
|
|
748
|
+
if (headers) {
|
|
749
|
+
responseData = response[0];
|
|
750
|
+
}
|
|
751
|
+
|
|
667
752
|
const {
|
|
668
753
|
error: res_error,
|
|
669
|
-
} =
|
|
754
|
+
} = PaymentPlatformModel.IfscCodeResponse().validate(responseData, {
|
|
670
755
|
abortEarly: false,
|
|
671
756
|
allowUnknown: false,
|
|
672
757
|
});
|
|
@@ -674,9 +759,8 @@ class Payment {
|
|
|
674
759
|
if (res_error) {
|
|
675
760
|
Logger({
|
|
676
761
|
level: "WARN",
|
|
677
|
-
message:
|
|
762
|
+
message: `Response Validation Warnnings for platform > Payment > verifyIfscCode \n ${res_error}`,
|
|
678
763
|
});
|
|
679
|
-
Logger({ level: "WARN", message: res_error });
|
|
680
764
|
}
|
|
681
765
|
|
|
682
766
|
return response;
|