@blezgo/api-sdk 0.1.0

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 (175) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +27 -0
  3. package/dist/account/client.d.ts +3 -0
  4. package/dist/account/client.d.ts.map +1 -0
  5. package/dist/account/client.js +3 -0
  6. package/dist/account/client.js.map +1 -0
  7. package/dist/account/generated.d.ts +2648 -0
  8. package/dist/account/generated.d.ts.map +1 -0
  9. package/dist/account/generated.js +6 -0
  10. package/dist/account/generated.js.map +1 -0
  11. package/dist/account/index.d.ts +2 -0
  12. package/dist/account/index.d.ts.map +1 -0
  13. package/dist/account/index.js +2 -0
  14. package/dist/account/index.js.map +1 -0
  15. package/dist/admin/client.d.ts +3 -0
  16. package/dist/admin/client.d.ts.map +1 -0
  17. package/dist/admin/client.js +3 -0
  18. package/dist/admin/client.js.map +1 -0
  19. package/dist/admin/generated.d.ts +956 -0
  20. package/dist/admin/generated.d.ts.map +1 -0
  21. package/dist/admin/generated.js +6 -0
  22. package/dist/admin/generated.js.map +1 -0
  23. package/dist/admin/index.d.ts +2 -0
  24. package/dist/admin/index.d.ts.map +1 -0
  25. package/dist/admin/index.js +2 -0
  26. package/dist/admin/index.js.map +1 -0
  27. package/dist/authentication/client.d.ts +3 -0
  28. package/dist/authentication/client.d.ts.map +1 -0
  29. package/dist/authentication/client.js +3 -0
  30. package/dist/authentication/client.js.map +1 -0
  31. package/dist/authentication/generated.d.ts +746 -0
  32. package/dist/authentication/generated.d.ts.map +1 -0
  33. package/dist/authentication/generated.js +6 -0
  34. package/dist/authentication/generated.js.map +1 -0
  35. package/dist/authentication/index.d.ts +2 -0
  36. package/dist/authentication/index.d.ts.map +1 -0
  37. package/dist/authentication/index.js +2 -0
  38. package/dist/authentication/index.js.map +1 -0
  39. package/dist/cache/client.d.ts +3 -0
  40. package/dist/cache/client.d.ts.map +1 -0
  41. package/dist/cache/client.js +3 -0
  42. package/dist/cache/client.js.map +1 -0
  43. package/dist/cache/generated.d.ts +3355 -0
  44. package/dist/cache/generated.d.ts.map +1 -0
  45. package/dist/cache/generated.js +6 -0
  46. package/dist/cache/generated.js.map +1 -0
  47. package/dist/cache/index.d.ts +2 -0
  48. package/dist/cache/index.d.ts.map +1 -0
  49. package/dist/cache/index.js +2 -0
  50. package/dist/cache/index.js.map +1 -0
  51. package/dist/config/client.d.ts +3 -0
  52. package/dist/config/client.d.ts.map +1 -0
  53. package/dist/config/client.js +3 -0
  54. package/dist/config/client.js.map +1 -0
  55. package/dist/config/generated.d.ts +1150 -0
  56. package/dist/config/generated.d.ts.map +1 -0
  57. package/dist/config/generated.js +6 -0
  58. package/dist/config/generated.js.map +1 -0
  59. package/dist/config/index.d.ts +2 -0
  60. package/dist/config/index.d.ts.map +1 -0
  61. package/dist/config/index.js +2 -0
  62. package/dist/config/index.js.map +1 -0
  63. package/dist/dashboard/client.d.ts +3 -0
  64. package/dist/dashboard/client.d.ts.map +1 -0
  65. package/dist/dashboard/client.js +3 -0
  66. package/dist/dashboard/client.js.map +1 -0
  67. package/dist/dashboard/generated.d.ts +4831 -0
  68. package/dist/dashboard/generated.d.ts.map +1 -0
  69. package/dist/dashboard/generated.js +6 -0
  70. package/dist/dashboard/generated.js.map +1 -0
  71. package/dist/dashboard/index.d.ts +2 -0
  72. package/dist/dashboard/index.d.ts.map +1 -0
  73. package/dist/dashboard/index.js +2 -0
  74. package/dist/dashboard/index.js.map +1 -0
  75. package/dist/errors/client.d.ts +3 -0
  76. package/dist/errors/client.d.ts.map +1 -0
  77. package/dist/errors/client.js +3 -0
  78. package/dist/errors/client.js.map +1 -0
  79. package/dist/errors/generated.d.ts +340 -0
  80. package/dist/errors/generated.d.ts.map +1 -0
  81. package/dist/errors/generated.js +6 -0
  82. package/dist/errors/generated.js.map +1 -0
  83. package/dist/errors/index.d.ts +2 -0
  84. package/dist/errors/index.d.ts.map +1 -0
  85. package/dist/errors/index.js +2 -0
  86. package/dist/errors/index.js.map +1 -0
  87. package/dist/index.d.ts +15 -0
  88. package/dist/index.d.ts.map +1 -0
  89. package/dist/index.js +19 -0
  90. package/dist/index.js.map +1 -0
  91. package/dist/internationalization/client.d.ts +3 -0
  92. package/dist/internationalization/client.d.ts.map +1 -0
  93. package/dist/internationalization/client.js +3 -0
  94. package/dist/internationalization/client.js.map +1 -0
  95. package/dist/internationalization/generated.d.ts +587 -0
  96. package/dist/internationalization/generated.d.ts.map +1 -0
  97. package/dist/internationalization/generated.js +6 -0
  98. package/dist/internationalization/generated.js.map +1 -0
  99. package/dist/internationalization/index.d.ts +2 -0
  100. package/dist/internationalization/index.d.ts.map +1 -0
  101. package/dist/internationalization/index.js +2 -0
  102. package/dist/internationalization/index.js.map +1 -0
  103. package/dist/invitations/client.d.ts +3 -0
  104. package/dist/invitations/client.d.ts.map +1 -0
  105. package/dist/invitations/client.js +3 -0
  106. package/dist/invitations/client.js.map +1 -0
  107. package/dist/invitations/generated.d.ts +4019 -0
  108. package/dist/invitations/generated.d.ts.map +1 -0
  109. package/dist/invitations/generated.js +6 -0
  110. package/dist/invitations/generated.js.map +1 -0
  111. package/dist/invitations/index.d.ts +2 -0
  112. package/dist/invitations/index.d.ts.map +1 -0
  113. package/dist/invitations/index.js +2 -0
  114. package/dist/invitations/index.js.map +1 -0
  115. package/dist/registration/client.d.ts +3 -0
  116. package/dist/registration/client.d.ts.map +1 -0
  117. package/dist/registration/client.js +3 -0
  118. package/dist/registration/client.js.map +1 -0
  119. package/dist/registration/generated.d.ts +1010 -0
  120. package/dist/registration/generated.d.ts.map +1 -0
  121. package/dist/registration/generated.js +6 -0
  122. package/dist/registration/generated.js.map +1 -0
  123. package/dist/registration/index.d.ts +2 -0
  124. package/dist/registration/index.d.ts.map +1 -0
  125. package/dist/registration/index.js +2 -0
  126. package/dist/registration/index.js.map +1 -0
  127. package/dist/role/client.d.ts +3 -0
  128. package/dist/role/client.d.ts.map +1 -0
  129. package/dist/role/client.js +3 -0
  130. package/dist/role/client.js.map +1 -0
  131. package/dist/role/generated.d.ts +6324 -0
  132. package/dist/role/generated.d.ts.map +1 -0
  133. package/dist/role/generated.js +6 -0
  134. package/dist/role/generated.js.map +1 -0
  135. package/dist/role/index.d.ts +2 -0
  136. package/dist/role/index.d.ts.map +1 -0
  137. package/dist/role/index.js +2 -0
  138. package/dist/role/index.js.map +1 -0
  139. package/dist/tenant/client.d.ts +3 -0
  140. package/dist/tenant/client.d.ts.map +1 -0
  141. package/dist/tenant/client.js +3 -0
  142. package/dist/tenant/client.js.map +1 -0
  143. package/dist/tenant/generated.d.ts +8273 -0
  144. package/dist/tenant/generated.d.ts.map +1 -0
  145. package/dist/tenant/generated.js +6 -0
  146. package/dist/tenant/generated.js.map +1 -0
  147. package/dist/tenant/index.d.ts +2 -0
  148. package/dist/tenant/index.d.ts.map +1 -0
  149. package/dist/tenant/index.js +2 -0
  150. package/dist/tenant/index.js.map +1 -0
  151. package/dist/tokens/client.d.ts +3 -0
  152. package/dist/tokens/client.d.ts.map +1 -0
  153. package/dist/tokens/client.js +3 -0
  154. package/dist/tokens/client.js.map +1 -0
  155. package/dist/tokens/generated.d.ts +528 -0
  156. package/dist/tokens/generated.d.ts.map +1 -0
  157. package/dist/tokens/generated.js +6 -0
  158. package/dist/tokens/generated.js.map +1 -0
  159. package/dist/tokens/index.d.ts +2 -0
  160. package/dist/tokens/index.d.ts.map +1 -0
  161. package/dist/tokens/index.js +2 -0
  162. package/dist/tokens/index.js.map +1 -0
  163. package/dist/user/client.d.ts +3 -0
  164. package/dist/user/client.d.ts.map +1 -0
  165. package/dist/user/client.js +3 -0
  166. package/dist/user/client.js.map +1 -0
  167. package/dist/user/generated.d.ts +4350 -0
  168. package/dist/user/generated.d.ts.map +1 -0
  169. package/dist/user/generated.js +6 -0
  170. package/dist/user/generated.js.map +1 -0
  171. package/dist/user/index.d.ts +2 -0
  172. package/dist/user/index.d.ts.map +1 -0
  173. package/dist/user/index.js +2 -0
  174. package/dist/user/index.js.map +1 -0
  175. package/package.json +39 -0
