@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.
Files changed (106) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
  4. package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
  5. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
  6. package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
  7. package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
  8. package/sdk/application/Common/CommonApplicationModel.js +172 -172
  9. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
  10. package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
  11. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
  12. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
  13. package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
  14. package/sdk/application/Content/ContentApplicationModel.js +757 -757
  15. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
  16. package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
  17. package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
  18. package/sdk/application/Lead/LeadApplicationModel.js +301 -301
  19. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
  20. package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
  21. package/sdk/application/Order/OrderApplicationModel.d.ts +846 -846
  22. package/sdk/application/Order/OrderApplicationModel.js +822 -822
  23. package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
  24. package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
  25. package/sdk/application/Payment/PaymentApplicationModel.d.ts +2155 -2150
  26. package/sdk/application/Payment/PaymentApplicationModel.js +1460 -1458
  27. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
  28. package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
  29. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
  30. package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
  31. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
  32. package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
  33. package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
  34. package/sdk/application/Share/ShareApplicationModel.js +121 -121
  35. package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
  36. package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
  37. package/sdk/application/User/UserApplicationModel.d.ts +762 -762
  38. package/sdk/application/User/UserApplicationModel.js +738 -738
  39. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
  40. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
  41. package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
  42. package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
  43. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
  44. package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
  45. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
  46. package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
  47. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
  48. package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
  49. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  50. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  51. package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
  52. package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
  53. package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
  54. package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
  55. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -1013
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +923 -923
  57. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  58. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  59. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
  60. package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
  61. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
  62. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
  63. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
  64. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
  65. package/sdk/platform/Content/ContentPlatformModel.d.ts +1833 -1833
  66. package/sdk/platform/Content/ContentPlatformModel.js +1837 -1837
  67. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
  68. package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
  69. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +865 -865
  70. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +877 -877
  71. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
  72. package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
  73. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  74. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  75. package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
  76. package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
  77. package/sdk/platform/Order/OrderPlatformModel.d.ts +5180 -5176
  78. package/sdk/platform/Order/OrderPlatformModel.js +4740 -4736
  79. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  80. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  81. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2670 -2660
  82. package/sdk/platform/Payment/PaymentPlatformModel.js +1831 -1827
  83. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  84. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  85. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1505 -1507
  86. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1532 -1536
  87. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  88. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  89. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
  90. package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
  91. package/sdk/platform/User/UserPlatformModel.d.ts +758 -758
  92. package/sdk/platform/User/UserPlatformModel.js +643 -643
  93. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
  94. package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
  95. package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
  96. package/sdk/public/Billing/BillingPublicModel.js +51 -51
  97. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  98. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  99. package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
  100. package/sdk/public/Content/ContentPublicModel.js +28 -28
  101. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  102. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  103. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  104. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  105. package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
  106. package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
@@ -1,113 +1,128 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef Accountkit
5
- * @property {string} [app_id]
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 AuthenticationApiErrorSchema
20
- * @property {string} [message]
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 BlockUserRequestSchema
25
- * @property {string} [reason]
26
- * @property {boolean} [status]
27
- * @property {string[]} [user_id]
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 BlockUserSuccess
32
- * @property {boolean} [success]
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 Conditions
37
- * @property {string} [key]
38
- * @property {string} [type]
39
- * @property {string} [user_attribute_definition_id]
40
- * @property {string} [value]
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 ConditionsSchema
45
- * @property {string} [type]
46
- * @property {string} [user_attribute_definition_id]
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 CreateUserAttributeRequest
67
- * @property {Object} [attribute]
68
- * @property {boolean} [customer_overriden]
90
+ * @typedef BlockUserRequestSchema
91
+ * @property {boolean} [status]
92
+ * @property {string[]} [user_id]
93
+ * @property {string} [reason]
69
94
  */
70
95
 
71
96
  /**
72
- * @typedef CreateUserGroup
73
- * @property {ConditionsSchema[]} [conditions]
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 CreateUserRequestSchema
82
- * @property {string} [email]
83
- * @property {string} [external_id]
84
- * @property {string} [first_name]
85
- * @property {string} [gender]
86
- * @property {string} [last_name]
87
- * @property {Object} [meta]
88
- * @property {string} phone_number
89
- * @property {string} username
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 CreateUserResponseSchema
94
- * @property {UserSchema} [user]
109
+ * @typedef BlockUserSuccess
110
+ * @property {boolean} [success]
95
111
  */
