@gofynd/fdk-client-javascript 1.4.2-beta.2 → 1.4.2-beta.4

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