@gofynd/fdk-client-javascript 1.4.2-beta.2 → 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,65 +1,22 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef Accountkit
5
- * @property {string} [app_id]
6
- */
7
-
8
- /**
9
- * @typedef APIError
10
- * @property {string} [code]
11
- * @property {string} [info] - Error code description link
12
- * @property {string} [message]
13
- * @property {Object} [meta]
14
- * @property {string} [request_id]
15
- */
16
-
17
- /**
18
- * @typedef AuthenticationApiErrorSchema
19
- * @property {string} [message]
20
- */
21
-
22
- /**
23
- * @typedef AuthenticationInternalServerErrorSchema
24
- * @property {string} [message]
25
- */
26
-
27
- /**
28
- * @typedef AuthSuccess
29
- * @property {string} [register_token]
30
- * @property {UserSchema} [user]
31
- * @property {boolean} [user_exists]
32
- */
33
-
34
- /**
35
- * @typedef CodeRequestBodySchema
36
- * @property {string} [code]
37
- */
38
-
39
- /**
40
- * @typedef DeleteAccountConsent
41
- * @property {string} [consent_text]
4
+ * @typedef UpdateUserAttributesRequest
5
+ * @property {Object} [attributes]
42
6
  */
43
7
 
44
8
  /**
45
- * @typedef DeleteAccountReasons
46
- * @property {string} [reason_id]
47
- * @property {string} [reason_text]
48
- * @property {boolean} [show_text_area]
9
+ * @typedef UserAttributes
10
+ * @property {Object} [attributes]
49
11
  */
50
12
 
51
13
  /**
52
14
  * @typedef DeleteApplicationUserRequestSchema
53
- * @property {string} [otp]
15
+ * @property {string} [user_id]
54
16
  * @property {string} [reason]
55
17
  * @property {string} [reason_id]
56
18
  * @property {string} [request_id]
57
- * @property {string} [user_id]
58
- */
59
-
60
- /**
61
- * @typedef DeleteUserSuccess
62
- * @property {boolean} [success]
19
+ * @property {string} [otp]
63
20
  */
64
21
 
65
22
  /**
@@ -68,136 +25,157 @@ const Joi = require("joi");
68
25
  */
69
26
 
70
27
  /**
71
- * @typedef EditMobileRequestSchema
28
+ * @typedef SendVerificationLinkMobileRequestSchema
29
+ * @property {boolean} [verified]
30
+ * @property {boolean} [active]
72
31
  * @property {string} [country_code]
73
32
  * @property {string} [phone]
33
+ * @property {boolean} [primary]
74
34
  */
75
35
 
76
36
  /**
77
- * @typedef EditProfileMobileSchema
37
+ * @typedef EditMobileRequestSchema
78
38
  * @property {string} [country_code]
79
39
  * @property {string} [phone]
80
40
  */
81
41
 
82
42
  /**
83
43
  * @typedef EditProfileRequestSchema
84
- * @property {string} [android_hash]
85
- * @property {string} [country_code]
86
- * @property {string} [dob]
87
- * @property {string} [email]
88
44
  * @property {string} [first_name]
89
- * @property {string} [gender]
90
45
  * @property {string} [last_name]
91
46
  * @property {EditProfileMobileSchema} [mobile]
47
+ * @property {string} [country_code]
48
+ * @property {string} [email]
49
+ * @property {string} [gender]
50
+ * @property {string} [dob]
92
51
  * @property {string} [profile_pic_url]
93
- * @property {string} [register_token]
52
+ * @property {string} [android_hash]
94
53
  * @property {string} [sender]
54
+ * @property {string} [register_token]
95
55
  */
96
56
 
97
57
  /**
98
- * @typedef Email
99
- * @property {boolean} [active]
100
- * @property {string} [email]
101
- * @property {boolean} [primary]
102
- * @property {boolean} [verified]
58
+ * @typedef EditProfileMobileSchema
59
+ * @property {string} [phone]
60
+ * @property {string} [country_code]
103
61
  */
104
62
 
105
63
  /**
106
- * @typedef EmailOtpSuccess
107
- * @property {boolean} [success]
64
+ * @typedef SendEmailOtpRequestSchema
65
+ * @property {string} [email]
66
+ * @property {string} [action]
67
+ * @property {string} [token]
68
+ * @property {string} [register_token]
108
69
  */
109
70
 
110
71
  /**
111
- * @typedef Facebook
112
- * @property {string} [app_id]
72
+ * @typedef SendEmailForgotOtpRequestSchema
73
+ * @property {string} [email]
74
+ * @property {string} [action]
75
+ * @property {string} [token]
113
76
  */
114
77
 
115
78
  /**
116
- * @typedef FlashCard
117
- * @property {string} [background_color]
118
- * @property {string} [text]
119
- * @property {string} [text_color]
79
+ * @typedef VerifyEmailOtpRequestSchema
80
+ * @property {string} [email]
81
+ * @property {string} [action]
82
+ * @property {string} [register_token]
83
+ * @property {string} [otp]
120
84
  */
121
85
 
122
86
  /**
123
- * @typedef ForgotPasswordRequestSchema
124
- * @property {string} [code]
125
- * @property {string} [password]
87
+ * @typedef VerifyEmailForgotOtpRequestSchema
88
+ * @property {string} [email]
89
+ * @property {string} [otp]
126
90
  */
127
91
 
128
92
  /**
129
- * @typedef FormRegisterRequestSchema
130
- * @property {string} [email]
131
- * @property {string} [first_name]
132
- * @property {string} [gender]
133
- * @property {string} [last_name]
134
- * @property {string} [password]
135
- * @property {FormRegisterRequestSchemaPhone} [phone]
93
+ * @typedef VerifyOtpRequestSchema
94
+ * @property {string} [request_id]
136
95
  * @property {string} [register_token]
96
+ * @property {string} [otp]
137
97
  */
138
98
 
139
99
  /**
140
- * @typedef FormRegisterRequestSchemaPhone
141
- * @property {string} [country_code]
142
- * @property {string} [mobile]
100
+ * @typedef VerifyMobileForgotOtpRequestSchema
101
+ * @property {string} [request_id]
102
+ * @property {string} [otp]
143
103
  */
144
104
 
145
105
  /**
146
- * @typedef Google
147
- * @property {string} [app_id]
106
+ * @typedef SendMobileOtpRequestSchema
107
+ * @property {string} [mobile]
108
+ * @property {string} [country_code]
109
+ * @property {string} [action]
110
+ * @property {string} [token]
111
+ * @property {string} [android_hash]
112
+ * @property {string} [force]
148
113
  */
149
114
 
150
115
  /**
151
- * @typedef HasPasswordSuccess
152
- * @property {boolean} [result]
116
+ * @typedef SendMobileForgotOtpRequestSchema
117
+ * @property {string} [mobile]
118
+ * @property {string} [country_code]
119
+ * @property {string} [action]
120
+ * @property {string} [token]
121
+ * @property {string} [android_hash]
153
122
  */
154
123
 
155
124
  /**
156
- * @typedef Login
157
- * @property {boolean} [otp]
158
- * @property {boolean} [password]
125
+ * @typedef UpdatePasswordRequestSchema
126
+ * @property {string} [old_password]
127
+ * @property {string} [new_password]
159
128
  */
160
129
 
161
130
  /**
162
- * @typedef LoginSuccess
131
+ * @typedef FormRegisterRequestSchema
132
+ * @property {string} [first_name]
133
+ * @property {string} [last_name]
134
+ * @property {string} [gender]
135
+ * @property {string} [email]
136
+ * @property {string} [password]
137
+ * @property {FormRegisterRequestSchemaPhone} [phone]
163
138
  * @property {string} [register_token]
164
- * @property {string} [request_id]
165
- * @property {UserSchema} [user]
166
139
  */
167
140
 
168
141
  /**
169
- * @typedef LogoutSuccess
170
- * @property {boolean} [logout]
142
+ * @typedef TokenRequestBodySchema
143
+ * @property {string} [token]
171
144
  */
172
145
 
173
146
  /**
174
- * @typedef LookAndFeel
175
- * @property {string} [background_color]
176
- * @property {string} [card_position]
147
+ * @typedef ForgotPasswordRequestSchema
148
+ * @property {string} [code]
149
+ * @property {string} [password]
177
150
  */
178
151
 
179
152
  /**
180
- * @typedef MetaSchema
181
- * @property {boolean} [fynd_default]
153
+ * @typedef CodeRequestBodySchema
154
+ * @property {string} [code]
182
155
  */
183
156
 
184
157
  /**
185
- * @typedef OAuthRequestAppleSchema
186
- * @property {OAuthRequestAppleSchemaOauth} [oauth]
187
- * @property {OAuthRequestAppleSchemaProfile} [profile]
188
- * @property {string} [user_identifier]
158
+ * @typedef SendResetPasswordEmailRequestSchema
159
+ * @property {string} [email]
189
160
  */
190
161
 
191
162
  /**
192
- * @typedef OAuthRequestAppleSchemaOauth
193
- * @property {string} [identity_token]
163
+ * @typedef SendResetPasswordMobileRequestSchema
164
+ * @property {string} [country_code]
165
+ * @property {string} [mobile]
194
166
  */
195
167
 
196
168
  /**
197
- * @typedef OAuthRequestAppleSchemaProfile
198
- * @property {string} [first_name]
199
- * @property {string} [full_name]
200
- * @property {string} [last_name]
169
+ * @typedef PasswordLoginRequestSchema
170
+ * @property {string} [password]
171
+ * @property {string} [username]
172
+ */
173
+
174
+ /**
175
+ * @typedef SendOtpRequestSchema
176
+ * @property {string} [country_code]
177
+ * @property {string} [mobile]
178
+ * @property {string} [android_hash]
201
179
  */
202
180
 
203
181
  /**
@@ -208,173 +186,169 @@ const Joi = require("joi");
208
186
  */
209
187
 
