@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
|
@@ -2,8 +2,8 @@ const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const constructUrl = require("../constructUrl");
|
|
4
4
|
const Paginator = require("../../common/Paginator");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const UserApplicationValidator = require("./UserApplicationValidator");
|
|
6
|
+
const UserApplicationModel = require("./UserApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
8
|
const Joi = require("joi");
|
|
9
9
|
|
|
@@ -85,15 +85,15 @@ class User {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
* @param {
|
|
89
|
-
* @param {
|
|
90
|
-
* @
|
|
91
|
-
* @
|
|
88
|
+
* @param {UserApplicationValidator.AddEmailParam} arg - Arg object.
|
|
89
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
90
|
+
* @returns {Promise<UserApplicationModel.VerifyEmailOTPSuccess>} - Success response
|
|
91
|
+
* @name addEmail
|
|
92
92
|
* @summary: Add email to profile
|
|
93
|
-
* @description: Use this API to add a new email address to a profile
|
|
93
|
+
* @description: Use this API to add a new email address to a profile - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/addEmail/).
|
|
94
94
|
*/
|
|
95
|
-
async addEmail({ body, platform } = {}) {
|
|
96
|
-
const { error } =
|
|
95
|
+
async addEmail({ body, platform } = {}, { headers } = { headers: false }) {
|
|
96
|
+
const { error } = UserApplicationValidator.addEmail().validate(
|
|
97
97
|
{ body, platform },
|
|
98
98
|
{ abortEarly: false, allowUnknown: true }
|
|
99
99
|
);
|
|
@@ -102,16 +102,15 @@ class User {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
// Showing warrnings if extra unknown parameters are found
|
|
105
|
-
const { error: warrning } =
|
|
105
|
+
const { error: warrning } = UserApplicationValidator.addEmail().validate(
|
|
106
106
|
{ body, platform },
|
|
107
107
|
{ abortEarly: false, allowUnknown: false }
|
|
108
108
|
);
|
|
109
109
|
if (warrning) {
|
|
110
110
|
Logger({
|
|
111
111
|
level: "WARN",
|
|
112
|
-
message:
|
|
112
|
+
message: `Parameter Validation warrnings for application > User > addEmail \n ${warrning}`,
|
|
113
113
|
});
|
|
114
|
-
Logger({ level: "WARN", message: warrning });
|
|
115
114
|
}
|
|
116
115
|
|
|
117
116
|
const query_params = {};
|
|
@@ -128,12 +127,18 @@ class User {
|
|
|
128
127
|
}),
|
|
129
128
|
query_params,
|
|
130
129
|
body,
|
|
131
|
-
xHeaders
|
|
130
|
+
xHeaders,
|
|
131
|
+
{ headers }
|
|
132
132
|
);
|
|
133
133
|
|
|
134
|
+
let responseData = response;
|
|
135
|
+
if (headers) {
|
|
136
|
+
responseData = response[0];
|
|
137
|
+
}
|
|
138
|
+
|
|
134
139
|
const {
|
|
135
140
|
error: res_error,
|
|
136
|
-
} =
|
|
141
|
+
} = UserApplicationModel.VerifyEmailOTPSuccess().validate(responseData, {
|
|
137
142
|
abortEarly: false,
|
|
138
143
|
allowUnknown: false,
|
|
139
144
|
});
|
|
@@ -141,24 +146,26 @@ class User {
|
|
|
141
146
|
if (res_error) {
|
|
142
147
|
Logger({
|
|
143
148
|
level: "WARN",
|
|
144
|
-
message:
|
|
149
|
+
message: `Response Validation Warnnings for application > User > addEmail \n ${res_error}`,
|
|
145
150
|
});
|
|
146
|
-
Logger({ level: "WARN", message: res_error });
|
|
147
151
|
}
|
|
148
152
|
|
|
149
153
|
return response;
|
|
150
154
|
}
|
|
151
155
|
|
|
152
156
|
/**
|
|
153
|
-
* @param {
|
|
154
|
-
* @param {
|
|
155
|
-
* @
|
|
156
|
-
* @
|
|
157
|
+
* @param {UserApplicationValidator.AddMobileNumberParam} arg - Arg object.
|
|
158
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
159
|
+
* @returns {Promise<UserApplicationModel.VerifyMobileOTPSuccess>} - Success response
|
|
160
|
+
* @name addMobileNumber
|
|
157
161
|
* @summary: Add mobile number to profile
|
|
158
|
-
* @description: Use this API to add a new mobile number to a profile.
|
|
162
|
+
* @description: Use this API to add a new mobile number to a profile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/addMobileNumber/).
|
|
159
163
|
*/
|
|
160
|
-
async addMobileNumber(
|
|
161
|
-
|
|
164
|
+
async addMobileNumber(
|
|
165
|
+
{ body, platform } = {},
|
|
166
|
+
{ headers } = { headers: false }
|
|
167
|
+
) {
|
|
168
|
+
const { error } = UserApplicationValidator.addMobileNumber().validate(
|
|
162
169
|
{ body, platform },
|
|
163
170
|
{ abortEarly: false, allowUnknown: true }
|
|
164
171
|
);
|
|
@@ -167,16 +174,17 @@ class User {
|
|
|
167
174
|
}
|
|
168
175
|
|
|
169
176
|
// Showing warrnings if extra unknown parameters are found
|
|
170
|
-
const {
|
|
177
|
+
const {
|
|
178
|
+
error: warrning,
|
|
179
|
+
} = UserApplicationValidator.addMobileNumber().validate(
|
|
171
180
|
{ body, platform },
|
|
172
181
|
{ abortEarly: false, allowUnknown: false }
|
|
173
182
|
);
|
|
174
183
|
if (warrning) {
|
|
175
184
|
Logger({
|
|
176
185
|
level: "WARN",
|
|
177
|
-
message:
|
|
186
|
+
message: `Parameter Validation warrnings for application > User > addMobileNumber \n ${warrning}`,
|
|
178
187
|
});
|
|
179
|
-
Logger({ level: "WARN", message: warrning });
|
|
180
188
|
}
|
|
181
189
|
|
|
182
190
|
const query_params = {};
|
|
@@ -193,12 +201,18 @@ class User {
|
|
|
193
201
|
}),
|
|
194
202
|
query_params,
|
|
195
203
|
body,
|
|
196
|
-
xHeaders
|
|
204
|
+
xHeaders,
|
|
205
|
+
{ headers }
|
|
197
206
|
);
|
|
198
207
|
|
|
208
|
+
let responseData = response;
|
|
209
|
+
if (headers) {
|
|
210
|
+
responseData = response[0];
|
|
211
|
+
}
|
|
212
|
+
|
|
199
213
|
const {
|
|
200
214
|
error: res_error,
|
|
201
|
-
} =
|
|
215
|
+
} = UserApplicationModel.VerifyMobileOTPSuccess().validate(responseData, {
|
|
202
216
|
abortEarly: false,
|
|
203
217
|
allowUnknown: false,
|
|
204
218
|
});
|
|
@@ -206,32 +220,26 @@ class User {
|
|
|
206
220
|
if (res_error) {
|
|
207
221
|
Logger({
|
|
208
222
|
level: "WARN",
|
|
209
|
-
message:
|
|
223
|
+
message: `Response Validation Warnnings for application > User > addMobileNumber \n ${res_error}`,
|
|
210
224
|
});
|
|
211
|
-
Logger({ level: "WARN", message: res_error });
|
|
212
225
|
}
|
|
213
226
|
|
|
214
227
|
return response;
|
|
215
228
|
}
|
|
216
229
|
|
|
217
230
|
/**
|
|
218
|
-
* @param {
|
|
219
|
-
* @param {
|
|
220
|
-
* @
|
|
221
|
-
*
|
|
222
|
-
* @param {boolean} arg.primary - This is a boolean value to check if email
|
|
223
|
-
* ID is primary (main email ID) 1. True - Email ID is primary 2.False -
|
|
224
|
-
* Email ID is not primary
|
|
225
|
-
* @param {boolean} arg.verified - This is a boolean value to check if email
|
|
226
|
-
* ID is verified 1. True - Email ID is verified 2.False - Email ID is not
|
|
227
|
-
* verified yet
|
|
228
|
-
* @param {string} arg.email - The email ID to delete
|
|
229
|
-
* @returns {Promise<LoginSuccess>} - Success response
|
|
231
|
+
* @param {UserApplicationValidator.DeleteEmailParam} arg - Arg object.
|
|
232
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
233
|
+
* @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
|
|
234
|
+
* @name deleteEmail
|
|
230
235
|
* @summary: Delete email from profile
|
|
231
|
-
* @description: Use this API to delete an email address from a profile
|
|
236
|
+
* @description: Use this API to delete an email address from a profile - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/deleteEmail/).
|
|
232
237
|
*/
|
|
233
|
-
async deleteEmail(
|
|
234
|
-
|
|
238
|
+
async deleteEmail(
|
|
239
|
+
{ active, primary, verified, email, platform } = {},
|
|
240
|
+
{ headers } = { headers: false }
|
|
241
|
+
) {
|
|
242
|
+
const { error } = UserApplicationValidator.deleteEmail().validate(
|
|
235
243
|
{ active, primary, verified, email, platform },
|
|
236
244
|
{ abortEarly: false, allowUnknown: true }
|
|
237
245
|
);
|
|
@@ -240,16 +248,15 @@ class User {
|
|
|
240
248
|
}
|
|
241
249
|
|
|
242
250
|
// Showing warrnings if extra unknown parameters are found
|
|
243
|
-
const { error: warrning } =
|
|
251
|
+
const { error: warrning } = UserApplicationValidator.deleteEmail().validate(
|
|
244
252
|
{ active, primary, verified, email, platform },
|
|
245
253
|
{ abortEarly: false, allowUnknown: false }
|
|
246
254
|
);
|
|
247
255
|
if (warrning) {
|
|
248
256
|
Logger({
|
|
249
257
|
level: "WARN",
|
|
250
|
-
message:
|
|
258
|
+
message: `Parameter Validation warrnings for application > User > deleteEmail \n ${warrning}`,
|
|
251
259
|
});
|
|
252
|
-
Logger({ level: "WARN", message: warrning });
|
|
253
260
|
}
|
|
254
261
|
|
|
255
262
|
const query_params = {};
|
|
@@ -270,10 +277,18 @@ class User {
|
|
|
270
277
|
}),
|
|
271
278
|
query_params,
|
|
272
279
|
undefined,
|
|
273
|
-
xHeaders
|
|
280
|
+
xHeaders,
|
|
281
|
+
{ headers }
|
|
274
282
|
);
|
|
275
283
|
|
|
276
|
-
|
|
284
|
+
let responseData = response;
|
|
285
|
+
if (headers) {
|
|
286
|
+
responseData = response[0];
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
const {
|
|
290
|
+
error: res_error,
|
|
291
|
+
} = UserApplicationModel.LoginSuccess().validate(responseData, {
|
|
277
292
|
abortEarly: false,
|
|
278
293
|
allowUnknown: false,
|
|
279
294
|
});
|
|
@@ -281,40 +296,26 @@ class User {
|
|
|
281
296
|
if (res_error) {
|
|
282
297
|
Logger({
|
|
283
298
|
level: "WARN",
|
|
284
|
-
message:
|
|
299
|
+
message: `Response Validation Warnnings for application > User > deleteEmail \n ${res_error}`,
|
|
285
300
|
});
|
|
286
|
-
Logger({ level: "WARN", message: res_error });
|
|
287
301
|
}
|
|
288
302
|
|
|
289
303
|
return response;
|
|
290
304
|
}
|
|
291
305
|
|
|
292
306
|
/**
|
|
293
|
-
* @param {
|
|
294
|
-
* @param {
|
|
295
|
-
* @
|
|
296
|
-
*
|
|
297
|
-
* @param {boolean} arg.primary - This is a boolean value to check if mobile
|
|
298
|
-
* number is primary number (main number) 1. True - Number is primary 2.
|
|
299
|
-
* False - Number is not primary
|
|
300
|
-
* @param {boolean} arg.verified - This is a boolean value to check if
|
|
301
|
-
* mobile number is verified 1. True - Number is verified 2.False - Number
|
|
302
|
-
* is not verified yet
|
|
303
|
-
* @param {string} arg.countryCode - Country code of the phone number, e.g. 91
|
|
304
|
-
* @param {string} arg.phone - Phone number
|
|
305
|
-
* @returns {Promise<LoginSuccess>} - Success response
|
|
307
|
+
* @param {UserApplicationValidator.DeleteMobileNumberParam} arg - Arg object.
|
|
308
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
309
|
+
* @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
|
|
310
|
+
* @name deleteMobileNumber
|
|
306
311
|
* @summary: Delete mobile number from profile
|
|
307
|
-
* @description: Use this API to delete a mobile number from a profile.
|
|
312
|
+
* @description: Use this API to delete a mobile number from a profile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/deleteMobileNumber/).
|
|
308
313
|
*/
|
|
309
|
-
async deleteMobileNumber(
|
|
310
|
-
active,
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
phone,
|
|
315
|
-
platform,
|
|
316
|
-
} = {}) {
|
|
317
|
-
const { error } = UserValidator.deleteMobileNumber().validate(
|
|
314
|
+
async deleteMobileNumber(
|
|
315
|
+
{ active, primary, verified, countryCode, phone, platform } = {},
|
|
316
|
+
{ headers } = { headers: false }
|
|
317
|
+
) {
|
|
318
|
+
const { error } = UserApplicationValidator.deleteMobileNumber().validate(
|
|
318
319
|
{ active, primary, verified, countryCode, phone, platform },
|
|
319
320
|
{ abortEarly: false, allowUnknown: true }
|
|
320
321
|
);
|
|
@@ -323,16 +324,17 @@ class User {
|
|
|
323
324
|
}
|
|
324
325
|
|
|
325
326
|
// Showing warrnings if extra unknown parameters are found
|
|
326
|
-
const {
|
|
327
|
+
const {
|
|
328
|
+
error: warrning,
|
|
329
|
+
} = UserApplicationValidator.deleteMobileNumber().validate(
|
|
327
330
|
{ active, primary, verified, countryCode, phone, platform },
|
|
328
331
|
{ abortEarly: false, allowUnknown: false }
|
|
329
332
|
);
|
|
330
333
|
if (warrning) {
|
|
331
334
|
Logger({
|
|
332
335
|
level: "WARN",
|
|
333
|
-
message:
|
|
336
|
+
message: `Parameter Validation warrnings for application > User > deleteMobileNumber \n ${warrning}`,
|
|
334
337
|
});
|
|
335
|
-
Logger({ level: "WARN", message: warrning });
|
|
336
338
|
}
|
|
337
339
|
|
|
338
340
|
const query_params = {};
|
|
@@ -354,10 +356,18 @@ class User {
|
|
|
354
356
|
}),
|
|
355
357
|
query_params,
|
|
356
358
|
undefined,
|
|
357
|
-
xHeaders
|
|
359
|
+
xHeaders,
|
|
360
|
+
{ headers }
|
|
358
361
|
);
|
|
359
362
|
|
|
360
|
-
|
|
363
|
+
let responseData = response;
|
|
364
|
+
if (headers) {
|
|
365
|
+
responseData = response[0];
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
const {
|
|
369
|
+
error: res_error,
|
|
370
|
+
} = UserApplicationModel.LoginSuccess().validate(responseData, {
|
|
361
371
|
abortEarly: false,
|
|
362
372
|
allowUnknown: false,
|
|
363
373
|
});
|
|
@@ -365,23 +375,23 @@ class User {
|
|
|
365
375
|
if (res_error) {
|
|
366
376
|
Logger({
|
|
367
377
|
level: "WARN",
|
|
368
|
-
message:
|
|
378
|
+
message: `Response Validation Warnnings for application > User > deleteMobileNumber \n ${res_error}`,
|
|
369
379
|
});
|
|
370
|
-
Logger({ level: "WARN", message: res_error });
|
|
371
380
|
}
|
|
372
381
|
|
|
373
382
|
return response;
|
|
374
383
|
}
|
|
375
384
|
|
|
376
385
|
/**
|
|
377
|
-
* @param {
|
|
378
|
-
* @param {
|
|
379
|
-
* @returns {Promise<DeleteUserSuccess>} - Success response
|
|
386
|
+
* @param {UserApplicationValidator.DeleteUserParam} arg - Arg object.
|
|
387
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
388
|
+
* @returns {Promise<UserApplicationModel.DeleteUserSuccess>} - Success response
|
|
389
|
+
* @name deleteUser
|
|
380
390
|
* @summary: verify otp and delete user
|
|
381
|
-
* @description: verify otp and delete user
|
|
391
|
+
* @description: verify otp and delete user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/deleteUser/).
|
|
382
392
|
*/
|
|
383
|
-
async deleteUser({ body } = {}) {
|
|
384
|
-
const { error } =
|
|
393
|
+
async deleteUser({ body } = {}, { headers } = { headers: false }) {
|
|
394
|
+
const { error } = UserApplicationValidator.deleteUser().validate(
|
|
385
395
|
{ body },
|
|
386
396
|
{ abortEarly: false, allowUnknown: true }
|
|
387
397
|
);
|
|
@@ -390,16 +400,15 @@ class User {
|
|
|
390
400
|
}
|
|
391
401
|
|
|
392
402
|
// Showing warrnings if extra unknown parameters are found
|
|
393
|
-
const { error: warrning } =
|
|
403
|
+
const { error: warrning } = UserApplicationValidator.deleteUser().validate(
|
|
394
404
|
{ body },
|
|
395
405
|
{ abortEarly: false, allowUnknown: false }
|
|
396
406
|
);
|
|
397
407
|
if (warrning) {
|
|
398
408
|
Logger({
|
|
399
409
|
level: "WARN",
|
|
400
|
-
message:
|
|
410
|
+
message: `Parameter Validation warrnings for application > User > deleteUser \n ${warrning}`,
|
|
401
411
|
});
|
|
402
|
-
Logger({ level: "WARN", message: warrning });
|
|
403
412
|
}
|
|
404
413
|
|
|
405
414
|
const query_params = {};
|
|
@@ -415,12 +424,18 @@ class User {
|
|
|
415
424
|
}),
|
|
416
425
|
query_params,
|
|
417
426
|
body,
|
|
418
|
-
xHeaders
|
|
427
|
+
xHeaders,
|
|
428
|
+
{ headers }
|
|
419
429
|
);
|
|
420
430
|
|
|
431
|
+
let responseData = response;
|
|
432
|
+
if (headers) {
|
|
433
|
+
responseData = response[0];
|
|
434
|
+
}
|
|
435
|
+
|
|
421
436
|
const {
|
|
422
437
|
error: res_error,
|
|
423
|
-
} =
|
|
438
|
+
} = UserApplicationModel.DeleteUserSuccess().validate(responseData, {
|
|
424
439
|
abortEarly: false,
|
|
425
440
|
allowUnknown: false,
|
|
426
441
|
});
|
|
@@ -428,23 +443,23 @@ class User {
|
|
|
428
443
|
if (res_error) {
|
|
429
444
|
Logger({
|
|
430
445
|
level: "WARN",
|
|
431
|
-
message:
|
|
446
|
+
message: `Response Validation Warnnings for application > User > deleteUser \n ${res_error}`,
|
|
432
447
|
});
|
|
433
|
-
Logger({ level: "WARN", message: res_error });
|
|
434
448
|
}
|
|
435
449
|
|
|
436
450
|
return response;
|
|
437
451
|
}
|
|
438
452
|
|
|
439
453
|
/**
|
|
440
|
-
* @param {
|
|
441
|
-
* @param {
|
|
442
|
-
* @returns {Promise<LoginSuccess>} - Success response
|
|
454
|
+
* @param {UserApplicationValidator.ForgotPasswordParam} arg - Arg object.
|
|
455
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
456
|
+
* @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
|
|
457
|
+
* @name forgotPassword
|
|
443
458
|
* @summary: Forgot Password
|
|
444
|
-
* @description: Use this API to reset a password using the code sent on email or SMS.
|
|
459
|
+
* @description: Use this API to reset a password using the code sent on email or SMS. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/forgotPassword/).
|
|
445
460
|
*/
|
|
446
|
-
async forgotPassword({ body } = {}) {
|
|
447
|
-
const { error } =
|
|
461
|
+
async forgotPassword({ body } = {}, { headers } = { headers: false }) {
|
|
462
|
+
const { error } = UserApplicationValidator.forgotPassword().validate(
|
|
448
463
|
{ body },
|
|
449
464
|
{ abortEarly: false, allowUnknown: true }
|
|
450
465
|
);
|
|
@@ -453,16 +468,17 @@ class User {
|
|
|
453
468
|
}
|
|
454
469
|
|
|
455
470
|
// Showing warrnings if extra unknown parameters are found
|
|
456
|
-
const {
|
|
471
|
+
const {
|
|
472
|
+
error: warrning,
|
|
473
|
+
} = UserApplicationValidator.forgotPassword().validate(
|
|
457
474
|
{ body },
|
|
458
475
|
{ abortEarly: false, allowUnknown: false }
|
|
459
476
|
);
|
|
460
477
|
if (warrning) {
|
|
461
478
|
Logger({
|
|
462
479
|
level: "WARN",
|
|
463
|
-
message:
|
|
480
|
+
message: `Parameter Validation warrnings for application > User > forgotPassword \n ${warrning}`,
|
|
464
481
|
});
|
|
465
|
-
Logger({ level: "WARN", message: warrning });
|
|
466
482
|
}
|
|
467
483
|
|
|
468
484
|
const query_params = {};
|
|
@@ -478,10 +494,18 @@ class User {
|
|
|
478
494
|
}),
|
|
479
495
|
query_params,
|
|
480
496
|
body,
|
|
481
|
-
xHeaders
|
|
497
|
+
xHeaders,
|
|
498
|
+
{ headers }
|
|
482
499
|
);
|
|
483
500
|
|
|
484
|
-
|
|
501
|
+
let responseData = response;
|
|
502
|
+
if (headers) {
|
|
503
|
+
responseData = response[0];
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
const {
|
|
507
|
+
error: res_error,
|
|
508
|
+
} = UserApplicationModel.LoginSuccess().validate(responseData, {
|
|
485
509
|
abortEarly: false,
|
|
486
510
|
allowUnknown: false,
|
|
487
511
|
});
|
|
@@ -489,22 +513,24 @@ class User {
|
|
|
489
513
|
if (res_error) {
|
|
490
514
|
Logger({
|
|
491
515
|
level: "WARN",
|
|
492
|
-
message:
|
|
516
|
+
message: `Response Validation Warnnings for application > User > forgotPassword \n ${res_error}`,
|
|
493
517
|
});
|
|
494
|
-
Logger({ level: "WARN", message: res_error });
|
|
495
518
|
}
|
|
496
519
|
|
|
497
520
|
return response;
|
|
498
521
|
}
|
|
499
522
|
|
|
500
523
|
/**
|
|
501
|
-
* @param {
|
|
502
|
-
* @returns {Promise<SessionListSuccess>} - Success response
|
|
524
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
525
|
+
* @returns {Promise<UserApplicationModel.SessionListSuccess>} - Success response
|
|
526
|
+
* @name getListOfActiveSessions
|
|
503
527
|
* @summary: Get list of sessions
|
|
504
|
-
* @description: Use this API to retrieve all active sessions of a user.
|
|
528
|
+
* @description: Use this API to retrieve all active sessions of a user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/getListOfActiveSessions/).
|
|
505
529
|
*/
|
|
506
|
-
async getListOfActiveSessions({} = {}) {
|
|
507
|
-
const {
|
|
530
|
+
async getListOfActiveSessions({ headers } = { headers: false }) {
|
|
531
|
+
const {
|
|
532
|
+
error,
|
|
533
|
+
} = UserApplicationValidator.getListOfActiveSessions().validate(
|
|
508
534
|
{},
|
|
509
535
|
{ abortEarly: false, allowUnknown: true }
|
|
510
536
|
);
|
|
@@ -515,16 +541,15 @@ class User {
|
|
|
515
541
|
// Showing warrnings if extra unknown parameters are found
|
|
516
542
|
const {
|
|
517
543
|
error: warrning,
|
|
518
|
-
} =
|
|
544
|
+
} = UserApplicationValidator.getListOfActiveSessions().validate(
|
|
519
545
|
{},
|
|
520
546
|
{ abortEarly: false, allowUnknown: false }
|
|
521
547
|
);
|
|
522
548
|
if (warrning) {
|
|
523
549
|
Logger({
|
|
524
550
|
level: "WARN",
|
|
525
|
-
message:
|
|
551
|
+
message: `Parameter Validation warrnings for application > User > getListOfActiveSessions \n ${warrning}`,
|
|
526
552
|
});
|
|
527
|
-
Logger({ level: "WARN", message: warrning });
|
|
528
553
|
}
|
|
529
554
|
|
|
530
555
|
const query_params = {};
|
|
@@ -540,12 +565,18 @@ class User {
|
|
|
540
565
|
}),
|
|
541
566
|
query_params,
|
|
542
567
|
undefined,
|
|
543
|
-
xHeaders
|
|
568
|
+
xHeaders,
|
|
569
|
+
{ headers }
|
|
544
570
|
);
|
|
545
571
|
|
|
572
|
+
let responseData = response;
|
|
573
|
+
if (headers) {
|
|
574
|
+
responseData = response[0];
|
|
575
|
+
}
|
|
576
|
+
|
|
546
577
|
const {
|
|
547
578
|
error: res_error,
|
|
548
|
-
} =
|
|
579
|
+
} = UserApplicationModel.SessionListSuccess().validate(responseData, {
|
|
549
580
|
abortEarly: false,
|
|
550
581
|
allowUnknown: false,
|
|
551
582
|
});
|
|
@@ -553,22 +584,22 @@ class User {
|
|
|
553
584
|
if (res_error) {
|
|
554
585
|
Logger({
|
|
555
586
|
level: "WARN",
|
|
556
|
-
message:
|
|
587
|
+
message: `Response Validation Warnnings for application > User > getListOfActiveSessions \n ${res_error}`,
|
|
557
588
|
});
|
|
558
|
-
Logger({ level: "WARN", message: res_error });
|
|
559
589
|
}
|
|
560
590
|
|
|
561
591
|
return response;
|
|
562
592
|
}
|
|
563
593
|
|
|
564
594
|
/**
|
|
565
|
-
* @param {
|
|
566
|
-
* @returns {Promise<UserObjectSchema>} - Success response
|
|
595
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
596
|
+
* @returns {Promise<UserApplicationModel.UserObjectSchema>} - Success response
|
|
597
|
+
* @name getLoggedInUser
|
|
567
598
|
* @summary: Get logged in user
|
|
568
|
-
* @description: Use this API to get the details of a logged in user.
|
|
599
|
+
* @description: Use this API to get the details of a logged in user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/getLoggedInUser/).
|
|
569
600
|
*/
|
|
570
|
-
async getLoggedInUser({} = {}) {
|
|
571
|
-
const { error } =
|
|
601
|
+
async getLoggedInUser({ headers } = { headers: false }) {
|
|
602
|
+
const { error } = UserApplicationValidator.getLoggedInUser().validate(
|
|
572
603
|
{},
|
|
573
604
|
{ abortEarly: false, allowUnknown: true }
|
|
574
605
|
);
|
|
@@ -577,16 +608,17 @@ class User {
|
|
|
577
608
|
}
|
|
578
609
|
|
|
579
610
|
// Showing warrnings if extra unknown parameters are found
|
|
580
|
-
const {
|
|
611
|
+
const {
|
|
612
|
+
error: warrning,
|
|
613
|
+
} = UserApplicationValidator.getLoggedInUser().validate(
|
|
581
614
|
{},
|
|
582
615
|
{ abortEarly: false, allowUnknown: false }
|
|
583
616
|
);
|
|
584
617
|
if (warrning) {
|
|
585
618
|
Logger({
|
|
586
619
|
level: "WARN",
|
|
587
|
-
message:
|
|
620
|
+
message: `Parameter Validation warrnings for application > User > getLoggedInUser \n ${warrning}`,
|
|
588
621
|
});
|
|
589
|
-
Logger({ level: "WARN", message: warrning });
|
|
590
622
|
}
|
|
591
623
|
|
|
592
624
|
const query_params = {};
|
|
@@ -602,34 +634,42 @@ class User {
|
|
|
602
634
|
}),
|
|
603
635
|
query_params,
|
|
604
636
|
undefined,
|
|
605
|
-
xHeaders
|
|
637
|
+
xHeaders,
|
|
638
|
+
{ headers }
|
|
606
639
|
);
|
|
607
640
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
641
|
+
let responseData = response;
|
|
642
|
+
if (headers) {
|
|
643
|
+
responseData = response[0];
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
const {
|
|
647
|
+
error: res_error,
|
|
648
|
+
} = UserApplicationModel.UserObjectSchema().validate(responseData, {
|
|
649
|
+
abortEarly: false,
|
|
650
|
+
allowUnknown: false,
|
|
651
|
+
});
|
|
612
652
|
|
|
613
653
|
if (res_error) {
|
|
614
654
|
Logger({
|
|
615
655
|
level: "WARN",
|
|
616
|
-
message:
|
|
656
|
+
message: `Response Validation Warnnings for application > User > getLoggedInUser \n ${res_error}`,
|
|
617
657
|
});
|
|
618
|
-
Logger({ level: "WARN", message: res_error });
|
|
619
658
|
}
|
|
620
659
|
|
|
621
660
|
return response;
|
|
622
661
|
}
|
|
623
662
|
|
|
624
663
|
/**
|
|
625
|
-
* @param {
|
|
626
|
-
* @param {
|
|
627
|
-
* @returns {Promise<PlatformSchema>} - Success response
|
|
664
|
+
* @param {UserApplicationValidator.GetPlatformConfigParam} arg - Arg object.
|
|
665
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
666
|
+
* @returns {Promise<UserApplicationModel.PlatformSchema>} - Success response
|
|
667
|
+
* @name getPlatformConfig
|
|
628
668
|
* @summary: Get platform configurations
|
|
629
|
-
* @description: Use this API to get all the platform configurations such as mobile image, desktop image, social logins, and all other text.
|
|
669
|
+
* @description: Use this API to get all the platform configurations such as mobile image, desktop image, social logins, and all other text. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/getPlatformConfig/).
|
|
630
670
|
*/
|
|
631
|
-
async getPlatformConfig({ name } = {}) {
|
|
632
|
-
const { error } =
|
|
671
|
+
async getPlatformConfig({ name } = {}, { headers } = { headers: false }) {
|
|
672
|
+
const { error } = UserApplicationValidator.getPlatformConfig().validate(
|
|
633
673
|
{ name },
|
|
634
674
|
{ abortEarly: false, allowUnknown: true }
|
|
635
675
|
);
|
|
@@ -638,16 +678,17 @@ class User {
|
|
|
638
678
|
}
|
|
639
679
|
|
|
640
680
|
// Showing warrnings if extra unknown parameters are found
|
|
641
|
-
const {
|
|
681
|
+
const {
|
|
682
|
+
error: warrning,
|
|
683
|
+
} = UserApplicationValidator.getPlatformConfig().validate(
|
|
642
684
|
{ name },
|
|
643
685
|
{ abortEarly: false, allowUnknown: false }
|
|
644
686
|
);
|
|
645
687
|
if (warrning) {
|
|
646
688
|
Logger({
|
|
647
689
|
level: "WARN",
|
|
648
|
-
message:
|
|
690
|
+
message: `Parameter Validation warrnings for application > User > getPlatformConfig \n ${warrning}`,
|
|
649
691
|
});
|
|
650
|
-
Logger({ level: "WARN", message: warrning });
|
|
651
692
|
}
|
|
652
693
|
|
|
653
694
|
const query_params = {};
|
|
@@ -664,10 +705,18 @@ class User {
|
|
|
664
705
|
}),
|
|
665
706
|
query_params,
|
|
666
707
|
undefined,
|
|
667
|
-
xHeaders
|
|
708
|
+
xHeaders,
|
|
709
|
+
{ headers }
|
|
668
710
|
);
|
|
669
711
|
|
|
670
|
-
|
|
712
|
+
let responseData = response;
|
|
713
|
+
if (headers) {
|
|
714
|
+
responseData = response[0];
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
const {
|
|
718
|
+
error: res_error,
|
|
719
|
+
} = UserApplicationModel.PlatformSchema().validate(responseData, {
|
|
671
720
|
abortEarly: false,
|
|
672
721
|
allowUnknown: false,
|
|
673
722
|
});
|
|
@@ -675,22 +724,22 @@ class User {
|
|
|
675
724
|
if (res_error) {
|
|
676
725
|
Logger({
|
|
677
726
|
level: "WARN",
|
|
678
|
-
message:
|
|
727
|
+
message: `Response Validation Warnnings for application > User > getPlatformConfig \n ${res_error}`,
|
|
679
728
|
});
|
|
680
|
-
Logger({ level: "WARN", message: res_error });
|
|
681
729
|
}
|
|
682
730
|
|
|
683
731
|
return response;
|
|
684
732
|
}
|
|
685
733
|
|
|
686
734
|
/**
|
|
687
|
-
* @param {
|
|
688
|
-
* @returns {Promise<HasPasswordSuccess>} - Success response
|
|
735
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
736
|
+
* @returns {Promise<UserApplicationModel.HasPasswordSuccess>} - Success response
|
|
737
|
+
* @name hasPassword
|
|
689
738
|
* @summary: Check password
|
|
690
|
-
* @description: Use this API to check if user has created a password for login.
|
|
739
|
+
* @description: Use this API to check if user has created a password for login. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/hasPassword/).
|
|
691
740
|
*/
|
|
692
|
-
async hasPassword({} = {}) {
|
|
693
|
-
const { error } =
|
|
741
|
+
async hasPassword({ headers } = { headers: false }) {
|
|
742
|
+
const { error } = UserApplicationValidator.hasPassword().validate(
|
|
694
743
|
{},
|
|
695
744
|
{ abortEarly: false, allowUnknown: true }
|
|
696
745
|
);
|
|
@@ -699,16 +748,15 @@ class User {
|
|
|
699
748
|
}
|
|
700
749
|
|
|
701
750
|
// Showing warrnings if extra unknown parameters are found
|
|
702
|
-
const { error: warrning } =
|
|
751
|
+
const { error: warrning } = UserApplicationValidator.hasPassword().validate(
|
|
703
752
|
{},
|
|
704
753
|
{ abortEarly: false, allowUnknown: false }
|
|
705
754
|
);
|
|
706
755
|
if (warrning) {
|
|
707
756
|
Logger({
|
|
708
757
|
level: "WARN",
|
|
709
|
-
message:
|
|
758
|
+
message: `Parameter Validation warrnings for application > User > hasPassword \n ${warrning}`,
|
|
710
759
|
});
|
|
711
|
-
Logger({ level: "WARN", message: warrning });
|
|
712
760
|
}
|
|
713
761
|
|
|
714
762
|
const query_params = {};
|
|
@@ -724,12 +772,18 @@ class User {
|
|
|
724
772
|
}),
|
|
725
773
|
query_params,
|
|
726
774
|
undefined,
|
|
727
|
-
xHeaders
|
|
775
|
+
xHeaders,
|
|
776
|
+
{ headers }
|
|
728
777
|
);
|
|
729
778
|
|
|
779
|
+
let responseData = response;
|
|
780
|
+
if (headers) {
|
|
781
|
+
responseData = response[0];
|
|
782
|
+
}
|
|
783
|
+
|
|
730
784
|
const {
|
|
731
785
|
error: res_error,
|
|
732
|
-
} =
|
|
786
|
+
} = UserApplicationModel.HasPasswordSuccess().validate(responseData, {
|
|
733
787
|
abortEarly: false,
|
|
734
788
|
allowUnknown: false,
|
|
735
789
|
});
|
|
@@ -737,24 +791,26 @@ class User {
|
|
|
737
791
|
if (res_error) {
|
|
738
792
|
Logger({
|
|
739
793
|
level: "WARN",
|
|
740
|
-
message:
|
|
794
|
+
message: `Response Validation Warnnings for application > User > hasPassword \n ${res_error}`,
|
|
741
795
|
});
|
|
742
|
-
Logger({ level: "WARN", message: res_error });
|
|
743
796
|
}
|
|
744
797
|
|
|
745
798
|
return response;
|
|
746
799
|
}
|
|
747
800
|
|
|
748
801
|
/**
|
|
749
|
-
* @param {
|
|
750
|
-
* @param {
|
|
751
|
-
* @
|
|
752
|
-
* @
|
|
802
|
+
* @param {UserApplicationValidator.LoginWithAppleIOSParam} arg - Arg object.
|
|
803
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
804
|
+
* @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
|
|
805
|
+
* @name loginWithAppleIOS
|
|
753
806
|
* @summary: Login or Register using Apple on iOS
|
|
754
|
-
* @description: Use this API to login or register in iOS app using Apple Account credentials.
|
|
807
|
+
* @description: Use this API to login or register in iOS app using Apple Account credentials. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithAppleIOS/).
|
|
755
808
|
*/
|
|
756
|
-
async loginWithAppleIOS(
|
|
757
|
-
|
|
809
|
+
async loginWithAppleIOS(
|
|
810
|
+
{ body, platform } = {},
|
|
811
|
+
{ headers } = { headers: false }
|
|
812
|
+
) {
|
|
813
|
+
const { error } = UserApplicationValidator.loginWithAppleIOS().validate(
|
|
758
814
|
{ body, platform },
|
|
759
815
|
{ abortEarly: false, allowUnknown: true }
|
|
760
816
|
);
|
|
@@ -763,16 +819,17 @@ class User {
|
|
|
763
819
|
}
|
|
764
820
|
|
|
765
821
|
// Showing warrnings if extra unknown parameters are found
|
|
766
|
-
const {
|
|
822
|
+
const {
|
|
823
|
+
error: warrning,
|
|
824
|
+
} = UserApplicationValidator.loginWithAppleIOS().validate(
|
|
767
825
|
{ body, platform },
|
|
768
826
|
{ abortEarly: false, allowUnknown: false }
|
|
769
827
|
);
|
|
770
828
|
if (warrning) {
|
|
771
829
|
Logger({
|
|
772
830
|
level: "WARN",
|
|
773
|
-
message:
|
|
831
|
+
message: `Parameter Validation warrnings for application > User > loginWithAppleIOS \n ${warrning}`,
|
|
774
832
|
});
|
|
775
|
-
Logger({ level: "WARN", message: warrning });
|
|
776
833
|
}
|
|
777
834
|
|
|
778
835
|
const query_params = {};
|
|
@@ -789,10 +846,18 @@ class User {
|
|
|
789
846
|
}),
|
|
790
847
|
query_params,
|
|
791
848
|
body,
|
|
792
|
-
xHeaders
|
|
849
|
+
xHeaders,
|
|
850
|
+
{ headers }
|
|
793
851
|
);
|
|
794
852
|
|
|
795
|
-
|
|
853
|
+
let responseData = response;
|
|
854
|
+
if (headers) {
|
|
855
|
+
responseData = response[0];
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
const {
|
|
859
|
+
error: res_error,
|
|
860
|
+
} = UserApplicationModel.AuthSuccess().validate(responseData, {
|
|
796
861
|
abortEarly: false,
|
|
797
862
|
allowUnknown: false,
|
|
798
863
|
});
|
|
@@ -800,23 +865,28 @@ class User {
|
|
|
800
865
|
if (res_error) {
|
|
801
866
|
Logger({
|
|
802
867
|
level: "WARN",
|
|
803
|
-
message:
|
|
868
|
+
message: `Response Validation Warnnings for application > User > loginWithAppleIOS \n ${res_error}`,
|
|
804
869
|
});
|
|
805
|
-
Logger({ level: "WARN", message: res_error });
|
|
806
870
|
}
|
|
807
871
|
|
|
808
872
|
return response;
|
|
809
873
|
}
|
|
810
874
|
|
|
811
875
|
/**
|
|
812
|
-
* @param {
|
|
813
|
-
* @param {
|
|
814
|
-
* @returns {Promise<LoginSuccess>} - Success response
|
|
876
|
+
* @param {UserApplicationValidator.LoginWithEmailAndPasswordParam} arg - Arg object.
|
|
877
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
878
|
+
* @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
|
|
879
|
+
* @name loginWithEmailAndPassword
|
|
815
880
|
* @summary: Login or Register with password
|
|
816
|
-
* @description: Use this API to login or register using an email address and password.
|
|
881
|
+
* @description: Use this API to login or register using an email address and password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithEmailAndPassword/).
|
|
817
882
|
*/
|
|
818
|
-
async loginWithEmailAndPassword(
|
|
819
|
-
|
|
883
|
+
async loginWithEmailAndPassword(
|
|
884
|
+
{ body } = {},
|
|
885
|
+
{ headers } = { headers: false }
|
|
886
|
+
) {
|
|
887
|
+
const {
|
|
888
|
+
error,
|
|
889
|
+
} = UserApplicationValidator.loginWithEmailAndPassword().validate(
|
|
820
890
|
{ body },
|
|
821
891
|
{ abortEarly: false, allowUnknown: true }
|
|
822
892
|
);
|
|
@@ -827,16 +897,15 @@ class User {
|
|
|
827
897
|
// Showing warrnings if extra unknown parameters are found
|
|
828
898
|
const {
|
|
829
899
|
error: warrning,
|
|
830
|
-
} =
|
|
900
|
+
} = UserApplicationValidator.loginWithEmailAndPassword().validate(
|
|
831
901
|
{ body },
|
|
832
902
|
{ abortEarly: false, allowUnknown: false }
|
|
833
903
|
);
|
|
834
904
|
if (warrning) {
|
|
835
905
|
Logger({
|
|
836
906
|
level: "WARN",
|
|
837
|
-
message:
|
|
907
|
+
message: `Parameter Validation warrnings for application > User > loginWithEmailAndPassword \n ${warrning}`,
|
|
838
908
|
});
|
|
839
|
-
Logger({ level: "WARN", message: warrning });
|
|
840
909
|
}
|
|
841
910
|
|
|
842
911
|
const query_params = {};
|
|
@@ -852,10 +921,18 @@ class User {
|
|
|
852
921
|
}),
|
|
853
922
|
query_params,
|
|
854
923
|
body,
|
|
855
|
-
xHeaders
|
|
924
|
+
xHeaders,
|
|
925
|
+
{ headers }
|
|
856
926
|
);
|
|
857
927
|
|
|
858
|
-
|
|
928
|
+
let responseData = response;
|
|
929
|
+
if (headers) {
|
|
930
|
+
responseData = response[0];
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
const {
|
|
934
|
+
error: res_error,
|
|
935
|
+
} = UserApplicationModel.LoginSuccess().validate(responseData, {
|
|
859
936
|
abortEarly: false,
|
|
860
937
|
allowUnknown: false,
|
|
861
938
|
});
|
|
@@ -863,24 +940,26 @@ class User {
|
|
|
863
940
|
if (res_error) {
|
|
864
941
|
Logger({
|
|
865
942
|
level: "WARN",
|
|
866
|
-
message:
|
|
943
|
+
message: `Response Validation Warnnings for application > User > loginWithEmailAndPassword \n ${res_error}`,
|
|
867
944
|
});
|
|
868
|
-
Logger({ level: "WARN", message: res_error });
|
|
869
945
|
}
|
|
870
946
|
|
|
871
947
|
return response;
|
|
872
948
|
}
|
|
873
949
|
|
|
874
950
|
/**
|
|
875
|
-
* @param {
|
|
876
|
-
* @param {
|
|
877
|
-
* @
|
|
878
|
-
* @
|
|
951
|
+
* @param {UserApplicationValidator.LoginWithFacebookParam} arg - Arg object.
|
|
952
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
953
|
+
* @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
|
|
954
|
+
* @name loginWithFacebook
|
|
879
955
|
* @summary: Login or Register using Facebook
|
|
880
|
-
* @description: Use this API to login or register using Facebook credentials.
|
|
956
|
+
* @description: Use this API to login or register using Facebook credentials. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithFacebook/).
|
|
881
957
|
*/
|
|
882
|
-
async loginWithFacebook(
|
|
883
|
-
|
|
958
|
+
async loginWithFacebook(
|
|
959
|
+
{ body, platform } = {},
|
|
960
|
+
{ headers } = { headers: false }
|
|
961
|
+
) {
|
|
962
|
+
const { error } = UserApplicationValidator.loginWithFacebook().validate(
|
|
884
963
|
{ body, platform },
|
|
885
964
|
{ abortEarly: false, allowUnknown: true }
|
|
886
965
|
);
|
|
@@ -889,16 +968,17 @@ class User {
|
|
|
889
968
|
}
|
|
890
969
|
|
|
891
970
|
// Showing warrnings if extra unknown parameters are found
|
|
892
|
-
const {
|
|
971
|
+
const {
|
|
972
|
+
error: warrning,
|
|
973
|
+
} = UserApplicationValidator.loginWithFacebook().validate(
|
|
893
974
|
{ body, platform },
|
|
894
975
|
{ abortEarly: false, allowUnknown: false }
|
|
895
976
|
);
|
|
896
977
|
if (warrning) {
|
|
897
978
|
Logger({
|
|
898
979
|
level: "WARN",
|
|
899
|
-
message:
|
|
980
|
+
message: `Parameter Validation warrnings for application > User > loginWithFacebook \n ${warrning}`,
|
|
900
981
|
});
|
|
901
|
-
Logger({ level: "WARN", message: warrning });
|
|
902
982
|
}
|
|
903
983
|
|
|
904
984
|
const query_params = {};
|
|
@@ -915,10 +995,18 @@ class User {
|
|
|
915
995
|
}),
|
|
916
996
|
query_params,
|
|
917
997
|
body,
|
|
918
|
-
xHeaders
|
|
998
|
+
xHeaders,
|
|
999
|
+
{ headers }
|
|
919
1000
|
);
|
|
920
1001
|
|
|
921
|
-
|
|
1002
|
+
let responseData = response;
|
|
1003
|
+
if (headers) {
|
|
1004
|
+
responseData = response[0];
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
const {
|
|
1008
|
+
error: res_error,
|
|
1009
|
+
} = UserApplicationModel.AuthSuccess().validate(responseData, {
|
|
922
1010
|
abortEarly: false,
|
|
923
1011
|
allowUnknown: false,
|
|
924
1012
|
});
|
|
@@ -926,24 +1014,26 @@ class User {
|
|
|
926
1014
|
if (res_error) {
|
|
927
1015
|
Logger({
|
|
928
1016
|
level: "WARN",
|
|
929
|
-
message:
|
|
1017
|
+
message: `Response Validation Warnnings for application > User > loginWithFacebook \n ${res_error}`,
|
|
930
1018
|
});
|
|
931
|
-
Logger({ level: "WARN", message: res_error });
|
|
932
1019
|
}
|
|
933
1020
|
|
|
934
1021
|
return response;
|
|
935
1022
|
}
|
|
936
1023
|
|
|
937
1024
|
/**
|
|
938
|
-
* @param {
|
|
939
|
-
* @param {
|
|
940
|
-
* @
|
|
941
|
-
* @
|
|
1025
|
+
* @param {UserApplicationValidator.LoginWithGoogleParam} arg - Arg object.
|
|
1026
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1027
|
+
* @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
|
|
1028
|
+
* @name loginWithGoogle
|
|
942
1029
|
* @summary: Login or Register using Google
|
|
943
|
-
* @description: Use this API to login or register using Google Account credentials.
|
|
1030
|
+
* @description: Use this API to login or register using Google Account credentials. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithGoogle/).
|
|
944
1031
|
*/
|
|
945
|
-
async loginWithGoogle(
|
|
946
|
-
|
|
1032
|
+
async loginWithGoogle(
|
|
1033
|
+
{ body, platform } = {},
|
|
1034
|
+
{ headers } = { headers: false }
|
|
1035
|
+
) {
|
|
1036
|
+
const { error } = UserApplicationValidator.loginWithGoogle().validate(
|
|
947
1037
|
{ body, platform },
|
|
948
1038
|
{ abortEarly: false, allowUnknown: true }
|
|
949
1039
|
);
|
|
@@ -952,16 +1042,17 @@ class User {
|
|
|
952
1042
|
}
|
|
953
1043
|
|
|
954
1044
|
// Showing warrnings if extra unknown parameters are found
|
|
955
|
-
const {
|
|
1045
|
+
const {
|
|
1046
|
+
error: warrning,
|
|
1047
|
+
} = UserApplicationValidator.loginWithGoogle().validate(
|
|
956
1048
|
{ body, platform },
|
|
957
1049
|
{ abortEarly: false, allowUnknown: false }
|
|
958
1050
|
);
|
|
959
1051
|
if (warrning) {
|
|
960
1052
|
Logger({
|
|
961
1053
|
level: "WARN",
|
|
962
|
-
message:
|
|
1054
|
+
message: `Parameter Validation warrnings for application > User > loginWithGoogle \n ${warrning}`,
|
|
963
1055
|
});
|
|
964
|
-
Logger({ level: "WARN", message: warrning });
|
|
965
1056
|
}
|
|
966
1057
|
|
|
967
1058
|
const query_params = {};
|
|
@@ -978,10 +1069,18 @@ class User {
|
|
|
978
1069
|
}),
|
|
979
1070
|
query_params,
|
|
980
1071
|
body,
|
|
981
|
-
xHeaders
|
|
1072
|
+
xHeaders,
|
|
1073
|
+
{ headers }
|
|
982
1074
|
);
|
|
983
1075
|
|
|
984
|
-
|
|
1076
|
+
let responseData = response;
|
|
1077
|
+
if (headers) {
|
|
1078
|
+
responseData = response[0];
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
const {
|
|
1082
|
+
error: res_error,
|
|
1083
|
+
} = UserApplicationModel.AuthSuccess().validate(responseData, {
|
|
985
1084
|
abortEarly: false,
|
|
986
1085
|
allowUnknown: false,
|
|
987
1086
|
});
|
|
@@ -989,24 +1088,28 @@ class User {
|
|
|
989
1088
|
if (res_error) {
|
|
990
1089
|
Logger({
|
|
991
1090
|
level: "WARN",
|
|
992
|
-
message:
|
|
1091
|
+
message: `Response Validation Warnnings for application > User > loginWithGoogle \n ${res_error}`,
|
|
993
1092
|
});
|
|
994
|
-
Logger({ level: "WARN", message: res_error });
|
|
995
1093
|
}
|
|
996
1094
|
|
|
997
1095
|
return response;
|
|
998
1096
|
}
|
|
999
1097
|
|
|
1000
1098
|
/**
|
|
1001
|
-
* @param {
|
|
1002
|
-
* @param {
|
|
1003
|
-
* @
|
|
1004
|
-
* @
|
|
1099
|
+
* @param {UserApplicationValidator.LoginWithGoogleAndroidParam} arg - Arg object.
|
|
1100
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1101
|
+
* @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
|
|
1102
|
+
* @name loginWithGoogleAndroid
|
|
1005
1103
|
* @summary: Login or Register using Google on Android
|
|
1006
|
-
* @description: Use this API to login or register in Android app using Google Account credentials.
|
|
1104
|
+
* @description: Use this API to login or register in Android app using Google Account credentials. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithGoogleAndroid/).
|
|
1007
1105
|
*/
|
|
1008
|
-
async loginWithGoogleAndroid(
|
|
1009
|
-
|
|
1106
|
+
async loginWithGoogleAndroid(
|
|
1107
|
+
{ body, platform } = {},
|
|
1108
|
+
{ headers } = { headers: false }
|
|
1109
|
+
) {
|
|
1110
|
+
const {
|
|
1111
|
+
error,
|
|
1112
|
+
} = UserApplicationValidator.loginWithGoogleAndroid().validate(
|
|
1010
1113
|
{ body, platform },
|
|
1011
1114
|
{ abortEarly: false, allowUnknown: true }
|
|
1012
1115
|
);
|
|
@@ -1015,16 +1118,17 @@ class User {
|
|
|
1015
1118
|
}
|
|
1016
1119
|
|
|
1017
1120
|
// Showing warrnings if extra unknown parameters are found
|
|
1018
|
-
const {
|
|
1121
|
+
const {
|
|
1122
|
+
error: warrning,
|
|
1123
|
+
} = UserApplicationValidator.loginWithGoogleAndroid().validate(
|
|
1019
1124
|
{ body, platform },
|
|
1020
1125
|
{ abortEarly: false, allowUnknown: false }
|
|
1021
1126
|
);
|
|
1022
1127
|
if (warrning) {
|
|
1023
1128
|
Logger({
|
|
1024
1129
|
level: "WARN",
|
|
1025
|
-
message:
|
|
1130
|
+
message: `Parameter Validation warrnings for application > User > loginWithGoogleAndroid \n ${warrning}`,
|
|
1026
1131
|
});
|
|
1027
|
-
Logger({ level: "WARN", message: warrning });
|
|
1028
1132
|
}
|
|
1029
1133
|
|
|
1030
1134
|
const query_params = {};
|
|
@@ -1041,10 +1145,18 @@ class User {
|
|
|
1041
1145
|
}),
|
|
1042
1146
|
query_params,
|
|
1043
1147
|
body,
|
|
1044
|
-
xHeaders
|
|
1148
|
+
xHeaders,
|
|
1149
|
+
{ headers }
|
|
1045
1150
|
);
|
|
1046
1151
|
|
|
1047
|
-
|
|
1152
|
+
let responseData = response;
|
|
1153
|
+
if (headers) {
|
|
1154
|
+
responseData = response[0];
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
const {
|
|
1158
|
+
error: res_error,
|
|
1159
|
+
} = UserApplicationModel.AuthSuccess().validate(responseData, {
|
|
1048
1160
|
abortEarly: false,
|
|
1049
1161
|
allowUnknown: false,
|
|
1050
1162
|
});
|
|
@@ -1052,24 +1164,26 @@ class User {
|
|
|
1052
1164
|
if (res_error) {
|
|
1053
1165
|
Logger({
|
|
1054
1166
|
level: "WARN",
|
|
1055
|
-
message:
|
|
1167
|
+
message: `Response Validation Warnnings for application > User > loginWithGoogleAndroid \n ${res_error}`,
|
|
1056
1168
|
});
|
|
1057
|
-
Logger({ level: "WARN", message: res_error });
|
|
1058
1169
|
}
|
|
1059
1170
|
|
|
1060
1171
|
return response;
|
|
1061
1172
|
}
|
|
1062
1173
|
|
|
1063
1174
|
/**
|
|
1064
|
-
* @param {
|
|
1065
|
-
* @param {
|
|
1066
|
-
* @
|
|
1067
|
-
* @
|
|
1175
|
+
* @param {UserApplicationValidator.LoginWithGoogleIOSParam} arg - Arg object.
|
|
1176
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1177
|
+
* @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
|
|
1178
|
+
* @name loginWithGoogleIOS
|
|
1068
1179
|
* @summary: Login or Register using Google on iOS
|
|
1069
|
-
* @description: Use this API to login or register in iOS app using Google Account credentials.
|
|
1180
|
+
* @description: Use this API to login or register in iOS app using Google Account credentials. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithGoogleIOS/).
|
|
1070
1181
|
*/
|
|
1071
|
-
async loginWithGoogleIOS(
|
|
1072
|
-
|
|
1182
|
+
async loginWithGoogleIOS(
|
|
1183
|
+
{ body, platform } = {},
|
|
1184
|
+
{ headers } = { headers: false }
|
|
1185
|
+
) {
|
|
1186
|
+
const { error } = UserApplicationValidator.loginWithGoogleIOS().validate(
|
|
1073
1187
|
{ body, platform },
|
|
1074
1188
|
{ abortEarly: false, allowUnknown: true }
|
|
1075
1189
|
);
|
|
@@ -1078,16 +1192,17 @@ class User {
|
|
|
1078
1192
|
}
|
|
1079
1193
|
|
|
1080
1194
|
// Showing warrnings if extra unknown parameters are found
|
|
1081
|
-
const {
|
|
1195
|
+
const {
|
|
1196
|
+
error: warrning,
|
|
1197
|
+
} = UserApplicationValidator.loginWithGoogleIOS().validate(
|
|
1082
1198
|
{ body, platform },
|
|
1083
1199
|
{ abortEarly: false, allowUnknown: false }
|
|
1084
1200
|
);
|
|
1085
1201
|
if (warrning) {
|
|
1086
1202
|
Logger({
|
|
1087
1203
|
level: "WARN",
|
|
1088
|
-
message:
|
|
1204
|
+
message: `Parameter Validation warrnings for application > User > loginWithGoogleIOS \n ${warrning}`,
|
|
1089
1205
|
});
|
|
1090
|
-
Logger({ level: "WARN", message: warrning });
|
|
1091
1206
|
}
|
|
1092
1207
|
|
|
1093
1208
|
const query_params = {};
|
|
@@ -1104,10 +1219,18 @@ class User {
|
|
|
1104
1219
|
}),
|
|
1105
1220
|
query_params,
|
|
1106
1221
|
body,
|
|
1107
|
-
xHeaders
|
|
1222
|
+
xHeaders,
|
|
1223
|
+
{ headers }
|
|
1108
1224
|
);
|
|
1109
1225
|
|
|
1110
|
-
|
|
1226
|
+
let responseData = response;
|
|
1227
|
+
if (headers) {
|
|
1228
|
+
responseData = response[0];
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
const {
|
|
1232
|
+
error: res_error,
|
|
1233
|
+
} = UserApplicationModel.AuthSuccess().validate(responseData, {
|
|
1111
1234
|
abortEarly: false,
|
|
1112
1235
|
allowUnknown: false,
|
|
1113
1236
|
});
|
|
@@ -1115,24 +1238,26 @@ class User {
|
|
|
1115
1238
|
if (res_error) {
|
|
1116
1239
|
Logger({
|
|
1117
1240
|
level: "WARN",
|
|
1118
|
-
message:
|
|
1241
|
+
message: `Response Validation Warnnings for application > User > loginWithGoogleIOS \n ${res_error}`,
|
|
1119
1242
|
});
|
|
1120
|
-
Logger({ level: "WARN", message: res_error });
|
|
1121
1243
|
}
|
|
1122
1244
|
|
|
1123
1245
|
return response;
|
|
1124
1246
|
}
|
|
1125
1247
|
|
|
1126
1248
|
/**
|
|
1127
|
-
* @param {
|
|
1128
|
-
* @param {
|
|
1129
|
-
* @
|
|
1130
|
-
* @
|
|
1249
|
+
* @param {UserApplicationValidator.LoginWithOTPParam} arg - Arg object.
|
|
1250
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1251
|
+
* @returns {Promise<UserApplicationModel.SendOtpResponse>} - Success response
|
|
1252
|
+
* @name loginWithOTP
|
|
1131
1253
|
* @summary: Login or Register with OTP
|
|
1132
|
-
* @description: Use this API to login or register with a One-time Password (OTP) sent via Email or SMS.
|
|
1254
|
+
* @description: Use this API to login or register with a One-time Password (OTP) sent via Email or SMS. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithOTP/).
|
|
1133
1255
|
*/
|
|
1134
|
-
async loginWithOTP(
|
|
1135
|
-
|
|
1256
|
+
async loginWithOTP(
|
|
1257
|
+
{ body, platform } = {},
|
|
1258
|
+
{ headers } = { headers: false }
|
|
1259
|
+
) {
|
|
1260
|
+
const { error } = UserApplicationValidator.loginWithOTP().validate(
|
|
1136
1261
|
{ body, platform },
|
|
1137
1262
|
{ abortEarly: false, allowUnknown: true }
|
|
1138
1263
|
);
|
|
@@ -1141,16 +1266,17 @@ class User {
|
|
|
1141
1266
|
}
|
|
1142
1267
|
|
|
1143
1268
|
// Showing warrnings if extra unknown parameters are found
|
|
1144
|
-
const {
|
|
1269
|
+
const {
|
|
1270
|
+
error: warrning,
|
|
1271
|
+
} = UserApplicationValidator.loginWithOTP().validate(
|
|
1145
1272
|
{ body, platform },
|
|
1146
1273
|
{ abortEarly: false, allowUnknown: false }
|
|
1147
1274
|
);
|
|
1148
1275
|
if (warrning) {
|
|
1149
1276
|
Logger({
|
|
1150
1277
|
level: "WARN",
|
|
1151
|
-
message:
|
|
1278
|
+
message: `Parameter Validation warrnings for application > User > loginWithOTP \n ${warrning}`,
|
|
1152
1279
|
});
|
|
1153
|
-
Logger({ level: "WARN", message: warrning });
|
|
1154
1280
|
}
|
|
1155
1281
|
|
|
1156
1282
|
const query_params = {};
|
|
@@ -1167,34 +1293,42 @@ class User {
|
|
|
1167
1293
|
}),
|
|
1168
1294
|
query_params,
|
|
1169
1295
|
body,
|
|
1170
|
-
xHeaders
|
|
1296
|
+
xHeaders,
|
|
1297
|
+
{ headers }
|
|
1171
1298
|
);
|
|
1172
1299
|
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1300
|
+
let responseData = response;
|
|
1301
|
+
if (headers) {
|
|
1302
|
+
responseData = response[0];
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
const {
|
|
1306
|
+
error: res_error,
|
|
1307
|
+
} = UserApplicationModel.SendOtpResponse().validate(responseData, {
|
|
1308
|
+
abortEarly: false,
|
|
1309
|
+
allowUnknown: false,
|
|
1310
|
+
});
|
|
1177
1311
|
|
|
1178
1312
|
if (res_error) {
|
|
1179
1313
|
Logger({
|
|
1180
1314
|
level: "WARN",
|
|
1181
|
-
message:
|
|
1315
|
+
message: `Response Validation Warnnings for application > User > loginWithOTP \n ${res_error}`,
|
|
1182
1316
|
});
|
|
1183
|
-
Logger({ level: "WARN", message: res_error });
|
|
1184
1317
|
}
|
|
1185
1318
|
|
|
1186
1319
|
return response;
|
|
1187
1320
|
}
|
|
1188
1321
|
|
|
1189
1322
|
/**
|
|
1190
|
-
* @param {
|
|
1191
|
-
* @param {
|
|
1192
|
-
* @returns {Promise<LoginSuccess>} - Success response
|
|
1323
|
+
* @param {UserApplicationValidator.LoginWithTokenParam} arg - Arg object.
|
|
1324
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1325
|
+
* @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
|
|
1326
|
+
* @name loginWithToken
|
|
1193
1327
|
* @summary: Login or Register with token
|
|
1194
|
-
* @description: Use this API to login or register using a token for authentication.
|
|
1328
|
+
* @description: Use this API to login or register using a token for authentication. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithToken/).
|
|
1195
1329
|
*/
|
|
1196
|
-
async loginWithToken({ body } = {}) {
|
|
1197
|
-
const { error } =
|
|
1330
|
+
async loginWithToken({ body } = {}, { headers } = { headers: false }) {
|
|
1331
|
+
const { error } = UserApplicationValidator.loginWithToken().validate(
|
|
1198
1332
|
{ body },
|
|
1199
1333
|
{ abortEarly: false, allowUnknown: true }
|
|
1200
1334
|
);
|
|
@@ -1203,16 +1337,17 @@ class User {
|
|
|
1203
1337
|
}
|
|
1204
1338
|
|
|
1205
1339
|
// Showing warrnings if extra unknown parameters are found
|
|
1206
|
-
const {
|
|
1340
|
+
const {
|
|
1341
|
+
error: warrning,
|
|
1342
|
+
} = UserApplicationValidator.loginWithToken().validate(
|
|
1207
1343
|
{ body },
|
|
1208
1344
|
{ abortEarly: false, allowUnknown: false }
|
|
1209
1345
|
);
|
|
1210
1346
|
if (warrning) {
|
|
1211
1347
|
Logger({
|
|
1212
1348
|
level: "WARN",
|
|
1213
|
-
message:
|
|
1349
|
+
message: `Parameter Validation warrnings for application > User > loginWithToken \n ${warrning}`,
|
|
1214
1350
|
});
|
|
1215
|
-
Logger({ level: "WARN", message: warrning });
|
|
1216
1351
|
}
|
|
1217
1352
|
|
|
1218
1353
|
const query_params = {};
|
|
@@ -1228,10 +1363,18 @@ class User {
|
|
|
1228
1363
|
}),
|
|
1229
1364
|
query_params,
|
|
1230
1365
|
body,
|
|
1231
|
-
xHeaders
|
|
1366
|
+
xHeaders,
|
|
1367
|
+
{ headers }
|
|
1232
1368
|
);
|
|
1233
1369
|
|
|
1234
|
-
|
|
1370
|
+
let responseData = response;
|
|
1371
|
+
if (headers) {
|
|
1372
|
+
responseData = response[0];
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
const {
|
|
1376
|
+
error: res_error,
|
|
1377
|
+
} = UserApplicationModel.LoginSuccess().validate(responseData, {
|
|
1235
1378
|
abortEarly: false,
|
|
1236
1379
|
allowUnknown: false,
|
|
1237
1380
|
});
|
|
@@ -1239,22 +1382,22 @@ class User {
|
|
|
1239
1382
|
if (res_error) {
|
|
1240
1383
|
Logger({
|
|
1241
1384
|
level: "WARN",
|
|
1242
|
-
message:
|
|
1385
|
+
message: `Response Validation Warnnings for application > User > loginWithToken \n ${res_error}`,
|
|
1243
1386
|
});
|
|
1244
|
-
Logger({ level: "WARN", message: res_error });
|
|
1245
1387
|
}
|
|
1246
1388
|
|
|
1247
1389
|
return response;
|
|
1248
1390
|
}
|
|
1249
1391
|
|
|
1250
1392
|
/**
|
|
1251
|
-
* @param {
|
|
1252
|
-
* @returns {Promise<LogoutSuccess>} - Success response
|
|
1393
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1394
|
+
* @returns {Promise<UserApplicationModel.LogoutSuccess>} - Success response
|
|
1395
|
+
* @name logout
|
|
1253
1396
|
* @summary: Logs out currently logged in user
|
|
1254
|
-
* @description: Use this API to check to logout a user from the app.
|
|
1397
|
+
* @description: Use this API to check to logout a user from the app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/logout/).
|
|
1255
1398
|
*/
|
|
1256
|
-
async logout({} = {}) {
|
|
1257
|
-
const { error } =
|
|
1399
|
+
async logout({ headers } = { headers: false }) {
|
|
1400
|
+
const { error } = UserApplicationValidator.logout().validate(
|
|
1258
1401
|
{},
|
|
1259
1402
|
{ abortEarly: false, allowUnknown: true }
|
|
1260
1403
|
);
|
|
@@ -1263,16 +1406,15 @@ class User {
|
|
|
1263
1406
|
}
|
|
1264
1407
|
|
|
1265
1408
|
// Showing warrnings if extra unknown parameters are found
|
|
1266
|
-
const { error: warrning } =
|
|
1409
|
+
const { error: warrning } = UserApplicationValidator.logout().validate(
|
|
1267
1410
|
{},
|
|
1268
1411
|
{ abortEarly: false, allowUnknown: false }
|
|
1269
1412
|
);
|
|
1270
1413
|
if (warrning) {
|
|
1271
1414
|
Logger({
|
|
1272
1415
|
level: "WARN",
|
|
1273
|
-
message:
|
|
1416
|
+
message: `Parameter Validation warrnings for application > User > logout \n ${warrning}`,
|
|
1274
1417
|
});
|
|
1275
|
-
Logger({ level: "WARN", message: warrning });
|
|
1276
1418
|
}
|
|
1277
1419
|
|
|
1278
1420
|
const query_params = {};
|
|
@@ -1288,10 +1430,18 @@ class User {
|
|
|
1288
1430
|
}),
|
|
1289
1431
|
query_params,
|
|
1290
1432
|
undefined,
|
|
1291
|
-
xHeaders
|
|
1433
|
+
xHeaders,
|
|
1434
|
+
{ headers }
|
|
1292
1435
|
);
|
|
1293
1436
|
|
|
1294
|
-
|
|
1437
|
+
let responseData = response;
|
|
1438
|
+
if (headers) {
|
|
1439
|
+
responseData = response[0];
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
const {
|
|
1443
|
+
error: res_error,
|
|
1444
|
+
} = UserApplicationModel.LogoutSuccess().validate(responseData, {
|
|
1295
1445
|
abortEarly: false,
|
|
1296
1446
|
allowUnknown: false,
|
|
1297
1447
|
});
|
|
@@ -1299,24 +1449,26 @@ class User {
|
|
|
1299
1449
|
if (res_error) {
|
|
1300
1450
|
Logger({
|
|
1301
1451
|
level: "WARN",
|
|
1302
|
-
message:
|
|
1452
|
+
message: `Response Validation Warnnings for application > User > logout \n ${res_error}`,
|
|
1303
1453
|
});
|
|
1304
|
-
Logger({ level: "WARN", message: res_error });
|
|
1305
1454
|
}
|
|
1306
1455
|
|
|
1307
1456
|
return response;
|
|
1308
1457
|
}
|
|
1309
1458
|
|
|
1310
1459
|
/**
|
|
1311
|
-
* @param {
|
|
1312
|
-
* @param {
|
|
1313
|
-
* @
|
|
1314
|
-
* @
|
|
1460
|
+
* @param {UserApplicationValidator.RegisterWithFormParam} arg - Arg object.
|
|
1461
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1462
|
+
* @returns {Promise<UserApplicationModel.RegisterFormSuccess>} - Success response
|
|
1463
|
+
* @name registerWithForm
|
|
1315
1464
|
* @summary: Registration using a form
|
|
1316
|
-
* @description: Use this API to perform user registration by sending form data in the request body.
|
|
1465
|
+
* @description: Use this API to perform user registration by sending form data in the request body. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/registerWithForm/).
|
|
1317
1466
|
*/
|
|
1318
|
-
async registerWithForm(
|
|
1319
|
-
|
|
1467
|
+
async registerWithForm(
|
|
1468
|
+
{ body, platform } = {},
|
|
1469
|
+
{ headers } = { headers: false }
|
|
1470
|
+
) {
|
|
1471
|
+
const { error } = UserApplicationValidator.registerWithForm().validate(
|
|
1320
1472
|
{ body, platform },
|
|
1321
1473
|
{ abortEarly: false, allowUnknown: true }
|
|
1322
1474
|
);
|
|
@@ -1325,16 +1477,17 @@ class User {
|
|
|
1325
1477
|
}
|
|
1326
1478
|
|
|
1327
1479
|
// Showing warrnings if extra unknown parameters are found
|
|
1328
|
-
const {
|
|
1480
|
+
const {
|
|
1481
|
+
error: warrning,
|
|
1482
|
+
} = UserApplicationValidator.registerWithForm().validate(
|
|
1329
1483
|
{ body, platform },
|
|
1330
1484
|
{ abortEarly: false, allowUnknown: false }
|
|
1331
1485
|
);
|
|
1332
1486
|
if (warrning) {
|
|
1333
1487
|
Logger({
|
|
1334
1488
|
level: "WARN",
|
|
1335
|
-
message:
|
|
1489
|
+
message: `Parameter Validation warrnings for application > User > registerWithForm \n ${warrning}`,
|
|
1336
1490
|
});
|
|
1337
|
-
Logger({ level: "WARN", message: warrning });
|
|
1338
1491
|
}
|
|
1339
1492
|
|
|
1340
1493
|
const query_params = {};
|
|
@@ -1351,12 +1504,18 @@ class User {
|
|
|
1351
1504
|
}),
|
|
1352
1505
|
query_params,
|
|
1353
1506
|
body,
|
|
1354
|
-
xHeaders
|
|
1507
|
+
xHeaders,
|
|
1508
|
+
{ headers }
|
|
1355
1509
|
);
|
|
1356
1510
|
|
|
1511
|
+
let responseData = response;
|
|
1512
|
+
if (headers) {
|
|
1513
|
+
responseData = response[0];
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1357
1516
|
const {
|
|
1358
1517
|
error: res_error,
|
|
1359
|
-
} =
|
|
1518
|
+
} = UserApplicationModel.RegisterFormSuccess().validate(responseData, {
|
|
1360
1519
|
abortEarly: false,
|
|
1361
1520
|
allowUnknown: false,
|
|
1362
1521
|
});
|
|
@@ -1364,24 +1523,26 @@ class User {
|
|
|
1364
1523
|
if (res_error) {
|
|
1365
1524
|
Logger({
|
|
1366
1525
|
level: "WARN",
|
|
1367
|
-
message:
|
|
1526
|
+
message: `Response Validation Warnnings for application > User > registerWithForm \n ${res_error}`,
|
|
1368
1527
|
});
|
|
1369
|
-
Logger({ level: "WARN", message: res_error });
|
|
1370
1528
|
}
|
|
1371
1529
|
|
|
1372
1530
|
return response;
|
|
1373
1531
|
}
|
|
1374
1532
|
|
|
1375
1533
|
/**
|
|
1376
|
-
* @param {
|
|
1377
|
-
* @param {
|
|
1378
|
-
* @
|
|
1379
|
-
* @
|
|
1534
|
+
* @param {UserApplicationValidator.SendOTPOnEmailParam} arg - Arg object.
|
|
1535
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1536
|
+
* @returns {Promise<UserApplicationModel.EmailOtpSuccess>} - Success response
|
|
1537
|
+
* @name sendOTPOnEmail
|
|
1380
1538
|
* @summary: Send OTP on email
|
|
1381
|
-
* @description: Use this API to send an OTP to an email ID.
|
|
1539
|
+
* @description: Use this API to send an OTP to an email ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendOTPOnEmail/).
|
|
1382
1540
|
*/
|
|
1383
|
-
async sendOTPOnEmail(
|
|
1384
|
-
|
|
1541
|
+
async sendOTPOnEmail(
|
|
1542
|
+
{ body, platform } = {},
|
|
1543
|
+
{ headers } = { headers: false }
|
|
1544
|
+
) {
|
|
1545
|
+
const { error } = UserApplicationValidator.sendOTPOnEmail().validate(
|
|
1385
1546
|
{ body, platform },
|
|
1386
1547
|
{ abortEarly: false, allowUnknown: true }
|
|
1387
1548
|
);
|
|
@@ -1390,16 +1551,17 @@ class User {
|
|
|
1390
1551
|
}
|
|
1391
1552
|
|
|
1392
1553
|
// Showing warrnings if extra unknown parameters are found
|
|
1393
|
-
const {
|
|
1554
|
+
const {
|
|
1555
|
+
error: warrning,
|
|
1556
|
+
} = UserApplicationValidator.sendOTPOnEmail().validate(
|
|
1394
1557
|
{ body, platform },
|
|
1395
1558
|
{ abortEarly: false, allowUnknown: false }
|
|
1396
1559
|
);
|
|
1397
1560
|
if (warrning) {
|
|
1398
1561
|
Logger({
|
|
1399
1562
|
level: "WARN",
|
|
1400
|
-
message:
|
|
1563
|
+
message: `Parameter Validation warrnings for application > User > sendOTPOnEmail \n ${warrning}`,
|
|
1401
1564
|
});
|
|
1402
|
-
Logger({ level: "WARN", message: warrning });
|
|
1403
1565
|
}
|
|
1404
1566
|
|
|
1405
1567
|
const query_params = {};
|
|
@@ -1416,35 +1578,45 @@ class User {
|
|
|
1416
1578
|
}),
|
|
1417
1579
|
query_params,
|
|
1418
1580
|
body,
|
|
1419
|
-
xHeaders
|
|
1581
|
+
xHeaders,
|
|
1582
|
+
{ headers }
|
|
1420
1583
|
);
|
|
1421
1584
|
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1585
|
+
let responseData = response;
|
|
1586
|
+
if (headers) {
|
|
1587
|
+
responseData = response[0];
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
const {
|
|
1591
|
+
error: res_error,
|
|
1592
|
+
} = UserApplicationModel.EmailOtpSuccess().validate(responseData, {
|
|
1593
|
+
abortEarly: false,
|
|
1594
|
+
allowUnknown: false,
|
|
1595
|
+
});
|
|
1426
1596
|
|
|
1427
1597
|
if (res_error) {
|
|
1428
1598
|
Logger({
|
|
1429
1599
|
level: "WARN",
|
|
1430
|
-
message:
|
|
1600
|
+
message: `Response Validation Warnnings for application > User > sendOTPOnEmail \n ${res_error}`,
|
|
1431
1601
|
});
|
|
1432
|
-
Logger({ level: "WARN", message: res_error });
|
|
1433
1602
|
}
|
|
1434
1603
|
|
|
1435
1604
|
return response;
|
|
1436
1605
|
}
|
|
1437
1606
|
|
|
1438
1607
|
/**
|
|
1439
|
-
* @param {
|
|
1440
|
-
* @param {
|
|
1441
|
-
* @
|
|
1442
|
-
* @
|
|
1608
|
+
* @param {UserApplicationValidator.SendOTPOnMobileParam} arg - Arg object.
|
|
1609
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1610
|
+
* @returns {Promise<UserApplicationModel.OtpSuccess>} - Success response
|
|
1611
|
+
* @name sendOTPOnMobile
|
|
1443
1612
|
* @summary: Send OTP on mobile
|
|
1444
|
-
* @description: Use this API to send an OTP to a mobile number.
|
|
1613
|
+
* @description: Use this API to send an OTP to a mobile number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendOTPOnMobile/).
|
|
1445
1614
|
*/
|
|
1446
|
-
async sendOTPOnMobile(
|
|
1447
|
-
|
|
1615
|
+
async sendOTPOnMobile(
|
|
1616
|
+
{ body, platform } = {},
|
|
1617
|
+
{ headers } = { headers: false }
|
|
1618
|
+
) {
|
|
1619
|
+
const { error } = UserApplicationValidator.sendOTPOnMobile().validate(
|
|
1448
1620
|
{ body, platform },
|
|
1449
1621
|
{ abortEarly: false, allowUnknown: true }
|
|
1450
1622
|
);
|
|
@@ -1453,16 +1625,17 @@ class User {
|
|
|
1453
1625
|
}
|
|
1454
1626
|
|
|
1455
1627
|
// Showing warrnings if extra unknown parameters are found
|
|
1456
|
-
const {
|
|
1628
|
+
const {
|
|
1629
|
+
error: warrning,
|
|
1630
|
+
} = UserApplicationValidator.sendOTPOnMobile().validate(
|
|
1457
1631
|
{ body, platform },
|
|
1458
1632
|
{ abortEarly: false, allowUnknown: false }
|
|
1459
1633
|
);
|
|
1460
1634
|
if (warrning) {
|
|
1461
1635
|
Logger({
|
|
1462
1636
|
level: "WARN",
|
|
1463
|
-
message:
|
|
1637
|
+
message: `Parameter Validation warrnings for application > User > sendOTPOnMobile \n ${warrning}`,
|
|
1464
1638
|
});
|
|
1465
|
-
Logger({ level: "WARN", message: warrning });
|
|
1466
1639
|
}
|
|
1467
1640
|
|
|
1468
1641
|
const query_params = {};
|
|
@@ -1479,10 +1652,18 @@ class User {
|
|
|
1479
1652
|
}),
|
|
1480
1653
|
query_params,
|
|
1481
1654
|
body,
|
|
1482
|
-
xHeaders
|
|
1655
|
+
xHeaders,
|
|
1656
|
+
{ headers }
|
|
1483
1657
|
);
|
|
1484
1658
|
|
|
1485
|
-
|
|
1659
|
+
let responseData = response;
|
|
1660
|
+
if (headers) {
|
|
1661
|
+
responseData = response[0];
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
const {
|
|
1665
|
+
error: res_error,
|
|
1666
|
+
} = UserApplicationModel.OtpSuccess().validate(responseData, {
|
|
1486
1667
|
abortEarly: false,
|
|
1487
1668
|
allowUnknown: false,
|
|
1488
1669
|
});
|
|
@@ -1490,24 +1671,28 @@ class User {
|
|
|
1490
1671
|
if (res_error) {
|
|
1491
1672
|
Logger({
|
|
1492
1673
|
level: "WARN",
|
|
1493
|
-
message:
|
|
1674
|
+
message: `Response Validation Warnnings for application > User > sendOTPOnMobile \n ${res_error}`,
|
|
1494
1675
|
});
|
|
1495
|
-
Logger({ level: "WARN", message: res_error });
|
|
1496
1676
|
}
|
|
1497
1677
|
|
|
1498
1678
|
return response;
|
|
1499
1679
|
}
|
|
1500
1680
|
|
|
1501
1681
|
/**
|
|
1502
|
-
* @param {
|
|
1503
|
-
* @param {
|
|
1504
|
-
* @
|
|
1505
|
-
* @
|
|
1682
|
+
* @param {UserApplicationValidator.SendResetPasswordEmailParam} arg - Arg object.
|
|
1683
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1684
|
+
* @returns {Promise<UserApplicationModel.ResetPasswordSuccess>} - Success response
|
|
1685
|
+
* @name sendResetPasswordEmail
|
|
1506
1686
|
* @summary: Reset Password
|
|
1507
|
-
* @description: Use this API to reset a password using the link sent on email.
|
|
1687
|
+
* @description: Use this API to reset a password using the link sent on email. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendResetPasswordEmail/).
|
|
1508
1688
|
*/
|
|
1509
|
-
async sendResetPasswordEmail(
|
|
1510
|
-
|
|
1689
|
+
async sendResetPasswordEmail(
|
|
1690
|
+
{ body, platform } = {},
|
|
1691
|
+
{ headers } = { headers: false }
|
|
1692
|
+
) {
|
|
1693
|
+
const {
|
|
1694
|
+
error,
|
|
1695
|
+
} = UserApplicationValidator.sendResetPasswordEmail().validate(
|
|
1511
1696
|
{ body, platform },
|
|
1512
1697
|
{ abortEarly: false, allowUnknown: true }
|
|
1513
1698
|
);
|
|
@@ -1516,16 +1701,17 @@ class User {
|
|
|
1516
1701
|
}
|
|
1517
1702
|
|
|
1518
1703
|
// Showing warrnings if extra unknown parameters are found
|
|
1519
|
-
const {
|
|
1704
|
+
const {
|
|
1705
|
+
error: warrning,
|
|
1706
|
+
} = UserApplicationValidator.sendResetPasswordEmail().validate(
|
|
1520
1707
|
{ body, platform },
|
|
1521
1708
|
{ abortEarly: false, allowUnknown: false }
|
|
1522
1709
|
);
|
|
1523
1710
|
if (warrning) {
|
|
1524
1711
|
Logger({
|
|
1525
1712
|
level: "WARN",
|
|
1526
|
-
message:
|
|
1713
|
+
message: `Parameter Validation warrnings for application > User > sendResetPasswordEmail \n ${warrning}`,
|
|
1527
1714
|
});
|
|
1528
|
-
Logger({ level: "WARN", message: warrning });
|
|
1529
1715
|
}
|
|
1530
1716
|
|
|
1531
1717
|
const query_params = {};
|
|
@@ -1542,12 +1728,18 @@ class User {
|
|
|
1542
1728
|
}),
|
|
1543
1729
|
query_params,
|
|
1544
1730
|
body,
|
|
1545
|
-
xHeaders
|
|
1731
|
+
xHeaders,
|
|
1732
|
+
{ headers }
|
|
1546
1733
|
);
|
|
1547
1734
|
|
|
1735
|
+
let responseData = response;
|
|
1736
|
+
if (headers) {
|
|
1737
|
+
responseData = response[0];
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1548
1740
|
const {
|
|
1549
1741
|
error: res_error,
|
|
1550
|
-
} =
|
|
1742
|
+
} = UserApplicationModel.ResetPasswordSuccess().validate(responseData, {
|
|
1551
1743
|
abortEarly: false,
|
|
1552
1744
|
allowUnknown: false,
|
|
1553
1745
|
});
|
|
@@ -1555,24 +1747,28 @@ class User {
|
|
|
1555
1747
|
if (res_error) {
|
|
1556
1748
|
Logger({
|
|
1557
1749
|
level: "WARN",
|
|
1558
|
-
message:
|
|
1750
|
+
message: `Response Validation Warnnings for application > User > sendResetPasswordEmail \n ${res_error}`,
|
|
1559
1751
|
});
|
|
1560
|
-
Logger({ level: "WARN", message: res_error });
|
|
1561
1752
|
}
|
|
1562
1753
|
|
|
1563
1754
|
return response;
|
|
1564
1755
|
}
|
|
1565
1756
|
|
|
1566
1757
|
/**
|
|
1567
|
-
* @param {
|
|
1568
|
-
* @param {
|
|
1569
|
-
* @
|
|
1570
|
-
* @
|
|
1758
|
+
* @param {UserApplicationValidator.SendResetPasswordMobileParam} arg - Arg object.
|
|
1759
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1760
|
+
* @returns {Promise<UserApplicationModel.ResetPasswordSuccess>} - Success response
|
|
1761
|
+
* @name sendResetPasswordMobile
|
|
1571
1762
|
* @summary: Reset Password
|
|
1572
|
-
* @description: Use this API to reset a password using the link sent on mobile.
|
|
1763
|
+
* @description: Use this API to reset a password using the link sent on mobile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendResetPasswordMobile/).
|
|
1573
1764
|
*/
|
|
1574
|
-
async sendResetPasswordMobile(
|
|
1575
|
-
|
|
1765
|
+
async sendResetPasswordMobile(
|
|
1766
|
+
{ body, platform } = {},
|
|
1767
|
+
{ headers } = { headers: false }
|
|
1768
|
+
) {
|
|
1769
|
+
const {
|
|
1770
|
+
error,
|
|
1771
|
+
} = UserApplicationValidator.sendResetPasswordMobile().validate(
|
|
1576
1772
|
{ body, platform },
|
|
1577
1773
|
{ abortEarly: false, allowUnknown: true }
|
|
1578
1774
|
);
|
|
@@ -1583,16 +1779,15 @@ class User {
|
|
|
1583
1779
|
// Showing warrnings if extra unknown parameters are found
|
|
1584
1780
|
const {
|
|
1585
1781
|
error: warrning,
|
|
1586
|
-
} =
|
|
1782
|
+
} = UserApplicationValidator.sendResetPasswordMobile().validate(
|
|
1587
1783
|
{ body, platform },
|
|
1588
1784
|
{ abortEarly: false, allowUnknown: false }
|
|
1589
1785
|
);
|
|
1590
1786
|
if (warrning) {
|
|
1591
1787
|
Logger({
|
|
1592
1788
|
level: "WARN",
|
|
1593
|
-
message:
|
|
1789
|
+
message: `Parameter Validation warrnings for application > User > sendResetPasswordMobile \n ${warrning}`,
|
|
1594
1790
|
});
|
|
1595
|
-
Logger({ level: "WARN", message: warrning });
|
|
1596
1791
|
}
|
|
1597
1792
|
|
|
1598
1793
|
const query_params = {};
|
|
@@ -1609,12 +1804,18 @@ class User {
|
|
|
1609
1804
|
}),
|
|
1610
1805
|
query_params,
|
|
1611
1806
|
body,
|
|
1612
|
-
xHeaders
|
|
1807
|
+
xHeaders,
|
|
1808
|
+
{ headers }
|
|
1613
1809
|
);
|
|
1614
1810
|
|
|
1811
|
+
let responseData = response;
|
|
1812
|
+
if (headers) {
|
|
1813
|
+
responseData = response[0];
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1615
1816
|
const {
|
|
1616
1817
|
error: res_error,
|
|
1617
|
-
} =
|
|
1818
|
+
} = UserApplicationModel.ResetPasswordSuccess().validate(responseData, {
|
|
1618
1819
|
abortEarly: false,
|
|
1619
1820
|
allowUnknown: false,
|
|
1620
1821
|
});
|
|
@@ -1622,23 +1823,23 @@ class User {
|
|
|
1622
1823
|
if (res_error) {
|
|
1623
1824
|
Logger({
|
|
1624
1825
|
level: "WARN",
|
|
1625
|
-
message:
|
|
1826
|
+
message: `Response Validation Warnnings for application > User > sendResetPasswordMobile \n ${res_error}`,
|
|
1626
1827
|
});
|
|
1627
|
-
Logger({ level: "WARN", message: res_error });
|
|
1628
1828
|
}
|
|
1629
1829
|
|
|
1630
1830
|
return response;
|
|
1631
1831
|
}
|
|
1632
1832
|
|
|
1633
1833
|
/**
|
|
1634
|
-
* @param {
|
|
1635
|
-
* @param {
|
|
1636
|
-
* @returns {Promise<ResetPasswordSuccess>} - Success response
|
|
1834
|
+
* @param {UserApplicationValidator.SendResetTokenParam} arg - Arg object.
|
|
1835
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1836
|
+
* @returns {Promise<UserApplicationModel.ResetPasswordSuccess>} - Success response
|
|
1837
|
+
* @name sendResetToken
|
|
1637
1838
|
* @summary: Reset Password using token
|
|
1638
|
-
* @description: Use this API to send code to reset password.
|
|
1839
|
+
* @description: Use this API to send code to reset password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendResetToken/).
|
|
1639
1840
|
*/
|
|
1640
|
-
async sendResetToken({ body } = {}) {
|
|
1641
|
-
const { error } =
|
|
1841
|
+
async sendResetToken({ body } = {}, { headers } = { headers: false }) {
|
|
1842
|
+
const { error } = UserApplicationValidator.sendResetToken().validate(
|
|
1642
1843
|
{ body },
|
|
1643
1844
|
{ abortEarly: false, allowUnknown: true }
|
|
1644
1845
|
);
|
|
@@ -1647,16 +1848,17 @@ class User {
|
|
|
1647
1848
|
}
|
|
1648
1849
|
|
|
1649
1850
|
// Showing warrnings if extra unknown parameters are found
|
|
1650
|
-
const {
|
|
1851
|
+
const {
|
|
1852
|
+
error: warrning,
|
|
1853
|
+
} = UserApplicationValidator.sendResetToken().validate(
|
|
1651
1854
|
{ body },
|
|
1652
1855
|
{ abortEarly: false, allowUnknown: false }
|
|
1653
1856
|
);
|
|
1654
1857
|
if (warrning) {
|
|
1655
1858
|
Logger({
|
|
1656
1859
|
level: "WARN",
|
|
1657
|
-
message:
|
|
1860
|
+
message: `Parameter Validation warrnings for application > User > sendResetToken \n ${warrning}`,
|
|
1658
1861
|
});
|
|
1659
|
-
Logger({ level: "WARN", message: warrning });
|
|
1660
1862
|
}
|
|
1661
1863
|
|
|
1662
1864
|
const query_params = {};
|
|
@@ -1672,12 +1874,18 @@ class User {
|
|
|
1672
1874
|
}),
|
|
1673
1875
|
query_params,
|
|
1674
1876
|
body,
|
|
1675
|
-
xHeaders
|
|
1877
|
+
xHeaders,
|
|
1878
|
+
{ headers }
|
|
1676
1879
|
);
|
|
1677
1880
|
|
|
1881
|
+
let responseData = response;
|
|
1882
|
+
if (headers) {
|
|
1883
|
+
responseData = response[0];
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1678
1886
|
const {
|
|
1679
1887
|
error: res_error,
|
|
1680
|
-
} =
|
|
1888
|
+
} = UserApplicationModel.ResetPasswordSuccess().validate(responseData, {
|
|
1681
1889
|
abortEarly: false,
|
|
1682
1890
|
allowUnknown: false,
|
|
1683
1891
|
});
|
|
@@ -1685,24 +1893,30 @@ class User {
|
|
|
1685
1893
|
if (res_error) {
|
|
1686
1894
|
Logger({
|
|
1687
1895
|
level: "WARN",
|
|
1688
|
-
message:
|
|
1896
|
+
message: `Response Validation Warnnings for application > User > sendResetToken \n ${res_error}`,
|
|
1689
1897
|
});
|
|
1690
|
-
Logger({ level: "WARN", message: res_error });
|
|
1691
1898
|
}
|
|
1692
1899
|
|
|
1693
1900
|
return response;
|
|
1694
1901
|
}
|
|
1695
1902
|
|
|
1696
1903
|
/**
|
|
1697
|
-
* @param {
|
|
1698
|
-
*
|
|
1699
|
-
* @param {
|
|
1700
|
-
* @returns {Promise<SendEmailVerifyLinkSuccess>} -
|
|
1904
|
+
* @param {UserApplicationValidator.SendVerificationLinkToEmailParam} arg -
|
|
1905
|
+
* Arg object.
|
|
1906
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1907
|
+
* @returns {Promise<UserApplicationModel.SendEmailVerifyLinkSuccess>} -
|
|
1908
|
+
* Success response
|
|
1909
|
+
* @name sendVerificationLinkToEmail
|
|
1701
1910
|
* @summary: Send verification link to email
|
|
1702
|
-
* @description: Use this API to send verification link to an email address.
|
|
1911
|
+
* @description: Use this API to send verification link to an email address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendVerificationLinkToEmail/).
|
|
1703
1912
|
*/
|
|
1704
|
-
async sendVerificationLinkToEmail(
|
|
1705
|
-
|
|
1913
|
+
async sendVerificationLinkToEmail(
|
|
1914
|
+
{ body, platform } = {},
|
|
1915
|
+
{ headers } = { headers: false }
|
|
1916
|
+
) {
|
|
1917
|
+
const {
|
|
1918
|
+
error,
|
|
1919
|
+
} = UserApplicationValidator.sendVerificationLinkToEmail().validate(
|
|
1706
1920
|
{ body, platform },
|
|
1707
1921
|
{ abortEarly: false, allowUnknown: true }
|
|
1708
1922
|
);
|
|
@@ -1713,17 +1927,15 @@ class User {
|
|
|
1713
1927
|
// Showing warrnings if extra unknown parameters are found
|
|
1714
1928
|
const {
|
|
1715
1929
|
error: warrning,
|
|
1716
|
-
} =
|
|
1930
|
+
} = UserApplicationValidator.sendVerificationLinkToEmail().validate(
|
|
1717
1931
|
{ body, platform },
|
|
1718
1932
|
{ abortEarly: false, allowUnknown: false }
|
|
1719
1933
|
);
|
|
1720
1934
|
if (warrning) {
|
|
1721
1935
|
Logger({
|
|
1722
1936
|
level: "WARN",
|
|
1723
|
-
message:
|
|
1724
|
-
"Parameter Validation warrnings for sendVerificationLinkToEmail",
|
|
1937
|
+
message: `Parameter Validation warrnings for application > User > sendVerificationLinkToEmail \n ${warrning}`,
|
|
1725
1938
|
});
|
|
1726
|
-
Logger({ level: "WARN", message: warrning });
|
|
1727
1939
|
}
|
|
1728
1940
|
|
|
1729
1941
|
const query_params = {};
|
|
@@ -1740,38 +1952,50 @@ class User {
|
|
|
1740
1952
|
}),
|
|
1741
1953
|
query_params,
|
|
1742
1954
|
body,
|
|
1743
|
-
xHeaders
|
|
1955
|
+
xHeaders,
|
|
1956
|
+
{ headers }
|
|
1744
1957
|
);
|
|
1745
1958
|
|
|
1959
|
+
let responseData = response;
|
|
1960
|
+
if (headers) {
|
|
1961
|
+
responseData = response[0];
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1746
1964
|
const {
|
|
1747
1965
|
error: res_error,
|
|
1748
|
-
} =
|
|
1749
|
-
|
|
1750
|
-
allowUnknown: false
|
|
1751
|
-
|
|
1966
|
+
} = UserApplicationModel.SendEmailVerifyLinkSuccess().validate(
|
|
1967
|
+
responseData,
|
|
1968
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1969
|
+
);
|
|
1752
1970
|
|
|
1753
1971
|
if (res_error) {
|
|
1754
1972
|
Logger({
|
|
1755
1973
|
level: "WARN",
|
|
1756
|
-
message:
|
|
1757
|
-
"Response Validation Warnnings for sendVerificationLinkToEmail",
|
|
1974
|
+
message: `Response Validation Warnnings for application > User > sendVerificationLinkToEmail \n ${res_error}`,
|
|
1758
1975
|
});
|
|
1759
|
-
Logger({ level: "WARN", message: res_error });
|
|
1760
1976
|
}
|
|
1761
1977
|
|
|
1762
1978
|
return response;
|
|
1763
1979
|
}
|
|
1764
1980
|
|
|
1765
1981
|
/**
|
|
1766
|
-
* @param {
|
|
1767
|
-
*
|
|
1768
|
-
*
|
|
1769
|
-
* @
|
|
1982
|
+
* @param {UserApplicationValidator.SendVerificationLinkToMobileParam} arg
|
|
1983
|
+
* - Arg object.
|
|
1984
|
+
*
|
|
1985
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1986
|
+
* @returns {Promise<UserApplicationModel.SendMobileVerifyLinkSuccess>} -
|
|
1987
|
+
* Success response
|
|
1988
|
+
* @name sendVerificationLinkToMobile
|
|
1770
1989
|
* @summary: Send verification link to mobile
|
|
1771
|
-
* @description: Use this API to send a verification link to a mobile number
|
|
1990
|
+
* @description: Use this API to send a verification link to a mobile number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendVerificationLinkToMobile/).
|
|
1772
1991
|
*/
|
|
1773
|
-
async sendVerificationLinkToMobile(
|
|
1774
|
-
|
|
1992
|
+
async sendVerificationLinkToMobile(
|
|
1993
|
+
{ body, platform } = {},
|
|
1994
|
+
{ headers } = { headers: false }
|
|
1995
|
+
) {
|
|
1996
|
+
const {
|
|
1997
|
+
error,
|
|
1998
|
+
} = UserApplicationValidator.sendVerificationLinkToMobile().validate(
|
|
1775
1999
|
{ body, platform },
|
|
1776
2000
|
{ abortEarly: false, allowUnknown: true }
|
|
1777
2001
|
);
|
|
@@ -1782,17 +2006,15 @@ class User {
|
|
|
1782
2006
|
// Showing warrnings if extra unknown parameters are found
|
|
1783
2007
|
const {
|
|
1784
2008
|
error: warrning,
|
|
1785
|
-
} =
|
|
2009
|
+
} = UserApplicationValidator.sendVerificationLinkToMobile().validate(
|
|
1786
2010
|
{ body, platform },
|
|
1787
2011
|
{ abortEarly: false, allowUnknown: false }
|
|
1788
2012
|
);
|
|
1789
2013
|
if (warrning) {
|
|
1790
2014
|
Logger({
|
|
1791
2015
|
level: "WARN",
|
|
1792
|
-
message:
|
|
1793
|
-
"Parameter Validation warrnings for sendVerificationLinkToMobile",
|
|
2016
|
+
message: `Parameter Validation warrnings for application > User > sendVerificationLinkToMobile \n ${warrning}`,
|
|
1794
2017
|
});
|
|
1795
|
-
Logger({ level: "WARN", message: warrning });
|
|
1796
2018
|
}
|
|
1797
2019
|
|
|
1798
2020
|
const query_params = {};
|
|
@@ -1809,37 +2031,42 @@ class User {
|
|
|
1809
2031
|
}),
|
|
1810
2032
|
query_params,
|
|
1811
2033
|
body,
|
|
1812
|
-
xHeaders
|
|
2034
|
+
xHeaders,
|
|
2035
|
+
{ headers }
|
|
1813
2036
|
);
|
|
1814
2037
|
|
|
2038
|
+
let responseData = response;
|
|
2039
|
+
if (headers) {
|
|
2040
|
+
responseData = response[0];
|
|
2041
|
+
}
|
|
2042
|
+
|
|
1815
2043
|
const {
|
|
1816
2044
|
error: res_error,
|
|
1817
|
-
} =
|
|
1818
|
-
|
|
1819
|
-
allowUnknown: false
|
|
1820
|
-
|
|
2045
|
+
} = UserApplicationModel.SendMobileVerifyLinkSuccess().validate(
|
|
2046
|
+
responseData,
|
|
2047
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2048
|
+
);
|
|
1821
2049
|
|
|
1822
2050
|
if (res_error) {
|
|
1823
2051
|
Logger({
|
|
1824
2052
|
level: "WARN",
|
|
1825
|
-
message:
|
|
1826
|
-
"Response Validation Warnnings for sendVerificationLinkToMobile",
|
|
2053
|
+
message: `Response Validation Warnnings for application > User > sendVerificationLinkToMobile \n ${res_error}`,
|
|
1827
2054
|
});
|
|
1828
|
-
Logger({ level: "WARN", message: res_error });
|
|
1829
2055
|
}
|
|
1830
2056
|
|
|
1831
2057
|
return response;
|
|
1832
2058
|
}
|
|
1833
2059
|
|
|
1834
2060
|
/**
|
|
1835
|
-
* @param {
|
|
1836
|
-
* @param {
|
|
1837
|
-
* @returns {Promise<LoginSuccess>} - Success response
|
|
2061
|
+
* @param {UserApplicationValidator.SetEmailAsPrimaryParam} arg - Arg object.
|
|
2062
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2063
|
+
* @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
|
|
2064
|
+
* @name setEmailAsPrimary
|
|
1838
2065
|
* @summary: Set email as primary
|
|
1839
|
-
* @description: Use this API to set an email address as primary. Primary email ID is a email address used for all future communications.
|
|
2066
|
+
* @description: Use this API to set an email address as primary. Primary email ID is a email address used for all future communications. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/setEmailAsPrimary/).
|
|
1840
2067
|
*/
|
|
1841
|
-
async setEmailAsPrimary({ body } = {}) {
|
|
1842
|
-
const { error } =
|
|
2068
|
+
async setEmailAsPrimary({ body } = {}, { headers } = { headers: false }) {
|
|
2069
|
+
const { error } = UserApplicationValidator.setEmailAsPrimary().validate(
|
|
1843
2070
|
{ body },
|
|
1844
2071
|
{ abortEarly: false, allowUnknown: true }
|
|
1845
2072
|
);
|
|
@@ -1848,16 +2075,17 @@ class User {
|
|
|
1848
2075
|
}
|
|
1849
2076
|
|
|
1850
2077
|
// Showing warrnings if extra unknown parameters are found
|
|
1851
|
-
const {
|
|
2078
|
+
const {
|
|
2079
|
+
error: warrning,
|
|
2080
|
+
} = UserApplicationValidator.setEmailAsPrimary().validate(
|
|
1852
2081
|
{ body },
|
|
1853
2082
|
{ abortEarly: false, allowUnknown: false }
|
|
1854
2083
|
);
|
|
1855
2084
|
if (warrning) {
|
|
1856
2085
|
Logger({
|
|
1857
2086
|
level: "WARN",
|
|
1858
|
-
message:
|
|
2087
|
+
message: `Parameter Validation warrnings for application > User > setEmailAsPrimary \n ${warrning}`,
|
|
1859
2088
|
});
|
|
1860
|
-
Logger({ level: "WARN", message: warrning });
|
|
1861
2089
|
}
|
|
1862
2090
|
|
|
1863
2091
|
const query_params = {};
|
|
@@ -1873,10 +2101,18 @@ class User {
|
|
|
1873
2101
|
}),
|
|
1874
2102
|
query_params,
|
|
1875
2103
|
body,
|
|
1876
|
-
xHeaders
|
|
2104
|
+
xHeaders,
|
|
2105
|
+
{ headers }
|
|
1877
2106
|
);
|
|
1878
2107
|
|
|
1879
|
-
|
|
2108
|
+
let responseData = response;
|
|
2109
|
+
if (headers) {
|
|
2110
|
+
responseData = response[0];
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
const {
|
|
2114
|
+
error: res_error,
|
|
2115
|
+
} = UserApplicationModel.LoginSuccess().validate(responseData, {
|
|
1880
2116
|
abortEarly: false,
|
|
1881
2117
|
allowUnknown: false,
|
|
1882
2118
|
});
|
|
@@ -1884,23 +2120,28 @@ class User {
|
|
|
1884
2120
|
if (res_error) {
|
|
1885
2121
|
Logger({
|
|
1886
2122
|
level: "WARN",
|
|
1887
|
-
message:
|
|
2123
|
+
message: `Response Validation Warnnings for application > User > setEmailAsPrimary \n ${res_error}`,
|
|
1888
2124
|
});
|
|
1889
|
-
Logger({ level: "WARN", message: res_error });
|
|
1890
2125
|
}
|
|
1891
2126
|
|
|
1892
2127
|
return response;
|
|
1893
2128
|
}
|
|
1894
2129
|
|
|
1895
2130
|
/**
|
|
1896
|
-
* @param {
|
|
1897
|
-
* @param {
|
|
1898
|
-
* @returns {Promise<LoginSuccess>} - Success response
|
|
2131
|
+
* @param {UserApplicationValidator.SetMobileNumberAsPrimaryParam} arg - Arg object.
|
|
2132
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2133
|
+
* @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
|
|
2134
|
+
* @name setMobileNumberAsPrimary
|
|
1899
2135
|
* @summary: Set mobile as primary
|
|
1900
|
-
* @description: Use this API to set a mobile number as primary. Primary number is a verified number used for all future communications.
|
|
2136
|
+
* @description: Use this API to set a mobile number as primary. Primary number is a verified number used for all future communications. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/setMobileNumberAsPrimary/).
|
|
1901
2137
|
*/
|
|
1902
|
-
async setMobileNumberAsPrimary(
|
|
1903
|
-
|
|
2138
|
+
async setMobileNumberAsPrimary(
|
|
2139
|
+
{ body } = {},
|
|
2140
|
+
{ headers } = { headers: false }
|
|
2141
|
+
) {
|
|
2142
|
+
const {
|
|
2143
|
+
error,
|
|
2144
|
+
} = UserApplicationValidator.setMobileNumberAsPrimary().validate(
|
|
1904
2145
|
{ body },
|
|
1905
2146
|
{ abortEarly: false, allowUnknown: true }
|
|
1906
2147
|
);
|
|
@@ -1911,16 +2152,15 @@ class User {
|
|
|
1911
2152
|
// Showing warrnings if extra unknown parameters are found
|
|
1912
2153
|
const {
|
|
1913
2154
|
error: warrning,
|
|
1914
|
-
} =
|
|
2155
|
+
} = UserApplicationValidator.setMobileNumberAsPrimary().validate(
|
|
1915
2156
|
{ body },
|
|
1916
2157
|
{ abortEarly: false, allowUnknown: false }
|
|
1917
2158
|
);
|
|
1918
2159
|
if (warrning) {
|
|
1919
2160
|
Logger({
|
|
1920
2161
|
level: "WARN",
|
|
1921
|
-
message:
|
|
2162
|
+
message: `Parameter Validation warrnings for application > User > setMobileNumberAsPrimary \n ${warrning}`,
|
|
1922
2163
|
});
|
|
1923
|
-
Logger({ level: "WARN", message: warrning });
|
|
1924
2164
|
}
|
|
1925
2165
|
|
|
1926
2166
|
const query_params = {};
|
|
@@ -1936,10 +2176,18 @@ class User {
|
|
|
1936
2176
|
}),
|
|
1937
2177
|
query_params,
|
|
1938
2178
|
body,
|
|
1939
|
-
xHeaders
|
|
2179
|
+
xHeaders,
|
|
2180
|
+
{ headers }
|
|
1940
2181
|
);
|
|
1941
2182
|
|
|
1942
|
-
|
|
2183
|
+
let responseData = response;
|
|
2184
|
+
if (headers) {
|
|
2185
|
+
responseData = response[0];
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
const {
|
|
2189
|
+
error: res_error,
|
|
2190
|
+
} = UserApplicationModel.LoginSuccess().validate(responseData, {
|
|
1943
2191
|
abortEarly: false,
|
|
1944
2192
|
allowUnknown: false,
|
|
1945
2193
|
});
|
|
@@ -1947,23 +2195,23 @@ class User {
|
|
|
1947
2195
|
if (res_error) {
|
|
1948
2196
|
Logger({
|
|
1949
2197
|
level: "WARN",
|
|
1950
|
-
message:
|
|
2198
|
+
message: `Response Validation Warnnings for application > User > setMobileNumberAsPrimary \n ${res_error}`,
|
|
1951
2199
|
});
|
|
1952
|
-
Logger({ level: "WARN", message: res_error });
|
|
1953
2200
|
}
|
|
1954
2201
|
|
|
1955
2202
|
return response;
|
|
1956
2203
|
}
|
|
1957
2204
|
|
|
1958
2205
|
/**
|
|
1959
|
-
* @param {
|
|
1960
|
-
* @param {
|
|
1961
|
-
* @returns {Promise<VerifyEmailSuccess>} - Success response
|
|
2206
|
+
* @param {UserApplicationValidator.UpdatePasswordParam} arg - Arg object.
|
|
2207
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2208
|
+
* @returns {Promise<UserApplicationModel.VerifyEmailSuccess>} - Success response
|
|
2209
|
+
* @name updatePassword
|
|
1962
2210
|
* @summary: Update user password
|
|
1963
|
-
* @description: Use this API to update the password.
|
|
2211
|
+
* @description: Use this API to update the password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updatePassword/).
|
|
1964
2212
|
*/
|
|
1965
|
-
async updatePassword({ body } = {}) {
|
|
1966
|
-
const { error } =
|
|
2213
|
+
async updatePassword({ body } = {}, { headers } = { headers: false }) {
|
|
2214
|
+
const { error } = UserApplicationValidator.updatePassword().validate(
|
|
1967
2215
|
{ body },
|
|
1968
2216
|
{ abortEarly: false, allowUnknown: true }
|
|
1969
2217
|
);
|
|
@@ -1972,16 +2220,17 @@ class User {
|
|
|
1972
2220
|
}
|
|
1973
2221
|
|
|
1974
2222
|
// Showing warrnings if extra unknown parameters are found
|
|
1975
|
-
const {
|
|
2223
|
+
const {
|
|
2224
|
+
error: warrning,
|
|
2225
|
+
} = UserApplicationValidator.updatePassword().validate(
|
|
1976
2226
|
{ body },
|
|
1977
2227
|
{ abortEarly: false, allowUnknown: false }
|
|
1978
2228
|
);
|
|
1979
2229
|
if (warrning) {
|
|
1980
2230
|
Logger({
|
|
1981
2231
|
level: "WARN",
|
|
1982
|
-
message:
|
|
2232
|
+
message: `Parameter Validation warrnings for application > User > updatePassword \n ${warrning}`,
|
|
1983
2233
|
});
|
|
1984
|
-
Logger({ level: "WARN", message: warrning });
|
|
1985
2234
|
}
|
|
1986
2235
|
|
|
1987
2236
|
const query_params = {};
|
|
@@ -1997,12 +2246,18 @@ class User {
|
|
|
1997
2246
|
}),
|
|
1998
2247
|
query_params,
|
|
1999
2248
|
body,
|
|
2000
|
-
xHeaders
|
|
2249
|
+
xHeaders,
|
|
2250
|
+
{ headers }
|
|
2001
2251
|
);
|
|
2002
2252
|
|
|
2253
|
+
let responseData = response;
|
|
2254
|
+
if (headers) {
|
|
2255
|
+
responseData = response[0];
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2003
2258
|
const {
|
|
2004
2259
|
error: res_error,
|
|
2005
|
-
} =
|
|
2260
|
+
} = UserApplicationModel.VerifyEmailSuccess().validate(responseData, {
|
|
2006
2261
|
abortEarly: false,
|
|
2007
2262
|
allowUnknown: false,
|
|
2008
2263
|
});
|
|
@@ -2010,24 +2265,26 @@ class User {
|
|
|
2010
2265
|
if (res_error) {
|
|
2011
2266
|
Logger({
|
|
2012
2267
|
level: "WARN",
|
|
2013
|
-
message:
|
|
2268
|
+
message: `Response Validation Warnnings for application > User > updatePassword \n ${res_error}`,
|
|
2014
2269
|
});
|
|
2015
|
-
Logger({ level: "WARN", message: res_error });
|
|
2016
2270
|
}
|
|
2017
2271
|
|
|
2018
2272
|
return response;
|
|
2019
2273
|
}
|
|
2020
2274
|
|
|
2021
2275
|
/**
|
|
2022
|
-
* @param {
|
|
2023
|
-
* @param {
|
|
2024
|
-
* @
|
|
2025
|
-
* @
|
|
2276
|
+
* @param {UserApplicationValidator.UpdateProfileParam} arg - Arg object.
|
|
2277
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2278
|
+
* @returns {Promise<UserApplicationModel.ProfileEditSuccess>} - Success response
|
|
2279
|
+
* @name updateProfile
|
|
2026
2280
|
* @summary: Edit Profile Details
|
|
2027
|
-
* @description: Use this API to update details in the user profile. Details can be first name, last name, gender, email, phone number, or profile picture.
|
|
2281
|
+
* @description: Use this API to update details in the user profile. Details can be first name, last name, gender, email, phone number, or profile picture. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updateProfile/).
|
|
2028
2282
|
*/
|
|
2029
|
-
async updateProfile(
|
|
2030
|
-
|
|
2283
|
+
async updateProfile(
|
|
2284
|
+
{ body, platform } = {},
|
|
2285
|
+
{ headers } = { headers: false }
|
|
2286
|
+
) {
|
|
2287
|
+
const { error } = UserApplicationValidator.updateProfile().validate(
|
|
2031
2288
|
{ body, platform },
|
|
2032
2289
|
{ abortEarly: false, allowUnknown: true }
|
|
2033
2290
|
);
|
|
@@ -2036,16 +2293,17 @@ class User {
|
|
|
2036
2293
|
}
|
|
2037
2294
|
|
|
2038
2295
|
// Showing warrnings if extra unknown parameters are found
|
|
2039
|
-
const {
|
|
2296
|
+
const {
|
|
2297
|
+
error: warrning,
|
|
2298
|
+
} = UserApplicationValidator.updateProfile().validate(
|
|
2040
2299
|
{ body, platform },
|
|
2041
2300
|
{ abortEarly: false, allowUnknown: false }
|
|
2042
2301
|
);
|
|
2043
2302
|
if (warrning) {
|
|
2044
2303
|
Logger({
|
|
2045
2304
|
level: "WARN",
|
|
2046
|
-
message:
|
|
2305
|
+
message: `Parameter Validation warrnings for application > User > updateProfile \n ${warrning}`,
|
|
2047
2306
|
});
|
|
2048
|
-
Logger({ level: "WARN", message: warrning });
|
|
2049
2307
|
}
|
|
2050
2308
|
|
|
2051
2309
|
const query_params = {};
|
|
@@ -2062,12 +2320,18 @@ class User {
|
|
|
2062
2320
|
}),
|
|
2063
2321
|
query_params,
|
|
2064
2322
|
body,
|
|
2065
|
-
xHeaders
|
|
2323
|
+
xHeaders,
|
|
2324
|
+
{ headers }
|
|
2066
2325
|
);
|
|
2067
2326
|
|
|
2327
|
+
let responseData = response;
|
|
2328
|
+
if (headers) {
|
|
2329
|
+
responseData = response[0];
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2068
2332
|
const {
|
|
2069
2333
|
error: res_error,
|
|
2070
|
-
} =
|
|
2334
|
+
} = UserApplicationModel.ProfileEditSuccess().validate(responseData, {
|
|
2071
2335
|
abortEarly: false,
|
|
2072
2336
|
allowUnknown: false,
|
|
2073
2337
|
});
|
|
@@ -2075,23 +2339,23 @@ class User {
|
|
|
2075
2339
|
if (res_error) {
|
|
2076
2340
|
Logger({
|
|
2077
2341
|
level: "WARN",
|
|
2078
|
-
message:
|
|
2342
|
+
message: `Response Validation Warnnings for application > User > updateProfile \n ${res_error}`,
|
|
2079
2343
|
});
|
|
2080
|
-
Logger({ level: "WARN", message: res_error });
|
|
2081
2344
|
}
|
|
2082
2345
|
|
|
2083
2346
|
return response;
|
|
2084
2347
|
}
|
|
2085
2348
|
|
|
2086
2349
|
/**
|
|
2087
|
-
* @param {
|
|
2088
|
-
* @param {
|
|
2089
|
-
* @returns {Promise<VerifyEmailSuccess>} - Success response
|
|
2350
|
+
* @param {UserApplicationValidator.VerifyEmailParam} arg - Arg object.
|
|
2351
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2352
|
+
* @returns {Promise<UserApplicationModel.VerifyEmailSuccess>} - Success response
|
|
2353
|
+
* @name verifyEmail
|
|
2090
2354
|
* @summary: Verify email
|
|
2091
|
-
* @description: Use this API to send a verification code to verify an email.
|
|
2355
|
+
* @description: Use this API to send a verification code to verify an email. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyEmail/).
|
|
2092
2356
|
*/
|
|
2093
|
-
async verifyEmail({ body } = {}) {
|
|
2094
|
-
const { error } =
|
|
2357
|
+
async verifyEmail({ body } = {}, { headers } = { headers: false }) {
|
|
2358
|
+
const { error } = UserApplicationValidator.verifyEmail().validate(
|
|
2095
2359
|
{ body },
|
|
2096
2360
|
{ abortEarly: false, allowUnknown: true }
|
|
2097
2361
|
);
|
|
@@ -2100,16 +2364,15 @@ class User {
|
|
|
2100
2364
|
}
|
|
2101
2365
|
|
|
2102
2366
|
// Showing warrnings if extra unknown parameters are found
|
|
2103
|
-
const { error: warrning } =
|
|
2367
|
+
const { error: warrning } = UserApplicationValidator.verifyEmail().validate(
|
|
2104
2368
|
{ body },
|
|
2105
2369
|
{ abortEarly: false, allowUnknown: false }
|
|
2106
2370
|
);
|
|
2107
2371
|
if (warrning) {
|
|
2108
2372
|
Logger({
|
|
2109
2373
|
level: "WARN",
|
|
2110
|
-
message:
|
|
2374
|
+
message: `Parameter Validation warrnings for application > User > verifyEmail \n ${warrning}`,
|
|
2111
2375
|
});
|
|
2112
|
-
Logger({ level: "WARN", message: warrning });
|
|
2113
2376
|
}
|
|
2114
2377
|
|
|
2115
2378
|
const query_params = {};
|
|
@@ -2125,12 +2388,18 @@ class User {
|
|
|
2125
2388
|
}),
|
|
2126
2389
|
query_params,
|
|
2127
2390
|
body,
|
|
2128
|
-
xHeaders
|
|
2391
|
+
xHeaders,
|
|
2392
|
+
{ headers }
|
|
2129
2393
|
);
|
|
2130
2394
|
|
|
2395
|
+
let responseData = response;
|
|
2396
|
+
if (headers) {
|
|
2397
|
+
responseData = response[0];
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2131
2400
|
const {
|
|
2132
2401
|
error: res_error,
|
|
2133
|
-
} =
|
|
2402
|
+
} = UserApplicationModel.VerifyEmailSuccess().validate(responseData, {
|
|
2134
2403
|
abortEarly: false,
|
|
2135
2404
|
allowUnknown: false,
|
|
2136
2405
|
});
|
|
@@ -2138,24 +2407,26 @@ class User {
|
|
|
2138
2407
|
if (res_error) {
|
|
2139
2408
|
Logger({
|
|
2140
2409
|
level: "WARN",
|
|
2141
|
-
message:
|
|
2410
|
+
message: `Response Validation Warnnings for application > User > verifyEmail \n ${res_error}`,
|
|
2142
2411
|
});
|
|
2143
|
-
Logger({ level: "WARN", message: res_error });
|
|
2144
2412
|
}
|
|
2145
2413
|
|
|
2146
2414
|
return response;
|
|
2147
2415
|
}
|
|
2148
2416
|
|
|
2149
2417
|
/**
|
|
2150
|
-
* @param {
|
|
2151
|
-
* @param {
|
|
2152
|
-
* @
|
|
2153
|
-
* @
|
|
2418
|
+
* @param {UserApplicationValidator.VerifyEmailOTPParam} arg - Arg object.
|
|
2419
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2420
|
+
* @returns {Promise<UserApplicationModel.VerifyOtpSuccess>} - Success response
|
|
2421
|
+
* @name verifyEmailOTP
|
|
2154
2422
|
* @summary: Verify OTP on email
|
|
2155
|
-
* @description: Use this API to verify the OTP received on an email ID.
|
|
2423
|
+
* @description: Use this API to verify the OTP received on an email ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyEmailOTP/).
|
|
2156
2424
|
*/
|
|
2157
|
-
async verifyEmailOTP(
|
|
2158
|
-
|
|
2425
|
+
async verifyEmailOTP(
|
|
2426
|
+
{ body, platform } = {},
|
|
2427
|
+
{ headers } = { headers: false }
|
|
2428
|
+
) {
|
|
2429
|
+
const { error } = UserApplicationValidator.verifyEmailOTP().validate(
|
|
2159
2430
|
{ body, platform },
|
|
2160
2431
|
{ abortEarly: false, allowUnknown: true }
|
|
2161
2432
|
);
|
|
@@ -2164,16 +2435,17 @@ class User {
|
|
|
2164
2435
|
}
|
|
2165
2436
|
|
|
2166
2437
|
// Showing warrnings if extra unknown parameters are found
|
|
2167
|
-
const {
|
|
2438
|
+
const {
|
|
2439
|
+
error: warrning,
|
|
2440
|
+
} = UserApplicationValidator.verifyEmailOTP().validate(
|
|
2168
2441
|
{ body, platform },
|
|
2169
2442
|
{ abortEarly: false, allowUnknown: false }
|
|
2170
2443
|
);
|
|
2171
2444
|
if (warrning) {
|
|
2172
2445
|
Logger({
|
|
2173
2446
|
level: "WARN",
|
|
2174
|
-
message:
|
|
2447
|
+
message: `Parameter Validation warrnings for application > User > verifyEmailOTP \n ${warrning}`,
|
|
2175
2448
|
});
|
|
2176
|
-
Logger({ level: "WARN", message: warrning });
|
|
2177
2449
|
}
|
|
2178
2450
|
|
|
2179
2451
|
const query_params = {};
|
|
@@ -2190,34 +2462,42 @@ class User {
|
|
|
2190
2462
|
}),
|
|
2191
2463
|
query_params,
|
|
2192
2464
|
body,
|
|
2193
|
-
xHeaders
|
|
2465
|
+
xHeaders,
|
|
2466
|
+
{ headers }
|
|
2194
2467
|
);
|
|
2195
2468
|
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2469
|
+
let responseData = response;
|
|
2470
|
+
if (headers) {
|
|
2471
|
+
responseData = response[0];
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
const {
|
|
2475
|
+
error: res_error,
|
|
2476
|
+
} = UserApplicationModel.VerifyOtpSuccess().validate(responseData, {
|
|
2477
|
+
abortEarly: false,
|
|
2478
|
+
allowUnknown: false,
|
|
2479
|
+
});
|
|
2200
2480
|
|
|
2201
2481
|
if (res_error) {
|
|
2202
2482
|
Logger({
|
|
2203
2483
|
level: "WARN",
|
|
2204
|
-
message:
|
|
2484
|
+
message: `Response Validation Warnnings for application > User > verifyEmailOTP \n ${res_error}`,
|
|
2205
2485
|
});
|
|
2206
|
-
Logger({ level: "WARN", message: res_error });
|
|
2207
2486
|
}
|
|
2208
2487
|
|
|
2209
2488
|
return response;
|
|
2210
2489
|
}
|
|
2211
2490
|
|
|
2212
2491
|
/**
|
|
2213
|
-
* @param {
|
|
2214
|
-
* @param {
|
|
2215
|
-
* @returns {Promise<VerifyEmailSuccess>} - Success response
|
|
2492
|
+
* @param {UserApplicationValidator.VerifyMobileParam} arg - Arg object.
|
|
2493
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2494
|
+
* @returns {Promise<UserApplicationModel.VerifyEmailSuccess>} - Success response
|
|
2495
|
+
* @name verifyMobile
|
|
2216
2496
|
* @summary: Verify mobile
|
|
2217
|
-
* @description: Use this API to send a verification code to verify a mobile number.
|
|
2497
|
+
* @description: Use this API to send a verification code to verify a mobile number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyMobile/).
|
|
2218
2498
|
*/
|
|
2219
|
-
async verifyMobile({ body } = {}) {
|
|
2220
|
-
const { error } =
|
|
2499
|
+
async verifyMobile({ body } = {}, { headers } = { headers: false }) {
|
|
2500
|
+
const { error } = UserApplicationValidator.verifyMobile().validate(
|
|
2221
2501
|
{ body },
|
|
2222
2502
|
{ abortEarly: false, allowUnknown: true }
|
|
2223
2503
|
);
|
|
@@ -2226,16 +2506,17 @@ class User {
|
|
|
2226
2506
|
}
|
|
2227
2507
|
|
|
2228
2508
|
// Showing warrnings if extra unknown parameters are found
|
|
2229
|
-
const {
|
|
2509
|
+
const {
|
|
2510
|
+
error: warrning,
|
|
2511
|
+
} = UserApplicationValidator.verifyMobile().validate(
|
|
2230
2512
|
{ body },
|
|
2231
2513
|
{ abortEarly: false, allowUnknown: false }
|
|
2232
2514
|
);
|
|
2233
2515
|
if (warrning) {
|
|
2234
2516
|
Logger({
|
|
2235
2517
|
level: "WARN",
|
|
2236
|
-
message:
|
|
2518
|
+
message: `Parameter Validation warrnings for application > User > verifyMobile \n ${warrning}`,
|
|
2237
2519
|
});
|
|
2238
|
-
Logger({ level: "WARN", message: warrning });
|
|
2239
2520
|
}
|
|
2240
2521
|
|
|
2241
2522
|
const query_params = {};
|
|
@@ -2251,12 +2532,18 @@ class User {
|
|
|
2251
2532
|
}),
|
|
2252
2533
|
query_params,
|
|
2253
2534
|
body,
|
|
2254
|
-
xHeaders
|
|
2535
|
+
xHeaders,
|
|
2536
|
+
{ headers }
|
|
2255
2537
|
);
|
|
2256
2538
|
|
|
2539
|
+
let responseData = response;
|
|
2540
|
+
if (headers) {
|
|
2541
|
+
responseData = response[0];
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2257
2544
|
const {
|
|
2258
2545
|
error: res_error,
|
|
2259
|
-
} =
|
|
2546
|
+
} = UserApplicationModel.VerifyEmailSuccess().validate(responseData, {
|
|
2260
2547
|
abortEarly: false,
|
|
2261
2548
|
allowUnknown: false,
|
|
2262
2549
|
});
|
|
@@ -2264,24 +2551,26 @@ class User {
|
|
|
2264
2551
|
if (res_error) {
|
|
2265
2552
|
Logger({
|
|
2266
2553
|
level: "WARN",
|
|
2267
|
-
message:
|
|
2554
|
+
message: `Response Validation Warnnings for application > User > verifyMobile \n ${res_error}`,
|
|
2268
2555
|
});
|
|
2269
|
-
Logger({ level: "WARN", message: res_error });
|
|
2270
2556
|
}
|
|
2271
2557
|
|
|
2272
2558
|
return response;
|
|
2273
2559
|
}
|
|
2274
2560
|
|
|
2275
2561
|
/**
|
|
2276
|
-
* @param {
|
|
2277
|
-
* @param {
|
|
2278
|
-
* @
|
|
2279
|
-
* @
|
|
2562
|
+
* @param {UserApplicationValidator.VerifyMobileOTPParam} arg - Arg object.
|
|
2563
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2564
|
+
* @returns {Promise<UserApplicationModel.VerifyOtpSuccess>} - Success response
|
|
2565
|
+
* @name verifyMobileOTP
|
|
2280
2566
|
* @summary: Verify OTP on mobile
|
|
2281
|
-
* @description: Use this API to verify the OTP received on a mobile number.
|
|
2567
|
+
* @description: Use this API to verify the OTP received on a mobile number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyMobileOTP/).
|
|
2282
2568
|
*/
|
|
2283
|
-
async verifyMobileOTP(
|
|
2284
|
-
|
|
2569
|
+
async verifyMobileOTP(
|
|
2570
|
+
{ body, platform } = {},
|
|
2571
|
+
{ headers } = { headers: false }
|
|
2572
|
+
) {
|
|
2573
|
+
const { error } = UserApplicationValidator.verifyMobileOTP().validate(
|
|
2285
2574
|
{ body, platform },
|
|
2286
2575
|
{ abortEarly: false, allowUnknown: true }
|
|
2287
2576
|
);
|
|
@@ -2290,16 +2579,17 @@ class User {
|
|
|
2290
2579
|
}
|
|
2291
2580
|
|
|
2292
2581
|
// Showing warrnings if extra unknown parameters are found
|
|
2293
|
-
const {
|
|
2582
|
+
const {
|
|
2583
|
+
error: warrning,
|
|
2584
|
+
} = UserApplicationValidator.verifyMobileOTP().validate(
|
|
2294
2585
|
{ body, platform },
|
|
2295
2586
|
{ abortEarly: false, allowUnknown: false }
|
|
2296
2587
|
);
|
|
2297
2588
|
if (warrning) {
|
|
2298
2589
|
Logger({
|
|
2299
2590
|
level: "WARN",
|
|
2300
|
-
message:
|
|
2591
|
+
message: `Parameter Validation warrnings for application > User > verifyMobileOTP \n ${warrning}`,
|
|
2301
2592
|
});
|
|
2302
|
-
Logger({ level: "WARN", message: warrning });
|
|
2303
2593
|
}
|
|
2304
2594
|
|
|
2305
2595
|
const query_params = {};
|
|
@@ -2316,20 +2606,27 @@ class User {
|
|
|
2316
2606
|
}),
|
|
2317
2607
|
query_params,
|
|
2318
2608
|
body,
|
|
2319
|
-
xHeaders
|
|
2609
|
+
xHeaders,
|
|
2610
|
+
{ headers }
|
|
2320
2611
|
);
|
|
2321
2612
|
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2613
|
+
let responseData = response;
|
|
2614
|
+
if (headers) {
|
|
2615
|
+
responseData = response[0];
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
const {
|
|
2619
|
+
error: res_error,
|
|
2620
|
+
} = UserApplicationModel.VerifyOtpSuccess().validate(responseData, {
|
|
2621
|
+
abortEarly: false,
|
|
2622
|
+
allowUnknown: false,
|
|
2623
|
+
});
|
|
2326
2624
|
|
|
2327
2625
|
if (res_error) {
|
|
2328
2626
|
Logger({
|
|
2329
2627
|
level: "WARN",
|
|
2330
|
-
message:
|
|
2628
|
+
message: `Response Validation Warnnings for application > User > verifyMobileOTP \n ${res_error}`,
|
|
2331
2629
|
});
|
|
2332
|
-
Logger({ level: "WARN", message: res_error });
|
|
2333
2630
|
}
|
|
2334
2631
|
|
|
2335
2632
|
return response;
|