@gofynd/fdk-client-javascript 1.4.2-beta.2 → 1.4.2-beta.4
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 +852 -846
- package/sdk/application/Order/OrderApplicationModel.js +828 -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 +2176 -2145
- package/sdk/application/Payment/PaymentApplicationModel.js +1474 -1453
- 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/UserApplicationClient.d.ts +2 -2
- package/sdk/application/User/UserApplicationClient.js +4 -7
- package/sdk/application/User/UserApplicationModel.d.ts +769 -764
- package/sdk/application/User/UserApplicationModel.js +731 -741
- 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/CatalogPlatformApplicationClient.d.ts +26 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +182 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +70 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +44 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -980
- package/sdk/platform/Catalog/CatalogPlatformModel.js +977 -933
- 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 +1842 -1825
- package/sdk/platform/Content/ContentPlatformModel.js +1868 -1848
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
- package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +7 -4
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +882 -869
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +894 -878
- 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 +5192 -5176
- package/sdk/platform/Order/OrderPlatformModel.js +4752 -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 +2693 -2657
- package/sdk/platform/Payment/PaymentPlatformModel.js +1842 -1819
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +7 -6
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +11 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1674 -1539
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1663 -1534
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationClient.js +19 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +13 -3
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -2
- 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 +823 -753
- package/sdk/platform/User/UserPlatformModel.js +731 -661
- 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 {UserSearchSchema[]} [users]
|
|
111
126
|
*/
|
|
112
127
|
|
|
113
128
|
/**
|
|
@@ -117,149 +132,192 @@ 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} [
|
|
148
|
-
* @property {string} [
|
|
161
|
+
* @typedef APIError
|
|
162
|
+
* @property {string} [code]
|
|
163
|
+
* @property {string} [message]
|
|
164
|
+
* @property {string} [info] - Error code description link
|
|
165
|
+
* @property {string} [request_id]
|
|
166
|
+
* @property {string} [error]
|
|
167
|
+
* @property {Object} [meta]
|
|
168
|
+
* @property {boolean} [authenticated]
|
|
149
169
|
*/
|
|
150
170
|
|
|
151
171
|
/**
|
|
152
|
-
* @typedef
|
|
153
|
-
* @property {string} [
|
|
172
|
+
* @typedef SessionListResponseInfo
|
|
173
|
+
* @property {string} [session_id]
|
|
174
|
+
* @property {string} [user_agent]
|
|
175
|
+
* @property {string} [ip]
|
|
176
|
+
* @property {string} [domain]
|
|
177
|
+
* @property {string} [expire_in]
|
|
178
|
+
* @property {string} [location]
|
|
154
179
|
*/
|
|
155
180
|
|
|
156
181
|
/**
|
|
157
|
-
* @typedef
|
|
158
|
-
* @property {
|
|
159
|
-
* @property {
|
|
182
|
+
* @typedef Conditions
|
|
183
|
+
* @property {string} [user_attribute_definition_id]
|
|
184
|
+
* @property {string} [type]
|
|
185
|
+
* @property {string} [value]
|
|
186
|
+
* @property {string} [key]
|
|
160
187
|
*/
|
|
161
188
|
|
|
162
189
|
/**
|
|
163
|
-
* @typedef
|
|
164
|
-
* @property {
|
|
165
|
-
* @property {string} [
|
|
190
|
+
* @typedef UserResponseErrorSchema
|
|
191
|
+
* @property {number} [count]
|
|
192
|
+
* @property {string} [file_url]
|
|
166
193
|
*/
|
|
167
194
|
|
|
168
195
|
/**
|
|
169
|
-
* @typedef
|
|
170
|
-
* @property {
|
|
196
|
+
* @typedef UserGroupResponseSchema
|
|
197
|
+
* @property {Conditions[]} [conditions]
|
|
198
|
+
* @property {UserResponseErrorSchema} [error]
|
|
199
|
+
* @property {string} [name]
|
|
200
|
+
* @property {string} [description]
|
|
201
|
+
* @property {string} [file_url]
|
|
202
|
+
* @property {string} [_id]
|
|
203
|
+
* @property {string} [status]
|
|
204
|
+
* @property {boolean} [is_active]
|
|
205
|
+
* @property {string} [type]
|
|
206
|
+
* @property {number} [uid]
|
|
207
|
+
* @property {string} [application_id]
|
|
208
|
+
* @property {string} [created_at]
|
|
209
|
+
* @property {string} [modified_at]
|
|
210
|
+
* @property {number} [__v]
|
|
171
211
|
*/
|
|
172
212
|
|
|
173
213
|
/**
|
|
174
|
-
* @typedef
|
|
175
|
-
* @property {
|
|
176
|
-
* @property {
|
|
177
|
-
* @property {number} [item_total]
|
|
178
|
-
* @property {number} [size]
|
|
179
|
-
* @property {string} [type]
|
|
214
|
+
* @typedef UserGroupListResponseSchema
|
|
215
|
+
* @property {UserGroupResponseSchema[]} [items]
|
|
216
|
+
* @property {PaginationSchema} [page]
|
|
180
217
|
*/
|
|
181
218
|
|
|
182
219
|
/**
|
|
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
|
|
220
|
+
* @typedef ConditionsSchema
|
|
221
|
+
* @property {string} [user_attribute_definition_id]
|
|
222
|
+
* @property {string} [type]
|
|
223
|
+
* @property {string} [value]
|
|
195
224
|
*/
|
|
196
225
|
|
|
197
226
|
/**
|
|
198
|
-
* @typedef
|
|
199
|
-
* @property {
|
|
200
|
-
* @property {
|
|
201
|
-
* @property {string}
|
|
202
|
-
* @property {
|
|
203
|
-
* @property {
|
|
227
|
+
* @typedef CreateUserGroup
|
|
228
|
+
* @property {ConditionsSchema[]} [conditions]
|
|
229
|
+
* @property {string} [type]
|
|
230
|
+
* @property {string} name
|
|
231
|
+
* @property {string} description
|
|
232
|
+
* @property {string} [file_url]
|
|
204
233
|
*/
|
|
205
234
|
|
|
206
235
|
/**
|
|
207
|
-
* @typedef
|
|
208
|
-
* @property {
|
|
209
|
-
* @property {string} [
|
|
236
|
+
* @typedef CreateUserRequestSchema
|
|
237
|
+
* @property {string} phone_number
|
|
238
|
+
* @property {string} [email]
|
|
239
|
+
* @property {string} [first_name]
|
|
240
|
+
* @property {string} [last_name]
|
|
241
|
+
* @property {string} [gender]
|
|
242
|
+
* @property {string} username
|
|
243
|
+
* @property {Object} [meta]
|
|
244
|
+
* @property {string} [external_id]
|
|
210
245
|
*/
|
|
211
246
|
|
|
212
247
|
/**
|
|
213
|
-
* @typedef
|
|
214
|
-
* @property {
|
|
215
|
-
|
|
248
|
+
* @typedef CreateUserResponseSchema
|
|
249
|
+
* @property {UserSchema} [user]
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @typedef CreateUserSessionRequestSchema
|
|
254
|
+
* @property {string} [domain]
|
|
255
|
+
* @property {number} [max_age]
|
|
256
|
+
* @property {string} [user_id]
|
|
257
|
+
*/
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @typedef CreateUserSessionResponseSchema
|
|
261
|
+
* @property {string} [domain]
|
|
262
|
+
* @property {number} [max_age]
|
|
263
|
+
* @property {boolean} [secure]
|
|
264
|
+
* @property {boolean} [http_only]
|
|
265
|
+
* @property {Object} [cookie]
|
|
216
266
|
*/
|
|
217
267
|
|
|
218
268
|
/**
|
|
219
269
|
* @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
270
|
* @property {string} [display]
|
|
228
|
-
* @property {
|
|
271
|
+
* @property {LookAndFeel} [look_and_feel]
|
|
272
|
+
* @property {string} [updated_at]
|
|
273
|
+
* @property {boolean} [active]
|
|
229
274
|
* @property {boolean} [forgot_password]
|
|
230
275
|
* @property {Login} [login]
|
|
231
|
-
* @property {
|
|
232
|
-
* @property {MetaSchema} [meta]
|
|
233
|
-
* @property {string} [mobile_image]
|
|
276
|
+
* @property {boolean} [skip_captcha]
|
|
234
277
|
* @property {string} [name]
|
|
235
|
-
* @property {
|
|
236
|
-
* @property {
|
|
278
|
+
* @property {MetaSchema} [meta]
|
|
279
|
+
* @property {string} [_id]
|
|
280
|
+
* @property {Social} [social]
|
|
237
281
|
* @property {RequiredFields} [required_fields]
|
|
238
|
-
* @property {
|
|
239
|
-
* @property {boolean} [skip_captcha]
|
|
282
|
+
* @property {RegisterRequiredFields} [register_required_fields]
|
|
240
283
|
* @property {boolean} [skip_login]
|
|
241
|
-
* @property {
|
|
242
|
-
* @property {SocialTokens} [social_tokens]
|
|
284
|
+
* @property {FlashCard} [flash_card]
|
|
243
285
|
* @property {string} [subtext]
|
|
244
|
-
* @property {
|
|
286
|
+
* @property {SocialTokens} [social_tokens]
|
|
287
|
+
* @property {string} [created_at]
|
|
288
|
+
* @property {boolean} [register]
|
|
289
|
+
* @property {string} [mobile_image]
|
|
290
|
+
* @property {string} [desktop_image]
|
|
291
|
+
* @property {number} [delete_account_day]
|
|
292
|
+
* @property {DeleteAccountReasons[]} [delete_account_reasons]
|
|
293
|
+
* @property {DeleteAccountConsent} [delete_account_consent]
|
|
294
|
+
* @property {SessionExpiry} [session_config]
|
|
295
|
+
* @property {number} [__v]
|
|
245
296
|
*/
|
|
246
297
|
|
|
247
298
|
/**
|
|
248
|
-
* @typedef
|
|
249
|
-
* @property {
|
|
250
|
-
* @property {
|
|
299
|
+
* @typedef LookAndFeel
|
|
300
|
+
* @property {string} [card_position]
|
|
301
|
+
* @property {string} [background_color]
|
|
251
302
|
*/
|
|
252
303
|
|
|
253
304
|
/**
|
|
254
|
-
* @typedef
|
|
255
|
-
* @property {boolean} [
|
|
256
|
-
* @property {
|
|
305
|
+
* @typedef Login
|
|
306
|
+
* @property {boolean} [password]
|
|
307
|
+
* @property {boolean} [otp]
|
|
257
308
|
*/
|
|
258
309
|
|
|
259
310
|
/**
|
|
260
|
-
* @typedef
|
|
261
|
-
* @property {boolean} [
|
|
262
|
-
|
|
311
|
+
* @typedef MetaSchema
|
|
312
|
+
* @property {boolean} [fynd_default]
|
|
313
|
+
*/
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* @typedef Social
|
|
317
|
+
* @property {boolean} [account_kit]
|
|
318
|
+
* @property {boolean} [facebook]
|
|
319
|
+
* @property {boolean} [google]
|
|
320
|
+
* @property {boolean} [apple]
|
|
263
321
|
*/
|
|
264
322
|
|
|
265
323
|
/**
|
|
@@ -269,266 +327,331 @@ const Joi = require("joi");
|
|
|
269
327
|
*/
|
|
270
328
|
|
|
271
329
|
/**
|
|
272
|
-
* @typedef
|
|
273
|
-
* @property {
|
|
274
|
-
* @property {string} [
|
|
330
|
+
* @typedef PlatformEmail
|
|
331
|
+
* @property {boolean} [is_required]
|
|
332
|
+
* @property {string} [level]
|
|
275
333
|
*/
|
|
276
334
|
|
|
277
335
|
/**
|
|
278
|
-
* @typedef
|
|
279
|
-
* @property {
|
|
280
|
-
* @property {
|
|
281
|
-
* @property {string} [type]
|
|
336
|
+
* @typedef PlatformMobile
|
|
337
|
+
* @property {boolean} [is_required]
|
|
338
|
+
* @property {string} [level]
|
|
282
339
|
*/
|
|
283
340
|
|
|
284
341
|
/**
|
|
285
|
-
* @typedef
|
|
286
|
-
* @property {
|
|
287
|
-
* @property {
|
|
288
|
-
* @property {string} [ip]
|
|
289
|
-
* @property {string} [session_id]
|
|
290
|
-
* @property {string} [user_agent]
|
|
342
|
+
* @typedef RegisterRequiredFields
|
|
343
|
+
* @property {RegisterRequiredFieldsEmail} [email]
|
|
344
|
+
* @property {RegisterRequiredFieldsMobile} [mobile]
|
|
291
345
|
*/
|
|
292
346
|
|
|
293
347
|
/**
|
|
294
|
-
* @typedef
|
|
295
|
-
* @property {
|
|
348
|
+
* @typedef RegisterRequiredFieldsEmail
|
|
349
|
+
* @property {boolean} [is_required]
|
|
350
|
+
* @property {string} [level]
|
|
296
351
|
*/
|
|
297
352
|
|
|
298
353
|
/**
|
|
299
|
-
* @typedef
|
|
300
|
-
* @property {
|
|
301
|
-
* @property {string} [
|
|
354
|
+
* @typedef RegisterRequiredFieldsMobile
|
|
355
|
+
* @property {boolean} [is_required]
|
|
356
|
+
* @property {string} [level]
|
|
302
357
|
*/
|
|
303
358
|
|
|
304
359
|
/**
|
|
305
|
-
* @typedef
|
|
306
|
-
* @property {
|
|
307
|
-
* @property {
|
|
308
|
-
* @property {
|
|
309
|
-
* @property {boolean} [google]
|
|
360
|
+
* @typedef FlashCard
|
|
361
|
+
* @property {string} [text]
|
|
362
|
+
* @property {string} [text_color]
|
|
363
|
+
* @property {string} [background_color]
|
|
310
364
|
*/
|
|
311
365
|
|
|
312
366
|
/**
|
|
313
367
|
* @typedef SocialTokens
|
|
314
|
-
* @property {Accountkit} [account_kit]
|
|
315
368
|
* @property {Facebook} [facebook]
|
|
369
|
+
* @property {Accountkit} [accountkit]
|
|
316
370
|
* @property {Google} [google]
|
|
317
371
|
*/
|
|
318
372
|
|
|
319
373
|
/**
|
|
320
|
-
* @typedef
|
|
321
|
-
* @property {string} [
|
|
374
|
+
* @typedef DeleteAccountReasons
|
|
375
|
+
* @property {string} [reason_text]
|
|
376
|
+
* @property {string} [reason_id]
|
|
377
|
+
* @property {boolean} [show_text_area]
|
|
322
378
|
*/
|
|
323
379
|
|
|
324
380
|
/**
|
|
325
|
-
* @typedef
|
|
326
|
-
* @property {string} [
|
|
327
|
-
* @property {string} [reason_id]
|
|
328
|
-
* @property {string} [user_id]
|
|
381
|
+
* @typedef DeleteAccountConsent
|
|
382
|
+
* @property {string} [consent_text]
|
|
329
383
|
*/
|
|
330
384
|
|
|
331
385
|
/**
|
|
332
|
-
* @typedef
|
|
333
|
-
* @property {
|
|
386
|
+
* @typedef Facebook
|
|
387
|
+
* @property {string} [app_id]
|
|
388
|
+
* @property {string} [app_secret]
|
|
334
389
|
*/
|
|
335
390
|
|
|
336
391
|
/**
|
|
337
|
-
* @typedef
|
|
338
|
-
* @property {
|
|
339
|
-
* @property {string} [
|
|
340
|
-
* @property {string} [file_url]
|
|
341
|
-
* @property {string} [name]
|
|
342
|
-
* @property {string} [type]
|
|
392
|
+
* @typedef Accountkit
|
|
393
|
+
* @property {string} [app_id]
|
|
394
|
+
* @property {string} [app_secret]
|
|
343
395
|
*/
|
|
344
396
|
|
|
345
397
|
/**
|
|
346
|
-
* @typedef
|
|
347
|
-
* @property {
|
|
348
|
-
* @property {string} [
|
|
349
|
-
* @property {string} [first_name]
|
|
350
|
-
* @property {string} [gender]
|
|
351
|
-
* @property {string} [last_name]
|
|
352
|
-
* @property {Object} [meta]
|
|
353
|
-
* @property {UserPhoneNumbers[]} [phone_numbers]
|
|
398
|
+
* @typedef Google
|
|
399
|
+
* @property {string} [app_id]
|
|
400
|
+
* @property {string} [app_secret]
|
|
354
401
|
*/
|
|
355
402
|
|
|
356
403
|
/**
|
|
357
|
-
* @typedef
|
|
358
|
-
* @property {number} [
|
|
359
|
-
* @property {string} [
|
|
360
|
-
* @property {
|
|
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]
|
|
404
|
+
* @typedef SessionExpiry
|
|
405
|
+
* @property {number} [duration]
|
|
406
|
+
* @property {string} [type]
|
|
407
|
+
* @property {boolean} [is_rolling]
|
|
374
408
|
*/
|
|
375
409
|
|
|
376
410
|
/**
|
|
377
|
-
* @typedef
|
|
378
|
-
* @property {
|
|
379
|
-
* @property {string} [
|
|
380
|
-
* @property {string} [
|
|
381
|
-
* @property {string} [
|
|
382
|
-
* @property {
|
|
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]
|
|
411
|
+
* @typedef UpdateUserGroupSchema
|
|
412
|
+
* @property {ConditionsSchema[]} [conditions]
|
|
413
|
+
* @property {string} [type]
|
|
414
|
+
* @property {string} [name]
|
|
415
|
+
* @property {string} [description]
|
|
416
|
+
* @property {string} [file_url]
|
|
396
417
|
*/
|
|
397
418
|
|
|
398
419
|
/**
|
|
399
|
-
* @typedef
|
|
400
|
-
* @property {string} [type] -
|
|
401
|
-
*
|
|
420
|
+
* @typedef PartialUserGroupUpdateSchema
|
|
421
|
+
* @property {string} [type] - Source of update to be used to update individual
|
|
422
|
+
* users. Default value is considered file_url if not passed.
|
|
423
|
+
* @property {string} [name]
|
|
424
|
+
* @property {string} [description]
|
|
425
|
+
* @property {string} [file_url] - Required property when passed type file_url.
|
|
426
|
+
* Internet reachable csv file url which will be used to fetch download data.
|
|
427
|
+
* It must have one of columns from `phone_number``, `email`, `user_id` and
|
|
428
|
+
* must have `action` column. `action` column can have `add` or `remove` value.
|
|
429
|
+
* @property {UserGroupUpdateData[]} [user_data] - Required property when passed
|
|
430
|
+
* type json. Array of user data. Must have `action` field and one of
|
|
431
|
+
* `phone_number`, `email` or `user_id` field in object
|
|
402
432
|
*/
|
|
403
433
|
|
|
404
434
|
/**
|
|
405
|
-
* @typedef
|
|
406
|
-
* @property {string} [
|
|
407
|
-
* @property {string} [
|
|
408
|
-
* @property {
|
|
409
|
-
* @property {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
* @
|
|
435
|
+
* @typedef UserGroupUpdateData
|
|
436
|
+
* @property {string} [user_id] - Must be valid mongodb objectid of existing user
|
|
437
|
+
* @property {string} [phone_number] - Phone number of registered user
|
|
438
|
+
* @property {string} [email] - Email of registered user
|
|
439
|
+
* @property {string} action
|
|
440
|
+
*/
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* @typedef UpdateUserRequestSchema
|
|
444
|
+
* @property {string} [first_name]
|
|
445
|
+
* @property {string} [last_name]
|
|
446
|
+
* @property {string} [gender]
|
|
447
|
+
* @property {string} [external_id]
|
|
448
|
+
* @property {Object} [meta]
|
|
449
|
+
* @property {UserPhoneNumbers[]} [phone_numbers]
|
|
450
|
+
* @property {UserEmails[]} [emails]
|
|
414
451
|
*/
|
|
415
452
|
|
|
416
453
|
/**
|
|
417
454
|
* @typedef UserEmails
|
|
418
455
|
* @property {boolean} [active]
|
|
419
|
-
* @property {string} [email]
|
|
420
456
|
* @property {boolean} [primary]
|
|
421
457
|
* @property {boolean} [verified]
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* @typedef UserGroupListResponseSchema
|
|
426
|
-
* @property {UserGroupResponseSchema[]} [items]
|
|
427
|
-
* @property {PaginationSchema} [page]
|
|
428
|
-
*/
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* @typedef UserGroupResponseSchema
|
|
432
|
-
* @property {number} [__v]
|
|
433
|
-
* @property {string} [_id]
|
|
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]
|
|
442
|
-
* @property {string} [name]
|
|
443
|
-
* @property {string} [status]
|
|
444
|
-
* @property {string} [type]
|
|
445
|
-
* @property {number} [uid]
|
|
446
|
-
*/
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* @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
|
-
* @property {string} [user_id] - Must be valid mongodb objectid of existing user
|
|
458
|
+
* @property {string} [email]
|
|
454
459
|
*/
|
|
455
460
|
|
|
456
461
|
/**
|
|
457
462
|
* @typedef UserPhoneNumbers
|
|
458
463
|
* @property {boolean} [active]
|
|
459
|
-
* @property {string} [country_code]
|
|
460
|
-
* @property {string} [phone]
|
|
461
464
|
* @property {boolean} [primary]
|
|
462
465
|
* @property {boolean} [verified]
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* @typedef UserResponseErrorSchema
|
|
467
|
-
* @property {number} [count]
|
|
468
|
-
* @property {string} [file_url]
|
|
466
|
+
* @property {string} [phone]
|
|
467
|
+
* @property {string} [country_code]
|
|
469
468
|
*/
|
|
470
469
|
|
|
471
470
|
/**
|
|
472
471
|
* @typedef UserSchema
|
|
473
|
-
* @property {string} [_id]
|
|
474
|
-
* @property {string} [account_type]
|
|
475
|
-
* @property {boolean} [active]
|
|
476
472
|
* @property {string} [application_id]
|
|
477
|
-
* @property {string} [
|
|
478
|
-
* @property {string} [dob]
|
|
479
|
-
* @property {Email[]} [emails]
|
|
480
|
-
* @property {string} [external_id]
|
|
473
|
+
* @property {string} [user_id]
|
|
481
474
|
* @property {string} [first_name]
|
|
482
|
-
* @property {string} [gender]
|
|
483
|
-
* @property {string} [last_name]
|
|
484
475
|
* @property {Object} [meta]
|
|
476
|
+
* @property {string} [last_name]
|
|
485
477
|
* @property {PhoneNumber[]} [phone_numbers]
|
|
478
|
+
* @property {Email[]} [emails]
|
|
479
|
+
* @property {string} [gender]
|
|
480
|
+
* @property {string} [dob]
|
|
481
|
+
* @property {boolean} [active]
|
|
486
482
|
* @property {string} [profile_pic_url]
|
|
483
|
+
* @property {string} [username]
|
|
484
|
+
* @property {string} [account_type]
|
|
485
|
+
* @property {string} [_id]
|
|
486
|
+
* @property {string} [created_at]
|
|
487
487
|
* @property {string} [updated_at]
|
|
488
|
+
* @property {string} [external_id]
|
|
489
|
+
*/
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* @typedef UserSearchSchema
|
|
493
|
+
* @property {string} [application_id]
|
|
488
494
|
* @property {string} [user_id]
|
|
495
|
+
* @property {string} [first_name]
|
|
496
|
+
* @property {Object} [meta]
|
|
497
|
+
* @property {string} [last_name]
|
|
498
|
+
* @property {PhoneNumber[]} [phone_numbers]
|
|
499
|
+
* @property {Email[]} [emails]
|
|
500
|
+
* @property {string} [gender]
|
|
501
|
+
* @property {string} [dob]
|
|
502
|
+
* @property {boolean} [active]
|
|
503
|
+
* @property {string} [profile_pic_url]
|
|
489
504
|
* @property {string} [username]
|
|
505
|
+
* @property {string} [account_type]
|
|
506
|
+
* @property {string} [_id]
|
|
507
|
+
* @property {string} [created_at]
|
|
508
|
+
* @property {string} [updated_at]
|
|
509
|
+
* @property {string} [external_id]
|
|
510
|
+
* @property {boolean} [archive]
|
|
511
|
+
* @property {string} [status]
|
|
490
512
|
*/
|
|
491
513
|
|
|
492
514
|
/**
|
|
493
|
-
* @typedef
|
|
494
|
-
* @property {
|
|
515
|
+
* @typedef PhoneNumber
|
|
516
|
+
* @property {boolean} [active]
|
|
517
|
+
* @property {boolean} [primary]
|
|
518
|
+
* @property {boolean} [verified]
|
|
519
|
+
* @property {string} [phone]
|
|
520
|
+
* @property {number} [country_code]
|
|
521
|
+
*/
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* @typedef Email
|
|
525
|
+
* @property {boolean} [primary]
|
|
526
|
+
* @property {boolean} [verified]
|
|
527
|
+
* @property {string} [email]
|
|
528
|
+
* @property {boolean} [active]
|
|
495
529
|
*/
|
|
496
530
|
|
|
497
531
|
class UserPlatformModel {
|
|
498
|
-
/** @returns {
|
|
499
|
-
static
|
|
532
|
+
/** @returns {SuccessMessageResponse} */
|
|
533
|
+
static SuccessMessageResponse() {
|
|
500
534
|
return Joi.object({
|
|
501
|
-
|
|
535
|
+
success: Joi.string().allow(""),
|
|
502
536
|
});
|
|
503
537
|
}
|
|
504
538
|
|
|
505
|
-
/** @returns {
|
|
506
|
-
static
|
|
539
|
+
/** @returns {UserAttributeDefinition} */
|
|
540
|
+
static UserAttributeDefinition() {
|
|
541
|
+
return Joi.object({
|
|
542
|
+
_id: Joi.string().allow(""),
|
|
543
|
+
name: Joi.string().allow(""),
|
|
544
|
+
slug: Joi.string().allow(""),
|
|
545
|
+
description: Joi.string().allow(""),
|
|
546
|
+
application_id: Joi.string().allow(""),
|
|
547
|
+
type: Joi.string().allow(""),
|
|
548
|
+
multi_value: Joi.boolean(),
|
|
549
|
+
customer_editable: Joi.boolean(),
|
|
550
|
+
encrypted: Joi.boolean(),
|
|
551
|
+
pinned: Joi.boolean(),
|
|
552
|
+
pin_order: Joi.number(),
|
|
553
|
+
validations: Joi.array().items(Joi.any()),
|
|
554
|
+
is_locked: Joi.boolean(),
|
|
555
|
+
created_at: Joi.string().allow(""),
|
|
556
|
+
modified_at: Joi.string().allow(""),
|
|
557
|
+
__v: Joi.number(),
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/** @returns {UserAttributeDefinitionResponse} */
|
|
562
|
+
static UserAttributeDefinitionResponse() {
|
|
563
|
+
return Joi.object({
|
|
564
|
+
_id: Joi.string().allow(""),
|
|
565
|
+
name: Joi.string().allow(""),
|
|
566
|
+
slug: Joi.string().allow(""),
|
|
567
|
+
description: Joi.string().allow(""),
|
|
568
|
+
application_id: Joi.string().allow(""),
|
|
569
|
+
type: Joi.string().allow(""),
|
|
570
|
+
multi_value: Joi.boolean(),
|
|
571
|
+
customer_editable: Joi.boolean(),
|
|
572
|
+
encrypted: Joi.boolean(),
|
|
573
|
+
pinned: Joi.boolean(),
|
|
574
|
+
pin_order: Joi.number(),
|
|
575
|
+
validations: Joi.array().items(
|
|
576
|
+
UserPlatformModel.UserAttributeDefinitionValidation()
|
|
577
|
+
),
|
|
578
|
+
is_locked: Joi.boolean(),
|
|
579
|
+
created_by: Joi.string().allow(""),
|
|
580
|
+
updated_by: Joi.string().allow(""),
|
|
581
|
+
created_at: Joi.string().allow(""),
|
|
582
|
+
modified_at: Joi.string().allow(""),
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/** @returns {UserAttributeDefinitionValidation} */
|
|
587
|
+
static UserAttributeDefinitionValidation() {
|
|
588
|
+
return Joi.object({
|
|
589
|
+
type: Joi.string().allow(""),
|
|
590
|
+
value: Joi.any(),
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/** @returns {UserAttributeResponse} */
|
|
595
|
+
static UserAttributeResponse() {
|
|
507
596
|
return Joi.object({
|
|
597
|
+
_id: Joi.string().allow(""),
|
|
598
|
+
name: Joi.string().allow(""),
|
|
508
599
|
user_id: Joi.string().allow(""),
|
|
600
|
+
application_id: Joi.string().allow(""),
|
|
601
|
+
type: Joi.string().allow(""),
|
|
602
|
+
customer_overriden: Joi.boolean(),
|
|
603
|
+
attribute: Joi.any(),
|
|
604
|
+
updated_by: Joi.string().allow(""),
|
|
509
605
|
});
|
|
510
606
|
}
|
|
511
607
|
|
|
512
|
-
/** @returns {
|
|
513
|
-
static
|
|
608
|
+
/** @returns {CreateUserAttributeRequest} */
|
|
609
|
+
static CreateUserAttributeRequest() {
|
|
514
610
|
return Joi.object({
|
|
515
|
-
|
|
611
|
+
customer_overriden: Joi.boolean(),
|
|
612
|
+
attribute: Joi.any(),
|
|
516
613
|
});
|
|
517
614
|
}
|
|
518
615
|
|
|
519
|
-
/** @returns {
|
|
520
|
-
static
|
|
616
|
+
/** @returns {CreateUserAttributeDefinition} */
|
|
617
|
+
static CreateUserAttributeDefinition() {
|
|
521
618
|
return Joi.object({
|
|
522
|
-
|
|
619
|
+
name: Joi.string().allow(""),
|
|
620
|
+
slug: Joi.string().allow(""),
|
|
621
|
+
description: Joi.string().allow(""),
|
|
622
|
+
type: Joi.string().allow(""),
|
|
623
|
+
multi_value: Joi.boolean(),
|
|
624
|
+
customer_editable: Joi.boolean(),
|
|
625
|
+
encrypted: Joi.boolean(),
|
|
626
|
+
pinned: Joi.boolean(),
|
|
627
|
+
pin_order: Joi.number(),
|
|
628
|
+
default_value: Joi.string().allow(""),
|
|
629
|
+
validations: Joi.array().items(Joi.any()),
|
|
523
630
|
});
|
|
524
631
|
}
|
|
525
632
|
|
|
526
633
|
/** @returns {BlockUserRequestSchema} */
|
|
527
634
|
static BlockUserRequestSchema() {
|
|
528
635
|
return Joi.object({
|
|
529
|
-
reason: Joi.string().allow(""),
|
|
530
636
|
status: Joi.boolean(),
|
|
531
637
|
user_id: Joi.array().items(Joi.string().allow("")),
|
|
638
|
+
reason: Joi.string().allow(""),
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
/** @returns {ArchiveUserRequestSchema} */
|
|
643
|
+
static ArchiveUserRequestSchema() {
|
|
644
|
+
return Joi.object({
|
|
645
|
+
user_id: Joi.string().allow(""),
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
/** @returns {UnDeleteUserRequestSchema} */
|
|
650
|
+
static UnDeleteUserRequestSchema() {
|
|
651
|
+
return Joi.object({
|
|
652
|
+
user_id: Joi.string().allow(""),
|
|
653
|
+
reason: Joi.string().allow(""),
|
|
654
|
+
reason_id: Joi.string().allow(""),
|
|
532
655
|
});
|
|
533
656
|
}
|
|
534
657
|
|
|
@@ -539,47 +662,146 @@ class UserPlatformModel {
|
|
|
539
662
|
});
|
|
540
663
|
}
|
|
541
664
|
|
|
542
|
-
/** @returns {
|
|
543
|
-
static
|
|
665
|
+
/** @returns {ArchiveUserSuccess} */
|
|
666
|
+
static ArchiveUserSuccess() {
|
|
667
|
+
return Joi.object({
|
|
668
|
+
success: Joi.boolean(),
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/** @returns {UnDeleteUserSuccess} */
|
|
673
|
+
static UnDeleteUserSuccess() {
|
|
674
|
+
return Joi.object({
|
|
675
|
+
success: Joi.boolean(),
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/** @returns {UserSearchResponseSchema} */
|
|
680
|
+
static UserSearchResponseSchema() {
|
|
681
|
+
return Joi.object({
|
|
682
|
+
users: Joi.array().items(UserPlatformModel.UserSearchSchema()),
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/** @returns {CustomerListResponseSchema} */
|
|
687
|
+
static CustomerListResponseSchema() {
|
|
688
|
+
return Joi.object({
|
|
689
|
+
items: Joi.array().items(UserPlatformModel.UserSchema()),
|
|
690
|
+
page: UserPlatformModel.PaginationSchema(),
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/** @returns {PaginationSchema} */
|
|
695
|
+
static PaginationSchema() {
|
|
696
|
+
return Joi.object({
|
|
697
|
+
size: Joi.number(),
|
|
698
|
+
item_total: Joi.number(),
|
|
699
|
+
has_next: Joi.boolean(),
|
|
700
|
+
type: Joi.string().allow(""),
|
|
701
|
+
current: Joi.number(),
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/** @returns {SessionListResponseSchema} */
|
|
706
|
+
static SessionListResponseSchema() {
|
|
707
|
+
return Joi.object({
|
|
708
|
+
items: Joi.array().items(UserPlatformModel.SessionListResponseInfo()),
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/** @returns {SessionDeleteResponseSchema} */
|
|
713
|
+
static SessionDeleteResponseSchema() {
|
|
714
|
+
return Joi.object({
|
|
715
|
+
user_id: Joi.string().allow(""),
|
|
716
|
+
session_id: Joi.string().allow(""),
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
/** @returns {SessionsDeleteResponseSchema} */
|
|
721
|
+
static SessionsDeleteResponseSchema() {
|
|
722
|
+
return Joi.object({
|
|
723
|
+
user_id: Joi.string().allow(""),
|
|
724
|
+
session_ids: Joi.array().items(Joi.string().allow("")),
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/** @returns {APIError} */
|
|
729
|
+
static APIError() {
|
|
730
|
+
return Joi.object({
|
|
731
|
+
code: Joi.string().allow(""),
|
|
732
|
+
message: Joi.string().allow(""),
|
|
733
|
+
info: Joi.string().allow(""),
|
|
734
|
+
request_id: Joi.string().allow(""),
|
|
735
|
+
error: Joi.string().allow(""),
|
|
736
|
+
meta: Joi.any(),
|
|
737
|
+
authenticated: Joi.boolean(),
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
/** @returns {SessionListResponseInfo} */
|
|
742
|
+
static SessionListResponseInfo() {
|
|
743
|
+
return Joi.object({
|
|
744
|
+
session_id: Joi.string().allow(""),
|
|
745
|
+
user_agent: Joi.string().allow(""),
|
|
746
|
+
ip: Joi.string().allow(""),
|
|
747
|
+
domain: Joi.string().allow(""),
|
|
748
|
+
expire_in: Joi.string().allow(""),
|
|
749
|
+
location: Joi.string().allow(""),
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
/** @returns {Conditions} */
|
|
754
|
+
static Conditions() {
|
|
755
|
+
return Joi.object({
|
|
756
|
+
user_attribute_definition_id: Joi.string().allow(""),
|
|
757
|
+
type: Joi.string().allow(""),
|
|
758
|
+
value: Joi.string().allow(""),
|
|
759
|
+
key: Joi.string().allow(""),
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
/** @returns {UserResponseErrorSchema} */
|
|
764
|
+
static UserResponseErrorSchema() {
|
|
765
|
+
return Joi.object({
|
|
766
|
+
count: Joi.number(),
|
|
767
|
+
file_url: Joi.string().allow(""),
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/** @returns {UserGroupResponseSchema} */
|
|
772
|
+
static UserGroupResponseSchema() {
|
|
773
|
+
return Joi.object({
|
|
774
|
+
conditions: Joi.array().items(UserPlatformModel.Conditions()),
|
|
775
|
+
error: UserPlatformModel.UserResponseErrorSchema(),
|
|
776
|
+
name: Joi.string().allow(""),
|
|
777
|
+
description: Joi.string().allow(""),
|
|
778
|
+
file_url: Joi.string().allow(""),
|
|
779
|
+
_id: Joi.string().allow(""),
|
|
780
|
+
status: Joi.string().allow(""),
|
|
781
|
+
is_active: Joi.boolean(),
|
|
782
|
+
type: Joi.string().allow(""),
|
|
783
|
+
uid: Joi.number(),
|
|
784
|
+
application_id: Joi.string().allow(""),
|
|
785
|
+
created_at: Joi.string().allow(""),
|
|
786
|
+
modified_at: Joi.string().allow(""),
|
|
787
|
+
__v: Joi.number(),
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
/** @returns {UserGroupListResponseSchema} */
|
|
792
|
+
static UserGroupListResponseSchema() {
|
|
544
793
|
return Joi.object({
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
user_attribute_definition_id: Joi.string().allow(""),
|
|
548
|
-
value: Joi.string().allow(""),
|
|
794
|
+
items: Joi.array().items(UserPlatformModel.UserGroupResponseSchema()),
|
|
795
|
+
page: UserPlatformModel.PaginationSchema(),
|
|
549
796
|
});
|
|
550
797
|
}
|
|
551
798
|
|
|
552
799
|
/** @returns {ConditionsSchema} */
|
|
553
800
|
static ConditionsSchema() {
|
|
554
801
|
return Joi.object({
|
|
555
|
-
type: Joi.string().allow(""),
|
|
556
802
|
user_attribute_definition_id: Joi.string().allow(""),
|
|
557
|
-
value: Joi.string().allow(""),
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
/** @returns {CreateUserAttributeDefinition} */
|
|
562
|
-
static CreateUserAttributeDefinition() {
|
|
563
|
-
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
|
-
name: Joi.string().allow(""),
|
|
570
|
-
pin_order: Joi.number(),
|
|
571
|
-
pinned: Joi.boolean(),
|
|
572
|
-
slug: Joi.string().allow(""),
|
|
573
803
|
type: Joi.string().allow(""),
|
|
574
|
-
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
/** @returns {CreateUserAttributeRequest} */
|
|
579
|
-
static CreateUserAttributeRequest() {
|
|
580
|
-
return Joi.object({
|
|
581
|
-
attribute: Joi.any(),
|
|
582
|
-
customer_overriden: Joi.boolean(),
|
|
804
|
+
value: Joi.string().allow(""),
|
|
583
805
|
});
|
|
584
806
|
}
|
|
585
807
|
|
|
@@ -587,24 +809,24 @@ class UserPlatformModel {
|
|
|
587
809
|
static CreateUserGroup() {
|
|
588
810
|
return Joi.object({
|
|
589
811
|
conditions: Joi.array().items(UserPlatformModel.ConditionsSchema()),
|
|
812
|
+
type: Joi.string().allow(""),
|
|
813
|
+
name: Joi.string().allow("").required(),
|
|
590
814
|
description: Joi.string().allow("").required(),
|
|
591
815
|
file_url: Joi.string().allow(""),
|
|
592
|
-
name: Joi.string().allow("").required(),
|
|
593
|
-
type: Joi.string().allow(""),
|
|
594
816
|
});
|
|
595
817
|
}
|
|
596
818
|
|
|
597
819
|
/** @returns {CreateUserRequestSchema} */
|
|
598
820
|
static CreateUserRequestSchema() {
|
|
599
821
|
return Joi.object({
|
|
822
|
+
phone_number: Joi.string().allow("").required(),
|
|
600
823
|
email: Joi.string().allow(""),
|
|
601
|
-
external_id: Joi.string().allow(""),
|
|
602
824
|
first_name: Joi.string().allow(""),
|
|
603
|
-
gender: Joi.string().allow(""),
|
|
604
825
|
last_name: Joi.string().allow(""),
|
|
605
|
-
|
|
606
|
-
phone_number: Joi.string().allow("").required(),
|
|
826
|
+
gender: Joi.string().allow(""),
|
|
607
827
|
username: Joi.string().allow("").required(),
|
|
828
|
+
meta: Joi.any(),
|
|
829
|
+
external_id: Joi.string().allow(""),
|
|
608
830
|
});
|
|
609
831
|
}
|
|
610
832
|
|
|
@@ -627,84 +849,61 @@ class UserPlatformModel {
|
|
|
627
849
|
/** @returns {CreateUserSessionResponseSchema} */
|
|
628
850
|
static CreateUserSessionResponseSchema() {
|
|
629
851
|
return Joi.object({
|
|
630
|
-
cookie: Joi.any(),
|
|
631
852
|
domain: Joi.string().allow(""),
|
|
632
|
-
http_only: Joi.boolean(),
|
|
633
853
|
max_age: Joi.number(),
|
|
634
854
|
secure: Joi.boolean(),
|
|
855
|
+
http_only: Joi.boolean(),
|
|
856
|
+
cookie: Joi.object().pattern(/\S/, Joi.any()),
|
|
635
857
|
});
|
|
636
858
|
}
|
|
637
859
|
|
|
638
|
-
/** @returns {
|
|
639
|
-
static
|
|
640
|
-
return Joi.object({
|
|
641
|
-
items: Joi.array().items(UserPlatformModel.UserSchema()),
|
|
642
|
-
page: UserPlatformModel.PaginationSchema(),
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
/** @returns {DeleteAccountConsent} */
|
|
647
|
-
static DeleteAccountConsent() {
|
|
648
|
-
return Joi.object({
|
|
649
|
-
consent_text: Joi.string().allow(""),
|
|
650
|
-
});
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
/** @returns {DeleteAccountReasons} */
|
|
654
|
-
static DeleteAccountReasons() {
|
|
655
|
-
return Joi.object({
|
|
656
|
-
reason_id: Joi.string().allow(""),
|
|
657
|
-
reason_text: Joi.string().allow(""),
|
|
658
|
-
show_text_area: Joi.boolean(),
|
|
659
|
-
});
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
/** @returns {Email} */
|
|
663
|
-
static Email() {
|
|
860
|
+
/** @returns {PlatformSchema} */
|
|
861
|
+
static PlatformSchema() {
|
|
664
862
|
return Joi.object({
|
|
863
|
+
display: Joi.string().allow(""),
|
|
864
|
+
look_and_feel: UserPlatformModel.LookAndFeel(),
|
|
865
|
+
updated_at: Joi.string().allow(""),
|
|
665
866
|
active: Joi.boolean(),
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
867
|
+
forgot_password: Joi.boolean(),
|
|
868
|
+
login: UserPlatformModel.Login(),
|
|
869
|
+
skip_captcha: Joi.boolean(),
|
|
870
|
+
name: Joi.string().allow(""),
|
|
871
|
+
meta: UserPlatformModel.MetaSchema(),
|
|
872
|
+
_id: Joi.string().allow(""),
|
|
873
|
+
social: UserPlatformModel.Social(),
|
|
874
|
+
required_fields: UserPlatformModel.RequiredFields(),
|
|
875
|
+
register_required_fields: UserPlatformModel.RegisterRequiredFields(),
|
|
876
|
+
skip_login: Joi.boolean(),
|
|
877
|
+
flash_card: UserPlatformModel.FlashCard(),
|
|
878
|
+
subtext: Joi.string().allow(""),
|
|
879
|
+
social_tokens: UserPlatformModel.SocialTokens(),
|
|
880
|
+
created_at: Joi.string().allow(""),
|
|
881
|
+
register: Joi.boolean(),
|
|
882
|
+
mobile_image: Joi.string().allow(""),
|
|
883
|
+
desktop_image: Joi.string().allow(""),
|
|
884
|
+
delete_account_day: Joi.number(),
|
|
885
|
+
delete_account_reasons: Joi.array().items(
|
|
886
|
+
UserPlatformModel.DeleteAccountReasons()
|
|
887
|
+
),
|
|
888
|
+
delete_account_consent: UserPlatformModel.DeleteAccountConsent(),
|
|
889
|
+
session_config: UserPlatformModel.SessionExpiry(),
|
|
890
|
+
__v: Joi.number(),
|
|
676
891
|
});
|
|
677
892
|
}
|
|
678
893
|
|
|
679
|
-
/** @returns {
|
|
680
|
-
static
|
|
894
|
+
/** @returns {LookAndFeel} */
|
|
895
|
+
static LookAndFeel() {
|
|
681
896
|
return Joi.object({
|
|
897
|
+
card_position: Joi.string().allow(""),
|
|
682
898
|
background_color: Joi.string().allow(""),
|
|
683
|
-
text: Joi.string().allow(""),
|
|
684
|
-
text_color: Joi.string().allow(""),
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
/** @returns {Google} */
|
|
689
|
-
static Google() {
|
|
690
|
-
return Joi.object({
|
|
691
|
-
app_id: Joi.string().allow(""),
|
|
692
899
|
});
|
|
693
900
|
}
|
|
694
901
|
|
|
695
902
|
/** @returns {Login} */
|
|
696
903
|
static Login() {
|
|
697
904
|
return Joi.object({
|
|
698
|
-
otp: Joi.boolean(),
|
|
699
905
|
password: Joi.boolean(),
|
|
700
|
-
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
/** @returns {LookAndFeel} */
|
|
704
|
-
static LookAndFeel() {
|
|
705
|
-
return Joi.object({
|
|
706
|
-
background_color: Joi.string().allow(""),
|
|
707
|
-
card_position: Joi.string().allow(""),
|
|
906
|
+
otp: Joi.boolean(),
|
|
708
907
|
});
|
|
709
908
|
}
|
|
710
909
|
|
|
@@ -715,36 +914,21 @@ class UserPlatformModel {
|
|
|
715
914
|
});
|
|
716
915
|
}
|
|
717
916
|
|
|
718
|
-
/** @returns {
|
|
719
|
-
static
|
|
720
|
-
return Joi.object({
|
|
721
|
-
current: Joi.number(),
|
|
722
|
-
has_next: Joi.boolean(),
|
|
723
|
-
item_total: Joi.number(),
|
|
724
|
-
size: Joi.number(),
|
|
725
|
-
type: Joi.string().allow(""),
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
/** @returns {PartialUserGroupUpdateSchema} */
|
|
730
|
-
static PartialUserGroupUpdateSchema() {
|
|
917
|
+
/** @returns {Social} */
|
|
918
|
+
static Social() {
|
|
731
919
|
return Joi.object({
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
user_data: Joi.array().items(UserPlatformModel.UserGroupUpdateData()),
|
|
920
|
+
account_kit: Joi.boolean(),
|
|
921
|
+
facebook: Joi.boolean(),
|
|
922
|
+
google: Joi.boolean(),
|
|
923
|
+
apple: Joi.boolean(),
|
|
737
924
|
});
|
|
738
925
|
}
|
|
739
926
|
|
|
740
|
-
/** @returns {
|
|
741
|
-
static
|
|
927
|
+
/** @returns {RequiredFields} */
|
|
928
|
+
static RequiredFields() {
|
|
742
929
|
return Joi.object({
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
phone: Joi.string().allow(""),
|
|
746
|
-
primary: Joi.boolean(),
|
|
747
|
-
verified: Joi.boolean(),
|
|
930
|
+
email: UserPlatformModel.PlatformEmail(),
|
|
931
|
+
mobile: UserPlatformModel.PlatformMobile(),
|
|
748
932
|
});
|
|
749
933
|
}
|
|
750
934
|
|
|
@@ -764,39 +948,6 @@ class UserPlatformModel {
|
|
|
764
948
|
});
|
|
765
949
|
}
|
|
766
950
|
|
|
767
|
-
/** @returns {PlatformSchema} */
|
|
768
|
-
static PlatformSchema() {
|
|
769
|
-
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
|
-
display: Joi.string().allow(""),
|
|
780
|
-
flash_card: UserPlatformModel.FlashCard(),
|
|
781
|
-
forgot_password: Joi.boolean(),
|
|
782
|
-
login: UserPlatformModel.Login(),
|
|
783
|
-
look_and_feel: UserPlatformModel.LookAndFeel(),
|
|
784
|
-
meta: UserPlatformModel.MetaSchema(),
|
|
785
|
-
mobile_image: Joi.string().allow(""),
|
|
786
|
-
name: Joi.string().allow(""),
|
|
787
|
-
register: Joi.boolean(),
|
|
788
|
-
register_required_fields: UserPlatformModel.RegisterRequiredFields(),
|
|
789
|
-
required_fields: UserPlatformModel.RequiredFields(),
|
|
790
|
-
session_config: Joi.any(),
|
|
791
|
-
skip_captcha: Joi.boolean(),
|
|
792
|
-
skip_login: Joi.boolean(),
|
|
793
|
-
social: UserPlatformModel.Social(),
|
|
794
|
-
social_tokens: UserPlatformModel.SocialTokens(),
|
|
795
|
-
subtext: Joi.string().allow(""),
|
|
796
|
-
updated_at: Joi.string().allow(""),
|
|
797
|
-
});
|
|
798
|
-
}
|
|
799
|
-
|
|
800
951
|
/** @returns {RegisterRequiredFields} */
|
|
801
952
|
static RegisterRequiredFields() {
|
|
802
953
|
return Joi.object({
|
|
@@ -809,249 +960,137 @@ class UserPlatformModel {
|
|
|
809
960
|
static RegisterRequiredFieldsEmail() {
|
|
810
961
|
return Joi.object({
|
|
811
962
|
is_required: Joi.boolean(),
|
|
812
|
-
level: Joi.string().allow(""),
|
|
813
|
-
});
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
/** @returns {RegisterRequiredFieldsMobile} */
|
|
817
|
-
static RegisterRequiredFieldsMobile() {
|
|
818
|
-
return Joi.object({
|
|
819
|
-
is_required: Joi.boolean(),
|
|
820
|
-
level: Joi.string().allow(""),
|
|
821
|
-
});
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
/** @returns {RequiredFields} */
|
|
825
|
-
static RequiredFields() {
|
|
826
|
-
return Joi.object({
|
|
827
|
-
email: UserPlatformModel.PlatformEmail(),
|
|
828
|
-
mobile: UserPlatformModel.PlatformMobile(),
|
|
829
|
-
});
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
/** @returns {SessionDeleteResponseSchema} */
|
|
833
|
-
static SessionDeleteResponseSchema() {
|
|
834
|
-
return Joi.object({
|
|
835
|
-
session_id: Joi.string().allow(""),
|
|
836
|
-
user_id: Joi.string().allow(""),
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
/** @returns {SessionExpiry} */
|
|
841
|
-
static SessionExpiry() {
|
|
842
|
-
return Joi.object({
|
|
843
|
-
duration: Joi.number(),
|
|
844
|
-
is_rolling: Joi.boolean(),
|
|
845
|
-
type: Joi.string().allow(""),
|
|
846
|
-
});
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
/** @returns {SessionListResponseInfo} */
|
|
850
|
-
static SessionListResponseInfo() {
|
|
851
|
-
return Joi.object({
|
|
852
|
-
domain: Joi.string().allow(""),
|
|
853
|
-
expire_in: Joi.string().allow(""),
|
|
854
|
-
ip: Joi.string().allow(""),
|
|
855
|
-
session_id: Joi.string().allow(""),
|
|
856
|
-
user_agent: Joi.string().allow(""),
|
|
857
|
-
});
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
/** @returns {SessionListResponseSchema} */
|
|
861
|
-
static SessionListResponseSchema() {
|
|
862
|
-
return Joi.object({
|
|
863
|
-
items: Joi.array().items(UserPlatformModel.SessionListResponseInfo()),
|
|
963
|
+
level: Joi.string().allow(""),
|
|
864
964
|
});
|
|
865
965
|
}
|
|
866
966
|
|
|
867
|
-
/** @returns {
|
|
868
|
-
static
|
|
967
|
+
/** @returns {RegisterRequiredFieldsMobile} */
|
|
968
|
+
static RegisterRequiredFieldsMobile() {
|
|
869
969
|
return Joi.object({
|
|
870
|
-
|
|
871
|
-
|
|
970
|
+
is_required: Joi.boolean(),
|
|
971
|
+
level: Joi.string().allow(""),
|
|
872
972
|
});
|
|
873
973
|
}
|
|
874
974
|
|
|
875
|
-
/** @returns {
|
|
876
|
-
static
|
|
975
|
+
/** @returns {FlashCard} */
|
|
976
|
+
static FlashCard() {
|
|
877
977
|
return Joi.object({
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
google: Joi.boolean(),
|
|
978
|
+
text: Joi.string().allow(""),
|
|
979
|
+
text_color: Joi.string().allow(""),
|
|
980
|
+
background_color: Joi.string().allow(""),
|
|
882
981
|
});
|
|
883
982
|
}
|
|
884
983
|
|
|
885
984
|
/** @returns {SocialTokens} */
|
|
886
985
|
static SocialTokens() {
|
|
887
986
|
return Joi.object({
|
|
888
|
-
account_kit: UserPlatformModel.Accountkit(),
|
|
889
987
|
facebook: UserPlatformModel.Facebook(),
|
|
988
|
+
accountkit: UserPlatformModel.Accountkit(),
|
|
890
989
|
google: UserPlatformModel.Google(),
|
|
891
990
|
});
|
|
892
991
|
}
|
|
893
992
|
|
|
894
|
-
/** @returns {
|
|
895
|
-
static
|
|
896
|
-
return Joi.object({
|
|
897
|
-
success: Joi.string().allow(""),
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
/** @returns {UnDeleteUserRequestSchema} */
|
|
902
|
-
static UnDeleteUserRequestSchema() {
|
|
993
|
+
/** @returns {DeleteAccountReasons} */
|
|
994
|
+
static DeleteAccountReasons() {
|
|
903
995
|
return Joi.object({
|
|
904
|
-
|
|
996
|
+
reason_text: Joi.string().allow(""),
|
|
905
997
|
reason_id: Joi.string().allow(""),
|
|
906
|
-
|
|
998
|
+
show_text_area: Joi.boolean(),
|
|
907
999
|
});
|
|
908
1000
|
}
|
|
909
1001
|
|
|
910
|
-
/** @returns {
|
|
911
|
-
static
|
|
1002
|
+
/** @returns {DeleteAccountConsent} */
|
|
1003
|
+
static DeleteAccountConsent() {
|
|
912
1004
|
return Joi.object({
|
|
913
|
-
|
|
1005
|
+
consent_text: Joi.string().allow(""),
|
|
914
1006
|
});
|
|
915
1007
|
}
|
|
916
1008
|
|
|
917
|
-
/** @returns {
|
|
918
|
-
static
|
|
1009
|
+
/** @returns {Facebook} */
|
|
1010
|
+
static Facebook() {
|
|
919
1011
|
return Joi.object({
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
file_url: Joi.string().allow(""),
|
|
923
|
-
name: Joi.string().allow(""),
|
|
924
|
-
type: Joi.string().allow(""),
|
|
1012
|
+
app_id: Joi.string().allow(""),
|
|
1013
|
+
app_secret: Joi.string().allow(""),
|
|
925
1014
|
});
|
|
926
1015
|
}
|
|
927
1016
|
|
|
928
|
-
/** @returns {
|
|
929
|
-
static
|
|
1017
|
+
/** @returns {Accountkit} */
|
|
1018
|
+
static Accountkit() {
|
|
930
1019
|
return Joi.object({
|
|
931
|
-
|
|
932
|
-
|
|
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()),
|
|
1020
|
+
app_id: Joi.string().allow(""),
|
|
1021
|
+
app_secret: Joi.string().allow(""),
|
|
938
1022
|
});
|
|
939
1023
|
}
|
|
940
1024
|
|
|
941
|
-
/** @returns {
|
|
942
|
-
static
|
|
1025
|
+
/** @returns {Google} */
|
|
1026
|
+
static Google() {
|
|
943
1027
|
return Joi.object({
|
|
944
|
-
|
|
945
|
-
|
|
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()),
|
|
1028
|
+
app_id: Joi.string().allow(""),
|
|
1029
|
+
app_secret: Joi.string().allow(""),
|
|
960
1030
|
});
|
|
961
1031
|
}
|
|
962
1032
|
|
|
963
|
-
/** @returns {
|
|
964
|
-
static
|
|
1033
|
+
/** @returns {SessionExpiry} */
|
|
1034
|
+
static SessionExpiry() {
|
|
965
1035
|
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(""),
|
|
1036
|
+
duration: Joi.number(),
|
|
980
1037
|
type: Joi.string().allow(""),
|
|
981
|
-
|
|
982
|
-
validations: Joi.array().items(
|
|
983
|
-
UserPlatformModel.UserAttributeDefinitionValidation()
|
|
984
|
-
),
|
|
1038
|
+
is_rolling: Joi.boolean(),
|
|
985
1039
|
});
|
|
986
1040
|
}
|
|
987
1041
|
|
|
988
|
-
/** @returns {
|
|
989
|
-
static
|
|
1042
|
+
/** @returns {UpdateUserGroupSchema} */
|
|
1043
|
+
static UpdateUserGroupSchema() {
|
|
990
1044
|
return Joi.object({
|
|
1045
|
+
conditions: Joi.array().items(UserPlatformModel.ConditionsSchema()),
|
|
991
1046
|
type: Joi.string().allow(""),
|
|
992
|
-
|
|
1047
|
+
name: Joi.string().allow(""),
|
|
1048
|
+
description: Joi.string().allow(""),
|
|
1049
|
+
file_url: Joi.string().allow(""),
|
|
993
1050
|
});
|
|
994
1051
|
}
|
|
995
1052
|
|
|
996
|
-
/** @returns {
|
|
997
|
-
static
|
|
1053
|
+
/** @returns {PartialUserGroupUpdateSchema} */
|
|
1054
|
+
static PartialUserGroupUpdateSchema() {
|
|
998
1055
|
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
1056
|
type: Joi.string().allow(""),
|
|
1005
|
-
|
|
1006
|
-
|
|
1057
|
+
name: Joi.string().allow(""),
|
|
1058
|
+
description: Joi.string().allow(""),
|
|
1059
|
+
file_url: Joi.string().allow(""),
|
|
1060
|
+
user_data: Joi.array().items(UserPlatformModel.UserGroupUpdateData()),
|
|
1007
1061
|
});
|
|
1008
1062
|
}
|
|
1009
1063
|
|
|
1010
|
-
/** @returns {
|
|
1011
|
-
static
|
|
1064
|
+
/** @returns {UserGroupUpdateData} */
|
|
1065
|
+
static UserGroupUpdateData() {
|
|
1012
1066
|
return Joi.object({
|
|
1013
|
-
|
|
1067
|
+
user_id: Joi.string().allow(""),
|
|
1068
|
+
phone_number: Joi.string().allow(""),
|
|
1014
1069
|
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(),
|
|
1070
|
+
action: Joi.string().allow("").required(),
|
|
1025
1071
|
});
|
|
1026
1072
|
}
|
|
1027
1073
|
|
|
1028
|
-
/** @returns {
|
|
1029
|
-
static
|
|
1074
|
+
/** @returns {UpdateUserRequestSchema} */
|
|
1075
|
+
static UpdateUserRequestSchema() {
|
|
1030
1076
|
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(),
|
|
1077
|
+
first_name: Joi.string().allow(""),
|
|
1078
|
+
last_name: Joi.string().allow(""),
|
|
1079
|
+
gender: Joi.string().allow(""),
|
|
1080
|
+
external_id: Joi.string().allow(""),
|
|
1081
|
+
meta: Joi.any(),
|
|
1082
|
+
phone_numbers: Joi.array().items(UserPlatformModel.UserPhoneNumbers()),
|
|
1083
|
+
emails: Joi.array().items(UserPlatformModel.UserEmails()),
|
|
1045
1084
|
});
|
|
1046
1085
|
}
|
|
1047
1086
|
|
|
1048
|
-
/** @returns {
|
|
1049
|
-
static
|
|
1087
|
+
/** @returns {UserEmails} */
|
|
1088
|
+
static UserEmails() {
|
|
1050
1089
|
return Joi.object({
|
|
1051
|
-
|
|
1090
|
+
active: Joi.boolean(),
|
|
1091
|
+
primary: Joi.boolean(),
|
|
1092
|
+
verified: Joi.boolean(),
|
|
1052
1093
|
email: Joi.string().allow(""),
|
|
1053
|
-
phone_number: Joi.string().allow(""),
|
|
1054
|
-
user_id: Joi.string().allow(""),
|
|
1055
1094
|
});
|
|
1056
1095
|
}
|
|
1057
1096
|
|
|
@@ -1059,48 +1098,79 @@ class UserPlatformModel {
|
|
|
1059
1098
|
static UserPhoneNumbers() {
|
|
1060
1099
|
return Joi.object({
|
|
1061
1100
|
active: Joi.boolean(),
|
|
1062
|
-
country_code: Joi.string().allow(""),
|
|
1063
|
-
phone: Joi.string().allow(""),
|
|
1064
1101
|
primary: Joi.boolean(),
|
|
1065
1102
|
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(""),
|
|
1103
|
+
phone: Joi.string().allow(""),
|
|
1104
|
+
country_code: Joi.string().allow(""),
|
|
1074
1105
|
});
|
|
1075
1106
|
}
|
|
1076
1107
|
|
|
1077
1108
|
/** @returns {UserSchema} */
|
|
1078
1109
|
static UserSchema() {
|
|
1079
1110
|
return Joi.object({
|
|
1080
|
-
_id: Joi.string().allow(""),
|
|
1081
|
-
account_type: Joi.string().allow(""),
|
|
1082
|
-
active: Joi.boolean(),
|
|
1083
1111
|
application_id: Joi.string().allow(""),
|
|
1084
|
-
|
|
1085
|
-
dob: Joi.string().allow(""),
|
|
1086
|
-
emails: Joi.array().items(UserPlatformModel.Email()),
|
|
1087
|
-
external_id: Joi.string().allow(""),
|
|
1112
|
+
user_id: Joi.string().allow(""),
|
|
1088
1113
|
first_name: Joi.string().allow(""),
|
|
1089
|
-
gender: Joi.string().allow(""),
|
|
1090
|
-
last_name: Joi.string().allow(""),
|
|
1091
1114
|
meta: Joi.any(),
|
|
1115
|
+
last_name: Joi.string().allow(""),
|
|
1092
1116
|
phone_numbers: Joi.array().items(UserPlatformModel.PhoneNumber()),
|
|
1117
|
+
emails: Joi.array().items(UserPlatformModel.Email()),
|
|
1118
|
+
gender: Joi.string().allow(""),
|
|
1119
|
+
dob: Joi.string().allow(""),
|
|
1120
|
+
active: Joi.boolean(),
|
|
1093
1121
|
profile_pic_url: Joi.string().allow(""),
|
|
1122
|
+
username: Joi.string().allow(""),
|
|
1123
|
+
account_type: Joi.string().allow(""),
|
|
1124
|
+
_id: Joi.string().allow(""),
|
|
1125
|
+
created_at: Joi.string().allow(""),
|
|
1094
1126
|
updated_at: Joi.string().allow(""),
|
|
1127
|
+
external_id: Joi.string().allow(""),
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
/** @returns {UserSearchSchema} */
|
|
1132
|
+
static UserSearchSchema() {
|
|
1133
|
+
return Joi.object({
|
|
1134
|
+
application_id: Joi.string().allow(""),
|
|
1095
1135
|
user_id: Joi.string().allow(""),
|
|
1136
|
+
first_name: Joi.string().allow(""),
|
|
1137
|
+
meta: Joi.any(),
|
|
1138
|
+
last_name: Joi.string().allow(""),
|
|
1139
|
+
phone_numbers: Joi.array().items(UserPlatformModel.PhoneNumber()),
|
|
1140
|
+
emails: Joi.array().items(UserPlatformModel.Email()),
|
|
1141
|
+
gender: Joi.string().allow(""),
|
|
1142
|
+
dob: Joi.string().allow(""),
|
|
1143
|
+
active: Joi.boolean(),
|
|
1144
|
+
profile_pic_url: Joi.string().allow(""),
|
|
1096
1145
|
username: Joi.string().allow(""),
|
|
1146
|
+
account_type: Joi.string().allow(""),
|
|
1147
|
+
_id: Joi.string().allow(""),
|
|
1148
|
+
created_at: Joi.string().allow(""),
|
|
1149
|
+
updated_at: Joi.string().allow(""),
|
|
1150
|
+
external_id: Joi.string().allow(""),
|
|
1151
|
+
archive: Joi.boolean(),
|
|
1152
|
+
status: Joi.string().allow(""),
|
|
1097
1153
|
});
|
|
1098
1154
|
}
|
|
1099
1155
|
|
|
1100
|
-
/** @returns {
|
|
1101
|
-
static
|
|
1156
|
+
/** @returns {PhoneNumber} */
|
|
1157
|
+
static PhoneNumber() {
|
|
1158
|
+
return Joi.object({
|
|
1159
|
+
active: Joi.boolean(),
|
|
1160
|
+
primary: Joi.boolean(),
|
|
1161
|
+
verified: Joi.boolean(),
|
|
1162
|
+
phone: Joi.string().allow(""),
|
|
1163
|
+
country_code: Joi.number(),
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
/** @returns {Email} */
|
|
1168
|
+
static Email() {
|
|
1102
1169
|
return Joi.object({
|
|
1103
|
-
|
|
1170
|
+
primary: Joi.boolean(),
|
|
1171
|
+
verified: Joi.boolean(),
|
|
1172
|
+
email: Joi.string().allow(""),
|
|
1173
|
+
active: Joi.boolean(),
|
|
1104
1174
|
});
|
|
1105
1175
|
}
|
|
1106
1176
|
}
|