210
188
  /**
211
- * @typedef OAuthRequestSchemaOauth2
212
- * @property {string} [access_token]
213
- * @property {number} [expiry]
214
- * @property {string} [refresh_token]
189
+ * @typedef OAuthRequestAppleSchema
190
+ * @property {string} [user_identifier]
191
+ * @property {OAuthRequestAppleSchemaOauth} [oauth]
192
+ * @property {OAuthRequestAppleSchemaProfile} [profile]
215
193
  */
216
194
 
217
195
  /**
218
- * @typedef OAuthRequestSchemaProfile
219
- * @property {string} [email]
220
- * @property {string} [first_name]
221
- * @property {string} [full_name]
222
- * @property {string} [id]
223
- * @property {string} [image]
224
- * @property {string} [last_name]
196
+ * @typedef UserObjectSchema
197
+ * @property {UserSchema} [user]
225
198
  */
226
199
 
227
200
  /**
228
- * @typedef OtpSuccess
229
- * @property {string} [country_code]
230
- * @property {string} [message]
231
- * @property {string} [mobile]
201
+ * @typedef AuthSuccess
232
202
  * @property {string} [register_token]
233
- * @property {string} [request_id]
234
- * @property {number} [resend_timer]
235
- * @property {string} [resend_token]
236
- * @property {boolean} [success]
203
+ * @property {boolean} [user_exists]
204
+ * @property {UserSchema} [user]
237
205
  */
238
206
 
239
207
  /**
240
- * @typedef PasswordLoginRequestSchema
241
- * @property {string} [password]
242
- * @property {string} [username]
208
+ * @typedef UserExistsResponse
209
+ * @property {boolean} [user_exists]
243
210
  */
244
211
 
245
212
  /**
246
- * @typedef PhoneNumber
247
- * @property {boolean} [active]
248
- * @property {number} [country_code]
249
- * @property {string} [phone]
250
- * @property {boolean} [primary]
251
- * @property {boolean} [verified]
213
+ * @typedef SendOtpResponse
214
+ * @property {number} [resend_timer]
215
+ * @property {string} [resend_token]
216
+ * @property {boolean} [success]
217
+ * @property {string} [request_id]
218
+ * @property {string} [message]
219
+ * @property {string} [mobile]
220
+ * @property {string} [country_code]
221
+ * @property {string} [email]
222
+ * @property {string} [resend_email_token]
223
+ * @property {string} [register_token]
224
+ * @property {boolean} [verify_email_otp]
225
+ * @property {boolean} [verify_mobile_otp]
226
+ * @property {boolean} [user_exists]
252
227
  */
253
228
 
254
229
  /**
255
- * @typedef PlatformEmail
256
- * @property {boolean} [is_required]
257
- * @property {string} [level]
258
- */
259
-
260
- /**
261
- * @typedef PlatformMobile
262
- * @property {boolean} [is_required]
263
- * @property {string} [level]
230
+ * @typedef ProfileEditSuccess
231
+ * @property {UserSchema} [user]
232
+ * @property {string} [register_token]
233
+ * @property {string} [resend_email_token]
234
+ * @property {boolean} [user_exists]
235
+ * @property {boolean} [verify_email_link]
236
+ * @property {boolean} [verify_email_otp]
237
+ * @property {boolean} [verify_mobile_otp]
238
+ * @property {string} [email]
239
+ * @property {string} [request_id]
240
+ * @property {string} [country_code]
241
+ * @property {string} [mobile]
242
+ * @property {boolean} [success]
243
+ * @property {string} [message]
244
+ * @property {number} [resend_timer]
245
+ * @property {string} [resend_token]
264
246
  */
265
247
 
266
248
  /**
267
- * @typedef PlatformSchema
268
- * @property {string} [_id]
269
- * @property {boolean} [active]
270
- * @property {string} [created_at]
271
- * @property {Object} [delete_account_consent]
272
- * @property {number} [delete_account_day]
273
- * @property {DeleteAccountReasons[]} [delete_account_reasons]
274
- * @property {string} [desktop_image]
275
- * @property {string} [display]
276
- * @property {FlashCard} [flash_card]
277
- * @property {boolean} [forgot_password]
278
- * @property {Login} [login]
279
- * @property {LookAndFeel} [look_and_feel]
280
- * @property {MetaSchema} [meta]
281
- * @property {string} [mobile_image]
282
- * @property {string} [name]
283
- * @property {boolean} [register]
284
- * @property {RegisterRequiredFields} [register_required_fields]
285
- * @property {RequiredFields} [required_fields]
286
- * @property {Object} [session_config]
287
- * @property {boolean} [skip_captcha]
288
- * @property {boolean} [skip_login]
289
- * @property {Social} [social]
290
- * @property {SocialTokens} [social_tokens]
291
- * @property {string} [subtext]
292
- * @property {string} [updated_at]
249
+ * @typedef LoginSuccess
250
+ * @property {UserSchema} [user]
251
+ * @property {string} [request_id]
252
+ * @property {string} [register_token]
293
253
  */
294
254
 
295
255
  /**
296
- * @typedef ProfileEditSuccess
297
- * @property {string} [country_code]
298
- * @property {string} [email]
299
- * @property {string} [message]
300
- * @property {string} [mobile]
301
- * @property {string} [register_token]
302
- * @property {string} [request_id]
303
- * @property {string} [resend_email_token]
304
- * @property {number} [resend_timer]
305
- * @property {string} [resend_token]
256
+ * @typedef ResetForgotPasswordSuccess
306
257
  * @property {boolean} [success]
258
+ */
259
+
260
+ /**
261
+ * @typedef VerifyOtpSuccess
307
262
  * @property {UserSchema} [user]
308
263
  * @property {boolean} [user_exists]
309
- * @property {boolean} [verify_email_link]
310
- * @property {boolean} [verify_email_otp]
311
- * @property {boolean} [verify_mobile_otp]
264
+ * @property {string} [register_token]
265
+ */
266
+
267
+ /**
268
+ * @typedef VerifyForgotOtpSuccess
269
+ * @property {boolean} [success]
270
+ * @property {string} [forgot_token]
271
+ */
272
+
273
+ /**
274
+ * @typedef ResetPasswordSuccess
275
+ * @property {string} [status]
312
276
  */
313
277
 
314
278
  /**
315
279
  * @typedef RegisterFormSuccess
316
- * @property {string} [country_code]
317
280
  * @property {string} [email]
318
- * @property {string} [message]
319
- * @property {string} [mobile]
320
- * @property {string} [register_token]
321
- * @property {string} [request_id]
322
- * @property {string} [resend_email_token]
323
281
  * @property {number} [resend_timer]
324
282
  * @property {string} [resend_token]
283
+ * @property {string} [resend_email_token]
284
+ * @property {string} [register_token]
325
285
  * @property {boolean} [success]
326
- * @property {boolean} [user_exists]
286
+ * @property {string} [request_id]
287
+ * @property {string} [message]
288
+ * @property {string} [mobile]
289
+ * @property {string} [country_code]
327
290
  * @property {boolean} [verify_email_otp]
328
291
  * @property {boolean} [verify_mobile_otp]
292
+ * @property {boolean} [user_exists]
329
293
  */
330
294
 
331
295
  /**
332
- * @typedef RegisterRequiredFields
333
- * @property {RegisterRequiredFieldsEmail} [email]
334
- * @property {RegisterRequiredFieldsMobile} [mobile]
296
+ * @typedef VerifyEmailSuccess
297
+ * @property {string} [message]
335
298
  */
336
299
 
337
300
  /**
338
- * @typedef RegisterRequiredFieldsEmail
339
- * @property {boolean} [is_required]
340
- * @property {string} [level]
301
+ * @typedef HasPasswordSuccess
302
+ * @property {boolean} [result]
341
303
  */
342
304
 
343
305
  /**
344
- * @typedef RegisterRequiredFieldsMobile
345
- * @property {boolean} [is_required]
346
- * @property {string} [level]
306
+ * @typedef LogoutSuccess
307
+ * @property {boolean} [logout]
347
308
  */
348
309
 
349
310
  /**
350
- * @typedef RequiredFields
351
- * @property {PlatformEmail} [email]
352
- * @property {PlatformMobile} [mobile]
311
+ * @typedef DeleteUserSuccess
312
+ * @property {boolean} [success]
353
313
  */
354
314
 
355
315
  /**
356
- * @typedef ResetForgotPasswordSuccess
316
+ * @typedef OtpSuccess
317
+ * @property {number} [resend_timer]
318
+ * @property {string} [resend_token]
319
+ * @property {string} [register_token]
357
320
  * @property {boolean} [success]
321
+ * @property {string} [request_id]
322
+ * @property {string} [message]
323
+ * @property {string} [mobile]
324
+ * @property {string} [country_code]
358
325
  */
359
326
 
360
327
  /**
361
- * @typedef ResetPasswordSuccess
362
- * @property {string} [status]
328
+ * @typedef EmailOtpSuccess
329
+ * @property {boolean} [success]
363
330
  */
364
331
 
365
332
  /**
366
- * @typedef SendEmailForgotOtpRequestSchema
367
- * @property {string} [action]
368
- * @property {string} [email]
369
- * @property {string} [token]
333
+ * @typedef SessionListSuccess
334
+ * @property {string[]} [sessions]
370
335
  */
371
336
 
372
337
  /**
373
- * @typedef SendEmailOtpRequestSchema
374
- * @property {string} [action]
375
- * @property {string} [email]
376
- * @property {string} [register_token]
377
- * @property {string} [token]
338
+ * @typedef VerifyMobileOTPSuccess
339
+ * @property {UserSchema} [user]
340
+ * @property {boolean} [verify_mobile_link]
341
+ */
342
+
343
+ /**
344
+ * @typedef VerifyEmailOTPSuccess
345
+ * @property {UserSchema} [user]
346
+ * @property {boolean} [verify_email_link]
347
+ */
348
+
349
+ /**
350
+ * @typedef SendMobileVerifyLinkSuccess
351
+ * @property {boolean} [verify_mobile_link]
378
352
  */
379
353
 
380
354
  /**
@@ -383,288 +357,257 @@ const Joi = require("joi");
383
357
  */
384
358
 
