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