@gofynd/fdk-client-javascript 1.4.2-beta.1 → 1.4.2-beta.3
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 +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
- package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
- package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
- package/sdk/application/Content/ContentApplicationModel.js +757 -757
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
- package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
- package/sdk/application/Order/OrderApplicationModel.d.ts +846 -846
- package/sdk/application/Order/OrderApplicationModel.js +822 -822
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +2155 -2150
- package/sdk/application/Payment/PaymentApplicationModel.js +1460 -1458
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
- package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
- package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
- package/sdk/application/User/UserApplicationModel.d.ts +762 -762
- package/sdk/application/User/UserApplicationModel.js +738 -738
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
- package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
- package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
- package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
- package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
- package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -1013
- package/sdk/platform/Catalog/CatalogPlatformModel.js +923 -923
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1833 -1833
- package/sdk/platform/Content/ContentPlatformModel.js +1837 -1837
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
- package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +865 -865
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +877 -877
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
- package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
- package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5180 -5176
- package/sdk/platform/Order/OrderPlatformModel.js +4740 -4736
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2670 -2660
- package/sdk/platform/Payment/PaymentPlatformModel.js +1831 -1827
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1505 -1507
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1532 -1536
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
- package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
- package/sdk/platform/User/UserPlatformModel.d.ts +758 -758
- package/sdk/platform/User/UserPlatformModel.js +643 -643
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
- package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
- package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
- package/sdk/public/Billing/BillingPublicModel.js +51 -51
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
- package/sdk/public/Content/ContentPublicModel.js +28 -28
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
- package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
|
@@ -1,113 +1,128 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {string} [
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @typedef ArchiveUserRequestSchema
|
|
10
|
-
* @property {string} [user_id]
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @typedef ArchiveUserSuccess
|
|
15
|
-
* @property {boolean} [success]
|
|
4
|
+
* @typedef SuccessMessageResponse
|
|
5
|
+
* @property {string} [success]
|
|
16
6
|
*/
|
|
17
7
|
|
|
18
8
|
/**
|
|
19
|
-
* @typedef
|
|
20
|
-
* @property {string} [
|
|
9
|
+
* @typedef UserAttributeDefinition
|
|
10
|
+
* @property {string} [_id] - The unique identifier for the attribute definition.
|
|
11
|
+
* @property {string} [name] - The attribute name.
|
|
12
|
+
* @property {string} [slug] - The attribute key.
|
|
13
|
+
* @property {string} [description] - The description of the attribute.
|
|
14
|
+
* @property {string} [application_id] - The application ID.
|
|
15
|
+
* @property {string} [type] - The attribute type.
|
|
16
|
+
* @property {boolean} [multi_value] - Whether the attribute supports multiple values.
|
|
17
|
+
* @property {boolean} [customer_editable] - Whether the attribute is customer-editable.
|
|
18
|
+
* @property {boolean} [encrypted] - Whether the attribute is encrypted.
|
|
19
|
+
* @property {boolean} [pinned] - Whether the attribute is pinned.
|
|
20
|
+
* @property {number} [pin_order] - The order in which the attribute is pinned.
|
|
21
|
+
* @property {Object[]} [validations]
|
|
22
|
+
* @property {boolean} [is_locked] - Whether the attribute is locked.
|
|
23
|
+
* @property {string} [created_at] - The creation date of the attribute.
|
|
24
|
+
* @property {string} [modified_at] - The modification date of the attribute.
|
|
25
|
+
* @property {number} [__v] - The version number of the attribute.
|
|
21
26
|
*/
|
|
22
27
|
|
|
23
28
|
/**
|
|
24
|
-
* @typedef
|
|
25
|
-
* @property {string} [
|
|
26
|
-
* @property {
|
|
27
|
-
* @property {string
|
|
29
|
+
* @typedef UserAttributeDefinitionResponse
|
|
30
|
+
* @property {string} [_id] - The unique identifier for the attribute definition.
|
|
31
|
+
* @property {string} [name] - The attribute name.
|
|
32
|
+
* @property {string} [slug] - The attribute key.
|
|
33
|
+
* @property {string} [description] - The description of the attribute.
|
|
34
|
+
* @property {string} [application_id] - The application ID.
|
|
35
|
+
* @property {string} [type] - The attribute type.
|
|
36
|
+
* @property {boolean} [multi_value] - Whether the attribute supports multiple values.
|
|
37
|
+
* @property {boolean} [customer_editable] - Whether the attribute is customer-editable.
|
|
38
|
+
* @property {boolean} [encrypted] - Whether the attribute is encrypted.
|
|
39
|
+
* @property {boolean} [pinned] - Whether the attribute is pinned.
|
|
40
|
+
* @property {number} [pin_order] - The order in which the attribute is pinned.
|
|
41
|
+
* @property {UserAttributeDefinitionValidation[]} [validations]
|
|
42
|
+
* @property {boolean} [is_locked] - Whether the attribute is locked.
|
|
43
|
+
* @property {string} [created_by] - The user who created the attribute.
|
|
44
|
+
* @property {string} [updated_by] - The user who last updated the attribute.
|
|
45
|
+
* @property {string} [created_at] - The creation date of the attribute definition.
|
|
46
|
+
* @property {string} [modified_at] - The last modification date of the
|
|
47
|
+
* attribute definition.
|
|
28
48
|
*/
|
|
29
49
|
|
|
30
50
|
/**
|
|
31
|
-
* @typedef
|
|
32
|
-
* @property {
|
|
51
|
+
* @typedef UserAttributeDefinitionValidation
|
|
52
|
+
* @property {string} [type] - The type of validation.
|
|
53
|
+
* @property {Object} [value] - The validation value.
|
|
33
54
|
*/
|
|
34
55
|
|
|
35
56
|
/**
|
|
36
|
-
* @typedef
|
|
37
|
-
* @property {string} [
|
|
38
|
-
* @property {string} [
|
|
39
|
-
* @property {string} [
|
|
40
|
-
* @property {string} [
|
|
57
|
+
* @typedef UserAttributeResponse
|
|
58
|
+
* @property {string} [_id] - The unique identifier for the attribute definition.
|
|
59
|
+
* @property {string} [name] - The name of user attribute definition.
|
|
60
|
+
* @property {string} [user_id] - The unique identifier for the user.
|
|
61
|
+
* @property {string} [application_id] - The application ID.
|
|
62
|
+
* @property {string} [type] - The attribute type.
|
|
63
|
+
* @property {boolean} [customer_overriden] - Whether the attribute is customer-editable.
|
|
64
|
+
* @property {Object} [attribute]
|
|
65
|
+
* @property {string} [updated_by]
|
|
41
66
|
*/
|
|
42
67
|
|
|
43
68
|
/**
|
|
44
|
-
* @typedef
|
|
45
|
-
* @property {
|
|
46
|
-
* @property {
|
|
47
|
-
* @property {string} [value]
|
|
69
|
+
* @typedef CreateUserAttributeRequest
|
|
70
|
+
* @property {boolean} [customer_overriden]
|
|
71
|
+
* @property {Object} [attribute]
|
|
48
72
|
*/
|
|
49
73
|
|
|
50
74
|
/**
|
|
51
75
|
* @typedef CreateUserAttributeDefinition
|
|
52
|
-
* @property {boolean} [customer_editable]
|
|
53
|
-
* @property {string} [default_value]
|
|
54
|
-
* @property {string} [description]
|
|
55
|
-
* @property {boolean} [encrypted]
|
|
56
|
-
* @property {boolean} [multi_value]
|
|
57
76
|
* @property {string} [name]
|
|
58
|
-
* @property {number} [pin_order]
|
|
59
|
-
* @property {boolean} [pinned]
|
|
60
77
|
* @property {string} [slug]
|
|
78
|
+
* @property {string} [description]
|
|
61
79
|
* @property {string} [type]
|
|
80
|
+
* @property {boolean} [multi_value]
|
|
81
|
+
* @property {boolean} [customer_editable]
|
|
82
|
+
* @property {boolean} [encrypted]
|
|
83
|
+
* @property {boolean} [pinned]
|
|
84
|
+
* @property {number} [pin_order]
|
|
85
|
+
* @property {string} [default_value]
|
|
62
86
|
* @property {Object[]} [validations]
|
|
63
87
|
*/
|
|
64
88
|
|
|
65
89
|
/**
|
|
66
|
-
* @typedef
|
|
67
|
-
* @property {
|
|
68
|
-
* @property {
|
|
90
|
+
* @typedef BlockUserRequestSchema
|
|
91
|
+
* @property {boolean} [status]
|
|
92
|
+
* @property {string[]} [user_id]
|
|
93
|
+
* @property {string} [reason]
|
|
69
94
|
*/
|
|
70
95
|
|
|
71
96
|
/**
|
|
72
|
-
* @typedef
|
|
73
|
-
* @property {
|
|
74
|
-
* @property {string} description
|
|
75
|
-
* @property {string} [file_url]
|
|
76
|
-
* @property {string} name
|
|
77
|
-
* @property {string} [type]
|
|
97
|
+
* @typedef ArchiveUserRequestSchema
|
|
98
|
+
* @property {string} [user_id]
|
|
78
99
|
*/
|
|
79
100
|
|
|
80
101
|
/**
|
|
81
|
-
* @typedef
|
|
82
|
-
* @property {string} [
|
|
83
|
-
* @property {string} [
|
|
84
|
-
* @property {string} [
|
|
85
|
-
* @property {string} [gender]
|
|
86
|
-
* @property {string} [last_name]
|
|
87
|
-
* @property {Object} [meta]
|
|
88
|
-
* @property {string} phone_number
|
|
89
|
-
* @property {string} username
|
|
102
|
+
* @typedef UnDeleteUserRequestSchema
|
|
103
|
+
* @property {string} [user_id]
|
|
104
|
+
* @property {string} [reason]
|
|
105
|
+
* @property {string} [reason_id]
|
|
90
106
|
*/
|
|
91
107
|
|
|
92
108
|
/**
|
|
93
|
-
* @typedef
|
|
94
|
-
* @property {
|
|
109
|
+
* @typedef BlockUserSuccess
|
|
110
|
+
* @property {boolean} [success]
|
|
95
111
|
*/
|
|
96
112
|
|
|
97
113
|
/**
|
|
98
|
-
* @typedef
|
|
99
|
-
* @property {
|
|
100
|
-
* @property {number} [max_age]
|
|
101
|
-
* @property {string} [user_id]
|
|
114
|
+
* @typedef ArchiveUserSuccess
|
|
115
|
+
* @property {boolean} [success]
|
|
102
116
|
*/
|
|
103
117
|
|
|
104
118
|
/**
|
|
105
|
-
* @typedef
|
|
106
|
-
* @property {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
* @
|
|
119
|
+
* @typedef UnDeleteUserSuccess
|
|
120
|
+
* @property {boolean} [success]
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @typedef UserSearchResponseSchema
|
|
125
|
+
* @property {UserSchema[]} [users]
|
|
111
126
|
*/
|
|
112
127
|
|
|
113
128
|
/**
|
|
@@ -117,149 +132,184 @@ const Joi = require("joi");
|
|
|
117
132
|
*/
|
|
118
133
|
|
|
119
134
|
/**
|
|
120
|
-
* @typedef
|
|
121
|
-
* @property {
|
|
135
|
+
* @typedef PaginationSchema
|
|
136
|
+
* @property {number} [size]
|
|
137
|
+
* @property {number} [item_total]
|
|
138
|
+
* @property {boolean} [has_next]
|
|
139
|
+
* @property {string} [type]
|
|
140
|
+
* @property {number} [current]
|
|
122
141
|
*/
|
|
123
142
|
|
|
124
143
|
/**
|
|
125
|
-
* @typedef
|
|
126
|
-
* @property {
|
|
127
|
-
* @property {string} [reason_text]
|
|
128
|
-
* @property {boolean} [show_text_area]
|
|
144
|
+
* @typedef SessionListResponseSchema
|
|
145
|
+
* @property {SessionListResponseInfo[]} [items]
|
|
129
146
|
*/
|
|
130
147
|
|
|
131
148
|
/**
|
|
132
|
-
* @typedef
|
|
133
|
-
* @property {
|
|
134
|
-
* @property {string} [
|
|
135
|
-
* @property {boolean} [primary]
|
|
136
|
-
* @property {boolean} [verified]
|
|
149
|
+
* @typedef SessionDeleteResponseSchema
|
|
150
|
+
* @property {string} [user_id]
|
|
151
|
+
* @property {string} [session_id]
|
|
137
152
|
*/
|
|
138
153
|
|
|
139
154
|
/**
|
|
140
|
-
* @typedef
|
|
141
|
-
* @property {string} [
|
|
155
|
+
* @typedef SessionsDeleteResponseSchema
|
|
156
|
+
* @property {string} [user_id]
|
|
157
|
+
* @property {string[]} [session_ids]
|
|
142
158
|
*/
|
|
143
159
|
|
|
144
160
|
/**
|
|
145
|
-
* @typedef
|
|
146
|
-
* @property {string} [
|
|
147
|
-
* @property {string} [text]
|
|
148
|
-
* @property {string} [text_color]
|
|
161
|
+
* @typedef AuthenticationApiErrorSchema
|
|
162
|
+
* @property {string} [message]
|
|
149
163
|
*/
|
|
150
164
|
|
|
151
165
|
/**
|
|
152
|
-
* @typedef
|
|
153
|
-
* @property {string} [
|
|
166
|
+
* @typedef SessionListResponseInfo
|
|
167
|
+
* @property {string} [session_id]
|
|
168
|
+
* @property {string} [user_agent]
|
|
169
|
+
* @property {string} [ip]
|
|
170
|
+
* @property {string} [domain]
|
|
171
|
+
* @property {string} [expire_in]
|
|
154
172
|
*/
|
|
155
173
|
|
|
156
174
|
/**
|
|
157
|
-
* @typedef
|
|
158
|
-
* @property {
|
|
159
|
-
* @property {
|
|
175
|
+
* @typedef Conditions
|
|
176
|
+
* @property {string} [user_attribute_definition_id]
|
|
177
|
+
* @property {string} [type]
|
|
178
|
+
* @property {string} [value]
|
|
179
|
+
* @property {string} [key]
|
|
160
180
|
*/
|
|
161
181
|
|
|
162
182
|
/**
|
|
163
|
-
* @typedef
|
|
164
|
-
* @property {
|
|
165
|
-
* @property {string} [
|
|
183
|
+
* @typedef UserResponseErrorSchema
|
|
184
|
+
* @property {number} [count]
|
|
185
|
+
* @property {string} [file_url]
|
|
166
186
|
*/
|
|
167
187
|
|
|
168
188
|
/**
|
|
169
|
-
* @typedef
|
|
170
|
-
* @property {
|
|
189
|
+
* @typedef UserGroupResponseSchema
|
|
190
|
+
* @property {Conditions[]} [conditions]
|
|
191
|
+
* @property {UserResponseErrorSchema} [error]
|
|
192
|
+
* @property {string} [name]
|
|
193
|
+
* @property {string} [description]
|
|
194
|
+
* @property {string} [file_url]
|
|
195
|
+
* @property {string} [_id]
|
|
196
|
+
* @property {string} [status]
|
|
197
|
+
* @property {boolean} [is_active]
|
|
198
|
+
* @property {string} [type]
|
|
199
|
+
* @property {number} [uid]
|
|
200
|
+
* @property {string} [application_id]
|
|
201
|
+
* @property {string} [created_at]
|
|
202
|
+
* @property {string} [modified_at]
|
|
203
|
+
* @property {number} [__v]
|
|
171
204
|
*/
|
|
172
205
|
|
|
173
206
|
/**
|
|
174
|
-
* @typedef
|
|
175
|
-
* @property {
|
|
176
|
-
* @property {
|
|
177
|
-
* @property {number} [item_total]
|
|
178
|
-
* @property {number} [size]
|
|
179
|
-
* @property {string} [type]
|
|
207
|
+
* @typedef UserGroupListResponseSchema
|
|
208
|
+
* @property {UserGroupResponseSchema[]} [items]
|
|
209
|
+
* @property {PaginationSchema} [page]
|
|
180
210
|
*/
|
|
181
211
|
|
|
182
212
|
/**
|
|
183
|
-
* @typedef
|
|
184
|
-
* @property {string} [
|
|
185
|
-
* @property {string} [
|
|
186
|
-
*
|
|
187
|
-
* It must have one of columns from `phone_number``, `email`, `user_id` and
|
|
188
|
-
* must have `action` column. `action` column can have `add` or `remove` value.
|
|
189
|
-
* @property {string} [name]
|
|
190
|
-
* @property {string} [type] - Source of update to be used to update individual
|
|
191
|
-
* users. Default value is considered file_url if not passed.
|
|
192
|
-
* @property {UserGroupUpdateData[]} [user_data] - Required property when passed
|
|
193
|
-
* type json. Array of user data. Must have `action` field and one of
|
|
194
|
-
* `phone_number`, `email` or `user_id` field in object
|
|
213
|
+
* @typedef ConditionsSchema
|
|
214
|
+
* @property {string} [user_attribute_definition_id]
|
|
215
|
+
* @property {string} [type]
|
|
216
|
+
* @property {string} [value]
|
|
195
217
|
*/
|
|
196
218
|
|
|
197
219
|
/**
|
|
198
|
-
* @typedef
|
|
199
|
-
* @property {
|
|
200
|
-
* @property {
|
|
201
|
-
* @property {string}
|
|
202
|
-
* @property {
|
|
203
|
-
* @property {
|
|
220
|
+
* @typedef CreateUserGroup
|
|
221
|
+
* @property {ConditionsSchema[]} [conditions]
|
|
222
|
+
* @property {string} [type]
|
|
223
|
+
* @property {string} name
|
|
224
|
+
* @property {string} description
|
|
225
|
+
* @property {string} [file_url]
|
|
204
226
|
*/
|
|
205
227
|
|
|
206
228
|
/**
|
|
207
|
-
* @typedef
|
|
208
|
-
* @property {
|
|
209
|
-
* @property {string} [
|
|
229
|
+
* @typedef CreateUserRequestSchema
|
|
230
|
+
* @property {string} phone_number
|
|
231
|
+
* @property {string} [email]
|
|
232
|
+
* @property {string} [first_name]
|
|
233
|
+
* @property {string} [last_name]
|
|
234
|
+
* @property {string} [gender]
|
|
235
|
+
* @property {string} username
|
|
236
|
+
* @property {Object} [meta]
|
|
237
|
+
* @property {string} [external_id]
|
|
210
238
|
*/
|
|
211
239
|
|
|
212
240
|
/**
|
|
213
|
-
* @typedef
|
|
214
|
-
* @property {
|
|
215
|
-
|
|
241
|
+
* @typedef CreateUserResponseSchema
|
|
242
|
+
* @property {UserSchema} [user]
|
|
243
|
+
*/
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @typedef CreateUserSessionRequestSchema
|
|
247
|
+
* @property {string} [domain]
|
|
248
|
+
* @property {number} [max_age]
|
|
249
|
+
* @property {string} [user_id]
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @typedef CreateUserSessionResponseSchema
|
|
254
|
+
* @property {string} [domain]
|
|
255
|
+
* @property {number} [max_age]
|
|
256
|
+
* @property {boolean} [secure]
|
|
257
|
+
* @property {boolean} [http_only]
|
|
258
|
+
* @property {Object} [cookie]
|
|
216
259
|
*/
|
|
217
260
|
|
|
218
261
|
/**
|
|
219
262
|
* @typedef PlatformSchema
|
|
220
|
-
* @property {string} [_id]
|
|
221
|
-
* @property {boolean} [active]
|
|
222
|
-
* @property {string} [created_at]
|
|
223
|
-
* @property {Object} [delete_account_consent]
|
|
224
|
-
* @property {number} [delete_account_day]
|
|
225
|
-
* @property {DeleteAccountReasons[]} [delete_account_reasons]
|
|
226
|
-
* @property {string} [desktop_image]
|
|
227
263
|
* @property {string} [display]
|
|
228
|
-
* @property {
|
|
264
|
+
* @property {LookAndFeel} [look_and_feel]
|
|
265
|
+
* @property {string} [updated_at]
|
|
266
|
+
* @property {boolean} [active]
|
|
229
267
|
* @property {boolean} [forgot_password]
|
|
230
268
|
* @property {Login} [login]
|
|
231
|
-
* @property {
|
|
232
|
-
* @property {MetaSchema} [meta]
|
|
233
|
-
* @property {string} [mobile_image]
|
|
269
|
+
* @property {boolean} [skip_captcha]
|
|
234
270
|
* @property {string} [name]
|
|
235
|
-
* @property {
|
|
236
|
-
* @property {
|
|
271
|
+
* @property {MetaSchema} [meta]
|
|
272
|
+
* @property {string} [_id]
|
|
273
|
+
* @property {Social} [social]
|
|
237
274
|
* @property {RequiredFields} [required_fields]
|
|
238
|
-
* @property {
|
|
239
|
-
* @property {boolean} [skip_captcha]
|
|
275
|
+
* @property {RegisterRequiredFields} [register_required_fields]
|
|
240
276
|
* @property {boolean} [skip_login]
|
|
241
|
-
* @property {
|
|
242
|
-
* @property {SocialTokens} [social_tokens]
|
|
277
|
+
* @property {FlashCard} [flash_card]
|
|
243
278
|
* @property {string} [subtext]
|
|
244
|
-
* @property {
|
|
279
|
+
* @property {SocialTokens} [social_tokens]
|
|
280
|
+
* @property {string} [created_at]
|
|
281
|
+
* @property {boolean} [register]
|
|
282
|
+
* @property {string} [mobile_image]
|
|
283
|
+
* @property {string} [desktop_image]
|
|
284
|
+
* @property {number} [delete_account_day]
|
|
285
|
+
* @property {DeleteAccountReasons[]} [delete_account_reasons]
|
|
286
|
+
* @property {Object} [delete_account_consent]
|
|
287
|
+
* @property {Object} [session_config]
|
|
245
288
|
*/
|
|
246
289
|
|
|
247
290
|
/**
|
|
248
|
-
* @typedef
|
|
249
|
-
* @property {
|
|
250
|
-
* @property {
|
|
291
|
+
* @typedef LookAndFeel
|
|
292
|
+
* @property {string} [card_position]
|
|
293
|
+
* @property {string} [background_color]
|
|
251
294
|
*/
|
|
252
295
|
|
|
253
296
|
/**
|
|
254
|
-
* @typedef
|
|
255
|
-
* @property {boolean} [
|
|
256
|
-
* @property {
|
|
297
|
+
* @typedef Login
|
|
298
|
+
* @property {boolean} [password]
|
|
299
|
+
* @property {boolean} [otp]
|
|
257
300
|
*/
|
|
258
301
|
|
|
259
302
|
/**
|
|
260
|
-
* @typedef
|
|
261
|
-
* @property {boolean} [
|
|
262
|
-
|
|
303
|
+
* @typedef MetaSchema
|
|
304
|
+
* @property {boolean} [fynd_default]
|
|
305
|
+
*/
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* @typedef Social
|
|
309
|
+
* @property {boolean} [account_kit]
|
|
310
|
+
* @property {boolean} [facebook]
|
|
311
|
+
* @property {boolean} [google]
|
|
312
|
+
* @property {boolean} [apple]
|
|
263
313
|
*/
|
|
264
314
|
|
|
265
315
|
/**
|
|
@@ -269,369 +319,333 @@ const Joi = require("joi");
|
|
|
269
319
|
*/
|
|
270
320
|
|
|
271
321
|
/**
|
|
272
|
-
* @typedef
|
|
273
|
-
* @property {
|
|
274
|
-
* @property {string} [
|
|
322
|
+
* @typedef PlatformEmail
|
|
323
|
+
* @property {boolean} [is_required]
|
|
324
|
+
* @property {string} [level]
|
|
275
325
|
*/
|
|
276
326
|
|
|
277
327
|
/**
|
|
278
|
-
* @typedef
|
|
279
|
-
* @property {
|
|
280
|
-
* @property {
|
|
281
|
-
* @property {string} [type]
|
|
328
|
+
* @typedef PlatformMobile
|
|
329
|
+
* @property {boolean} [is_required]
|
|
330
|
+
* @property {string} [level]
|
|
282
331
|
*/
|
|
283
332
|
|
|
284
333
|
/**
|
|
285
|
-
* @typedef
|
|
286
|
-
* @property {
|
|
287
|
-
* @property {
|
|
288
|
-
* @property {string} [ip]
|
|
289
|
-
* @property {string} [session_id]
|
|
290
|
-
* @property {string} [user_agent]
|
|
334
|
+
* @typedef RegisterRequiredFields
|
|
335
|
+
* @property {RegisterRequiredFieldsEmail} [email]
|
|
336
|
+
* @property {RegisterRequiredFieldsMobile} [mobile]
|
|
291
337
|
*/
|
|
292
338
|
|
|
293
339
|
/**
|
|
294
|
-
* @typedef
|
|
295
|
-
* @property {
|
|
340
|
+
* @typedef RegisterRequiredFieldsEmail
|
|
341
|
+
* @property {boolean} [is_required]
|
|
342
|
+
* @property {string} [level]
|
|
296
343
|
*/
|
|
297
344
|
|
|
298
345
|
/**
|
|
299
|
-
* @typedef
|
|
300
|
-
* @property {
|
|
301
|
-
* @property {string} [
|
|
346
|
+
* @typedef RegisterRequiredFieldsMobile
|
|
347
|
+
* @property {boolean} [is_required]
|
|
348
|
+
* @property {string} [level]
|
|
302
349
|
*/
|
|
303
350
|
|
|
304
351
|
/**
|
|
305
|
-
* @typedef
|
|
306
|
-
* @property {
|
|
307
|
-
* @property {
|
|
308
|
-
* @property {
|
|
309
|
-
* @property {boolean} [google]
|
|
352
|
+
* @typedef FlashCard
|
|
353
|
+
* @property {string} [text]
|
|
354
|
+
* @property {string} [text_color]
|
|
355
|
+
* @property {string} [background_color]
|
|
310
356
|
*/
|
|
311
357
|
|
|
312
358
|
/**
|
|
313
359
|
* @typedef SocialTokens
|
|
314
|
-
* @property {Accountkit} [account_kit]
|
|
315
360
|
* @property {Facebook} [facebook]
|
|
361
|
+
* @property {Accountkit} [account_kit]
|
|
316
362
|
* @property {Google} [google]
|
|
317
363
|
*/
|
|
318
364
|
|
|
319
365
|
/**
|
|
320
|
-
* @typedef
|
|
321
|
-
* @property {string} [
|
|
322
|
-
*/
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* @typedef UnDeleteUserRequestSchema
|
|
326
|
-
* @property {string} [reason]
|
|
366
|
+
* @typedef DeleteAccountReasons
|
|
367
|
+
* @property {string} [reason_text]
|
|
327
368
|
* @property {string} [reason_id]
|
|
328
|
-
* @property {
|
|
329
|
-
*/
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* @typedef UnDeleteUserSuccess
|
|
333
|
-
* @property {boolean} [success]
|
|
334
|
-
*/
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* @typedef UpdateUserGroupSchema
|
|
338
|
-
* @property {ConditionsSchema[]} [conditions]
|
|
339
|
-
* @property {string} [description]
|
|
340
|
-
* @property {string} [file_url]
|
|
341
|
-
* @property {string} [name]
|
|
342
|
-
* @property {string} [type]
|
|
343
|
-
*/
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* @typedef UpdateUserRequestSchema
|
|
347
|
-
* @property {UserEmails[]} [emails]
|
|
348
|
-
* @property {string} [external_id]
|
|
349
|
-
* @property {string} [first_name]
|
|
350
|
-
* @property {string} [gender]
|
|
351
|
-
* @property {string} [last_name]
|
|
352
|
-
* @property {Object} [meta]
|
|
353
|
-
* @property {UserPhoneNumbers[]} [phone_numbers]
|
|
369
|
+
* @property {boolean} [show_text_area]
|
|
354
370
|
*/
|
|
355
371
|
|
|
356
372
|
/**
|
|
357
|
-
* @typedef
|
|
358
|
-
* @property {
|
|
359
|
-
* @property {string} [_id] - The unique identifier for the attribute definition.
|
|
360
|
-
* @property {string} [application_id] - The application ID.
|
|
361
|
-
* @property {string} [created_at] - The creation date of the attribute.
|
|
362
|
-
* @property {boolean} [customer_editable] - Whether the attribute is customer-editable.
|
|
363
|
-
* @property {string} [description] - The description of the attribute.
|
|
364
|
-
* @property {boolean} [encrypted] - Whether the attribute is encrypted.
|
|
365
|
-
* @property {boolean} [is_locked] - Whether the attribute is locked.
|
|
366
|
-
* @property {string} [modified_at] - The modification date of the attribute.
|
|
367
|
-
* @property {boolean} [multi_value] - Whether the attribute supports multiple values.
|
|
368
|
-
* @property {string} [name] - The attribute name.
|
|
369
|
-
* @property {number} [pin_order] - The order in which the attribute is pinned.
|
|
370
|
-
* @property {boolean} [pinned] - Whether the attribute is pinned.
|
|
371
|
-
* @property {string} [slug] - The attribute key.
|
|
372
|
-
* @property {string} [type] - The attribute type.
|
|
373
|
-
* @property {Object[]} [validations]
|
|
373
|
+
* @typedef DeleteAccountConsent
|
|
374
|
+
* @property {string} [consent_text]
|
|
374
375
|
*/
|
|
375
376
|
|
|
376
377
|
/**
|
|
377
|
-
* @typedef
|
|
378
|
-
* @property {string} [
|
|
379
|
-
* @property {string} [application_id] - The application ID.
|
|
380
|
-
* @property {string} [created_at] - The creation date of the attribute definition.
|
|
381
|
-
* @property {string} [created_by] - The user who created the attribute.
|
|
382
|
-
* @property {boolean} [customer_editable] - Whether the attribute is customer-editable.
|
|
383
|
-
* @property {string} [description] - The description of the attribute.
|
|
384
|
-
* @property {boolean} [encrypted] - Whether the attribute is encrypted.
|
|
385
|
-
* @property {boolean} [is_locked] - Whether the attribute is locked.
|
|
386
|
-
* @property {string} [modified_at] - The last modification date of the
|
|
387
|
-
* attribute definition.
|
|
388
|
-
* @property {boolean} [multi_value] - Whether the attribute supports multiple values.
|
|
389
|
-
* @property {string} [name] - The attribute name.
|
|
390
|
-
* @property {number} [pin_order] - The order in which the attribute is pinned.
|
|
391
|
-
* @property {boolean} [pinned] - Whether the attribute is pinned.
|
|
392
|
-
* @property {string} [slug] - The attribute key.
|
|
393
|
-
* @property {string} [type] - The attribute type.
|
|
394
|
-
* @property {string} [updated_by] - The user who last updated the attribute.
|
|
395
|
-
* @property {UserAttributeDefinitionValidation[]} [validations]
|
|
378
|
+
* @typedef Facebook
|
|
379
|
+
* @property {string} [app_id]
|
|
396
380
|
*/
|
|
397
381
|
|
|
398
382
|
/**
|
|
399
|
-
* @typedef
|
|
400
|
-
* @property {string} [
|
|
401
|
-
* @property {Object} [value] - The validation value.
|
|
383
|
+
* @typedef Accountkit
|
|
384
|
+
* @property {string} [app_id]
|
|
402
385
|
*/
|
|
403
386
|
|
|
404
387
|
/**
|
|
405
|
-
* @typedef
|
|
406
|
-
* @property {string} [
|
|
407
|
-
* @property {string} [application_id] - The application ID.
|
|
408
|
-
* @property {Object} [attribute]
|
|
409
|
-
* @property {boolean} [customer_overriden] - Whether the attribute is customer-editable.
|
|
410
|
-
* @property {string} [name] - The name of user attribute definition.
|
|
411
|
-
* @property {string} [type] - The attribute type.
|
|
412
|
-
* @property {string} [updated_by]
|
|
413
|
-
* @property {string} [user_id] - The unique identifier for the user.
|
|
388
|
+
* @typedef Google
|
|
389
|
+
* @property {string} [app_id]
|
|
414
390
|
*/
|
|
415
391
|
|
|
416
392
|
/**
|
|
417
|
-
* @typedef
|
|
418
|
-
* @property {
|
|
419
|
-
* @property {string} [
|
|
420
|
-
* @property {boolean} [
|
|
421
|
-
* @property {boolean} [verified]
|
|
393
|
+
* @typedef SessionExpiry
|
|
394
|
+
* @property {number} [duration]
|
|
395
|
+
* @property {string} [type]
|
|
396
|
+
* @property {boolean} [is_rolling]
|
|
422
397
|
*/
|
|
423
398
|
|
|
424
399
|
/**
|
|
425
|
-
* @typedef
|
|
426
|
-
* @property {
|
|
427
|
-
* @property {
|
|
400
|
+
* @typedef UpdateUserGroupSchema
|
|
401
|
+
* @property {ConditionsSchema[]} [conditions]
|
|
402
|
+
* @property {string} [type]
|
|
403
|
+
* @property {string} [name]
|
|
404
|
+
* @property {string} [description]
|
|
405
|
+
* @property {string} [file_url]
|
|
428
406
|
*/
|
|
429
407
|
|
|
430
408
|
/**
|
|
431
|
-
* @typedef
|
|
432
|
-
* @property {
|
|
433
|
-
*
|
|
434
|
-
* @property {string} [application_id]
|
|
435
|
-
* @property {Conditions[]} [conditions]
|
|
436
|
-
* @property {string} [created_at]
|
|
437
|
-
* @property {string} [description]
|
|
438
|
-
* @property {UserResponseErrorSchema} [error]
|
|
439
|
-
* @property {string} [file_url]
|
|
440
|
-
* @property {boolean} [is_active]
|
|
441
|
-
* @property {string} [modified_at]
|
|
409
|
+
* @typedef PartialUserGroupUpdateSchema
|
|
410
|
+
* @property {string} [type] - Source of update to be used to update individual
|
|
411
|
+
* users. Default value is considered file_url if not passed.
|
|
442
412
|
* @property {string} [name]
|
|
443
|
-
* @property {string} [
|
|
444
|
-
* @property {string} [type
|
|
445
|
-
*
|
|
413
|
+
* @property {string} [description]
|
|
414
|
+
* @property {string} [file_url] - Required property when passed type file_url.
|
|
415
|
+
* Internet reachable csv file url which will be used to fetch download data.
|
|
416
|
+
* It must have one of columns from `phone_number``, `email`, `user_id` and
|
|
417
|
+
* must have `action` column. `action` column can have `add` or `remove` value.
|
|
418
|
+
* @property {UserGroupUpdateData[]} [user_data] - Required property when passed
|
|
419
|
+
* type json. Array of user data. Must have `action` field and one of
|
|
420
|
+
* `phone_number`, `email` or `user_id` field in object
|
|
446
421
|
*/
|
|
447
422
|
|
|
448
423
|
/**
|
|
449
424
|
* @typedef UserGroupUpdateData
|
|
450
|
-
* @property {string} action
|
|
451
|
-
* @property {string} [email] - Email of registered user
|
|
452
|
-
* @property {string} [phone_number] - Phone number of registered user
|
|
453
425
|
* @property {string} [user_id] - Must be valid mongodb objectid of existing user
|
|
426
|
+
* @property {string} [phone_number] - Phone number of registered user
|
|
427
|
+
* @property {string} [email] - Email of registered user
|
|
428
|
+
* @property {string} action
|
|
454
429
|
*/
|
|
455
430
|
|
|
456
431
|
/**
|
|
457
|
-
* @typedef
|
|
432
|
+
* @typedef UpdateUserRequestSchema
|
|
433
|
+
* @property {string} [first_name]
|
|
434
|
+
* @property {string} [last_name]
|
|
435
|
+
* @property {string} [gender]
|
|
436
|
+
* @property {string} [external_id]
|
|
437
|
+
* @property {Object} [meta]
|
|
438
|
+
* @property {UserPhoneNumbers[]} [phone_numbers]
|
|
439
|
+
* @property {UserEmails[]} [emails]
|
|
440
|
+
*/
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* @typedef UserEmails
|
|
458
444
|
* @property {boolean} [active]
|
|
459
|
-
* @property {string} [country_code]
|
|
460
|
-
* @property {string} [phone]
|
|
461
445
|
* @property {boolean} [primary]
|
|
462
446
|
* @property {boolean} [verified]
|
|
447
|
+
* @property {string} [email]
|
|
463
448
|
*/
|
|
464
449
|
|
|
465
450
|
/**
|
|
466
|
-
* @typedef
|
|
467
|
-
* @property {
|
|
468
|
-
* @property {
|
|
451
|
+
* @typedef UserPhoneNumbers
|
|
452
|
+
* @property {boolean} [active]
|
|
453
|
+
* @property {boolean} [primary]
|
|
454
|
+
* @property {boolean} [verified]
|
|
455
|
+
* @property {string} [phone]
|
|
456
|
+
* @property {string} [country_code]
|
|
469
457
|
*/
|
|
470
458
|
|
|
471
459
|
/**
|
|
472
460
|
* @typedef UserSchema
|
|
473
|
-
* @property {string} [_id]
|
|
474
|
-
* @property {string} [account_type]
|
|
475
|
-
* @property {boolean} [active]
|
|
476
461
|
* @property {string} [application_id]
|
|
477
|
-
* @property {string} [
|
|
478
|
-
* @property {string} [dob]
|
|
479
|
-
* @property {Email[]} [emails]
|
|
480
|
-
* @property {string} [external_id]
|
|
462
|
+
* @property {string} [user_id]
|
|
481
463
|
* @property {string} [first_name]
|
|
482
|
-
* @property {string} [gender]
|
|
483
|
-
* @property {string} [last_name]
|
|
484
464
|
* @property {Object} [meta]
|
|
465
|
+
* @property {string} [last_name]
|
|
485
466
|
* @property {PhoneNumber[]} [phone_numbers]
|
|
467
|
+
* @property {Email[]} [emails]
|
|
468
|
+
* @property {string} [gender]
|
|
469
|
+
* @property {string} [dob]
|
|
470
|
+
* @property {boolean} [active]
|
|
486
471
|
* @property {string} [profile_pic_url]
|
|
487
|
-
* @property {string} [updated_at]
|
|
488
|
-
* @property {string} [user_id]
|
|
489
472
|
* @property {string} [username]
|
|
473
|
+
* @property {string} [account_type]
|
|
474
|
+
* @property {string} [_id]
|
|
475
|
+
* @property {string} [created_at]
|
|
476
|
+
* @property {string} [updated_at]
|
|
477
|
+
* @property {string} [external_id]
|
|
490
478
|
*/
|
|
491
479
|
|
|
492
480
|
/**
|
|
493
|
-
* @typedef
|
|
494
|
-
* @property {
|
|
481
|
+
* @typedef PhoneNumber
|
|
482
|
+
* @property {boolean} [active]
|
|
483
|
+
* @property {boolean} [primary]
|
|
484
|
+
* @property {boolean} [verified]
|
|
485
|
+
* @property {string} [phone]
|
|
486
|
+
* @property {number} [country_code]
|
|
495
487
|
*/
|
|
496
488
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
/** @returns {ArchiveUserRequestSchema} */
|
|
506
|
-
static ArchiveUserRequestSchema() {
|
|
507
|
-
return Joi.object({
|
|
508
|
-
user_id: Joi.string().allow(""),
|
|
509
|
-
});
|
|
510
|
-
}
|
|
489
|
+
/**
|
|
490
|
+
* @typedef Email
|
|
491
|
+
* @property {boolean} [primary]
|
|
492
|
+
* @property {boolean} [verified]
|
|
493
|
+
* @property {string} [email]
|
|
494
|
+
* @property {boolean} [active]
|
|
495
|
+
*/
|
|
511
496
|
|
|
512
|
-
|
|
513
|
-
|
|
497
|
+
class UserPlatformModel {
|
|
498
|
+
/** @returns {SuccessMessageResponse} */
|
|
499
|
+
static SuccessMessageResponse() {
|
|
514
500
|
return Joi.object({
|
|
515
|
-
success: Joi.
|
|
501
|
+
success: Joi.string().allow(""),
|
|
516
502
|
});
|
|
517
503
|
}
|
|
518
504
|
|
|
519
|
-
/** @returns {
|
|
520
|
-
static
|
|
505
|
+
/** @returns {UserAttributeDefinition} */
|
|
506
|
+
static UserAttributeDefinition() {
|
|
521
507
|
return Joi.object({
|
|
522
|
-
|
|
508
|
+
_id: Joi.string().allow(""),
|
|
509
|
+
name: Joi.string().allow(""),
|
|
510
|
+
slug: Joi.string().allow(""),
|
|
511
|
+
description: Joi.string().allow(""),
|
|
512
|
+
application_id: Joi.string().allow(""),
|
|
513
|
+
type: Joi.string().allow(""),
|
|
514
|
+
multi_value: Joi.boolean(),
|
|
515
|
+
customer_editable: Joi.boolean(),
|
|
516
|
+
encrypted: Joi.boolean(),
|
|
517
|
+
pinned: Joi.boolean(),
|
|
518
|
+
pin_order: Joi.number(),
|
|
519
|
+
validations: Joi.array().items(Joi.any()),
|
|
520
|
+
is_locked: Joi.boolean(),
|
|
521
|
+
created_at: Joi.string().allow(""),
|
|
522
|
+
modified_at: Joi.string().allow(""),
|
|
523
|
+
__v: Joi.number(),
|
|
523
524
|
});
|
|
524
525
|
}
|
|
525
526
|
|
|
526
|
-
/** @returns {
|
|
527
|
-
static
|
|
527
|
+
/** @returns {UserAttributeDefinitionResponse} */
|
|
528
|
+
static UserAttributeDefinitionResponse() {
|
|
528
529
|
return Joi.object({
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
530
|
+
_id: Joi.string().allow(""),
|
|
531
|
+
name: Joi.string().allow(""),
|
|
532
|
+
slug: Joi.string().allow(""),
|
|
533
|
+
description: Joi.string().allow(""),
|
|
534
|
+
application_id: Joi.string().allow(""),
|
|
535
|
+
type: Joi.string().allow(""),
|
|
536
|
+
multi_value: Joi.boolean(),
|
|
537
|
+
customer_editable: Joi.boolean(),
|
|
538
|
+
encrypted: Joi.boolean(),
|
|
539
|
+
pinned: Joi.boolean(),
|
|
540
|
+
pin_order: Joi.number(),
|
|
541
|
+
validations: Joi.array().items(
|
|
542
|
+
UserPlatformModel.UserAttributeDefinitionValidation()
|
|
543
|
+
),
|
|
544
|
+
is_locked: Joi.boolean(),
|
|
545
|
+
created_by: Joi.string().allow(""),
|
|
546
|
+
updated_by: Joi.string().allow(""),
|
|
547
|
+
created_at: Joi.string().allow(""),
|
|
548
|
+
modified_at: Joi.string().allow(""),
|
|
532
549
|
});
|
|
533
550
|
}
|
|
534
551
|
|
|
535
|
-
/** @returns {
|
|
536
|
-
static
|
|
552
|
+
/** @returns {UserAttributeDefinitionValidation} */
|
|
553
|
+
static UserAttributeDefinitionValidation() {
|
|
537
554
|
return Joi.object({
|
|
538
|
-
|
|
555
|
+
type: Joi.string().allow(""),
|
|
556
|
+
value: Joi.any(),
|
|
539
557
|
});
|
|
540
558
|
}
|
|
541
559
|
|
|
542
|
-
/** @returns {
|
|
543
|
-
static
|
|
560
|
+
/** @returns {UserAttributeResponse} */
|
|
561
|
+
static UserAttributeResponse() {
|
|
544
562
|
return Joi.object({
|
|
545
|
-
|
|
563
|
+
_id: Joi.string().allow(""),
|
|
564
|
+
name: Joi.string().allow(""),
|
|
565
|
+
user_id: Joi.string().allow(""),
|
|
566
|
+
application_id: Joi.string().allow(""),
|
|
546
567
|
type: Joi.string().allow(""),
|
|
547
|
-
|
|
548
|
-
|
|
568
|
+
customer_overriden: Joi.boolean(),
|
|
569
|
+
attribute: Joi.any(),
|
|
570
|
+
updated_by: Joi.string().allow(""),
|
|
549
571
|
});
|
|
550
572
|
}
|
|
551
573
|
|
|
552
|
-
/** @returns {
|
|
553
|
-
static
|
|
574
|
+
/** @returns {CreateUserAttributeRequest} */
|
|
575
|
+
static CreateUserAttributeRequest() {
|
|
554
576
|
return Joi.object({
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
value: Joi.string().allow(""),
|
|
577
|
+
customer_overriden: Joi.boolean(),
|
|
578
|
+
attribute: Joi.any(),
|
|
558
579
|
});
|
|
559
580
|
}
|
|
560
581
|
|
|
561
582
|
/** @returns {CreateUserAttributeDefinition} */
|
|
562
583
|
static CreateUserAttributeDefinition() {
|
|
563
584
|
return Joi.object({
|
|
564
|
-
customer_editable: Joi.boolean(),
|
|
565
|
-
default_value: Joi.string().allow(""),
|
|
566
|
-
description: Joi.string().allow(""),
|
|
567
|
-
encrypted: Joi.boolean(),
|
|
568
|
-
multi_value: Joi.boolean(),
|
|
569
585
|
name: Joi.string().allow(""),
|
|
570
|
-
pin_order: Joi.number(),
|
|
571
|
-
pinned: Joi.boolean(),
|
|
572
586
|
slug: Joi.string().allow(""),
|
|
587
|
+
description: Joi.string().allow(""),
|
|
573
588
|
type: Joi.string().allow(""),
|
|
589
|
+
multi_value: Joi.boolean(),
|
|
590
|
+
customer_editable: Joi.boolean(),
|
|
591
|
+
encrypted: Joi.boolean(),
|
|
592
|
+
pinned: Joi.boolean(),
|
|
593
|
+
pin_order: Joi.number(),
|
|
594
|
+
default_value: Joi.string().allow(""),
|
|
574
595
|
validations: Joi.array().items(Joi.any()),
|
|
575
596
|
});
|
|
576
597
|
}
|
|
577
598
|
|
|
578
|
-
/** @returns {
|
|
579
|
-
static
|
|
599
|
+
/** @returns {BlockUserRequestSchema} */
|
|
600
|
+
static BlockUserRequestSchema() {
|
|
580
601
|
return Joi.object({
|
|
581
|
-
|
|
582
|
-
|
|
602
|
+
status: Joi.boolean(),
|
|
603
|
+
user_id: Joi.array().items(Joi.string().allow("")),
|
|
604
|
+
reason: Joi.string().allow(""),
|
|
583
605
|
});
|
|
584
606
|
}
|
|
585
607
|
|
|
586
|
-
/** @returns {
|
|
587
|
-
static
|
|
608
|
+
/** @returns {ArchiveUserRequestSchema} */
|
|
609
|
+
static ArchiveUserRequestSchema() {
|
|
588
610
|
return Joi.object({
|
|
589
|
-
|
|
590
|
-
description: Joi.string().allow("").required(),
|
|
591
|
-
file_url: Joi.string().allow(""),
|
|
592
|
-
name: Joi.string().allow("").required(),
|
|
593
|
-
type: Joi.string().allow(""),
|
|
611
|
+
user_id: Joi.string().allow(""),
|
|
594
612
|
});
|
|
595
613
|
}
|
|
596
614
|
|
|
597
|
-
/** @returns {
|
|
598
|
-
static
|
|
615
|
+
/** @returns {UnDeleteUserRequestSchema} */
|
|
616
|
+
static UnDeleteUserRequestSchema() {
|
|
599
617
|
return Joi.object({
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
gender: Joi.string().allow(""),
|
|
604
|
-
last_name: Joi.string().allow(""),
|
|
605
|
-
meta: Joi.any(),
|
|
606
|
-
phone_number: Joi.string().allow("").required(),
|
|
607
|
-
username: Joi.string().allow("").required(),
|
|
618
|
+
user_id: Joi.string().allow(""),
|
|
619
|
+
reason: Joi.string().allow(""),
|
|
620
|
+
reason_id: Joi.string().allow(""),
|
|
608
621
|
});
|
|
609
622
|
}
|
|
610
623
|
|
|
611
|
-
/** @returns {
|
|
612
|
-
static
|
|
624
|
+
/** @returns {BlockUserSuccess} */
|
|
625
|
+
static BlockUserSuccess() {
|
|
613
626
|
return Joi.object({
|
|
614
|
-
|
|
627
|
+
success: Joi.boolean(),
|
|
615
628
|
});
|
|
616
629
|
}
|
|
617
630
|
|
|
618
|
-
/** @returns {
|
|
619
|
-
static
|
|
631
|
+
/** @returns {ArchiveUserSuccess} */
|
|
632
|
+
static ArchiveUserSuccess() {
|
|
620
633
|
return Joi.object({
|
|
621
|
-
|
|
622
|
-
max_age: Joi.number(),
|
|
623
|
-
user_id: Joi.string().allow(""),
|
|
634
|
+
success: Joi.boolean(),
|
|
624
635
|
});
|
|
625
636
|
}
|
|
626
637
|
|
|
627
|
-
/** @returns {
|
|
628
|
-
static
|
|
638
|
+
/** @returns {UnDeleteUserSuccess} */
|
|
639
|
+
static UnDeleteUserSuccess() {
|
|
629
640
|
return Joi.object({
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
641
|
+
success: Joi.boolean(),
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/** @returns {UserSearchResponseSchema} */
|
|
646
|
+
static UserSearchResponseSchema() {
|
|
647
|
+
return Joi.object({
|
|
648
|
+
users: Joi.array().items(UserPlatformModel.UserSchema()),
|
|
635
649
|
});
|
|
636
650
|
}
|
|
637
651
|
|
|
@@ -643,181 +657,228 @@ class UserPlatformModel {
|
|
|
643
657
|
});
|
|
644
658
|
}
|
|
645
659
|
|
|
646
|
-
/** @returns {
|
|
647
|
-
static
|
|
660
|
+
/** @returns {PaginationSchema} */
|
|
661
|
+
static PaginationSchema() {
|
|
648
662
|
return Joi.object({
|
|
649
|
-
|
|
663
|
+
size: Joi.number(),
|
|
664
|
+
item_total: Joi.number(),
|
|
665
|
+
has_next: Joi.boolean(),
|
|
666
|
+
type: Joi.string().allow(""),
|
|
667
|
+
current: Joi.number(),
|
|
650
668
|
});
|
|
651
669
|
}
|
|
652
670
|
|
|
653
|
-
/** @returns {
|
|
654
|
-
static
|
|
671
|
+
/** @returns {SessionListResponseSchema} */
|
|
672
|
+
static SessionListResponseSchema() {
|
|
655
673
|
return Joi.object({
|
|
656
|
-
|
|
657
|
-
reason_text: Joi.string().allow(""),
|
|
658
|
-
show_text_area: Joi.boolean(),
|
|
674
|
+
items: Joi.array().items(UserPlatformModel.SessionListResponseInfo()),
|
|
659
675
|
});
|
|
660
676
|
}
|
|
661
677
|
|
|
662
|
-
/** @returns {
|
|
663
|
-
static
|
|
678
|
+
/** @returns {SessionDeleteResponseSchema} */
|
|
679
|
+
static SessionDeleteResponseSchema() {
|
|
664
680
|
return Joi.object({
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
primary: Joi.boolean(),
|
|
668
|
-
verified: Joi.boolean(),
|
|
681
|
+
user_id: Joi.string().allow(""),
|
|
682
|
+
session_id: Joi.string().allow(""),
|
|
669
683
|
});
|
|
670
684
|
}
|
|
671
685
|
|
|
672
|
-
/** @returns {
|
|
673
|
-
static
|
|
686
|
+
/** @returns {SessionsDeleteResponseSchema} */
|
|
687
|
+
static SessionsDeleteResponseSchema() {
|
|
674
688
|
return Joi.object({
|
|
675
|
-
|
|
689
|
+
user_id: Joi.string().allow(""),
|
|
690
|
+
session_ids: Joi.array().items(Joi.string().allow("")),
|
|
676
691
|
});
|
|
677
692
|
}
|
|
678
693
|
|
|
679
|
-
/** @returns {
|
|
680
|
-
static
|
|
694
|
+
/** @returns {AuthenticationApiErrorSchema} */
|
|
695
|
+
static AuthenticationApiErrorSchema() {
|
|
681
696
|
return Joi.object({
|
|
682
|
-
|
|
683
|
-
text: Joi.string().allow(""),
|
|
684
|
-
text_color: Joi.string().allow(""),
|
|
697
|
+
message: Joi.string().allow(""),
|
|
685
698
|
});
|
|
686
699
|
}
|
|
687
700
|
|
|
688
|
-
/** @returns {
|
|
689
|
-
static
|
|
701
|
+
/** @returns {SessionListResponseInfo} */
|
|
702
|
+
static SessionListResponseInfo() {
|
|
690
703
|
return Joi.object({
|
|
691
|
-
|
|
704
|
+
session_id: Joi.string().allow(""),
|
|
705
|
+
user_agent: Joi.string().allow(""),
|
|
706
|
+
ip: Joi.string().allow(""),
|
|
707
|
+
domain: Joi.string().allow(""),
|
|
708
|
+
expire_in: Joi.string().allow(""),
|
|
692
709
|
});
|
|
693
710
|
}
|
|
694
711
|
|
|
695
|
-
/** @returns {
|
|
696
|
-
static
|
|
712
|
+
/** @returns {Conditions} */
|
|
713
|
+
static Conditions() {
|
|
697
714
|
return Joi.object({
|
|
698
|
-
|
|
699
|
-
|
|
715
|
+
user_attribute_definition_id: Joi.string().allow(""),
|
|
716
|
+
type: Joi.string().allow(""),
|
|
717
|
+
value: Joi.string().allow(""),
|
|
718
|
+
key: Joi.string().allow(""),
|
|
700
719
|
});
|
|
701
720
|
}
|
|
702
721
|
|
|
703
|
-
/** @returns {
|
|
704
|
-
static
|
|
722
|
+
/** @returns {UserResponseErrorSchema} */
|
|
723
|
+
static UserResponseErrorSchema() {
|
|
705
724
|
return Joi.object({
|
|
706
|
-
|
|
707
|
-
|
|
725
|
+
count: Joi.number(),
|
|
726
|
+
file_url: Joi.string().allow(""),
|
|
708
727
|
});
|
|
709
728
|
}
|
|
710
729
|
|
|
711
|
-
/** @returns {
|
|
712
|
-
static
|
|
730
|
+
/** @returns {UserGroupResponseSchema} */
|
|
731
|
+
static UserGroupResponseSchema() {
|
|
713
732
|
return Joi.object({
|
|
714
|
-
|
|
733
|
+
conditions: Joi.array().items(UserPlatformModel.Conditions()),
|
|
734
|
+
error: UserPlatformModel.UserResponseErrorSchema(),
|
|
735
|
+
name: Joi.string().allow(""),
|
|
736
|
+
description: Joi.string().allow(""),
|
|
737
|
+
file_url: Joi.string().allow(""),
|
|
738
|
+
_id: Joi.string().allow(""),
|
|
739
|
+
status: Joi.string().allow(""),
|
|
740
|
+
is_active: Joi.boolean(),
|
|
741
|
+
type: Joi.string().allow(""),
|
|
742
|
+
uid: Joi.number(),
|
|
743
|
+
application_id: Joi.string().allow(""),
|
|
744
|
+
created_at: Joi.string().allow(""),
|
|
745
|
+
modified_at: Joi.string().allow(""),
|
|
746
|
+
__v: Joi.number(),
|
|
715
747
|
});
|
|
716
748
|
}
|
|
717
749
|
|
|
718
|
-
/** @returns {
|
|
719
|
-
static
|
|
750
|
+
/** @returns {UserGroupListResponseSchema} */
|
|
751
|
+
static UserGroupListResponseSchema() {
|
|
720
752
|
return Joi.object({
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
753
|
+
items: Joi.array().items(UserPlatformModel.UserGroupResponseSchema()),
|
|
754
|
+
page: UserPlatformModel.PaginationSchema(),
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/** @returns {ConditionsSchema} */
|
|
759
|
+
static ConditionsSchema() {
|
|
760
|
+
return Joi.object({
|
|
761
|
+
user_attribute_definition_id: Joi.string().allow(""),
|
|
725
762
|
type: Joi.string().allow(""),
|
|
763
|
+
value: Joi.string().allow(""),
|
|
726
764
|
});
|
|
727
765
|
}
|
|
728
766
|
|
|
729
|
-
/** @returns {
|
|
730
|
-
static
|
|
767
|
+
/** @returns {CreateUserGroup} */
|
|
768
|
+
static CreateUserGroup() {
|
|
731
769
|
return Joi.object({
|
|
732
|
-
|
|
733
|
-
file_url: Joi.string().allow(""),
|
|
734
|
-
name: Joi.string().allow(""),
|
|
770
|
+
conditions: Joi.array().items(UserPlatformModel.ConditionsSchema()),
|
|
735
771
|
type: Joi.string().allow(""),
|
|
736
|
-
|
|
772
|
+
name: Joi.string().allow("").required(),
|
|
773
|
+
description: Joi.string().allow("").required(),
|
|
774
|
+
file_url: Joi.string().allow(""),
|
|
737
775
|
});
|
|
738
776
|
}
|
|
739
777
|
|
|
740
|
-
/** @returns {
|
|
741
|
-
static
|
|
778
|
+
/** @returns {CreateUserRequestSchema} */
|
|
779
|
+
static CreateUserRequestSchema() {
|
|
742
780
|
return Joi.object({
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
781
|
+
phone_number: Joi.string().allow("").required(),
|
|
782
|
+
email: Joi.string().allow(""),
|
|
783
|
+
first_name: Joi.string().allow(""),
|
|
784
|
+
last_name: Joi.string().allow(""),
|
|
785
|
+
gender: Joi.string().allow(""),
|
|
786
|
+
username: Joi.string().allow("").required(),
|
|
787
|
+
meta: Joi.any(),
|
|
788
|
+
external_id: Joi.string().allow(""),
|
|
748
789
|
});
|
|
749
790
|
}
|
|
750
791
|
|
|
751
|
-
/** @returns {
|
|
752
|
-
static
|
|
792
|
+
/** @returns {CreateUserResponseSchema} */
|
|
793
|
+
static CreateUserResponseSchema() {
|
|
753
794
|
return Joi.object({
|
|
754
|
-
|
|
755
|
-
level: Joi.string().allow(""),
|
|
795
|
+
user: UserPlatformModel.UserSchema(),
|
|
756
796
|
});
|
|
757
797
|
}
|
|
758
798
|
|
|
759
|
-
/** @returns {
|
|
760
|
-
static
|
|
799
|
+
/** @returns {CreateUserSessionRequestSchema} */
|
|
800
|
+
static CreateUserSessionRequestSchema() {
|
|
761
801
|
return Joi.object({
|
|
762
|
-
|
|
763
|
-
|
|
802
|
+
domain: Joi.string().allow(""),
|
|
803
|
+
max_age: Joi.number(),
|
|
804
|
+
user_id: Joi.string().allow(""),
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/** @returns {CreateUserSessionResponseSchema} */
|
|
809
|
+
static CreateUserSessionResponseSchema() {
|
|
810
|
+
return Joi.object({
|
|
811
|
+
domain: Joi.string().allow(""),
|
|
812
|
+
max_age: Joi.number(),
|
|
813
|
+
secure: Joi.boolean(),
|
|
814
|
+
http_only: Joi.boolean(),
|
|
815
|
+
cookie: Joi.any(),
|
|
764
816
|
});
|
|
765
817
|
}
|
|
766
818
|
|
|
767
819
|
/** @returns {PlatformSchema} */
|
|
768
820
|
static PlatformSchema() {
|
|
769
821
|
return Joi.object({
|
|
770
|
-
_id: Joi.string().allow(""),
|
|
771
|
-
active: Joi.boolean(),
|
|
772
|
-
created_at: Joi.string().allow(""),
|
|
773
|
-
delete_account_consent: Joi.any(),
|
|
774
|
-
delete_account_day: Joi.number(),
|
|
775
|
-
delete_account_reasons: Joi.array().items(
|
|
776
|
-
UserPlatformModel.DeleteAccountReasons()
|
|
777
|
-
),
|
|
778
|
-
desktop_image: Joi.string().allow(""),
|
|
779
822
|
display: Joi.string().allow(""),
|
|
780
|
-
|
|
823
|
+
look_and_feel: UserPlatformModel.LookAndFeel(),
|
|
824
|
+
updated_at: Joi.string().allow(""),
|
|
825
|
+
active: Joi.boolean(),
|
|
781
826
|
forgot_password: Joi.boolean(),
|
|
782
827
|
login: UserPlatformModel.Login(),
|
|
783
|
-
|
|
784
|
-
meta: UserPlatformModel.MetaSchema(),
|
|
785
|
-
mobile_image: Joi.string().allow(""),
|
|
828
|
+
skip_captcha: Joi.boolean(),
|
|
786
829
|
name: Joi.string().allow(""),
|
|
787
|
-
|
|
788
|
-
|
|
830
|
+
meta: UserPlatformModel.MetaSchema(),
|
|
831
|
+
_id: Joi.string().allow(""),
|
|
832
|
+
social: UserPlatformModel.Social(),
|
|
789
833
|
required_fields: UserPlatformModel.RequiredFields(),
|
|
790
|
-
|
|
791
|
-
skip_captcha: Joi.boolean(),
|
|
834
|
+
register_required_fields: UserPlatformModel.RegisterRequiredFields(),
|
|
792
835
|
skip_login: Joi.boolean(),
|
|
793
|
-
|
|
794
|
-
social_tokens: UserPlatformModel.SocialTokens(),
|
|
836
|
+
flash_card: UserPlatformModel.FlashCard(),
|
|
795
837
|
subtext: Joi.string().allow(""),
|
|
796
|
-
|
|
838
|
+
social_tokens: UserPlatformModel.SocialTokens(),
|
|
839
|
+
created_at: Joi.string().allow(""),
|
|
840
|
+
register: Joi.boolean(),
|
|
841
|
+
mobile_image: Joi.string().allow(""),
|
|
842
|
+
desktop_image: Joi.string().allow(""),
|
|
843
|
+
delete_account_day: Joi.number(),
|
|
844
|
+
delete_account_reasons: Joi.array().items(
|
|
845
|
+
UserPlatformModel.DeleteAccountReasons()
|
|
846
|
+
),
|
|
847
|
+
delete_account_consent: Joi.any(),
|
|
848
|
+
session_config: Joi.any(),
|
|
797
849
|
});
|
|
798
850
|
}
|
|
799
851
|
|
|
800
|
-
/** @returns {
|
|
801
|
-
static
|
|
852
|
+
/** @returns {LookAndFeel} */
|
|
853
|
+
static LookAndFeel() {
|
|
802
854
|
return Joi.object({
|
|
803
|
-
|
|
804
|
-
|
|
855
|
+
card_position: Joi.string().allow(""),
|
|
856
|
+
background_color: Joi.string().allow(""),
|
|
805
857
|
});
|
|
806
858
|
}
|
|
807
859
|
|
|
808
|
-
/** @returns {
|
|
809
|
-
static
|
|
860
|
+
/** @returns {Login} */
|
|
861
|
+
static Login() {
|
|
810
862
|
return Joi.object({
|
|
811
|
-
|
|
812
|
-
|
|
863
|
+
password: Joi.boolean(),
|
|
864
|
+
otp: Joi.boolean(),
|
|
813
865
|
});
|
|
814
866
|
}
|
|
815
867
|
|
|
816
|
-
/** @returns {
|
|
817
|
-
static
|
|
868
|
+
/** @returns {MetaSchema} */
|
|
869
|
+
static MetaSchema() {
|
|
818
870
|
return Joi.object({
|
|
819
|
-
|
|
820
|
-
|
|
871
|
+
fynd_default: Joi.boolean(),
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
/** @returns {Social} */
|
|
876
|
+
static Social() {
|
|
877
|
+
return Joi.object({
|
|
878
|
+
account_kit: Joi.boolean(),
|
|
879
|
+
facebook: Joi.boolean(),
|
|
880
|
+
google: Joi.boolean(),
|
|
881
|
+
apple: Joi.boolean(),
|
|
821
882
|
});
|
|
822
883
|
}
|
|
823
884
|
|
|
@@ -829,229 +890,162 @@ class UserPlatformModel {
|
|
|
829
890
|
});
|
|
830
891
|
}
|
|
831
892
|
|
|
832
|
-
/** @returns {
|
|
833
|
-
static
|
|
893
|
+
/** @returns {PlatformEmail} */
|
|
894
|
+
static PlatformEmail() {
|
|
834
895
|
return Joi.object({
|
|
835
|
-
|
|
836
|
-
|
|
896
|
+
is_required: Joi.boolean(),
|
|
897
|
+
level: Joi.string().allow(""),
|
|
837
898
|
});
|
|
838
899
|
}
|
|
839
900
|
|
|
840
|
-
/** @returns {
|
|
841
|
-
static
|
|
901
|
+
/** @returns {PlatformMobile} */
|
|
902
|
+
static PlatformMobile() {
|
|
842
903
|
return Joi.object({
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
type: Joi.string().allow(""),
|
|
904
|
+
is_required: Joi.boolean(),
|
|
905
|
+
level: Joi.string().allow(""),
|
|
846
906
|
});
|
|
847
907
|
}
|
|
848
908
|
|
|
849
|
-
/** @returns {
|
|
850
|
-
static
|
|
909
|
+
/** @returns {RegisterRequiredFields} */
|
|
910
|
+
static RegisterRequiredFields() {
|
|
851
911
|
return Joi.object({
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
ip: Joi.string().allow(""),
|
|
855
|
-
session_id: Joi.string().allow(""),
|
|
856
|
-
user_agent: Joi.string().allow(""),
|
|
912
|
+
email: UserPlatformModel.RegisterRequiredFieldsEmail(),
|
|
913
|
+
mobile: UserPlatformModel.RegisterRequiredFieldsMobile(),
|
|
857
914
|
});
|
|
858
915
|
}
|
|
859
916
|
|
|
860
|
-
/** @returns {
|
|
861
|
-
static
|
|
917
|
+
/** @returns {RegisterRequiredFieldsEmail} */
|
|
918
|
+
static RegisterRequiredFieldsEmail() {
|
|
862
919
|
return Joi.object({
|
|
863
|
-
|
|
920
|
+
is_required: Joi.boolean(),
|
|
921
|
+
level: Joi.string().allow(""),
|
|
864
922
|
});
|
|
865
923
|
}
|
|
866
924
|
|
|
867
|
-
/** @returns {
|
|
868
|
-
static
|
|
925
|
+
/** @returns {RegisterRequiredFieldsMobile} */
|
|
926
|
+
static RegisterRequiredFieldsMobile() {
|
|
869
927
|
return Joi.object({
|
|
870
|
-
|
|
871
|
-
|
|
928
|
+
is_required: Joi.boolean(),
|
|
929
|
+
level: Joi.string().allow(""),
|
|
872
930
|
});
|
|
873
931
|
}
|
|
874
932
|
|
|
875
|
-
/** @returns {
|
|
876
|
-
static
|
|
933
|
+
/** @returns {FlashCard} */
|
|
934
|
+
static FlashCard() {
|
|
877
935
|
return Joi.object({
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
google: Joi.boolean(),
|
|
936
|
+
text: Joi.string().allow(""),
|
|
937
|
+
text_color: Joi.string().allow(""),
|
|
938
|
+
background_color: Joi.string().allow(""),
|
|
882
939
|
});
|
|
883
940
|
}
|
|
884
941
|
|
|
885
942
|
/** @returns {SocialTokens} */
|
|
886
943
|
static SocialTokens() {
|
|
887
944
|
return Joi.object({
|
|
888
|
-
account_kit: UserPlatformModel.Accountkit(),
|
|
889
945
|
facebook: UserPlatformModel.Facebook(),
|
|
946
|
+
account_kit: UserPlatformModel.Accountkit(),
|
|
890
947
|
google: UserPlatformModel.Google(),
|
|
891
948
|
});
|
|
892
949
|
}
|
|
893
950
|
|
|
894
|
-
/** @returns {
|
|
895
|
-
static
|
|
896
|
-
return Joi.object({
|
|
897
|
-
success: Joi.string().allow(""),
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
/** @returns {UnDeleteUserRequestSchema} */
|
|
902
|
-
static UnDeleteUserRequestSchema() {
|
|
951
|
+
/** @returns {DeleteAccountReasons} */
|
|
952
|
+
static DeleteAccountReasons() {
|
|
903
953
|
return Joi.object({
|
|
904
|
-
|
|
954
|
+
reason_text: Joi.string().allow(""),
|
|
905
955
|
reason_id: Joi.string().allow(""),
|
|
906
|
-
|
|
956
|
+
show_text_area: Joi.boolean(),
|
|
907
957
|
});
|
|
908
958
|
}
|
|
909
959
|
|
|
910
|
-
/** @returns {
|
|
911
|
-
static
|
|
960
|
+
/** @returns {DeleteAccountConsent} */
|
|
961
|
+
static DeleteAccountConsent() {
|
|
912
962
|
return Joi.object({
|
|
913
|
-
|
|
963
|
+
consent_text: Joi.string().allow(""),
|
|
914
964
|
});
|
|
915
965
|
}
|
|
916
966
|
|
|
917
|
-
/** @returns {
|
|
918
|
-
static
|
|
967
|
+
/** @returns {Facebook} */
|
|
968
|
+
static Facebook() {
|
|
919
969
|
return Joi.object({
|
|
920
|
-
|
|
921
|
-
description: Joi.string().allow(""),
|
|
922
|
-
file_url: Joi.string().allow(""),
|
|
923
|
-
name: Joi.string().allow(""),
|
|
924
|
-
type: Joi.string().allow(""),
|
|
970
|
+
app_id: Joi.string().allow(""),
|
|
925
971
|
});
|
|
926
972
|
}
|
|
927
973
|
|
|
928
|
-
/** @returns {
|
|
929
|
-
static
|
|
974
|
+
/** @returns {Accountkit} */
|
|
975
|
+
static Accountkit() {
|
|
930
976
|
return Joi.object({
|
|
931
|
-
|
|
932
|
-
external_id: Joi.string().allow(""),
|
|
933
|
-
first_name: Joi.string().allow(""),
|
|
934
|
-
gender: Joi.string().allow(""),
|
|
935
|
-
last_name: Joi.string().allow(""),
|
|
936
|
-
meta: Joi.any(),
|
|
937
|
-
phone_numbers: Joi.array().items(UserPlatformModel.UserPhoneNumbers()),
|
|
977
|
+
app_id: Joi.string().allow(""),
|
|
938
978
|
});
|
|
939
979
|
}
|
|
940
980
|
|
|
941
|
-
/** @returns {
|
|
942
|
-
static
|
|
981
|
+
/** @returns {Google} */
|
|
982
|
+
static Google() {
|
|
943
983
|
return Joi.object({
|
|
944
|
-
|
|
945
|
-
_id: Joi.string().allow(""),
|
|
946
|
-
application_id: Joi.string().allow(""),
|
|
947
|
-
created_at: Joi.string().allow(""),
|
|
948
|
-
customer_editable: Joi.boolean(),
|
|
949
|
-
description: Joi.string().allow(""),
|
|
950
|
-
encrypted: Joi.boolean(),
|
|
951
|
-
is_locked: Joi.boolean(),
|
|
952
|
-
modified_at: Joi.string().allow(""),
|
|
953
|
-
multi_value: Joi.boolean(),
|
|
954
|
-
name: Joi.string().allow(""),
|
|
955
|
-
pin_order: Joi.number(),
|
|
956
|
-
pinned: Joi.boolean(),
|
|
957
|
-
slug: Joi.string().allow(""),
|
|
958
|
-
type: Joi.string().allow(""),
|
|
959
|
-
validations: Joi.array().items(Joi.any()),
|
|
984
|
+
app_id: Joi.string().allow(""),
|
|
960
985
|
});
|
|
961
986
|
}
|
|
962
987
|
|
|
963
|
-
/** @returns {
|
|
964
|
-
static
|
|
988
|
+
/** @returns {SessionExpiry} */
|
|
989
|
+
static SessionExpiry() {
|
|
965
990
|
return Joi.object({
|
|
966
|
-
|
|
967
|
-
application_id: Joi.string().allow(""),
|
|
968
|
-
created_at: Joi.string().allow(""),
|
|
969
|
-
created_by: Joi.string().allow(""),
|
|
970
|
-
customer_editable: Joi.boolean(),
|
|
971
|
-
description: Joi.string().allow(""),
|
|
972
|
-
encrypted: Joi.boolean(),
|
|
973
|
-
is_locked: Joi.boolean(),
|
|
974
|
-
modified_at: Joi.string().allow(""),
|
|
975
|
-
multi_value: Joi.boolean(),
|
|
976
|
-
name: Joi.string().allow(""),
|
|
977
|
-
pin_order: Joi.number(),
|
|
978
|
-
pinned: Joi.boolean(),
|
|
979
|
-
slug: Joi.string().allow(""),
|
|
991
|
+
duration: Joi.number(),
|
|
980
992
|
type: Joi.string().allow(""),
|
|
981
|
-
|
|
982
|
-
validations: Joi.array().items(
|
|
983
|
-
UserPlatformModel.UserAttributeDefinitionValidation()
|
|
984
|
-
),
|
|
993
|
+
is_rolling: Joi.boolean(),
|
|
985
994
|
});
|
|
986
995
|
}
|
|
987
996
|
|
|
988
|
-
/** @returns {
|
|
989
|
-
static
|
|
997
|
+
/** @returns {UpdateUserGroupSchema} */
|
|
998
|
+
static UpdateUserGroupSchema() {
|
|
990
999
|
return Joi.object({
|
|
1000
|
+
conditions: Joi.array().items(UserPlatformModel.ConditionsSchema()),
|
|
991
1001
|
type: Joi.string().allow(""),
|
|
992
|
-
|
|
1002
|
+
name: Joi.string().allow(""),
|
|
1003
|
+
description: Joi.string().allow(""),
|
|
1004
|
+
file_url: Joi.string().allow(""),
|
|
993
1005
|
});
|
|
994
1006
|
}
|
|
995
1007
|
|
|
996
|
-
/** @returns {
|
|
997
|
-
static
|
|
1008
|
+
/** @returns {PartialUserGroupUpdateSchema} */
|
|
1009
|
+
static PartialUserGroupUpdateSchema() {
|
|
998
1010
|
return Joi.object({
|
|
999
|
-
_id: Joi.string().allow(""),
|
|
1000
|
-
application_id: Joi.string().allow(""),
|
|
1001
|
-
attribute: Joi.any(),
|
|
1002
|
-
customer_overriden: Joi.boolean(),
|
|
1003
|
-
name: Joi.string().allow(""),
|
|
1004
1011
|
type: Joi.string().allow(""),
|
|
1005
|
-
|
|
1006
|
-
|
|
1012
|
+
name: Joi.string().allow(""),
|
|
1013
|
+
description: Joi.string().allow(""),
|
|
1014
|
+
file_url: Joi.string().allow(""),
|
|
1015
|
+
user_data: Joi.array().items(UserPlatformModel.UserGroupUpdateData()),
|
|
1007
1016
|
});
|
|
1008
1017
|
}
|
|
1009
1018
|
|
|
1010
|
-
/** @returns {
|
|
1011
|
-
static
|
|
1019
|
+
/** @returns {UserGroupUpdateData} */
|
|
1020
|
+
static UserGroupUpdateData() {
|
|
1012
1021
|
return Joi.object({
|
|
1013
|
-
|
|
1022
|
+
user_id: Joi.string().allow(""),
|
|
1023
|
+
phone_number: Joi.string().allow(""),
|
|
1014
1024
|
email: Joi.string().allow(""),
|
|
1015
|
-
|
|
1016
|
-
verified: Joi.boolean(),
|
|
1017
|
-
});
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
/** @returns {UserGroupListResponseSchema} */
|
|
1021
|
-
static UserGroupListResponseSchema() {
|
|
1022
|
-
return Joi.object({
|
|
1023
|
-
items: Joi.array().items(UserPlatformModel.UserGroupResponseSchema()),
|
|
1024
|
-
page: UserPlatformModel.PaginationSchema(),
|
|
1025
|
+
action: Joi.string().allow("").required(),
|
|
1025
1026
|
});
|
|
1026
1027
|
}
|
|
1027
1028
|
|
|
1028
|
-
/** @returns {
|
|
1029
|
-
static
|
|
1029
|
+
/** @returns {UpdateUserRequestSchema} */
|
|
1030
|
+
static UpdateUserRequestSchema() {
|
|
1030
1031
|
return Joi.object({
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
file_url: Joi.string().allow(""),
|
|
1039
|
-
is_active: Joi.boolean(),
|
|
1040
|
-
modified_at: Joi.string().allow(""),
|
|
1041
|
-
name: Joi.string().allow(""),
|
|
1042
|
-
status: Joi.string().allow(""),
|
|
1043
|
-
type: Joi.string().allow(""),
|
|
1044
|
-
uid: Joi.number(),
|
|
1032
|
+
first_name: Joi.string().allow(""),
|
|
1033
|
+
last_name: Joi.string().allow(""),
|
|
1034
|
+
gender: Joi.string().allow(""),
|
|
1035
|
+
external_id: Joi.string().allow(""),
|
|
1036
|
+
meta: Joi.any(),
|
|
1037
|
+
phone_numbers: Joi.array().items(UserPlatformModel.UserPhoneNumbers()),
|
|
1038
|
+
emails: Joi.array().items(UserPlatformModel.UserEmails()),
|
|
1045
1039
|
});
|
|
1046
1040
|
}
|
|
1047
1041
|
|
|
1048
|
-
/** @returns {
|
|
1049
|
-
static
|
|
1042
|
+
/** @returns {UserEmails} */
|
|
1043
|
+
static UserEmails() {
|
|
1050
1044
|
return Joi.object({
|
|
1051
|
-
|
|
1045
|
+
active: Joi.boolean(),
|
|
1046
|
+
primary: Joi.boolean(),
|
|
1047
|
+
verified: Joi.boolean(),
|
|
1052
1048
|
email: Joi.string().allow(""),
|
|
1053
|
-
phone_number: Joi.string().allow(""),
|
|
1054
|
-
user_id: Joi.string().allow(""),
|
|
1055
1049
|
});
|
|
1056
1050
|
}
|
|
1057
1051
|
|
|
@@ -1059,48 +1053,54 @@ class UserPlatformModel {
|
|
|
1059
1053
|
static UserPhoneNumbers() {
|
|
1060
1054
|
return Joi.object({
|
|
1061
1055
|
active: Joi.boolean(),
|
|
1062
|
-
country_code: Joi.string().allow(""),
|
|
1063
|
-
phone: Joi.string().allow(""),
|
|
1064
1056
|
primary: Joi.boolean(),
|
|
1065
1057
|
verified: Joi.boolean(),
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
/** @returns {UserResponseErrorSchema} */
|
|
1070
|
-
static UserResponseErrorSchema() {
|
|
1071
|
-
return Joi.object({
|
|
1072
|
-
count: Joi.number(),
|
|
1073
|
-
file_url: Joi.string().allow(""),
|
|
1058
|
+
phone: Joi.string().allow(""),
|
|
1059
|
+
country_code: Joi.string().allow(""),
|
|
1074
1060
|
});
|
|
1075
1061
|
}
|
|
1076
1062
|
|
|
1077
1063
|
/** @returns {UserSchema} */
|
|
1078
1064
|
static UserSchema() {
|
|
1079
1065
|
return Joi.object({
|
|
1080
|
-
_id: Joi.string().allow(""),
|
|
1081
|
-
account_type: Joi.string().allow(""),
|
|
1082
|
-
active: Joi.boolean(),
|
|
1083
1066
|
application_id: Joi.string().allow(""),
|
|
1084
|
-
|
|
1085
|
-
dob: Joi.string().allow(""),
|
|
1086
|
-
emails: Joi.array().items(UserPlatformModel.Email()),
|
|
1087
|
-
external_id: Joi.string().allow(""),
|
|
1067
|
+
user_id: Joi.string().allow(""),
|
|
1088
1068
|
first_name: Joi.string().allow(""),
|
|
1089
|
-
gender: Joi.string().allow(""),
|
|
1090
|
-
last_name: Joi.string().allow(""),
|
|
1091
1069
|
meta: Joi.any(),
|
|
1070
|
+
last_name: Joi.string().allow(""),
|
|
1092
1071
|
phone_numbers: Joi.array().items(UserPlatformModel.PhoneNumber()),
|
|
1072
|
+
emails: Joi.array().items(UserPlatformModel.Email()),
|
|
1073
|
+
gender: Joi.string().allow(""),
|
|
1074
|
+
dob: Joi.string().allow(""),
|
|
1075
|
+
active: Joi.boolean(),
|
|
1093
1076
|
profile_pic_url: Joi.string().allow(""),
|
|
1094
|
-
updated_at: Joi.string().allow(""),
|
|
1095
|
-
user_id: Joi.string().allow(""),
|
|
1096
1077
|
username: Joi.string().allow(""),
|
|
1078
|
+
account_type: Joi.string().allow(""),
|
|
1079
|
+
_id: Joi.string().allow(""),
|
|
1080
|
+
created_at: Joi.string().allow(""),
|
|
1081
|
+
updated_at: Joi.string().allow(""),
|
|
1082
|
+
external_id: Joi.string().allow(""),
|
|
1097
1083
|
});
|
|
1098
1084
|
}
|
|
1099
1085
|
|
|
1100
|
-
/** @returns {
|
|
1101
|
-
static
|
|
1086
|
+
/** @returns {PhoneNumber} */
|
|
1087
|
+
static PhoneNumber() {
|
|
1102
1088
|
return Joi.object({
|
|
1103
|
-
|
|
1089
|
+
active: Joi.boolean(),
|
|
1090
|
+
primary: Joi.boolean(),
|
|
1091
|
+
verified: Joi.boolean(),
|
|
1092
|
+
phone: Joi.string().allow(""),
|
|
1093
|
+
country_code: Joi.number(),
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
/** @returns {Email} */
|
|
1098
|
+
static Email() {
|
|
1099
|
+
return Joi.object({
|
|
1100
|
+
primary: Joi.boolean(),
|
|
1101
|
+
verified: Joi.boolean(),
|
|
1102
|
+
email: Joi.string().allow(""),
|
|
1103
|
+
active: Joi.boolean(),
|
|
1104
1104
|
});
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|