385
359
  /**
386
- * @typedef SendMobileForgotOtpRequestSchema
387
- * @property {string} [action]
388
- * @property {string} [android_hash]
389
- * @property {string} [country_code]
390
- * @property {string} [mobile]
391
- * @property {string} [token]
360
+ * @typedef AuthenticationInternalServerErrorSchema
361
+ * @property {string} [message]
392
362
  */
393
363
 
394
364
  /**
395
- * @typedef SendMobileOtpRequestSchema
396
- * @property {string} [action]
397
- * @property {string} [android_hash]
398
- * @property {string} [country_code]
399
- * @property {string} [force]
400
- * @property {string} [mobile]
401
- * @property {string} [token]
365
+ * @typedef AuthenticationApiErrorSchema
366
+ * @property {string} [message]
402
367
  */
403
368
 
404
369
  /**
405
- * @typedef SendMobileVerifyLinkSuccess
406
- * @property {boolean} [verify_mobile_link]
370
+ * @typedef APIError
371
+ * @property {string} [code]
372
+ * @property {string} [message]
373
+ * @property {string} [info] - Error code description link
374
+ * @property {string} [request_id]
375
+ * @property {Object} [meta]
407
376
  */
408
377
 
409
378
  /**
410
- * @typedef SendOtpRequestSchema
411
- * @property {string} [android_hash]
379
+ * @typedef FormRegisterRequestSchemaPhone
412
380
  * @property {string} [country_code]
413
381
  * @property {string} [mobile]
414
382
  */
415
383
 
416
384
  /**
417
- * @typedef SendOtpResponse
418
- * @property {string} [country_code]
419
- * @property {string} [email]
420
- * @property {string} [message]
421
- * @property {string} [mobile]
422
- * @property {string} [register_token]
423
- * @property {string} [request_id]
424
- * @property {string} [resend_email_token]
425
- * @property {number} [resend_timer]
426
- * @property {string} [resend_token]
427
- * @property {boolean} [success]
428
- * @property {boolean} [user_exists]
429
- * @property {boolean} [verify_email_otp]
430
- * @property {boolean} [verify_mobile_otp]
385
+ * @typedef OAuthRequestSchemaOauth2
386
+ * @property {string} [access_token]
387
+ * @property {number} [expiry]
388
+ * @property {string} [refresh_token]
431
389
  */
432
390
 
433
391
  /**
434
- * @typedef SendResetPasswordEmailRequestSchema
392
+ * @typedef OAuthRequestSchemaProfile
393
+ * @property {string} [last_name]
394
+ * @property {string} [image]
395
+ * @property {string} [id]
435
396
  * @property {string} [email]
397
+ * @property {string} [full_name]
398
+ * @property {string} [first_name]
436
399
  */
437
400
 
438
401
  /**
439
- * @typedef SendResetPasswordMobileRequestSchema
440
- * @property {string} [country_code]
441
- * @property {string} [mobile]
402
+ * @typedef OAuthRequestAppleSchemaOauth
403
+ * @property {string} [identity_token]
442
404
  */
443
405
 
444
406
  /**
445
- * @typedef SendVerificationLinkMobileRequestSchema
407
+ * @typedef OAuthRequestAppleSchemaProfile
408
+ * @property {string} [last_name]
409
+ * @property {string} [full_name]
410
+ * @property {string} [first_name]
411
+ */
412
+
413
+ /**
414
+ * @typedef PlatformSchema
415
+ * @property {string} [display]
416
+ * @property {LookAndFeel} [look_and_feel]
417
+ * @property {string} [updated_at]
446
418
  * @property {boolean} [active]
447
- * @property {string} [country_code]
448
- * @property {string} [phone]
449
- * @property {boolean} [primary]
450
- * @property {boolean} [verified]
419
+ * @property {boolean} [forgot_password]
420
+ * @property {Login} [login]
421
+ * @property {boolean} [skip_captcha]
422
+ * @property {string} [name]
423
+ * @property {MetaSchema} [meta]
424
+ * @property {string} [_id]
425
+ * @property {Social} [social]
426
+ * @property {RequiredFields} [required_fields]
427
+ * @property {RegisterRequiredFields} [register_required_fields]
428
+ * @property {boolean} [skip_login]
429
+ * @property {FlashCard} [flash_card]
430
+ * @property {string} [subtext]
431
+ * @property {SocialTokens} [social_tokens]
432
+ * @property {string} [created_at]
433
+ * @property {boolean} [register]
434
+ * @property {string} [mobile_image]
435
+ * @property {string} [desktop_image]
436
+ * @property {number} [delete_account_day]
437
+ * @property {DeleteAccountReasons[]} [delete_account_reasons]
438
+ * @property {Object} [delete_account_consent]
439
+ * @property {Object} [session_config]
451
440
  */
452
441
 
453
442
  /**
454
- * @typedef SessionExpiry
455
- * @property {number} [duration]
456
- * @property {boolean} [is_rolling]
457
- * @property {string} [type]
443
+ * @typedef LookAndFeel
444
+ * @property {string} [card_position]
445
+ * @property {string} [background_color]
458
446
  */
459
447
 
460
448
  /**
461
- * @typedef SessionListSuccess
462
- * @property {string[]} [sessions]
449
+ * @typedef Login
450
+ * @property {boolean} [password]
451
+ * @property {boolean} [otp]
452
+ */
453
+
454
+ /**
455
+ * @typedef MetaSchema
456
+ * @property {boolean} [fynd_default]
463
457
  */
464
458
 
465
459
  /**
466
460
  * @typedef Social
467
461
  * @property {boolean} [account_kit]
468
- * @property {boolean} [apple]
469
462
  * @property {boolean} [facebook]
470
463
  * @property {boolean} [google]
464
+ * @property {boolean} [apple]
471
465
  */
472
466
 
473
467
  /**
474
- * @typedef SocialTokens
475
- * @property {Accountkit} [account_kit]
476
- * @property {Facebook} [facebook]
477
- * @property {Google} [google]
468
+ * @typedef RequiredFields
469
+ * @property {PlatformEmail} [email]
470
+ * @property {PlatformMobile} [mobile]
478
471
  */
479
472
 
480
473
  /**
481
- * @typedef TokenRequestBodySchema
482
- * @property {string} [token]
474
+ * @typedef PlatformEmail
475
+ * @property {boolean} [is_required]
476
+ * @property {string} [level]
483
477
  */
484
478
 
485
479
  /**
486
- * @typedef UpdatePasswordRequestSchema
487
- * @property {string} [new_password]
488
- * @property {string} [old_password]
480
+ * @typedef PlatformMobile
481
+ * @property {boolean} [is_required]
482
+ * @property {string} [level]
489
483
  */
490
484
 
491
485
  /**
492
- * @typedef UpdateUserAttributesRequest
493
- * @property {Object} [attributes]
486
+ * @typedef RegisterRequiredFields
487
+ * @property {RegisterRequiredFieldsEmail} [email]
488
+ * @property {RegisterRequiredFieldsMobile} [mobile]
494
489
  */
495
490
 
496
491
  /**
497
- * @typedef UserAttributes
498
- * @property {Object} [attributes]
492
+ * @typedef RegisterRequiredFieldsEmail
493
+ * @property {boolean} [is_required]
494
+ * @property {string} [level]
499
495
  */
500
496
 
501
497
  /**
502
- * @typedef UserExistsResponse
503
- * @property {boolean} [user_exists]
498
+ * @typedef RegisterRequiredFieldsMobile
499
+ * @property {boolean} [is_required]
500
+ * @property {string} [level]
504
501
  */
505
502
 
506
503
  /**
507
- * @typedef UserObjectSchema
508
- * @property {UserSchema} [user]
504
+ * @typedef FlashCard
505
+ * @property {string} [text]
506
+ * @property {string} [text_color]
507
+ * @property {string} [background_color]
509
508
  */
510
509
 
511
510
  /**
512
- * @typedef UserSchema
513
- * @property {string} [_id]
514
- * @property {string} [account_type]
515
- * @property {boolean} [active]
516
- * @property {string} [application_id]
517
- * @property {string} [created_at]
518
- * @property {string} [dob]
519
- * @property {Email[]} [emails]
520
- * @property {string} [first_name]
521
- * @property {string} [gender]
522
- * @property {string} [last_name]
523
- * @property {Object} [meta]
524
- * @property {PhoneNumber[]} [phone_numbers]
525
- * @property {string} [profile_pic_url]
526
- * @property {string} [updated_at]
527
- * @property {string} [user_id]
528
- * @property {string} [username]
511
+ * @typedef SocialTokens
512
+ * @property {Facebook} [facebook]
513
+ * @property {Accountkit} [account_kit]
514
+ * @property {Google} [google]
529
515
  */
530
516
 
531
517
  /**
532
- * @typedef VerifyEmailForgotOtpRequestSchema
533
- * @property {string} [email]
534
- * @property {string} [otp]
518
+ * @typedef DeleteAccountReasons
519
+ * @property {string} [reason_text]
520
+ * @property {string} [reason_id]
521
+ * @property {boolean} [show_text_area]
535
522
  */
536
523
 
537
524
  /**
538
- * @typedef VerifyEmailOtpRequestSchema
539
- * @property {string} [action]
540
- * @property {string} [email]
541
- * @property {string} [otp]
542
- * @property {string} [register_token]
525
+ * @typedef DeleteAccountConsent
526
+ * @property {string} [consent_text]
543
527
  */
544
528
 
545
529
  /**
546
- * @typedef VerifyEmailOTPSuccess
547
- * @property {UserSchema} [user]
548
- * @property {boolean} [verify_email_link]
530
+ * @typedef Facebook
531
+ * @property {string} [app_id]
549
532
  */
550
533
 
551
534
  /**
552
- * @typedef VerifyEmailSuccess
553
- * @property {string} [message]
535
+ * @typedef Accountkit
536
+ * @property {string} [app_id]
554
537
  */
555
538
 
556
539
  /**
557
- * @typedef VerifyForgotOtpSuccess
558
- * @property {string} [forgot_token]
559
- * @property {boolean} [success]
540
+ * @typedef Google
541
+ * @property {string} [app_id]
560
542
  */
561
543
 