@@ -0,0 +1,2648 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ "/v1/me": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ /**
14
+ * Get Me
15
+ * @description Get the authenticated user's identity and access layer.
16
+ *
17
+ * Returns profile data from auth service (cached) combined with
18
+ * the resolved permission set from core's RBAC system.
19
+ *
20
+ * **Authentication**: Required (JWT Bearer token)
21
+ */
22
+ get: operations["getMe"];
23
+ put?: never;
24
+ post?: never;
25
+ delete?: never;
26
+ options?: never;
27
+ head?: never;
28
+ /**
29
+ * Patch Me
30
+ * @description Partial update for the authenticated user's profile.
31
+ *
32
+ * Dispatches to the correct operation based on which fields are present:
33
+ *
34
+ * **Change username** — supply `username` (+ `password`, optional `mfa_code`):
35
+ * ```json
36
+ * { "username": "john_doe_2026", "password": "CurrentPass123!" }
37
+ * ```
38
+ *
39
+ * **Deactivate account** — supply `status: "inactive"` (+ `password`, `confirm: true`):
40
+ * ```json
41
+ * { "status": "inactive", "password": "CurrentPass123!", "confirm": true, "reason": "Taking a break" }
42
+ * ```
43
+ *
44
+ * **Reactivate account** — supply `status: "active"` (+ `reactivation_token`):
45
+ * ```json
46
+ * { "status": "active", "reactivation_token": "eyJ..." }
47
+ * ```
48
+ *
49
+ * **Authentication**: Required (JWT)
50
+ * **Rate Limit**: 5 requests per hour
51
+ */
52
+ patch: operations["patchMe"];
53
+ trace?: never;
54
+ };
55
+ "/v1/auth/password-resets": {
56
+ parameters: {
57
+ query?: never;
58
+ header?: never;
59
+ path?: never;
60
+ cookie?: never;
61
+ };
62
+ get?: never;
63
+ put?: never;
64
+ /**
65
+ * Create Password Reset
66
+ * @description Request password reset for forgotten password.
67
+ *
68
+ * **Authentication**: None (public endpoint)
69
+ * **Rate Limit**: 12 requests per hour (3 per 15 minutes)
70
+ *
71
+ * ## Request Body Examples:
72
+ *
73
+ * ### Reset via Email:
74
+ * ```json
75
+ * {
76
+ * "email": "john.doe@example.com",
77
+ * "space_id": "spc_abc123xyz"
78
+ * }
79
+ * ```
80
+ *
81
+ * ### Reset via Mobile (OTP):
82
+ * ```json
83
+ * {
84
+ * "mobile_isd_code": "+1",
85
+ * "mobile_no": "5551234567",
86
+ * "space_id": "spc_abc123xyz"
87
+ * }
88
+ * ```
89
+ *
90
+ * ## Required Fields:
91
+ * - **Identifier**: Either `email` or (`mobile_isd_code` + `mobile_no`)
92
+ * - **Space**: `space_id` (external ID format: `spc_xxx`)
93
+ *
94
+ * ## Response:
95
+ * Always returns success message for security (prevents email enumeration).
96
+ * - **Email method**: Sends reset link to email (valid for 30 minutes)
97
+ * - **Mobile method**: Sends OTP code via SMS (valid for 5 minutes)
98
+ *
99
+ * ## Security Features:
100
+ * - Single-use reset tokens
101
+ * - Token expiry enforcement
102
+ * - Rate limiting to prevent abuse
103
+ * - Does not reveal if email/mobile exists
104
+ *
105
+ * **Reference**: See `docs/AUTH_CONFIG_EXAMPLES.md` for configuration details.
106
+ */
107
+ post: operations["createPasswordReset"];
108
+ delete?: never;
109
+ options?: never;
110
+ head?: never;
111
+ patch?: never;
112
+ trace?: never;
113
+ };
114
+ "/v1/auth/password-resets/{reset_id}/confirm": {
115
+ parameters: {
116
+ query?: never;
117
+ header?: never;
118
+ path?: never;
119
+ cookie?: never;
120
+ };
121
+ get?: never;
122
+ put?: never;
123
+ /**
124
+ * Confirm Password Reset
125
+ * @description Confirm password reset using reset token or OTP.
126
+ *
127
+ * **Authentication**: None (uses reset token or OTP)
128
+ * **Rate Limit**: 5 requests per minute
129
+ *
130
+ * ## Request Body Examples:
131
+ *
132
+ * ### Reset with Token (Email Link):
133
+ * ```json
134
+ * {
135
+ * "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
136
+ * "new_password": "NewSecurePass123!",
137
+ * "confirm_password": "NewSecurePass123!"
138
+ * }
139
+ * ```
140
+ *
141
+ * ### Reset with OTP (Mobile):
142
+ * ```json
143
+ * {
144
+ * "mobile_isd_code": "+1",
145
+ * "mobile_no": "5551234567",
146
+ * "otp": "123456",
147
+ * "new_password": "NewSecurePass123!",
148
+ * "confirm_password": "NewSecurePass123!"
149
+ * }
150
+ * ```
151
+ *
152
+ * ## Required Fields:
153
+ * - **Authentication**: Either `token` OR (`mobile_isd_code` + `mobile_no` + `otp`)
154
+ * - **Password**: `new_password`, `confirm_password`
155
+ *
156
+ * ## Password Requirements:
157
+ * - Minimum 8 characters
158
+ * - At least one uppercase letter
159
+ * - At least one number
160
+ * - At least one special character
161
+ * - Must match `confirm_password`
162
+ *
163
+ * ## Response:
164
+ * Returns success confirmation after password is reset.
165
+ * User will need to log in with new password.
166
+ *
167
+ * ## Error Cases:
168
+ * - Token expired or invalid
169
+ * - OTP incorrect or expired
170
+ * - Password does not meet requirements
171
+ * - Passwords do not match
172
+ *
173
+ * **Reference**: See `docs/AUTH_CONFIG_EXAMPLES.md` for password policy configuration.
174
+ */
175
+ post: operations["confirmPasswordReset"];
176
+ delete?: never;
177
+ options?: never;
178
+ head?: never;
179
+ patch?: never;
180
+ trace?: never;
181
+ };
182
+ "/v1/me/sessions": {
183
+ parameters: {
184
+ query?: never;
185
+ header?: never;
186
+ path?: never;
187
+ cookie?: never;
188
+ };
189
+ /**
190
+ * Get User Sessions
191
+ * @description Get all active sessions for the current logged-in user.
192
+ *
193
+ * **For**: Authenticated users
194
+ * **Purpose**: View all devices where you're currently logged in
195
+ *
196
+ * **Example Response**:
197
+ * ```json
198
+ * {
199
+ * "sessions": [
200
+ * {
201
+ * "session_id": 12345,
202
+ * "device_name": "Chrome on Windows",
203
+ * "browser": "Chrome 120",
204
+ * "os": "Windows 11",
205
+ * "client_ip": "192.168.1.100",
206
+ * "location": "San Francisco, US",
207
+ * "created_at": "2025-01-15T10:30:00Z",
208
+ * "last_used_at": "2025-01-27T14:22:00Z",
209
+ * "expires_at": "2025-02-26T10:30:00Z",
210
+ * "is_current": true
211
+ * }
212
+ * ],
213
+ * "total_sessions": 1,
214
+ * "active_sessions": 1
215
+ * }
216
+ * ```
217
+ *
218
+ * **Note**: `session_id` is a temporary integer identifier — will be replaced with a
219
+ * string external ID (sess_xxx) once the session table gains an external_id column.
220
+ *
221
+ * **Authentication**: JWT token required
222
+ * **Headers**: Authorization: Bearer <access_token>
223
+ * **Cookies**: refresh_token HttpOnly cookie is used only to mark the current session
224
+ * **Rate Limit**: 20 requests per minute
225
+ *
226
+ * **Use Cases**:
227
+ * - View all devices where you're logged in
228
+ * - Identify suspicious sessions
229
+ * - Check last activity on each device
230
+ */
231
+ get: operations["getUserSessions"];
232
+ put?: never;
233
+ post?: never;
234
+ /**
235
+ * Delete All User Sessions
236
+ * @description Logout from all other sessions or all sessions.
237
+ *
238
+ * **For**: Authenticated users
239
+ * **Purpose**: Mass logout for security or cleanup
240
+ *
241
+ * **Query Parameters**:
242
+ * - all (boolean, default: false):
243
+ * - false: Logout from all OTHER sessions (keep current session active)
244
+ * - true: Logout from ALL sessions including current (force re-login everywhere)
245
+ *
246
+ * **Example Response**:
247
+ * ```json
248
+ * {
249
+ * "revoked_count": 3,
250
+ * "current_session_revoked": false
251
+ * }
252
+ * ```
253
+ *
254
+ * **Authentication**: JWT token required
255
+ * **Headers**: Authorization: Bearer <access_token>
256
+ * **Cookies**: refresh_token HttpOnly cookie is required when all=false
257
+ * **Rate Limit**: 5 requests per minute
258
+ *
259
+ * **Use Cases**:
260
+ * - "I'm on my laptop, logout from all other devices"
261
+ * - "I think my account was compromised, logout everywhere"
262
+ * - "Cleanup old sessions from devices I no longer use"
263
+ */
264
+ delete: operations["deleteAllUserSessions"];
265
+ options?: never;
266
+ head?: never;
267
+ patch?: never;
268
+ trace?: never;
269
+ };
270
+ "/v1/me/sessions/{session_id}": {
271
+ parameters: {
272
+ query?: never;
273
+ header?: never;
274
+ path?: never;
275
+ cookie?: never;
276
+ };
277
+ get?: never;
278
+ put?: never;
279
+ post?: never;
280
+ /**
281
+ * Delete User Session
282
+ * @description Logout from a specific device/session.
283
+ *
284
+ * **For**: Authenticated users
285
+ * **Purpose**: Remove access from a specific device (e.g., logout from old phone)
286
+ *
287
+ * **Path Parameters**:
288
+ * - session_id: The ID of the session to delete
289
+ *
290
+ * **Example Response**:
291
+ * ```json
292
+ * {
293
+ * "session_id": 12340,
294
+ * "device_name": "Safari on macOS",
295
+ * "revoked_at": "2025-01-27T15:30:00Z"
296
+ * }
297
+ * ```
298
+ *
299
+ * **Note**: `session_id` is a temporary integer — will change to sess_xxx once
300
+ * the session table gains an external_id column.
301
+ *
302
+ * **Authentication**: JWT token required
303
+ * **Headers**: Authorization: Bearer <access_token>
304
+ * **Rate Limit**: 10 requests per minute
305
+ *
306
+ * **Use Cases**:
307
+ * - "I sold my old phone, remove that session"
308
+ * - "I see a suspicious login from London, terminate it"
309
+ * - "Logout from my work laptop"
310
+ */
311
+ delete: operations["deleteUserSession"];
312
+ options?: never;
313
+ head?: never;
314
+ patch?: never;
315
+ trace?: never;
316
+ };
317
+ "/v1/me/password": {
318
+ parameters: {
319
+ query?: never;
320
+ header?: never;
321
+ path?: never;
322
+ cookie?: never;
323
+ };
324
+ get?: never;
325
+ put?: never;
326
+ post?: never;
327
+ delete?: never;
328
+ options?: never;
329
+ head?: never;
330
+ /**
331
+ * Change Password
332
+ * @description Change password for the authenticated user.
333
+ *
334
+ * **Authentication**: Required (JWT Bearer token)
335
+ * **Rate Limit**: 5 requests per minute
336
+ */
337
+ patch: operations["changePassword"];
338
+ trace?: never;
339
+ };
340
+ "/v1/me/social-connections": {
341
+ parameters: {
342
+ query?: never;
343
+ header?: never;
344
+ path?: never;
345
+ cookie?: never;
346
+ };
347
+ get?: never;
348
+ put?: never;
349
+ /**
350
+ * Link Social Account
351
+ * @description Link a social provider to existing authenticated account.
352
+ *
353
+ * **For**: Authenticated users
354
+ * **Purpose**: Add social login method to existing account
355
+ *
356
+ * **Example Request Body**:
357
+ * ```json
358
+ * {
359
+ * "provider": "facebook",
360
+ * "authorization_code": "AQD...",
361
+ * "redirect_uri": "https://yourdomain.com/auth/callback/facebook"
362
+ * }
363
+ * ```
364
+ *
365
+ * **Supported Providers**: google, facebook, linkedin, x, apple
366
+ * **Required Fields**: provider, authorization_code, redirect_uri
367
+ * **Rate Limit**: 5 requests per minute
368
+ * **Authentication**: JWT token required
369
+ * **Headers**: Authorization: Bearer <token>
370
+ *
371
+ * **Use Case**: User registered with email/password, now wants to enable Google login
372
+ */
373
+ post: operations["linkSocialAccount"];
374
+ delete?: never;
375
+ options?: never;
376
+ head?: never;
377
+ patch?: never;
378
+ trace?: never;
379
+ };
380
+ "/v1/me/social-connections/{provider}": {
381
+ parameters: {
382
+ query?: never;
383
+ header?: never;
384
+ path?: never;
385
+ cookie?: never;
386
+ };
387
+ get?: never;
388
+ put?: never;
389
+ post?: never;
390
+ /**
391
+ * Unlink Social Account
392
+ * @description Remove a social provider from authenticated account.
393
+ *
394
+ * **For**: Authenticated users
395
+ * **Purpose**: Remove social login method
396
+ *
397
+ * **Validation**: User must have password OR another linked provider
398
+ * **Rate Limit**: 5 requests per minute
399
+ * **Authentication**: JWT token required
400
+ * **Headers**: Authorization: Bearer <token>
401
+ *
402
+ * **Example**:
403
+ * ```bash
404
+ * curl -X DELETE https://api.yourdomain.com/v1/me/social-connections/google -H "Authorization: Bearer YOUR_JWT_TOKEN"
405
+ * ```
406
+ *
407
+ * **Error**: Returns 400 if trying to remove last login method
408
+ */
409
+ delete: operations["unlinkSocialAccount"];
410
+ options?: never;
411
+ head?: never;
412
+ patch?: never;
413
+ trace?: never;
414
+ };
415
+ "/v1/me/email-changes": {
416
+ parameters: {
417
+ query?: never;
418
+ header?: never;
419
+ path?: never;
420
+ cookie?: never;
421
+ };
422
+ get?: never;
423
+ put?: never;
424
+ /**
425
+ * Update Email Initiate
426
+ * @description **Initiate email address update (Step 1 of 2).**
427
+ *
428
+ * **Purpose**: Start email update process by verifying user identity and sending
429
+ * OTP to new email address.
430
+ *
431
+ * **Flow**:
432
+ * 1. Verify user password (required by default, config can override to accept OTP)
433
+ * 2. Check MFA if user has it enabled
434
+ * 3. Verify new email is available (not in use by another user)
435
+ * 4. Generate verification token (JWT, 15min TTL)
436
+ * 5. Send OTP to new email address
437
+ * 6. Cache pending change for verification step
438
+ * 7. Return challenge_id for next step
439
+ *
440
+ * **Example Request**:
441
+ * ```json
442
+ * {
443
+ * "new_email": "newemail@example.com",
444
+ * "password": "CurrentPass123!",
445
+ * "mfa_code": "123456"
446
+ * }
447
+ * ```
448
+ *
449
+ * **Example Response**:
450
+ * ```json
451
+ * {
452
+ * "success": true,
453
+ * "data": {
454
+ * "challenge_id": "otp_abc123xyz",
455
+ * "verification_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
456
+ * "new_email_masked": "n***@example.com",
457
+ * "expires_at": "2025-02-01T12:15:00Z"
458
+ * },
459
+ * "message": "Verification code sent to new email"
460
+ * }
461
+ * ```
462
+ *
463
+ * **Next Step**: Call `/update-email/verify` with the OTP code sent to new email.
464
+ *
465
+ * **Security Features**:
466
+ * - Password verification (default, config-driven)
467
+ * - MFA verification if enabled
468
+ * - Email availability check
469
+ * - OTP sent to NEW email (not current)
470
+ * - Verification token with 15min expiry
471
+ *
472
+ * **Authentication**: Required (JWT)
473
+ * **Rate Limit**: 10 requests per hour
474
+ *
475
+ * **Response Codes**:
476
+ * - 200: Verification code sent successfully
477
+ * - 400: Validation error (invalid email format, MFA required)
478
+ * - 401: Incorrect password
479
+ * - 403: Email changes disabled for org
480
+ * - 409: Email already in use
481
+ * - 429: Rate limit exceeded
482
+ * - 500: Server error or OTP send failure
483
+ */
484
+ post: operations["createEmailChange"];
485
+ delete?: never;
486
+ options?: never;
487
+ head?: never;
488
+ patch?: never;
489
+ trace?: never;
490
+ };
491
+ "/v1/me/email-changes/{change_id}/confirm": {
492
+ parameters: {
493
+ query?: never;
494
+ header?: never;
495
+ path?: never;
496
+ cookie?: never;
497
+ };
498
+ get?: never;
499
+ put?: never;
500
+ /**
501
+ * Update Email Verify
502
+ * @description **Verify and complete email address update (Step 2 of 2).**
503
+ *
504
+ * **Purpose**: Complete email update by verifying OTP code sent to new email.
505
+ *
506
+ * **Flow**:
507
+ * 1. Verify JWT verification token from initiate step
508
+ * 2. Retrieve pending change from cache
509
+ * 3. Verify OTP code sent to new email
510
+ * 4. Update email address in database
511
+ * 5. Optionally invalidate all sessions (config-driven)
512
+ * 6. Send notification to OLD email with rollback token
513
+ * 7. Return success with rollback info (if enabled)
514
+ *
515
+ * **Example Request**:
516
+ * ```json
517
+ * {
518
+ * "verification_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
519
+ * "otp_code": "123456"
520
+ * }
521
+ * ```
522
+ *
523
+ * **Example Response**:
524
+ * ```json
525
+ * {
526
+ * "success": true,
527
+ * "data": {
528
+ * "email": "newemail@example.com",
529
+ * "previous_email": "oldemail@example.com",
530
+ * "rollback_available": true,
531
+ * "rollback_expires_at": "2025-02-02T12:00:00Z"
532
+ * },
533
+ * "message": "Email updated successfully"
534
+ * }
535
+ * ```
536
+ *
537
+ * **Rollback**: If enabled (default 24h window), old email will receive a rollback
538
+ * link. Use `/update-email/rollback` endpoint to revert the change.
539
+ *
540
+ * **Session Invalidation**: If configured, all active sessions will be logged out
541
+ * for security (user must re-login with new email).
542
+ *
543
+ * **Authentication**: Required (JWT)
544
+ * **Rate Limit**: 20 requests per hour
545
+ *
546
+ * **Response Codes**:
547
+ * - 200: Email updated successfully
548
+ * - 400: Invalid or expired OTP, invalid verification token
549
+ * - 401: Verification token expired
550
+ * - 403: Token user/org mismatch
551
+ * - 404: No pending email change found
552
+ * - 500: Server error
553
+ */
554
+ post: operations["confirmEmailChange"];
555
+ delete?: never;
556
+ options?: never;
557
+ head?: never;
558
+ patch?: never;
559
+ trace?: never;
560
+ };
561
+ "/v1/me/email-changes/{change_id}": {
562
+ parameters: {
563
+ query?: never;
564
+ header?: never;
565
+ path?: never;
566
+ cookie?: never;
567
+ };
568
+ get?: never;
569
+ put?: never;
570
+ post?: never;
571
+ /**
572
+ * Update Email Rollback
573
+ * @description **Rollback email change to previous address.**
574
+ *
575
+ * **Purpose**: Restore previous email address within rollback window (default 24h).
576
+ * Used if email was changed by mistake or account was compromised.
577
+ *
578
+ * **Flow**:
579
+ * 1. Verify rollback token (sent to old email after change)
580
+ * 2. Retrieve rollback data from cache
581
+ * 3. Check rollback window hasn't expired
582
+ * 4. Update email back to previous address
583
+ * 5. Send confirmation to restored email
584
+ * 6. Clear rollback cache
585
+ *
586
+ * **Example Request**:
587
+ * ```json
588
+ * {
589
+ * "rollback_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
590
+ * }
591
+ * ```
592
+ *
593
+ * **Example Response**:
594
+ * ```json
595
+ * {
596
+ * "success": true,
597
+ * "data": {
598
+ * "email": "oldemail@example.com",
599
+ * "restored_from": "newemail@example.com"
600
+ * },
601
+ * "message": "Email address restored successfully"
602
+ * }
603
+ * ```
604
+ *
605
+ * **Security Note**: Rollback token is single-use and sent only to the OLD email
606
+ * address, providing proof of ownership.
607
+ *
608
+ * **Authentication**: Required (JWT)
609
+ * **Rate Limit**: 5 requests per hour
610
+ *
611
+ * **Response Codes**:
612
+ * - 200: Email restored successfully
613
+ * - 400: Invalid rollback token
614
+ * - 401: Rollback window expired
615
+ * - 403: Token user/org mismatch
616
+ * - 404: No rollback data found
617
+ * - 500: Server error
618
+ */
619
+ delete: operations["cancelEmailChange"];
620
+ options?: never;
621
+ head?: never;
622
+ patch?: never;
623
+ trace?: never;
624
+ };
625
+ "/v1/me/mobile-changes": {
626
+ parameters: {
627
+ query?: never;
628
+ header?: never;
629
+ path?: never;
630
+ cookie?: never;
631
+ };
632
+ get?: never;
633
+ put?: never;
634
+ /**
635
+ * Update Mobile Initiate
636
+ * @description **Initiate mobile number update (Step 1 of 2).**
637
+ *
638
+ * **Purpose**: Start mobile number update process by verifying user identity and
639
+ * sending OTP to new mobile number.
640
+ *
641
+ * **Flow**:
642
+ * 1. Verify user password (required by default, config can override)
643
+ * 2. Check MFA if user has it enabled
644
+ * 3. Verify new mobile is available
645
+ * 4. Generate verification token (JWT, 15min TTL)
646
+ * 5. Send OTP via SMS to new mobile number
647
+ * 6. Cache pending change for verification step
648
+ * 7. Return challenge_id for next step
649
+ *
650
+ * **Example Request**:
651
+ * ```json
652
+ * {
653
+ * "new_mobile_isd_code": "+1",
654
+ * "new_mobile_no": "5559876543",
655
+ * "password": "CurrentPass123!",
656
+ * "mfa_code": "123456"
657
+ * }
658
+ * ```
659
+ *
660
+ * **Example Response**:
661
+ * ```json
662
+ * {
663
+ * "success": true,
664
+ * "data": {
665
+ * "challenge_id": "otp_abc123xyz",
666
+ * "verification_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
667
+ * "new_mobile_masked": "+1***6543",
668
+ * "expires_at": "2025-02-01T12:15:00Z"
669
+ * },
670
+ * "message": "Verification code sent to new mobile"
671
+ * }
672
+ * ```
673
+ *
674
+ * **Next Step**: Call `/update-mobile/verify` with the OTP code sent via SMS.
675
+ *
676
+ * **Authentication**: Required (JWT)
677
+ * **Rate Limit**: 10 requests per hour
678
+ *
679
+ * **Response Codes**:
680
+ * - 200: Verification code sent successfully
681
+ * - 400: Validation error
682
+ * - 401: Incorrect password
683
+ * - 403: Mobile changes disabled for org
684
+ * - 409: Mobile number already in use
685
+ * - 429: Rate limit exceeded
686
+ * - 500: Server error or SMS send failure
687
+ */
688
+ post: operations["createMobileChange"];
689
+ delete?: never;
690
+ options?: never;
691
+ head?: never;
692
+ patch?: never;
693
+ trace?: never;
694
+ };
695
+ "/v1/me/mobile-changes/{change_id}/confirm": {
696
+ parameters: {
697
+ query?: never;
698
+ header?: never;
699
+ path?: never;
700
+ cookie?: never;
701
+ };
702
+ get?: never;
703
+ put?: never;
704
+ /**
705
+ * Update Mobile Verify
706
+ * @description **Verify and complete mobile number update (Step 2 of 2).**
707
+ *
708
+ * **Purpose**: Complete mobile update by verifying OTP code sent via SMS.
709
+ *
710
+ * **Flow**:
711
+ * 1. Verify JWT verification token from initiate step
712
+ * 2. Retrieve pending change from cache
713
+ * 3. Verify OTP code sent to new mobile
714
+ * 4. Update mobile number in database
715
+ * 5. Send notification to OLD mobile (if configured)
716
+ * 6. Return success
717
+ *
718
+ * **Example Request**:
719
+ * ```json
720
+ * {
721
+ * "verification_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
722
+ * "otp_code": "123456"
723
+ * }
724
+ * ```
725
+ *
726
+ * **Example Response**:
727
+ * ```json
728
+ * {
729
+ * "success": true,
730
+ * "data": {
731
+ * "mobile_isd_code": "+1",
732
+ * "mobile_no": "5559876543",
733
+ * "previous_mobile": "+1 5551234567"
734
+ * },
735
+ * "message": "Mobile number updated successfully"
736
+ * }
737
+ * ```
738
+ *
739
+ * **Authentication**: Required (JWT)
740
+ * **Rate Limit**: 20 requests per hour
741
+ *
742
+ * **Response Codes**:
743
+ * - 200: Mobile updated successfully
744
+ * - 400: Invalid or expired OTP
745
+ * - 401: Verification token expired
746
+ * - 403: Token user/org mismatch
747
+ * - 404: No pending mobile change found
748
+ * - 500: Server error
749
+ */
750
+ post: operations["confirmMobileChange"];
751
+ delete?: never;
752
+ options?: never;
753
+ head?: never;
754
+ patch?: never;
755
+ trace?: never;
756
+ };
757
+ "/v1/me/account-deletions": {
758
+ parameters: {
759
+ query?: never;
760
+ header?: never;
761
+ path?: never;
762
+ cookie?: never;
763
+ };
764
+ get?: never;
765
+ put?: never;
766
+ /**
767
+ * Delete Account Initiate
768
+ * @description **Initiate account deletion (Step 1 of 3).**
769
+ *
770
+ * **Purpose**: Start account deletion process with grace period (default 24h) for
771
+ * cancellation. Supports GDPR/CCPA "right to be forgotten".
772
+ *
773
+ * **Flow**:
774
+ * 1. Verify user password (if required)
775
+ * 2. Verify confirmation text (if required): "DELETE MY ACCOUNT"
776
+ * 3. Check if user is instructor with active students (block if configured)
777
+ * 4. Generate deletion token (JWT, 24h default TTL)
778
+ * 5. Cache deletion request
779
+ * 6. Send confirmation email (based on confirmation_method config)
780
+ * 7. Return deletion_token or email confirmation
781
+ *
782
+ * **Example Request**:
783
+ * ```json
784
+ * {
785
+ * "password": "CurrentPass123!",
786
+ * "confirmation_text": "DELETE MY ACCOUNT",
787
+ * "reason": "No longer need the service"
788
+ * }
789
+ * ```
790
+ *
791
+ * **Example Response**:
792
+ * ```json
793
+ * {
794
+ * "success": true,
795
+ * "data": {
796
+ * "deletion_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
797
+ * "confirmation_sent_to_email": true,
798
+ * "grace_period_hours": 24,
799
+ * "expires_at": "2025-02-02T12:00:00Z"
800
+ * },
801
+ * "message": "Account deletion initiated"
802
+ * }
803
+ * ```
804
+ *
805
+ * **Next Steps**:
806
+ * - To confirm deletion: Call `/delete/confirm` with deletion_token
807
+ * - To cancel deletion: Call `/delete/cancel` with deletion_token
808
+ *
809
+ * **Grace Period**: Default 24 hours to cancel before deletion executes.
810
+ *
811
+ * **Authentication**: Required (JWT)
812
+ * **Rate Limit**: 3 requests per hour
813
+ *
814
+ * **Response Codes**:
815
+ * - 200: Deletion initiated successfully
816
+ * - 400: Confirmation text incorrect or reason required
817
+ * - 401: Incorrect password
818
+ * - 403: Deletion disabled for org
819
+ * - 409: Cannot delete (instructor with active students)
820
+ * - 500: Server error
821
+ */
822
+ post: operations["createAccountDeletion"];
823
+ delete?: never;
824
+ options?: never;
825
+ head?: never;
826
+ patch?: never;
827
+ trace?: never;
828
+ };
829
+ "/v1/me/account-deletions/{deletion_id}/confirm": {
830
+ parameters: {
831
+ query?: never;
832
+ header?: never;
833
+ path?: never;
834
+ cookie?: never;
835
+ };
836
+ get?: never;
837
+ put?: never;
838
+ /**
839
+ * Delete Account Confirm
840
+ * @description **Confirm and execute account deletion (Step 2 of 3).**
841
+ *
842
+ * **Purpose**: Execute account deletion (soft delete) with optional immediate
843
+ * anonymization.
844
+ *
845
+ * **Flow**:
846
+ * 1. Verify deletion token
847
+ * 2. Check within grace period
848
+ * 3. Soft delete account (set status to 'deleted', set deleted_at timestamp)
849
+ * 4. Optionally anonymize PII immediately (email, name, phone, address)
850
+ * 5. Invalidate all sessions (force logout)
851
+ * 6. Send final confirmation (if email not anonymized)
852
+ * 7. Return success with hard-delete timeline
853
+ *
854
+ * **Example Request**:
855
+ * ```json
856
+ * {
857
+ * "deletion_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
858
+ * }
859
+ * ```
860
+ *
861
+ * **Example Response**:
862
+ * ```json
863
+ * {
864
+ * "success": true,
865
+ * "data": {
866
+ * "status": "deleted",
867
+ * "deleted_at": "2025-02-02T12:00:00Z",
868
+ * "anonymized": true,
869
+ * "hard_delete_after_days": 90
870
+ * },
871
+ * "message": "Account deleted successfully"
872
+ * }
873
+ * ```
874
+ *
875
+ * **GDPR Compliance**:
876
+ * - Soft delete: Account marked as deleted, data retained for compliance period
877
+ * - Anonymization: PII replaced with anonymized values (e.g., "deleted_user_12345")
878
+ * - Hard delete: Permanent data removal after retention period (default 90 days)
879
+ *
880
+ * **Important**: This action cannot be undone after grace period expires.
881
+ *
882
+ * **Authentication**: Required (JWT)
883
+ * **Rate Limit**: 5 requests per hour
884
+ *
885
+ * **Response Codes**:
886
+ * - 200: Account deleted successfully
887
+ * - 400: Invalid deletion token
888
+ * - 401: Grace period expired
889
+ * - 403: Token user/org mismatch
890
+ * - 404: No deletion request found
891
+ * - 500: Server error
892
+ */
893
+ post: operations["confirmAccountDeletion"];
894
+ delete?: never;
895
+ options?: never;
896
+ head?: never;
897
+ patch?: never;
898
+ trace?: never;
899
+ };
900
+ "/v1/me/account-deletions/{deletion_id}": {
901
+ parameters: {
902
+ query?: never;
903
+ header?: never;
904
+ path?: never;
905
+ cookie?: never;
906
+ };
907
+ get?: never;
908
+ put?: never;
909
+ post?: never;
910
+ /**
911
+ * Delete Account Cancel
912
+ * @description **Cancel pending account deletion (Step 3 - optional).**
913
+ *
914
+ * **Purpose**: Cancel deletion request within grace period (default 24h).
915
+ *
916
+ * **Flow**:
917
+ * 1. Verify deletion token
918
+ * 2. Check within grace period
919
+ * 3. Clear deletion cache
920
+ * 4. Send cancellation confirmation email
921
+ * 5. Return success
922
+ *
923
+ * **Example Request**:
924
+ * ```json
925
+ * {
926
+ * "deletion_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
927
+ * }
928
+ * ```
929
+ *
930
+ * **Example Response**:
931
+ * ```json
932
+ * {
933
+ * "success": true,
934
+ * "data": {
935
+ * "cancelled_at": "2025-02-01T18:00:00Z"
936
+ * },
937
+ * "message": "Account deletion cancelled"
938
+ * }
939
+ * ```
940
+ *
941
+ * **Authentication**: Required (JWT)
942
+ * **Rate Limit**: 10 requests per hour
943
+ *
944
+ * **Response Codes**:
945
+ * - 200: Deletion cancelled successfully
946
+ * - 400: Invalid deletion token
947
+ * - 401: Grace period expired (cannot cancel)
948
+ * - 403: Token user/org mismatch
949
+ * - 404: No pending deletion found
950
+ * - 500: Server error
951
+ */
952
+ delete: operations["cancelAccountDeletion"];
953
+ options?: never;
954
+ head?: never;
955
+ patch?: never;
956
+ trace?: never;
957
+ };
958
+ "/v1/me/mfa/enrollments": {
959
+ parameters: {
960
+ query?: never;
961
+ header?: never;
962
+ path?: never;
963
+ cookie?: never;
964
+ };
965
+ get?: never;
966
+ put?: never;
967
+ /**
968
+ * Create Mfa Enrollment
969
+ * @description **Start MFA enrollment** for any supported method.
970
+ *
971
+ * **Authentication**: Required (JWT)
972
+ *
973
+ * **Request Body**:
974
+ * ```json
975
+ * { "method": "totp" }
976
+ * { "method": "sms", "phone_number": "+11234567890" }
977
+ * { "method": "email", "email": "user@example.com" }
978
+ * ```
979
+ *
980
+ * **Response** (common fields):
981
+ * - `method` — method being enrolled
982
+ * - `enrollment_id` — use in `POST /enrollments/{enrollment_id}/confirm`
983
+ * - TOTP only: `qr_code_url`, `secret`, `manual_entry_code`
984
+ * - SMS/Email only: `sent_to`, `expires_at`
985
+ */
986
+ post: operations["createMFAEnrollment"];
987
+ delete?: never;
988
+ options?: never;
989
+ head?: never;
990
+ patch?: never;
991
+ trace?: never;
992
+ };
993
+ "/v1/me/mfa/enrollments/{enrollment_id}/confirm": {
994
+ parameters: {
995
+ query?: never;
996
+ header?: never;
997
+ path?: never;
998
+ cookie?: never;
999
+ };
1000
+ get?: never;
1001
+ put?: never;
1002
+ /**
1003
+ * Confirm Mfa Enrollment
1004
+ * @description **Confirm and complete MFA enrollment.**
1005
+ *
1006
+ * **Authentication**: Required (JWT)
1007
+ *
1008
+ * **Request Body**:
1009
+ * ```json
1010
+ * { "method": "totp", "code": "123456" }
1011
+ * { "method": "sms", "code": "123456" }
1012
+ * { "method": "email","code": "123456" }
1013
+ * ```
1014
+ *
1015
+ * For TOTP: `enrollment_id` = `"totp"` (returned by createMFAEnrollment).
1016
+ * For SMS/Email: `enrollment_id` = `verification_id` from createMFAEnrollment response.
1017
+ *
1018
+ * **Response** (TOTP): backup codes (save securely)
1019
+ * **Response** (SMS/Email): enrolled status
1020
+ */
1021
+ post: operations["confirmMFAEnrollment"];
1022
+ delete?: never;
1023
+ options?: never;
1024
+ head?: never;
1025
+ patch?: never;
1026
+ trace?: never;
1027
+ };
1028
+ "/v1/me/mfa/methods": {
1029
+ parameters: {
1030
+ query?: never;
1031
+ header?: never;
1032
+ path?: never;
1033
+ cookie?: never;
1034
+ };
1035
+ /**
1036
+ * List Mfa Methods
1037
+ * @description **List all MFA methods** for current user.
1038
+ *
1039
+ * Shows enrolled methods and backup codes status.
1040
+ *
1041
+ * **Authentication**: Required (JWT)
1042
+ *
1043
+ * **Response**:
1044
+ * ```json
1045
+ * {
1046
+ * "available_methods": ["totp", "sms", "email"],
1047
+ * "enrolled_methods": [
1048
+ * {
1049
+ * "method": "totp",
1050
+ * "enabled": true,
1051
+ * "enrolled_at": "2026-01-15T10:30:00Z"
1052
+ * }
1053
+ * ],
1054
+ * "backup_codes": {
1055
+ * "total": 10,
1056
+ * "remaining": 8
1057
+ * }
1058
+ * }
1059
+ * ```
1060
+ */
1061
+ get: operations["listMFAMethods"];
1062
+ put?: never;
1063
+ post?: never;
1064
+ delete?: never;
1065
+ options?: never;
1066
+ head?: never;
1067
+ patch?: never;
1068
+ trace?: never;
1069
+ };
1070
+ "/v1/me/mfa/methods/{method}": {
1071
+ parameters: {
1072
+ query?: never;
1073
+ header?: never;
1074
+ path?: never;
1075
+ cookie?: never;
1076
+ };
1077
+ get?: never;
1078
+ put?: never;
1079
+ post?: never;
1080
+ /**
1081
+ * Disable Mfa Method
1082
+ * @description **Disable MFA method**.
1083
+ *
1084
+ * **Security**: Requires password confirmation in header.
1085
+ *
1086
+ * **Authentication**: Required (JWT)
1087
+ *
1088
+ * **Headers**:
1089
+ * ```
1090
+ * X-Password-Confirmation: user_password
1091
+ * ```
1092
+ *
1093
+ * **Path**: `/v1/user/security/mfa/totp`, `/v1/user/security/mfa/sms`, `/v1/user/security/mfa/email`
1094
+ */
1095
+ delete: operations["disableMFAMethod"];
1096
+ options?: never;
1097
+ head?: never;
1098
+ patch?: never;
1099
+ trace?: never;
1100
+ };
1101
+ "/v1/me/mfa/backup-codes": {
1102
+ parameters: {
1103
+ query?: never;
1104
+ header?: never;
1105
+ path?: never;
1106
+ cookie?: never;
1107
+ };
1108
+ /**
1109
+ * Get Backup Codes
1110
+ * @description **Get backup codes** (masked for security).
1111
+ *
1112
+ * **Authentication**: Required (JWT)
1113
+ *
1114
+ * **Response**: Shows which codes are used/unused (actual codes never returned)
1115
+ */
1116
+ get: operations["getBackupCodes"];
1117
+ put?: never;
1118
+ /**
1119
+ * Regenerate Backup Codes
1120
+ * @description **Regenerate backup codes** (invalidates old ones).
1121
+ *
1122
+ * **Security**: Requires password confirmation in header.
1123
+ *
1124
+ * **Authentication**: Required (JWT)
1125
+ *
1126
+ * **Headers**:
1127
+ * ```
1128
+ * X-Password-Confirmation: user_password
1129
+ * ```
1130
+ *
1131
+ * **Response**: New backup codes (save securely)
1132
+ */
1133
+ post: operations["regenerateBackupCodes"];
1134
+ delete?: never;
1135
+ options?: never;
1136
+ head?: never;
1137
+ patch?: never;
1138
+ trace?: never;
1139
+ };
1140
+ "/v1/me/mfa/devices": {
1141
+ parameters: {
1142
+ query?: never;
1143
+ header?: never;
1144
+ path?: never;
1145
+ cookie?: never;
1146
+ };
1147
+ /**
1148
+ * List Trusted Devices
1149
+ * @description **List all trusted devices** for current user.
1150
+ *
1151
+ * Shows devices where MFA is skipped for 30 days.
1152
+ *
1153
+ * **Authentication**: Required (JWT)
1154
+ *
1155
+ * **Response**:
1156
+ * ```json
1157
+ * {
1158
+ * "devices": [
1159
+ * {
1160
+ * "device_id": "dev_abc123",
1161
+ * "device_name": "Chrome on Windows 11",
1162
+ * "ip_address": "192.168.1.100",
1163
+ * "last_used_at": "2026-01-28T10:30:00Z",
1164
+ * "expires_at": "2026-02-27T10:30:00Z",
1165
+ * "current_device": true
1166
+ * }
1167
+ * ]
1168
+ * }
1169
+ * ```
1170
+ */
1171
+ get: operations["listTrustedDevices"];
1172
+ put?: never;
1173
+ post?: never;
1174
+ delete?: never;
1175
+ options?: never;
1176
+ head?: never;
1177
+ patch?: never;
1178
+ trace?: never;
1179
+ };
1180
+ "/v1/me/mfa/devices/{device_id}": {
1181
+ parameters: {
1182
+ query?: never;
1183
+ header?: never;
1184
+ path?: never;
1185
+ cookie?: never;
1186
+ };
1187
+ get?: never;
1188
+ put?: never;
1189
+ post?: never;
1190
+ /**
1191
+ * Revoke Trusted Device
1192
+ * @description **Revoke trusted device** (require MFA on next login).
1193
+ *
1194
+ * **Authentication**: Required (JWT)
1195
+ *
1196
+ * **Path**: `/v1/user/security/mfa/devices/dev_abc123`
1197
+ */
1198
+ delete: operations["revokeTrustedDevice"];
1199
+ options?: never;
1200
+ head?: never;
1201
+ patch?: never;
1202
+ trace?: never;
1203
+ };
1204
+ }
1205
+ export type webhooks = Record<string, never>;
1206
+ export interface components {
1207
+ schemas: {
1208
+ /**
1209
+ * DeleteAccountConfirmRequest
1210
+ * @description Request to confirm account deletion
1211
+ * @example {
1212
+ * "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
1213
+ * }
1214
+ */
1215
+ DeleteAccountConfirmRequest: {
1216
+ /**
1217
+ * Token
1218
+ * @description Deletion token from confirmation email (JWT, 24h TTL)
1219
+ */
1220
+ token: string;
1221
+ };
1222
+ Extensions: {
1223
+ /** @example GENERIC_ERROR */
1224
+ message_code?: string;
1225
+ /** @example [] */
1226
+ invalid_params?: components["schemas"]["InvalidParam"][];
1227
+ extra_data?: Record<string, never> | null;
1228
+ /** @example Detailed debug information */
1229
+ debug?: string | null;
1230
+ };
1231
+ /**
1232
+ * EmailRollbackRequest
1233
+ * @description Request to rollback email change
1234
+ * @example {
1235
+ * "rollback_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
1236
+ * }
1237
+ */
1238
+ EmailRollbackRequest: {
1239
+ /**
1240
+ * Rollback Token
1241
+ * @description Rollback token from email sent to old address
1242
+ */
1243
+ rollback_token: string;
1244
+ };
1245
+ /**
1246
+ * UpdateMobileInitiateRequest
1247
+ * @description Request to initiate mobile number change
1248
+ * @example {
1249
+ * "mfa_code": "123456",
1250
+ * "new_mobile_isd_code": "+91",
1251
+ * "new_mobile_no": "9876543210",
1252
+ * "password": "MySecurePassword123!"
1253
+ * }
1254
+ */
1255
+ UpdateMobileInitiateRequest: {
1256
+ /**
1257
+ * New Mobile Isd Code
1258
+ * @description Country code with + (e.g., +1, +91)
1259
+ */
1260
+ new_mobile_isd_code: string;
1261
+ /**
1262
+ * New Mobile No
1263
+ * @description New mobile number (digits only)
1264
+ */
1265
+ new_mobile_no: string;
1266
+ /**
1267
+ * Password
1268
+ * @description Current password (REQUIRED for security)
1269
+ */
1270
+ password: string;
1271
+ /**
1272
+ * Mfa Code
1273
+ * @description MFA code if MFA enabled
1274
+ */
1275
+ mfa_code?: string | null;
1276
+ };
1277
+ /**
1278
+ * @example {
1279
+ * "status": "success",
1280
+ * "message": "Operation successful",
1281
+ * "message_code": "api_suc_20001",
1282
+ * "data": {},
1283
+ * "metadata": {
1284
+ * "timestamp": "2026-03-26T10:00:00.000Z",
1285
+ * "requestId": "07e22004-cb60-4dfc-bc9c-b6f99664dca1",
1286
+ * "traceId": "a9f1204c-bb82-41de-b234-7c3a9e120000",
1287
+ * "version": "v1",
1288
+ * "executionTime": 42,
1289
+ * "language": "en-US"
1290
+ * }
1291
+ * }
1292
+ */
1293
+ StandardResponse: {
1294
+ /** @example success */
1295
+ status?: string;
1296
+ data?: Record<string, never> | null;
1297
+ /** @example Operation successful */
1298
+ message?: string | null;
1299
+ /** @example api_suc_20001 */
1300
+ message_code?: string | null;
1301
+ metadata?: Record<string, never> | null;
1302
+ error?: components["schemas"]["ErrorResponse"];
1303
+ };
1304
+ InvalidParam: {
1305
+ /** @example items[0].quantity */
1306
+ field?: string;
1307
+ /** @example Input should be greater than or equal to 1 */
1308
+ error?: string;
1309
+ };
1310
+ /**
1311
+ * PatchMeRequest
1312
+ * @description Unified PATCH /v1/me request. Supply the fields for the operation you want.
1313
+ */
1314
+ PatchMeRequest: {
1315
+ /** Username */
1316
+ username?: string | null;
1317
+ /** Status */
1318
+ status?: ("active" | "inactive") | null;
1319
+ /** Password */
1320
+ password?: string | null;
1321
+ /** Mfa Code */
1322
+ mfa_code?: string | null;
1323
+ /** Reason */
1324
+ reason?: string | null;
1325
+ /** Confirm */
1326
+ confirm?: boolean | null;
1327
+ /** Reactivation Token */
1328
+ reactivation_token?: string | null;
1329
+ };
1330
+ /** ChangePasswordRequest */
1331
+ ChangePasswordRequest: {
1332
+ /** Current Password */
1333
+ current_password: string;
1334
+ /** New Password */
1335
+ new_password: string;
1336
+ /** Confirm Password */
1337
+ confirm_password: string;
1338
+ /** Tracking Id */
1339
+ tracking_id?: string | null;
1340
+ };
1341
+ /** HTTPValidationError */
1342
+ HTTPValidationError: {
1343
+ /** Detail */
1344
+ detail?: components["schemas"]["ValidationError"][];
1345
+ };
1346
+ ErrorResponse: {
1347
+ /** @example about:blank */
1348
+ type?: string;
1349
+ /** @example GENERIC_ERROR */
1350
+ code?: string;
1351
+ /** @example Client Error */
1352
+ title?: string;
1353
+ /** @example 400 */
1354
+ status?: number;
1355
+ /** @example An error occurred */
1356
+ detail?: string;
1357
+ /** @example /v1/cart/items */
1358
+ instance?: string;
1359
+ extensions?: components["schemas"]["Extensions"];
1360
+ };
1361
+ /**
1362
+ * UpdateMobileVerifyRequest
1363
+ * @description Request to verify new mobile with OTP
1364
+ * @example {
1365
+ * "otp": "123456",
1366
+ * "verification_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
1367
+ * }
1368
+ */
1369
+ UpdateMobileVerifyRequest: {
1370
+ /**
1371
+ * Verification Token
1372
+ * @description Token from initiate step (JWT, 15 min TTL)
1373
+ */
1374
+ verification_token: string;
1375
+ /**
1376
+ * Otp
1377
+ * @description OTP sent to new mobile
1378
+ */
1379
+ otp: string;
1380
+ };
1381
+ /** ForgetPasswordRequest */
1382
+ ForgetPasswordRequest: {
1383
+ /** Email */
1384
+ email?: string | null;
1385
+ /** Username */
1386
+ username?: string | null;
1387
+ /** Mobile Isd Code */
1388
+ mobile_isd_code?: string | null;
1389
+ /** Mobile No */
1390
+ mobile_no?: string | null;
1391
+ /** Space Id */
1392
+ space_id: string;
1393
+ /** G Recaptcha Response */
1394
+ g_recaptcha_response?: string | null;
1395
+ /** Return Data */
1396
+ return_data?: {
1397
+ [key: string]: unknown;
1398
+ } | null;
1399
+ /** Tracking Id */
1400
+ tracking_id?: string | null;
1401
+ };
1402
+ /** ValidationError */
1403
+ ValidationError: {
1404
+ /** Location */
1405
+ loc: (string | number)[];
1406
+ /** Message */
1407
+ msg: string;
1408
+ /** Error Type */
1409
+ type: string;
1410
+ };
1411
+ /**
1412
+ * UpdateEmailVerifyRequest
1413
+ * @description Request to verify new email with OTP
1414
+ * @example {
1415
+ * "otp": "123456",
1416
+ * "verification_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
1417
+ * }
1418
+ */
1419
+ UpdateEmailVerifyRequest: {
1420
+ /**
1421
+ * Verification Token
1422
+ * @description Token from initiate step (JWT, 15 min TTL)
1423
+ */
1424
+ verification_token: string;
1425
+ /**
1426
+ * Otp
1427
+ * @description OTP sent to new email
1428
+ */
1429
+ otp: string;
1430
+ };
1431
+ /**
1432
+ * DeleteAccountInitiateRequest
1433
+ * @description Request to initiate account deletion
1434
+ * @example {
1435
+ * "confirm_text": "DELETE MY ACCOUNT",
1436
+ * "password": "MySecurePassword123!",
1437
+ * "reason": "Switching to a different platform"
1438
+ * }
1439
+ */
1440
+ DeleteAccountInitiateRequest: {
1441
+ /**
1442
+ * Password
1443
+ * @description Current password for confirmation
1444
+ */
1445
+ password: string;
1446
+ /**
1447
+ * Reason
1448
+ * @description Reason for deletion (optional)
1449
+ */
1450
+ reason?: string | null;
1451
+ /**
1452
+ * Confirm Text
1453
+ * @description Must type 'DELETE MY ACCOUNT' exactly
1454
+ */
1455
+ confirm_text: string;
1456
+ };
1457
+ /**
1458
+ * MFAConfirmEnrollRequest
1459
+ * @description Confirm an in-progress MFA enrollment.
1460
+ *
1461
+ * - `method`: same method as the enrollment request
1462
+ * - `code`: 6-digit OTP (sms/email) or 6-8 digit TOTP code
1463
+ */
1464
+ MFAConfirmEnrollRequest: {
1465
+ /**
1466
+ * Method
1467
+ * @description Method being confirmed
1468
+ * @enum {string}
1469
+ */
1470
+ method: "totp" | "sms" | "email";
1471
+ /**
1472
+ * Code
1473
+ * @description Verification code
1474
+ */
1475
+ code: string;
1476
+ };
1477
+ /**
1478
+ * SocialLinkRequest
1479
+ * @description Request model for linking social account to existing user.
1480
+ */
1481
+ SocialLinkRequest: {
1482
+ /**
1483
+ * Provider
1484
+ * @enum {string}
1485
+ */
1486
+ provider: "google" | "facebook" | "linkedin" | "x" | "apple";
1487
+ /** Authorization Code */
1488
+ authorization_code: string;
1489
+ /** Redirect Uri */
1490
+ redirect_uri: string;
1491
+ };
1492
+ /**
1493
+ * MFAEnrollRequest
1494
+ * @description Polymorphic MFA enrollment request.
1495
+ *
1496
+ * Supply `method` + any method-specific fields:
1497
+ * - `totp`: no extra fields needed
1498
+ * - `sms`: requires `phone_number`
1499
+ * - `email`: requires `email`
1500
+ */
1501
+ MFAEnrollRequest: {
1502
+ /**
1503
+ * Method
1504
+ * @description MFA method to enroll
1505
+ * @enum {string}
1506
+ */
1507
+ method: "totp" | "sms" | "email";
1508
+ /**
1509
+ * Phone Number
1510
+ * @description Phone number with country code (sms only)
1511
+ */
1512
+ phone_number?: string | null;
1513
+ /**
1514
+ * Email
1515
+ * @description Email address for MFA (email only)
1516
+ */
1517
+ email?: string | null;
1518
+ };
1519
+ /** ResetPasswordRequest */
1520
+ ResetPasswordRequest: {
1521
+ /** New Password */
1522
+ new_password: string;
1523
+ /**
1524
+ * Send Email
1525
+ * @default true
1526
+ */
1527
+ send_email: boolean | null;
1528
+ };
1529
+ /**
1530
+ * UpdateEmailInitiateRequest
1531
+ * @description Request to initiate email change
1532
+ * @example {
1533
+ * "mfa_code": "123456",
1534
+ * "new_email": "john.newemail@example.com",
1535
+ * "password": "MySecurePassword123!"
1536
+ * }
1537
+ */
1538
+ UpdateEmailInitiateRequest: {
1539
+ /**
1540
+ * New Email
1541
+ * Format: email
1542
+ * @description New email address
1543
+ */
1544
+ new_email: string;
1545
+ /**
1546
+ * Password
1547
+ * @description Current password (REQUIRED for security)
1548
+ */
1549
+ password: string;
1550
+ /**
1551
+ * Mfa Code
1552
+ * @description MFA code if MFA enabled
1553
+ */
1554
+ mfa_code?: string | null;
1555
+ };
1556
+ /**
1557
+ * DeleteAccountCancelRequest
1558
+ * @description Request to cancel pending deletion
1559
+ * @example {
1560
+ * "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
1561
+ * }
1562
+ */
1563
+ DeleteAccountCancelRequest: {
1564
+ /**
1565
+ * Token
1566
+ * @description Deletion cancellation token (JWT, 24h TTL)
1567
+ */
1568
+ token: string;
1569
+ };
1570
+ };
1571
+ responses: never;
1572
+ parameters: never;
1573
+ requestBodies: never;
1574
+ headers: never;
1575
+ pathItems: never;
1576
+ }
1577
+ export type $defs = Record<string, never>;
1578
+ export interface operations {
1579
+ getMe: {
1580
+ parameters: {
1581
+ query?: never;
1582
+ header?: {
1583
+ authorization?: string | null;
1584
+ };
1585
+ path?: never;
1586
+ cookie?: never;
1587
+ };
1588
+ requestBody?: never;
1589
+ responses: {
1590
+ /** @description Successful Response */
1591
+ 200: {
1592
+ headers: {
1593
+ [name: string]: unknown;
1594
+ };
1595
+ content: {
1596
+ "application/json": components["schemas"]["StandardResponse"];
1597
+ };
1598
+ };
1599
+ /** @description Bad Request */
1600
+ 400: {
1601
+ headers: {
1602
+ [name: string]: unknown;
1603
+ };
1604
+ content: {
1605
+ /**
1606
+ * @example {
1607
+ * "status": "error",
1608
+ * "message": "An error occurred",
1609
+ * "message_code": "GENERIC_ERROR",
1610
+ * "metadata": {
1611
+ * "timestamp": "2025-08-05T18:38:57Z",
1612
+ * "requestId": "uuid",
1613
+ * "traceId": "uuid",
1614
+ * "version": "v1",
1615
+ * "executionTime": 0,
1616
+ * "language": "en-US",
1617
+ * "links": [
1618
+ * {
1619
+ * "rel": "self",
1620
+ * "href": "/v1/cart/items",
1621
+ * "method": "POST"
1622
+ * }
1623
+ * ]
1624
+ * },
1625
+ * "error": {
1626
+ * "type": "https://{your-domain}/errors/client-error",
1627
+ * "code": "GENERIC_ERROR",
1628
+ * "title": "Client Error",
1629
+ * "status": 400,
1630
+ * "detail": "An error occurred",
1631
+ * "instance": "/v1/cart/items",
1632
+ * "extensions": {
1633
+ * "message_code": "GENERIC_ERROR",
1634
+ * "invalid_params": []
1635
+ * }
1636
+ * }
1637
+ * }
1638
+ */
1639
+ "application/json": components["schemas"]["StandardResponse"];
1640
+ };
1641
+ };
1642
+ /** @description Unprocessable Entity */
1643
+ 422: {
1644
+ headers: {
1645
+ [name: string]: unknown;
1646
+ };
1647
+ content: {
1648
+ /**
1649
+ * @example {
1650
+ * "status": "error",
1651
+ * "message": "One or more input fields are invalid",
1652
+ * "message_code": "INVALID_INPUT",
1653
+ * "metadata": {
1654
+ * "timestamp": "2025-08-05T18:38:57Z",
1655
+ * "requestId": "uuid",
1656
+ * "traceId": "uuid",
1657
+ * "version": "v1",
1658
+ * "executionTime": 0,
1659
+ * "language": "en-US",
1660
+ * "links": [
1661
+ * {
1662
+ * "rel": "self",
1663
+ * "href": "/v1/cart/items",
1664
+ * "method": "POST"
1665
+ * }
1666
+ * ]
1667
+ * },
1668
+ * "error": {
1669
+ * "type": "https://{your-domain}/errors/invalid-input",
1670
+ * "code": "INVALID_INPUT",
1671
+ * "title": "Invalid Input",
1672
+ * "status": 422,
1673
+ * "detail": "One or more input fields are invalid",
1674
+ * "instance": "/v1/cart/items",
1675
+ * "extensions": {
1676
+ * "message_code": "INVALID_INPUT",
1677
+ * "invalid_params": [
1678
+ * {
1679
+ * "field": "items[0].quantity",
1680
+ * "error": "Input should be greater than or equal to 1"
1681
+ * }
1682
+ * ]
1683
+ * }
1684
+ * }
1685
+ * }
1686
+ */
1687
+ "application/json": components["schemas"]["StandardResponse"];
1688
+ };
1689
+ };
1690
+ /** @description Too Many Requests */
1691
+ 429: {
1692
+ headers: {
1693
+ [name: string]: unknown;
1694
+ };
1695
+ content: {
1696
+ /**
1697
+ * @example {
1698
+ * "status": "error",
1699
+ * "message": "Too many requests",
1700
+ * "message_code": "RATE_LIMIT_EXCEEDED",
1701
+ * "metadata": {
1702
+ * "timestamp": "2025-08-05T18:38:57Z",
1703
+ * "requestId": "uuid",
1704
+ * "traceId": "uuid",
1705
+ * "version": "v1",
1706
+ * "executionTime": 0,
1707
+ * "language": "en-US",
1708
+ * "links": [
1709
+ * {
1710
+ * "rel": "self",
1711
+ * "href": "/v1/cart/items",
1712
+ * "method": "POST"
1713
+ * }
1714
+ * ]
1715
+ * },
1716
+ * "error": {
1717
+ * "type": "https://{your-domain}/errors/rate-limit-exceeded",
1718
+ * "code": "RATE_LIMIT_EXCEEDED",
1719
+ * "title": "Rate Limit Exceeded",
1720
+ * "status": 429,
1721
+ * "detail": "Too many requests",
1722
+ * "instance": "/v1/cart/items",
1723
+ * "extensions": {
1724
+ * "message_code": "RATE_LIMIT_EXCEEDED",
1725
+ * "invalid_params": []
1726
+ * }
1727
+ * }
1728
+ * }
1729
+ */
1730
+ "application/json": components["schemas"]["StandardResponse"];
1731
+ };
1732
+ };
1733
+ /** @description Internal Server Error */
1734
+ 500: {
1735
+ headers: {
1736
+ [name: string]: unknown;
1737
+ };
1738
+ content: {
1739
+ /**
1740
+ * @example {
1741
+ * "status": "error",
1742
+ * "message": "An unexpected error occurred",
1743
+ * "message_code": "SERVER_ERROR",
1744
+ * "metadata": {
1745
+ * "timestamp": "2025-08-05T18:38:57Z",
1746
+ * "requestId": "uuid",
1747
+ * "traceId": "uuid",
1748
+ * "version": "v1",
1749
+ * "executionTime": 0,
1750
+ * "language": "en-US",
1751
+ * "links": [
1752
+ * {
1753
+ * "rel": "self",
1754
+ * "href": "/v1/cart/items",
1755
+ * "method": "POST"
1756
+ * }
1757
+ * ]
1758
+ * },
1759
+ * "error": {
1760
+ * "type": "https://{your-domain}/errors/server-error",
1761
+ * "code": "SERVER_ERROR",
1762
+ * "title": "Server Error",
1763
+ * "status": 500,
1764
+ * "detail": "An unexpected error occurred",
1765
+ * "instance": "/v1/cart/items",
1766
+ * "extensions": {
1767
+ * "message_code": "SERVER_ERROR",
1768
+ * "invalid_params": []
1769
+ * }
1770
+ * }
1771
+ * }
1772
+ */
1773
+ "application/json": components["schemas"]["StandardResponse"];
1774
+ };
1775
+ };
1776
+ };
1777
+ };
1778
+ patchMe: {
1779
+ parameters: {
1780
+ query?: never;
1781
+ header?: {
1782
+ authorization?: string | null;
1783
+ };
1784
+ path?: never;
1785
+ cookie?: never;
1786
+ };
1787
+ requestBody: {
1788
+ content: {
1789
+ "application/json": components["schemas"]["PatchMeRequest"];
1790
+ };
1791
+ };
1792
+ responses: {
1793
+ /** @description Successful Response */
1794
+ 200: {
1795
+ headers: {
1796
+ [name: string]: unknown;
1797
+ };
1798
+ content: {
1799
+ "application/json": components["schemas"]["StandardResponse"];
1800
+ };
1801
+ };
1802
+ /** @description Validation Error */
1803
+ 422: {
1804
+ headers: {
1805
+ [name: string]: unknown;
1806
+ };
1807
+ content: {
1808
+ "application/json": components["schemas"]["HTTPValidationError"];
1809
+ };
1810
+ };
1811
+ };
1812
+ };
1813
+ createPasswordReset: {
1814
+ parameters: {
1815
+ query?: never;
1816
+ header?: never;
1817
+ path?: never;
1818
+ cookie?: never;
1819
+ };
1820
+ requestBody: {
1821
+ content: {
1822
+ "application/json": components["schemas"]["ForgetPasswordRequest"];
1823
+ };
1824
+ };
1825
+ responses: {
1826
+ /** @description Successful Response */
1827
+ 200: {
1828
+ headers: {
1829
+ [name: string]: unknown;
1830
+ };
1831
+ content: {
1832
+ "application/json": components["schemas"]["StandardResponse"];
1833
+ };
1834
+ };
1835
+ /** @description Validation Error */
1836
+ 422: {
1837
+ headers: {
1838
+ [name: string]: unknown;
1839
+ };
1840
+ content: {
1841
+ "application/json": components["schemas"]["HTTPValidationError"];
1842
+ };
1843
+ };
1844
+ };
1845
+ };
1846
+ confirmPasswordReset: {
1847
+ parameters: {
1848
+ query?: never;
1849
+ header?: never;
1850
+ path: {
1851
+ /** @description Reset ID from createPasswordReset response */
1852
+ reset_id: string;
1853
+ };
1854
+ cookie?: never;
1855
+ };
1856
+ requestBody: {
1857
+ content: {
1858
+ "application/json": components["schemas"]["ResetPasswordRequest"];
1859
+ };
1860
+ };
1861
+ responses: {
1862
+ /** @description Successful Response */
1863
+ 200: {
1864
+ headers: {
1865
+ [name: string]: unknown;
1866
+ };
1867
+ content: {
1868
+ "application/json": components["schemas"]["StandardResponse"];
1869
+ };
1870
+ };
1871
+ /** @description Validation Error */
1872
+ 422: {
1873
+ headers: {
1874
+ [name: string]: unknown;
1875
+ };
1876
+ content: {
1877
+ "application/json": components["schemas"]["HTTPValidationError"];
1878
+ };
1879
+ };
1880
+ };
1881
+ };
1882
+ getUserSessions: {
1883
+ parameters: {
1884
+ query?: never;
1885
+ header?: {
1886
+ authorization?: string | null;
1887
+ };
1888
+ path?: never;
1889
+ cookie?: never;
1890
+ };
1891
+ requestBody?: never;
1892
+ responses: {
1893
+ /** @description Successful Response */
1894
+ 200: {
1895
+ headers: {
1896
+ [name: string]: unknown;
1897
+ };
1898
+ content: {
1899
+ "application/json": components["schemas"]["StandardResponse"];
1900
+ };
1901
+ };
1902
+ /** @description Validation Error */
1903
+ 422: {
1904
+ headers: {
1905
+ [name: string]: unknown;
1906
+ };
1907
+ content: {
1908
+ "application/json": components["schemas"]["HTTPValidationError"];
1909
+ };
1910
+ };
1911
+ };
1912
+ };
1913
+ deleteAllUserSessions: {
1914
+ parameters: {
1915
+ query?: {
1916
+ /** @description Delete ALL sessions (true) or all EXCEPT current (false) */
1917
+ all?: boolean;
1918
+ };
1919
+ header?: {
1920
+ authorization?: string | null;
1921
+ };
1922
+ path?: never;
1923
+ cookie?: never;
1924
+ };
1925
+ requestBody?: never;
1926
+ responses: {
1927
+ /** @description Successful Response */
1928
+ 200: {
1929
+ headers: {
1930
+ [name: string]: unknown;
1931
+ };
1932
+ content: {
1933
+ "application/json": components["schemas"]["StandardResponse"];
1934
+ };
1935
+ };
1936
+ /** @description Validation Error */
1937
+ 422: {
1938
+ headers: {
1939
+ [name: string]: unknown;
1940
+ };
1941
+ content: {
1942
+ "application/json": components["schemas"]["HTTPValidationError"];
1943
+ };
1944
+ };
1945
+ };
1946
+ };
1947
+ deleteUserSession: {
1948
+ parameters: {
1949
+ query?: never;
1950
+ header?: {
1951
+ authorization?: string | null;
1952
+ };
1953
+ path: {
1954
+ session_id: number;
1955
+ };
1956
+ cookie?: never;
1957
+ };
1958
+ requestBody?: never;
1959
+ responses: {
1960
+ /** @description Successful Response */
1961
+ 200: {
1962
+ headers: {
1963
+ [name: string]: unknown;
1964
+ };
1965
+ content: {
1966
+ "application/json": components["schemas"]["StandardResponse"];
1967
+ };
1968
+ };
1969
+ /** @description Validation Error */
1970
+ 422: {
1971
+ headers: {
1972
+ [name: string]: unknown;
1973
+ };
1974
+ content: {
1975
+ "application/json": components["schemas"]["HTTPValidationError"];
1976
+ };
1977
+ };
1978
+ };
1979
+ };
1980
+ changePassword: {
1981
+ parameters: {
1982
+ query?: never;
1983
+ header?: {
1984
+ authorization?: string | null;
1985
+ };
1986
+ path?: never;
1987
+ cookie?: never;
1988
+ };
1989
+ requestBody: {
1990
+ content: {
1991
+ "application/json": components["schemas"]["ChangePasswordRequest"];
1992
+ };
1993
+ };
1994
+ responses: {
1995
+ /** @description Successful Response */
1996
+ 200: {
1997
+ headers: {
1998
+ [name: string]: unknown;
1999
+ };
2000
+ content: {
2001
+ "application/json": components["schemas"]["StandardResponse"];
2002
+ };
2003
+ };
2004
+ /** @description Validation Error */
2005
+ 422: {
2006
+ headers: {
2007
+ [name: string]: unknown;
2008
+ };
2009
+ content: {
2010
+ "application/json": components["schemas"]["HTTPValidationError"];
2011
+ };
2012
+ };
2013
+ };
2014
+ };
2015
+ linkSocialAccount: {
2016
+ parameters: {
2017
+ query?: never;
2018
+ header?: {
2019
+ authorization?: string | null;
2020
+ };
2021
+ path?: never;
2022
+ cookie?: never;
2023
+ };
2024
+ requestBody: {
2025
+ content: {
2026
+ "application/json": components["schemas"]["SocialLinkRequest"];
2027
+ };
2028
+ };
2029
+ responses: {
2030
+ /** @description Successful Response */
2031
+ 200: {
2032
+ headers: {
2033
+ [name: string]: unknown;
2034
+ };
2035
+ content: {
2036
+ "application/json": components["schemas"]["StandardResponse"];
2037
+ };
2038
+ };
2039
+ /** @description Validation Error */
2040
+ 422: {
2041
+ headers: {
2042
+ [name: string]: unknown;
2043
+ };
2044
+ content: {
2045
+ "application/json": components["schemas"]["HTTPValidationError"];
2046
+ };
2047
+ };
2048
+ };
2049
+ };
2050
+ unlinkSocialAccount: {
2051
+ parameters: {
2052
+ query?: never;
2053
+ header?: {
2054
+ authorization?: string | null;
2055
+ };
2056
+ path: {
2057
+ provider: "google" | "facebook" | "linkedin" | "x" | "apple";
2058
+ };
2059
+ cookie?: never;
2060
+ };
2061
+ requestBody?: never;
2062
+ responses: {
2063
+ /** @description Successful Response */
2064
+ 200: {
2065
+ headers: {
2066
+ [name: string]: unknown;
2067
+ };
2068
+ content: {
2069
+ "application/json": components["schemas"]["StandardResponse"];
2070
+ };
2071
+ };
2072
+ /** @description Validation Error */
2073
+ 422: {
2074
+ headers: {
2075
+ [name: string]: unknown;
2076
+ };
2077
+ content: {
2078
+ "application/json": components["schemas"]["HTTPValidationError"];
2079
+ };
2080
+ };
2081
+ };
2082
+ };
2083
+ createEmailChange: {
2084
+ parameters: {
2085
+ query?: never;
2086
+ header?: {
2087
+ authorization?: string | null;
2088
+ };
2089
+ path?: never;
2090
+ cookie?: never;
2091
+ };
2092
+ requestBody: {
2093
+ content: {
2094
+ "application/json": components["schemas"]["UpdateEmailInitiateRequest"];
2095
+ };
2096
+ };
2097
+ responses: {
2098
+ /** @description Successful Response */
2099
+ 200: {
2100
+ headers: {
2101
+ [name: string]: unknown;
2102
+ };
2103
+ content: {
2104
+ "application/json": components["schemas"]["StandardResponse"];
2105
+ };
2106
+ };
2107
+ /** @description Validation Error */
2108
+ 422: {
2109
+ headers: {
2110
+ [name: string]: unknown;
2111
+ };
2112
+ content: {
2113
+ "application/json": components["schemas"]["HTTPValidationError"];
2114
+ };
2115
+ };
2116
+ };
2117
+ };
2118
+ confirmEmailChange: {
2119
+ parameters: {
2120
+ query?: never;
2121
+ header?: {
2122
+ authorization?: string | null;
2123
+ };
2124
+ path: {
2125
+ /** @description Change ID from createEmailChange response */
2126
+ change_id: string;
2127
+ };
2128
+ cookie?: never;
2129
+ };
2130
+ requestBody: {
2131
+ content: {
2132
+ "application/json": components["schemas"]["UpdateEmailVerifyRequest"];
2133
+ };
2134
+ };
2135
+ responses: {
2136
+ /** @description Successful Response */
2137
+ 200: {
2138
+ headers: {
2139
+ [name: string]: unknown;
2140
+ };
2141
+ content: {
2142
+ "application/json": components["schemas"]["StandardResponse"];
2143
+ };
2144
+ };
2145
+ /** @description Validation Error */
2146
+ 422: {
2147
+ headers: {
2148
+ [name: string]: unknown;
2149
+ };
2150
+ content: {
2151
+ "application/json": components["schemas"]["HTTPValidationError"];
2152
+ };
2153
+ };
2154
+ };
2155
+ };
2156
+ cancelEmailChange: {
2157
+ parameters: {
2158
+ query?: never;
2159
+ header?: {
2160
+ authorization?: string | null;
2161
+ };
2162
+ path: {
2163
+ /** @description Change ID from createEmailChange response */
2164
+ change_id: string;
2165
+ };
2166
+ cookie?: never;
2167
+ };
2168
+ requestBody: {
2169
+ content: {
2170
+ "application/json": components["schemas"]["EmailRollbackRequest"];
2171
+ };
2172
+ };
2173
+ responses: {
2174
+ /** @description Successful Response */
2175
+ 200: {
2176
+ headers: {
2177
+ [name: string]: unknown;
2178
+ };
2179
+ content: {
2180
+ "application/json": components["schemas"]["StandardResponse"];
2181
+ };
2182
+ };
2183
+ /** @description Validation Error */
2184
+ 422: {
2185
+ headers: {
2186
+ [name: string]: unknown;
2187
+ };
2188
+ content: {
2189
+ "application/json": components["schemas"]["HTTPValidationError"];
2190
+ };
2191
+ };
2192
+ };
2193
+ };
2194
+ createMobileChange: {
2195
+ parameters: {
2196
+ query?: never;
2197
+ header?: {
2198
+ authorization?: string | null;
2199
+ };
2200
+ path?: never;
2201
+ cookie?: never;
2202
+ };
2203
+ requestBody: {
2204
+ content: {
2205
+ "application/json": components["schemas"]["UpdateMobileInitiateRequest"];
2206
+ };
2207
+ };
2208
+ responses: {
2209
+ /** @description Successful Response */
2210
+ 200: {
2211
+ headers: {
2212
+ [name: string]: unknown;
2213
+ };
2214
+ content: {
2215
+ "application/json": components["schemas"]["StandardResponse"];
2216
+ };
2217
+ };
2218
+ /** @description Validation Error */
2219
+ 422: {
2220
+ headers: {
2221
+ [name: string]: unknown;
2222
+ };
2223
+ content: {
2224
+ "application/json": components["schemas"]["HTTPValidationError"];
2225
+ };
2226
+ };
2227
+ };
2228
+ };
2229
+ confirmMobileChange: {
2230
+ parameters: {
2231
+ query?: never;
2232
+ header?: {
2233
+ authorization?: string | null;
2234
+ };
2235
+ path: {
2236
+ /** @description Change ID from createMobileChange response */
2237
+ change_id: string;
2238
+ };
2239
+ cookie?: never;
2240
+ };
2241
+ requestBody: {
2242
+ content: {
2243
+ "application/json": components["schemas"]["UpdateMobileVerifyRequest"];
2244
+ };
2245
+ };
2246
+ responses: {
2247
+ /** @description Successful Response */
2248
+ 200: {
2249
+ headers: {
2250
+ [name: string]: unknown;
2251
+ };
2252
+ content: {
2253
+ "application/json": components["schemas"]["StandardResponse"];
2254
+ };
2255
+ };
2256
+ /** @description Validation Error */
2257
+ 422: {
2258
+ headers: {
2259
+ [name: string]: unknown;
2260
+ };
2261
+ content: {
2262
+ "application/json": components["schemas"]["HTTPValidationError"];
2263
+ };
2264
+ };
2265
+ };
2266
+ };
2267
+ createAccountDeletion: {
2268
+ parameters: {
2269
+ query?: never;
2270
+ header?: {
2271
+ authorization?: string | null;
2272
+ };
2273
+ path?: never;
2274
+ cookie?: never;
2275
+ };
2276
+ requestBody: {
2277
+ content: {
2278
+ "application/json": components["schemas"]["DeleteAccountInitiateRequest"];
2279
+ };
2280
+ };
2281
+ responses: {
2282
+ /** @description Successful Response */
2283
+ 200: {
2284
+ headers: {
2285
+ [name: string]: unknown;
2286
+ };
2287
+ content: {
2288
+ "application/json": components["schemas"]["StandardResponse"];
2289
+ };
2290
+ };
2291
+ /** @description Validation Error */
2292
+ 422: {
2293
+ headers: {
2294
+ [name: string]: unknown;
2295
+ };
2296
+ content: {
2297
+ "application/json": components["schemas"]["HTTPValidationError"];
2298
+ };
2299
+ };
2300
+ };
2301
+ };
2302
+ confirmAccountDeletion: {
2303
+ parameters: {
2304
+ query?: never;
2305
+ header?: {
2306
+ authorization?: string | null;
2307
+ };
2308
+ path: {
2309
+ /** @description Deletion ID from createAccountDeletion response */
2310
+ deletion_id: string;
2311
+ };
2312
+ cookie?: never;
2313
+ };
2314
+ requestBody: {
2315
+ content: {
2316
+ "application/json": components["schemas"]["DeleteAccountConfirmRequest"];
2317
+ };
2318
+ };
2319
+ responses: {
2320
+ /** @description Successful Response */
2321
+ 200: {
2322
+ headers: {
2323
+ [name: string]: unknown;
2324
+ };
2325
+ content: {
2326
+ "application/json": components["schemas"]["StandardResponse"];
2327
+ };
2328
+ };
2329
+ /** @description Validation Error */
2330
+ 422: {
2331
+ headers: {
2332
+ [name: string]: unknown;
2333
+ };
2334
+ content: {
2335
+ "application/json": components["schemas"]["HTTPValidationError"];
2336
+ };
2337
+ };
2338
+ };
2339
+ };
2340
+ cancelAccountDeletion: {
2341
+ parameters: {
2342
+ query?: never;
2343
+ header?: {
2344
+ authorization?: string | null;
2345
+ };
2346
+ path: {
2347
+ /** @description Deletion ID from createAccountDeletion response */
2348
+ deletion_id: string;
2349
+ };
2350
+ cookie?: never;
2351
+ };
2352
+ requestBody: {
2353
+ content: {
2354
+ "application/json": components["schemas"]["DeleteAccountCancelRequest"];
2355
+ };
2356
+ };
2357
+ responses: {
2358
+ /** @description Successful Response */
2359
+ 200: {
2360
+ headers: {
2361
+ [name: string]: unknown;
2362
+ };
2363
+ content: {
2364
+ "application/json": components["schemas"]["StandardResponse"];
2365
+ };
2366
+ };
2367
+ /** @description Validation Error */
2368
+ 422: {
2369
+ headers: {
2370
+ [name: string]: unknown;
2371
+ };
2372
+ content: {
2373
+ "application/json": components["schemas"]["HTTPValidationError"];
2374
+ };
2375
+ };
2376
+ };
2377
+ };
2378
+ createMFAEnrollment: {
2379
+ parameters: {
2380
+ query?: never;
2381
+ header?: {
2382
+ authorization?: string | null;
2383
+ };
2384
+ path?: never;
2385
+ cookie?: never;
2386
+ };
2387
+ requestBody: {
2388
+ content: {
2389
+ "application/json": components["schemas"]["MFAEnrollRequest"];
2390
+ };
2391
+ };
2392
+ responses: {
2393
+ /** @description Successful Response */
2394
+ 200: {
2395
+ headers: {
2396
+ [name: string]: unknown;
2397
+ };
2398
+ content: {
2399
+ "application/json": components["schemas"]["StandardResponse"];
2400
+ };
2401
+ };
2402
+ /** @description Validation Error */
2403
+ 422: {
2404
+ headers: {
2405
+ [name: string]: unknown;
2406
+ };
2407
+ content: {
2408
+ "application/json": components["schemas"]["HTTPValidationError"];
2409
+ };
2410
+ };
2411
+ };
2412
+ };
2413
+ confirmMFAEnrollment: {
2414
+ parameters: {
2415
+ query?: never;
2416
+ header?: {
2417
+ authorization?: string | null;
2418
+ };
2419
+ path: {
2420
+ /** @description Enrollment ID from createMFAEnrollment (use 'totp' for TOTP) */
2421
+ enrollment_id: string;
2422
+ };
2423
+ cookie?: never;
2424
+ };
2425
+ requestBody: {
2426
+ content: {
2427
+ "application/json": components["schemas"]["MFAConfirmEnrollRequest"];
2428
+ };
2429
+ };
2430
+ responses: {
2431
+ /** @description Successful Response */
2432
+ 200: {
2433
+ headers: {
2434
+ [name: string]: unknown;
2435
+ };
2436
+ content: {
2437
+ "application/json": components["schemas"]["StandardResponse"];
2438
+ };
2439
+ };
2440
+ /** @description Validation Error */
2441
+ 422: {
2442
+ headers: {
2443
+ [name: string]: unknown;
2444
+ };
2445
+ content: {
2446
+ "application/json": components["schemas"]["HTTPValidationError"];
2447
+ };
2448
+ };
2449
+ };
2450
+ };
2451
+ listMFAMethods: {
2452
+ parameters: {
2453
+ query?: never;
2454
+ header?: {
2455
+ authorization?: string | null;
2456
+ };
2457
+ path?: never;
2458
+ cookie?: never;
2459
+ };
2460
+ requestBody?: never;
2461
+ responses: {
2462
+ /** @description Successful Response */
2463
+ 200: {
2464
+ headers: {
2465
+ [name: string]: unknown;
2466
+ };
2467
+ content: {
2468
+ "application/json": components["schemas"]["StandardResponse"];
2469
+ };
2470
+ };
2471
+ /** @description Validation Error */
2472
+ 422: {
2473
+ headers: {
2474
+ [name: string]: unknown;
2475
+ };
2476
+ content: {
2477
+ "application/json": components["schemas"]["HTTPValidationError"];
2478
+ };
2479
+ };
2480
+ };
2481
+ };
2482
+ disableMFAMethod: {
2483
+ parameters: {
2484
+ query?: never;
2485
+ header: {
2486
+ /** @description Password confirmation required */
2487
+ "x-password-confirmation": string;
2488
+ authorization?: string | null;
2489
+ };
2490
+ path: {
2491
+ /** @description Method to disable (totp, sms, email) */
2492
+ method: string;
2493
+ };
2494
+ cookie?: never;
2495
+ };
2496
+ requestBody?: never;
2497
+ responses: {
2498
+ /** @description Successful Response */
2499
+ 200: {
2500
+ headers: {
2501
+ [name: string]: unknown;
2502
+ };
2503
+ content: {
2504
+ "application/json": components["schemas"]["StandardResponse"];
2505
+ };
2506
+ };
2507
+ /** @description Validation Error */
2508
+ 422: {
2509
+ headers: {
2510
+ [name: string]: unknown;
2511
+ };
2512
+ content: {
2513
+ "application/json": components["schemas"]["HTTPValidationError"];
2514
+ };
2515
+ };
2516
+ };
2517
+ };
2518
+ getBackupCodes: {
2519
+ parameters: {
2520
+ query?: never;
2521
+ header?: {
2522
+ authorization?: string | null;
2523
+ };
2524
+ path?: never;
2525
+ cookie?: never;
2526
+ };
2527
+ requestBody?: never;
2528
+ responses: {
2529
+ /** @description Successful Response */
2530
+ 200: {
2531
+ headers: {
2532
+ [name: string]: unknown;
2533
+ };
2534
+ content: {
2535
+ "application/json": components["schemas"]["StandardResponse"];
2536
+ };
2537
+ };
2538
+ /** @description Validation Error */
2539
+ 422: {
2540
+ headers: {
2541
+ [name: string]: unknown;
2542
+ };
2543
+ content: {
2544
+ "application/json": components["schemas"]["HTTPValidationError"];
2545
+ };
2546
+ };
2547
+ };
2548
+ };
2549
+ regenerateBackupCodes: {
2550
+ parameters: {
2551
+ query?: never;
2552
+ header: {
2553
+ /** @description Password confirmation required */
2554
+ "x-password-confirmation": string;
2555
+ authorization?: string | null;
2556
+ };
2557
+ path?: never;
2558
+ cookie?: never;
2559
+ };
2560
+ requestBody?: never;
2561
+ responses: {
2562
+ /** @description Successful Response */
2563
+ 200: {
2564
+ headers: {
2565
+ [name: string]: unknown;
2566
+ };
2567
+ content: {
2568
+ "application/json": components["schemas"]["StandardResponse"];
2569
+ };
2570
+ };
2571
+ /** @description Validation Error */
2572
+ 422: {
2573
+ headers: {
2574
+ [name: string]: unknown;
2575
+ };
2576
+ content: {
2577
+ "application/json": components["schemas"]["HTTPValidationError"];
2578
+ };
2579
+ };
2580
+ };
2581
+ };
2582
+ listTrustedDevices: {
2583
+ parameters: {
2584
+ query?: never;
2585
+ header?: {
2586
+ authorization?: string | null;
2587
+ };
2588
+ path?: never;
2589
+ cookie?: never;
2590
+ };
2591
+ requestBody?: never;
2592
+ responses: {
2593
+ /** @description Successful Response */
2594
+ 200: {
2595
+ headers: {
2596
+ [name: string]: unknown;
2597
+ };
2598
+ content: {
2599
+ "application/json": components["schemas"]["StandardResponse"];
2600
+ };
2601
+ };
2602
+ /** @description Validation Error */
2603
+ 422: {
2604
+ headers: {
2605
+ [name: string]: unknown;
2606
+ };
2607
+ content: {
2608
+ "application/json": components["schemas"]["HTTPValidationError"];
2609
+ };
2610
+ };
2611
+ };
2612
+ };
2613
+ revokeTrustedDevice: {
2614
+ parameters: {
2615
+ query?: never;
2616
+ header?: {
2617
+ authorization?: string | null;
2618
+ };
2619
+ path: {
2620
+ /** @description Device ID to revoke (dev_xxx) */
2621
+ device_id: string;
2622
+ };
2623
+ cookie?: never;
2624
+ };
2625
+ requestBody?: never;
2626
+ responses: {
2627
+ /** @description Successful Response */
2628
+ 200: {
2629
+ headers: {
2630
+ [name: string]: unknown;
2631
+ };
2632
+ content: {
2633
+ "application/json": components["schemas"]["StandardResponse"];
2634
+ };
2635
+ };
2636
+ /** @description Validation Error */
2637
+ 422: {
2638
+ headers: {
2639
+ [name: string]: unknown;
2640
+ };
2641
+ content: {
2642
+ "application/json": components["schemas"]["HTTPValidationError"];
2643
+ };
2644
+ };
2645
+ };
2646
+ };
2647
+ }
2648
+ //# sourceMappingURL=generated.d.ts.map