@techelusive/nest-auth 0.0.0-stage → 0.2.1

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 (340) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/LICENSE +21 -0
  3. package/README.md +204 -2
  4. package/api/openapi.json +4399 -0
  5. package/api/techelusive-authentication.postman_collection.json +3178 -0
  6. package/dist/auth-options.d.ts +156 -0
  7. package/dist/auth-options.js +3 -0
  8. package/dist/auth-options.js.map +1 -0
  9. package/dist/auth-options.validation.d.ts +9 -0
  10. package/dist/auth-options.validation.js +74 -0
  11. package/dist/auth-options.validation.js.map +1 -0
  12. package/dist/auth.module.d.ts +38 -0
  13. package/dist/auth.module.js +173 -0
  14. package/dist/auth.module.js.map +1 -0
  15. package/dist/common/auth-error.d.ts +16 -0
  16. package/dist/common/auth-error.js +23 -0
  17. package/dist/common/auth-error.js.map +1 -0
  18. package/dist/common/auth-exception.filter.d.ts +24 -0
  19. package/dist/common/auth-exception.filter.js +66 -0
  20. package/dist/common/auth-exception.filter.js.map +1 -0
  21. package/dist/common/crypto/jwt.d.ts +89 -0
  22. package/dist/common/crypto/jwt.js +144 -0
  23. package/dist/common/crypto/jwt.js.map +1 -0
  24. package/dist/common/crypto/random-secrets.d.ts +78 -0
  25. package/dist/common/crypto/random-secrets.js +113 -0
  26. package/dist/common/crypto/random-secrets.js.map +1 -0
  27. package/dist/common/crypto/remote-public-keys.d.ts +49 -0
  28. package/dist/common/crypto/remote-public-keys.js +105 -0
  29. package/dist/common/crypto/remote-public-keys.js.map +1 -0
  30. package/dist/common/crypto/totp.d.ts +68 -0
  31. package/dist/common/crypto/totp.js +148 -0
  32. package/dist/common/crypto/totp.js.map +1 -0
  33. package/dist/common/encryption.service.d.ts +36 -0
  34. package/dist/common/encryption.service.js +111 -0
  35. package/dist/common/encryption.service.js.map +1 -0
  36. package/dist/common/identifiers.d.ts +48 -0
  37. package/dist/common/identifiers.js +89 -0
  38. package/dist/common/identifiers.js.map +1 -0
  39. package/dist/common/network-safety.d.ts +19 -0
  40. package/dist/common/network-safety.js +72 -0
  41. package/dist/common/network-safety.js.map +1 -0
  42. package/dist/common/rate-limiter.service.d.ts +63 -0
  43. package/dist/common/rate-limiter.service.js +158 -0
  44. package/dist/common/rate-limiter.service.js.map +1 -0
  45. package/dist/common/refresh-token-cookie.d.ts +78 -0
  46. package/dist/common/refresh-token-cookie.js +185 -0
  47. package/dist/common/refresh-token-cookie.js.map +1 -0
  48. package/dist/common/request-context.d.ts +14 -0
  49. package/dist/common/request-context.js +22 -0
  50. package/dist/common/request-context.js.map +1 -0
  51. package/dist/common/strict-validation.pipe.d.ts +8 -0
  52. package/dist/common/strict-validation.pipe.js +16 -0
  53. package/dist/common/strict-validation.pipe.js.map +1 -0
  54. package/dist/common/time.d.ts +15 -0
  55. package/dist/common/time.js +34 -0
  56. package/dist/common/time.js.map +1 -0
  57. package/dist/constants.d.ts +1326 -0
  58. package/dist/constants.js +1142 -0
  59. package/dist/constants.js.map +1 -0
  60. package/dist/database/create-auth-tables.migration.d.ts +26 -0
  61. package/dist/database/create-auth-tables.migration.js +291 -0
  62. package/dist/database/create-auth-tables.migration.js.map +1 -0
  63. package/dist/database/email-change-and-retention.migration.d.ts +25 -0
  64. package/dist/database/email-change-and-retention.migration.js +54 -0
  65. package/dist/database/email-change-and-retention.migration.js.map +1 -0
  66. package/dist/database/entities/api-key.entity.d.ts +17 -0
  67. package/dist/database/entities/api-key.entity.js +80 -0
  68. package/dist/database/entities/api-key.entity.js.map +1 -0
  69. package/dist/database/entities/audit-log.entity.d.ts +13 -0
  70. package/dist/database/entities/audit-log.entity.js +64 -0
  71. package/dist/database/entities/audit-log.entity.js.map +1 -0
  72. package/dist/database/entities/backup-code.entity.d.ts +9 -0
  73. package/dist/database/entities/backup-code.entity.js +52 -0
  74. package/dist/database/entities/backup-code.entity.js.map +1 -0
  75. package/dist/database/entities/index.d.ts +43 -0
  76. package/dist/database/entities/index.js +82 -0
  77. package/dist/database/entities/index.js.map +1 -0
  78. package/dist/database/entities/json-object.d.ts +12 -0
  79. package/dist/database/entities/json-object.js +3 -0
  80. package/dist/database/entities/json-object.js.map +1 -0
  81. package/dist/database/entities/link-token.entity.d.ts +15 -0
  82. package/dist/database/entities/link-token.entity.js +64 -0
  83. package/dist/database/entities/link-token.entity.js.map +1 -0
  84. package/dist/database/entities/one-time-code.entity.d.ts +16 -0
  85. package/dist/database/entities/one-time-code.entity.js +69 -0
  86. package/dist/database/entities/one-time-code.entity.js.map +1 -0
  87. package/dist/database/entities/organization-invitation.entity.d.ts +14 -0
  88. package/dist/database/entities/organization-invitation.entity.js +73 -0
  89. package/dist/database/entities/organization-invitation.entity.js.map +1 -0
  90. package/dist/database/entities/organization-member.entity.d.ts +9 -0
  91. package/dist/database/entities/organization-member.entity.js +48 -0
  92. package/dist/database/entities/organization-member.entity.js.map +1 -0
  93. package/dist/database/entities/organization.entity.d.ts +12 -0
  94. package/dist/database/entities/organization.entity.js +58 -0
  95. package/dist/database/entities/organization.entity.js.map +1 -0
  96. package/dist/database/entities/passkey.entity.d.ts +19 -0
  97. package/dist/database/entities/passkey.entity.js +78 -0
  98. package/dist/database/entities/passkey.entity.js.map +1 -0
  99. package/dist/database/entities/password.entity.d.ts +6 -0
  100. package/dist/database/entities/password.entity.js +36 -0
  101. package/dist/database/entities/password.entity.js.map +1 -0
  102. package/dist/database/entities/refresh-token.entity.d.ts +9 -0
  103. package/dist/database/entities/refresh-token.entity.js +53 -0
  104. package/dist/database/entities/refresh-token.entity.js.map +1 -0
  105. package/dist/database/entities/session.entity.d.ts +20 -0
  106. package/dist/database/entities/session.entity.js +87 -0
  107. package/dist/database/entities/session.entity.js.map +1 -0
  108. package/dist/database/entities/settings.entity.d.ts +7 -0
  109. package/dist/database/entities/settings.entity.js +41 -0
  110. package/dist/database/entities/settings.entity.js.map +1 -0
  111. package/dist/database/entities/sign-in-challenge.entity.d.ts +23 -0
  112. package/dist/database/entities/sign-in-challenge.entity.js +80 -0
  113. package/dist/database/entities/sign-in-challenge.entity.js.map +1 -0
  114. package/dist/database/entities/signing-key.entity.d.ts +11 -0
  115. package/dist/database/entities/signing-key.entity.js +54 -0
  116. package/dist/database/entities/signing-key.entity.js.map +1 -0
  117. package/dist/database/entities/social-account.entity.d.ts +13 -0
  118. package/dist/database/entities/social-account.entity.js +54 -0
  119. package/dist/database/entities/social-account.entity.js.map +1 -0
  120. package/dist/database/entities/two-factor-secret.entity.d.ts +10 -0
  121. package/dist/database/entities/two-factor-secret.entity.js +48 -0
  122. package/dist/database/entities/two-factor-secret.entity.js.map +1 -0
  123. package/dist/database/entities/user.entity.d.ts +34 -0
  124. package/dist/database/entities/user.entity.js +129 -0
  125. package/dist/database/entities/user.entity.js.map +1 -0
  126. package/dist/database/entities/webhook-delivery.entity.d.ts +17 -0
  127. package/dist/database/entities/webhook-delivery.entity.js +79 -0
  128. package/dist/database/entities/webhook-delivery.entity.js.map +1 -0
  129. package/dist/database/entities/webhook.entity.d.ts +12 -0
  130. package/dist/database/entities/webhook.entity.js +58 -0
  131. package/dist/database/entities/webhook.entity.js.map +1 -0
  132. package/dist/database/typeorm-row.d.ts +21 -0
  133. package/dist/database/typeorm-row.js +29 -0
  134. package/dist/database/typeorm-row.js.map +1 -0
  135. package/dist/features/account/account.controller.d.ts +259 -0
  136. package/dist/features/account/account.controller.js +372 -0
  137. package/dist/features/account/account.controller.js.map +1 -0
  138. package/dist/features/account/account.dto.d.ts +16 -0
  139. package/dist/features/account/account.dto.js +61 -0
  140. package/dist/features/account/account.dto.js.map +1 -0
  141. package/dist/features/account/data-export.service.d.ts +85 -0
  142. package/dist/features/account/data-export.service.js +125 -0
  143. package/dist/features/account/data-export.service.js.map +1 -0
  144. package/dist/features/account/health.service.d.ts +30 -0
  145. package/dist/features/account/health.service.js +59 -0
  146. package/dist/features/account/health.service.js.map +1 -0
  147. package/dist/features/admin/admin.controller.d.ts +382 -0
  148. package/dist/features/admin/admin.controller.js +623 -0
  149. package/dist/features/admin/admin.controller.js.map +1 -0
  150. package/dist/features/admin/admin.dto.d.ts +61 -0
  151. package/dist/features/admin/admin.dto.js +253 -0
  152. package/dist/features/admin/admin.dto.js.map +1 -0
  153. package/dist/features/admin/admin.service.d.ts +142 -0
  154. package/dist/features/admin/admin.service.js +227 -0
  155. package/dist/features/admin/admin.service.js.map +1 -0
  156. package/dist/features/api-keys/api-keys.service.d.ts +67 -0
  157. package/dist/features/api-keys/api-keys.service.js +144 -0
  158. package/dist/features/api-keys/api-keys.service.js.map +1 -0
  159. package/dist/features/email-change/email-change.controller.d.ts +38 -0
  160. package/dist/features/email-change/email-change.controller.js +85 -0
  161. package/dist/features/email-change/email-change.controller.js.map +1 -0
  162. package/dist/features/email-change/email-change.dto.d.ts +10 -0
  163. package/dist/features/email-change/email-change.dto.js +43 -0
  164. package/dist/features/email-change/email-change.dto.js.map +1 -0
  165. package/dist/features/email-change/email-change.service.d.ts +74 -0
  166. package/dist/features/email-change/email-change.service.js +179 -0
  167. package/dist/features/email-change/email-change.service.js.map +1 -0
  168. package/dist/features/email-links/email-verification.service.d.ts +46 -0
  169. package/dist/features/email-links/email-verification.service.js +94 -0
  170. package/dist/features/email-links/email-verification.service.js.map +1 -0
  171. package/dist/features/email-links/link-tokens.service.d.ts +44 -0
  172. package/dist/features/email-links/link-tokens.service.js +122 -0
  173. package/dist/features/email-links/link-tokens.service.js.map +1 -0
  174. package/dist/features/events/auth-events.service.d.ts +52 -0
  175. package/dist/features/events/auth-events.service.js +117 -0
  176. package/dist/features/events/auth-events.service.js.map +1 -0
  177. package/dist/features/maintenance/data-retention.service.d.ts +60 -0
  178. package/dist/features/maintenance/data-retention.service.js +182 -0
  179. package/dist/features/maintenance/data-retention.service.js.map +1 -0
  180. package/dist/features/notifications/notifications.service.d.ts +40 -0
  181. package/dist/features/notifications/notifications.service.js +94 -0
  182. package/dist/features/notifications/notifications.service.js.map +1 -0
  183. package/dist/features/one-time-codes/one-time-codes.service.d.ts +40 -0
  184. package/dist/features/one-time-codes/one-time-codes.service.js +102 -0
  185. package/dist/features/one-time-codes/one-time-codes.service.js.map +1 -0
  186. package/dist/features/organizations/organizations.controller.d.ts +220 -0
  187. package/dist/features/organizations/organizations.controller.js +337 -0
  188. package/dist/features/organizations/organizations.controller.js.map +1 -0
  189. package/dist/features/organizations/organizations.dto.d.ts +31 -0
  190. package/dist/features/organizations/organizations.dto.js +100 -0
  191. package/dist/features/organizations/organizations.dto.js.map +1 -0
  192. package/dist/features/organizations/organizations.service.d.ts +274 -0
  193. package/dist/features/organizations/organizations.service.js +481 -0
  194. package/dist/features/organizations/organizations.service.js.map +1 -0
  195. package/dist/features/passkeys/passkeys.controller.d.ts +92 -0
  196. package/dist/features/passkeys/passkeys.controller.js +183 -0
  197. package/dist/features/passkeys/passkeys.controller.js.map +1 -0
  198. package/dist/features/passkeys/passkeys.dto.d.ts +13 -0
  199. package/dist/features/passkeys/passkeys.dto.js +50 -0
  200. package/dist/features/passkeys/passkeys.dto.js.map +1 -0
  201. package/dist/features/passkeys/passkeys.service.d.ts +159 -0
  202. package/dist/features/passkeys/passkeys.service.js +350 -0
  203. package/dist/features/passkeys/passkeys.service.js.map +1 -0
  204. package/dist/features/passwordless/passwordless-auth.service.d.ts +152 -0
  205. package/dist/features/passwordless/passwordless-auth.service.js +304 -0
  206. package/dist/features/passwordless/passwordless-auth.service.js.map +1 -0
  207. package/dist/features/passwordless/passwordless.controller.d.ts +75 -0
  208. package/dist/features/passwordless/passwordless.controller.js +163 -0
  209. package/dist/features/passwordless/passwordless.controller.js.map +1 -0
  210. package/dist/features/passwordless/passwordless.dto.d.ts +29 -0
  211. package/dist/features/passwordless/passwordless.dto.js +101 -0
  212. package/dist/features/passwordless/passwordless.dto.js.map +1 -0
  213. package/dist/features/passwords/password-auth.service.d.ts +154 -0
  214. package/dist/features/passwords/password-auth.service.js +317 -0
  215. package/dist/features/passwords/password-auth.service.js.map +1 -0
  216. package/dist/features/passwords/password-policy.service.d.ts +63 -0
  217. package/dist/features/passwords/password-policy.service.js +175 -0
  218. package/dist/features/passwords/password-policy.service.js.map +1 -0
  219. package/dist/features/passwords/password.controller.d.ts +95 -0
  220. package/dist/features/passwords/password.controller.js +193 -0
  221. package/dist/features/passwords/password.controller.js.map +1 -0
  222. package/dist/features/passwords/password.dto.d.ts +36 -0
  223. package/dist/features/passwords/password.dto.js +140 -0
  224. package/dist/features/passwords/password.dto.js.map +1 -0
  225. package/dist/features/sessions/session.service.d.ts +132 -0
  226. package/dist/features/sessions/session.service.js +308 -0
  227. package/dist/features/sessions/session.service.js.map +1 -0
  228. package/dist/features/sessions/session.types.d.ts +34 -0
  229. package/dist/features/sessions/session.types.js +3 -0
  230. package/dist/features/sessions/session.types.js.map +1 -0
  231. package/dist/features/settings/settings.defaults.d.ts +2 -0
  232. package/dist/features/settings/settings.defaults.js +7 -0
  233. package/dist/features/settings/settings.defaults.js.map +1 -0
  234. package/dist/features/settings/settings.service.d.ts +44 -0
  235. package/dist/features/settings/settings.service.js +112 -0
  236. package/dist/features/settings/settings.service.js.map +1 -0
  237. package/dist/features/settings/settings.types.d.ts +133 -0
  238. package/dist/features/settings/settings.types.js +3 -0
  239. package/dist/features/settings/settings.types.js.map +1 -0
  240. package/dist/features/settings/settings.validation.d.ts +33 -0
  241. package/dist/features/settings/settings.validation.js +614 -0
  242. package/dist/features/settings/settings.validation.js.map +1 -0
  243. package/dist/features/sign-in/sign-in-challenges.service.d.ts +54 -0
  244. package/dist/features/sign-in/sign-in-challenges.service.js +104 -0
  245. package/dist/features/sign-in/sign-in-challenges.service.js.map +1 -0
  246. package/dist/features/sign-in/sign-in.service.d.ts +127 -0
  247. package/dist/features/sign-in/sign-in.service.js +248 -0
  248. package/dist/features/sign-in/sign-in.service.js.map +1 -0
  249. package/dist/features/sign-in/sign-in.types.d.ts +22 -0
  250. package/dist/features/sign-in/sign-in.types.js +3 -0
  251. package/dist/features/sign-in/sign-in.types.js.map +1 -0
  252. package/dist/features/signing-keys/jwks.controller.d.ts +17 -0
  253. package/dist/features/signing-keys/jwks.controller.js +51 -0
  254. package/dist/features/signing-keys/jwks.controller.js.map +1 -0
  255. package/dist/features/signing-keys/signing-keys.service.d.ts +67 -0
  256. package/dist/features/signing-keys/signing-keys.service.js +142 -0
  257. package/dist/features/signing-keys/signing-keys.service.js.map +1 -0
  258. package/dist/features/social/social-auth.service.d.ts +100 -0
  259. package/dist/features/social/social-auth.service.js +232 -0
  260. package/dist/features/social/social-auth.service.js.map +1 -0
  261. package/dist/features/social/social-providers.service.d.ts +97 -0
  262. package/dist/features/social/social-providers.service.js +214 -0
  263. package/dist/features/social/social-providers.service.js.map +1 -0
  264. package/dist/features/social/social.controller.d.ts +54 -0
  265. package/dist/features/social/social.controller.js +124 -0
  266. package/dist/features/social/social.controller.js.map +1 -0
  267. package/dist/features/social/social.dto.d.ts +11 -0
  268. package/dist/features/social/social.dto.js +38 -0
  269. package/dist/features/social/social.dto.js.map +1 -0
  270. package/dist/features/two-factor/two-factor.controller.d.ts +84 -0
  271. package/dist/features/two-factor/two-factor.controller.js +174 -0
  272. package/dist/features/two-factor/two-factor.controller.js.map +1 -0
  273. package/dist/features/two-factor/two-factor.dto.d.ts +10 -0
  274. package/dist/features/two-factor/two-factor.dto.js +37 -0
  275. package/dist/features/two-factor/two-factor.dto.js.map +1 -0
  276. package/dist/features/two-factor/two-factor.service.d.ts +171 -0
  277. package/dist/features/two-factor/two-factor.service.js +348 -0
  278. package/dist/features/two-factor/two-factor.service.js.map +1 -0
  279. package/dist/features/users/sign-in-methods.service.d.ts +40 -0
  280. package/dist/features/users/sign-in-methods.service.js +81 -0
  281. package/dist/features/users/sign-in-methods.service.js.map +1 -0
  282. package/dist/features/users/sign-up-rules.d.ts +12 -0
  283. package/dist/features/users/sign-up-rules.js +29 -0
  284. package/dist/features/users/sign-up-rules.js.map +1 -0
  285. package/dist/features/users/users.service.d.ts +246 -0
  286. package/dist/features/users/users.service.js +509 -0
  287. package/dist/features/users/users.service.js.map +1 -0
  288. package/dist/features/users/users.types.d.ts +24 -0
  289. package/dist/features/users/users.types.js +3 -0
  290. package/dist/features/users/users.types.js.map +1 -0
  291. package/dist/features/webhooks/webhook-delivery.worker.d.ts +55 -0
  292. package/dist/features/webhooks/webhook-delivery.worker.js +175 -0
  293. package/dist/features/webhooks/webhook-delivery.worker.js.map +1 -0
  294. package/dist/features/webhooks/webhook-signature.d.ts +28 -0
  295. package/dist/features/webhooks/webhook-signature.js +85 -0
  296. package/dist/features/webhooks/webhook-signature.js.map +1 -0
  297. package/dist/features/webhooks/webhooks.service.d.ts +144 -0
  298. package/dist/features/webhooks/webhooks.service.js +238 -0
  299. package/dist/features/webhooks/webhooks.service.js.map +1 -0
  300. package/dist/guards/auth.decorators.d.ts +65 -0
  301. package/dist/guards/auth.decorators.js +68 -0
  302. package/dist/guards/auth.decorators.js.map +1 -0
  303. package/dist/guards/auth.guard.d.ts +47 -0
  304. package/dist/guards/auth.guard.js +132 -0
  305. package/dist/guards/auth.guard.js.map +1 -0
  306. package/dist/index.d.ts +38 -0
  307. package/dist/index.js +95 -0
  308. package/dist/index.js.map +1 -0
  309. package/dist/integrations/console-email-sender.d.ts +15 -0
  310. package/dist/integrations/console-email-sender.js +26 -0
  311. package/dist/integrations/console-email-sender.js.map +1 -0
  312. package/dist/integrations/msg91-sms-sender.d.ts +28 -0
  313. package/dist/integrations/msg91-sms-sender.js +46 -0
  314. package/dist/integrations/msg91-sms-sender.js.map +1 -0
  315. package/docs/README.md +39 -0
  316. package/docs/admin-api-keys-webhooks.md +147 -0
  317. package/docs/api-reference.md +175 -0
  318. package/docs/architecture.md +119 -0
  319. package/docs/client-integration.md +192 -0
  320. package/docs/code-walkthrough.md +273 -0
  321. package/docs/configuration.md +229 -0
  322. package/docs/endpoints/README.md +151 -0
  323. package/docs/endpoints/account.md +363 -0
  324. package/docs/endpoints/admin.md +422 -0
  325. package/docs/endpoints/email-password.md +261 -0
  326. package/docs/endpoints/organizations.md +192 -0
  327. package/docs/endpoints/passkeys.md +195 -0
  328. package/docs/endpoints/passwordless.md +214 -0
  329. package/docs/endpoints/social.md +116 -0
  330. package/docs/endpoints/two-factor.md +146 -0
  331. package/docs/error-codes.md +100 -0
  332. package/docs/events.md +83 -0
  333. package/docs/getting-started.md +139 -0
  334. package/docs/manual-testing.md +215 -0
  335. package/docs/organizations.md +86 -0
  336. package/docs/production-checklist.md +60 -0
  337. package/docs/protecting-routes.md +147 -0
  338. package/docs/security.md +61 -0
  339. package/docs/sign-in-flows.md +294 -0
  340. package/package.json +92 -4