562
544
  /**
563
- * @typedef VerifyMobileForgotOtpRequestSchema
564
- * @property {string} [otp]
565
- * @property {string} [request_id]
545
+ * @typedef SessionExpiry
546
+ * @property {number} [duration]
547
+ * @property {string} [type]
548
+ * @property {boolean} [is_rolling]
566
549
  */
567
550
 
568
551
  /**
569
- * @typedef VerifyMobileOTPSuccess
570
- * @property {UserSchema} [user]
571
- * @property {boolean} [verify_mobile_link]
552
+ * @typedef UserSchema
553
+ * @property {string} [application_id]
554
+ * @property {string} [user_id]
555
+ * @property {string} [first_name]
556
+ * @property {Object} [meta]
557
+ * @property {string} [last_name]
558
+ * @property {PhoneNumber[]} [phone_numbers]
559
+ * @property {Email[]} [emails]
560
+ * @property {string} [gender]
561
+ * @property {string} [dob]
562
+ * @property {boolean} [active]
563
+ * @property {string} [profile_pic_url]
564
+ * @property {string} [username]
565
+ * @property {string} [account_type]
566
+ * @property {string} [_id]
567
+ * @property {string} [created_at]
568
+ * @property {string} [updated_at]
572
569
  */
573
570
 
574
571
  /**
575
- * @typedef VerifyOtpRequestSchema
576
- * @property {string} [otp]
577
- * @property {string} [register_token]
578
- * @property {string} [request_id]
572
+ * @typedef PhoneNumber
573
+ * @property {boolean} [active]
574
+ * @property {boolean} [primary]
575
+ * @property {boolean} [verified]
576
+ * @property {string} [phone]
577
+ * @property {number} [country_code]
579
578
  */
580
579
 
581
580
  /**
582
- * @typedef VerifyOtpSuccess
583
- * @property {string} [register_token]
584
- * @property {UserSchema} [user]
585
- * @property {boolean} [user_exists]
581
+ * @typedef Email
582
+ * @property {boolean} [primary]
583
+ * @property {boolean} [verified]
584
+ * @property {string} [email]
585
+ * @property {boolean} [active]
586
586
  */