96
112
 
97
113
  /**
98
- * @typedef CreateUserSessionRequestSchema
99
- * @property {string} [domain]
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 CreateUserSessionResponseSchema
106
- * @property {Object} [cookie]
107
- * @property {string} [domain]
108
- * @property {boolean} [http_only]
109
- * @property {number} [max_age]
110
- * @property {boolean} [secure]
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 DeleteAccountConsent
121
- * @property {string} [consent_text]
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 DeleteAccountReasons
126
- * @property {string} [reason_id]
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 Email
133
- * @property {boolean} [active]
134
- * @property {string} [email]
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 Facebook
141
- * @property {string} [app_id]
155
+ * @typedef SessionsDeleteResponseSchema
156
+ * @property {string} [user_id]
157
+ * @property {string[]} [session_ids]
142
158
  */
143
159
 
144
160
  /**
145
- * @typedef FlashCard
146
- * @property {string} [background_color]
147
- * @property {string} [text]
148
- * @property {string} [text_color]
161
+ * @typedef AuthenticationApiErrorSchema
162
+ * @property {string} [message]
149
163
  */
150
164
 
151
165
  /**
152
- * @typedef Google
153
- * @property {string} [app_id]
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 Login
158
- * @property {boolean} [otp]
159
- * @property {boolean} [password]
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 LookAndFeel
164
- * @property {string} [background_color]
165
- * @property {string} [card_position]
183
+ * @typedef UserResponseErrorSchema
184
+ * @property {number} [count]
185
+ * @property {string} [file_url]
166
186
  */
167
187
 
168
188
  /**
169
- * @typedef MetaSchema
170
- * @property {boolean} [fynd_default]
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 PaginationSchema
175
- * @property {number} [current]
176
- * @property {boolean} [has_next]
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 PartialUserGroupUpdateSchema
184
- * @property {string} [description]
185
- * @property {string} [file_url] - Required property when passed type file_url.
186
- * Internet reachable csv file url which will be used to fetch download data.
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 PhoneNumber
199
- * @property {boolean} [active]
200
- * @property {number} [country_code]
201
- * @property {string} [phone]
202
- * @property {boolean} [primary]
203
- * @property {boolean} [verified]
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 PlatformEmail
208
- * @property {boolean} [is_required]
209
- * @property {string} [level]
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 PlatformMobile
214
- * @property {boolean} [is_required]
215
- * @property {string} [level]
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 {FlashCard} [flash_card]
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 {LookAndFeel} [look_and_feel]
232
- * @property {MetaSchema} [meta]
233
- * @property {string} [mobile_image]
269
+ * @property {boolean} [skip_captcha]
234
270
  * @property {string} [name]
235
- * @property {boolean} [register]
236
- * @property {RegisterRequiredFields} [register_required_fields]
271
+ * @property {MetaSchema} [meta]
272
+ * @property {string} [_id]
273
+ * @property {Social} [social]
237
274
  * @property {RequiredFields} [required_fields]
238
- * @property {Object} [session_config]
239
- * @property {boolean} [skip_captcha]
275
+ * @property {RegisterRequiredFields} [register_required_fields]
240
276
  * @property {boolean} [skip_login]
241
- * @property {Social} [social]
242
- * @property {SocialTokens} [social_tokens]
277
+ * @property {FlashCard} [flash_card]
243
278
  * @property {string} [subtext]
244
- * @property {string} [updated_at]
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 RegisterRequiredFields
249
- * @property {RegisterRequiredFieldsEmail} [email]
250
- * @property {RegisterRequiredFieldsMobile} [mobile]
291
+ * @typedef LookAndFeel
292
+ * @property {string} [card_position]
293
+ * @property {string} [background_color]
251
294
  */
252
295
 
253
296
  /**
254
- * @typedef RegisterRequiredFieldsEmail
255
- * @property {boolean} [is_required]
256
- * @property {string} [level]
297
+ * @typedef Login
298
+ * @property {boolean} [password]
299
+ * @property {boolean} [otp]
257
300
  */
258
301
 
259
302
  /**
260
- * @typedef RegisterRequiredFieldsMobile
261
- * @property {boolean} [is_required]
262
- * @property {string} [level]
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 SessionDeleteResponseSchema
273
- * @property {string} [session_id]
274
- * @property {string} [user_id]
322
+ * @typedef PlatformEmail
323
+ * @property {boolean} [is_required]
324
+ * @property {string} [level]
275
325
  */
