@robelest/convex-auth 0.0.3-preview → 0.0.3-preview.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/dist/bin.cjs +15 -15
  2. package/dist/client/index.d.ts +40 -12
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +73 -12
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/component/_generated/api.d.ts +2 -2
  7. package/dist/component/_generated/api.d.ts.map +1 -1
  8. package/dist/component/_generated/component.d.ts +1 -1
  9. package/dist/component/_generated/component.d.ts.map +1 -1
  10. package/dist/component/{portalBridge.d.ts → bridge.d.ts} +2 -2
  11. package/dist/component/bridge.d.ts.map +1 -0
  12. package/dist/component/{portalBridge.js → bridge.js} +2 -2
  13. package/dist/component/bridge.js.map +1 -0
  14. package/dist/component/index.d.ts +11 -4
  15. package/dist/component/index.d.ts.map +1 -1
  16. package/dist/component/index.js +8 -2
  17. package/dist/component/index.js.map +1 -1
  18. package/dist/component/public.d.ts +24 -17
  19. package/dist/component/public.d.ts.map +1 -1
  20. package/dist/component/public.js +23 -4
  21. package/dist/component/public.js.map +1 -1
  22. package/dist/component/schema.d.ts +11 -7
  23. package/dist/component/schema.d.ts.map +1 -1
  24. package/dist/component/schema.js +4 -1
  25. package/dist/component/schema.js.map +1 -1
  26. package/dist/providers/anonymous.d.ts +3 -0
  27. package/dist/providers/anonymous.d.ts.map +1 -1
  28. package/dist/providers/anonymous.js +3 -0
  29. package/dist/providers/anonymous.js.map +1 -1
  30. package/dist/providers/credentials.d.ts +3 -0
  31. package/dist/providers/credentials.d.ts.map +1 -1
  32. package/dist/providers/credentials.js +3 -0
  33. package/dist/providers/credentials.js.map +1 -1
  34. package/dist/providers/email.d.ts +3 -0
  35. package/dist/providers/email.d.ts.map +1 -1
  36. package/dist/providers/email.js +3 -0
  37. package/dist/providers/email.js.map +1 -1
  38. package/dist/providers/passkey.d.ts +7 -1
  39. package/dist/providers/passkey.d.ts.map +1 -1
  40. package/dist/providers/passkey.js +7 -1
  41. package/dist/providers/passkey.js.map +1 -1
  42. package/dist/providers/password.d.ts +3 -0
  43. package/dist/providers/password.d.ts.map +1 -1
  44. package/dist/providers/password.js +3 -0
  45. package/dist/providers/password.js.map +1 -1
  46. package/dist/providers/phone.d.ts +3 -0
  47. package/dist/providers/phone.d.ts.map +1 -1
  48. package/dist/providers/phone.js +3 -0
  49. package/dist/providers/phone.js.map +1 -1
  50. package/dist/providers/totp.d.ts +8 -0
  51. package/dist/providers/totp.d.ts.map +1 -1
  52. package/dist/providers/totp.js +8 -0
  53. package/dist/providers/totp.js.map +1 -1
  54. package/dist/server/{convex-auth.d.ts → auth.d.ts} +226 -36
  55. package/dist/server/auth.d.ts.map +1 -0
  56. package/dist/server/{convex-auth.js → auth.js} +287 -111
  57. package/dist/server/auth.js.map +1 -0
  58. package/dist/server/errors.d.ts +148 -0
  59. package/dist/server/errors.d.ts.map +1 -0
  60. package/dist/server/errors.js +179 -0
  61. package/dist/server/errors.js.map +1 -0
  62. package/dist/server/implementation/index.d.ts +170 -48
  63. package/dist/server/implementation/index.d.ts.map +1 -1
  64. package/dist/server/implementation/index.js +383 -167
  65. package/dist/server/implementation/index.js.map +1 -1
  66. package/dist/server/implementation/{apiKey.d.ts → keys.d.ts} +1 -1
  67. package/dist/server/implementation/keys.d.ts.map +1 -0
  68. package/dist/server/implementation/{apiKey.js → keys.js} +4 -5
  69. package/dist/server/implementation/keys.js.map +1 -0
  70. package/dist/server/implementation/mutations/{modifyAccount.d.ts → account.d.ts} +3 -3
  71. package/dist/server/implementation/mutations/account.d.ts.map +1 -0
  72. package/dist/server/implementation/mutations/{modifyAccount.js → account.js} +4 -3
  73. package/dist/server/implementation/mutations/account.js.map +1 -0
  74. package/dist/server/implementation/mutations/{createVerificationCode.d.ts → code.d.ts} +1 -1
  75. package/dist/server/implementation/mutations/code.d.ts.map +1 -0
  76. package/dist/server/implementation/mutations/{createVerificationCode.js → code.js} +2 -2
  77. package/dist/server/implementation/mutations/code.js.map +1 -0
  78. package/dist/server/implementation/mutations/index.d.ts +33 -33
  79. package/dist/server/implementation/mutations/index.d.ts.map +1 -1
  80. package/dist/server/implementation/mutations/index.js +22 -22
  81. package/dist/server/implementation/mutations/index.js.map +1 -1
  82. package/dist/server/implementation/mutations/{invalidateSessions.d.ts → invalidate.d.ts} +1 -1
  83. package/dist/server/implementation/mutations/invalidate.d.ts.map +1 -0
  84. package/dist/server/implementation/mutations/{invalidateSessions.js → invalidate.js} +2 -2
  85. package/dist/server/implementation/mutations/invalidate.js.map +1 -0
  86. package/dist/server/implementation/mutations/{userOAuth.d.ts → oauth.d.ts} +3 -3
  87. package/dist/server/implementation/mutations/oauth.d.ts.map +1 -0
  88. package/dist/server/implementation/mutations/{userOAuth.js → oauth.js} +4 -3
  89. package/dist/server/implementation/mutations/oauth.js.map +1 -0
  90. package/dist/server/implementation/mutations/{refreshSession.d.ts → refresh.d.ts} +1 -1
  91. package/dist/server/implementation/mutations/refresh.d.ts.map +1 -0
  92. package/dist/server/implementation/mutations/{refreshSession.js → refresh.js} +3 -3
  93. package/dist/server/implementation/mutations/refresh.js.map +1 -0
  94. package/dist/server/implementation/mutations/{createAccountFromCredentials.d.ts → register.d.ts} +4 -4
  95. package/dist/server/implementation/mutations/register.d.ts.map +1 -0
  96. package/dist/server/implementation/mutations/{createAccountFromCredentials.js → register.js} +4 -3
  97. package/dist/server/implementation/mutations/register.js.map +1 -0
  98. package/dist/server/implementation/mutations/{retrieveAccountWithCredentials.d.ts → retrieve.d.ts} +3 -3
  99. package/dist/server/implementation/mutations/retrieve.d.ts.map +1 -0
  100. package/dist/server/implementation/mutations/{retrieveAccountWithCredentials.js → retrieve.js} +3 -3
  101. package/dist/server/implementation/mutations/retrieve.js.map +1 -0
  102. package/dist/server/implementation/mutations/{verifierSignature.d.ts → signature.d.ts} +1 -1
  103. package/dist/server/implementation/mutations/signature.d.ts.map +1 -0
  104. package/dist/server/implementation/mutations/{verifierSignature.js → signature.js} +4 -3
  105. package/dist/server/implementation/mutations/signature.js.map +1 -0
  106. package/dist/server/implementation/mutations/{signIn.d.ts → signin.d.ts} +1 -1
  107. package/dist/server/implementation/mutations/{signIn.d.ts.map → signin.d.ts.map} +1 -1
  108. package/dist/server/implementation/mutations/{signIn.js → signin.js} +2 -2
  109. package/dist/server/implementation/mutations/{signIn.js.map → signin.js.map} +1 -1
  110. package/dist/server/implementation/mutations/{signOut.d.ts → signout.d.ts} +1 -1
  111. package/dist/server/implementation/mutations/{signOut.d.ts.map → signout.d.ts.map} +1 -1
  112. package/dist/server/implementation/mutations/{signOut.js → signout.js} +2 -2
  113. package/dist/server/implementation/mutations/{signOut.js.map → signout.js.map} +1 -1
  114. package/dist/server/implementation/mutations/{storeRef.d.ts → store.d.ts} +1 -1
  115. package/dist/server/implementation/mutations/store.d.ts.map +1 -0
  116. package/dist/server/implementation/mutations/{storeRef.js → store.js} +1 -1
  117. package/dist/server/implementation/mutations/store.js.map +1 -0
  118. package/dist/server/implementation/mutations/verifier.js +1 -1
  119. package/dist/server/implementation/mutations/verifier.js.map +1 -1
  120. package/dist/server/implementation/mutations/{verifyCodeAndSignIn.d.ts → verify.d.ts} +1 -1
  121. package/dist/server/implementation/mutations/verify.d.ts.map +1 -0
  122. package/dist/server/implementation/mutations/{verifyCodeAndSignIn.js → verify.js} +3 -3
  123. package/dist/server/implementation/mutations/verify.js.map +1 -0
  124. package/dist/server/implementation/passkey.d.ts.map +1 -1
  125. package/dist/server/implementation/passkey.js +47 -55
  126. package/dist/server/implementation/passkey.js.map +1 -1
  127. package/dist/server/implementation/provider.d.ts.map +1 -1
  128. package/dist/server/implementation/provider.js +5 -4
  129. package/dist/server/implementation/provider.js.map +1 -1
  130. package/dist/server/implementation/{rateLimit.d.ts → ratelimit.d.ts} +1 -1
  131. package/dist/server/implementation/{rateLimit.d.ts.map → ratelimit.d.ts.map} +1 -1
  132. package/dist/server/implementation/{rateLimit.js → ratelimit.js} +1 -1
  133. package/dist/server/implementation/{rateLimit.js.map → ratelimit.js.map} +1 -1
  134. package/dist/server/implementation/redirects.d.ts.map +1 -1
  135. package/dist/server/implementation/redirects.js +2 -1
  136. package/dist/server/implementation/redirects.js.map +1 -1
  137. package/dist/server/implementation/{refreshTokens.d.ts → refresh.d.ts} +1 -1
  138. package/dist/server/implementation/refresh.d.ts.map +1 -0
  139. package/dist/server/implementation/{refreshTokens.js → refresh.js} +3 -2
  140. package/dist/server/implementation/refresh.js.map +1 -0
  141. package/dist/server/implementation/sessions.js +1 -1
  142. package/dist/server/implementation/sessions.js.map +1 -1
  143. package/dist/server/implementation/{signIn.d.ts → signin.d.ts} +1 -1
  144. package/dist/server/implementation/{signIn.d.ts.map → signin.d.ts.map} +1 -1
  145. package/dist/server/implementation/{signIn.js → signin.js} +12 -8
  146. package/dist/server/implementation/signin.js.map +1 -0
  147. package/dist/server/implementation/totp.d.ts.map +1 -1
  148. package/dist/server/implementation/totp.js +29 -29
  149. package/dist/server/implementation/totp.js.map +1 -1
  150. package/dist/server/implementation/types.d.ts +131 -1
  151. package/dist/server/implementation/types.d.ts.map +1 -1
  152. package/dist/server/implementation/types.js +65 -1
  153. package/dist/server/implementation/types.js.map +1 -1
  154. package/dist/server/implementation/users.d.ts.map +1 -1
  155. package/dist/server/implementation/users.js +3 -2
  156. package/dist/server/implementation/users.js.map +1 -1
  157. package/dist/server/index.d.ts +131 -1
  158. package/dist/server/index.d.ts.map +1 -1
  159. package/dist/server/index.js +117 -1
  160. package/dist/server/index.js.map +1 -1
  161. package/dist/server/oauth/{authorizationUrl.d.ts → authorization.d.ts} +1 -1
  162. package/dist/server/oauth/authorization.d.ts.map +1 -0
  163. package/dist/server/oauth/{authorizationUrl.js → authorization.js} +4 -3
  164. package/dist/server/oauth/authorization.js.map +1 -0
  165. package/dist/server/oauth/callback.d.ts.map +1 -1
  166. package/dist/server/oauth/callback.js +7 -6
  167. package/dist/server/oauth/callback.js.map +1 -1
  168. package/dist/server/oauth/checks.d.ts.map +1 -1
  169. package/dist/server/oauth/checks.js +2 -1
  170. package/dist/server/oauth/checks.js.map +1 -1
  171. package/dist/server/oauth/{convexAuth.d.ts → helpers.d.ts} +1 -1
  172. package/dist/server/oauth/helpers.d.ts.map +1 -0
  173. package/dist/server/oauth/{convexAuth.js → helpers.js} +6 -5
  174. package/dist/server/oauth/helpers.js.map +1 -0
  175. package/dist/server/oauth/lib/utils/{customFetch.d.ts → fetch.d.ts} +1 -1
  176. package/dist/server/oauth/lib/utils/fetch.d.ts.map +1 -0
  177. package/dist/server/oauth/lib/utils/{customFetch.js → fetch.js} +1 -1
  178. package/dist/server/oauth/lib/utils/fetch.js.map +1 -0
  179. package/dist/server/{provider_utils.d.ts → providers.d.ts} +1 -1
  180. package/dist/server/providers.d.ts.map +1 -0
  181. package/dist/server/{provider_utils.js → providers.js} +1 -1
  182. package/dist/server/providers.js.map +1 -0
  183. package/dist/server/{email-templates.d.ts → templates.d.ts} +8 -1
  184. package/dist/server/templates.d.ts.map +1 -0
  185. package/dist/server/{portal-email.js → templates.js} +74 -3
  186. package/dist/server/templates.js.map +1 -0
  187. package/dist/server/types.d.ts +88 -5
  188. package/dist/server/types.d.ts.map +1 -1
  189. package/dist/server/utils.d.ts.map +1 -1
  190. package/dist/server/utils.js +2 -1
  191. package/dist/server/utils.js.map +1 -1
  192. package/dist/server/version.d.ts +1 -1
  193. package/dist/server/version.d.ts.map +1 -1
  194. package/dist/server/version.js +1 -1
  195. package/dist/server/version.js.map +1 -1
  196. package/package.json +5 -1
  197. package/src/cli/index.ts +5 -5
  198. package/src/cli/{portal-link.ts → link.ts} +1 -1
  199. package/src/cli/utils.ts +1 -1
  200. package/src/client/index.ts +102 -17
  201. package/src/component/_generated/api.ts +2 -2
  202. package/src/component/_generated/component.ts +1 -1
  203. package/src/component/{portalBridge.ts → bridge.ts} +2 -2
  204. package/src/component/index.ts +10 -2
  205. package/src/component/public.ts +25 -4
  206. package/src/component/schema.ts +4 -1
  207. package/src/providers/anonymous.ts +3 -0
  208. package/src/providers/credentials.ts +3 -0
  209. package/src/providers/email.ts +3 -0
  210. package/src/providers/passkey.ts +8 -1
  211. package/src/providers/password.ts +3 -0
  212. package/src/providers/phone.ts +3 -0
  213. package/src/providers/totp.ts +9 -0
  214. package/src/server/auth.ts +969 -0
  215. package/src/server/errors.ts +275 -0
  216. package/src/server/implementation/index.ts +370 -88
  217. package/src/server/implementation/{apiKey.ts → keys.ts} +7 -6
  218. package/src/server/implementation/mutations/{modifyAccount.ts → account.ts} +3 -4
  219. package/src/server/implementation/mutations/{createVerificationCode.ts → code.ts} +1 -1
  220. package/src/server/implementation/mutations/index.ts +22 -22
  221. package/src/server/implementation/mutations/{invalidateSessions.ts → invalidate.ts} +1 -1
  222. package/src/server/implementation/mutations/{userOAuth.ts → oauth.ts} +3 -2
  223. package/src/server/implementation/mutations/{refreshSession.ts → refresh.ts} +2 -2
  224. package/src/server/implementation/mutations/{createAccountFromCredentials.ts → register.ts} +3 -2
  225. package/src/server/implementation/mutations/{retrieveAccountWithCredentials.ts → retrieve.ts} +2 -2
  226. package/src/server/implementation/mutations/{verifierSignature.ts → signature.ts} +3 -2
  227. package/src/server/implementation/mutations/{signIn.ts → signin.ts} +1 -1
  228. package/src/server/implementation/mutations/{signOut.ts → signout.ts} +1 -1
  229. package/src/server/implementation/mutations/verifier.ts +1 -1
  230. package/src/server/implementation/mutations/{verifyCodeAndSignIn.ts → verify.ts} +2 -2
  231. package/src/server/implementation/passkey.ts +86 -116
  232. package/src/server/implementation/provider.ts +5 -8
  233. package/src/server/implementation/redirects.ts +2 -3
  234. package/src/server/implementation/{refreshTokens.ts → refresh.ts} +2 -1
  235. package/src/server/implementation/sessions.ts +1 -1
  236. package/src/server/implementation/{signIn.ts → signin.ts} +13 -11
  237. package/src/server/implementation/totp.ts +60 -84
  238. package/src/server/implementation/types.ts +316 -1
  239. package/src/server/implementation/users.ts +4 -7
  240. package/src/server/index.ts +142 -3
  241. package/src/server/oauth/{authorizationUrl.ts → authorization.ts} +3 -2
  242. package/src/server/oauth/callback.ts +7 -6
  243. package/src/server/oauth/checks.ts +3 -1
  244. package/src/server/oauth/{convexAuth.ts → helpers.ts} +8 -5
  245. package/src/server/{portal-email.ts → templates.ts} +78 -2
  246. package/src/server/types.ts +133 -4
  247. package/src/server/utils.ts +3 -1
  248. package/src/server/version.ts +1 -1
  249. package/dist/component/portalBridge.d.ts.map +0 -1
  250. package/dist/component/portalBridge.js.map +0 -1
  251. package/dist/server/convex-auth.d.ts.map +0 -1
  252. package/dist/server/convex-auth.js.map +0 -1
  253. package/dist/server/convex_types.d.ts +0 -17
  254. package/dist/server/convex_types.d.ts.map +0 -1
  255. package/dist/server/convex_types.js +0 -2
  256. package/dist/server/convex_types.js.map +0 -1
  257. package/dist/server/email-templates.d.ts.map +0 -1
  258. package/dist/server/email-templates.js +0 -74
  259. package/dist/server/email-templates.js.map +0 -1
  260. package/dist/server/implementation/apiKey.d.ts.map +0 -1
  261. package/dist/server/implementation/apiKey.js.map +0 -1
  262. package/dist/server/implementation/mutations/createAccountFromCredentials.d.ts.map +0 -1
  263. package/dist/server/implementation/mutations/createAccountFromCredentials.js.map +0 -1
  264. package/dist/server/implementation/mutations/createVerificationCode.d.ts.map +0 -1
  265. package/dist/server/implementation/mutations/createVerificationCode.js.map +0 -1
  266. package/dist/server/implementation/mutations/invalidateSessions.d.ts.map +0 -1
  267. package/dist/server/implementation/mutations/invalidateSessions.js.map +0 -1
  268. package/dist/server/implementation/mutations/modifyAccount.d.ts.map +0 -1
  269. package/dist/server/implementation/mutations/modifyAccount.js.map +0 -1
  270. package/dist/server/implementation/mutations/refreshSession.d.ts.map +0 -1
  271. package/dist/server/implementation/mutations/refreshSession.js.map +0 -1
  272. package/dist/server/implementation/mutations/retrieveAccountWithCredentials.d.ts.map +0 -1
  273. package/dist/server/implementation/mutations/retrieveAccountWithCredentials.js.map +0 -1
  274. package/dist/server/implementation/mutations/storeRef.d.ts.map +0 -1
  275. package/dist/server/implementation/mutations/storeRef.js.map +0 -1
  276. package/dist/server/implementation/mutations/userOAuth.d.ts.map +0 -1
  277. package/dist/server/implementation/mutations/userOAuth.js.map +0 -1
  278. package/dist/server/implementation/mutations/verifierSignature.d.ts.map +0 -1
  279. package/dist/server/implementation/mutations/verifierSignature.js.map +0 -1
  280. package/dist/server/implementation/mutations/verifyCodeAndSignIn.d.ts.map +0 -1
  281. package/dist/server/implementation/mutations/verifyCodeAndSignIn.js.map +0 -1
  282. package/dist/server/implementation/refreshTokens.d.ts.map +0 -1
  283. package/dist/server/implementation/refreshTokens.js.map +0 -1
  284. package/dist/server/implementation/signIn.js.map +0 -1
  285. package/dist/server/oauth/authorizationUrl.d.ts.map +0 -1
  286. package/dist/server/oauth/authorizationUrl.js.map +0 -1
  287. package/dist/server/oauth/convexAuth.d.ts.map +0 -1
  288. package/dist/server/oauth/convexAuth.js.map +0 -1
  289. package/dist/server/oauth/lib/utils/customFetch.d.ts.map +0 -1
  290. package/dist/server/oauth/lib/utils/customFetch.js.map +0 -1
  291. package/dist/server/portal-email.d.ts +0 -19
  292. package/dist/server/portal-email.d.ts.map +0 -1
  293. package/dist/server/portal-email.js.map +0 -1
  294. package/dist/server/provider_utils.d.ts.map +0 -1
  295. package/dist/server/provider_utils.js.map +0 -1
  296. package/src/server/convex-auth.ts +0 -602
  297. package/src/server/convex_types.ts +0 -55
  298. package/src/server/email-templates.ts +0 -77
  299. /package/src/cli/{generateKeys.ts → keys.ts} +0 -0
  300. /package/src/cli/{portal-upload.ts → upload.ts} +0 -0
  301. /package/src/server/implementation/mutations/{storeRef.ts → store.ts} +0 -0
  302. /package/src/server/implementation/{rateLimit.ts → ratelimit.ts} +0 -0
  303. /package/src/server/oauth/lib/utils/{customFetch.ts → fetch.ts} +0 -0
  304. /package/src/server/{provider_utils.ts → providers.ts} +0 -0