587
-
588
- class UserApplicationModel {
589
- /** @returns {Accountkit} */
590
- static Accountkit() {
591
- return Joi.object({
592
- app_id: Joi.string().allow(""),
593
- });
594
- }
595
-
596
- /** @returns {APIError} */
597
- static APIError() {
598
- return Joi.object({
599
- code: Joi.string().allow(""),
600
- info: Joi.string().allow(""),
601
- message: Joi.string().allow(""),
602
- meta: Joi.any(),
603
- request_id: Joi.string().allow(""),
604
- });
605
- }
606
-
607
- /** @returns {AuthenticationApiErrorSchema} */
608
- static AuthenticationApiErrorSchema() {
609
- return Joi.object({
610
- message: Joi.string().allow(""),
611
- });
612
- }
613
-
614
- /** @returns {AuthenticationInternalServerErrorSchema} */
615
- static AuthenticationInternalServerErrorSchema() {
616
- return Joi.object({
617
- message: Joi.string().allow(""),
618
- });
619
- }
620
-
621
- /** @returns {AuthSuccess} */
622
- static AuthSuccess() {
623
- return Joi.object({
624
- register_token: Joi.string().allow(""),
625
- user: UserApplicationModel.UserSchema(),
626
- user_exists: Joi.boolean(),
627
- });
628
- }
629
-
630
- /** @returns {CodeRequestBodySchema} */
631
- static CodeRequestBodySchema() {
632
- return Joi.object({
633
- code: Joi.string().allow(""),
634
- });
635
- }
636
-
637
- /** @returns {DeleteAccountConsent} */
638
- static DeleteAccountConsent() {
587
+
588
+ class UserApplicationModel {
589
+ /** @returns {UpdateUserAttributesRequest} */
590
+ static UpdateUserAttributesRequest() {
639
591
  return Joi.object({
640
- consent_text: Joi.string().allow(""),
592
+ attributes: Joi.any(),
641
593
  });
642
594
  }
643
595
 
644
- /** @returns {DeleteAccountReasons} */
645
- static DeleteAccountReasons() {
596
+ /** @returns {UserAttributes} */
597
+ static UserAttributes() {
646
598
  return Joi.object({
647
- reason_id: Joi.string().allow(""),
648
- reason_text: Joi.string().allow(""),
649
- show_text_area: Joi.boolean(),
599
+ attributes: Joi.any(),
650
600
  });
651
601
  }
652
602
 
653
603
  /** @returns {DeleteApplicationUserRequestSchema} */
654
604
  static DeleteApplicationUserRequestSchema() {
655
605
  return Joi.object({
656
- otp: Joi.string().allow(""),
606
+ user_id: Joi.string().allow(""),
657
607
  reason: Joi.string().allow(""),
658
608
  reason_id: Joi.string().allow(""),
659
609
  request_id: Joi.string().allow(""),
660
- user_id: Joi.string().allow(""),
661
- });
662
- }
663
-
664
- /** @returns {DeleteUserSuccess} */
665
- static DeleteUserSuccess() {
666
- return Joi.object({
667
- success: Joi.boolean(),
610
+ otp: Joi.string().allow(""),
668
611
  });
669
612
  }
670
613
 
@@ -675,16 +618,19 @@ class UserApplicationModel {
675
618
  });
676
619
  }
677
620
 
678
- /** @returns {EditMobileRequestSchema} */
679
- static EditMobileRequestSchema() {
621
+ /** @returns {SendVerificationLinkMobileRequestSchema} */
622
+ static SendVerificationLinkMobileRequestSchema() {
680
623
  return Joi.object({
624
+ verified: Joi.boolean(),
625
+ active: Joi.boolean(),
681
626
  country_code: Joi.string().allow(""),
682
627
  phone: Joi.string().allow(""),
628
+ primary: Joi.boolean(),
683
629
  });
684
630
  }
685
631
 
686
- /** @returns {EditProfileMobileSchema} */
687
- static EditProfileMobileSchema() {
632
+ /** @returns {EditMobileRequestSchema} */
633
+ static EditMobileRequestSchema() {
688
634
  return Joi.object({
689
635
  country_code: Joi.string().allow(""),
690
636
  phone: Joi.string().allow(""),
@@ -694,374 +640,396 @@ class UserApplicationModel {
694
640
  /** @returns {EditProfileRequestSchema} */
695
641
  static EditProfileRequestSchema() {
696
642
  return Joi.object({
697
- android_hash: Joi.string().allow(""),
698
- country_code: Joi.string().allow(""),
699
- dob: Joi.string().allow(""),
700
- email: Joi.string().allow(""),
701
643
  first_name: Joi.string().allow(""),
702
- gender: Joi.string().allow(""),
703
644
  last_name: Joi.string().allow(""),
704
645
  mobile: UserApplicationModel.EditProfileMobileSchema(),
646
+ country_code: Joi.string().allow(""),
647
+ email: Joi.string().allow(""),
648
+ gender: Joi.string().allow(""),
649
+ dob: Joi.string().allow(""),
705
650
  profile_pic_url: Joi.string().allow(""),
706
- register_token: Joi.string().allow(""),
651
+ android_hash: Joi.string().allow(""),
707
652
  sender: Joi.string().allow(""),
653
+ register_token: Joi.string().allow(""),
708
654
  });
709
655
  }
710
656
 
711
- /** @returns {Email} */
712
- static Email() {
657
+ /** @returns {EditProfileMobileSchema} */
658
+ static EditProfileMobileSchema() {
659
+ return Joi.object({
660
+ phone: Joi.string().allow(""),
661
+ country_code: Joi.string().allow(""),
662
+ });
663
+ }
664
+
665
+ /** @returns {SendEmailOtpRequestSchema} */
666
+ static SendEmailOtpRequestSchema() {
713
667
  return Joi.object({
714
- active: Joi.boolean(),
715
668
  email: Joi.string().allow(""),
716
- primary: Joi.boolean(),
717
- verified: Joi.boolean(),
669
+ action: Joi.string().allow(""),
670
+ token: Joi.string().allow(""),
671
+ register_token: Joi.string().allow(""),
718
672
  });
719
673
  }
720
674
 
721
- /** @returns {EmailOtpSuccess} */
722
- static EmailOtpSuccess() {
675
+ /** @returns {SendEmailForgotOtpRequestSchema} */
676
+ static SendEmailForgotOtpRequestSchema() {
723
677
  return Joi.object({
724
- success: Joi.boolean(),
678
+ email: Joi.string().allow(""),
679
+ action: Joi.string().allow(""),
680
+ token: Joi.string().allow(""),
725
681
  });
726
682
  }
727
683
 
728
- /** @returns {Facebook} */
729
- static Facebook() {
684
+ /** @returns {VerifyEmailOtpRequestSchema} */
685
+ static VerifyEmailOtpRequestSchema() {
730
686
  return Joi.object({
731
- app_id: Joi.string().allow(""),
687
+ email: Joi.string().allow(""),
688
+ action: Joi.string().allow(""),
689
+ register_token: Joi.string().allow(""),
690
+ otp: Joi.string().allow(""),
732
691
  });
733
692
  }
734
693
 
735
- /** @returns {FlashCard} */
736
- static FlashCard() {
694
+ /** @returns {VerifyEmailForgotOtpRequestSchema} */
695
+ static VerifyEmailForgotOtpRequestSchema() {
737
696
  return Joi.object({
738
- background_color: Joi.string().allow(""),
739
- text: Joi.string().allow(""),
740
- text_color: Joi.string().allow(""),
697
+ email: Joi.string().allow(""),
698
+ otp: Joi.string().allow(""),
741
699
  });
742
700
  }
743
701
 
744
- /** @returns {ForgotPasswordRequestSchema} */
745
- static ForgotPasswordRequestSchema() {
702
+ /** @returns {VerifyOtpRequestSchema} */
703
+ static VerifyOtpRequestSchema() {
746
704
  return Joi.object({
747
- code: Joi.string().allow(""),
748
- password: Joi.string().allow(""),
705
+ request_id: Joi.string().allow(""),
706
+ register_token: Joi.string().allow(""),
707
+ otp: Joi.string().allow(""),
708
+ });
709
+ }
710
+
711
+ /** @returns {VerifyMobileForgotOtpRequestSchema} */
712
+ static VerifyMobileForgotOtpRequestSchema() {
713
+ return Joi.object({
714
+ request_id: Joi.string().allow(""),
715
+ otp: Joi.string().allow(""),
716
+ });
717
+ }
718
+
719
+ /** @returns {SendMobileOtpRequestSchema} */
720
+ static SendMobileOtpRequestSchema() {
721
+ return Joi.object({
722
+ mobile: Joi.string().allow(""),
723
+ country_code: Joi.string().allow(""),
724
+ action: Joi.string().allow(""),
725
+ token: Joi.string().allow(""),
726
+ android_hash: Joi.string().allow(""),
727
+ force: Joi.string().allow(""),
728
+ });
729
+ }
730
+
731
+ /** @returns {SendMobileForgotOtpRequestSchema} */
732
+ static SendMobileForgotOtpRequestSchema() {
733
+ return Joi.object({
734
+ mobile: Joi.string().allow(""),
735
+ country_code: Joi.string().allow(""),
736
+ action: Joi.string().allow(""),
737
+ token: Joi.string().allow(""),
738
+ android_hash: Joi.string().allow(""),
739
+ });
740
+ }
741
+
742
+ /** @returns {UpdatePasswordRequestSchema} */
743
+ static UpdatePasswordRequestSchema() {
744
+ return Joi.object({
745
+ old_password: Joi.string().allow(""),
746
+ new_password: Joi.string().allow(""),
749
747
  });
750
748
  }
751
749
 
752
750
  /** @returns {FormRegisterRequestSchema} */
753
751
  static FormRegisterRequestSchema() {
754
752
  return Joi.object({
755
- email: Joi.string().allow(""),
756
753
  first_name: Joi.string().allow(""),
757
- gender: Joi.string().allow(""),
758
754
  last_name: Joi.string().allow(""),
755
+ gender: Joi.string().allow(""),
756
+ email: Joi.string().allow(""),
759
757
  password: Joi.string().allow(""),
760
758
  phone: UserApplicationModel.FormRegisterRequestSchemaPhone(),
761
759
  register_token: Joi.string().allow(""),
762
760
  });
763
761
  }
764
762
 
765
- /** @returns {FormRegisterRequestSchemaPhone} */
766
- static FormRegisterRequestSchemaPhone() {
763
+ /** @returns {TokenRequestBodySchema} */
764
+ static TokenRequestBodySchema() {
767
765
  return Joi.object({
768
- country_code: Joi.string().allow(""),
769
- mobile: Joi.string().allow(""),
766
+ token: Joi.string().allow(""),
770
767
  });
771
768
  }
772
769
 
773
- /** @returns {Google} */
774
- static Google() {
770
+ /** @returns {ForgotPasswordRequestSchema} */
771
+ static ForgotPasswordRequestSchema() {
775
772
  return Joi.object({
776
- app_id: Joi.string().allow(""),
773
+ code: Joi.string().allow(""),
774
+ password: Joi.string().allow(""),
777
775
  });
778
776
  }
779
777
 
780
- /** @returns {HasPasswordSuccess} */
781
- static HasPasswordSuccess() {
778
+ /** @returns {CodeRequestBodySchema} */
779
+ static CodeRequestBodySchema() {
782
780
  return Joi.object({
783
- result: Joi.boolean(),
781
+ code: Joi.string().allow(""),
784
782
  });
785
783
  }
786
784
 
787
- /** @returns {Login} */
788
- static Login() {
785
+ /** @returns {SendResetPasswordEmailRequestSchema} */
786
+ static SendResetPasswordEmailRequestSchema() {
789
787
  return Joi.object({
790
- otp: Joi.boolean(),
791
- password: Joi.boolean(),
788
+ email: Joi.string().allow(""),
792
789
  });
793
790
  }
794
791
 
795
- /** @returns {LoginSuccess} */
796
- static LoginSuccess() {
792
+ /** @returns {SendResetPasswordMobileRequestSchema} */
793
+ static SendResetPasswordMobileRequestSchema() {
797
794
  return Joi.object({
798
- register_token: Joi.string().allow(""),
799
- request_id: Joi.string().allow(""),
800
- user: UserApplicationModel.UserSchema(),
795
+ country_code: Joi.string().allow(""),
796
+ mobile: Joi.string().allow(""),
801
797
  });
802
798
  }
803
799
 
804
- /** @returns {LogoutSuccess} */
805
- static LogoutSuccess() {
800
+ /** @returns {PasswordLoginRequestSchema} */
801
+ static PasswordLoginRequestSchema() {
806
802
  return Joi.object({
807
- logout: Joi.boolean(),
803
+ password: Joi.string().allow(""),
804
+ username: Joi.string().allow(""),
808
805
  });
809
806
  }
810
807
 
811
- /** @returns {LookAndFeel} */
812
- static LookAndFeel() {
808
+ /** @returns {SendOtpRequestSchema} */
809
+ static SendOtpRequestSchema() {
813
810
  return Joi.object({
814
- background_color: Joi.string().allow(""),
815
- card_position: Joi.string().allow(""),
811
+ country_code: Joi.string().allow(""),
812
+ mobile: Joi.string().allow(""),
813
+ android_hash: Joi.string().allow(""),
816
814
  });
817
815
  }
818
816
 
819
- /** @returns {MetaSchema} */
820
- static MetaSchema() {
817
+ /** @returns {OAuthRequestSchema} */
818
+ static OAuthRequestSchema() {
821
819
  return Joi.object({
822
- fynd_default: Joi.boolean(),
820
+ is_signed_in: Joi.boolean(),
821
+ oauth2: UserApplicationModel.OAuthRequestSchemaOauth2(),
822
+ profile: UserApplicationModel.OAuthRequestSchemaProfile(),
823
823
  });
824
824
  }
825
825
 
826
826
  /** @returns {OAuthRequestAppleSchema} */
827
827
  static OAuthRequestAppleSchema() {
828
828
  return Joi.object({
829
+ user_identifier: Joi.string().allow(""),
829
830
  oauth: UserApplicationModel.OAuthRequestAppleSchemaOauth(),
830
831
  profile: UserApplicationModel.OAuthRequestAppleSchemaProfile(),
831
- user_identifier: Joi.string().allow(""),
832
- });
833
- }
834
-
835
- /** @returns {OAuthRequestAppleSchemaOauth} */
836
- static OAuthRequestAppleSchemaOauth() {
837
- return Joi.object({
838
- identity_token: Joi.string().allow(""),
839
832
  });
840
833
  }
841
834
 
842
- /** @returns {OAuthRequestAppleSchemaProfile} */
843
- static OAuthRequestAppleSchemaProfile() {
835
+ /** @returns {UserObjectSchema} */
836
+ static UserObjectSchema() {
844
837
  return Joi.object({
845
- first_name: Joi.string().allow(""),
846
- full_name: Joi.string().allow(""),
847
- last_name: Joi.string().allow(""),
838
+ user: UserApplicationModel.UserSchema(),
848
839
  });
849
840
  }
850
841
 
851
- /** @returns {OAuthRequestSchema} */
852
- static OAuthRequestSchema() {
842
+ /** @returns {AuthSuccess} */
843
+ static AuthSuccess() {
853
844
  return Joi.object({
854
- is_signed_in: Joi.boolean(),
855
- oauth2: UserApplicationModel.OAuthRequestSchemaOauth2(),
856
- profile: UserApplicationModel.OAuthRequestSchemaProfile(),
845
+ register_token: Joi.string().allow(""),
846
+ user_exists: Joi.boolean(),
847
+ user: UserApplicationModel.UserSchema(),
857
848
  });
858
849
  }
859
850
 
860
- /** @returns {OAuthRequestSchemaOauth2} */
861
- static OAuthRequestSchemaOauth2() {
851
+ /** @returns {UserExistsResponse} */
852
+ static UserExistsResponse() {
862
853
  return Joi.object({
863
- access_token: Joi.string().allow(""),
864
- expiry: Joi.number(),
865
- refresh_token: Joi.string().allow(""),
854
+ user_exists: Joi.boolean(),
866
855
  });
867
856
  }
868
857
 
869
- /** @returns {OAuthRequestSchemaProfile} */
870
- static OAuthRequestSchemaProfile() {
858
+ /** @returns {SendOtpResponse} */
859
+ static SendOtpResponse() {
871
860
  return Joi.object({
872
- email: Joi.string().allow(""),
873
- first_name: Joi.string().allow(""),
874
- full_name: Joi.string().allow(""),
875
- id: Joi.string().allow(""),
876
- image: Joi.string().allow(""),
877
- last_name: Joi.string().allow(""),
861
+ resend_timer: Joi.number(),
862
+ resend_token: Joi.string().allow(""),
863
+ success: Joi.boolean(),
864
+ request_id: Joi.string().allow(""),
865
+ message: Joi.string().allow(""),
866
+ mobile: Joi.string().allow(""),
867
+ country_code: Joi.string().allow(""),
868
+ email: Joi.string().allow(""),
869
+ resend_email_token: Joi.string().allow(""),
870
+ register_token: Joi.string().allow(""),
871
+ verify_email_otp: Joi.boolean(),
872
+ verify_mobile_otp: Joi.boolean(),
873
+ user_exists: Joi.boolean(),
878
874
  });
879
875
  }
880
876
 
881
- /** @returns {OtpSuccess} */
882
- static OtpSuccess() {
877
+ /** @returns {ProfileEditSuccess} */
878
+ static ProfileEditSuccess() {
883
879
  return Joi.object({
884
- country_code: Joi.string().allow(""),
885
- message: Joi.string().allow(""),
886
- mobile: Joi.string().allow(""),
880
+ user: UserApplicationModel.UserSchema(),
887
881
  register_token: Joi.string().allow(""),
882
+ resend_email_token: Joi.string().allow(""),
883
+ user_exists: Joi.boolean(),
884
+ verify_email_link: Joi.boolean(),
885
+ verify_email_otp: Joi.boolean(),
886
+ verify_mobile_otp: Joi.boolean(),
887
+ email: Joi.string().allow(""),
888
888
  request_id: Joi.string().allow(""),
889
+ country_code: Joi.string().allow(""),
890
+ mobile: Joi.string().allow(""),
891
+ success: Joi.boolean(),
892
+ message: Joi.string().allow(""),
889
893
  resend_timer: Joi.number(),
890
894
  resend_token: Joi.string().allow(""),
891
- success: Joi.boolean(),
892
895
  });
893
896
  }
894
897
 
895
- /** @returns {PasswordLoginRequestSchema} */
896
- static PasswordLoginRequestSchema() {
898
+ /** @returns {LoginSuccess} */
899
+ static LoginSuccess() {
897
900
  return Joi.object({
898
- password: Joi.string().allow(""),
899
- username: Joi.string().allow(""),
901
+ user: UserApplicationModel.UserSchema(),
902
+ request_id: Joi.string().allow(""),
903
+ register_token: Joi.string().allow(""),
900
904
  });
901
905
  }
902
906
 
903
- /** @returns {PhoneNumber} */
904
- static PhoneNumber() {
907
+ /** @returns {ResetForgotPasswordSuccess} */
908
+ static ResetForgotPasswordSuccess() {
905
909
  return Joi.object({
906
- active: Joi.boolean(),
907
- country_code: Joi.number(),
908
- phone: Joi.string().allow(""),
909
- primary: Joi.boolean(),
910
- verified: Joi.boolean(),
910
+ success: Joi.boolean(),
911
911
  });
912
912
  }
913
913
 
914
- /** @returns {PlatformEmail} */
915
- static PlatformEmail() {
914
+ /** @returns {VerifyOtpSuccess} */
915
+ static VerifyOtpSuccess() {
916
916
  return Joi.object({
917
- is_required: Joi.boolean(),
918
- level: Joi.string().allow(""),
917
+ user: UserApplicationModel.UserSchema(),
918
+ user_exists: Joi.boolean(),
919
+ register_token: Joi.string().allow(""),
919
920
  });
920
921
  }
921
922
 
922
- /** @returns {PlatformMobile} */
923
- static PlatformMobile() {
923
+ /** @returns {VerifyForgotOtpSuccess} */
924
+ static VerifyForgotOtpSuccess() {
924
925
  return Joi.object({
925
- is_required: Joi.boolean(),
926
- level: Joi.string().allow(""),
926
+ success: Joi.boolean(),
927
+ forgot_token: Joi.string().allow(""),
927
928
  });
928
929
  }
929
930
 
930
- /** @returns {PlatformSchema} */
931
- static PlatformSchema() {
931
+ /** @returns {ResetPasswordSuccess} */
932
+ static ResetPasswordSuccess() {
932
933
  return Joi.object({
933
- _id: Joi.string().allow(""),
934
- active: Joi.boolean(),
935
- created_at: Joi.string().allow(""),
936
- delete_account_consent: Joi.any(),
937
- delete_account_day: Joi.number(),
938
- delete_account_reasons: Joi.array().items(
939
- UserApplicationModel.DeleteAccountReasons()
940
- ),
941
- desktop_image: Joi.string().allow(""),
942
- display: Joi.string().allow(""),
943
- flash_card: UserApplicationModel.FlashCard(),
944
- forgot_password: Joi.boolean(),
945
- login: UserApplicationModel.Login(),
946
- look_and_feel: UserApplicationModel.LookAndFeel(),
947
- meta: UserApplicationModel.MetaSchema(),
948
- mobile_image: Joi.string().allow(""),
949
- name: Joi.string().allow(""),
950
- register: Joi.boolean(),
951
- register_required_fields: UserApplicationModel.RegisterRequiredFields(),
952
- required_fields: UserApplicationModel.RequiredFields(),
953
- session_config: Joi.any(),
954
- skip_captcha: Joi.boolean(),
955
- skip_login: Joi.boolean(),
956
- social: UserApplicationModel.Social(),
957
- social_tokens: UserApplicationModel.SocialTokens(),
958
- subtext: Joi.string().allow(""),
959
- updated_at: Joi.string().allow(""),
934
+ status: Joi.string().allow(""),
960
935
  });
961
936
  }
962
937
 
963
- /** @returns {ProfileEditSuccess} */
964
- static ProfileEditSuccess() {
938
+ /** @returns {RegisterFormSuccess} */
939
+ static RegisterFormSuccess() {
965
940
  return Joi.object({
966
- country_code: Joi.string().allow(""),
967
941
  email: Joi.string().allow(""),
968
- message: Joi.string().allow(""),
969
- mobile: Joi.string().allow(""),
970
- register_token: Joi.string().allow(""),
971
- request_id: Joi.string().allow(""),
972
- resend_email_token: Joi.string().allow(""),
973
942
  resend_timer: Joi.number(),
974
943
  resend_token: Joi.string().allow(""),
944
+ resend_email_token: Joi.string().allow(""),
945
+ register_token: Joi.string().allow(""),
975
946
  success: Joi.boolean(),
976
- user: UserApplicationModel.UserSchema(),
977
- user_exists: Joi.boolean(),
978
- verify_email_link: Joi.boolean(),
947
+ request_id: Joi.string().allow(""),
948
+ message: Joi.string().allow(""),
949
+ mobile: Joi.string().allow(""),
950
+ country_code: Joi.string().allow(""),
979
951
  verify_email_otp: Joi.boolean(),
980
952
  verify_mobile_otp: Joi.boolean(),
953
+ user_exists: Joi.boolean(),
981
954
  });
982
955
  }
983
956
 
984
- /** @returns {RegisterFormSuccess} */
985
- static RegisterFormSuccess() {
957
+ /** @returns {VerifyEmailSuccess} */
958
+ static VerifyEmailSuccess() {
986
959
  return Joi.object({
987
- country_code: Joi.string().allow(""),
988
- email: Joi.string().allow(""),
989
960
  message: Joi.string().allow(""),
990
- mobile: Joi.string().allow(""),
991
- register_token: Joi.string().allow(""),
992
- request_id: Joi.string().allow(""),
993
- resend_email_token: Joi.string().allow(""),
994
- resend_timer: Joi.number(),
995
- resend_token: Joi.string().allow(""),
996
- success: Joi.boolean(),
997
- user_exists: Joi.boolean(),
998
- verify_email_otp: Joi.boolean(),
999
- verify_mobile_otp: Joi.boolean(),
1000
961
  });
1001
962
  }
1002
963
 
1003
- /** @returns {RegisterRequiredFields} */
1004
- static RegisterRequiredFields() {
964
+ /** @returns {HasPasswordSuccess} */
965
+ static HasPasswordSuccess() {
1005
966
  return Joi.object({
1006
- email: UserApplicationModel.RegisterRequiredFieldsEmail(),
1007
- mobile: UserApplicationModel.RegisterRequiredFieldsMobile(),
967
+ result: Joi.boolean(),
1008
968
  });
1009
969
  }
1010
970
 
1011
- /** @returns {RegisterRequiredFieldsEmail} */
1012
- static RegisterRequiredFieldsEmail() {
971
+ /** @returns {LogoutSuccess} */
972
+ static LogoutSuccess() {
1013
973
  return Joi.object({
1014
- is_required: Joi.boolean(),
1015
- level: Joi.string().allow(""),
974
+ logout: Joi.boolean(),
1016
975
  });
1017
976
  }
1018
977
 
1019
- /** @returns {RegisterRequiredFieldsMobile} */
1020
- static RegisterRequiredFieldsMobile() {
978
+ /** @returns {DeleteUserSuccess} */
979
+ static DeleteUserSuccess() {
1021
980
  return Joi.object({
1022
- is_required: Joi.boolean(),
1023
- level: Joi.string().allow(""),
981
+ success: Joi.boolean(),
1024
982
  });
1025
983
  }
1026
984
 
1027
- /** @returns {RequiredFields} */
1028
- static RequiredFields() {
985
+ /** @returns {OtpSuccess} */
986
+ static OtpSuccess() {
1029
987
  return Joi.object({
1030
- email: UserApplicationModel.PlatformEmail(),
1031
- mobile: UserApplicationModel.PlatformMobile(),
988
+ resend_timer: Joi.number(),
989
+ resend_token: Joi.string().allow(""),
990
+ register_token: Joi.string().allow(""),
991
+ success: Joi.boolean(),
992
+ request_id: Joi.string().allow(""),
993
+ message: Joi.string().allow(""),
994
+ mobile: Joi.string().allow(""),
995
+ country_code: Joi.string().allow(""),
1032
996
  });
1033
997
  }
1034
998
 
1035
- /** @returns {ResetForgotPasswordSuccess} */
1036
- static ResetForgotPasswordSuccess() {
999
+ /** @returns {EmailOtpSuccess} */
1000
+ static EmailOtpSuccess() {
1037
1001
  return Joi.object({
1038
1002
  success: Joi.boolean(),
1039
1003
  });
1040
1004
  }
1041
1005
 
1042
- /** @returns {ResetPasswordSuccess} */
1043
- static ResetPasswordSuccess() {
1006
+ /** @returns {SessionListSuccess} */
1007
+ static SessionListSuccess() {
1044
1008
  return Joi.object({
1045
- status: Joi.string().allow(""),
1009
+ sessions: Joi.array().items(Joi.string().allow("")),
1046
1010
  });
1047
1011
  }
1048
1012
 
1049
- /** @returns {SendEmailForgotOtpRequestSchema} */
1050
- static SendEmailForgotOtpRequestSchema() {
1013
+ /** @returns {VerifyMobileOTPSuccess} */
1014
+ static VerifyMobileOTPSuccess() {
1051
1015
  return Joi.object({
1052
- action: Joi.string().allow(""),
1053
- email: Joi.string().allow(""),
1054
- token: Joi.string().allow(""),
1016
+ user: UserApplicationModel.UserSchema(),
1017
+ verify_mobile_link: Joi.boolean(),
1055
1018
  });
1056
1019
  }
1057
1020
 
1058
- /** @returns {SendEmailOtpRequestSchema} */
1059
- static SendEmailOtpRequestSchema() {
1021
+ /** @returns {VerifyEmailOTPSuccess} */
1022
+ static VerifyEmailOTPSuccess() {
1060
1023
  return Joi.object({
1061
- action: Joi.string().allow(""),
1062
- email: Joi.string().allow(""),
1063
- register_token: Joi.string().allow(""),
1064
- token: Joi.string().allow(""),
1024
+ user: UserApplicationModel.UserSchema(),
1025
+ verify_email_link: Joi.boolean(),
1026
+ });
1027
+ }
1028
+
1029
+ /** @returns {SendMobileVerifyLinkSuccess} */
1030
+ static SendMobileVerifyLinkSuccess() {
1031
+ return Joi.object({
1032
+ verify_mobile_link: Joi.boolean(),
1065
1033
  });
1066
1034
  }
1067
1035
 
@@ -1072,103 +1040,129 @@ class UserApplicationModel {
1072
1040
  });
1073
1041
  }
1074
1042
 
1075
- /** @returns {SendMobileForgotOtpRequestSchema} */
1076
- static SendMobileForgotOtpRequestSchema() {
1043
+ /** @returns {AuthenticationInternalServerErrorSchema} */
1044
+ static AuthenticationInternalServerErrorSchema() {
1077
1045
  return Joi.object({
1078
- action: Joi.string().allow(""),
1079
- android_hash: Joi.string().allow(""),
1080
- country_code: Joi.string().allow(""),
1081
- mobile: Joi.string().allow(""),
1082
- token: Joi.string().allow(""),
1046
+ message: Joi.string().allow(""),
1083
1047
  });
1084
1048
  }
1085
1049
 
1086
- /** @returns {SendMobileOtpRequestSchema} */
1087
- static SendMobileOtpRequestSchema() {
1050
+ /** @returns {AuthenticationApiErrorSchema} */
1051
+ static AuthenticationApiErrorSchema() {
1088
1052
  return Joi.object({
1089
- action: Joi.string().allow(""),
1090
- android_hash: Joi.string().allow(""),
1091
- country_code: Joi.string().allow(""),
1092
- force: Joi.string().allow(""),
1093
- mobile: Joi.string().allow(""),
1094
- token: Joi.string().allow(""),
1053
+ message: Joi.string().allow(""),
1095
1054
  });
1096
1055
  }
1097
1056
 
1098
- /** @returns {SendMobileVerifyLinkSuccess} */
1099
- static SendMobileVerifyLinkSuccess() {
1057
+ /** @returns {APIError} */
1058
+ static APIError() {
1100
1059
  return Joi.object({
1101
- verify_mobile_link: Joi.boolean(),
1060
+ code: Joi.string().allow(""),
1061
+ message: Joi.string().allow(""),
1062
+ info: Joi.string().allow(""),
1063
+ request_id: Joi.string().allow(""),
1064
+ meta: Joi.any(),
1102
1065
  });
1103
1066
  }
1104
1067
 
1105
- /** @returns {SendOtpRequestSchema} */
1106
- static SendOtpRequestSchema() {
1068
+ /** @returns {FormRegisterRequestSchemaPhone} */
1069
+ static FormRegisterRequestSchemaPhone() {
1107
1070
  return Joi.object({
1108
- android_hash: Joi.string().allow(""),
1109
1071
  country_code: Joi.string().allow(""),
1110
1072
  mobile: Joi.string().allow(""),
1111
1073
  });
1112
1074
  }
1113
1075
 
1114
- /** @returns {SendOtpResponse} */
1115
- static SendOtpResponse() {
1076
+ /** @returns {OAuthRequestSchemaOauth2} */
1077
+ static OAuthRequestSchemaOauth2() {
1078
+ return Joi.object({
1079
+ access_token: Joi.string().allow(""),
1080
+ expiry: Joi.number(),
1081
+ refresh_token: Joi.string().allow(""),
1082
+ });
1083
+ }
1084
+
1085
+ /** @returns {OAuthRequestSchemaProfile} */
1086
+ static OAuthRequestSchemaProfile() {
1087
+ return Joi.object({
1088
+ last_name: Joi.string().allow(""),
1089
+ image: Joi.string().allow(""),
1090
+ id: Joi.string().allow(""),
1091
+ email: Joi.string().allow(""),
1092
+ full_name: Joi.string().allow(""),
1093
+ first_name: Joi.string().allow(""),
1094
+ });
1095
+ }
1096
+
1097
+ /** @returns {OAuthRequestAppleSchemaOauth} */
1098
+ static OAuthRequestAppleSchemaOauth() {
1116
1099
  return Joi.object({
1117
- country_code: Joi.string().allow(""),
1118
- email: Joi.string().allow(""),
1119
- message: Joi.string().allow(""),
1120
- mobile: Joi.string().allow(""),
1121
- register_token: Joi.string().allow(""),
1122
- request_id: Joi.string().allow(""),
1123
- resend_email_token: Joi.string().allow(""),
1124
- resend_timer: Joi.number(),
1125
- resend_token: Joi.string().allow(""),
1126
- success: Joi.boolean(),
1127
- user_exists: Joi.boolean(),
1128
- verify_email_otp: Joi.boolean(),
1129
- verify_mobile_otp: Joi.boolean(),
1100
+ identity_token: Joi.string().allow(""),
1130
1101
  });
1131
1102
  }
1132
1103
 
1133
- /** @returns {SendResetPasswordEmailRequestSchema} */
1134
- static SendResetPasswordEmailRequestSchema() {
1104
+ /** @returns {OAuthRequestAppleSchemaProfile} */
1105
+ static OAuthRequestAppleSchemaProfile() {
1135
1106
  return Joi.object({
1136
- email: Joi.string().allow(""),
1107
+ last_name: Joi.string().allow(""),
1108
+ full_name: Joi.string().allow(""),
1109
+ first_name: Joi.string().allow(""),
1137
1110
  });
1138
1111
  }
1139
1112
 
1140
- /** @returns {SendResetPasswordMobileRequestSchema} */
1141
- static SendResetPasswordMobileRequestSchema() {
1113
+ /** @returns {PlatformSchema} */
1114
+ static PlatformSchema() {
1142
1115
  return Joi.object({
1143
- country_code: Joi.string().allow(""),
1144
- mobile: Joi.string().allow(""),
1116
+ display: Joi.string().allow(""),
1117
+ look_and_feel: UserApplicationModel.LookAndFeel(),
1118
+ updated_at: Joi.string().allow(""),
1119
+ active: Joi.boolean(),
1120
+ forgot_password: Joi.boolean(),
1121
+ login: UserApplicationModel.Login(),
1122
+ skip_captcha: Joi.boolean(),
1123
+ name: Joi.string().allow(""),
1124
+ meta: UserApplicationModel.MetaSchema(),
1125
+ _id: Joi.string().allow(""),
1126
+ social: UserApplicationModel.Social(),
1127
+ required_fields: UserApplicationModel.RequiredFields(),
1128
+ register_required_fields: UserApplicationModel.RegisterRequiredFields(),
1129
+ skip_login: Joi.boolean(),
1130
+ flash_card: UserApplicationModel.FlashCard(),
1131
+ subtext: Joi.string().allow(""),
1132
+ social_tokens: UserApplicationModel.SocialTokens(),
1133
+ created_at: Joi.string().allow(""),
1134
+ register: Joi.boolean(),
1135
+ mobile_image: Joi.string().allow(""),
1136
+ desktop_image: Joi.string().allow(""),
1137
+ delete_account_day: Joi.number(),
1138
+ delete_account_reasons: Joi.array().items(
1139
+ UserApplicationModel.DeleteAccountReasons()
1140
+ ),
1141
+ delete_account_consent: Joi.any(),
1142
+ session_config: Joi.any(),
1145
1143
  });
1146
1144
  }
1147
1145
 
1148
- /** @returns {SendVerificationLinkMobileRequestSchema} */
1149
- static SendVerificationLinkMobileRequestSchema() {
1146
+ /** @returns {LookAndFeel} */
1147
+ static LookAndFeel() {
1150
1148
  return Joi.object({
1151
- active: Joi.boolean(),
1152
- country_code: Joi.string().allow(""),
1153
- phone: Joi.string().allow(""),
1154
- primary: Joi.boolean(),
1155
- verified: Joi.boolean(),
1149
+ card_position: Joi.string().allow(""),
1150
+ background_color: Joi.string().allow(""),
1156
1151
  });
1157
1152
  }
1158
1153
 
1159
- /** @returns {SessionExpiry} */
1160
- static SessionExpiry() {
1154
+ /** @returns {Login} */
1155
+ static Login() {
1161
1156
  return Joi.object({
1162
- duration: Joi.number(),
1163
- is_rolling: Joi.boolean(),
1164
- type: Joi.string().allow(""),
1157
+ password: Joi.boolean(),
1158
+ otp: Joi.boolean(),
1165
1159
  });
1166
1160
  }
1167
1161
 
1168
- /** @returns {SessionListSuccess} */
1169
- static SessionListSuccess() {
1162
+ /** @returns {MetaSchema} */
1163
+ static MetaSchema() {
1170
1164
  return Joi.object({
1171
- sessions: Joi.array().items(Joi.string().allow("")),
1165
+ fynd_default: Joi.boolean(),
1172
1166
  });
1173
1167
  }
1174
1168
 
@@ -1176,158 +1170,164 @@ class UserApplicationModel {
1176
1170
  static Social() {
1177
1171
  return Joi.object({
1178
1172
  account_kit: Joi.boolean(),
1179
- apple: Joi.boolean(),
1180
1173
  facebook: Joi.boolean(),
1181
1174
  google: Joi.boolean(),
1175
+ apple: Joi.boolean(),
1182
1176
  });
1183
1177
  }
1184
1178
 
1185
- /** @returns {SocialTokens} */
1186
- static SocialTokens() {
1179
+ /** @returns {RequiredFields} */
1180
+ static RequiredFields() {
1187
1181
  return Joi.object({
1188
- account_kit: UserApplicationModel.Accountkit(),
1189
- facebook: UserApplicationModel.Facebook(),
1190
- google: UserApplicationModel.Google(),
1182
+ email: UserApplicationModel.PlatformEmail(),
1183
+ mobile: UserApplicationModel.PlatformMobile(),
1191
1184
  });
1192
1185
  }
1193
1186
 
1194
- /** @returns {TokenRequestBodySchema} */
1195
- static TokenRequestBodySchema() {
1187
+ /** @returns {PlatformEmail} */
1188
+ static PlatformEmail() {
1196
1189
  return Joi.object({
1197
- token: Joi.string().allow(""),
1190
+ is_required: Joi.boolean(),
1191
+ level: Joi.string().allow(""),
1198
1192
  });
1199
1193
  }
1200
1194
 
1201
- /** @returns {UpdatePasswordRequestSchema} */
1202
- static UpdatePasswordRequestSchema() {
1195
+ /** @returns {PlatformMobile} */
1196
+ static PlatformMobile() {
1203
1197
  return Joi.object({
1204
- new_password: Joi.string().allow(""),
1205
- old_password: Joi.string().allow(""),
1198
+ is_required: Joi.boolean(),
1199
+ level: Joi.string().allow(""),
1206
1200
  });
1207
1201
  }
1208
1202
 
1209
- /** @returns {UpdateUserAttributesRequest} */
1210
- static UpdateUserAttributesRequest() {
1203
+ /** @returns {RegisterRequiredFields} */
1204
+ static RegisterRequiredFields() {
1211
1205
  return Joi.object({
1212
- attributes: Joi.any(),
1206
+ email: UserApplicationModel.RegisterRequiredFieldsEmail(),
1207
+ mobile: UserApplicationModel.RegisterRequiredFieldsMobile(),
1213
1208
  });
1214
1209
  }
1215
1210
 
1216
- /** @returns {UserAttributes} */
1217
- static UserAttributes() {
1211
+ /** @returns {RegisterRequiredFieldsEmail} */
1212
+ static RegisterRequiredFieldsEmail() {
1218
1213
  return Joi.object({
1219
- attributes: Joi.any(),
1214
+ is_required: Joi.boolean(),
1215
+ level: Joi.string().allow(""),
1220
1216
  });
1221
1217
  }
1222
1218
 
1223
- /** @returns {UserExistsResponse} */
1224
- static UserExistsResponse() {
1219
+ /** @returns {RegisterRequiredFieldsMobile} */
1220
+ static RegisterRequiredFieldsMobile() {
1225
1221
  return Joi.object({
1226
- user_exists: Joi.boolean(),
1222
+ is_required: Joi.boolean(),
1223
+ level: Joi.string().allow(""),
1227
1224
  });
1228
1225
  }
1229
1226
 
1230
- /** @returns {UserObjectSchema} */
1231
- static UserObjectSchema() {
1227
+ /** @returns {FlashCard} */
1228
+ static FlashCard() {
1232
1229
  return Joi.object({
1233
- user: UserApplicationModel.UserSchema(),
1230
+ text: Joi.string().allow(""),
1231
+ text_color: Joi.string().allow(""),
1232
+ background_color: Joi.string().allow(""),
1234
1233
  });
1235
1234
  }
1236
1235
 
1237
- /** @returns {UserSchema} */
1238
- static UserSchema() {
1236
+ /** @returns {SocialTokens} */
1237
+ static SocialTokens() {
1239
1238
  return Joi.object({
1240
- _id: Joi.string().allow(""),
1241
- account_type: Joi.string().allow(""),
1242
- active: Joi.boolean(),
1243
- application_id: Joi.string().allow(""),
1244
- created_at: Joi.string().allow(""),
1245
- dob: Joi.string().allow(""),
1246
- emails: Joi.array().items(UserApplicationModel.Email()),
1247
- first_name: Joi.string().allow(""),
1248
- gender: Joi.string().allow(""),
1249
- last_name: Joi.string().allow(""),
1250
- meta: Joi.any(),
1251
- phone_numbers: Joi.array().items(UserApplicationModel.PhoneNumber()),
1252
- profile_pic_url: Joi.string().allow(""),
1253
- updated_at: Joi.string().allow(""),
1254
- user_id: Joi.string().allow(""),
1255
- username: Joi.string().allow(""),
1239
+ facebook: UserApplicationModel.Facebook(),
1240
+ account_kit: UserApplicationModel.Accountkit(),
1241
+ google: UserApplicationModel.Google(),
1256
1242
  });
1257
1243
  }
1258
1244
 
1259
- /** @returns {VerifyEmailForgotOtpRequestSchema} */
1260
- static VerifyEmailForgotOtpRequestSchema() {
1245
+ /** @returns {DeleteAccountReasons} */
1246
+ static DeleteAccountReasons() {
1261
1247
  return Joi.object({
1262
- email: Joi.string().allow(""),
1263
- otp: Joi.string().allow(""),
1248
+ reason_text: Joi.string().allow(""),
1249
+ reason_id: Joi.string().allow(""),
1250
+ show_text_area: Joi.boolean(),
1264
1251
  });
1265
1252
  }
1266
1253
 
1267
- /** @returns {VerifyEmailOtpRequestSchema} */
1268
- static VerifyEmailOtpRequestSchema() {
1254
+ /** @returns {DeleteAccountConsent} */
1255
+ static DeleteAccountConsent() {
1269
1256
  return Joi.object({
1270
- action: Joi.string().allow(""),
1271
- email: Joi.string().allow(""),
1272
- otp: Joi.string().allow(""),
1273
- register_token: Joi.string().allow(""),
1257
+ consent_text: Joi.string().allow(""),
1274
1258
  });
1275
1259
  }
1276
1260
 
1277
- /** @returns {VerifyEmailOTPSuccess} */
1278
- static VerifyEmailOTPSuccess() {
1261
+ /** @returns {Facebook} */
1262
+ static Facebook() {
1279
1263
  return Joi.object({
1280
- user: UserApplicationModel.UserSchema(),
1281
- verify_email_link: Joi.boolean(),
1264
+ app_id: Joi.string().allow(""),
1282
1265
  });
1283
1266
  }
1284
1267
 
1285
- /** @returns {VerifyEmailSuccess} */
1286
- static VerifyEmailSuccess() {
1268
+ /** @returns {Accountkit} */
1269
+ static Accountkit() {
1287
1270
  return Joi.object({
1288
- message: Joi.string().allow(""),
1271
+ app_id: Joi.string().allow(""),
1289
1272
  });
1290
1273
  }
1291
1274
 
1292
- /** @returns {VerifyForgotOtpSuccess} */
1293
- static VerifyForgotOtpSuccess() {
1275
+ /** @returns {Google} */
1276
+ static Google() {
1294
1277
  return Joi.object({
1295
- forgot_token: Joi.string().allow(""),
1296
- success: Joi.boolean(),
1278
+ app_id: Joi.string().allow(""),
1297
1279
  });
1298
1280
  }
1299
1281
 
1300
- /** @returns {VerifyMobileForgotOtpRequestSchema} */
1301
- static VerifyMobileForgotOtpRequestSchema() {
1282
+ /** @returns {SessionExpiry} */
1283
+ static SessionExpiry() {
1302
1284
  return Joi.object({
1303
- otp: Joi.string().allow(""),
1304
- request_id: Joi.string().allow(""),
1285
+ duration: Joi.number(),
1286
+ type: Joi.string().allow(""),
1287
+ is_rolling: Joi.boolean(),
1305
1288
  });
1306
1289
  }
1307
1290
 
1308
- /** @returns {VerifyMobileOTPSuccess} */
1309
- static VerifyMobileOTPSuccess() {
1291
+ /** @returns {UserSchema} */
1292
+ static UserSchema() {
1310
1293
  return Joi.object({
1311
- user: UserApplicationModel.UserSchema(),
1312
- verify_mobile_link: Joi.boolean(),
1294
+ application_id: Joi.string().allow(""),
1295
+ user_id: Joi.string().allow(""),
1296
+ first_name: Joi.string().allow(""),
1297
+ meta: Joi.any(),
1298
+ last_name: Joi.string().allow(""),
1299
+ phone_numbers: Joi.array().items(UserApplicationModel.PhoneNumber()),
1300
+ emails: Joi.array().items(UserApplicationModel.Email()),
1301
+ gender: Joi.string().allow(""),
1302
+ dob: Joi.string().allow(""),
1303
+ active: Joi.boolean(),
1304
+ profile_pic_url: Joi.string().allow(""),
1305
+ username: Joi.string().allow(""),
1306
+ account_type: Joi.string().allow(""),
1307
+ _id: Joi.string().allow(""),
1308
+ created_at: Joi.string().allow(""),
1309
+ updated_at: Joi.string().allow(""),
1313
1310
  });
1314
1311
  }
1315
1312
 
1316
- /** @returns {VerifyOtpRequestSchema} */
1317
- static VerifyOtpRequestSchema() {
1313
+ /** @returns {PhoneNumber} */
1314
+ static PhoneNumber() {
1318
1315
  return Joi.object({
1319
- otp: Joi.string().allow(""),
1320
- register_token: Joi.string().allow(""),
1321
- request_id: Joi.string().allow(""),
1316
+ active: Joi.boolean(),
1317
+ primary: Joi.boolean(),
1318
+ verified: Joi.boolean(),
1319
+ phone: Joi.string().allow(""),
1320
+ country_code: Joi.number(),
1322
1321
  });
1323
1322
  }
1324
1323
 
1325
- /** @returns {VerifyOtpSuccess} */
1326
- static VerifyOtpSuccess() {
1324
+ /** @returns {Email} */
1325
+ static Email() {
1327
1326
  return Joi.object({
1328
- register_token: Joi.string().allow(""),
1329
- user: UserApplicationModel.UserSchema(),
1330
- user_exists: Joi.boolean(),
1327
+ primary: Joi.boolean(),
1328
+ verified: Joi.boolean(),
1329
+ email: Joi.string().allow(""),
1330
+ active: Joi.boolean(),
1331
1331
  });
1332
1332
  }
1333
1333
  }