@gofynd/fdk-client-javascript 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -7
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +3 -3
- package/sdk/application/ApplicationAPIClient.js +6 -4
- package/sdk/application/ApplicationClient.d.ts +2 -3
- package/sdk/application/ApplicationClient.js +1 -45
- package/sdk/application/ApplicationConfig.d.ts +46 -6
- package/sdk/application/ApplicationConfig.js +15 -16
- package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
- package/sdk/application/Cart/CartApplicationClient.js +225 -134
- package/sdk/application/Cart/CartApplicationModel.d.ts +4 -4
- package/sdk/application/Cart/CartApplicationModel.js +4 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
- package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
- package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
- package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
- package/sdk/application/Common/CommonApplicationClient.js +13 -11
- package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
- package/sdk/application/Common/CommonApplicationModel.js +2 -58
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
- package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
- package/sdk/application/Content/ContentApplicationClient.js +159 -80
- package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
- package/sdk/application/Content/ContentApplicationModel.js +11 -763
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
- package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
- package/sdk/application/Lead/LeadApplicationClient.js +50 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
- package/sdk/application/Lead/LeadApplicationModel.js +21 -481
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
- package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
- package/sdk/application/Order/OrderApplicationClient.js +88 -56
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
- package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
- package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
- package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
- package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
- package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
- package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
- package/sdk/application/Share/ShareApplicationClient.js +51 -31
- package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
- package/sdk/application/Share/ShareApplicationModel.js +0 -38
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
- package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
- package/sdk/application/User/UserApplicationClient.d.ts +74 -35
- package/sdk/application/User/UserApplicationClient.js +252 -161
- package/sdk/application/User/UserApplicationModel.d.ts +3 -401
- package/sdk/application/User/UserApplicationModel.js +2 -490
- package/sdk/common/AxiosHelper.js +1 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +5 -4
- package/sdk/partner/PartnerAPIClient.js +7 -4
- package/sdk/partner/PartnerClient.d.ts +2 -0
- package/sdk/partner/PartnerClient.js +3 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
- package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
- package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
- package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
- package/sdk/platform/Cart/CartPlatformModel.js +104 -54
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
- package/sdk/platform/Common/CommonPlatformClient.js +13 -11
- package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
- package/sdk/platform/Common/CommonPlatformModel.js +23 -57
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
- package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
- package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
- package/sdk/platform/Content/ContentPlatformModel.js +8 -231
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
- package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
- package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
- package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
- package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
- package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
- package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
- package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
- package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
- package/sdk/platform/Order/OrderPlatformClient.js +738 -205
- package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
- package/sdk/platform/Order/OrderPlatformModel.js +225 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
- package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
- package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
- package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
- package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
- package/sdk/platform/PlatformAPIClient.d.ts +3 -3
- package/sdk/platform/PlatformAPIClient.js +2 -2
- package/sdk/platform/PlatformClient.d.ts +2 -2
- package/sdk/platform/PlatformClient.js +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
- package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
- package/sdk/platform/Share/SharePlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
- package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
- package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
- package/sdk/platform/User/UserPlatformModel.js +3 -899
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
- package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
- package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +96 -9
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +117 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
- package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
- package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
- package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -48
- package/sdk/application/ApplicationModels.js +0 -38
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
|
@@ -5,16 +5,6 @@ const Joi = require("joi");
|
|
|
5
5
|
* @property {string} [app_id]
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* @typedef ArchiveUserRequestSchema
|
|
10
|
-
* @property {string} [user_id]
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @typedef ArchiveUserSuccess
|
|
15
|
-
* @property {boolean} [success]
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
8
|
/**
|
|
19
9
|
* @typedef AuthenticationApiErrorSchema
|
|
20
10
|
* @property {string} [message]
|
|
@@ -32,90 +22,11 @@ const Joi = require("joi");
|
|
|
32
22
|
* @property {boolean} [user_exists]
|
|
33
23
|
*/
|
|
34
24
|
|
|
35
|
-
/**
|
|
36
|
-
* @typedef AuthSuccessUser
|
|
37
|
-
* @property {boolean} [active]
|
|
38
|
-
* @property {AuthSuccessUserDebug} [debug]
|
|
39
|
-
* @property {AuthSuccessUserEmails} [emails]
|
|
40
|
-
* @property {string} [first_name]
|
|
41
|
-
* @property {string} [last_name]
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @typedef AuthSuccessUserDebug
|
|
46
|
-
* @property {string} [platform]
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @typedef AuthSuccessUserEmails
|
|
51
|
-
* @property {boolean} [active]
|
|
52
|
-
* @property {string} [email]
|
|
53
|
-
* @property {boolean} [primary]
|
|
54
|
-
* @property {boolean} [verified]
|
|
55
|
-
*/
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @typedef BlockUserRequestSchema
|
|
59
|
-
* @property {string} [reason]
|
|
60
|
-
* @property {boolean} [status]
|
|
61
|
-
* @property {string[]} [user_id]
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @typedef BlockUserSuccess
|
|
66
|
-
* @property {boolean} [success]
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
25
|
/**
|
|
70
26
|
* @typedef CodeRequestBodySchema
|
|
71
27
|
* @property {string} [code]
|
|
72
28
|
*/
|
|
73
29
|
|
|
74
|
-
/**
|
|
75
|
-
* @typedef CreateUserGroupSchema
|
|
76
|
-
* @property {string} description
|
|
77
|
-
* @property {string} file_url
|
|
78
|
-
* @property {string} name
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @typedef CreateUserRequestSchema
|
|
83
|
-
* @property {string} [email]
|
|
84
|
-
* @property {string} [first_name]
|
|
85
|
-
* @property {string} [gender]
|
|
86
|
-
* @property {string} [last_name]
|
|
87
|
-
* @property {Object} [meta]
|
|
88
|
-
* @property {string} phone_number
|
|
89
|
-
* @property {string} username
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* @typedef CreateUserResponseSchema
|
|
94
|
-
* @property {UserSchema} [user]
|
|
95
|
-
*/
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* @typedef CreateUserSessionRequestSchema
|
|
99
|
-
* @property {string} [domain]
|
|
100
|
-
* @property {number} [max_age]
|
|
101
|
-
* @property {string} [user_id]
|
|
102
|
-
*/
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* @typedef CreateUserSessionResponseSchema
|
|
106
|
-
* @property {Object} [cookie]
|
|
107
|
-
* @property {string} [domain]
|
|
108
|
-
* @property {boolean} [http_only]
|
|
109
|
-
* @property {number} [max_age]
|
|
110
|
-
* @property {boolean} [secure]
|
|
111
|
-
*/
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* @typedef CustomerListResponseSchema
|
|
115
|
-
* @property {UserSchema[]} [items]
|
|
116
|
-
* @property {PaginationSchema} [page]
|
|
117
|
-
*/
|
|
118
|
-
|
|
119
30
|
/**
|
|
120
31
|
* @typedef DeleteAccountConsent
|
|
121
32
|
* @property {string} [consent_text]
|
|
@@ -261,11 +172,6 @@ const Joi = require("joi");
|
|
|
261
172
|
* @property {boolean} [fynd_default]
|
|
262
173
|
*/
|
|
263
174
|
|
|
264
|
-
/**
|
|
265
|
-
* @typedef NotFoundSchema
|
|
266
|
-
* @property {string} [message]
|
|
267
|
-
*/
|
|
268
|
-
|
|
269
175
|
/**
|
|
270
176
|
* @typedef OAuthRequestAppleSchema
|
|
271
177
|
* @property {OAuthRequestAppleSchemaOauth} [oauth]
|
|
@@ -321,15 +227,6 @@ const Joi = require("joi");
|
|
|
321
227
|
* @property {boolean} [success]
|
|
322
228
|
*/
|
|
323
229
|
|
|
324
|
-
/**
|
|
325
|
-
* @typedef PaginationSchema
|
|
326
|
-
* @property {number} [current]
|
|
327
|
-
* @property {boolean} [has_next]
|
|
328
|
-
* @property {number} [item_total]
|
|
329
|
-
* @property {number} [size]
|
|
330
|
-
* @property {string} [type]
|
|
331
|
-
*/
|
|
332
|
-
|
|
333
230
|
/**
|
|
334
231
|
* @typedef PasswordLoginRequestSchema
|
|
335
232
|
* @property {string} [captcha_code]
|
|
@@ -406,17 +303,6 @@ const Joi = require("joi");
|
|
|
406
303
|
* @property {boolean} [verify_mobile_otp]
|
|
407
304
|
*/
|
|
408
305
|
|
|
409
|
-
/**
|
|
410
|
-
* @typedef ProfileEditSuccessSchema
|
|
411
|
-
* @property {string} [email]
|
|
412
|
-
* @property {string} [register_token]
|
|
413
|
-
* @property {string} [user]
|
|
414
|
-
* @property {boolean} [user_exists]
|
|
415
|
-
* @property {boolean} [verify_email_link]
|
|
416
|
-
* @property {boolean} [verify_email_otp]
|
|
417
|
-
* @property {boolean} [verify_mobile_otp]
|
|
418
|
-
*/
|
|
419
|
-
|
|
420
306
|
/**
|
|
421
307
|
* @typedef RegisterFormSuccess
|
|
422
308
|
* @property {string} [country_code]
|
|
@@ -466,6 +352,7 @@ const Joi = require("joi");
|
|
|
466
352
|
/**
|
|
467
353
|
* @typedef SendEmailOtpRequestSchema
|
|
468
354
|
* @property {string} [action]
|
|
355
|
+
* @property {string} [captcha_code]
|
|
469
356
|
* @property {string} [email]
|
|
470
357
|
* @property {string} [register_token]
|
|
471
358
|
* @property {string} [token]
|
|
@@ -539,11 +426,6 @@ const Joi = require("joi");
|
|
|
539
426
|
* @property {boolean} [verified]
|
|
540
427
|
*/
|
|
541
428
|
|
|
542
|
-
/**
|
|
543
|
-
* @typedef SessionDeleteResponseSchema
|
|
544
|
-
* @property {string[]} [items]
|
|
545
|
-
*/
|
|
546
|
-
|
|
547
429
|
/**
|
|
548
430
|
* @typedef SessionExpiry
|
|
549
431
|
* @property {number} [duration]
|
|
@@ -551,20 +433,6 @@ const Joi = require("joi");
|
|
|
551
433
|
* @property {string} [type]
|
|
552
434
|
*/
|
|
553
435
|
|
|
554
|
-
/**
|
|
555
|
-
* @typedef SessionListResponseInfo
|
|
556
|
-
* @property {string} [domain]
|
|
557
|
-
* @property {string} [expire_in]
|
|
558
|
-
* @property {string} [ip]
|
|
559
|
-
* @property {string} [session_id]
|
|
560
|
-
* @property {string} [user_agent]
|
|
561
|
-
*/
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* @typedef SessionListResponseSchema
|
|
565
|
-
* @property {SessionListResponseInfo[]} [items]
|
|
566
|
-
*/
|
|
567
|
-
|
|
568
436
|
/**
|
|
569
437
|
* @typedef SessionListSuccess
|
|
570
438
|
* @property {string[]} [sessions]
|
|
@@ -590,94 +458,17 @@ const Joi = require("joi");
|
|
|
590
458
|
* @property {string} [token]
|
|
591
459
|
*/
|
|
592
460
|
|
|
593
|
-
/**
|
|
594
|
-
* @typedef UnauthenticatedSchema
|
|
595
|
-
* @property {boolean} [authenticated]
|
|
596
|
-
*/
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* @typedef UnauthorizedSchema
|
|
600
|
-
* @property {string} [message]
|
|
601
|
-
*/
|
|
602
|
-
|
|
603
|
-
/**
|
|
604
|
-
* @typedef UnDeleteUserRequestSchema
|
|
605
|
-
* @property {string} [reason]
|
|
606
|
-
* @property {string} [reason_id]
|
|
607
|
-
* @property {string} [user_id]
|
|
608
|
-
*/
|
|
609
|
-
|
|
610
|
-
/**
|
|
611
|
-
* @typedef UnDeleteUserSuccess
|
|
612
|
-
* @property {boolean} [success]
|
|
613
|
-
*/
|
|
614
|
-
|
|
615
461
|
/**
|
|
616
462
|
* @typedef UpdatePasswordRequestSchema
|
|
617
463
|
* @property {string} [new_password]
|
|
618
464
|
* @property {string} [old_password]
|
|
619
465
|
*/
|
|
620
466
|
|
|
621
|
-
/**
|
|
622
|
-
* @typedef UpdateUserGroupSchema
|
|
623
|
-
* @property {string} [description]
|
|
624
|
-
* @property {string} [file_url]
|
|
625
|
-
* @property {string} [name]
|
|
626
|
-
*/
|
|
627
|
-
|
|
628
|
-
/**
|
|
629
|
-
* @typedef UpdateUserRequestSchema
|
|
630
|
-
* @property {UserEmails[]} [emails]
|
|
631
|
-
* @property {string} [external_id]
|
|
632
|
-
* @property {string} [first_name]
|
|
633
|
-
* @property {string} [gender]
|
|
634
|
-
* @property {string} [last_name]
|
|
635
|
-
* @property {Object} [meta]
|
|
636
|
-
* @property {UserPhoneNumbers[]} [phone_numbers]
|
|
637
|
-
*/
|
|
638
|
-
|
|
639
|
-
/**
|
|
640
|
-
* @typedef UserEmails
|
|
641
|
-
* @property {boolean} [active]
|
|
642
|
-
* @property {string} [email]
|
|
643
|
-
* @property {boolean} [primary]
|
|
644
|
-
* @property {boolean} [verified]
|
|
645
|
-
*/
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* @typedef UserGroupListResponseSchema
|
|
649
|
-
* @property {UserGroupResponseSchema[]} [items]
|
|
650
|
-
* @property {PaginationSchema} [page]
|
|
651
|
-
*/
|
|
652
|
-
|
|
653
|
-
/**
|
|
654
|
-
* @typedef UserGroupResponseSchema
|
|
655
|
-
* @property {number} [__v]
|
|
656
|
-
* @property {string} [_id]
|
|
657
|
-
* @property {string} [application_id]
|
|
658
|
-
* @property {string} [created_at]
|
|
659
|
-
* @property {string} [description]
|
|
660
|
-
* @property {string} [file_url]
|
|
661
|
-
* @property {string} [modified_at]
|
|
662
|
-
* @property {string} [name]
|
|
663
|
-
* @property {string} [status]
|
|
664
|
-
* @property {number} [uid]
|
|
665
|
-
*/
|
|
666
|
-
|
|
667
467
|
/**
|
|
668
468
|
* @typedef UserObjectSchema
|
|
669
469
|
* @property {UserSchema} [user]
|
|
670
470
|
*/
|
|
671
471
|
|
|
672
|
-
/**
|
|
673
|
-
* @typedef UserPhoneNumbers
|
|
674
|
-
* @property {boolean} [active]
|
|
675
|
-
* @property {string} [country_code]
|
|
676
|
-
* @property {string} [phone]
|
|
677
|
-
* @property {boolean} [primary]
|
|
678
|
-
* @property {boolean} [verified]
|
|
679
|
-
*/
|
|
680
|
-
|
|
681
472
|
/**
|
|
682
473
|
* @typedef UserSchema
|
|
683
474
|
* @property {string} [_id]
|
|
@@ -698,11 +489,6 @@ const Joi = require("joi");
|
|
|
698
489
|
* @property {string} [username]
|
|
699
490
|
*/
|
|
700
491
|
|
|
701
|
-
/**
|
|
702
|
-
* @typedef UserSearchResponseSchema
|
|
703
|
-
* @property {UserSchema[]} [users]
|
|
704
|
-
*/
|
|
705
|
-
|
|
706
492
|
/**
|
|
707
493
|
* @typedef VerifyEmailOtpRequestSchema
|
|
708
494
|
* @property {string} [action]
|
|
@@ -750,20 +536,6 @@ class UserApplicationModel {
|
|
|
750
536
|
});
|
|
751
537
|
}
|
|
752
538
|
|
|
753
|
-
/** @returns {ArchiveUserRequestSchema} */
|
|
754
|
-
static ArchiveUserRequestSchema() {
|
|
755
|
-
return Joi.object({
|
|
756
|
-
user_id: Joi.string().allow(""),
|
|
757
|
-
});
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
/** @returns {ArchiveUserSuccess} */
|
|
761
|
-
static ArchiveUserSuccess() {
|
|
762
|
-
return Joi.object({
|
|
763
|
-
success: Joi.boolean(),
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
|
-
|
|
767
539
|
/** @returns {AuthenticationApiErrorSchema} */
|
|
768
540
|
static AuthenticationApiErrorSchema() {
|
|
769
541
|
return Joi.object({
|
|
@@ -787,50 +559,6 @@ class UserApplicationModel {
|
|
|
787
559
|
});
|
|
788
560
|
}
|
|
789
561
|
|
|
790
|
-
/** @returns {AuthSuccessUser} */
|
|
791
|
-
static AuthSuccessUser() {
|
|
792
|
-
return Joi.object({
|
|
793
|
-
active: Joi.boolean(),
|
|
794
|
-
debug: UserApplicationModel.AuthSuccessUserDebug(),
|
|
795
|
-
emails: UserApplicationModel.AuthSuccessUserEmails(),
|
|
796
|
-
first_name: Joi.string().allow(""),
|
|
797
|
-
last_name: Joi.string().allow(""),
|
|
798
|
-
});
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
/** @returns {AuthSuccessUserDebug} */
|
|
802
|
-
static AuthSuccessUserDebug() {
|
|
803
|
-
return Joi.object({
|
|
804
|
-
platform: Joi.string().allow(""),
|
|
805
|
-
});
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
/** @returns {AuthSuccessUserEmails} */
|
|
809
|
-
static AuthSuccessUserEmails() {
|
|
810
|
-
return Joi.object({
|
|
811
|
-
active: Joi.boolean(),
|
|
812
|
-
email: Joi.string().allow(""),
|
|
813
|
-
primary: Joi.boolean(),
|
|
814
|
-
verified: Joi.boolean(),
|
|
815
|
-
});
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
/** @returns {BlockUserRequestSchema} */
|
|
819
|
-
static BlockUserRequestSchema() {
|
|
820
|
-
return Joi.object({
|
|
821
|
-
reason: Joi.string().allow(""),
|
|
822
|
-
status: Joi.boolean(),
|
|
823
|
-
user_id: Joi.array().items(Joi.string().allow("")),
|
|
824
|
-
});
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
/** @returns {BlockUserSuccess} */
|
|
828
|
-
static BlockUserSuccess() {
|
|
829
|
-
return Joi.object({
|
|
830
|
-
success: Joi.boolean(),
|
|
831
|
-
});
|
|
832
|
-
}
|
|
833
|
-
|
|
834
562
|
/** @returns {CodeRequestBodySchema} */
|
|
835
563
|
static CodeRequestBodySchema() {
|
|
836
564
|
return Joi.object({
|
|
@@ -838,63 +566,6 @@ class UserApplicationModel {
|
|
|
838
566
|
});
|
|
839
567
|
}
|
|
840
568
|
|
|
841
|
-
/** @returns {CreateUserGroupSchema} */
|
|
842
|
-
static CreateUserGroupSchema() {
|
|
843
|
-
return Joi.object({
|
|
844
|
-
description: Joi.string().allow("").required(),
|
|
845
|
-
file_url: Joi.string().allow("").required(),
|
|
846
|
-
name: Joi.string().allow("").required(),
|
|
847
|
-
});
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
/** @returns {CreateUserRequestSchema} */
|
|
851
|
-
static CreateUserRequestSchema() {
|
|
852
|
-
return Joi.object({
|
|
853
|
-
email: Joi.string().allow(""),
|
|
854
|
-
first_name: Joi.string().allow(""),
|
|
855
|
-
gender: Joi.string().allow(""),
|
|
856
|
-
last_name: Joi.string().allow(""),
|
|
857
|
-
meta: Joi.any(),
|
|
858
|
-
phone_number: Joi.string().allow("").required(),
|
|
859
|
-
username: Joi.string().allow("").required(),
|
|
860
|
-
});
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
/** @returns {CreateUserResponseSchema} */
|
|
864
|
-
static CreateUserResponseSchema() {
|
|
865
|
-
return Joi.object({
|
|
866
|
-
user: UserApplicationModel.UserSchema(),
|
|
867
|
-
});
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
/** @returns {CreateUserSessionRequestSchema} */
|
|
871
|
-
static CreateUserSessionRequestSchema() {
|
|
872
|
-
return Joi.object({
|
|
873
|
-
domain: Joi.string().allow(""),
|
|
874
|
-
max_age: Joi.number(),
|
|
875
|
-
user_id: Joi.string().allow(""),
|
|
876
|
-
});
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
/** @returns {CreateUserSessionResponseSchema} */
|
|
880
|
-
static CreateUserSessionResponseSchema() {
|
|
881
|
-
return Joi.object({
|
|
882
|
-
cookie: Joi.any(),
|
|
883
|
-
domain: Joi.string().allow(""),
|
|
884
|
-
http_only: Joi.boolean(),
|
|
885
|
-
max_age: Joi.number(),
|
|
886
|
-
secure: Joi.boolean(),
|
|
887
|
-
});
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
/** @returns {CustomerListResponseSchema} */
|
|
891
|
-
static CustomerListResponseSchema() {
|
|
892
|
-
return Joi.object({
|
|
893
|
-
items: Joi.array().items(UserApplicationModel.UserSchema()),
|
|
894
|
-
page: UserApplicationModel.PaginationSchema(),
|
|
895
|
-
});
|
|
896
|
-
}
|
|
897
|
-
|
|
898
569
|
/** @returns {DeleteAccountConsent} */
|
|
899
570
|
static DeleteAccountConsent() {
|
|
900
571
|
return Joi.object({
|
|
@@ -1084,13 +755,6 @@ class UserApplicationModel {
|
|
|
1084
755
|
});
|
|
1085
756
|
}
|
|
1086
757
|
|
|
1087
|
-
/** @returns {NotFoundSchema} */
|
|
1088
|
-
static NotFoundSchema() {
|
|
1089
|
-
return Joi.object({
|
|
1090
|
-
message: Joi.string().allow(""),
|
|
1091
|
-
});
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
758
|
/** @returns {OAuthRequestAppleSchema} */
|
|
1095
759
|
static OAuthRequestAppleSchema() {
|
|
1096
760
|
return Joi.object({
|
|
@@ -1160,17 +824,6 @@ class UserApplicationModel {
|
|
|
1160
824
|
});
|
|
1161
825
|
}
|
|
1162
826
|
|
|
1163
|
-
/** @returns {PaginationSchema} */
|
|
1164
|
-
static PaginationSchema() {
|
|
1165
|
-
return Joi.object({
|
|
1166
|
-
current: Joi.number(),
|
|
1167
|
-
has_next: Joi.boolean(),
|
|
1168
|
-
item_total: Joi.number(),
|
|
1169
|
-
size: Joi.number(),
|
|
1170
|
-
type: Joi.string().allow(""),
|
|
1171
|
-
});
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
827
|
/** @returns {PasswordLoginRequestSchema} */
|
|
1175
828
|
static PasswordLoginRequestSchema() {
|
|
1176
829
|
return Joi.object({
|
|
@@ -1261,19 +914,6 @@ class UserApplicationModel {
|
|
|
1261
914
|
});
|
|
1262
915
|
}
|
|
1263
916
|
|
|
1264
|
-
/** @returns {ProfileEditSuccessSchema} */
|
|
1265
|
-
static ProfileEditSuccessSchema() {
|
|
1266
|
-
return Joi.object({
|
|
1267
|
-
email: Joi.string().allow(""),
|
|
1268
|
-
register_token: Joi.string().allow(""),
|
|
1269
|
-
user: Joi.string().allow(""),
|
|
1270
|
-
user_exists: Joi.boolean(),
|
|
1271
|
-
verify_email_link: Joi.boolean(),
|
|
1272
|
-
verify_email_otp: Joi.boolean(),
|
|
1273
|
-
verify_mobile_otp: Joi.boolean(),
|
|
1274
|
-
});
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
917
|
/** @returns {RegisterFormSuccess} */
|
|
1278
918
|
static RegisterFormSuccess() {
|
|
1279
919
|
return Joi.object({
|
|
@@ -1336,6 +976,7 @@ class UserApplicationModel {
|
|
|
1336
976
|
static SendEmailOtpRequestSchema() {
|
|
1337
977
|
return Joi.object({
|
|
1338
978
|
action: Joi.string().allow(""),
|
|
979
|
+
captcha_code: Joi.string().allow(""),
|
|
1339
980
|
email: Joi.string().allow(""),
|
|
1340
981
|
register_token: Joi.string().allow(""),
|
|
1341
982
|
token: Joi.string().allow(""),
|
|
@@ -1426,13 +1067,6 @@ class UserApplicationModel {
|
|
|
1426
1067
|
});
|
|
1427
1068
|
}
|
|
1428
1069
|
|
|
1429
|
-
/** @returns {SessionDeleteResponseSchema} */
|
|
1430
|
-
static SessionDeleteResponseSchema() {
|
|
1431
|
-
return Joi.object({
|
|
1432
|
-
items: Joi.array().items(Joi.string().allow("")),
|
|
1433
|
-
});
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
1070
|
/** @returns {SessionExpiry} */
|
|
1437
1071
|
static SessionExpiry() {
|
|
1438
1072
|
return Joi.object({
|
|
@@ -1442,24 +1076,6 @@ class UserApplicationModel {
|
|
|
1442
1076
|
});
|
|
1443
1077
|
}
|
|
1444
1078
|
|
|
1445
|
-
/** @returns {SessionListResponseInfo} */
|
|
1446
|
-
static SessionListResponseInfo() {
|
|
1447
|
-
return Joi.object({
|
|
1448
|
-
domain: Joi.string().allow(""),
|
|
1449
|
-
expire_in: Joi.string().allow(""),
|
|
1450
|
-
ip: Joi.string().allow(""),
|
|
1451
|
-
session_id: Joi.string().allow(""),
|
|
1452
|
-
user_agent: Joi.string().allow(""),
|
|
1453
|
-
});
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
/** @returns {SessionListResponseSchema} */
|
|
1457
|
-
static SessionListResponseSchema() {
|
|
1458
|
-
return Joi.object({
|
|
1459
|
-
items: Joi.array().items(UserApplicationModel.SessionListResponseInfo()),
|
|
1460
|
-
});
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
1079
|
/** @returns {SessionListSuccess} */
|
|
1464
1080
|
static SessionListSuccess() {
|
|
1465
1081
|
return Joi.object({
|
|
@@ -1493,36 +1109,6 @@ class UserApplicationModel {
|
|
|
1493
1109
|
});
|
|
1494
1110
|
}
|
|
1495
1111
|
|
|
1496
|
-
/** @returns {UnauthenticatedSchema} */
|
|
1497
|
-
static UnauthenticatedSchema() {
|
|
1498
|
-
return Joi.object({
|
|
1499
|
-
authenticated: Joi.boolean(),
|
|
1500
|
-
});
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
/** @returns {UnauthorizedSchema} */
|
|
1504
|
-
static UnauthorizedSchema() {
|
|
1505
|
-
return Joi.object({
|
|
1506
|
-
message: Joi.string().allow(""),
|
|
1507
|
-
});
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
|
-
/** @returns {UnDeleteUserRequestSchema} */
|
|
1511
|
-
static UnDeleteUserRequestSchema() {
|
|
1512
|
-
return Joi.object({
|
|
1513
|
-
reason: Joi.string().allow(""),
|
|
1514
|
-
reason_id: Joi.string().allow(""),
|
|
1515
|
-
user_id: Joi.string().allow(""),
|
|
1516
|
-
});
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
/** @returns {UnDeleteUserSuccess} */
|
|
1520
|
-
static UnDeleteUserSuccess() {
|
|
1521
|
-
return Joi.object({
|
|
1522
|
-
success: Joi.boolean(),
|
|
1523
|
-
});
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
1112
|
/** @returns {UpdatePasswordRequestSchema} */
|
|
1527
1113
|
static UpdatePasswordRequestSchema() {
|
|
1528
1114
|
return Joi.object({
|
|
@@ -1531,62 +1117,6 @@ class UserApplicationModel {
|
|
|
1531
1117
|
});
|
|
1532
1118
|
}
|
|
1533
1119
|
|
|
1534
|
-
/** @returns {UpdateUserGroupSchema} */
|
|
1535
|
-
static UpdateUserGroupSchema() {
|
|
1536
|
-
return Joi.object({
|
|
1537
|
-
description: Joi.string().allow(""),
|
|
1538
|
-
file_url: Joi.string().allow(""),
|
|
1539
|
-
name: Joi.string().allow(""),
|
|
1540
|
-
});
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
/** @returns {UpdateUserRequestSchema} */
|
|
1544
|
-
static UpdateUserRequestSchema() {
|
|
1545
|
-
return Joi.object({
|
|
1546
|
-
emails: Joi.array().items(UserApplicationModel.UserEmails()),
|
|
1547
|
-
external_id: Joi.string().allow(""),
|
|
1548
|
-
first_name: Joi.string().allow(""),
|
|
1549
|
-
gender: Joi.string().allow(""),
|
|
1550
|
-
last_name: Joi.string().allow(""),
|
|
1551
|
-
meta: Joi.any(),
|
|
1552
|
-
phone_numbers: Joi.array().items(UserApplicationModel.UserPhoneNumbers()),
|
|
1553
|
-
});
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
/** @returns {UserEmails} */
|
|
1557
|
-
static UserEmails() {
|
|
1558
|
-
return Joi.object({
|
|
1559
|
-
active: Joi.boolean(),
|
|
1560
|
-
email: Joi.string().allow(""),
|
|
1561
|
-
primary: Joi.boolean(),
|
|
1562
|
-
verified: Joi.boolean(),
|
|
1563
|
-
});
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
/** @returns {UserGroupListResponseSchema} */
|
|
1567
|
-
static UserGroupListResponseSchema() {
|
|
1568
|
-
return Joi.object({
|
|
1569
|
-
items: Joi.array().items(UserApplicationModel.UserGroupResponseSchema()),
|
|
1570
|
-
page: UserApplicationModel.PaginationSchema(),
|
|
1571
|
-
});
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
/** @returns {UserGroupResponseSchema} */
|
|
1575
|
-
static UserGroupResponseSchema() {
|
|
1576
|
-
return Joi.object({
|
|
1577
|
-
__v: Joi.number(),
|
|
1578
|
-
_id: Joi.string().allow(""),
|
|
1579
|
-
application_id: Joi.string().allow(""),
|
|
1580
|
-
created_at: Joi.string().allow(""),
|
|
1581
|
-
description: Joi.string().allow(""),
|
|
1582
|
-
file_url: Joi.string().allow(""),
|
|
1583
|
-
modified_at: Joi.string().allow(""),
|
|
1584
|
-
name: Joi.string().allow(""),
|
|
1585
|
-
status: Joi.string().allow(""),
|
|
1586
|
-
uid: Joi.number(),
|
|
1587
|
-
});
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
1120
|
/** @returns {UserObjectSchema} */
|
|
1591
1121
|
static UserObjectSchema() {
|
|
1592
1122
|
return Joi.object({
|
|
@@ -1594,17 +1124,6 @@ class UserApplicationModel {
|
|
|
1594
1124
|
});
|
|
1595
1125
|
}
|
|
1596
1126
|
|
|
1597
|
-
/** @returns {UserPhoneNumbers} */
|
|
1598
|
-
static UserPhoneNumbers() {
|
|
1599
|
-
return Joi.object({
|
|
1600
|
-
active: Joi.boolean(),
|
|
1601
|
-
country_code: Joi.string().allow(""),
|
|
1602
|
-
phone: Joi.string().allow(""),
|
|
1603
|
-
primary: Joi.boolean(),
|
|
1604
|
-
verified: Joi.boolean(),
|
|
1605
|
-
});
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
1127
|
/** @returns {UserSchema} */
|
|
1609
1128
|
static UserSchema() {
|
|
1610
1129
|
return Joi.object({
|
|
@@ -1627,13 +1146,6 @@ class UserApplicationModel {
|
|
|
1627
1146
|
});
|
|
1628
1147
|
}
|
|
1629
1148
|
|
|
1630
|
-
/** @returns {UserSearchResponseSchema} */
|
|
1631
|
-
static UserSearchResponseSchema() {
|
|
1632
|
-
return Joi.object({
|
|
1633
|
-
users: Joi.array().items(UserApplicationModel.UserSchema()),
|
|
1634
|
-
});
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
1149
|
/** @returns {VerifyEmailOtpRequestSchema} */
|
|
1638
1150
|
static VerifyEmailOtpRequestSchema() {
|
|
1639
1151
|
return Joi.object({
|
|
@@ -115,7 +115,6 @@ fdkAxios.interceptors.request.use(requestInterceptorFn());
|
|
|
115
115
|
fdkAxios.interceptors.response.use(
|
|
116
116
|
function (response) {
|
|
117
117
|
if (response.config.method == "head") {
|
|
118
|
-
// TODO: what to do for `head` method
|
|
119
118
|
return response.headers;
|
|
120
119
|
}
|
|
121
120
|
Logger({
|
|
@@ -125,7 +124,7 @@ fdkAxios.interceptors.response.use(
|
|
|
125
124
|
url: response.config.url,
|
|
126
125
|
});
|
|
127
126
|
|
|
128
|
-
if (response.config.
|
|
127
|
+
if (response.config.responseHeaders) {
|
|
129
128
|
return [response.data, response.headers];
|
|
130
129
|
}
|
|
131
130
|
return response.data;
|
package/sdk/common/FDKError.d.ts
CHANGED
package/sdk/common/FDKError.js
CHANGED
|
@@ -42,10 +42,18 @@ class FDKOAuthCodeError extends Error {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
class FDKException extends Error {
|
|
46
|
+
constructor(message) {
|
|
47
|
+
super(message);
|
|
48
|
+
this.name = "FDKException";
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
45
52
|
module.exports = {
|
|
46
53
|
FDKServerResponseError,
|
|
47
54
|
FDKClientValidationError,
|
|
48
55
|
FDKInvalidCredentialError,
|
|
49
56
|
FDKTokenIssueError,
|
|
50
57
|
FDKOAuthCodeError,
|
|
58
|
+
FDKException,
|
|
51
59
|
};
|
package/sdk/common/utils.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export function findBestMatchingLink(allLinks?: any[], pathname?: string): {
|
|
|
8
8
|
params: {};
|
|
9
9
|
};
|
|
10
10
|
export function validURL(str: any): boolean;
|
|
11
|
+
export function convertStringToBase64(string: any): string;
|
|
12
|
+
export function isBrowser(): boolean;
|
|
13
|
+
export function isNode(): boolean;
|
|
11
14
|
export namespace NAV_TYPE {
|
|
12
15
|
const PAGE: string;
|
|
13
16
|
const POPUP: string;
|