@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,21 +1,223 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
3
|
+
const UserApplicationModel = require("./UserApplicationModel");
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef AddEmailParam
|
|
7
|
+
* @property {string} [platform] - ID of the application
|
|
8
|
+
* @property {UserApplicationModel.EditEmailRequestSchema} body
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @typedef AddMobileNumberParam
|
|
13
|
+
* @property {string} [platform] - ID of the application
|
|
14
|
+
* @property {UserApplicationModel.EditMobileRequestSchema} body
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @typedef DeleteEmailParam
|
|
19
|
+
* @property {string} [platform] - ID of the application
|
|
20
|
+
* @property {boolean} active - This is a boolean value to check if email ID is
|
|
21
|
+
* active 1. True - Email ID is active 2.False - Email ID is inactive
|
|
22
|
+
* @property {boolean} primary - This is a boolean value to check if email ID is
|
|
23
|
+
* primary (main email ID) 1. True - Email ID is primary 2.False - Email ID is
|
|
24
|
+
* not primary
|
|
25
|
+
* @property {boolean} verified - This is a boolean value to check if email ID
|
|
26
|
+
* is verified 1. True - Email ID is verified 2.False - Email ID is not verified yet
|
|
27
|
+
* @property {string} email - The email ID to delete
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @typedef DeleteMobileNumberParam
|
|
32
|
+
* @property {string} [platform] - ID of the application
|
|
33
|
+
* @property {boolean} active - This is a boolean value to check if mobile
|
|
34
|
+
* number is active 1.True - Number is active 2. False - Number is inactive
|
|
35
|
+
* @property {boolean} primary - This is a boolean value to check if mobile
|
|
36
|
+
* number is primary number (main number) 1. True - Number is primary 2. False
|
|
37
|
+
* - Number is not primary
|
|
38
|
+
* @property {boolean} verified - This is a boolean value to check if mobile
|
|
39
|
+
* number is verified 1. True - Number is verified 2.False - Number is not verified yet
|
|
40
|
+
* @property {string} countryCode - Country code of the phone number, e.g. 91
|
|
41
|
+
* @property {string} phone - Phone number
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @typedef DeleteUserParam
|
|
46
|
+
* @property {UserApplicationModel.DeleteApplicationUserRequestSchema} body
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @typedef ForgotPasswordParam
|
|
51
|
+
* @property {UserApplicationModel.ForgotPasswordRequestSchema} body
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
/** @typedef GetListOfActiveSessionsParam */
|
|
55
|
+
|
|
56
|
+
/** @typedef GetLoggedInUserParam */
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @typedef GetPlatformConfigParam
|
|
60
|
+
* @property {string} [name] - Name of the application, e.g. Fynd
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
/** @typedef HasPasswordParam */
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @typedef LoginWithAppleIOSParam
|
|
67
|
+
* @property {string} [platform] - ID of the application
|
|
68
|
+
* @property {UserApplicationModel.OAuthRequestAppleSchema} body
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @typedef LoginWithEmailAndPasswordParam
|
|
73
|
+
* @property {UserApplicationModel.PasswordLoginRequestSchema} body
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @typedef LoginWithFacebookParam
|
|
78
|
+
* @property {string} [platform] - ID of the application
|
|
79
|
+
* @property {UserApplicationModel.OAuthRequestSchema} body
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @typedef LoginWithGoogleParam
|
|
84
|
+
* @property {string} [platform] - ID of the application
|
|
85
|
+
* @property {UserApplicationModel.OAuthRequestSchema} body
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @typedef LoginWithGoogleAndroidParam
|
|
90
|
+
* @property {string} [platform] - ID of the application
|
|
91
|
+
* @property {UserApplicationModel.OAuthRequestSchema} body
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @typedef LoginWithGoogleIOSParam
|
|
96
|
+
* @property {string} [platform] - ID of the application
|
|
97
|
+
* @property {UserApplicationModel.OAuthRequestSchema} body
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @typedef LoginWithOTPParam
|
|
102
|
+
* @property {string} [platform] - ID of the application
|
|
103
|
+
* @property {UserApplicationModel.SendOtpRequestSchema} body
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @typedef LoginWithTokenParam
|
|
108
|
+
* @property {UserApplicationModel.TokenRequestBodySchema} body
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/** @typedef LogoutParam */
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @typedef RegisterWithFormParam
|
|
115
|
+
* @property {string} [platform] - ID of the application
|
|
116
|
+
* @property {UserApplicationModel.FormRegisterRequestSchema} body
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @typedef SendOTPOnEmailParam
|
|
121
|
+
* @property {string} [platform] - ID of the application
|
|
122
|
+
* @property {UserApplicationModel.SendEmailOtpRequestSchema} body
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @typedef SendOTPOnMobileParam
|
|
127
|
+
* @property {string} [platform] - ID of the application
|
|
128
|
+
* @property {UserApplicationModel.SendMobileOtpRequestSchema} body
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @typedef SendResetPasswordEmailParam
|
|
133
|
+
* @property {string} [platform] - ID of the application
|
|
134
|
+
* @property {UserApplicationModel.SendResetPasswordEmailRequestSchema} body
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @typedef SendResetPasswordMobileParam
|
|
139
|
+
* @property {string} [platform] - ID of the application
|
|
140
|
+
* @property {UserApplicationModel.SendResetPasswordMobileRequestSchema} body
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @typedef SendResetTokenParam
|
|
145
|
+
* @property {UserApplicationModel.CodeRequestBodySchema} body
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @typedef SendVerificationLinkToEmailParam
|
|
150
|
+
* @property {string} [platform] - ID of the application
|
|
151
|
+
* @property {UserApplicationModel.EditEmailRequestSchema} body
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @typedef SendVerificationLinkToMobileParam
|
|
156
|
+
* @property {string} [platform] - ID of the application
|
|
157
|
+
* @property {UserApplicationModel.SendVerificationLinkMobileRequestSchema} body
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @typedef SetEmailAsPrimaryParam
|
|
162
|
+
* @property {UserApplicationModel.EditEmailRequestSchema} body
|
|
163
|
+
*/
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @typedef SetMobileNumberAsPrimaryParam
|
|
167
|
+
* @property {UserApplicationModel.SendVerificationLinkMobileRequestSchema} body
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @typedef UpdatePasswordParam
|
|
172
|
+
* @property {UserApplicationModel.UpdatePasswordRequestSchema} body
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* @typedef UpdateProfileParam
|
|
177
|
+
* @property {string} [platform] - ID of the application
|
|
178
|
+
* @property {UserApplicationModel.EditProfileRequestSchema} body
|
|
179
|
+
*/
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @typedef VerifyEmailParam
|
|
183
|
+
* @property {UserApplicationModel.CodeRequestBodySchema} body
|
|
184
|
+
*/
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @typedef VerifyEmailOTPParam
|
|
188
|
+
* @property {string} [platform] - ID of the application
|
|
189
|
+
* @property {UserApplicationModel.VerifyEmailOtpRequestSchema} body
|
|
190
|
+
*/
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @typedef VerifyMobileParam
|
|
194
|
+
* @property {UserApplicationModel.CodeRequestBodySchema} body
|
|
195
|
+
*/
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @typedef VerifyMobileOTPParam
|
|
199
|
+
* @property {string} [platform] - ID of the application
|
|
200
|
+
* @property {UserApplicationModel.VerifyOtpRequestSchema} body
|
|
201
|
+
*/
|
|
202
|
+
|
|
203
|
+
class UserApplicationValidator {
|
|
204
|
+
/** @returns {AddEmailParam} */
|
|
5
205
|
static addEmail() {
|
|
6
206
|
return Joi.object({
|
|
7
207
|
platform: Joi.string().allow(""),
|
|
8
|
-
body:
|
|
208
|
+
body: UserApplicationModel.EditEmailRequestSchema().required(),
|
|
9
209
|
}).required();
|
|
10
210
|
}
|
|
11
211
|
|
|
212
|
+
/** @returns {AddMobileNumberParam} */
|
|
12
213
|
static addMobileNumber() {
|
|
13
214
|
return Joi.object({
|
|
14
215
|
platform: Joi.string().allow(""),
|
|
15
|
-
body:
|
|
216
|
+
body: UserApplicationModel.EditMobileRequestSchema().required(),
|
|
16
217
|
}).required();
|
|
17
218
|
}
|
|
18
219
|
|
|
220
|
+
/** @returns {DeleteEmailParam} */
|
|
19
221
|
static deleteEmail() {
|
|
20
222
|
return Joi.object({
|
|
21
223
|
platform: Joi.string().allow(""),
|
|
@@ -26,6 +228,7 @@ class UserValidator {
|
|
|
26
228
|
}).required();
|
|
27
229
|
}
|
|
28
230
|
|
|
231
|
+
/** @returns {DeleteMobileNumberParam} */
|
|
29
232
|
static deleteMobileNumber() {
|
|
30
233
|
return Joi.object({
|
|
31
234
|
platform: Joi.string().allow(""),
|
|
@@ -37,199 +240,230 @@ class UserValidator {
|
|
|
37
240
|
}).required();
|
|
38
241
|
}
|
|
39
242
|
|
|
243
|
+
/** @returns {DeleteUserParam} */
|
|
40
244
|
static deleteUser() {
|
|
41
245
|
return Joi.object({
|
|
42
|
-
body:
|
|
246
|
+
body: UserApplicationModel.DeleteApplicationUserRequestSchema().required(),
|
|
43
247
|
}).required();
|
|
44
248
|
}
|
|
45
249
|
|
|
250
|
+
/** @returns {ForgotPasswordParam} */
|
|
46
251
|
static forgotPassword() {
|
|
47
252
|
return Joi.object({
|
|
48
|
-
body:
|
|
253
|
+
body: UserApplicationModel.ForgotPasswordRequestSchema().required(),
|
|
49
254
|
}).required();
|
|
50
255
|
}
|
|
51
256
|
|
|
257
|
+
/** @returns {GetListOfActiveSessionsParam} */
|
|
52
258
|
static getListOfActiveSessions() {
|
|
53
259
|
return Joi.object({});
|
|
54
260
|
}
|
|
55
261
|
|
|
262
|
+
/** @returns {GetLoggedInUserParam} */
|
|
56
263
|
static getLoggedInUser() {
|
|
57
264
|
return Joi.object({});
|
|
58
265
|
}
|
|
59
266
|
|
|
267
|
+
/** @returns {GetPlatformConfigParam} */
|
|
60
268
|
static getPlatformConfig() {
|
|
61
269
|
return Joi.object({
|
|
62
270
|
name: Joi.string().allow(""),
|
|
63
271
|
});
|
|
64
272
|
}
|
|
65
273
|
|
|
274
|
+
/** @returns {HasPasswordParam} */
|
|
66
275
|
static hasPassword() {
|
|
67
276
|
return Joi.object({});
|
|
68
277
|
}
|
|
69
278
|
|
|
279
|
+
/** @returns {LoginWithAppleIOSParam} */
|
|
70
280
|
static loginWithAppleIOS() {
|
|
71
281
|
return Joi.object({
|
|
72
282
|
platform: Joi.string().allow(""),
|
|
73
|
-
body:
|
|
283
|
+
body: UserApplicationModel.OAuthRequestAppleSchema().required(),
|
|
74
284
|
}).required();
|
|
75
285
|
}
|
|
76
286
|
|
|
287
|
+
/** @returns {LoginWithEmailAndPasswordParam} */
|
|
77
288
|
static loginWithEmailAndPassword() {
|
|
78
289
|
return Joi.object({
|
|
79
|
-
body:
|
|
290
|
+
body: UserApplicationModel.PasswordLoginRequestSchema().required(),
|
|
80
291
|
}).required();
|
|
81
292
|
}
|
|
82
293
|
|
|
294
|
+
/** @returns {LoginWithFacebookParam} */
|
|
83
295
|
static loginWithFacebook() {
|
|
84
296
|
return Joi.object({
|
|
85
297
|
platform: Joi.string().allow(""),
|
|
86
|
-
body:
|
|
298
|
+
body: UserApplicationModel.OAuthRequestSchema().required(),
|
|
87
299
|
}).required();
|
|
88
300
|
}
|
|
89
301
|
|
|
302
|
+
/** @returns {LoginWithGoogleParam} */
|
|
90
303
|
static loginWithGoogle() {
|
|
91
304
|
return Joi.object({
|
|
92
305
|
platform: Joi.string().allow(""),
|
|
93
|
-
body:
|
|
306
|
+
body: UserApplicationModel.OAuthRequestSchema().required(),
|
|
94
307
|
}).required();
|
|
95
308
|
}
|
|
96
309
|
|
|
310
|
+
/** @returns {LoginWithGoogleAndroidParam} */
|
|
97
311
|
static loginWithGoogleAndroid() {
|
|
98
312
|
return Joi.object({
|
|
99
313
|
platform: Joi.string().allow(""),
|
|
100
|
-
body:
|
|
314
|
+
body: UserApplicationModel.OAuthRequestSchema().required(),
|
|
101
315
|
}).required();
|
|
102
316
|
}
|
|
103
317
|
|
|
318
|
+
/** @returns {LoginWithGoogleIOSParam} */
|
|
104
319
|
static loginWithGoogleIOS() {
|
|
105
320
|
return Joi.object({
|
|
106
321
|
platform: Joi.string().allow(""),
|
|
107
|
-
body:
|
|
322
|
+
body: UserApplicationModel.OAuthRequestSchema().required(),
|
|
108
323
|
}).required();
|
|
109
324
|
}
|
|
110
325
|
|
|
326
|
+
/** @returns {LoginWithOTPParam} */
|
|
111
327
|
static loginWithOTP() {
|
|
112
328
|
return Joi.object({
|
|
113
329
|
platform: Joi.string().allow(""),
|
|
114
|
-
body:
|
|
330
|
+
body: UserApplicationModel.SendOtpRequestSchema().required(),
|
|
115
331
|
}).required();
|
|
116
332
|
}
|
|
117
333
|
|
|
334
|
+
/** @returns {LoginWithTokenParam} */
|
|
118
335
|
static loginWithToken() {
|
|
119
336
|
return Joi.object({
|
|
120
|
-
body:
|
|
337
|
+
body: UserApplicationModel.TokenRequestBodySchema().required(),
|
|
121
338
|
}).required();
|
|
122
339
|
}
|
|
123
340
|
|
|
341
|
+
/** @returns {LogoutParam} */
|
|
124
342
|
static logout() {
|
|
125
343
|
return Joi.object({});
|
|
126
344
|
}
|
|
127
345
|
|
|
346
|
+
/** @returns {RegisterWithFormParam} */
|
|
128
347
|
static registerWithForm() {
|
|
129
348
|
return Joi.object({
|
|
130
349
|
platform: Joi.string().allow(""),
|
|
131
|
-
body:
|
|
350
|
+
body: UserApplicationModel.FormRegisterRequestSchema().required(),
|
|
132
351
|
}).required();
|
|
133
352
|
}
|
|
134
353
|
|
|
354
|
+
/** @returns {SendOTPOnEmailParam} */
|
|
135
355
|
static sendOTPOnEmail() {
|
|
136
356
|
return Joi.object({
|
|
137
357
|
platform: Joi.string().allow(""),
|
|
138
|
-
body:
|
|
358
|
+
body: UserApplicationModel.SendEmailOtpRequestSchema().required(),
|
|
139
359
|
}).required();
|
|
140
360
|
}
|
|
141
361
|
|
|
362
|
+
/** @returns {SendOTPOnMobileParam} */
|
|
142
363
|
static sendOTPOnMobile() {
|
|
143
364
|
return Joi.object({
|
|
144
365
|
platform: Joi.string().allow(""),
|
|
145
|
-
body:
|
|
366
|
+
body: UserApplicationModel.SendMobileOtpRequestSchema().required(),
|
|
146
367
|
}).required();
|
|
147
368
|
}
|
|
148
369
|
|
|
370
|
+
/** @returns {SendResetPasswordEmailParam} */
|
|
149
371
|
static sendResetPasswordEmail() {
|
|
150
372
|
return Joi.object({
|
|
151
373
|
platform: Joi.string().allow(""),
|
|
152
|
-
body:
|
|
374
|
+
body: UserApplicationModel.SendResetPasswordEmailRequestSchema().required(),
|
|
153
375
|
}).required();
|
|
154
376
|
}
|
|
155
377
|
|
|
378
|
+
/** @returns {SendResetPasswordMobileParam} */
|
|
156
379
|
static sendResetPasswordMobile() {
|
|
157
380
|
return Joi.object({
|
|
158
381
|
platform: Joi.string().allow(""),
|
|
159
|
-
body:
|
|
382
|
+
body: UserApplicationModel.SendResetPasswordMobileRequestSchema().required(),
|
|
160
383
|
}).required();
|
|
161
384
|
}
|
|
162
385
|
|
|
386
|
+
/** @returns {SendResetTokenParam} */
|
|
163
387
|
static sendResetToken() {
|
|
164
388
|
return Joi.object({
|
|
165
|
-
body:
|
|
389
|
+
body: UserApplicationModel.CodeRequestBodySchema().required(),
|
|
166
390
|
}).required();
|
|
167
391
|
}
|
|
168
392
|
|
|
393
|
+
/** @returns {SendVerificationLinkToEmailParam} */
|
|
169
394
|
static sendVerificationLinkToEmail() {
|
|
170
395
|
return Joi.object({
|
|
171
396
|
platform: Joi.string().allow(""),
|
|
172
|
-
body:
|
|
397
|
+
body: UserApplicationModel.EditEmailRequestSchema().required(),
|
|
173
398
|
}).required();
|
|
174
399
|
}
|
|
175
400
|
|
|
401
|
+
/** @returns {SendVerificationLinkToMobileParam} */
|
|
176
402
|
static sendVerificationLinkToMobile() {
|
|
177
403
|
return Joi.object({
|
|
178
404
|
platform: Joi.string().allow(""),
|
|
179
|
-
body:
|
|
405
|
+
body: UserApplicationModel.SendVerificationLinkMobileRequestSchema().required(),
|
|
180
406
|
}).required();
|
|
181
407
|
}
|
|
182
408
|
|
|
409
|
+
/** @returns {SetEmailAsPrimaryParam} */
|
|
183
410
|
static setEmailAsPrimary() {
|
|
184
411
|
return Joi.object({
|
|
185
|
-
body:
|
|
412
|
+
body: UserApplicationModel.EditEmailRequestSchema().required(),
|
|
186
413
|
}).required();
|
|
187
414
|
}
|
|
188
415
|
|
|
416
|
+
/** @returns {SetMobileNumberAsPrimaryParam} */
|
|
189
417
|
static setMobileNumberAsPrimary() {
|
|
190
418
|
return Joi.object({
|
|
191
|
-
body:
|
|
419
|
+
body: UserApplicationModel.SendVerificationLinkMobileRequestSchema().required(),
|
|
192
420
|
}).required();
|
|
193
421
|
}
|
|
194
422
|
|
|
423
|
+
/** @returns {UpdatePasswordParam} */
|
|
195
424
|
static updatePassword() {
|
|
196
425
|
return Joi.object({
|
|
197
|
-
body:
|
|
426
|
+
body: UserApplicationModel.UpdatePasswordRequestSchema().required(),
|
|
198
427
|
}).required();
|
|
199
428
|
}
|
|
200
429
|
|
|
430
|
+
/** @returns {UpdateProfileParam} */
|
|
201
431
|
static updateProfile() {
|
|
202
432
|
return Joi.object({
|
|
203
433
|
platform: Joi.string().allow(""),
|
|
204
|
-
body:
|
|
434
|
+
body: UserApplicationModel.EditProfileRequestSchema().required(),
|
|
205
435
|
}).required();
|
|
206
436
|
}
|
|
207
437
|
|
|
438
|
+
/** @returns {VerifyEmailParam} */
|
|
208
439
|
static verifyEmail() {
|
|
209
440
|
return Joi.object({
|
|
210
|
-
body:
|
|
441
|
+
body: UserApplicationModel.CodeRequestBodySchema().required(),
|
|
211
442
|
}).required();
|
|
212
443
|
}
|
|
213
444
|
|
|
445
|
+
/** @returns {VerifyEmailOTPParam} */
|
|
214
446
|
static verifyEmailOTP() {
|
|
215
447
|
return Joi.object({
|
|
216
448
|
platform: Joi.string().allow(""),
|
|
217
|
-
body:
|
|
449
|
+
body: UserApplicationModel.VerifyEmailOtpRequestSchema().required(),
|
|
218
450
|
}).required();
|
|
219
451
|
}
|
|
220
452
|
|
|
453
|
+
/** @returns {VerifyMobileParam} */
|
|
221
454
|
static verifyMobile() {
|
|
222
455
|
return Joi.object({
|
|
223
|
-
body:
|
|
456
|
+
body: UserApplicationModel.CodeRequestBodySchema().required(),
|
|
224
457
|
}).required();
|
|
225
458
|
}
|
|
226
459
|
|
|
460
|
+
/** @returns {VerifyMobileOTPParam} */
|
|
227
461
|
static verifyMobileOTP() {
|
|
228
462
|
return Joi.object({
|
|
229
463
|
platform: Joi.string().allow(""),
|
|
230
|
-
body:
|
|
464
|
+
body: UserApplicationModel.VerifyOtpRequestSchema().required(),
|
|
231
465
|
}).required();
|
|
232
466
|
}
|
|
233
467
|
}
|
|
234
468
|
|
|
235
|
-
module.exports =
|
|
469
|
+
module.exports = UserApplicationValidator;
|
|
@@ -6,6 +6,7 @@ const { sign } = require("./RequestSigner");
|
|
|
6
6
|
const { FDKServerResponseError } = require("./FDKError");
|
|
7
7
|
const { log, Logger, getLoggerLevel } = require("./Logger");
|
|
8
8
|
const createCurl = require("./curlHelper");
|
|
9
|
+
const packageJson = require("../../package.json");
|
|
9
10
|
axios.defaults.withCredentials = true;
|
|
10
11
|
|
|
11
12
|
function getTransformer(config) {
|
|
@@ -38,7 +39,7 @@ function requestInterceptorFn() {
|
|
|
38
39
|
}
|
|
39
40
|
const { host, pathname, search } = new URL(url);
|
|
40
41
|
const { data, headers, method, params } = config;
|
|
41
|
-
headers["x-fp-sdk-version"] =
|
|
42
|
+
headers["x-fp-sdk-version"] = packageJson.version;
|
|
42
43
|
let querySearchObj = querystring.parse(search);
|
|
43
44
|
querySearchObj = { ...querySearchObj, ...params };
|
|
44
45
|
let queryParam = "";
|
|
@@ -114,6 +115,7 @@ fdkAxios.interceptors.request.use(requestInterceptorFn());
|
|
|
114
115
|
fdkAxios.interceptors.response.use(
|
|
115
116
|
function (response) {
|
|
116
117
|
if (response.config.method == "head") {
|
|
118
|
+
// TODO: what to do for `head` method
|
|
117
119
|
return response.headers;
|
|
118
120
|
}
|
|
119
121
|
Logger({
|
|
@@ -122,7 +124,11 @@ fdkAxios.interceptors.response.use(
|
|
|
122
124
|
message: response.data,
|
|
123
125
|
url: response.config.url,
|
|
124
126
|
});
|
|
125
|
-
|
|
127
|
+
|
|
128
|
+
if (response.config._returnHeaders) {
|
|
129
|
+
return [response.data, response.headers];
|
|
130
|
+
}
|
|
131
|
+
return response.data;
|
|
126
132
|
},
|
|
127
133
|
function (error) {
|
|
128
134
|
if (error.response) {
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
export = Paginator;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
pageNo
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
/** @template {Object} T */
|
|
3
|
+
declare class Paginator<T extends unknown> {
|
|
4
|
+
/** @param {number} pageNo */
|
|
5
|
+
constructor(pageNo: number);
|
|
6
|
+
pageNo: number;
|
|
7
|
+
callback: () => Promise<T>;
|
|
8
|
+
/**
|
|
9
|
+
* @param {() => Promise<T>} callback
|
|
10
|
+
* @returns {void}
|
|
11
|
+
*/
|
|
12
|
+
setCallback(callback: () => Promise<T>): void;
|
|
13
|
+
/** @returns {boolean} */
|
|
14
|
+
hasNext(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @param {Object} arg
|
|
17
|
+
* @param {boolean} arg.hasNext
|
|
18
|
+
* @param {string} arg.nextId
|
|
19
|
+
* @param {number} arg.pageNo
|
|
20
|
+
* @returns {void}
|
|
21
|
+
*/
|
|
8
22
|
setPaginator({ hasNext, nextId, pageNo }: {
|
|
9
|
-
hasNext:
|
|
10
|
-
nextId
|
|
11
|
-
pageNo
|
|
23
|
+
hasNext: boolean;
|
|
24
|
+
nextId: string;
|
|
25
|
+
pageNo: number;
|
|
12
26
|
}): void;
|
|
13
|
-
isNext:
|
|
14
|
-
nextId:
|
|
15
|
-
|
|
27
|
+
isNext: boolean;
|
|
28
|
+
nextId: string;
|
|
29
|
+
/** @returns {Promise<T>} */
|
|
30
|
+
next(): Promise<T>;
|
|
16
31
|
}
|
package/sdk/common/Paginator.js
CHANGED
|
@@ -1,23 +1,38 @@
|
|
|
1
|
+
/** @template {Object} T */
|
|
1
2
|
class Paginator {
|
|
3
|
+
/** @param {number} pageNo */
|
|
2
4
|
constructor(pageNo) {
|
|
3
5
|
this.pageNo = pageNo;
|
|
4
6
|
this.callback = undefined;
|
|
5
7
|
}
|
|
6
8
|
|
|
9
|
+
/**
|
|
10
|
+
* @param {() => Promise<T>} callback
|
|
11
|
+
* @returns {void}
|
|
12
|
+
*/
|
|
7
13
|
setCallback(callback) {
|
|
8
14
|
this.callback = callback;
|
|
9
15
|
}
|
|
10
16
|
|
|
17
|
+
/** @returns {boolean} */
|
|
11
18
|
hasNext() {
|
|
12
19
|
return this.isNext;
|
|
13
20
|
}
|
|
14
21
|
|
|
22
|
+
/**
|
|
23
|
+
* @param {Object} arg
|
|
24
|
+
* @param {boolean} arg.hasNext
|
|
25
|
+
* @param {string} arg.nextId
|
|
26
|
+
* @param {number} arg.pageNo
|
|
27
|
+
* @returns {void}
|
|
28
|
+
*/
|
|
15
29
|
setPaginator({ hasNext, nextId = undefined, pageNo = 1 }) {
|
|
16
30
|
this.isNext = hasNext;
|
|
17
31
|
this.nextId = nextId;
|
|
18
32
|
this.pageNo = pageNo;
|
|
19
33
|
}
|
|
20
34
|
|
|
35
|
+
/** @returns {Promise<T>} */
|
|
21
36
|
next() {
|
|
22
37
|
return this.callback();
|
|
23
38
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export = APIClient;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef {Object} Options
|
|
4
|
+
* @property {boolean} headers - Whether headers are returned or not.
|
|
5
|
+
*/
|
|
2
6
|
declare class APIClient {
|
|
3
7
|
/**
|
|
4
8
|
* @param {object} conf
|
|
@@ -6,7 +10,17 @@ declare class APIClient {
|
|
|
6
10
|
* @param {string} url
|
|
7
11
|
* @param {object} query
|
|
8
12
|
* @param {object} body
|
|
13
|
+
* @param {Options} options
|
|
9
14
|
*/
|
|
10
|
-
static execute(conf: object, method: string, url: string, query: object, body: object): Promise<any>;
|
|
15
|
+
static execute(conf: object, method: string, url: string, query: object, body: object, options: Options): Promise<any>;
|
|
11
16
|
get(url: any, config: any): Promise<any>;
|
|
12
17
|
}
|
|
18
|
+
declare namespace APIClient {
|
|
19
|
+
export { Options };
|
|
20
|
+
}
|
|
21
|
+
type Options = {
|
|
22
|
+
/**
|
|
23
|
+
* - Whether headers are returned or not.
|
|
24
|
+
*/
|
|
25
|
+
headers: boolean;
|
|
26
|
+
};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
const { fdkAxios } = require("../common/AxiosHelper");
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {Object} Options
|
|
5
|
+
* @property {boolean} headers - Whether headers are returned or not.
|
|
6
|
+
*/
|
|
7
|
+
|
|
3
8
|
class APIClient {
|
|
4
9
|
/**
|
|
5
10
|
* @param {object} conf
|
|
@@ -7,8 +12,9 @@ class APIClient {
|
|
|
7
12
|
* @param {string} url
|
|
8
13
|
* @param {object} query
|
|
9
14
|
* @param {object} body
|
|
15
|
+
* @param {Options} options
|
|
10
16
|
*/
|
|
11
|
-
static async execute(conf, method, url, query, body) {
|
|
17
|
+
static async execute(conf, method, url, query, body, options) {
|
|
12
18
|
const token = await conf.oauthClient.getNewAccessToken();
|
|
13
19
|
|
|
14
20
|
const extraHeaders = conf.extraHeaders.reduce((acc, curr) => {
|
|
@@ -26,6 +32,7 @@ class APIClient {
|
|
|
26
32
|
Authorization: "Bearer " + token,
|
|
27
33
|
...extraHeaders,
|
|
28
34
|
},
|
|
35
|
+
_returnHeaders: options.headers,
|
|
29
36
|
};
|
|
30
37
|
|
|
31
38
|
return fdkAxios.request(rawRequest);
|