@@ -0,0 +1,4399 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "@techelusive/nest-auth",
5
+ "version": "0.2.0",
6
+ "description": "Authentication API for NestJS apps. Every response has `success: true|false`; errors carry a stable `code`.\n\nUse **Authorize** with an access token from Login (or any sign-in) to call protected endpoints."
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "http://localhost:3000",
11
+ "description": "Local playground"
12
+ }
13
+ ],
14
+ "tags": [
15
+ {
16
+ "name": "1. Email + password"
17
+ },
18
+ {
19
+ "name": "2. Passwordless"
20
+ },
21
+ {
22
+ "name": "3. Account and sessions"
23
+ },
24
+ {
25
+ "name": "4. Two-factor"
26
+ },
27
+ {
28
+ "name": "5. Social sign-in"
29
+ },
30
+ {
31
+ "name": "6. Passkeys"
32
+ },
33
+ {
34
+ "name": "7. Organizations"
35
+ },
36
+ {
37
+ "name": "8. Admin"
38
+ },
39
+ {
40
+ "name": "9. Public keys"
41
+ }
42
+ ],
43
+ "paths": {
44
+ "/auth/register": {
45
+ "post": {
46
+ "tags": [
47
+ "1. Email + password"
48
+ ],
49
+ "summary": "Register",
50
+ "description": "Default settings: returns verification_required and emails a verification link (see the dev inbox).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
51
+ "operationId": "post_auth_register",
52
+ "security": [],
53
+ "parameters": [],
54
+ "responses": {
55
+ "201": {
56
+ "description": "Success",
57
+ "content": {
58
+ "application/json": {
59
+ "schema": {
60
+ "$ref": "#/components/schemas/Success"
61
+ }
62
+ }
63
+ }
64
+ },
65
+ "400": {
66
+ "$ref": "#/components/responses/Error"
67
+ },
68
+ "401": {
69
+ "$ref": "#/components/responses/Error"
70
+ },
71
+ "403": {
72
+ "$ref": "#/components/responses/Error"
73
+ },
74
+ "429": {
75
+ "$ref": "#/components/responses/Error"
76
+ }
77
+ },
78
+ "requestBody": {
79
+ "required": true,
80
+ "content": {
81
+ "application/json": {
82
+ "schema": {
83
+ "type": "object"
84
+ },
85
+ "example": {
86
+ "email": "asha@example.com",
87
+ "password": "correct horse battery",
88
+ "firstName": "Asha",
89
+ "lastName": "Rao",
90
+ "acceptTerms": true,
91
+ "acceptPrivacyPolicy": true
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "/auth/email/send-verification": {
99
+ "post": {
100
+ "tags": [
101
+ "1. Email + password"
102
+ ],
103
+ "summary": "Resend verification email",
104
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
105
+ "operationId": "post_auth_emailSendVerification",
106
+ "security": [],
107
+ "parameters": [],
108
+ "responses": {
109
+ "200": {
110
+ "description": "Success",
111
+ "content": {
112
+ "application/json": {
113
+ "schema": {
114
+ "$ref": "#/components/schemas/Success"
115
+ }
116
+ }
117
+ }
118
+ },
119
+ "400": {
120
+ "$ref": "#/components/responses/Error"
121
+ },
122
+ "401": {
123
+ "$ref": "#/components/responses/Error"
124
+ },
125
+ "403": {
126
+ "$ref": "#/components/responses/Error"
127
+ },
128
+ "429": {
129
+ "$ref": "#/components/responses/Error"
130
+ }
131
+ },
132
+ "requestBody": {
133
+ "required": true,
134
+ "content": {
135
+ "application/json": {
136
+ "schema": {
137
+ "type": "object"
138
+ },
139
+ "example": {
140
+ "email": "asha@example.com"
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
146
+ },
147
+ "/auth/email/verify": {
148
+ "post": {
149
+ "tags": [
150
+ "1. Email + password"
151
+ ],
152
+ "summary": "Verify email (token from inbox)",
153
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
154
+ "operationId": "post_auth_emailVerify",
155
+ "security": [],
156
+ "parameters": [],
157
+ "responses": {
158
+ "200": {
159
+ "description": "Success",
160
+ "content": {
161
+ "application/json": {
162
+ "schema": {
163
+ "$ref": "#/components/schemas/Success"
164
+ }
165
+ }
166
+ }
167
+ },
168
+ "400": {
169
+ "$ref": "#/components/responses/Error"
170
+ },
171
+ "401": {
172
+ "$ref": "#/components/responses/Error"
173
+ },
174
+ "403": {
175
+ "$ref": "#/components/responses/Error"
176
+ },
177
+ "429": {
178
+ "$ref": "#/components/responses/Error"
179
+ }
180
+ },
181
+ "requestBody": {
182
+ "required": true,
183
+ "content": {
184
+ "application/json": {
185
+ "schema": {
186
+ "type": "object"
187
+ },
188
+ "example": {
189
+ "token": "<verificationToken>"
190
+ }
191
+ }
192
+ }
193
+ }
194
+ }
195
+ },
196
+ "/auth/login": {
197
+ "post": {
198
+ "tags": [
199
+ "1. Email + password"
200
+ ],
201
+ "summary": "Login",
202
+ "description": "Saves accessToken / refreshToken automatically. If 2FA is on, saves challengeToken: then run \"Two-factor > Verify 2FA sign-in\".\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
203
+ "operationId": "post_auth_login",
204
+ "security": [],
205
+ "parameters": [],
206
+ "responses": {
207
+ "200": {
208
+ "description": "Success",
209
+ "content": {
210
+ "application/json": {
211
+ "schema": {
212
+ "$ref": "#/components/schemas/Success"
213
+ }
214
+ }
215
+ }
216
+ },
217
+ "400": {
218
+ "$ref": "#/components/responses/Error"
219
+ },
220
+ "401": {
221
+ "$ref": "#/components/responses/Error"
222
+ },
223
+ "403": {
224
+ "$ref": "#/components/responses/Error"
225
+ },
226
+ "429": {
227
+ "$ref": "#/components/responses/Error"
228
+ }
229
+ },
230
+ "requestBody": {
231
+ "required": true,
232
+ "content": {
233
+ "application/json": {
234
+ "schema": {
235
+ "type": "object"
236
+ },
237
+ "example": {
238
+ "email": "asha@example.com",
239
+ "password": "correct horse battery"
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }
245
+ },
246
+ "/auth/password/forgot": {
247
+ "post": {
248
+ "tags": [
249
+ "1. Email + password"
250
+ ],
251
+ "summary": "Forgot password",
252
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
253
+ "operationId": "post_auth_passwordForgot",
254
+ "security": [],
255
+ "parameters": [],
256
+ "responses": {
257
+ "200": {
258
+ "description": "Success",
259
+ "content": {
260
+ "application/json": {
261
+ "schema": {
262
+ "$ref": "#/components/schemas/Success"
263
+ }
264
+ }
265
+ }
266
+ },
267
+ "400": {
268
+ "$ref": "#/components/responses/Error"
269
+ },
270
+ "401": {
271
+ "$ref": "#/components/responses/Error"
272
+ },
273
+ "403": {
274
+ "$ref": "#/components/responses/Error"
275
+ },
276
+ "429": {
277
+ "$ref": "#/components/responses/Error"
278
+ }
279
+ },
280
+ "requestBody": {
281
+ "required": true,
282
+ "content": {
283
+ "application/json": {
284
+ "schema": {
285
+ "type": "object"
286
+ },
287
+ "example": {
288
+ "email": "asha@example.com"
289
+ }
290
+ }
291
+ }
292
+ }
293
+ }
294
+ },
295
+ "/auth/password/reset": {
296
+ "post": {
297
+ "tags": [
298
+ "1. Email + password"
299
+ ],
300
+ "summary": "Reset password (token from inbox)",
301
+ "description": "Signs out every device. Afterwards sign in with a brand new passphrase.\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
302
+ "operationId": "post_auth_passwordReset",
303
+ "security": [],
304
+ "parameters": [],
305
+ "responses": {
306
+ "200": {
307
+ "description": "Success",
308
+ "content": {
309
+ "application/json": {
310
+ "schema": {
311
+ "$ref": "#/components/schemas/Success"
312
+ }
313
+ }
314
+ }
315
+ },
316
+ "400": {
317
+ "$ref": "#/components/responses/Error"
318
+ },
319
+ "401": {
320
+ "$ref": "#/components/responses/Error"
321
+ },
322
+ "403": {
323
+ "$ref": "#/components/responses/Error"
324
+ },
325
+ "429": {
326
+ "$ref": "#/components/responses/Error"
327
+ }
328
+ },
329
+ "requestBody": {
330
+ "required": true,
331
+ "content": {
332
+ "application/json": {
333
+ "schema": {
334
+ "type": "object"
335
+ },
336
+ "example": {
337
+ "token": "<resetToken>",
338
+ "newPassword": "a brand new passphrase"
339
+ }
340
+ }
341
+ }
342
+ }
343
+ }
344
+ },
345
+ "/auth/password/change": {
346
+ "post": {
347
+ "tags": [
348
+ "1. Email + password"
349
+ ],
350
+ "summary": "Change password",
351
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
352
+ "operationId": "post_auth_passwordChange",
353
+ "security": [
354
+ {
355
+ "bearerAuth": []
356
+ }
357
+ ],
358
+ "parameters": [],
359
+ "responses": {
360
+ "200": {
361
+ "description": "Success",
362
+ "content": {
363
+ "application/json": {
364
+ "schema": {
365
+ "$ref": "#/components/schemas/Success"
366
+ }
367
+ }
368
+ }
369
+ },
370
+ "400": {
371
+ "$ref": "#/components/responses/Error"
372
+ },
373
+ "401": {
374
+ "$ref": "#/components/responses/Error"
375
+ },
376
+ "403": {
377
+ "$ref": "#/components/responses/Error"
378
+ },
379
+ "429": {
380
+ "$ref": "#/components/responses/Error"
381
+ }
382
+ },
383
+ "requestBody": {
384
+ "required": true,
385
+ "content": {
386
+ "application/json": {
387
+ "schema": {
388
+ "type": "object"
389
+ },
390
+ "example": {
391
+ "currentPassword": "correct horse battery",
392
+ "newPassword": "a brand new passphrase"
393
+ }
394
+ }
395
+ }
396
+ }
397
+ }
398
+ },
399
+ "/auth/email/send-otp": {
400
+ "post": {
401
+ "tags": [
402
+ "2. Passwordless"
403
+ ],
404
+ "summary": "Send email code",
405
+ "description": "Needs emailOtp.enabled (the playground turns it on).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
406
+ "operationId": "post_auth_emailSendOtp",
407
+ "security": [],
408
+ "parameters": [],
409
+ "responses": {
410
+ "200": {
411
+ "description": "Success",
412
+ "content": {
413
+ "application/json": {
414
+ "schema": {
415
+ "$ref": "#/components/schemas/Success"
416
+ }
417
+ }
418
+ }
419
+ },
420
+ "400": {
421
+ "$ref": "#/components/responses/Error"
422
+ },
423
+ "401": {
424
+ "$ref": "#/components/responses/Error"
425
+ },
426
+ "403": {
427
+ "$ref": "#/components/responses/Error"
428
+ },
429
+ "429": {
430
+ "$ref": "#/components/responses/Error"
431
+ }
432
+ },
433
+ "requestBody": {
434
+ "required": true,
435
+ "content": {
436
+ "application/json": {
437
+ "schema": {
438
+ "type": "object"
439
+ },
440
+ "example": {
441
+ "email": "ravi@example.com"
442
+ }
443
+ }
444
+ }
445
+ }
446
+ }
447
+ },
448
+ "/auth/email/verify-otp": {
449
+ "post": {
450
+ "tags": [
451
+ "2. Passwordless"
452
+ ],
453
+ "summary": "Verify email code (code from inbox)",
454
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
455
+ "operationId": "post_auth_emailVerifyOtp",
456
+ "security": [],
457
+ "parameters": [],
458
+ "responses": {
459
+ "200": {
460
+ "description": "Success",
461
+ "content": {
462
+ "application/json": {
463
+ "schema": {
464
+ "$ref": "#/components/schemas/Success"
465
+ }
466
+ }
467
+ }
468
+ },
469
+ "400": {
470
+ "$ref": "#/components/responses/Error"
471
+ },
472
+ "401": {
473
+ "$ref": "#/components/responses/Error"
474
+ },
475
+ "403": {
476
+ "$ref": "#/components/responses/Error"
477
+ },
478
+ "429": {
479
+ "$ref": "#/components/responses/Error"
480
+ }
481
+ },
482
+ "requestBody": {
483
+ "required": true,
484
+ "content": {
485
+ "application/json": {
486
+ "schema": {
487
+ "type": "object"
488
+ },
489
+ "example": {
490
+ "email": "ravi@example.com",
491
+ "code": "<emailCode>",
492
+ "firstName": "Ravi",
493
+ "lastName": "Kumar",
494
+ "acceptTerms": true,
495
+ "acceptPrivacyPolicy": true
496
+ }
497
+ }
498
+ }
499
+ }
500
+ }
501
+ },
502
+ "/auth/magic-link/send": {
503
+ "post": {
504
+ "tags": [
505
+ "2. Passwordless"
506
+ ],
507
+ "summary": "Send magic link",
508
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
509
+ "operationId": "post_auth_magicLinkSend",
510
+ "security": [],
511
+ "parameters": [],
512
+ "responses": {
513
+ "200": {
514
+ "description": "Success",
515
+ "content": {
516
+ "application/json": {
517
+ "schema": {
518
+ "$ref": "#/components/schemas/Success"
519
+ }
520
+ }
521
+ }
522
+ },
523
+ "400": {
524
+ "$ref": "#/components/responses/Error"
525
+ },
526
+ "401": {
527
+ "$ref": "#/components/responses/Error"
528
+ },
529
+ "403": {
530
+ "$ref": "#/components/responses/Error"
531
+ },
532
+ "429": {
533
+ "$ref": "#/components/responses/Error"
534
+ }
535
+ },
536
+ "requestBody": {
537
+ "required": true,
538
+ "content": {
539
+ "application/json": {
540
+ "schema": {
541
+ "type": "object"
542
+ },
543
+ "example": {
544
+ "email": "ravi@example.com"
545
+ }
546
+ }
547
+ }
548
+ }
549
+ }
550
+ },
551
+ "/auth/magic-link/verify": {
552
+ "post": {
553
+ "tags": [
554
+ "2. Passwordless"
555
+ ],
556
+ "summary": "Verify magic link (token from inbox)",
557
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
558
+ "operationId": "post_auth_magicLinkVerify",
559
+ "security": [],
560
+ "parameters": [],
561
+ "responses": {
562
+ "200": {
563
+ "description": "Success",
564
+ "content": {
565
+ "application/json": {
566
+ "schema": {
567
+ "$ref": "#/components/schemas/Success"
568
+ }
569
+ }
570
+ }
571
+ },
572
+ "400": {
573
+ "$ref": "#/components/responses/Error"
574
+ },
575
+ "401": {
576
+ "$ref": "#/components/responses/Error"
577
+ },
578
+ "403": {
579
+ "$ref": "#/components/responses/Error"
580
+ },
581
+ "429": {
582
+ "$ref": "#/components/responses/Error"
583
+ }
584
+ },
585
+ "requestBody": {
586
+ "required": true,
587
+ "content": {
588
+ "application/json": {
589
+ "schema": {
590
+ "type": "object"
591
+ },
592
+ "example": {
593
+ "token": "<magicLinkToken>",
594
+ "firstName": "Ravi",
595
+ "lastName": "Kumar",
596
+ "acceptTerms": true,
597
+ "acceptPrivacyPolicy": true
598
+ }
599
+ }
600
+ }
601
+ }
602
+ }
603
+ },
604
+ "/auth/phone/send-otp": {
605
+ "post": {
606
+ "tags": [
607
+ "2. Passwordless"
608
+ ],
609
+ "summary": "Send phone code",
610
+ "description": "The playground delivers SMS to the dev inbox instead of a real phone.\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
611
+ "operationId": "post_auth_phoneSendOtp",
612
+ "security": [],
613
+ "parameters": [],
614
+ "responses": {
615
+ "200": {
616
+ "description": "Success",
617
+ "content": {
618
+ "application/json": {
619
+ "schema": {
620
+ "$ref": "#/components/schemas/Success"
621
+ }
622
+ }
623
+ }
624
+ },
625
+ "400": {
626
+ "$ref": "#/components/responses/Error"
627
+ },
628
+ "401": {
629
+ "$ref": "#/components/responses/Error"
630
+ },
631
+ "403": {
632
+ "$ref": "#/components/responses/Error"
633
+ },
634
+ "429": {
635
+ "$ref": "#/components/responses/Error"
636
+ }
637
+ },
638
+ "requestBody": {
639
+ "required": true,
640
+ "content": {
641
+ "application/json": {
642
+ "schema": {
643
+ "type": "object"
644
+ },
645
+ "example": {
646
+ "phoneNumber": "+919876543210"
647
+ }
648
+ }
649
+ }
650
+ }
651
+ }
652
+ },
653
+ "/auth/phone/verify-otp": {
654
+ "post": {
655
+ "tags": [
656
+ "2. Passwordless"
657
+ ],
658
+ "summary": "Verify phone code (code from inbox)",
659
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
660
+ "operationId": "post_auth_phoneVerifyOtp",
661
+ "security": [],
662
+ "parameters": [],
663
+ "responses": {
664
+ "200": {
665
+ "description": "Success",
666
+ "content": {
667
+ "application/json": {
668
+ "schema": {
669
+ "$ref": "#/components/schemas/Success"
670
+ }
671
+ }
672
+ }
673
+ },
674
+ "400": {
675
+ "$ref": "#/components/responses/Error"
676
+ },
677
+ "401": {
678
+ "$ref": "#/components/responses/Error"
679
+ },
680
+ "403": {
681
+ "$ref": "#/components/responses/Error"
682
+ },
683
+ "429": {
684
+ "$ref": "#/components/responses/Error"
685
+ }
686
+ },
687
+ "requestBody": {
688
+ "required": true,
689
+ "content": {
690
+ "application/json": {
691
+ "schema": {
692
+ "type": "object"
693
+ },
694
+ "example": {
695
+ "phoneNumber": "+919876543210",
696
+ "code": "<smsCode>",
697
+ "firstName": "Meera",
698
+ "lastName": "Shah",
699
+ "acceptTerms": true,
700
+ "acceptPrivacyPolicy": true
701
+ }
702
+ }
703
+ }
704
+ }
705
+ }
706
+ },
707
+ "/auth/me": {
708
+ "get": {
709
+ "tags": [
710
+ "3. Account and sessions"
711
+ ],
712
+ "summary": "Get my profile",
713
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
714
+ "operationId": "get_auth_me",
715
+ "security": [
716
+ {
717
+ "bearerAuth": []
718
+ }
719
+ ],
720
+ "parameters": [],
721
+ "responses": {
722
+ "200": {
723
+ "description": "Success",
724
+ "content": {
725
+ "application/json": {
726
+ "schema": {
727
+ "$ref": "#/components/schemas/Success"
728
+ }
729
+ }
730
+ }
731
+ },
732
+ "400": {
733
+ "$ref": "#/components/responses/Error"
734
+ },
735
+ "401": {
736
+ "$ref": "#/components/responses/Error"
737
+ },
738
+ "403": {
739
+ "$ref": "#/components/responses/Error"
740
+ },
741
+ "429": {
742
+ "$ref": "#/components/responses/Error"
743
+ }
744
+ }
745
+ },
746
+ "patch": {
747
+ "tags": [
748
+ "3. Account and sessions"
749
+ ],
750
+ "summary": "Update my profile",
751
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
752
+ "operationId": "patch_auth_me",
753
+ "security": [
754
+ {
755
+ "bearerAuth": []
756
+ }
757
+ ],
758
+ "parameters": [],
759
+ "responses": {
760
+ "200": {
761
+ "description": "Success",
762
+ "content": {
763
+ "application/json": {
764
+ "schema": {
765
+ "$ref": "#/components/schemas/Success"
766
+ }
767
+ }
768
+ }
769
+ },
770
+ "400": {
771
+ "$ref": "#/components/responses/Error"
772
+ },
773
+ "401": {
774
+ "$ref": "#/components/responses/Error"
775
+ },
776
+ "403": {
777
+ "$ref": "#/components/responses/Error"
778
+ },
779
+ "429": {
780
+ "$ref": "#/components/responses/Error"
781
+ }
782
+ },
783
+ "requestBody": {
784
+ "required": true,
785
+ "content": {
786
+ "application/json": {
787
+ "schema": {
788
+ "type": "object"
789
+ },
790
+ "example": {
791
+ "firstName": "Asha",
792
+ "lastName": "Rao-Mehta",
793
+ "metadata": {
794
+ "preferredLanguage": "hi"
795
+ }
796
+ }
797
+ }
798
+ }
799
+ }
800
+ },
801
+ "delete": {
802
+ "tags": [
803
+ "3. Account and sessions"
804
+ ],
805
+ "summary": "Delete my account",
806
+ "description": "Permanent.\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
807
+ "operationId": "delete_auth_me",
808
+ "security": [
809
+ {
810
+ "bearerAuth": []
811
+ }
812
+ ],
813
+ "parameters": [],
814
+ "responses": {
815
+ "200": {
816
+ "description": "Success",
817
+ "content": {
818
+ "application/json": {
819
+ "schema": {
820
+ "$ref": "#/components/schemas/Success"
821
+ }
822
+ }
823
+ }
824
+ },
825
+ "400": {
826
+ "$ref": "#/components/responses/Error"
827
+ },
828
+ "401": {
829
+ "$ref": "#/components/responses/Error"
830
+ },
831
+ "403": {
832
+ "$ref": "#/components/responses/Error"
833
+ },
834
+ "429": {
835
+ "$ref": "#/components/responses/Error"
836
+ }
837
+ }
838
+ }
839
+ },
840
+ "/auth/sign-in-methods": {
841
+ "get": {
842
+ "tags": [
843
+ "3. Account and sessions"
844
+ ],
845
+ "summary": "My sign-in methods",
846
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
847
+ "operationId": "get_auth_signInMethods",
848
+ "security": [
849
+ {
850
+ "bearerAuth": []
851
+ }
852
+ ],
853
+ "parameters": [],
854
+ "responses": {
855
+ "200": {
856
+ "description": "Success",
857
+ "content": {
858
+ "application/json": {
859
+ "schema": {
860
+ "$ref": "#/components/schemas/Success"
861
+ }
862
+ }
863
+ }
864
+ },
865
+ "400": {
866
+ "$ref": "#/components/responses/Error"
867
+ },
868
+ "401": {
869
+ "$ref": "#/components/responses/Error"
870
+ },
871
+ "403": {
872
+ "$ref": "#/components/responses/Error"
873
+ },
874
+ "429": {
875
+ "$ref": "#/components/responses/Error"
876
+ }
877
+ }
878
+ }
879
+ },
880
+ "/auth/sessions": {
881
+ "get": {
882
+ "tags": [
883
+ "3. Account and sessions"
884
+ ],
885
+ "summary": "My devices",
886
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
887
+ "operationId": "get_auth_sessions",
888
+ "security": [
889
+ {
890
+ "bearerAuth": []
891
+ }
892
+ ],
893
+ "parameters": [],
894
+ "responses": {
895
+ "200": {
896
+ "description": "Success",
897
+ "content": {
898
+ "application/json": {
899
+ "schema": {
900
+ "$ref": "#/components/schemas/Success"
901
+ }
902
+ }
903
+ }
904
+ },
905
+ "400": {
906
+ "$ref": "#/components/responses/Error"
907
+ },
908
+ "401": {
909
+ "$ref": "#/components/responses/Error"
910
+ },
911
+ "403": {
912
+ "$ref": "#/components/responses/Error"
913
+ },
914
+ "429": {
915
+ "$ref": "#/components/responses/Error"
916
+ }
917
+ }
918
+ }
919
+ },
920
+ "/auth/sessions/{sessionId}": {
921
+ "delete": {
922
+ "tags": [
923
+ "3. Account and sessions"
924
+ ],
925
+ "summary": "Sign out one device",
926
+ "description": "Uses <sessionId> (the current device unless you change it).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
927
+ "operationId": "delete_auth_session",
928
+ "security": [
929
+ {
930
+ "bearerAuth": []
931
+ }
932
+ ],
933
+ "parameters": [
934
+ {
935
+ "name": "sessionId",
936
+ "in": "path",
937
+ "required": true,
938
+ "schema": {
939
+ "type": "string"
940
+ }
941
+ }
942
+ ],
943
+ "responses": {
944
+ "200": {
945
+ "description": "Success",
946
+ "content": {
947
+ "application/json": {
948
+ "schema": {
949
+ "$ref": "#/components/schemas/Success"
950
+ }
951
+ }
952
+ }
953
+ },
954
+ "400": {
955
+ "$ref": "#/components/responses/Error"
956
+ },
957
+ "401": {
958
+ "$ref": "#/components/responses/Error"
959
+ },
960
+ "403": {
961
+ "$ref": "#/components/responses/Error"
962
+ },
963
+ "429": {
964
+ "$ref": "#/components/responses/Error"
965
+ }
966
+ }
967
+ }
968
+ },
969
+ "/auth/refresh": {
970
+ "post": {
971
+ "tags": [
972
+ "3. Account and sessions"
973
+ ],
974
+ "summary": "Refresh tokens",
975
+ "description": "Send it twice with the same old token to see reuse detection end the session.\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
976
+ "operationId": "post_auth_refresh",
977
+ "security": [],
978
+ "parameters": [],
979
+ "responses": {
980
+ "200": {
981
+ "description": "Success",
982
+ "content": {
983
+ "application/json": {
984
+ "schema": {
985
+ "$ref": "#/components/schemas/Success"
986
+ }
987
+ }
988
+ }
989
+ },
990
+ "400": {
991
+ "$ref": "#/components/responses/Error"
992
+ },
993
+ "401": {
994
+ "$ref": "#/components/responses/Error"
995
+ },
996
+ "403": {
997
+ "$ref": "#/components/responses/Error"
998
+ },
999
+ "429": {
1000
+ "$ref": "#/components/responses/Error"
1001
+ }
1002
+ },
1003
+ "requestBody": {
1004
+ "required": true,
1005
+ "content": {
1006
+ "application/json": {
1007
+ "schema": {
1008
+ "type": "object"
1009
+ },
1010
+ "example": {
1011
+ "refreshToken": "<refreshToken>"
1012
+ }
1013
+ }
1014
+ }
1015
+ }
1016
+ }
1017
+ },
1018
+ "/auth/logout": {
1019
+ "post": {
1020
+ "tags": [
1021
+ "3. Account and sessions"
1022
+ ],
1023
+ "summary": "Logout (this device)",
1024
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1025
+ "operationId": "post_auth_logout",
1026
+ "security": [
1027
+ {
1028
+ "bearerAuth": []
1029
+ }
1030
+ ],
1031
+ "parameters": [],
1032
+ "responses": {
1033
+ "200": {
1034
+ "description": "Success",
1035
+ "content": {
1036
+ "application/json": {
1037
+ "schema": {
1038
+ "$ref": "#/components/schemas/Success"
1039
+ }
1040
+ }
1041
+ }
1042
+ },
1043
+ "400": {
1044
+ "$ref": "#/components/responses/Error"
1045
+ },
1046
+ "401": {
1047
+ "$ref": "#/components/responses/Error"
1048
+ },
1049
+ "403": {
1050
+ "$ref": "#/components/responses/Error"
1051
+ },
1052
+ "429": {
1053
+ "$ref": "#/components/responses/Error"
1054
+ }
1055
+ }
1056
+ }
1057
+ },
1058
+ "/auth/logout-all": {
1059
+ "post": {
1060
+ "tags": [
1061
+ "3. Account and sessions"
1062
+ ],
1063
+ "summary": "Logout everywhere",
1064
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1065
+ "operationId": "post_auth_logoutAll",
1066
+ "security": [
1067
+ {
1068
+ "bearerAuth": []
1069
+ }
1070
+ ],
1071
+ "parameters": [],
1072
+ "responses": {
1073
+ "200": {
1074
+ "description": "Success",
1075
+ "content": {
1076
+ "application/json": {
1077
+ "schema": {
1078
+ "$ref": "#/components/schemas/Success"
1079
+ }
1080
+ }
1081
+ }
1082
+ },
1083
+ "400": {
1084
+ "$ref": "#/components/responses/Error"
1085
+ },
1086
+ "401": {
1087
+ "$ref": "#/components/responses/Error"
1088
+ },
1089
+ "403": {
1090
+ "$ref": "#/components/responses/Error"
1091
+ },
1092
+ "429": {
1093
+ "$ref": "#/components/responses/Error"
1094
+ }
1095
+ }
1096
+ }
1097
+ },
1098
+ "/auth/deactivate": {
1099
+ "post": {
1100
+ "tags": [
1101
+ "3. Account and sessions"
1102
+ ],
1103
+ "summary": "Deactivate my account",
1104
+ "description": "Then \"Login\" returns ACCOUNT_DEACTIVATED with a reactivationToken (saved automatically).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1105
+ "operationId": "post_auth_deactivate",
1106
+ "security": [
1107
+ {
1108
+ "bearerAuth": []
1109
+ }
1110
+ ],
1111
+ "parameters": [],
1112
+ "responses": {
1113
+ "200": {
1114
+ "description": "Success",
1115
+ "content": {
1116
+ "application/json": {
1117
+ "schema": {
1118
+ "$ref": "#/components/schemas/Success"
1119
+ }
1120
+ }
1121
+ }
1122
+ },
1123
+ "400": {
1124
+ "$ref": "#/components/responses/Error"
1125
+ },
1126
+ "401": {
1127
+ "$ref": "#/components/responses/Error"
1128
+ },
1129
+ "403": {
1130
+ "$ref": "#/components/responses/Error"
1131
+ },
1132
+ "429": {
1133
+ "$ref": "#/components/responses/Error"
1134
+ }
1135
+ }
1136
+ }
1137
+ },
1138
+ "/auth/reactivate": {
1139
+ "post": {
1140
+ "tags": [
1141
+ "3. Account and sessions"
1142
+ ],
1143
+ "summary": "Reactivate",
1144
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1145
+ "operationId": "post_auth_reactivate",
1146
+ "security": [],
1147
+ "parameters": [],
1148
+ "responses": {
1149
+ "200": {
1150
+ "description": "Success",
1151
+ "content": {
1152
+ "application/json": {
1153
+ "schema": {
1154
+ "$ref": "#/components/schemas/Success"
1155
+ }
1156
+ }
1157
+ }
1158
+ },
1159
+ "400": {
1160
+ "$ref": "#/components/responses/Error"
1161
+ },
1162
+ "401": {
1163
+ "$ref": "#/components/responses/Error"
1164
+ },
1165
+ "403": {
1166
+ "$ref": "#/components/responses/Error"
1167
+ },
1168
+ "429": {
1169
+ "$ref": "#/components/responses/Error"
1170
+ }
1171
+ },
1172
+ "requestBody": {
1173
+ "required": true,
1174
+ "content": {
1175
+ "application/json": {
1176
+ "schema": {
1177
+ "type": "object"
1178
+ },
1179
+ "example": {
1180
+ "reactivationToken": "<reactivationToken>"
1181
+ }
1182
+ }
1183
+ }
1184
+ }
1185
+ }
1186
+ },
1187
+ "/auth/email/change": {
1188
+ "post": {
1189
+ "tags": [
1190
+ "3. Account and sessions"
1191
+ ],
1192
+ "summary": "Change my email",
1193
+ "description": "Sends a confirmation link to the new address. Accounts without a password leave out currentPassword but must have signed in within the last 10 minutes.\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1194
+ "operationId": "post_auth_emailChange",
1195
+ "security": [
1196
+ {
1197
+ "bearerAuth": []
1198
+ }
1199
+ ],
1200
+ "parameters": [],
1201
+ "responses": {
1202
+ "200": {
1203
+ "description": "Success",
1204
+ "content": {
1205
+ "application/json": {
1206
+ "schema": {
1207
+ "$ref": "#/components/schemas/Success"
1208
+ }
1209
+ }
1210
+ }
1211
+ },
1212
+ "400": {
1213
+ "$ref": "#/components/responses/Error"
1214
+ },
1215
+ "401": {
1216
+ "$ref": "#/components/responses/Error"
1217
+ },
1218
+ "403": {
1219
+ "$ref": "#/components/responses/Error"
1220
+ },
1221
+ "429": {
1222
+ "$ref": "#/components/responses/Error"
1223
+ }
1224
+ },
1225
+ "requestBody": {
1226
+ "required": true,
1227
+ "content": {
1228
+ "application/json": {
1229
+ "schema": {
1230
+ "type": "object"
1231
+ },
1232
+ "example": {
1233
+ "newEmail": "asha.new@example.com",
1234
+ "currentPassword": "correct horse battery"
1235
+ }
1236
+ }
1237
+ }
1238
+ }
1239
+ }
1240
+ },
1241
+ "/auth/email/change/confirm": {
1242
+ "post": {
1243
+ "tags": [
1244
+ "3. Account and sessions"
1245
+ ],
1246
+ "summary": "Confirm email change (token from inbox)",
1247
+ "description": "Switches the email and tells the old address. Afterwards set the email variable to asha.new@example.com to keep signing in.\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1248
+ "operationId": "post_auth_emailChangeConfirm",
1249
+ "security": [],
1250
+ "parameters": [],
1251
+ "responses": {
1252
+ "200": {
1253
+ "description": "Success",
1254
+ "content": {
1255
+ "application/json": {
1256
+ "schema": {
1257
+ "$ref": "#/components/schemas/Success"
1258
+ }
1259
+ }
1260
+ }
1261
+ },
1262
+ "400": {
1263
+ "$ref": "#/components/responses/Error"
1264
+ },
1265
+ "401": {
1266
+ "$ref": "#/components/responses/Error"
1267
+ },
1268
+ "403": {
1269
+ "$ref": "#/components/responses/Error"
1270
+ },
1271
+ "429": {
1272
+ "$ref": "#/components/responses/Error"
1273
+ }
1274
+ },
1275
+ "requestBody": {
1276
+ "required": true,
1277
+ "content": {
1278
+ "application/json": {
1279
+ "schema": {
1280
+ "type": "object"
1281
+ },
1282
+ "example": {
1283
+ "token": "<emailChangeToken>"
1284
+ }
1285
+ }
1286
+ }
1287
+ }
1288
+ }
1289
+ },
1290
+ "/auth/me/export": {
1291
+ "get": {
1292
+ "tags": [
1293
+ "3. Account and sessions"
1294
+ ],
1295
+ "summary": "Download my data",
1296
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1297
+ "operationId": "get_auth_exportMyData",
1298
+ "security": [
1299
+ {
1300
+ "bearerAuth": []
1301
+ }
1302
+ ],
1303
+ "parameters": [],
1304
+ "responses": {
1305
+ "200": {
1306
+ "description": "Success",
1307
+ "content": {
1308
+ "application/json": {
1309
+ "schema": {
1310
+ "$ref": "#/components/schemas/Success"
1311
+ }
1312
+ }
1313
+ }
1314
+ },
1315
+ "400": {
1316
+ "$ref": "#/components/responses/Error"
1317
+ },
1318
+ "401": {
1319
+ "$ref": "#/components/responses/Error"
1320
+ },
1321
+ "403": {
1322
+ "$ref": "#/components/responses/Error"
1323
+ },
1324
+ "429": {
1325
+ "$ref": "#/components/responses/Error"
1326
+ }
1327
+ }
1328
+ }
1329
+ },
1330
+ "/auth/health": {
1331
+ "get": {
1332
+ "tags": [
1333
+ "3. Account and sessions"
1334
+ ],
1335
+ "summary": "Health check",
1336
+ "description": "200 when the database (and Redis, if used) answer, 503 otherwise.\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1337
+ "operationId": "get_auth_health",
1338
+ "security": [],
1339
+ "parameters": [],
1340
+ "responses": {
1341
+ "200": {
1342
+ "description": "Success",
1343
+ "content": {
1344
+ "application/json": {
1345
+ "schema": {
1346
+ "$ref": "#/components/schemas/Success"
1347
+ }
1348
+ }
1349
+ }
1350
+ },
1351
+ "400": {
1352
+ "$ref": "#/components/responses/Error"
1353
+ },
1354
+ "401": {
1355
+ "$ref": "#/components/responses/Error"
1356
+ },
1357
+ "403": {
1358
+ "$ref": "#/components/responses/Error"
1359
+ },
1360
+ "429": {
1361
+ "$ref": "#/components/responses/Error"
1362
+ }
1363
+ }
1364
+ }
1365
+ },
1366
+ "/auth/2fa": {
1367
+ "get": {
1368
+ "tags": [
1369
+ "4. Two-factor"
1370
+ ],
1371
+ "summary": "2FA status",
1372
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1373
+ "operationId": "get_twoFactor_prefix",
1374
+ "security": [
1375
+ {
1376
+ "bearerAuth": []
1377
+ }
1378
+ ],
1379
+ "parameters": [],
1380
+ "responses": {
1381
+ "200": {
1382
+ "description": "Success",
1383
+ "content": {
1384
+ "application/json": {
1385
+ "schema": {
1386
+ "$ref": "#/components/schemas/Success"
1387
+ }
1388
+ }
1389
+ }
1390
+ },
1391
+ "400": {
1392
+ "$ref": "#/components/responses/Error"
1393
+ },
1394
+ "401": {
1395
+ "$ref": "#/components/responses/Error"
1396
+ },
1397
+ "403": {
1398
+ "$ref": "#/components/responses/Error"
1399
+ },
1400
+ "429": {
1401
+ "$ref": "#/components/responses/Error"
1402
+ }
1403
+ }
1404
+ }
1405
+ },
1406
+ "/auth/2fa/setup": {
1407
+ "post": {
1408
+ "tags": [
1409
+ "4. Two-factor"
1410
+ ],
1411
+ "summary": "Start 2FA setup",
1412
+ "description": "Saves the secret. Scan authenticatorAppUrl with Google/Microsoft Authenticator if you want a real app too.\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1413
+ "operationId": "post_twoFactor_setup",
1414
+ "security": [
1415
+ {
1416
+ "bearerAuth": []
1417
+ }
1418
+ ],
1419
+ "parameters": [],
1420
+ "responses": {
1421
+ "200": {
1422
+ "description": "Success",
1423
+ "content": {
1424
+ "application/json": {
1425
+ "schema": {
1426
+ "$ref": "#/components/schemas/Success"
1427
+ }
1428
+ }
1429
+ }
1430
+ },
1431
+ "400": {
1432
+ "$ref": "#/components/responses/Error"
1433
+ },
1434
+ "401": {
1435
+ "$ref": "#/components/responses/Error"
1436
+ },
1437
+ "403": {
1438
+ "$ref": "#/components/responses/Error"
1439
+ },
1440
+ "429": {
1441
+ "$ref": "#/components/responses/Error"
1442
+ }
1443
+ }
1444
+ }
1445
+ },
1446
+ "/auth/2fa/enable": {
1447
+ "post": {
1448
+ "tags": [
1449
+ "4. Two-factor"
1450
+ ],
1451
+ "summary": "Enable 2FA (code computed for you)",
1452
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1453
+ "operationId": "post_twoFactor_enable",
1454
+ "security": [
1455
+ {
1456
+ "bearerAuth": []
1457
+ }
1458
+ ],
1459
+ "parameters": [],
1460
+ "responses": {
1461
+ "200": {
1462
+ "description": "Success",
1463
+ "content": {
1464
+ "application/json": {
1465
+ "schema": {
1466
+ "$ref": "#/components/schemas/Success"
1467
+ }
1468
+ }
1469
+ }
1470
+ },
1471
+ "400": {
1472
+ "$ref": "#/components/responses/Error"
1473
+ },
1474
+ "401": {
1475
+ "$ref": "#/components/responses/Error"
1476
+ },
1477
+ "403": {
1478
+ "$ref": "#/components/responses/Error"
1479
+ },
1480
+ "429": {
1481
+ "$ref": "#/components/responses/Error"
1482
+ }
1483
+ },
1484
+ "requestBody": {
1485
+ "required": true,
1486
+ "content": {
1487
+ "application/json": {
1488
+ "schema": {
1489
+ "type": "object"
1490
+ },
1491
+ "example": {
1492
+ "code": "<totpCode>"
1493
+ }
1494
+ }
1495
+ }
1496
+ }
1497
+ }
1498
+ },
1499
+ "/auth/2fa/verify": {
1500
+ "post": {
1501
+ "tags": [
1502
+ "4. Two-factor"
1503
+ ],
1504
+ "summary": "Verify 2FA sign-in",
1505
+ "description": "A code works only once: wait for the next 30-second window before reusing, or put <backupCode> in \"code\".\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1506
+ "operationId": "post_twoFactor_verify",
1507
+ "security": [],
1508
+ "parameters": [],
1509
+ "responses": {
1510
+ "200": {
1511
+ "description": "Success",
1512
+ "content": {
1513
+ "application/json": {
1514
+ "schema": {
1515
+ "$ref": "#/components/schemas/Success"
1516
+ }
1517
+ }
1518
+ }
1519
+ },
1520
+ "400": {
1521
+ "$ref": "#/components/responses/Error"
1522
+ },
1523
+ "401": {
1524
+ "$ref": "#/components/responses/Error"
1525
+ },
1526
+ "403": {
1527
+ "$ref": "#/components/responses/Error"
1528
+ },
1529
+ "429": {
1530
+ "$ref": "#/components/responses/Error"
1531
+ }
1532
+ },
1533
+ "requestBody": {
1534
+ "required": true,
1535
+ "content": {
1536
+ "application/json": {
1537
+ "schema": {
1538
+ "type": "object"
1539
+ },
1540
+ "example": {
1541
+ "challengeToken": "<challengeToken>",
1542
+ "code": "<totpCode>"
1543
+ }
1544
+ }
1545
+ }
1546
+ }
1547
+ }
1548
+ },
1549
+ "/auth/2fa/backup-codes": {
1550
+ "post": {
1551
+ "tags": [
1552
+ "4. Two-factor"
1553
+ ],
1554
+ "summary": "New backup codes",
1555
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1556
+ "operationId": "post_twoFactor_backupCodes",
1557
+ "security": [
1558
+ {
1559
+ "bearerAuth": []
1560
+ }
1561
+ ],
1562
+ "parameters": [],
1563
+ "responses": {
1564
+ "200": {
1565
+ "description": "Success",
1566
+ "content": {
1567
+ "application/json": {
1568
+ "schema": {
1569
+ "$ref": "#/components/schemas/Success"
1570
+ }
1571
+ }
1572
+ }
1573
+ },
1574
+ "400": {
1575
+ "$ref": "#/components/responses/Error"
1576
+ },
1577
+ "401": {
1578
+ "$ref": "#/components/responses/Error"
1579
+ },
1580
+ "403": {
1581
+ "$ref": "#/components/responses/Error"
1582
+ },
1583
+ "429": {
1584
+ "$ref": "#/components/responses/Error"
1585
+ }
1586
+ },
1587
+ "requestBody": {
1588
+ "required": true,
1589
+ "content": {
1590
+ "application/json": {
1591
+ "schema": {
1592
+ "type": "object"
1593
+ },
1594
+ "example": {
1595
+ "code": "<totpCode>"
1596
+ }
1597
+ }
1598
+ }
1599
+ }
1600
+ }
1601
+ },
1602
+ "/auth/2fa/disable": {
1603
+ "post": {
1604
+ "tags": [
1605
+ "4. Two-factor"
1606
+ ],
1607
+ "summary": "Disable 2FA",
1608
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1609
+ "operationId": "post_twoFactor_disable",
1610
+ "security": [
1611
+ {
1612
+ "bearerAuth": []
1613
+ }
1614
+ ],
1615
+ "parameters": [],
1616
+ "responses": {
1617
+ "200": {
1618
+ "description": "Success",
1619
+ "content": {
1620
+ "application/json": {
1621
+ "schema": {
1622
+ "$ref": "#/components/schemas/Success"
1623
+ }
1624
+ }
1625
+ }
1626
+ },
1627
+ "400": {
1628
+ "$ref": "#/components/responses/Error"
1629
+ },
1630
+ "401": {
1631
+ "$ref": "#/components/responses/Error"
1632
+ },
1633
+ "403": {
1634
+ "$ref": "#/components/responses/Error"
1635
+ },
1636
+ "429": {
1637
+ "$ref": "#/components/responses/Error"
1638
+ }
1639
+ },
1640
+ "requestBody": {
1641
+ "required": true,
1642
+ "content": {
1643
+ "application/json": {
1644
+ "schema": {
1645
+ "type": "object"
1646
+ },
1647
+ "example": {
1648
+ "code": "<totpCode>"
1649
+ }
1650
+ }
1651
+ }
1652
+ }
1653
+ }
1654
+ },
1655
+ "/auth/social/{provider}": {
1656
+ "post": {
1657
+ "tags": [
1658
+ "5. Social sign-in"
1659
+ ],
1660
+ "summary": "Sign in with provider",
1661
+ "description": "Easiest with the \"Sign in with Google\" button on the dev dashboard. In Postman, paste a real ID token into paste-the-provider-token-here.\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1662
+ "operationId": "post_social_signIn",
1663
+ "security": [],
1664
+ "parameters": [
1665
+ {
1666
+ "name": "provider",
1667
+ "in": "path",
1668
+ "required": true,
1669
+ "schema": {
1670
+ "type": "string"
1671
+ }
1672
+ }
1673
+ ],
1674
+ "responses": {
1675
+ "200": {
1676
+ "description": "Success",
1677
+ "content": {
1678
+ "application/json": {
1679
+ "schema": {
1680
+ "$ref": "#/components/schemas/Success"
1681
+ }
1682
+ }
1683
+ }
1684
+ },
1685
+ "400": {
1686
+ "$ref": "#/components/responses/Error"
1687
+ },
1688
+ "401": {
1689
+ "$ref": "#/components/responses/Error"
1690
+ },
1691
+ "403": {
1692
+ "$ref": "#/components/responses/Error"
1693
+ },
1694
+ "429": {
1695
+ "$ref": "#/components/responses/Error"
1696
+ }
1697
+ },
1698
+ "requestBody": {
1699
+ "required": true,
1700
+ "content": {
1701
+ "application/json": {
1702
+ "schema": {
1703
+ "type": "object"
1704
+ },
1705
+ "example": {
1706
+ "token": "paste-the-provider-token-here",
1707
+ "firstName": "Asha",
1708
+ "lastName": "Rao",
1709
+ "acceptTerms": true,
1710
+ "acceptPrivacyPolicy": true
1711
+ }
1712
+ }
1713
+ }
1714
+ }
1715
+ },
1716
+ "delete": {
1717
+ "tags": [
1718
+ "5. Social sign-in"
1719
+ ],
1720
+ "summary": "Unlink provider",
1721
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1722
+ "operationId": "delete_social_unlink",
1723
+ "security": [
1724
+ {
1725
+ "bearerAuth": []
1726
+ }
1727
+ ],
1728
+ "parameters": [
1729
+ {
1730
+ "name": "provider",
1731
+ "in": "path",
1732
+ "required": true,
1733
+ "schema": {
1734
+ "type": "string"
1735
+ }
1736
+ }
1737
+ ],
1738
+ "responses": {
1739
+ "200": {
1740
+ "description": "Success",
1741
+ "content": {
1742
+ "application/json": {
1743
+ "schema": {
1744
+ "$ref": "#/components/schemas/Success"
1745
+ }
1746
+ }
1747
+ }
1748
+ },
1749
+ "400": {
1750
+ "$ref": "#/components/responses/Error"
1751
+ },
1752
+ "401": {
1753
+ "$ref": "#/components/responses/Error"
1754
+ },
1755
+ "403": {
1756
+ "$ref": "#/components/responses/Error"
1757
+ },
1758
+ "429": {
1759
+ "$ref": "#/components/responses/Error"
1760
+ }
1761
+ }
1762
+ }
1763
+ },
1764
+ "/auth/social/{provider}/link": {
1765
+ "post": {
1766
+ "tags": [
1767
+ "5. Social sign-in"
1768
+ ],
1769
+ "summary": "Link provider",
1770
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1771
+ "operationId": "post_social_link",
1772
+ "security": [
1773
+ {
1774
+ "bearerAuth": []
1775
+ }
1776
+ ],
1777
+ "parameters": [
1778
+ {
1779
+ "name": "provider",
1780
+ "in": "path",
1781
+ "required": true,
1782
+ "schema": {
1783
+ "type": "string"
1784
+ }
1785
+ }
1786
+ ],
1787
+ "responses": {
1788
+ "200": {
1789
+ "description": "Success",
1790
+ "content": {
1791
+ "application/json": {
1792
+ "schema": {
1793
+ "$ref": "#/components/schemas/Success"
1794
+ }
1795
+ }
1796
+ }
1797
+ },
1798
+ "400": {
1799
+ "$ref": "#/components/responses/Error"
1800
+ },
1801
+ "401": {
1802
+ "$ref": "#/components/responses/Error"
1803
+ },
1804
+ "403": {
1805
+ "$ref": "#/components/responses/Error"
1806
+ },
1807
+ "429": {
1808
+ "$ref": "#/components/responses/Error"
1809
+ }
1810
+ },
1811
+ "requestBody": {
1812
+ "required": true,
1813
+ "content": {
1814
+ "application/json": {
1815
+ "schema": {
1816
+ "type": "object"
1817
+ },
1818
+ "example": {
1819
+ "token": "paste-the-provider-token-here"
1820
+ }
1821
+ }
1822
+ }
1823
+ }
1824
+ }
1825
+ },
1826
+ "/auth/passkeys/register/options": {
1827
+ "post": {
1828
+ "tags": [
1829
+ "6. Passkeys"
1830
+ ],
1831
+ "summary": "Registration options",
1832
+ "description": "Passkeys need a browser or phone: use the Passkeys panel on the dev dashboard. These requests show the raw options.\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1833
+ "operationId": "post_passkeys_registerOptions",
1834
+ "security": [
1835
+ {
1836
+ "bearerAuth": []
1837
+ }
1838
+ ],
1839
+ "parameters": [],
1840
+ "responses": {
1841
+ "200": {
1842
+ "description": "Success",
1843
+ "content": {
1844
+ "application/json": {
1845
+ "schema": {
1846
+ "$ref": "#/components/schemas/Success"
1847
+ }
1848
+ }
1849
+ }
1850
+ },
1851
+ "400": {
1852
+ "$ref": "#/components/responses/Error"
1853
+ },
1854
+ "401": {
1855
+ "$ref": "#/components/responses/Error"
1856
+ },
1857
+ "403": {
1858
+ "$ref": "#/components/responses/Error"
1859
+ },
1860
+ "429": {
1861
+ "$ref": "#/components/responses/Error"
1862
+ }
1863
+ }
1864
+ }
1865
+ },
1866
+ "/auth/passkeys/sign-in/options": {
1867
+ "post": {
1868
+ "tags": [
1869
+ "6. Passkeys"
1870
+ ],
1871
+ "summary": "Sign-in options",
1872
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1873
+ "operationId": "post_passkeys_signInOptions",
1874
+ "security": [],
1875
+ "parameters": [],
1876
+ "responses": {
1877
+ "200": {
1878
+ "description": "Success",
1879
+ "content": {
1880
+ "application/json": {
1881
+ "schema": {
1882
+ "$ref": "#/components/schemas/Success"
1883
+ }
1884
+ }
1885
+ }
1886
+ },
1887
+ "400": {
1888
+ "$ref": "#/components/responses/Error"
1889
+ },
1890
+ "401": {
1891
+ "$ref": "#/components/responses/Error"
1892
+ },
1893
+ "403": {
1894
+ "$ref": "#/components/responses/Error"
1895
+ },
1896
+ "429": {
1897
+ "$ref": "#/components/responses/Error"
1898
+ }
1899
+ }
1900
+ }
1901
+ },
1902
+ "/auth/passkeys/register/verify": {
1903
+ "post": {
1904
+ "tags": [
1905
+ "6. Passkeys"
1906
+ ],
1907
+ "summary": "Register passkey (from browser response)",
1908
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1909
+ "operationId": "post_passkeys_registerVerify",
1910
+ "security": [
1911
+ {
1912
+ "bearerAuth": []
1913
+ }
1914
+ ],
1915
+ "parameters": [],
1916
+ "responses": {
1917
+ "200": {
1918
+ "description": "Success",
1919
+ "content": {
1920
+ "application/json": {
1921
+ "schema": {
1922
+ "$ref": "#/components/schemas/Success"
1923
+ }
1924
+ }
1925
+ }
1926
+ },
1927
+ "400": {
1928
+ "$ref": "#/components/responses/Error"
1929
+ },
1930
+ "401": {
1931
+ "$ref": "#/components/responses/Error"
1932
+ },
1933
+ "403": {
1934
+ "$ref": "#/components/responses/Error"
1935
+ },
1936
+ "429": {
1937
+ "$ref": "#/components/responses/Error"
1938
+ }
1939
+ },
1940
+ "requestBody": {
1941
+ "required": true,
1942
+ "content": {
1943
+ "application/json": {
1944
+ "schema": {
1945
+ "type": "object"
1946
+ },
1947
+ "example": {
1948
+ "challengeToken": "<challengeToken>",
1949
+ "name": "My laptop",
1950
+ "response": {}
1951
+ }
1952
+ }
1953
+ }
1954
+ }
1955
+ }
1956
+ },
1957
+ "/auth/passkeys/sign-in/verify": {
1958
+ "post": {
1959
+ "tags": [
1960
+ "6. Passkeys"
1961
+ ],
1962
+ "summary": "Sign in with passkey (from browser response)",
1963
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
1964
+ "operationId": "post_passkeys_signInVerify",
1965
+ "security": [],
1966
+ "parameters": [],
1967
+ "responses": {
1968
+ "200": {
1969
+ "description": "Success",
1970
+ "content": {
1971
+ "application/json": {
1972
+ "schema": {
1973
+ "$ref": "#/components/schemas/Success"
1974
+ }
1975
+ }
1976
+ }
1977
+ },
1978
+ "400": {
1979
+ "$ref": "#/components/responses/Error"
1980
+ },
1981
+ "401": {
1982
+ "$ref": "#/components/responses/Error"
1983
+ },
1984
+ "403": {
1985
+ "$ref": "#/components/responses/Error"
1986
+ },
1987
+ "429": {
1988
+ "$ref": "#/components/responses/Error"
1989
+ }
1990
+ },
1991
+ "requestBody": {
1992
+ "required": true,
1993
+ "content": {
1994
+ "application/json": {
1995
+ "schema": {
1996
+ "type": "object"
1997
+ },
1998
+ "example": {
1999
+ "challengeToken": "<challengeToken>",
2000
+ "response": {}
2001
+ }
2002
+ }
2003
+ }
2004
+ }
2005
+ }
2006
+ },
2007
+ "/auth/passkeys": {
2008
+ "get": {
2009
+ "tags": [
2010
+ "6. Passkeys"
2011
+ ],
2012
+ "summary": "List my passkeys",
2013
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2014
+ "operationId": "get_passkeys_prefix",
2015
+ "security": [
2016
+ {
2017
+ "bearerAuth": []
2018
+ }
2019
+ ],
2020
+ "parameters": [],
2021
+ "responses": {
2022
+ "200": {
2023
+ "description": "Success",
2024
+ "content": {
2025
+ "application/json": {
2026
+ "schema": {
2027
+ "$ref": "#/components/schemas/Success"
2028
+ }
2029
+ }
2030
+ }
2031
+ },
2032
+ "400": {
2033
+ "$ref": "#/components/responses/Error"
2034
+ },
2035
+ "401": {
2036
+ "$ref": "#/components/responses/Error"
2037
+ },
2038
+ "403": {
2039
+ "$ref": "#/components/responses/Error"
2040
+ },
2041
+ "429": {
2042
+ "$ref": "#/components/responses/Error"
2043
+ }
2044
+ }
2045
+ }
2046
+ },
2047
+ "/auth/passkeys/{passkeyId}": {
2048
+ "patch": {
2049
+ "tags": [
2050
+ "6. Passkeys"
2051
+ ],
2052
+ "summary": "Rename passkey",
2053
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2054
+ "operationId": "patch_passkeys_passkey",
2055
+ "security": [
2056
+ {
2057
+ "bearerAuth": []
2058
+ }
2059
+ ],
2060
+ "parameters": [
2061
+ {
2062
+ "name": "passkeyId",
2063
+ "in": "path",
2064
+ "required": true,
2065
+ "schema": {
2066
+ "type": "string"
2067
+ }
2068
+ }
2069
+ ],
2070
+ "responses": {
2071
+ "200": {
2072
+ "description": "Success",
2073
+ "content": {
2074
+ "application/json": {
2075
+ "schema": {
2076
+ "$ref": "#/components/schemas/Success"
2077
+ }
2078
+ }
2079
+ }
2080
+ },
2081
+ "400": {
2082
+ "$ref": "#/components/responses/Error"
2083
+ },
2084
+ "401": {
2085
+ "$ref": "#/components/responses/Error"
2086
+ },
2087
+ "403": {
2088
+ "$ref": "#/components/responses/Error"
2089
+ },
2090
+ "429": {
2091
+ "$ref": "#/components/responses/Error"
2092
+ }
2093
+ },
2094
+ "requestBody": {
2095
+ "required": true,
2096
+ "content": {
2097
+ "application/json": {
2098
+ "schema": {
2099
+ "type": "object"
2100
+ },
2101
+ "example": {
2102
+ "name": "Work laptop"
2103
+ }
2104
+ }
2105
+ }
2106
+ }
2107
+ },
2108
+ "delete": {
2109
+ "tags": [
2110
+ "6. Passkeys"
2111
+ ],
2112
+ "summary": "Remove passkey",
2113
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2114
+ "operationId": "delete_passkeys_passkey",
2115
+ "security": [
2116
+ {
2117
+ "bearerAuth": []
2118
+ }
2119
+ ],
2120
+ "parameters": [
2121
+ {
2122
+ "name": "passkeyId",
2123
+ "in": "path",
2124
+ "required": true,
2125
+ "schema": {
2126
+ "type": "string"
2127
+ }
2128
+ }
2129
+ ],
2130
+ "responses": {
2131
+ "200": {
2132
+ "description": "Success",
2133
+ "content": {
2134
+ "application/json": {
2135
+ "schema": {
2136
+ "$ref": "#/components/schemas/Success"
2137
+ }
2138
+ }
2139
+ }
2140
+ },
2141
+ "400": {
2142
+ "$ref": "#/components/responses/Error"
2143
+ },
2144
+ "401": {
2145
+ "$ref": "#/components/responses/Error"
2146
+ },
2147
+ "403": {
2148
+ "$ref": "#/components/responses/Error"
2149
+ },
2150
+ "429": {
2151
+ "$ref": "#/components/responses/Error"
2152
+ }
2153
+ }
2154
+ }
2155
+ },
2156
+ "/auth/organizations": {
2157
+ "post": {
2158
+ "tags": [
2159
+ "7. Organizations"
2160
+ ],
2161
+ "summary": "Create organization",
2162
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2163
+ "operationId": "post_organizations_prefix",
2164
+ "security": [
2165
+ {
2166
+ "bearerAuth": []
2167
+ }
2168
+ ],
2169
+ "parameters": [],
2170
+ "responses": {
2171
+ "201": {
2172
+ "description": "Success",
2173
+ "content": {
2174
+ "application/json": {
2175
+ "schema": {
2176
+ "$ref": "#/components/schemas/Success"
2177
+ }
2178
+ }
2179
+ }
2180
+ },
2181
+ "400": {
2182
+ "$ref": "#/components/responses/Error"
2183
+ },
2184
+ "401": {
2185
+ "$ref": "#/components/responses/Error"
2186
+ },
2187
+ "403": {
2188
+ "$ref": "#/components/responses/Error"
2189
+ },
2190
+ "429": {
2191
+ "$ref": "#/components/responses/Error"
2192
+ }
2193
+ },
2194
+ "requestBody": {
2195
+ "required": true,
2196
+ "content": {
2197
+ "application/json": {
2198
+ "schema": {
2199
+ "type": "object"
2200
+ },
2201
+ "example": {
2202
+ "name": "Acme Travels",
2203
+ "slug": "acme-travels"
2204
+ }
2205
+ }
2206
+ }
2207
+ }
2208
+ },
2209
+ "get": {
2210
+ "tags": [
2211
+ "7. Organizations"
2212
+ ],
2213
+ "summary": "My organizations",
2214
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2215
+ "operationId": "get_organizations_prefix",
2216
+ "security": [
2217
+ {
2218
+ "bearerAuth": []
2219
+ }
2220
+ ],
2221
+ "parameters": [],
2222
+ "responses": {
2223
+ "200": {
2224
+ "description": "Success",
2225
+ "content": {
2226
+ "application/json": {
2227
+ "schema": {
2228
+ "$ref": "#/components/schemas/Success"
2229
+ }
2230
+ }
2231
+ }
2232
+ },
2233
+ "400": {
2234
+ "$ref": "#/components/responses/Error"
2235
+ },
2236
+ "401": {
2237
+ "$ref": "#/components/responses/Error"
2238
+ },
2239
+ "403": {
2240
+ "$ref": "#/components/responses/Error"
2241
+ },
2242
+ "429": {
2243
+ "$ref": "#/components/responses/Error"
2244
+ }
2245
+ }
2246
+ }
2247
+ },
2248
+ "/auth/organizations/{organizationId}": {
2249
+ "get": {
2250
+ "tags": [
2251
+ "7. Organizations"
2252
+ ],
2253
+ "summary": "Get organization",
2254
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2255
+ "operationId": "get_organizations_organization",
2256
+ "security": [
2257
+ {
2258
+ "bearerAuth": []
2259
+ }
2260
+ ],
2261
+ "parameters": [
2262
+ {
2263
+ "name": "organizationId",
2264
+ "in": "path",
2265
+ "required": true,
2266
+ "schema": {
2267
+ "type": "string"
2268
+ }
2269
+ }
2270
+ ],
2271
+ "responses": {
2272
+ "200": {
2273
+ "description": "Success",
2274
+ "content": {
2275
+ "application/json": {
2276
+ "schema": {
2277
+ "$ref": "#/components/schemas/Success"
2278
+ }
2279
+ }
2280
+ }
2281
+ },
2282
+ "400": {
2283
+ "$ref": "#/components/responses/Error"
2284
+ },
2285
+ "401": {
2286
+ "$ref": "#/components/responses/Error"
2287
+ },
2288
+ "403": {
2289
+ "$ref": "#/components/responses/Error"
2290
+ },
2291
+ "429": {
2292
+ "$ref": "#/components/responses/Error"
2293
+ }
2294
+ }
2295
+ },
2296
+ "patch": {
2297
+ "tags": [
2298
+ "7. Organizations"
2299
+ ],
2300
+ "summary": "Update organization",
2301
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2302
+ "operationId": "patch_organizations_organization",
2303
+ "security": [
2304
+ {
2305
+ "bearerAuth": []
2306
+ }
2307
+ ],
2308
+ "parameters": [
2309
+ {
2310
+ "name": "organizationId",
2311
+ "in": "path",
2312
+ "required": true,
2313
+ "schema": {
2314
+ "type": "string"
2315
+ }
2316
+ }
2317
+ ],
2318
+ "responses": {
2319
+ "200": {
2320
+ "description": "Success",
2321
+ "content": {
2322
+ "application/json": {
2323
+ "schema": {
2324
+ "$ref": "#/components/schemas/Success"
2325
+ }
2326
+ }
2327
+ }
2328
+ },
2329
+ "400": {
2330
+ "$ref": "#/components/responses/Error"
2331
+ },
2332
+ "401": {
2333
+ "$ref": "#/components/responses/Error"
2334
+ },
2335
+ "403": {
2336
+ "$ref": "#/components/responses/Error"
2337
+ },
2338
+ "429": {
2339
+ "$ref": "#/components/responses/Error"
2340
+ }
2341
+ },
2342
+ "requestBody": {
2343
+ "required": true,
2344
+ "content": {
2345
+ "application/json": {
2346
+ "schema": {
2347
+ "type": "object"
2348
+ },
2349
+ "example": {
2350
+ "name": "Acme Travels India",
2351
+ "metadata": {
2352
+ "city": "Bengaluru"
2353
+ }
2354
+ }
2355
+ }
2356
+ }
2357
+ }
2358
+ },
2359
+ "delete": {
2360
+ "tags": [
2361
+ "7. Organizations"
2362
+ ],
2363
+ "summary": "Delete organization",
2364
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2365
+ "operationId": "delete_organizations_organization",
2366
+ "security": [
2367
+ {
2368
+ "bearerAuth": []
2369
+ }
2370
+ ],
2371
+ "parameters": [
2372
+ {
2373
+ "name": "organizationId",
2374
+ "in": "path",
2375
+ "required": true,
2376
+ "schema": {
2377
+ "type": "string"
2378
+ }
2379
+ }
2380
+ ],
2381
+ "responses": {
2382
+ "200": {
2383
+ "description": "Success",
2384
+ "content": {
2385
+ "application/json": {
2386
+ "schema": {
2387
+ "$ref": "#/components/schemas/Success"
2388
+ }
2389
+ }
2390
+ }
2391
+ },
2392
+ "400": {
2393
+ "$ref": "#/components/responses/Error"
2394
+ },
2395
+ "401": {
2396
+ "$ref": "#/components/responses/Error"
2397
+ },
2398
+ "403": {
2399
+ "$ref": "#/components/responses/Error"
2400
+ },
2401
+ "429": {
2402
+ "$ref": "#/components/responses/Error"
2403
+ }
2404
+ }
2405
+ }
2406
+ },
2407
+ "/auth/organizations/{organizationId}/invitations": {
2408
+ "post": {
2409
+ "tags": [
2410
+ "7. Organizations"
2411
+ ],
2412
+ "summary": "Invite member",
2413
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2414
+ "operationId": "post_organizations_invitations",
2415
+ "security": [
2416
+ {
2417
+ "bearerAuth": []
2418
+ }
2419
+ ],
2420
+ "parameters": [
2421
+ {
2422
+ "name": "organizationId",
2423
+ "in": "path",
2424
+ "required": true,
2425
+ "schema": {
2426
+ "type": "string"
2427
+ }
2428
+ }
2429
+ ],
2430
+ "responses": {
2431
+ "201": {
2432
+ "description": "Success",
2433
+ "content": {
2434
+ "application/json": {
2435
+ "schema": {
2436
+ "$ref": "#/components/schemas/Success"
2437
+ }
2438
+ }
2439
+ }
2440
+ },
2441
+ "400": {
2442
+ "$ref": "#/components/responses/Error"
2443
+ },
2444
+ "401": {
2445
+ "$ref": "#/components/responses/Error"
2446
+ },
2447
+ "403": {
2448
+ "$ref": "#/components/responses/Error"
2449
+ },
2450
+ "429": {
2451
+ "$ref": "#/components/responses/Error"
2452
+ }
2453
+ },
2454
+ "requestBody": {
2455
+ "required": true,
2456
+ "content": {
2457
+ "application/json": {
2458
+ "schema": {
2459
+ "type": "object"
2460
+ },
2461
+ "example": {
2462
+ "email": "ravi@example.com",
2463
+ "role": "member"
2464
+ }
2465
+ }
2466
+ }
2467
+ }
2468
+ },
2469
+ "get": {
2470
+ "tags": [
2471
+ "7. Organizations"
2472
+ ],
2473
+ "summary": "List invitations",
2474
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2475
+ "operationId": "get_organizations_invitations",
2476
+ "security": [
2477
+ {
2478
+ "bearerAuth": []
2479
+ }
2480
+ ],
2481
+ "parameters": [
2482
+ {
2483
+ "name": "organizationId",
2484
+ "in": "path",
2485
+ "required": true,
2486
+ "schema": {
2487
+ "type": "string"
2488
+ }
2489
+ }
2490
+ ],
2491
+ "responses": {
2492
+ "200": {
2493
+ "description": "Success",
2494
+ "content": {
2495
+ "application/json": {
2496
+ "schema": {
2497
+ "$ref": "#/components/schemas/Success"
2498
+ }
2499
+ }
2500
+ }
2501
+ },
2502
+ "400": {
2503
+ "$ref": "#/components/responses/Error"
2504
+ },
2505
+ "401": {
2506
+ "$ref": "#/components/responses/Error"
2507
+ },
2508
+ "403": {
2509
+ "$ref": "#/components/responses/Error"
2510
+ },
2511
+ "429": {
2512
+ "$ref": "#/components/responses/Error"
2513
+ }
2514
+ }
2515
+ }
2516
+ },
2517
+ "/auth/organizations/invitations/accept": {
2518
+ "post": {
2519
+ "tags": [
2520
+ "7. Organizations"
2521
+ ],
2522
+ "summary": "Accept invitation (as invited user)",
2523
+ "description": "Sign in as ravi@example.com first (e.g. \"Passwordless > Verify email code\"), so the access token is theirs.\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2524
+ "operationId": "post_organizations_acceptInvitation",
2525
+ "security": [
2526
+ {
2527
+ "bearerAuth": []
2528
+ }
2529
+ ],
2530
+ "parameters": [],
2531
+ "responses": {
2532
+ "200": {
2533
+ "description": "Success",
2534
+ "content": {
2535
+ "application/json": {
2536
+ "schema": {
2537
+ "$ref": "#/components/schemas/Success"
2538
+ }
2539
+ }
2540
+ }
2541
+ },
2542
+ "400": {
2543
+ "$ref": "#/components/responses/Error"
2544
+ },
2545
+ "401": {
2546
+ "$ref": "#/components/responses/Error"
2547
+ },
2548
+ "403": {
2549
+ "$ref": "#/components/responses/Error"
2550
+ },
2551
+ "429": {
2552
+ "$ref": "#/components/responses/Error"
2553
+ }
2554
+ },
2555
+ "requestBody": {
2556
+ "required": true,
2557
+ "content": {
2558
+ "application/json": {
2559
+ "schema": {
2560
+ "type": "object"
2561
+ },
2562
+ "example": {
2563
+ "token": "<invitationToken>"
2564
+ }
2565
+ }
2566
+ }
2567
+ }
2568
+ }
2569
+ },
2570
+ "/auth/organizations/{organizationId}/members": {
2571
+ "get": {
2572
+ "tags": [
2573
+ "7. Organizations"
2574
+ ],
2575
+ "summary": "List members",
2576
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2577
+ "operationId": "get_organizations_members",
2578
+ "security": [
2579
+ {
2580
+ "bearerAuth": []
2581
+ }
2582
+ ],
2583
+ "parameters": [
2584
+ {
2585
+ "name": "organizationId",
2586
+ "in": "path",
2587
+ "required": true,
2588
+ "schema": {
2589
+ "type": "string"
2590
+ }
2591
+ }
2592
+ ],
2593
+ "responses": {
2594
+ "200": {
2595
+ "description": "Success",
2596
+ "content": {
2597
+ "application/json": {
2598
+ "schema": {
2599
+ "$ref": "#/components/schemas/Success"
2600
+ }
2601
+ }
2602
+ }
2603
+ },
2604
+ "400": {
2605
+ "$ref": "#/components/responses/Error"
2606
+ },
2607
+ "401": {
2608
+ "$ref": "#/components/responses/Error"
2609
+ },
2610
+ "403": {
2611
+ "$ref": "#/components/responses/Error"
2612
+ },
2613
+ "429": {
2614
+ "$ref": "#/components/responses/Error"
2615
+ }
2616
+ }
2617
+ }
2618
+ },
2619
+ "/auth/organizations/{organizationId}/members/{memberUserId}": {
2620
+ "patch": {
2621
+ "tags": [
2622
+ "7. Organizations"
2623
+ ],
2624
+ "summary": "Change member role",
2625
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2626
+ "operationId": "patch_organizations_member",
2627
+ "security": [
2628
+ {
2629
+ "bearerAuth": []
2630
+ }
2631
+ ],
2632
+ "parameters": [
2633
+ {
2634
+ "name": "organizationId",
2635
+ "in": "path",
2636
+ "required": true,
2637
+ "schema": {
2638
+ "type": "string"
2639
+ }
2640
+ },
2641
+ {
2642
+ "name": "memberUserId",
2643
+ "in": "path",
2644
+ "required": true,
2645
+ "schema": {
2646
+ "type": "string"
2647
+ }
2648
+ }
2649
+ ],
2650
+ "responses": {
2651
+ "200": {
2652
+ "description": "Success",
2653
+ "content": {
2654
+ "application/json": {
2655
+ "schema": {
2656
+ "$ref": "#/components/schemas/Success"
2657
+ }
2658
+ }
2659
+ }
2660
+ },
2661
+ "400": {
2662
+ "$ref": "#/components/responses/Error"
2663
+ },
2664
+ "401": {
2665
+ "$ref": "#/components/responses/Error"
2666
+ },
2667
+ "403": {
2668
+ "$ref": "#/components/responses/Error"
2669
+ },
2670
+ "429": {
2671
+ "$ref": "#/components/responses/Error"
2672
+ }
2673
+ },
2674
+ "requestBody": {
2675
+ "required": true,
2676
+ "content": {
2677
+ "application/json": {
2678
+ "schema": {
2679
+ "type": "object"
2680
+ },
2681
+ "example": {
2682
+ "role": "admin"
2683
+ }
2684
+ }
2685
+ }
2686
+ }
2687
+ },
2688
+ "delete": {
2689
+ "tags": [
2690
+ "7. Organizations"
2691
+ ],
2692
+ "summary": "Remove member",
2693
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2694
+ "operationId": "delete_organizations_member",
2695
+ "security": [
2696
+ {
2697
+ "bearerAuth": []
2698
+ }
2699
+ ],
2700
+ "parameters": [
2701
+ {
2702
+ "name": "organizationId",
2703
+ "in": "path",
2704
+ "required": true,
2705
+ "schema": {
2706
+ "type": "string"
2707
+ }
2708
+ },
2709
+ {
2710
+ "name": "memberUserId",
2711
+ "in": "path",
2712
+ "required": true,
2713
+ "schema": {
2714
+ "type": "string"
2715
+ }
2716
+ }
2717
+ ],
2718
+ "responses": {
2719
+ "200": {
2720
+ "description": "Success",
2721
+ "content": {
2722
+ "application/json": {
2723
+ "schema": {
2724
+ "$ref": "#/components/schemas/Success"
2725
+ }
2726
+ }
2727
+ }
2728
+ },
2729
+ "400": {
2730
+ "$ref": "#/components/responses/Error"
2731
+ },
2732
+ "401": {
2733
+ "$ref": "#/components/responses/Error"
2734
+ },
2735
+ "403": {
2736
+ "$ref": "#/components/responses/Error"
2737
+ },
2738
+ "429": {
2739
+ "$ref": "#/components/responses/Error"
2740
+ }
2741
+ }
2742
+ }
2743
+ },
2744
+ "/auth/organizations/{organizationId}/invitations/{invitationId}": {
2745
+ "delete": {
2746
+ "tags": [
2747
+ "7. Organizations"
2748
+ ],
2749
+ "summary": "Cancel invitation",
2750
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2751
+ "operationId": "delete_organizations_invitation",
2752
+ "security": [
2753
+ {
2754
+ "bearerAuth": []
2755
+ }
2756
+ ],
2757
+ "parameters": [
2758
+ {
2759
+ "name": "organizationId",
2760
+ "in": "path",
2761
+ "required": true,
2762
+ "schema": {
2763
+ "type": "string"
2764
+ }
2765
+ },
2766
+ {
2767
+ "name": "invitationId",
2768
+ "in": "path",
2769
+ "required": true,
2770
+ "schema": {
2771
+ "type": "string"
2772
+ }
2773
+ }
2774
+ ],
2775
+ "responses": {
2776
+ "200": {
2777
+ "description": "Success",
2778
+ "content": {
2779
+ "application/json": {
2780
+ "schema": {
2781
+ "$ref": "#/components/schemas/Success"
2782
+ }
2783
+ }
2784
+ }
2785
+ },
2786
+ "400": {
2787
+ "$ref": "#/components/responses/Error"
2788
+ },
2789
+ "401": {
2790
+ "$ref": "#/components/responses/Error"
2791
+ },
2792
+ "403": {
2793
+ "$ref": "#/components/responses/Error"
2794
+ },
2795
+ "429": {
2796
+ "$ref": "#/components/responses/Error"
2797
+ }
2798
+ }
2799
+ }
2800
+ },
2801
+ "/auth/organizations/switch": {
2802
+ "post": {
2803
+ "tags": [
2804
+ "7. Organizations"
2805
+ ],
2806
+ "summary": "Switch active organization",
2807
+ "description": "The new access token carries org_id and org_role (decode it at jwt.io to see).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2808
+ "operationId": "post_organizations_switch",
2809
+ "security": [
2810
+ {
2811
+ "bearerAuth": []
2812
+ }
2813
+ ],
2814
+ "parameters": [],
2815
+ "responses": {
2816
+ "200": {
2817
+ "description": "Success",
2818
+ "content": {
2819
+ "application/json": {
2820
+ "schema": {
2821
+ "$ref": "#/components/schemas/Success"
2822
+ }
2823
+ }
2824
+ }
2825
+ },
2826
+ "400": {
2827
+ "$ref": "#/components/responses/Error"
2828
+ },
2829
+ "401": {
2830
+ "$ref": "#/components/responses/Error"
2831
+ },
2832
+ "403": {
2833
+ "$ref": "#/components/responses/Error"
2834
+ },
2835
+ "429": {
2836
+ "$ref": "#/components/responses/Error"
2837
+ }
2838
+ },
2839
+ "requestBody": {
2840
+ "required": true,
2841
+ "content": {
2842
+ "application/json": {
2843
+ "schema": {
2844
+ "type": "object"
2845
+ },
2846
+ "example": {
2847
+ "organizationId": "<organizationId>"
2848
+ }
2849
+ }
2850
+ }
2851
+ }
2852
+ }
2853
+ },
2854
+ "/auth/admin/users": {
2855
+ "get": {
2856
+ "tags": [
2857
+ "8. Admin"
2858
+ ],
2859
+ "summary": "Search users",
2860
+ "description": "Make yourself admin first: dev dashboard > \"Make admin\", then Login again.\n\nRequires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2861
+ "operationId": "get_admin_users",
2862
+ "security": [
2863
+ {
2864
+ "bearerAuth": []
2865
+ }
2866
+ ],
2867
+ "parameters": [
2868
+ {
2869
+ "name": "search",
2870
+ "in": "query",
2871
+ "required": false,
2872
+ "schema": {
2873
+ "type": "string"
2874
+ },
2875
+ "example": "example.com"
2876
+ },
2877
+ {
2878
+ "name": "page",
2879
+ "in": "query",
2880
+ "required": false,
2881
+ "schema": {
2882
+ "type": "string"
2883
+ },
2884
+ "example": "1"
2885
+ },
2886
+ {
2887
+ "name": "pageSize",
2888
+ "in": "query",
2889
+ "required": false,
2890
+ "schema": {
2891
+ "type": "string"
2892
+ },
2893
+ "example": "20"
2894
+ }
2895
+ ],
2896
+ "responses": {
2897
+ "200": {
2898
+ "description": "Success",
2899
+ "content": {
2900
+ "application/json": {
2901
+ "schema": {
2902
+ "$ref": "#/components/schemas/Success"
2903
+ }
2904
+ }
2905
+ }
2906
+ },
2907
+ "400": {
2908
+ "$ref": "#/components/responses/Error"
2909
+ },
2910
+ "401": {
2911
+ "$ref": "#/components/responses/Error"
2912
+ },
2913
+ "403": {
2914
+ "$ref": "#/components/responses/Error"
2915
+ },
2916
+ "429": {
2917
+ "$ref": "#/components/responses/Error"
2918
+ }
2919
+ }
2920
+ }
2921
+ },
2922
+ "/auth/admin/users/{userId}": {
2923
+ "get": {
2924
+ "tags": [
2925
+ "8. Admin"
2926
+ ],
2927
+ "summary": "Get user details",
2928
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2929
+ "operationId": "get_admin_user",
2930
+ "security": [
2931
+ {
2932
+ "bearerAuth": []
2933
+ }
2934
+ ],
2935
+ "parameters": [
2936
+ {
2937
+ "name": "userId",
2938
+ "in": "path",
2939
+ "required": true,
2940
+ "schema": {
2941
+ "type": "string"
2942
+ }
2943
+ }
2944
+ ],
2945
+ "responses": {
2946
+ "200": {
2947
+ "description": "Success",
2948
+ "content": {
2949
+ "application/json": {
2950
+ "schema": {
2951
+ "$ref": "#/components/schemas/Success"
2952
+ }
2953
+ }
2954
+ }
2955
+ },
2956
+ "400": {
2957
+ "$ref": "#/components/responses/Error"
2958
+ },
2959
+ "401": {
2960
+ "$ref": "#/components/responses/Error"
2961
+ },
2962
+ "403": {
2963
+ "$ref": "#/components/responses/Error"
2964
+ },
2965
+ "429": {
2966
+ "$ref": "#/components/responses/Error"
2967
+ }
2968
+ }
2969
+ },
2970
+ "patch": {
2971
+ "tags": [
2972
+ "8. Admin"
2973
+ ],
2974
+ "summary": "Update user",
2975
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
2976
+ "operationId": "patch_admin_user",
2977
+ "security": [
2978
+ {
2979
+ "bearerAuth": []
2980
+ }
2981
+ ],
2982
+ "parameters": [
2983
+ {
2984
+ "name": "userId",
2985
+ "in": "path",
2986
+ "required": true,
2987
+ "schema": {
2988
+ "type": "string"
2989
+ }
2990
+ }
2991
+ ],
2992
+ "responses": {
2993
+ "200": {
2994
+ "description": "Success",
2995
+ "content": {
2996
+ "application/json": {
2997
+ "schema": {
2998
+ "$ref": "#/components/schemas/Success"
2999
+ }
3000
+ }
3001
+ }
3002
+ },
3003
+ "400": {
3004
+ "$ref": "#/components/responses/Error"
3005
+ },
3006
+ "401": {
3007
+ "$ref": "#/components/responses/Error"
3008
+ },
3009
+ "403": {
3010
+ "$ref": "#/components/responses/Error"
3011
+ },
3012
+ "429": {
3013
+ "$ref": "#/components/responses/Error"
3014
+ }
3015
+ },
3016
+ "requestBody": {
3017
+ "required": true,
3018
+ "content": {
3019
+ "application/json": {
3020
+ "schema": {
3021
+ "type": "object"
3022
+ },
3023
+ "example": {
3024
+ "metadata": {
3025
+ "kycStatus": "approved"
3026
+ }
3027
+ }
3028
+ }
3029
+ }
3030
+ }
3031
+ },
3032
+ "delete": {
3033
+ "tags": [
3034
+ "8. Admin"
3035
+ ],
3036
+ "summary": "Delete user",
3037
+ "description": "Uses <userId>: careful, that is you unless you change it.\n\nRequires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3038
+ "operationId": "delete_admin_user",
3039
+ "security": [
3040
+ {
3041
+ "bearerAuth": []
3042
+ }
3043
+ ],
3044
+ "parameters": [
3045
+ {
3046
+ "name": "userId",
3047
+ "in": "path",
3048
+ "required": true,
3049
+ "schema": {
3050
+ "type": "string"
3051
+ }
3052
+ }
3053
+ ],
3054
+ "responses": {
3055
+ "200": {
3056
+ "description": "Success",
3057
+ "content": {
3058
+ "application/json": {
3059
+ "schema": {
3060
+ "$ref": "#/components/schemas/Success"
3061
+ }
3062
+ }
3063
+ }
3064
+ },
3065
+ "400": {
3066
+ "$ref": "#/components/responses/Error"
3067
+ },
3068
+ "401": {
3069
+ "$ref": "#/components/responses/Error"
3070
+ },
3071
+ "403": {
3072
+ "$ref": "#/components/responses/Error"
3073
+ },
3074
+ "429": {
3075
+ "$ref": "#/components/responses/Error"
3076
+ }
3077
+ }
3078
+ }
3079
+ },
3080
+ "/auth/admin/users/{userId}/roles": {
3081
+ "put": {
3082
+ "tags": [
3083
+ "8. Admin"
3084
+ ],
3085
+ "summary": "Set roles",
3086
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3087
+ "operationId": "put_admin_userRoles",
3088
+ "security": [
3089
+ {
3090
+ "bearerAuth": []
3091
+ }
3092
+ ],
3093
+ "parameters": [
3094
+ {
3095
+ "name": "userId",
3096
+ "in": "path",
3097
+ "required": true,
3098
+ "schema": {
3099
+ "type": "string"
3100
+ }
3101
+ }
3102
+ ],
3103
+ "responses": {
3104
+ "200": {
3105
+ "description": "Success",
3106
+ "content": {
3107
+ "application/json": {
3108
+ "schema": {
3109
+ "$ref": "#/components/schemas/Success"
3110
+ }
3111
+ }
3112
+ }
3113
+ },
3114
+ "400": {
3115
+ "$ref": "#/components/responses/Error"
3116
+ },
3117
+ "401": {
3118
+ "$ref": "#/components/responses/Error"
3119
+ },
3120
+ "403": {
3121
+ "$ref": "#/components/responses/Error"
3122
+ },
3123
+ "429": {
3124
+ "$ref": "#/components/responses/Error"
3125
+ }
3126
+ },
3127
+ "requestBody": {
3128
+ "required": true,
3129
+ "content": {
3130
+ "application/json": {
3131
+ "schema": {
3132
+ "type": "object"
3133
+ },
3134
+ "example": {
3135
+ "roles": [
3136
+ "user",
3137
+ "admin"
3138
+ ]
3139
+ }
3140
+ }
3141
+ }
3142
+ }
3143
+ }
3144
+ },
3145
+ "/auth/admin/users/{userId}/suspend": {
3146
+ "post": {
3147
+ "tags": [
3148
+ "8. Admin"
3149
+ ],
3150
+ "summary": "Suspend user",
3151
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3152
+ "operationId": "post_admin_userSuspend",
3153
+ "security": [
3154
+ {
3155
+ "bearerAuth": []
3156
+ }
3157
+ ],
3158
+ "parameters": [
3159
+ {
3160
+ "name": "userId",
3161
+ "in": "path",
3162
+ "required": true,
3163
+ "schema": {
3164
+ "type": "string"
3165
+ }
3166
+ }
3167
+ ],
3168
+ "responses": {
3169
+ "200": {
3170
+ "description": "Success",
3171
+ "content": {
3172
+ "application/json": {
3173
+ "schema": {
3174
+ "$ref": "#/components/schemas/Success"
3175
+ }
3176
+ }
3177
+ }
3178
+ },
3179
+ "400": {
3180
+ "$ref": "#/components/responses/Error"
3181
+ },
3182
+ "401": {
3183
+ "$ref": "#/components/responses/Error"
3184
+ },
3185
+ "403": {
3186
+ "$ref": "#/components/responses/Error"
3187
+ },
3188
+ "429": {
3189
+ "$ref": "#/components/responses/Error"
3190
+ }
3191
+ },
3192
+ "requestBody": {
3193
+ "required": true,
3194
+ "content": {
3195
+ "application/json": {
3196
+ "schema": {
3197
+ "type": "object"
3198
+ },
3199
+ "example": {
3200
+ "reason": "Manual test"
3201
+ }
3202
+ }
3203
+ }
3204
+ }
3205
+ }
3206
+ },
3207
+ "/auth/admin/users/{userId}/unsuspend": {
3208
+ "post": {
3209
+ "tags": [
3210
+ "8. Admin"
3211
+ ],
3212
+ "summary": "Unsuspend user",
3213
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3214
+ "operationId": "post_admin_userUnsuspend",
3215
+ "security": [
3216
+ {
3217
+ "bearerAuth": []
3218
+ }
3219
+ ],
3220
+ "parameters": [
3221
+ {
3222
+ "name": "userId",
3223
+ "in": "path",
3224
+ "required": true,
3225
+ "schema": {
3226
+ "type": "string"
3227
+ }
3228
+ }
3229
+ ],
3230
+ "responses": {
3231
+ "200": {
3232
+ "description": "Success",
3233
+ "content": {
3234
+ "application/json": {
3235
+ "schema": {
3236
+ "$ref": "#/components/schemas/Success"
3237
+ }
3238
+ }
3239
+ }
3240
+ },
3241
+ "400": {
3242
+ "$ref": "#/components/responses/Error"
3243
+ },
3244
+ "401": {
3245
+ "$ref": "#/components/responses/Error"
3246
+ },
3247
+ "403": {
3248
+ "$ref": "#/components/responses/Error"
3249
+ },
3250
+ "429": {
3251
+ "$ref": "#/components/responses/Error"
3252
+ }
3253
+ }
3254
+ }
3255
+ },
3256
+ "/auth/admin/users/{userId}/verify-email": {
3257
+ "post": {
3258
+ "tags": [
3259
+ "8. Admin"
3260
+ ],
3261
+ "summary": "Verify user email",
3262
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3263
+ "operationId": "post_admin_userVerifyEmail",
3264
+ "security": [
3265
+ {
3266
+ "bearerAuth": []
3267
+ }
3268
+ ],
3269
+ "parameters": [
3270
+ {
3271
+ "name": "userId",
3272
+ "in": "path",
3273
+ "required": true,
3274
+ "schema": {
3275
+ "type": "string"
3276
+ }
3277
+ }
3278
+ ],
3279
+ "responses": {
3280
+ "200": {
3281
+ "description": "Success",
3282
+ "content": {
3283
+ "application/json": {
3284
+ "schema": {
3285
+ "$ref": "#/components/schemas/Success"
3286
+ }
3287
+ }
3288
+ }
3289
+ },
3290
+ "400": {
3291
+ "$ref": "#/components/responses/Error"
3292
+ },
3293
+ "401": {
3294
+ "$ref": "#/components/responses/Error"
3295
+ },
3296
+ "403": {
3297
+ "$ref": "#/components/responses/Error"
3298
+ },
3299
+ "429": {
3300
+ "$ref": "#/components/responses/Error"
3301
+ }
3302
+ }
3303
+ }
3304
+ },
3305
+ "/auth/admin/users/{userId}/reset-2fa": {
3306
+ "post": {
3307
+ "tags": [
3308
+ "8. Admin"
3309
+ ],
3310
+ "summary": "Reset user 2FA",
3311
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3312
+ "operationId": "post_admin_userResetTwoFactor",
3313
+ "security": [
3314
+ {
3315
+ "bearerAuth": []
3316
+ }
3317
+ ],
3318
+ "parameters": [
3319
+ {
3320
+ "name": "userId",
3321
+ "in": "path",
3322
+ "required": true,
3323
+ "schema": {
3324
+ "type": "string"
3325
+ }
3326
+ }
3327
+ ],
3328
+ "responses": {
3329
+ "200": {
3330
+ "description": "Success",
3331
+ "content": {
3332
+ "application/json": {
3333
+ "schema": {
3334
+ "$ref": "#/components/schemas/Success"
3335
+ }
3336
+ }
3337
+ }
3338
+ },
3339
+ "400": {
3340
+ "$ref": "#/components/responses/Error"
3341
+ },
3342
+ "401": {
3343
+ "$ref": "#/components/responses/Error"
3344
+ },
3345
+ "403": {
3346
+ "$ref": "#/components/responses/Error"
3347
+ },
3348
+ "429": {
3349
+ "$ref": "#/components/responses/Error"
3350
+ }
3351
+ }
3352
+ }
3353
+ },
3354
+ "/auth/admin/users/{userId}/logout-all": {
3355
+ "post": {
3356
+ "tags": [
3357
+ "8. Admin"
3358
+ ],
3359
+ "summary": "Sign user out everywhere",
3360
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3361
+ "operationId": "post_admin_userLogoutAll",
3362
+ "security": [
3363
+ {
3364
+ "bearerAuth": []
3365
+ }
3366
+ ],
3367
+ "parameters": [
3368
+ {
3369
+ "name": "userId",
3370
+ "in": "path",
3371
+ "required": true,
3372
+ "schema": {
3373
+ "type": "string"
3374
+ }
3375
+ }
3376
+ ],
3377
+ "responses": {
3378
+ "200": {
3379
+ "description": "Success",
3380
+ "content": {
3381
+ "application/json": {
3382
+ "schema": {
3383
+ "$ref": "#/components/schemas/Success"
3384
+ }
3385
+ }
3386
+ }
3387
+ },
3388
+ "400": {
3389
+ "$ref": "#/components/responses/Error"
3390
+ },
3391
+ "401": {
3392
+ "$ref": "#/components/responses/Error"
3393
+ },
3394
+ "403": {
3395
+ "$ref": "#/components/responses/Error"
3396
+ },
3397
+ "429": {
3398
+ "$ref": "#/components/responses/Error"
3399
+ }
3400
+ }
3401
+ }
3402
+ },
3403
+ "/auth/admin/settings": {
3404
+ "get": {
3405
+ "tags": [
3406
+ "8. Admin"
3407
+ ],
3408
+ "summary": "Get settings",
3409
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3410
+ "operationId": "get_admin_settings",
3411
+ "security": [
3412
+ {
3413
+ "bearerAuth": []
3414
+ }
3415
+ ],
3416
+ "parameters": [],
3417
+ "responses": {
3418
+ "200": {
3419
+ "description": "Success",
3420
+ "content": {
3421
+ "application/json": {
3422
+ "schema": {
3423
+ "$ref": "#/components/schemas/Success"
3424
+ }
3425
+ }
3426
+ }
3427
+ },
3428
+ "400": {
3429
+ "$ref": "#/components/responses/Error"
3430
+ },
3431
+ "401": {
3432
+ "$ref": "#/components/responses/Error"
3433
+ },
3434
+ "403": {
3435
+ "$ref": "#/components/responses/Error"
3436
+ },
3437
+ "429": {
3438
+ "$ref": "#/components/responses/Error"
3439
+ }
3440
+ }
3441
+ },
3442
+ "patch": {
3443
+ "tags": [
3444
+ "8. Admin"
3445
+ ],
3446
+ "summary": "Change settings",
3447
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3448
+ "operationId": "patch_admin_settings",
3449
+ "security": [
3450
+ {
3451
+ "bearerAuth": []
3452
+ }
3453
+ ],
3454
+ "parameters": [],
3455
+ "responses": {
3456
+ "200": {
3457
+ "description": "Success",
3458
+ "content": {
3459
+ "application/json": {
3460
+ "schema": {
3461
+ "$ref": "#/components/schemas/Success"
3462
+ }
3463
+ }
3464
+ }
3465
+ },
3466
+ "400": {
3467
+ "$ref": "#/components/responses/Error"
3468
+ },
3469
+ "401": {
3470
+ "$ref": "#/components/responses/Error"
3471
+ },
3472
+ "403": {
3473
+ "$ref": "#/components/responses/Error"
3474
+ },
3475
+ "429": {
3476
+ "$ref": "#/components/responses/Error"
3477
+ }
3478
+ },
3479
+ "requestBody": {
3480
+ "required": true,
3481
+ "content": {
3482
+ "application/json": {
3483
+ "schema": {
3484
+ "type": "object"
3485
+ },
3486
+ "example": {
3487
+ "magicLink": {
3488
+ "enabled": true
3489
+ },
3490
+ "security": {
3491
+ "notifyOnNewSignIn": true
3492
+ }
3493
+ }
3494
+ }
3495
+ }
3496
+ }
3497
+ },
3498
+ "delete": {
3499
+ "tags": [
3500
+ "8. Admin"
3501
+ ],
3502
+ "summary": "Reset settings to code defaults",
3503
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3504
+ "operationId": "delete_admin_settings",
3505
+ "security": [
3506
+ {
3507
+ "bearerAuth": []
3508
+ }
3509
+ ],
3510
+ "parameters": [],
3511
+ "responses": {
3512
+ "200": {
3513
+ "description": "Success",
3514
+ "content": {
3515
+ "application/json": {
3516
+ "schema": {
3517
+ "$ref": "#/components/schemas/Success"
3518
+ }
3519
+ }
3520
+ }
3521
+ },
3522
+ "400": {
3523
+ "$ref": "#/components/responses/Error"
3524
+ },
3525
+ "401": {
3526
+ "$ref": "#/components/responses/Error"
3527
+ },
3528
+ "403": {
3529
+ "$ref": "#/components/responses/Error"
3530
+ },
3531
+ "429": {
3532
+ "$ref": "#/components/responses/Error"
3533
+ }
3534
+ }
3535
+ }
3536
+ },
3537
+ "/auth/admin/audit-log": {
3538
+ "get": {
3539
+ "tags": [
3540
+ "8. Admin"
3541
+ ],
3542
+ "summary": "Audit log",
3543
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3544
+ "operationId": "get_admin_auditLog",
3545
+ "security": [
3546
+ {
3547
+ "bearerAuth": []
3548
+ }
3549
+ ],
3550
+ "parameters": [
3551
+ {
3552
+ "name": "page",
3553
+ "in": "query",
3554
+ "required": false,
3555
+ "schema": {
3556
+ "type": "string"
3557
+ },
3558
+ "example": "1"
3559
+ },
3560
+ {
3561
+ "name": "pageSize",
3562
+ "in": "query",
3563
+ "required": false,
3564
+ "schema": {
3565
+ "type": "string"
3566
+ },
3567
+ "example": "20"
3568
+ }
3569
+ ],
3570
+ "responses": {
3571
+ "200": {
3572
+ "description": "Success",
3573
+ "content": {
3574
+ "application/json": {
3575
+ "schema": {
3576
+ "$ref": "#/components/schemas/Success"
3577
+ }
3578
+ }
3579
+ }
3580
+ },
3581
+ "400": {
3582
+ "$ref": "#/components/responses/Error"
3583
+ },
3584
+ "401": {
3585
+ "$ref": "#/components/responses/Error"
3586
+ },
3587
+ "403": {
3588
+ "$ref": "#/components/responses/Error"
3589
+ },
3590
+ "429": {
3591
+ "$ref": "#/components/responses/Error"
3592
+ }
3593
+ }
3594
+ }
3595
+ },
3596
+ "/auth/admin/stats": {
3597
+ "get": {
3598
+ "tags": [
3599
+ "8. Admin"
3600
+ ],
3601
+ "summary": "Stats",
3602
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3603
+ "operationId": "get_admin_stats",
3604
+ "security": [
3605
+ {
3606
+ "bearerAuth": []
3607
+ }
3608
+ ],
3609
+ "parameters": [],
3610
+ "responses": {
3611
+ "200": {
3612
+ "description": "Success",
3613
+ "content": {
3614
+ "application/json": {
3615
+ "schema": {
3616
+ "$ref": "#/components/schemas/Success"
3617
+ }
3618
+ }
3619
+ }
3620
+ },
3621
+ "400": {
3622
+ "$ref": "#/components/responses/Error"
3623
+ },
3624
+ "401": {
3625
+ "$ref": "#/components/responses/Error"
3626
+ },
3627
+ "403": {
3628
+ "$ref": "#/components/responses/Error"
3629
+ },
3630
+ "429": {
3631
+ "$ref": "#/components/responses/Error"
3632
+ }
3633
+ }
3634
+ }
3635
+ },
3636
+ "/auth/admin/maintenance/cleanup": {
3637
+ "post": {
3638
+ "tags": [
3639
+ "8. Admin"
3640
+ ],
3641
+ "summary": "Run data cleanup now",
3642
+ "description": "Deletes rows older than settings.retention allows (it also runs every hour). Returns how many rows each step removed.\n\nRequires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3643
+ "operationId": "post_admin_runCleanup",
3644
+ "security": [
3645
+ {
3646
+ "bearerAuth": []
3647
+ }
3648
+ ],
3649
+ "parameters": [],
3650
+ "responses": {
3651
+ "200": {
3652
+ "description": "Success",
3653
+ "content": {
3654
+ "application/json": {
3655
+ "schema": {
3656
+ "$ref": "#/components/schemas/Success"
3657
+ }
3658
+ }
3659
+ }
3660
+ },
3661
+ "400": {
3662
+ "$ref": "#/components/responses/Error"
3663
+ },
3664
+ "401": {
3665
+ "$ref": "#/components/responses/Error"
3666
+ },
3667
+ "403": {
3668
+ "$ref": "#/components/responses/Error"
3669
+ },
3670
+ "429": {
3671
+ "$ref": "#/components/responses/Error"
3672
+ }
3673
+ }
3674
+ }
3675
+ },
3676
+ "/auth/admin/signing-keys/rotate": {
3677
+ "post": {
3678
+ "tags": [
3679
+ "8. Admin"
3680
+ ],
3681
+ "summary": "Rotate signing key",
3682
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3683
+ "operationId": "post_admin_rotateSigningKey",
3684
+ "security": [
3685
+ {
3686
+ "bearerAuth": []
3687
+ }
3688
+ ],
3689
+ "parameters": [],
3690
+ "responses": {
3691
+ "200": {
3692
+ "description": "Success",
3693
+ "content": {
3694
+ "application/json": {
3695
+ "schema": {
3696
+ "$ref": "#/components/schemas/Success"
3697
+ }
3698
+ }
3699
+ }
3700
+ },
3701
+ "400": {
3702
+ "$ref": "#/components/responses/Error"
3703
+ },
3704
+ "401": {
3705
+ "$ref": "#/components/responses/Error"
3706
+ },
3707
+ "403": {
3708
+ "$ref": "#/components/responses/Error"
3709
+ },
3710
+ "429": {
3711
+ "$ref": "#/components/responses/Error"
3712
+ }
3713
+ }
3714
+ }
3715
+ },
3716
+ "/auth/admin/api-keys": {
3717
+ "post": {
3718
+ "tags": [
3719
+ "8. Admin"
3720
+ ],
3721
+ "summary": "Create API key",
3722
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3723
+ "operationId": "post_admin_apiKeys",
3724
+ "security": [
3725
+ {
3726
+ "bearerAuth": []
3727
+ }
3728
+ ],
3729
+ "parameters": [],
3730
+ "responses": {
3731
+ "201": {
3732
+ "description": "Success",
3733
+ "content": {
3734
+ "application/json": {
3735
+ "schema": {
3736
+ "$ref": "#/components/schemas/Success"
3737
+ }
3738
+ }
3739
+ }
3740
+ },
3741
+ "400": {
3742
+ "$ref": "#/components/responses/Error"
3743
+ },
3744
+ "401": {
3745
+ "$ref": "#/components/responses/Error"
3746
+ },
3747
+ "403": {
3748
+ "$ref": "#/components/responses/Error"
3749
+ },
3750
+ "429": {
3751
+ "$ref": "#/components/responses/Error"
3752
+ }
3753
+ },
3754
+ "requestBody": {
3755
+ "required": true,
3756
+ "content": {
3757
+ "application/json": {
3758
+ "schema": {
3759
+ "type": "object"
3760
+ },
3761
+ "example": {
3762
+ "name": "Postman test key",
3763
+ "scopes": [
3764
+ "rides:read"
3765
+ ]
3766
+ }
3767
+ }
3768
+ }
3769
+ }
3770
+ },
3771
+ "get": {
3772
+ "tags": [
3773
+ "8. Admin"
3774
+ ],
3775
+ "summary": "List API keys",
3776
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3777
+ "operationId": "get_admin_apiKeys",
3778
+ "security": [
3779
+ {
3780
+ "bearerAuth": []
3781
+ }
3782
+ ],
3783
+ "parameters": [],
3784
+ "responses": {
3785
+ "200": {
3786
+ "description": "Success",
3787
+ "content": {
3788
+ "application/json": {
3789
+ "schema": {
3790
+ "$ref": "#/components/schemas/Success"
3791
+ }
3792
+ }
3793
+ }
3794
+ },
3795
+ "400": {
3796
+ "$ref": "#/components/responses/Error"
3797
+ },
3798
+ "401": {
3799
+ "$ref": "#/components/responses/Error"
3800
+ },
3801
+ "403": {
3802
+ "$ref": "#/components/responses/Error"
3803
+ },
3804
+ "429": {
3805
+ "$ref": "#/components/responses/Error"
3806
+ }
3807
+ }
3808
+ }
3809
+ },
3810
+ "/auth/admin/api-keys/{apiKeyId}": {
3811
+ "delete": {
3812
+ "tags": [
3813
+ "8. Admin"
3814
+ ],
3815
+ "summary": "Revoke API key",
3816
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3817
+ "operationId": "delete_admin_apiKey",
3818
+ "security": [
3819
+ {
3820
+ "bearerAuth": []
3821
+ }
3822
+ ],
3823
+ "parameters": [
3824
+ {
3825
+ "name": "apiKeyId",
3826
+ "in": "path",
3827
+ "required": true,
3828
+ "schema": {
3829
+ "type": "string"
3830
+ }
3831
+ }
3832
+ ],
3833
+ "responses": {
3834
+ "200": {
3835
+ "description": "Success",
3836
+ "content": {
3837
+ "application/json": {
3838
+ "schema": {
3839
+ "$ref": "#/components/schemas/Success"
3840
+ }
3841
+ }
3842
+ }
3843
+ },
3844
+ "400": {
3845
+ "$ref": "#/components/responses/Error"
3846
+ },
3847
+ "401": {
3848
+ "$ref": "#/components/responses/Error"
3849
+ },
3850
+ "403": {
3851
+ "$ref": "#/components/responses/Error"
3852
+ },
3853
+ "429": {
3854
+ "$ref": "#/components/responses/Error"
3855
+ }
3856
+ }
3857
+ }
3858
+ },
3859
+ "/auth/admin/webhooks": {
3860
+ "post": {
3861
+ "tags": [
3862
+ "8. Admin"
3863
+ ],
3864
+ "summary": "Create webhook (to the playground receiver)",
3865
+ "description": "Deliveries appear on the dev dashboard with their signature check result.\n\nRequires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3866
+ "operationId": "post_admin_webhooks",
3867
+ "security": [
3868
+ {
3869
+ "bearerAuth": []
3870
+ }
3871
+ ],
3872
+ "parameters": [],
3873
+ "responses": {
3874
+ "201": {
3875
+ "description": "Success",
3876
+ "content": {
3877
+ "application/json": {
3878
+ "schema": {
3879
+ "$ref": "#/components/schemas/Success"
3880
+ }
3881
+ }
3882
+ }
3883
+ },
3884
+ "400": {
3885
+ "$ref": "#/components/responses/Error"
3886
+ },
3887
+ "401": {
3888
+ "$ref": "#/components/responses/Error"
3889
+ },
3890
+ "403": {
3891
+ "$ref": "#/components/responses/Error"
3892
+ },
3893
+ "429": {
3894
+ "$ref": "#/components/responses/Error"
3895
+ }
3896
+ },
3897
+ "requestBody": {
3898
+ "required": true,
3899
+ "content": {
3900
+ "application/json": {
3901
+ "schema": {
3902
+ "type": "object"
3903
+ },
3904
+ "example": {
3905
+ "url": "http://localhost:3000/dev/webhook-receiver",
3906
+ "eventNames": [],
3907
+ "description": "Playground receiver"
3908
+ }
3909
+ }
3910
+ }
3911
+ }
3912
+ },
3913
+ "get": {
3914
+ "tags": [
3915
+ "8. Admin"
3916
+ ],
3917
+ "summary": "List webhooks",
3918
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3919
+ "operationId": "get_admin_webhooks",
3920
+ "security": [
3921
+ {
3922
+ "bearerAuth": []
3923
+ }
3924
+ ],
3925
+ "parameters": [],
3926
+ "responses": {
3927
+ "200": {
3928
+ "description": "Success",
3929
+ "content": {
3930
+ "application/json": {
3931
+ "schema": {
3932
+ "$ref": "#/components/schemas/Success"
3933
+ }
3934
+ }
3935
+ }
3936
+ },
3937
+ "400": {
3938
+ "$ref": "#/components/responses/Error"
3939
+ },
3940
+ "401": {
3941
+ "$ref": "#/components/responses/Error"
3942
+ },
3943
+ "403": {
3944
+ "$ref": "#/components/responses/Error"
3945
+ },
3946
+ "429": {
3947
+ "$ref": "#/components/responses/Error"
3948
+ }
3949
+ }
3950
+ }
3951
+ },
3952
+ "/auth/admin/webhooks/{webhookId}": {
3953
+ "patch": {
3954
+ "tags": [
3955
+ "8. Admin"
3956
+ ],
3957
+ "summary": "Update webhook",
3958
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
3959
+ "operationId": "patch_admin_webhook",
3960
+ "security": [
3961
+ {
3962
+ "bearerAuth": []
3963
+ }
3964
+ ],
3965
+ "parameters": [
3966
+ {
3967
+ "name": "webhookId",
3968
+ "in": "path",
3969
+ "required": true,
3970
+ "schema": {
3971
+ "type": "string"
3972
+ }
3973
+ }
3974
+ ],
3975
+ "responses": {
3976
+ "200": {
3977
+ "description": "Success",
3978
+ "content": {
3979
+ "application/json": {
3980
+ "schema": {
3981
+ "$ref": "#/components/schemas/Success"
3982
+ }
3983
+ }
3984
+ }
3985
+ },
3986
+ "400": {
3987
+ "$ref": "#/components/responses/Error"
3988
+ },
3989
+ "401": {
3990
+ "$ref": "#/components/responses/Error"
3991
+ },
3992
+ "403": {
3993
+ "$ref": "#/components/responses/Error"
3994
+ },
3995
+ "429": {
3996
+ "$ref": "#/components/responses/Error"
3997
+ }
3998
+ },
3999
+ "requestBody": {
4000
+ "required": true,
4001
+ "content": {
4002
+ "application/json": {
4003
+ "schema": {
4004
+ "type": "object"
4005
+ },
4006
+ "example": {
4007
+ "eventNames": [
4008
+ "user.signed_in",
4009
+ "user.created"
4010
+ ]
4011
+ }
4012
+ }
4013
+ }
4014
+ }
4015
+ },
4016
+ "delete": {
4017
+ "tags": [
4018
+ "8. Admin"
4019
+ ],
4020
+ "summary": "Delete webhook",
4021
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
4022
+ "operationId": "delete_admin_webhook",
4023
+ "security": [
4024
+ {
4025
+ "bearerAuth": []
4026
+ }
4027
+ ],
4028
+ "parameters": [
4029
+ {
4030
+ "name": "webhookId",
4031
+ "in": "path",
4032
+ "required": true,
4033
+ "schema": {
4034
+ "type": "string"
4035
+ }
4036
+ }
4037
+ ],
4038
+ "responses": {
4039
+ "200": {
4040
+ "description": "Success",
4041
+ "content": {
4042
+ "application/json": {
4043
+ "schema": {
4044
+ "$ref": "#/components/schemas/Success"
4045
+ }
4046
+ }
4047
+ }
4048
+ },
4049
+ "400": {
4050
+ "$ref": "#/components/responses/Error"
4051
+ },
4052
+ "401": {
4053
+ "$ref": "#/components/responses/Error"
4054
+ },
4055
+ "403": {
4056
+ "$ref": "#/components/responses/Error"
4057
+ },
4058
+ "429": {
4059
+ "$ref": "#/components/responses/Error"
4060
+ }
4061
+ }
4062
+ }
4063
+ },
4064
+ "/auth/admin/webhooks/{webhookId}/test": {
4065
+ "post": {
4066
+ "tags": [
4067
+ "8. Admin"
4068
+ ],
4069
+ "summary": "Send test delivery",
4070
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
4071
+ "operationId": "post_admin_webhookTest",
4072
+ "security": [
4073
+ {
4074
+ "bearerAuth": []
4075
+ }
4076
+ ],
4077
+ "parameters": [
4078
+ {
4079
+ "name": "webhookId",
4080
+ "in": "path",
4081
+ "required": true,
4082
+ "schema": {
4083
+ "type": "string"
4084
+ }
4085
+ }
4086
+ ],
4087
+ "responses": {
4088
+ "200": {
4089
+ "description": "Success",
4090
+ "content": {
4091
+ "application/json": {
4092
+ "schema": {
4093
+ "$ref": "#/components/schemas/Success"
4094
+ }
4095
+ }
4096
+ }
4097
+ },
4098
+ "400": {
4099
+ "$ref": "#/components/responses/Error"
4100
+ },
4101
+ "401": {
4102
+ "$ref": "#/components/responses/Error"
4103
+ },
4104
+ "403": {
4105
+ "$ref": "#/components/responses/Error"
4106
+ },
4107
+ "429": {
4108
+ "$ref": "#/components/responses/Error"
4109
+ }
4110
+ }
4111
+ }
4112
+ },
4113
+ "/auth/admin/webhooks/{webhookId}/deliveries": {
4114
+ "get": {
4115
+ "tags": [
4116
+ "8. Admin"
4117
+ ],
4118
+ "summary": "Webhook deliveries",
4119
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
4120
+ "operationId": "get_admin_webhookDeliveries",
4121
+ "security": [
4122
+ {
4123
+ "bearerAuth": []
4124
+ }
4125
+ ],
4126
+ "parameters": [
4127
+ {
4128
+ "name": "webhookId",
4129
+ "in": "path",
4130
+ "required": true,
4131
+ "schema": {
4132
+ "type": "string"
4133
+ }
4134
+ }
4135
+ ],
4136
+ "responses": {
4137
+ "200": {
4138
+ "description": "Success",
4139
+ "content": {
4140
+ "application/json": {
4141
+ "schema": {
4142
+ "$ref": "#/components/schemas/Success"
4143
+ }
4144
+ }
4145
+ }
4146
+ },
4147
+ "400": {
4148
+ "$ref": "#/components/responses/Error"
4149
+ },
4150
+ "401": {
4151
+ "$ref": "#/components/responses/Error"
4152
+ },
4153
+ "403": {
4154
+ "$ref": "#/components/responses/Error"
4155
+ },
4156
+ "429": {
4157
+ "$ref": "#/components/responses/Error"
4158
+ }
4159
+ }
4160
+ }
4161
+ },
4162
+ "/auth/admin/webhooks/{webhookId}/deliveries/{deliveryId}/retry": {
4163
+ "post": {
4164
+ "tags": [
4165
+ "8. Admin"
4166
+ ],
4167
+ "summary": "Retry delivery",
4168
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
4169
+ "operationId": "post_admin_webhookRetryDelivery",
4170
+ "security": [
4171
+ {
4172
+ "bearerAuth": []
4173
+ }
4174
+ ],
4175
+ "parameters": [
4176
+ {
4177
+ "name": "webhookId",
4178
+ "in": "path",
4179
+ "required": true,
4180
+ "schema": {
4181
+ "type": "string"
4182
+ }
4183
+ },
4184
+ {
4185
+ "name": "deliveryId",
4186
+ "in": "path",
4187
+ "required": true,
4188
+ "schema": {
4189
+ "type": "string"
4190
+ }
4191
+ }
4192
+ ],
4193
+ "responses": {
4194
+ "200": {
4195
+ "description": "Success",
4196
+ "content": {
4197
+ "application/json": {
4198
+ "schema": {
4199
+ "$ref": "#/components/schemas/Success"
4200
+ }
4201
+ }
4202
+ }
4203
+ },
4204
+ "400": {
4205
+ "$ref": "#/components/responses/Error"
4206
+ },
4207
+ "401": {
4208
+ "$ref": "#/components/responses/Error"
4209
+ },
4210
+ "403": {
4211
+ "$ref": "#/components/responses/Error"
4212
+ },
4213
+ "429": {
4214
+ "$ref": "#/components/responses/Error"
4215
+ }
4216
+ }
4217
+ }
4218
+ },
4219
+ "/auth/admin/webhooks/{webhookId}/rotate-secret": {
4220
+ "post": {
4221
+ "tags": [
4222
+ "8. Admin"
4223
+ ],
4224
+ "summary": "Rotate webhook secret",
4225
+ "description": "Requires an admin (a role listed in settings.admin.adminRoles).\n\nFull request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
4226
+ "operationId": "post_admin_webhookRotateSecret",
4227
+ "security": [
4228
+ {
4229
+ "bearerAuth": []
4230
+ }
4231
+ ],
4232
+ "parameters": [
4233
+ {
4234
+ "name": "webhookId",
4235
+ "in": "path",
4236
+ "required": true,
4237
+ "schema": {
4238
+ "type": "string"
4239
+ }
4240
+ }
4241
+ ],
4242
+ "responses": {
4243
+ "200": {
4244
+ "description": "Success",
4245
+ "content": {
4246
+ "application/json": {
4247
+ "schema": {
4248
+ "$ref": "#/components/schemas/Success"
4249
+ }
4250
+ }
4251
+ }
4252
+ },
4253
+ "400": {
4254
+ "$ref": "#/components/responses/Error"
4255
+ },
4256
+ "401": {
4257
+ "$ref": "#/components/responses/Error"
4258
+ },
4259
+ "403": {
4260
+ "$ref": "#/components/responses/Error"
4261
+ },
4262
+ "429": {
4263
+ "$ref": "#/components/responses/Error"
4264
+ }
4265
+ }
4266
+ }
4267
+ },
4268
+ "/.well-known/jwks.json": {
4269
+ "get": {
4270
+ "tags": [
4271
+ "9. Public keys"
4272
+ ],
4273
+ "summary": "JWKS (public signing keys)",
4274
+ "description": "Full request/response details: https://github.com/TechElusive/techelusive-authentication/tree/main/docs/endpoints",
4275
+ "operationId": "get_wellKnown_jwks",
4276
+ "security": [],
4277
+ "parameters": [],
4278
+ "responses": {
4279
+ "200": {
4280
+ "description": "Success",
4281
+ "content": {
4282
+ "application/json": {
4283
+ "schema": {
4284
+ "$ref": "#/components/schemas/Success"
4285
+ }
4286
+ }
4287
+ }
4288
+ },
4289
+ "400": {
4290
+ "$ref": "#/components/responses/Error"
4291
+ },
4292
+ "401": {
4293
+ "$ref": "#/components/responses/Error"
4294
+ },
4295
+ "403": {
4296
+ "$ref": "#/components/responses/Error"
4297
+ },
4298
+ "429": {
4299
+ "$ref": "#/components/responses/Error"
4300
+ }
4301
+ }
4302
+ }
4303
+ }
4304
+ },
4305
+ "components": {
4306
+ "securitySchemes": {
4307
+ "bearerAuth": {
4308
+ "type": "http",
4309
+ "scheme": "bearer",
4310
+ "bearerFormat": "JWT"
4311
+ }
4312
+ },
4313
+ "schemas": {
4314
+ "Success": {
4315
+ "type": "object",
4316
+ "properties": {
4317
+ "success": {
4318
+ "type": "boolean",
4319
+ "example": true
4320
+ }
4321
+ },
4322
+ "additionalProperties": true
4323
+ },
4324
+ "Error": {
4325
+ "type": "object",
4326
+ "properties": {
4327
+ "success": {
4328
+ "type": "boolean",
4329
+ "example": false
4330
+ },
4331
+ "code": {
4332
+ "type": "string",
4333
+ "enum": [
4334
+ "VALIDATION_ERROR",
4335
+ "INVALID_EMAIL",
4336
+ "INVALID_PHONE",
4337
+ "INVALID_PASSWORD",
4338
+ "TERMS_NOT_ACCEPTED",
4339
+ "PRIVACY_POLICY_NOT_ACCEPTED",
4340
+ "EMAIL_DOMAIN_NOT_ALLOWED",
4341
+ "PHONE_COUNTRY_NOT_ALLOWED",
4342
+ "INVALID_CREDENTIALS",
4343
+ "INVALID_OTP",
4344
+ "OTP_EXPIRED",
4345
+ "INVALID_TOKEN",
4346
+ "UNAUTHORIZED",
4347
+ "INVALID_API_KEY",
4348
+ "INVALID_SOCIAL_TOKEN",
4349
+ "INVALID_PASSKEY",
4350
+ "ACCOUNT_NOT_VERIFIED",
4351
+ "ACCOUNT_SUSPENDED",
4352
+ "ACCOUNT_DEACTIVATED",
4353
+ "FORBIDDEN",
4354
+ "SIGN_UP_CLOSED",
4355
+ "SIGN_IN_METHOD_DISABLED",
4356
+ "FEATURE_DISABLED",
4357
+ "NOT_FOUND",
4358
+ "ACCOUNT_ALREADY_EXISTS",
4359
+ "ACCOUNT_EXISTS_WITH_OTHER_METHOD",
4360
+ "SOCIAL_ACCOUNT_IN_USE",
4361
+ "LAST_SIGN_IN_METHOD",
4362
+ "TWO_FACTOR_ALREADY_ENABLED",
4363
+ "TWO_FACTOR_NOT_ENABLED",
4364
+ "TWO_FACTOR_SETUP_NOT_STARTED",
4365
+ "ORGANIZATION_SLUG_TAKEN",
4366
+ "ALREADY_MEMBER",
4367
+ "LAST_OWNER",
4368
+ "ACCOUNT_NOT_DEACTIVATED",
4369
+ "EMAIL_IN_USE",
4370
+ "EMAIL_UNCHANGED",
4371
+ "RECENT_SIGN_IN_REQUIRED",
4372
+ "TOO_MANY_REQUESTS",
4373
+ "INVALID_SETTINGS",
4374
+ "UNSAFE_WEBHOOK_URL",
4375
+ "NOT_CONFIGURED",
4376
+ "INTERNAL_SERVER_ERROR"
4377
+ ]
4378
+ },
4379
+ "message": {
4380
+ "type": "string"
4381
+ }
4382
+ },
4383
+ "additionalProperties": true
4384
+ }
4385
+ },
4386
+ "responses": {
4387
+ "Error": {
4388
+ "description": "Error",
4389
+ "content": {
4390
+ "application/json": {
4391
+ "schema": {
4392
+ "$ref": "#/components/schemas/Error"
4393
+ }
4394
+ }
4395
+ }
4396
+ }
4397
+ }
4398
+ }
4399
+ }