276
326
 
277
327
  /**
278
- * @typedef SessionExpiry
279
- * @property {number} [duration]
280
- * @property {boolean} [is_rolling]
281
- * @property {string} [type]
328
+ * @typedef PlatformMobile
329
+ * @property {boolean} [is_required]
330
+ * @property {string} [level]
282
331
  */
283
332
 
284
333
  /**
285
- * @typedef SessionListResponseInfo
286
- * @property {string} [domain]
287
- * @property {string} [expire_in]
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 SessionListResponseSchema
295
- * @property {SessionListResponseInfo[]} [items]
340
+ * @typedef RegisterRequiredFieldsEmail
341
+ * @property {boolean} [is_required]
342
+ * @property {string} [level]
296
343
  */
297
344
 
298
345
  /**
299
- * @typedef SessionsDeleteResponseSchema
300
- * @property {string[]} [session_ids]
301
- * @property {string} [user_id]
346
+ * @typedef RegisterRequiredFieldsMobile
347
+ * @property {boolean} [is_required]
348
+ * @property {string} [level]
302
349
  */
303
350
 
304
351
  /**
305
- * @typedef Social
306
- * @property {boolean} [account_kit]
307
- * @property {boolean} [apple]
308
- * @property {boolean} [facebook]
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 SuccessMessageResponse
321
- * @property {string} [success]
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 {string} [user_id]
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 UserAttributeDefinition
358
- * @property {number} [__v] - The version number of the attribute.
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 UserAttributeDefinitionResponse
378
- * @property {string} [_id] - The unique identifier for the attribute definition.
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 UserAttributeDefinitionValidation
400
- * @property {string} [type] - The type of validation.
401
- * @property {Object} [value] - The validation value.
383
+ * @typedef Accountkit
384
+ * @property {string} [app_id]
402
385
  */
403
386
 