@@ -1,8 +1,8 @@
1
1
  import { Auth, GenericActionCtx, GenericDataModel, HttpRouter } from "convex/server";
2
2
  import { GenericId } from "convex/values";
3
- import { FunctionReferenceFromExport } from "../convex_types.js";
4
- import { AuthProviderConfig, ConvexAuthConfig } from "../types.js";
5
- import { Tokens } from "./types.js";
3
+ import { FunctionReferenceFromExport } from "../types.js";
4
+ import { AuthProviderConfig, ConvexAuthConfig, CorsConfig, HttpKeyContext } from "../types.js";
5
+ import { Tokens, KeyDoc } from "./types.js";
6
6
  export { Doc, Tokens } from "./types.js";
7
7
  /**
8
8
  * The type of the signIn Convex Action returned from the auth() helper.
@@ -45,6 +45,9 @@ export declare function Auth(config_: ConvexAuthConfig): {
45
45
  /**
46
46
  * Get the current user's ID from the auth context, or `null` if
47
47
  * not signed in.
48
+ *
49
+ * @param ctx - Any Convex context with an `auth` field (query, mutation, or action).
50
+ * @returns The user's `Id<"user">`, or `null` when unauthenticated.
48
51
  */
49
52
  current: (ctx: {
50
53
  auth: Auth;
@@ -52,21 +55,40 @@ export declare function Auth(config_: ConvexAuthConfig): {
52
55
  /**
53
56
  * Get the current user's ID, or throw if not signed in.
54
57
  * Use this when authentication is required.
58
+ *
59
+ * @param ctx - Any Convex context with an `auth` field.
60
+ * @returns The user's `Id<"user">`.
61
+ * @throws `ConvexError` with code `NOT_SIGNED_IN` when unauthenticated.
55
62
  */
56
63
  require: (ctx: {
57
64
  auth: Auth;
58
65
  }) => Promise<GenericId<"user">>;
59
66
  /**
60
67
  * Retrieve a user document by their ID.
68
+ *
69
+ * @param ctx - Convex context with `runQuery`.
70
+ * @param userId - The user document ID.
71
+ * @returns The user document, or `null` if not found.
61
72
  */
62
73
  get: (ctx: Pick<GenericActionCtx<GenericDataModel>, "runQuery">, userId: string) => Promise<any>;
63
74
  /**
64
75
  * Get the currently signed-in user's document, or `null` if not
65
- * signed in. Convenience method combining `current` + `get`.
76
+ * signed in. Convenience combining `current()` + `get()`.
77
+ *
78
+ * @param ctx - Convex context with `auth` and `runQuery`.
79
+ * @returns The user document, or `null` when unauthenticated.
66
80
  */
67
81
  viewer: (ctx: Pick<GenericActionCtx<GenericDataModel>, "runQuery"> & {
68
82
  auth: Auth;
69
83
  }) => Promise<any>;
84
+ /**
85
+ * Update a user document with partial data.
86
+ *
87
+ * @param ctx - Convex context with `runMutation`.
88
+ * @param userId - The user document ID.
89
+ * @param data - Partial data to merge into the user document.
90
+ */
91
+ patch: (ctx: Pick<GenericActionCtx<GenericDataModel>, "runQuery" | "runMutation">, userId: string, data: Record<string, unknown>) => Promise<void>;
70
92
  /**
71
93
  * Query a user's group memberships.
72
94
  */
@@ -93,12 +115,19 @@ export declare function Auth(config_: ConvexAuthConfig): {
93
115
  /**
94
116
  * Get the current session ID from the auth context, or `null` if
95
117
  * not signed in.
118
+ *
119
+ * @param ctx - Any Convex context with an `auth` field.
120
+ * @returns The session's `Id<"session">`, or `null` when unauthenticated.
96
121
  */
97
122
  current: (ctx: {
98
123
  auth: Auth;
99
124
  }) => Promise<GenericId<"session"> | null>;
100
125
  /**
101
126
  * Invalidate sessions for a user, optionally preserving specific sessions.
127
+ *
128
+ * @param ctx - Convex action context.
129
+ * @param args.userId - The user whose sessions to invalidate.
130
+ * @param args.except - Session IDs to preserve (e.g. the current session).
102
131
  */
103
132
  invalidate: <DataModel extends GenericDataModel>(ctx: GenericActionCtx<DataModel>, args: {
104
133
  userId: GenericId<"user">;
@@ -108,6 +137,10 @@ export declare function Auth(config_: ConvexAuthConfig): {
108
137
  account: {
109
138
  /**
110
139
  * Create an account and user for a credentials provider.
140
+ *
141
+ * @param ctx - Convex action context.
142
+ * @param args - Provider ID, account credentials, profile data, and link flags.
143
+ * @returns `{ account, user }` — the created account and user documents.
111
144
  */
112
145
  create: <DataModel extends GenericDataModel>(ctx: GenericActionCtx<DataModel>, args: {
113
146
  provider: string;
@@ -124,6 +157,11 @@ export declare function Auth(config_: ConvexAuthConfig): {
124
157
  }>;
125
158
  /**
126
159
  * Retrieve an account and user for a credentials provider.
160
+ *
161
+ * @param ctx - Convex action context.
162
+ * @param args - Provider ID and account credentials (id, optional secret).
163
+ * @returns `{ account, user }` — the matched account and user documents.
164
+ * @throws `ConvexError` with code `ACCOUNT_NOT_FOUND` when no match exists.
127
165
  */
128
166
  get: <DataModel extends GenericDataModel>(ctx: GenericActionCtx<DataModel>, args: {
129
167
  provider: string;
@@ -136,7 +174,10 @@ export declare function Auth(config_: ConvexAuthConfig): {
136
174
  user: import("./types.js").Doc<"user">;
137
175
  }>;
138
176
  /**
139
- * Update credentials for an existing account.
177
+ * Update credentials (secret) for an existing account.
178
+ *
179
+ * @param ctx - Convex action context.
180
+ * @param args - Provider ID and new account credentials (id + secret).
140
181
  */
141
182
  updateCredentials: <DataModel extends GenericDataModel>(ctx: GenericActionCtx<DataModel>, args: {
142
183
  provider: string;
@@ -149,6 +190,11 @@ export declare function Auth(config_: ConvexAuthConfig): {
149
190
  provider: {
150
191
  /**
151
192
  * Sign in via another provider, typically from a credentials flow.
193
+ *
194
+ * @param ctx - Convex action context.
195
+ * @param provider - The provider config to sign in with.
196
+ * @param args - Optional account ID and params.
197
+ * @returns `{ userId, sessionId }` on success, or `null`.
152
198
  */
153
199
  signIn: <DataModel extends GenericDataModel>(ctx: GenericActionCtx<DataModel>, provider: AuthProviderConfig, args: {
154
200
  accountId?: GenericId<"account">;
@@ -180,6 +226,7 @@ export declare function Auth(config_: ConvexAuthConfig): {
180
226
  create: (ctx: Pick<GenericActionCtx<GenericDataModel>, "runQuery" | "runMutation">, data: {
181
227
  name: string;
182
228
  slug?: string;
229
+ type?: string;
183
230
  parentGroupId?: string;
184
231
  extend?: Record<string, unknown>;
185
232
  }) => Promise<string>;
@@ -192,6 +239,7 @@ export declare function Auth(config_: ConvexAuthConfig): {
192
239
  * that group. When omitted, returns root-level groups (no parent).
193
240
  */
194
241
  list: (ctx: Pick<GenericActionCtx<GenericDataModel>, "runQuery">, opts?: {
242
+ type?: string;
195
243
  parentGroupId?: string;
196
244
  }) => Promise<any>;
197
245
  /**
@@ -310,15 +358,17 @@ export declare function Auth(config_: ConvexAuthConfig): {
310
358
  * the timestamp. If the invite has a group, the caller is responsible
311
359
  * for creating the member record via `auth.group.member.add` in the
312
360
  * same Convex mutation for transactional safety.
313
- *
314
- * @throws ConvexError with code `INVITE_NOT_FOUND` when the invite does
315
- * not exist.
316
- * @throws ConvexError with code `INVITE_NOT_PENDING` when the invite is
317
- * not in `pending` status.
318
361
  *
362
+ * @param ctx - Convex context with `runMutation`.
363
+ * @param inviteId - The invite document ID.
364
+ * @param acceptedByUserId - User accepting the invite (recorded for audit).
365
+ * @throws `ConvexError` with code `INVITE_NOT_FOUND` when the invite does not exist.
366
+ * @throws `ConvexError` with code `INVITE_NOT_PENDING` when the invite is not in `pending` status.
367
+ *
368
+ * @example
319
369
  * ```ts
320
- * export const acceptInvite = mutation({
321
- * args: { inviteId: v.string() },
370
+ * export const acceptInvite = mutation({
371
+ * args: { inviteId: v.string() },
322
372
  * handler: async (ctx, { inviteId }) => {
323
373
  * const userId = await auth.user.require(ctx);
324
374
  * const invite = await auth.invite.get(ctx, inviteId);
@@ -340,10 +390,10 @@ export declare function Auth(config_: ConvexAuthConfig): {
340
390
  /**
341
391
  * Revoke a pending invitation.
342
392
  *
343
- * @throws ConvexError with code `INVITE_NOT_FOUND` when the invite does
344
- * not exist.
345
- * @throws ConvexError with code `INVITE_NOT_PENDING` when the invite is
346
- * not in `pending` status.
393
+ * @param ctx - Convex context with `runMutation`.
394
+ * @param inviteId - The invite document ID.
395
+ * @throws `ConvexError` with code `INVITE_NOT_FOUND` when the invite does not exist.
396
+ * @throws `ConvexError` with code `INVITE_NOT_PENDING` when the invite is not in `pending` status.
347
397
  */
348
398
  revoke: (ctx: Pick<GenericActionCtx<GenericDataModel>, "runQuery" | "runMutation">, inviteId: string) => Promise<void>;
349
399
  };
@@ -468,12 +518,12 @@ export declare function Auth(config_: ConvexAuthConfig): {
468
518
  */
469
519
  list: (ctx: Pick<GenericActionCtx<GenericDataModel>, "runQuery">, opts: {
470
520
  userId: string;
471
- }) => Promise<any>;
521
+ }) => Promise<KeyDoc[]>;
472
522
  /**
473
523
  * Get a single API key by its document ID.
474
524
  * Returns `null` if not found.
475
525
  */
476
- get: (ctx: Pick<GenericActionCtx<GenericDataModel>, "runQuery">, keyId: string) => Promise<any>;
526
+ get: (ctx: Pick<GenericActionCtx<GenericDataModel>, "runQuery">, keyId: string) => Promise<KeyDoc | null>;
477
527
  /**
478
528
  * Update an API key's metadata (name, scopes, rate limit).
479
529
  */
@@ -496,32 +546,104 @@ export declare function Auth(config_: ConvexAuthConfig): {
496
546
  remove: (ctx: Pick<GenericActionCtx<GenericDataModel>, "runQuery" | "runMutation">, keyId: string) => Promise<void>;
497
547
  };
498
548
  /**
499
- * Add HTTP actions for JWT verification and OAuth sign-in.
500
- *
501
- * ```ts
502
- * import { httpRouter } from "convex/server";
503
- * import { auth } from "./auth.js";
504
- *
505
- * const http = httpRouter();
506
- *
507
- * auth.addHttpRoutes(http);
508
- *
509
- * export default http;
510
- * ```
511
- *
512
- * The following routes are handled always:
513
- *
514
- * - `/.well-known/openid-configuration`
515
- * - `/.well-known/jwks.json`
516
- *
517
- * The following routes are handled if OAuth is configured:
518
- *
519
- * - `/api/auth/signin/*`
520
- * - `/api/auth/callback/*`
521
- *
522
- * @param http your HTTP router
549
+ * HTTP namespace route registration and Bearer-authenticated endpoints.
523
550
  */
524
- addHttpRoutes: (http: HttpRouter) => void;
551
+ http: {
552
+ /**
553
+ * Register core HTTP routes for JWT verification and OAuth sign-in.
554
+ *
555
+ * ```ts
556
+ * import { httpRouter } from "convex/server";
557
+ * import { auth } from "./auth.js";
558
+ *
559
+ * const http = httpRouter();
560
+ *
561
+ * auth.http.add(http);
562
+ *
563
+ * export default http;
564
+ * ```
565
+ *
566
+ * The following routes are handled always:
567
+ *
568
+ * - `/.well-known/openid-configuration`
569
+ * - `/.well-known/jwks.json`
570
+ *
571
+ * The following routes are handled if OAuth is configured:
572
+ *
573
+ * - `/api/auth/signin/*`
574
+ * - `/api/auth/callback/*`
575
+ *
576
+ * @param http your HTTP router
577
+ */
578
+ add: (http: HttpRouter) => void;
579
+ /**
580
+ * Wrap an HTTP action handler with Bearer token authentication.
581
+ *
582
+ * Extracts the `Authorization: Bearer <key>` header, verifies the
583
+ * API key via `auth.key.verify()`, and injects `ctx.key` with the
584
+ * verified key info. Returns structured JSON error responses for
585
+ * missing/invalid/revoked/expired/rate-limited keys.
586
+ *
587
+ * If the handler returns a plain object, it is auto-wrapped in a
588
+ * `200 JSON` response. If it returns a `Response`, CORS headers
589
+ * are merged and the response is passed through.
590
+ *
591
+ * ```ts
592
+ * const handler = auth.http.action(async (ctx, request) => {
593
+ * const data = await ctx.runQuery(api.data.get, { userId: ctx.key.userId });
594
+ * return { data };
595
+ * });
596
+ * http.route({ path: "/api/data", method: "GET", handler });
597
+ * ```
598
+ *
599
+ * @param handler - Receives enriched `ctx` (with `ctx.key`) and the raw `Request`.
600
+ * @param options.scope - Optional scope check; returns 403 if the key lacks permission.
601
+ * @param options.cors - CORS config; defaults to permissive (`*`).
602
+ */
603
+ action: (handler: (ctx: GenericActionCtx<GenericDataModel> & HttpKeyContext, request: Request) => Promise<Response | Record<string, unknown>>, options?: {
604
+ scope?: {
605
+ resource: string;
606
+ action: string;
607
+ };
608
+ cors?: CorsConfig;
609
+ }) => import("convex/server").PublicHttpAction;
610
+ /**
611
+ * Register a Bearer-authenticated route **and** its OPTIONS preflight
612
+ * in a single call.
613
+ *
614
+ * ```ts
615
+ * auth.http.route(http, {
616
+ * path: "/api/messages",
617
+ * method: "POST",
618
+ * handler: async (ctx, request) => {
619
+ * const { body } = await request.json();
620
+ * await ctx.runMutation(internal.messages.sendAsUser, {
621
+ * userId: ctx.key.userId,
622
+ * body,
623
+ * });
624
+ * return { success: true };
625
+ * },
626
+ * });
627
+ * ```
628
+ *
629
+ * @param http - The Convex HTTP router.
630
+ * @param routeConfig.path - The URL path to match.
631
+ * @param routeConfig.method - HTTP method (GET, POST, PUT, PATCH, DELETE).
632
+ * @param routeConfig.handler - Receives enriched `ctx` (with `ctx.key`) and the raw `Request`.
633
+ * @param routeConfig.scope - Optional scope check; returns 403 if the key lacks permission.
634
+ * @param routeConfig.cors - CORS config; defaults to permissive (`*`).
635
+ */
636
+ route: (http: HttpRouter, routeConfig: {
637
+ path: string;
638
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
639
+ handler: (ctx: GenericActionCtx<GenericDataModel> & HttpKeyContext, request: Request) => Promise<Response | Record<string, unknown>>;
640
+ scope?: {
641
+ resource: string;
642
+ action: string;
643
+ };
644
+ cors?: CorsConfig;
645
+ }) => void;
646
+ };
525
647
  };
526
648
  /**
527
649
  * Action called by the client to sign the user in.
@@ -581,10 +703,10 @@ export declare function Auth(config_: ConvexAuthConfig): {
581
703
  signature: string;
582
704
  } | {
583
705
  type: "userOAuth";
584
- profile: any;
585
706
  provider: string;
586
707
  providerAccountId: string;
587
708
  signature: string;
709
+ profile: any;
588
710
  } | {
589
711
  email?: string | undefined;
590
712
  phone?: string | undefined;
@@ -598,26 +720,26 @@ export declare function Auth(config_: ConvexAuthConfig): {
598
720
  shouldLinkViaEmail?: boolean | undefined;
599
721
  shouldLinkViaPhone?: boolean | undefined;
600
722
  type: "createAccountFromCredentials";
601
- profile: any;
723
+ provider: string;
602
724
  account: {
603
725
  secret?: string | undefined;
604
726
  id: string;
605
727
  };
606
- provider: string;
728
+ profile: any;
607
729
  } | {
608
730
  type: "retrieveAccountWithCredentials";
731
+ provider: string;
609
732
  account: {
610
733
  secret?: string | undefined;
611
734
  id: string;
612
735
  };
613
- provider: string;
614
736
  } | {
615
737
  type: "modifyAccount";
738
+ provider: string;
616
739
  account: {
617
740
  id: string;
618
741
  secret: string;
619
742
  };
620
- provider: string;
621
743
  } | {
622
744
  except?: string[] | undefined;
623
745
  type: "invalidateSessions";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/implementation/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,IAAI,EACJ,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EAIX,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G;uGACsC,MAAM;YAO/C;;eAEG;uGACsC,MAAM;;QAMjD;;;;;;;;;;;;;;;;;;;;;;;;;WAyBG;8BACmB,UAAU;;IA6MhC;;;;OAIG;;;;;;;;mBAaY,MAAM;mBACN,MAAM;iBACR,MAAM,GAAG,IAAI;kBACZ,OAAO;kBACP,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;uBACd,OAAO;oBACV;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE;;IAkC/D;;OAEG;;IAQH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASN"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/implementation/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,IAAI,EACJ,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EAIX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAe,SAAS,EAAK,MAAM,eAAe,CAAC;AAI1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAM1D,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,EACV,cAAc,EACf,MAAM,aAAa,CAAC;AAErB,OAAO,EAGL,MAAM,EACN,MAAM,EACP,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAmCzC;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,2BAA2B,CACpD,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAAC,CAClC,CAAC;AACF;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,2BAA2B,CACrD,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,SAAS,CAAC,CACnC,CAAC;AACF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAg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