404
387
  /**
405
- * @typedef UserAttributeResponse
406
- * @property {string} [_id] - The unique identifier for the attribute definition.
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 UserEmails
418
- * @property {boolean} [active]
419
- * @property {string} [email]
420
- * @property {boolean} [primary]
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 UserGroupListResponseSchema
426
- * @property {UserGroupResponseSchema[]} [items]
427
- * @property {PaginationSchema} [page]
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 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]
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} [status]
444
- * @property {string} [type]
445
- * @property {number} [uid]
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 UserPhoneNumbers
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 UserResponseErrorSchema
467
- * @property {number} [count]
468
- * @property {string} [file_url]
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} [created_at]
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 UserSearchResponseSchema
494
- * @property {UserSchema[]} [users]
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
- class UserPlatformModel {
498
- /** @returns {Accountkit} */
499
- static Accountkit() {
500
- return Joi.object({
501
- app_id: Joi.string().allow(""),
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
- /** @returns {ArchiveUserSuccess} */
513
- static ArchiveUserSuccess() {
497
+ class UserPlatformModel {
498
+ /** @returns {SuccessMessageResponse} */
499
+ static SuccessMessageResponse() {
514
500
  return Joi.object({
515
- success: Joi.boolean(),
501
+ success: Joi.string().allow(""),
516
502
  });
517
503
  }
518
504
 
519
- /** @returns {AuthenticationApiErrorSchema} */
520
- static AuthenticationApiErrorSchema() {
505
+ /** @returns {UserAttributeDefinition} */
506
+ static UserAttributeDefinition() {
521
507
  return Joi.object({
522
- message: Joi.string().allow(""),
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 {BlockUserRequestSchema} */
527
- static BlockUserRequestSchema() {
527
+ /** @returns {UserAttributeDefinitionResponse} */
528
+ static UserAttributeDefinitionResponse() {
528
529
  return Joi.object({
529
- reason: Joi.string().allow(""),
530
- status: Joi.boolean(),
531
- user_id: Joi.array().items(Joi.string().allow("")),
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 {BlockUserSuccess} */
536
- static BlockUserSuccess() {
552
+ /** @returns {UserAttributeDefinitionValidation} */
553
+ static UserAttributeDefinitionValidation() {
537
554
  return Joi.object({
538
- success: Joi.boolean(),
555
+ type: Joi.string().allow(""),
556
+ value: Joi.any(),
539
557
  });
540
558
  }
541
559
 
542
- /** @returns {Conditions} */
543
- static Conditions() {
560
+ /** @returns {UserAttributeResponse} */
561
+ static UserAttributeResponse() {
544
562
  return Joi.object({
545
- key: Joi.string().allow(""),
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
- user_attribute_definition_id: Joi.string().allow(""),
548
- value: Joi.string().allow(""),
568
+ customer_overriden: Joi.boolean(),
569
+ attribute: Joi.any(),
570
+ updated_by: Joi.string().allow(""),
549
571
  });
550
572
  }
551
573
 
552
- /** @returns {ConditionsSchema} */
553
- static ConditionsSchema() {
574
+ /** @returns {CreateUserAttributeRequest} */
575
+ static CreateUserAttributeRequest() {
554
576
  return Joi.object({
555
- type: Joi.string().allow(""),
556
- user_attribute_definition_id: Joi.string().allow(""),
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 {CreateUserAttributeRequest} */
579
- static CreateUserAttributeRequest() {
599
+ /** @returns {BlockUserRequestSchema} */
600
+ static BlockUserRequestSchema() {
580
601
  return Joi.object({
581
- attribute: Joi.any(),
582
- customer_overriden: Joi.boolean(),
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 {CreateUserGroup} */
587
- static CreateUserGroup() {
608
+ /** @returns {ArchiveUserRequestSchema} */
609
+ static ArchiveUserRequestSchema() {
588
610
  return Joi.object({
589
- conditions: Joi.array().items(UserPlatformModel.ConditionsSchema()),
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 {CreateUserRequestSchema} */
598
- static CreateUserRequestSchema() {
615
+ /** @returns {UnDeleteUserRequestSchema} */
616
+ static UnDeleteUserRequestSchema() {
599
617
  return Joi.object({
600
- email: Joi.string().allow(""),
601
- external_id: Joi.string().allow(""),
602
- first_name: Joi.string().allow(""),
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 {CreateUserResponseSchema} */
612
- static CreateUserResponseSchema() {
624
+ /** @returns {BlockUserSuccess} */
625
+ static BlockUserSuccess() {
613
626
  return Joi.object({
614
- user: UserPlatformModel.UserSchema(),
627
+ success: Joi.boolean(),
615
628
  });
616
629
  }
617
630
 
618
- /** @returns {CreateUserSessionRequestSchema} */
619
- static CreateUserSessionRequestSchema() {
631
+ /** @returns {ArchiveUserSuccess} */
632
+ static ArchiveUserSuccess() {
620
633
  return Joi.object({
621
- domain: Joi.string().allow(""),
622
- max_age: Joi.number(),
623
- user_id: Joi.string().allow(""),
634
+ success: Joi.boolean(),
624
635
  });
625
636
  }
626
637
 
627
- /** @returns {CreateUserSessionResponseSchema} */
628
- static CreateUserSessionResponseSchema() {
638
+ /** @returns {UnDeleteUserSuccess} */
639
+ static UnDeleteUserSuccess() {
629
640
  return Joi.object({
630
- cookie: Joi.any(),
631
- domain: Joi.string().allow(""),
632
- http_only: Joi.boolean(),
633
- max_age: Joi.number(),
634
- secure: Joi.boolean(),
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 {DeleteAccountConsent} */
647
- static DeleteAccountConsent() {
660
+ /** @returns {PaginationSchema} */
661
+ static PaginationSchema() {
648
662
  return Joi.object({
649
- consent_text: Joi.string().allow(""),
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 {DeleteAccountReasons} */
654
- static DeleteAccountReasons() {
671
+ /** @returns {SessionListResponseSchema} */
672
+ static SessionListResponseSchema() {
655
673
  return Joi.object({
656
- reason_id: Joi.string().allow(""),
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 {Email} */
663
- static Email() {
678
+ /** @returns {SessionDeleteResponseSchema} */
679
+ static SessionDeleteResponseSchema() {
664
680
  return Joi.object({
665
- active: Joi.boolean(),
666
- email: Joi.string().allow(""),
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 {Facebook} */
673
- static Facebook() {
686
+ /** @returns {SessionsDeleteResponseSchema} */
687
+ static SessionsDeleteResponseSchema() {
674
688
  return Joi.object({
675
- app_id: Joi.string().allow(""),
689
+ user_id: Joi.string().allow(""),
690
+ session_ids: Joi.array().items(Joi.string().allow("")),
676
691
  });
677
692
  }
678
693
 
679
- /** @returns {FlashCard} */
680
- static FlashCard() {
694
+ /** @returns {AuthenticationApiErrorSchema} */
695
+ static AuthenticationApiErrorSchema() {
681
696
  return Joi.object({
682
- background_color: Joi.string().allow(""),
683
- text: Joi.string().allow(""),
684
- text_color: Joi.string().allow(""),
697
+ message: Joi.string().allow(""),
685
698
  });
686
699
  }
687
700
 
688
- /** @returns {Google} */
689
- static Google() {
701
+ /** @returns {SessionListResponseInfo} */
702
+ static SessionListResponseInfo() {
690
703
  return Joi.object({
691
- app_id: Joi.string().allow(""),
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 {Login} */
696
- static Login() {
712
+ /** @returns {Conditions} */
713
+ static Conditions() {
697
714
  return Joi.object({
698
- otp: Joi.boolean(),
699
- password: Joi.boolean(),
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 {LookAndFeel} */
704
- static LookAndFeel() {
722
+ /** @returns {UserResponseErrorSchema} */
723
+ static UserResponseErrorSchema() {
705
724
  return Joi.object({
706
- background_color: Joi.string().allow(""),
707
- card_position: Joi.string().allow(""),
725
+ count: Joi.number(),
726
+ file_url: Joi.string().allow(""),
708
727
  });
709
728
  }
710
729
 
711
- /** @returns {MetaSchema} */
712
- static MetaSchema() {
730
+ /** @returns {UserGroupResponseSchema} */
731
+ static UserGroupResponseSchema() {
713
732
  return Joi.object({
714
- fynd_default: Joi.boolean(),
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 {PaginationSchema} */
719
- static PaginationSchema() {
750
+ /** @returns {UserGroupListResponseSchema} */
751
+ static UserGroupListResponseSchema() {
720
752
  return Joi.object({
721
- current: Joi.number(),
722
- has_next: Joi.boolean(),
723
- item_total: Joi.number(),
724
- size: Joi.number(),
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 {PartialUserGroupUpdateSchema} */
730
- static PartialUserGroupUpdateSchema() {
767
+ /** @returns {CreateUserGroup} */
768
+ static CreateUserGroup() {
731
769
  return Joi.object({
732
- description: Joi.string().allow(""),
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
- user_data: Joi.array().items(UserPlatformModel.UserGroupUpdateData()),
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 {PhoneNumber} */
741
- static PhoneNumber() {
778
+ /** @returns {CreateUserRequestSchema} */
779
+ static CreateUserRequestSchema() {
742
780
  return Joi.object({
743
- active: Joi.boolean(),
744
- country_code: Joi.number(),
745
- phone: Joi.string().allow(""),
746
- primary: Joi.boolean(),
747
- verified: Joi.boolean(),
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 {PlatformEmail} */
752
- static PlatformEmail() {
792
+ /** @returns {CreateUserResponseSchema} */
793
+ static CreateUserResponseSchema() {
753
794
  return Joi.object({
754
- is_required: Joi.boolean(),
755
- level: Joi.string().allow(""),
795
+ user: UserPlatformModel.UserSchema(),
756
796
  });
757
797
  }
758
798
 
759
- /** @returns {PlatformMobile} */
760
- static PlatformMobile() {
799
+ /** @returns {CreateUserSessionRequestSchema} */
800
+ static CreateUserSessionRequestSchema() {
761
801
  return Joi.object({
762
- is_required: Joi.boolean(),
763
- level: Joi.string().allow(""),
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
- flash_card: UserPlatformModel.FlashCard(),
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
- look_and_feel: UserPlatformModel.LookAndFeel(),
784
- meta: UserPlatformModel.MetaSchema(),
785
- mobile_image: Joi.string().allow(""),
828
+ skip_captcha: Joi.boolean(),
786
829
  name: Joi.string().allow(""),
787
- register: Joi.boolean(),
788
- register_required_fields: UserPlatformModel.RegisterRequiredFields(),
830
+ meta: UserPlatformModel.MetaSchema(),
831
+ _id: Joi.string().allow(""),
832
+ social: UserPlatformModel.Social(),
789
833
  required_fields: UserPlatformModel.RequiredFields(),
790
- session_config: Joi.any(),
791
- skip_captcha: Joi.boolean(),
834
+ register_required_fields: UserPlatformModel.RegisterRequiredFields(),
792
835
  skip_login: Joi.boolean(),
793
- social: UserPlatformModel.Social(),
794
- social_tokens: UserPlatformModel.SocialTokens(),
836
+ flash_card: UserPlatformModel.FlashCard(),
795
837
  subtext: Joi.string().allow(""),
796
- updated_at: Joi.string().allow(""),
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 {RegisterRequiredFields} */
801
- static RegisterRequiredFields() {
852
+ /** @returns {LookAndFeel} */
853
+ static LookAndFeel() {
802
854
  return Joi.object({
803
- email: UserPlatformModel.RegisterRequiredFieldsEmail(),
804
- mobile: UserPlatformModel.RegisterRequiredFieldsMobile(),
855
+ card_position: Joi.string().allow(""),
856
+ background_color: Joi.string().allow(""),
805
857
  });
806
858
  }
807
859
 
808
- /** @returns {RegisterRequiredFieldsEmail} */
809
- static RegisterRequiredFieldsEmail() {
860
+ /** @returns {Login} */
861
+ static Login() {
810
862
  return Joi.object({
811
- is_required: Joi.boolean(),
812
- level: Joi.string().allow(""),
863
+ password: Joi.boolean(),
864
+ otp: Joi.boolean(),
813
865
  });
814
866
  }
815
867
 
816
- /** @returns {RegisterRequiredFieldsMobile} */
817
- static RegisterRequiredFieldsMobile() {
868
+ /** @returns {MetaSchema} */
869
+ static MetaSchema() {
818
870
  return Joi.object({
819
- is_required: Joi.boolean(),
820
- level: Joi.string().allow(""),
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 {SessionDeleteResponseSchema} */
833
- static SessionDeleteResponseSchema() {
893
+ /** @returns {PlatformEmail} */
894
+ static PlatformEmail() {
834
895
  return Joi.object({
835
- session_id: Joi.string().allow(""),
836
- user_id: Joi.string().allow(""),
896
+ is_required: Joi.boolean(),
897
+ level: Joi.string().allow(""),
837
898
  });
838
899
  }
839
900
 
840
- /** @returns {SessionExpiry} */
841
- static SessionExpiry() {
901
+ /** @returns {PlatformMobile} */
902
+ static PlatformMobile() {
842
903
  return Joi.object({
843
- duration: Joi.number(),
844
- is_rolling: Joi.boolean(),
845
- type: Joi.string().allow(""),
904
+ is_required: Joi.boolean(),
905
+ level: Joi.string().allow(""),
846
906
  });
847
907
  }
848
908
 
849
- /** @returns {SessionListResponseInfo} */
850
- static SessionListResponseInfo() {
909
+ /** @returns {RegisterRequiredFields} */
910
+ static RegisterRequiredFields() {
851
911
  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(""),
912
+ email: UserPlatformModel.RegisterRequiredFieldsEmail(),
913
+ mobile: UserPlatformModel.RegisterRequiredFieldsMobile(),
857
914
  });
858
915
  }
859
916
 
860
- /** @returns {SessionListResponseSchema} */
861
- static SessionListResponseSchema() {
917
+ /** @returns {RegisterRequiredFieldsEmail} */
918
+ static RegisterRequiredFieldsEmail() {
862
919
  return Joi.object({
863
- items: Joi.array().items(UserPlatformModel.SessionListResponseInfo()),
920
+ is_required: Joi.boolean(),
921
+ level: Joi.string().allow(""),
864
922
  });
865
923
  }
866
924
 
867
- /** @returns {SessionsDeleteResponseSchema} */
868
- static SessionsDeleteResponseSchema() {
925
+ /** @returns {RegisterRequiredFieldsMobile} */
926
+ static RegisterRequiredFieldsMobile() {
869
927
  return Joi.object({
870
- session_ids: Joi.array().items(Joi.string().allow("")),
871
- user_id: Joi.string().allow(""),
928
+ is_required: Joi.boolean(),
929
+ level: Joi.string().allow(""),
872
930
  });
873
931
  }
874
932
 
875
- /** @returns {Social} */
876
- static Social() {
933
+ /** @returns {FlashCard} */
934
+ static FlashCard() {
877
935
  return Joi.object({
878
- account_kit: Joi.boolean(),
879
- apple: Joi.boolean(),
880
- facebook: Joi.boolean(),
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 {SuccessMessageResponse} */
895
- static SuccessMessageResponse() {
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
- reason: Joi.string().allow(""),
954
+ reason_text: Joi.string().allow(""),
905
955
  reason_id: Joi.string().allow(""),
906
- user_id: Joi.string().allow(""),
956
+ show_text_area: Joi.boolean(),
907
957
  });
908
958
  }
909
959
 
910
- /** @returns {UnDeleteUserSuccess} */
911
- static UnDeleteUserSuccess() {
960
+ /** @returns {DeleteAccountConsent} */
961
+ static DeleteAccountConsent() {
912
962
  return Joi.object({
913
- success: Joi.boolean(),
963
+ consent_text: Joi.string().allow(""),
914
964
  });
915
965
  }
916
966
 
917
- /** @returns {UpdateUserGroupSchema} */
918
- static UpdateUserGroupSchema() {
967
+ /** @returns {Facebook} */
968
+ static Facebook() {
919
969
  return Joi.object({
920
- conditions: Joi.array().items(UserPlatformModel.ConditionsSchema()),
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 {UpdateUserRequestSchema} */
929
- static UpdateUserRequestSchema() {
974
+ /** @returns {Accountkit} */
975
+ static Accountkit() {
930
976
  return Joi.object({
931
- emails: Joi.array().items(UserPlatformModel.UserEmails()),
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 {UserAttributeDefinition} */
942
- static UserAttributeDefinition() {
981
+ /** @returns {Google} */
982
+ static Google() {
943
983
  return Joi.object({
944
- __v: Joi.number(),
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 {UserAttributeDefinitionResponse} */
964
- static UserAttributeDefinitionResponse() {
988
+ /** @returns {SessionExpiry} */
989
+ static SessionExpiry() {
965
990
  return Joi.object({
966
- _id: Joi.string().allow(""),
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
- updated_by: Joi.string().allow(""),
982
- validations: Joi.array().items(
983
- UserPlatformModel.UserAttributeDefinitionValidation()
984
- ),
993
+ is_rolling: Joi.boolean(),
985
994
  });
986
995
  }
987
996
 
988
- /** @returns {UserAttributeDefinitionValidation} */
989
- static UserAttributeDefinitionValidation() {
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
- value: Joi.any(),
1002
+ name: Joi.string().allow(""),
1003
+ description: Joi.string().allow(""),
1004
+ file_url: Joi.string().allow(""),
993
1005
  });
994
1006
  }
995
1007
 
996
- /** @returns {UserAttributeResponse} */
997
- static UserAttributeResponse() {
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
- updated_by: Joi.string().allow(""),
1006
- user_id: Joi.string().allow(""),
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 {UserEmails} */
1011
- static UserEmails() {
1019
+ /** @returns {UserGroupUpdateData} */
1020
+ static UserGroupUpdateData() {
1012
1021
  return Joi.object({
1013
- active: Joi.boolean(),
1022
+ user_id: Joi.string().allow(""),
1023
+ phone_number: Joi.string().allow(""),
1014
1024
  email: Joi.string().allow(""),
1015
- primary: Joi.boolean(),
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 {UserGroupResponseSchema} */
1029
- static UserGroupResponseSchema() {
1029
+ /** @returns {UpdateUserRequestSchema} */
1030
+ static UpdateUserRequestSchema() {
1030
1031
  return Joi.object({
1031
- __v: Joi.number(),
1032
- _id: Joi.string().allow(""),
1033
- application_id: Joi.string().allow(""),
1034
- conditions: Joi.array().items(UserPlatformModel.Conditions()),
1035
- created_at: Joi.string().allow(""),
1036
- description: Joi.string().allow(""),
1037
- error: UserPlatformModel.UserResponseErrorSchema(),
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 {UserGroupUpdateData} */
1049
- static UserGroupUpdateData() {
1042
+ /** @returns {UserEmails} */
1043
+ static UserEmails() {
1050
1044
  return Joi.object({
1051
- action: Joi.string().allow("").required(),
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
- created_at: Joi.string().allow(""),
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 {UserSearchResponseSchema} */
1101
- static UserSearchResponseSchema() {
1086
+ /** @returns {PhoneNumber} */
1087
+ static PhoneNumber() {
1102
1088
  return Joi.object({
1103
- users: Joi.array().items(UserPlatformModel.UserSchema()),
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
  }