@lupinum/better-convex-nuxt 0.8.0-beta.40
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.
- package/LICENSE +21 -0
- package/LICENSES/Apache-2.0.txt +201 -0
- package/README.md +151 -0
- package/THIRD_PARTY_NOTICES.md +38 -0
- package/dist/module.d.mts +55 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +309 -0
- package/dist/runtime/auth/auth-identity.d.ts +31 -0
- package/dist/runtime/auth/auth-identity.js +21 -0
- package/dist/runtime/auth/better-auth-browser-adapter.d.ts +33 -0
- package/dist/runtime/auth/better-auth-browser-adapter.js +215 -0
- package/dist/runtime/auth/client-engine-types.d.ts +4 -0
- package/dist/runtime/auth/client-engine-types.js +0 -0
- package/dist/runtime/auth/integrated-client.d.ts +25 -0
- package/dist/runtime/auth/integrated-client.js +132 -0
- package/dist/runtime/auth/operation-tracker.d.ts +7 -0
- package/dist/runtime/auth/operation-tracker.js +14 -0
- package/dist/runtime/auth/session-synchronization.d.ts +23 -0
- package/dist/runtime/auth/session-synchronization.js +156 -0
- package/dist/runtime/auth/token-fetcher.d.ts +66 -0
- package/dist/runtime/auth/token-fetcher.js +131 -0
- package/dist/runtime/auth/validate-auth-client-definition.d.ts +12 -0
- package/dist/runtime/auth/validate-auth-client-definition.js +47 -0
- package/dist/runtime/auth-client/convex-client-plugin.d.ts +31 -0
- package/dist/runtime/auth-client/convex-client-plugin.js +14 -0
- package/dist/runtime/auth-client/definition-types.d.ts +6 -0
- package/dist/runtime/auth-client/definition-types.js +0 -0
- package/dist/runtime/auth-client/empty-definition.d.ts +2 -0
- package/dist/runtime/auth-client/empty-definition.js +2 -0
- package/dist/runtime/auth-client/index.d.ts +71 -0
- package/dist/runtime/auth-client/index.js +3 -0
- package/dist/runtime/cli/auth-schema.d.ts +2 -0
- package/dist/runtime/cli/auth-schema.js +169 -0
- package/dist/runtime/cli/convex.d.ts +11 -0
- package/dist/runtime/cli/convex.js +274 -0
- package/dist/runtime/composables/useConvex.d.ts +4 -0
- package/dist/runtime/composables/useConvex.js +9 -0
- package/dist/runtime/composables/useConvexAction.d.ts +4 -0
- package/dist/runtime/composables/useConvexAction.js +18 -0
- package/dist/runtime/composables/useConvexAttachment.d.ts +9 -0
- package/dist/runtime/composables/useConvexAttachment.js +14 -0
- package/dist/runtime/composables/useConvexAuth.d.ts +10 -0
- package/dist/runtime/composables/useConvexAuth.js +37 -0
- package/dist/runtime/composables/useConvexConfig.d.ts +12 -0
- package/dist/runtime/composables/useConvexConfig.js +7 -0
- package/dist/runtime/composables/useConvexConnectionState.d.ts +33 -0
- package/dist/runtime/composables/useConvexConnectionState.js +24 -0
- package/dist/runtime/composables/useConvexFileUpload.d.ts +169 -0
- package/dist/runtime/composables/useConvexFileUpload.js +198 -0
- package/dist/runtime/composables/useConvexMutation.d.ts +13 -0
- package/dist/runtime/composables/useConvexMutation.js +24 -0
- package/dist/runtime/composables/useConvexPaginatedQuery.d.ts +13 -0
- package/dist/runtime/composables/useConvexPaginatedQuery.js +256 -0
- package/dist/runtime/composables/useConvexQuery.d.ts +19 -0
- package/dist/runtime/composables/useConvexQuery.js +308 -0
- package/dist/runtime/convex-auth/adapter/create-adapter.d.ts +33 -0
- package/dist/runtime/convex-auth/adapter/create-adapter.js +308 -0
- package/dist/runtime/convex-auth/adapter/define-functions.d.ts +160 -0
- package/dist/runtime/convex-auth/adapter/define-functions.js +497 -0
- package/dist/runtime/convex-auth/adapter/generate-schema.d.ts +16 -0
- package/dist/runtime/convex-auth/adapter/generate-schema.js +332 -0
- package/dist/runtime/convex-auth/adapter/metadata.d.ts +44 -0
- package/dist/runtime/convex-auth/adapter/metadata.js +91 -0
- package/dist/runtime/convex-auth/adapter/query.d.ts +32 -0
- package/dist/runtime/convex-auth/adapter/query.js +275 -0
- package/dist/runtime/convex-auth/adapter/relationships.d.ts +20 -0
- package/dist/runtime/convex-auth/adapter/relationships.js +128 -0
- package/dist/runtime/convex-auth/component/_generated/api.js +5 -0
- package/dist/runtime/convex-auth/component/_generated/component.d.ts +116 -0
- package/dist/runtime/convex-auth/component/_generated/component.js +0 -0
- package/dist/runtime/convex-auth/component/_generated/dataModel.js +0 -0
- package/dist/runtime/convex-auth/component/_generated/server.js +16 -0
- package/dist/runtime/convex-auth/component/adapter.d.ts +142 -0
- package/dist/runtime/convex-auth/component/adapter.js +16 -0
- package/dist/runtime/convex-auth/component/convex.config.d.ts +2 -0
- package/dist/runtime/convex-auth/component/convex.config.js +3 -0
- package/dist/runtime/convex-auth/component/schema.d.ts +799 -0
- package/dist/runtime/convex-auth/component/schema.js +180 -0
- package/dist/runtime/convex-auth/component/schemaMetadata.d.ts +2094 -0
- package/dist/runtime/convex-auth/component/schemaMetadata.js +2161 -0
- package/dist/runtime/convex-auth/context.d.ts +5 -0
- package/dist/runtime/convex-auth/context.js +8 -0
- package/dist/runtime/convex-auth/create-auth-component.d.ts +41 -0
- package/dist/runtime/convex-auth/create-auth-component.js +157 -0
- package/dist/runtime/convex-auth/index.d.ts +11 -0
- package/dist/runtime/convex-auth/index.js +7 -0
- package/dist/runtime/convex-auth/internal-session.d.ts +2 -0
- package/dist/runtime/convex-auth/internal-session.js +1 -0
- package/dist/runtime/convex-auth/jwks-rotation.d.ts +58 -0
- package/dist/runtime/convex-auth/jwks-rotation.js +163 -0
- package/dist/runtime/convex-auth/oauth-live-access.d.ts +17 -0
- package/dist/runtime/convex-auth/oauth-live-access.js +78 -0
- package/dist/runtime/convex-auth/oauth-provider-compat.d.ts +10 -0
- package/dist/runtime/convex-auth/oauth-provider-compat.js +170 -0
- package/dist/runtime/convex-auth/oauth-resource.d.ts +39 -0
- package/dist/runtime/convex-auth/oauth-resource.js +118 -0
- package/dist/runtime/convex-auth/oauth-security.d.ts +82 -0
- package/dist/runtime/convex-auth/oauth-security.js +454 -0
- package/dist/runtime/convex-auth/origin.d.ts +4 -0
- package/dist/runtime/convex-auth/origin.js +9 -0
- package/dist/runtime/convex-auth/plugin.d.ts +18 -0
- package/dist/runtime/convex-auth/plugin.js +605 -0
- package/dist/runtime/convex-auth/provider.d.ts +2 -0
- package/dist/runtime/convex-auth/provider.js +11 -0
- package/dist/runtime/convex-auth/test.d.ts +410 -0
- package/dist/runtime/convex-auth/test.js +9 -0
- package/dist/runtime/convex-auth/types.d.ts +18 -0
- package/dist/runtime/convex-auth/types.js +0 -0
- package/dist/runtime/convex-auth/user-projection.d.ts +106 -0
- package/dist/runtime/convex-auth/user-projection.js +128 -0
- package/dist/runtime/devtools/auth-proxy-registry.d.ts +4 -0
- package/dist/runtime/devtools/auth-proxy-registry.js +47 -0
- package/dist/runtime/devtools/bridge-setup.d.ts +21 -0
- package/dist/runtime/devtools/bridge-setup.js +165 -0
- package/dist/runtime/devtools/path-utils.d.ts +2 -0
- package/dist/runtime/devtools/path-utils.js +12 -0
- package/dist/runtime/devtools/server.d.ts +2 -0
- package/dist/runtime/devtools/server.js +108 -0
- package/dist/runtime/devtools/setup-client.d.ts +16 -0
- package/dist/runtime/devtools/setup-client.js +43 -0
- package/dist/runtime/devtools/sink.d.ts +18 -0
- package/dist/runtime/devtools/sink.js +110 -0
- package/dist/runtime/devtools/transport.d.ts +16 -0
- package/dist/runtime/devtools/transport.js +149 -0
- package/dist/runtime/devtools/types.d.ts +167 -0
- package/dist/runtime/devtools/types.js +1 -0
- package/dist/runtime/devtools/ui/dist/200.html +1 -0
- package/dist/runtime/devtools/ui/dist/404.html +1 -0
- package/dist/runtime/devtools/ui/dist/_nuxt/C4MASuCh.js +1 -0
- package/dist/runtime/devtools/ui/dist/_nuxt/DJHkqtZq.js +3 -0
- package/dist/runtime/devtools/ui/dist/_nuxt/DWwrCltl.js +2 -0
- package/dist/runtime/devtools/ui/dist/_nuxt/DZ_UiYoH.js +1 -0
- package/dist/runtime/devtools/ui/dist/_nuxt/_m9ujb-i.js +1 -0
- package/dist/runtime/devtools/ui/dist/_nuxt/builds/latest.json +1 -0
- package/dist/runtime/devtools/ui/dist/_nuxt/builds/meta/better-convex-nuxt-devtools.json +1 -0
- package/dist/runtime/devtools/ui/dist/_nuxt/entry.DpFDKYZ5.css +1 -0
- package/dist/runtime/devtools/ui/dist/_nuxt/error-404.DYUJo5xt.css +1 -0
- package/dist/runtime/devtools/ui/dist/_nuxt/error-500.DQdoJJXg.css +1 -0
- package/dist/runtime/devtools/ui/dist/convex-logo.svg +5 -0
- package/dist/runtime/devtools/ui/dist/index.html +1 -0
- package/dist/runtime/errors/index.d.ts +7 -0
- package/dist/runtime/errors/index.js +5 -0
- package/dist/runtime/middleware/convex-auth.global.d.ts +2 -0
- package/dist/runtime/middleware/convex-auth.global.js +31 -0
- package/dist/runtime/plugin.auth.client.d.ts +3 -0
- package/dist/runtime/plugin.auth.client.js +217 -0
- package/dist/runtime/plugin.client.d.ts +3 -0
- package/dist/runtime/plugin.client.js +43 -0
- package/dist/runtime/plugin.server.d.ts +12 -0
- package/dist/runtime/plugin.server.js +98 -0
- package/dist/runtime/plugins/convex-call-error-payload.d.ts +14 -0
- package/dist/runtime/plugins/convex-call-error-payload.js +12 -0
- package/dist/runtime/runtime-context.d.ts +26 -0
- package/dist/runtime/runtime-context.js +48 -0
- package/dist/runtime/server/api/auth/[...].d.ts +10 -0
- package/dist/runtime/server/api/auth/[...].js +509 -0
- package/dist/runtime/server/api/auth/authorization-server-metadata.d.ts +2 -0
- package/dist/runtime/server/api/auth/authorization-server-metadata.js +6 -0
- package/dist/runtime/server/api/auth/body-size.d.ts +15 -0
- package/dist/runtime/server/api/auth/body-size.js +179 -0
- package/dist/runtime/server/api/auth/headers.d.ts +6 -0
- package/dist/runtime/server/api/auth/headers.js +98 -0
- package/dist/runtime/server/api/auth/jwks.d.ts +2 -0
- package/dist/runtime/server/api/auth/jwks.js +6 -0
- package/dist/runtime/server/api/auth/security.d.ts +14 -0
- package/dist/runtime/server/api/auth/security.js +85 -0
- package/dist/runtime/server/api/release-fingerprint.d.ts +2 -0
- package/dist/runtime/server/api/release-fingerprint.js +36 -0
- package/dist/runtime/server/index.d.ts +1 -0
- package/dist/runtime/server/index.js +3 -0
- package/dist/runtime/server/plugins/runtime-config.d.ts +7 -0
- package/dist/runtime/server/plugins/runtime-config.js +7 -0
- package/dist/runtime/server/utils/auth-snapshot.d.ts +26 -0
- package/dist/runtime/server/utils/auth-snapshot.js +165 -0
- package/dist/runtime/server/utils/http.d.ts +16 -0
- package/dist/runtime/server/utils/http.js +133 -0
- package/dist/runtime/server/utils/server-convex-caller.d.ts +31 -0
- package/dist/runtime/server/utils/server-convex-caller.js +151 -0
- package/dist/runtime/server/utils/server-convex-options.d.ts +83 -0
- package/dist/runtime/server/utils/server-convex-options.js +69 -0
- package/dist/runtime/server/utils/signed-client-ip.d.ts +6 -0
- package/dist/runtime/server/utils/signed-client-ip.js +29 -0
- package/dist/runtime/server/utils/ssr-auth-headers.d.ts +26 -0
- package/dist/runtime/server/utils/ssr-auth-headers.js +49 -0
- package/dist/runtime/server/utils/token-exchange.d.ts +27 -0
- package/dist/runtime/server/utils/token-exchange.js +96 -0
- package/dist/runtime/shared/auth-cookie.d.ts +4 -0
- package/dist/runtime/shared/auth-cookie.js +25 -0
- package/dist/runtime/shared/auth-origin.d.ts +15 -0
- package/dist/runtime/shared/auth-origin.js +42 -0
- package/dist/runtime/shared/bounded-stream.d.ts +2 -0
- package/dist/runtime/shared/bounded-stream.js +50 -0
- package/dist/runtime/shared/client-ip.d.ts +21 -0
- package/dist/runtime/shared/client-ip.js +123 -0
- package/dist/runtime/shared/release-fingerprint.d.ts +5 -0
- package/dist/runtime/shared/release-fingerprint.js +17 -0
- package/dist/runtime/types.d.ts +19 -0
- package/dist/runtime/utils/auth-config.d.ts +24 -0
- package/dist/runtime/utils/auth-config.js +45 -0
- package/dist/runtime/utils/auth-contract.d.ts +22 -0
- package/dist/runtime/utils/auth-contract.js +0 -0
- package/dist/runtime/utils/auth-errors.d.ts +5 -0
- package/dist/runtime/utils/auth-errors.js +22 -0
- package/dist/runtime/utils/auth-identity-state.d.ts +4 -0
- package/dist/runtime/utils/auth-identity-state.js +8 -0
- package/dist/runtime/utils/auth-pending-state.d.ts +13 -0
- package/dist/runtime/utils/auth-pending-state.js +4 -0
- package/dist/runtime/utils/auth-pending.d.ts +10 -0
- package/dist/runtime/utils/auth-pending.js +30 -0
- package/dist/runtime/utils/auth-route-protection.d.ts +16 -0
- package/dist/runtime/utils/auth-route-protection.js +58 -0
- package/dist/runtime/utils/auth-status.d.ts +47 -0
- package/dist/runtime/utils/auth-status.js +8 -0
- package/dist/runtime/utils/bounded-convex-fetch.d.ts +18 -0
- package/dist/runtime/utils/bounded-convex-fetch.js +152 -0
- package/dist/runtime/utils/callable-devtools.d.ts +17 -0
- package/dist/runtime/utils/callable-devtools.js +49 -0
- package/dist/runtime/utils/callable-observer.d.ts +2 -0
- package/dist/runtime/utils/callable-observer.js +1 -0
- package/dist/runtime/utils/composable-scope.d.ts +2 -0
- package/dist/runtime/utils/composable-scope.js +8 -0
- package/dist/runtime/utils/config-defaults.d.ts +8 -0
- package/dist/runtime/utils/config-defaults.js +8 -0
- package/dist/runtime/utils/convex-cache.d.ts +68 -0
- package/dist/runtime/utils/convex-cache.js +47 -0
- package/dist/runtime/utils/convex-config.d.ts +16 -0
- package/dist/runtime/utils/convex-config.js +50 -0
- package/dist/runtime/utils/convex-shared.d.ts +67 -0
- package/dist/runtime/utils/convex-shared.js +134 -0
- package/dist/runtime/utils/identity-changed-error.d.ts +4 -0
- package/dist/runtime/utils/identity-changed-error.js +12 -0
- package/dist/runtime/utils/identity-key.d.ts +19 -0
- package/dist/runtime/utils/identity-key.js +10 -0
- package/dist/runtime/utils/integrated-auth-client.d.ts +5 -0
- package/dist/runtime/utils/integrated-auth-client.js +0 -0
- package/dist/runtime/utils/logger.d.ts +42 -0
- package/dist/runtime/utils/logger.js +190 -0
- package/dist/runtime/utils/mime-type.d.ts +33 -0
- package/dist/runtime/utils/mime-type.js +10 -0
- package/dist/runtime/utils/query-execution-gate.d.ts +47 -0
- package/dist/runtime/utils/query-execution-gate.js +63 -0
- package/dist/runtime/utils/query-execution.d.ts +8 -0
- package/dist/runtime/utils/query-execution.js +19 -0
- package/dist/runtime/utils/query-foundation.d.ts +20 -0
- package/dist/runtime/utils/query-foundation.js +39 -0
- package/dist/runtime/utils/query-state.d.ts +12 -0
- package/dist/runtime/utils/query-state.js +12 -0
- package/dist/runtime/utils/reactive-args.d.ts +5 -0
- package/dist/runtime/utils/reactive-args.js +42 -0
- package/dist/runtime/utils/runtime-config-normalize.d.ts +22 -0
- package/dist/runtime/utils/runtime-config-normalize.js +28 -0
- package/dist/runtime/utils/runtime-config.d.ts +4 -0
- package/dist/runtime/utils/runtime-config.js +8 -0
- package/dist/runtime/utils/sanitize-diagnostic.d.ts +6 -0
- package/dist/runtime/utils/sanitize-diagnostic.js +81 -0
- package/dist/runtime/utils/shared-helpers.d.ts +46 -0
- package/dist/runtime/utils/shared-helpers.js +139 -0
- package/dist/runtime/utils/site-url.d.ts +4 -0
- package/dist/runtime/utils/site-url.js +15 -0
- package/dist/runtime/utils/ssr-pagination-state.d.ts +3 -0
- package/dist/runtime/utils/ssr-pagination-state.js +3 -0
- package/dist/runtime/utils/types.d.ts +29 -0
- package/dist/runtime/utils/types.js +0 -0
- package/dist/runtime/utils/upload-core.d.ts +16 -0
- package/dist/runtime/utils/upload-core.js +116 -0
- package/dist/types.d.mts +21 -0
- package/package.json +253 -0
- package/security/upstream-convex-better-auth.json +477 -0
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import type { GenericSchema, SchemaDefinition } from 'convex/server';
|
|
2
|
+
type ComponentModules = Record<string, () => Promise<unknown>>;
|
|
3
|
+
interface ComponentRegistrar {
|
|
4
|
+
registerComponent(name: string, schema: SchemaDefinition<GenericSchema, boolean>, modules: ComponentModules): void;
|
|
5
|
+
}
|
|
6
|
+
export declare function register(test: ComponentRegistrar, name?: string): void;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
modules: ComponentModules;
|
|
9
|
+
register: typeof register;
|
|
10
|
+
schema: SchemaDefinition<{
|
|
11
|
+
readonly user: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
email: string;
|
|
15
|
+
image: string | null;
|
|
16
|
+
createdAt: number;
|
|
17
|
+
updatedAt: number;
|
|
18
|
+
emailVerified: boolean;
|
|
19
|
+
}, {
|
|
20
|
+
id: import("convex/values").VString<string, "required">;
|
|
21
|
+
name: import("convex/values").VString<string, "required">;
|
|
22
|
+
email: import("convex/values").VString<string, "required">;
|
|
23
|
+
emailVerified: import("convex/values").VBoolean<boolean, "required">;
|
|
24
|
+
image: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
25
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
26
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
27
|
+
}, "required", "id" | "name" | "email" | "image" | "createdAt" | "updatedAt" | "emailVerified">, {
|
|
28
|
+
id: ["id", "_creationTime"];
|
|
29
|
+
name: ["name", "_creationTime"];
|
|
30
|
+
email: ["email", "_creationTime"];
|
|
31
|
+
createdAt: ["createdAt", "_creationTime"];
|
|
32
|
+
}, {}, {}>;
|
|
33
|
+
readonly session: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
34
|
+
id: string;
|
|
35
|
+
token: string;
|
|
36
|
+
createdAt: number;
|
|
37
|
+
updatedAt: number;
|
|
38
|
+
userId: string;
|
|
39
|
+
expiresAt: number;
|
|
40
|
+
ipAddress: string | null;
|
|
41
|
+
userAgent: string | null;
|
|
42
|
+
}, {
|
|
43
|
+
id: import("convex/values").VString<string, "required">;
|
|
44
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
45
|
+
token: import("convex/values").VString<string, "required">;
|
|
46
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
47
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
48
|
+
ipAddress: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
49
|
+
userAgent: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
50
|
+
userId: import("convex/values").VString<string, "required">;
|
|
51
|
+
}, "required", "id" | "token" | "createdAt" | "updatedAt" | "userId" | "expiresAt" | "ipAddress" | "userAgent">, {
|
|
52
|
+
id: ["id", "_creationTime"];
|
|
53
|
+
expiresAt: ["expiresAt", "_creationTime"];
|
|
54
|
+
userId_expiresAt: ["userId", "expiresAt", "_creationTime"];
|
|
55
|
+
token: ["token", "_creationTime"];
|
|
56
|
+
createdAt: ["createdAt", "_creationTime"];
|
|
57
|
+
userId: ["userId", "_creationTime"];
|
|
58
|
+
}, {}, {}>;
|
|
59
|
+
readonly account: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
60
|
+
id: string;
|
|
61
|
+
createdAt: number;
|
|
62
|
+
updatedAt: number;
|
|
63
|
+
refreshToken: string | null;
|
|
64
|
+
userId: string;
|
|
65
|
+
idToken: string | null;
|
|
66
|
+
accessToken: string | null;
|
|
67
|
+
password: string | null;
|
|
68
|
+
scope: string | null;
|
|
69
|
+
accessTokenExpiresAt: number | null;
|
|
70
|
+
refreshTokenExpiresAt: number | null;
|
|
71
|
+
providerId: string;
|
|
72
|
+
issuer: string;
|
|
73
|
+
providerAccountId: string;
|
|
74
|
+
}, {
|
|
75
|
+
id: import("convex/values").VString<string, "required">;
|
|
76
|
+
issuer: import("convex/values").VString<string, "required">;
|
|
77
|
+
providerAccountId: import("convex/values").VString<string, "required">;
|
|
78
|
+
providerId: import("convex/values").VString<string, "required">;
|
|
79
|
+
userId: import("convex/values").VString<string, "required">;
|
|
80
|
+
accessToken: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
81
|
+
refreshToken: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
82
|
+
idToken: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
83
|
+
accessTokenExpiresAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
84
|
+
refreshTokenExpiresAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
85
|
+
scope: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
86
|
+
password: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
87
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
88
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
89
|
+
}, "required", "id" | "createdAt" | "updatedAt" | "refreshToken" | "userId" | "idToken" | "accessToken" | "password" | "scope" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "providerId" | "issuer" | "providerAccountId">, {
|
|
90
|
+
id: ["id", "_creationTime"];
|
|
91
|
+
issuer_providerAccountId: ["issuer", "providerAccountId", "_creationTime"];
|
|
92
|
+
userId: ["userId", "_creationTime"];
|
|
93
|
+
createdAt: ["createdAt", "_creationTime"];
|
|
94
|
+
}, {}, {}>;
|
|
95
|
+
readonly verification: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
96
|
+
id: string;
|
|
97
|
+
createdAt: number;
|
|
98
|
+
updatedAt: number;
|
|
99
|
+
value: string;
|
|
100
|
+
expiresAt: number;
|
|
101
|
+
identifier: string;
|
|
102
|
+
}, {
|
|
103
|
+
id: import("convex/values").VString<string, "required">;
|
|
104
|
+
identifier: import("convex/values").VString<string, "required">;
|
|
105
|
+
value: import("convex/values").VString<string, "required">;
|
|
106
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
107
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
108
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
109
|
+
}, "required", "id" | "createdAt" | "updatedAt" | "value" | "expiresAt" | "identifier">, {
|
|
110
|
+
id: ["id", "_creationTime"];
|
|
111
|
+
expiresAt: ["expiresAt", "_creationTime"];
|
|
112
|
+
identifier: ["identifier", "_creationTime"];
|
|
113
|
+
identifier_createdAt: ["identifier", "createdAt", "_creationTime"];
|
|
114
|
+
createdAt: ["createdAt", "_creationTime"];
|
|
115
|
+
}, {}, {}>;
|
|
116
|
+
readonly jwks: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
117
|
+
id: string;
|
|
118
|
+
createdAt: number;
|
|
119
|
+
expiresAt: number | null;
|
|
120
|
+
alg: string | null;
|
|
121
|
+
crv: string | null;
|
|
122
|
+
privateKey: string;
|
|
123
|
+
publicKey: string;
|
|
124
|
+
}, {
|
|
125
|
+
id: import("convex/values").VString<string, "required">;
|
|
126
|
+
publicKey: import("convex/values").VString<string, "required">;
|
|
127
|
+
privateKey: import("convex/values").VString<string, "required">;
|
|
128
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
129
|
+
expiresAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
130
|
+
alg: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
131
|
+
crv: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
132
|
+
}, "required", "id" | "createdAt" | "expiresAt" | "alg" | "crv" | "privateKey" | "publicKey">, {
|
|
133
|
+
id: ["id", "_creationTime"];
|
|
134
|
+
createdAt: ["createdAt", "_creationTime"];
|
|
135
|
+
}, {}, {}>;
|
|
136
|
+
readonly oauthClient: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
137
|
+
id: string;
|
|
138
|
+
name: string | null;
|
|
139
|
+
createdAt: number | null;
|
|
140
|
+
updatedAt: number | null;
|
|
141
|
+
public: boolean | null;
|
|
142
|
+
userId: string | null;
|
|
143
|
+
metadata: string | null;
|
|
144
|
+
scopes: string[] | null;
|
|
145
|
+
type: string | null;
|
|
146
|
+
disabled: boolean | null;
|
|
147
|
+
clientId: string;
|
|
148
|
+
jwks: string | null;
|
|
149
|
+
grantTypes: string[] | null;
|
|
150
|
+
contacts: string[] | null;
|
|
151
|
+
backchannelLogoutUri: string | null;
|
|
152
|
+
backchannelLogoutSessionRequired: boolean | null;
|
|
153
|
+
jwksUri: string | null;
|
|
154
|
+
postLogoutRedirectUris: string[] | null;
|
|
155
|
+
softwareStatement: string | null;
|
|
156
|
+
tokenEndpointAuthMethod: string | null;
|
|
157
|
+
clientSecret: string | null;
|
|
158
|
+
requirePKCE: boolean | null;
|
|
159
|
+
skipConsent: boolean | null;
|
|
160
|
+
enableEndSession: boolean | null;
|
|
161
|
+
dpopBoundAccessTokens: boolean | null;
|
|
162
|
+
subjectType: string | null;
|
|
163
|
+
responseTypes: string[] | null;
|
|
164
|
+
redirectUris: string[];
|
|
165
|
+
uri: string | null;
|
|
166
|
+
icon: string | null;
|
|
167
|
+
tos: string | null;
|
|
168
|
+
policy: string | null;
|
|
169
|
+
softwareId: string | null;
|
|
170
|
+
softwareVersion: string | null;
|
|
171
|
+
referenceId: string | null;
|
|
172
|
+
}, {
|
|
173
|
+
id: import("convex/values").VString<string, "required">;
|
|
174
|
+
clientId: import("convex/values").VString<string, "required">;
|
|
175
|
+
clientSecret: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
176
|
+
disabled: import("convex/values").VUnion<boolean | null, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "required", never>;
|
|
177
|
+
skipConsent: import("convex/values").VUnion<boolean | null, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "required", never>;
|
|
178
|
+
enableEndSession: import("convex/values").VUnion<boolean | null, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "required", never>;
|
|
179
|
+
subjectType: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
180
|
+
scopes: import("convex/values").VUnion<string[] | null, [import("convex/values").VNull<null, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
|
|
181
|
+
userId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
182
|
+
createdAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
183
|
+
updatedAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
184
|
+
name: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
185
|
+
uri: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
186
|
+
icon: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
187
|
+
contacts: import("convex/values").VUnion<string[] | null, [import("convex/values").VNull<null, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
|
|
188
|
+
tos: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
189
|
+
policy: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
190
|
+
softwareId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
191
|
+
softwareVersion: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
192
|
+
softwareStatement: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
193
|
+
redirectUris: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
194
|
+
postLogoutRedirectUris: import("convex/values").VUnion<string[] | null, [import("convex/values").VNull<null, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
|
|
195
|
+
backchannelLogoutUri: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
196
|
+
backchannelLogoutSessionRequired: import("convex/values").VUnion<boolean | null, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "required", never>;
|
|
197
|
+
tokenEndpointAuthMethod: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
198
|
+
jwks: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
199
|
+
jwksUri: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
200
|
+
grantTypes: import("convex/values").VUnion<string[] | null, [import("convex/values").VNull<null, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
|
|
201
|
+
responseTypes: import("convex/values").VUnion<string[] | null, [import("convex/values").VNull<null, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
|
|
202
|
+
public: import("convex/values").VUnion<boolean | null, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "required", never>;
|
|
203
|
+
type: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
204
|
+
requirePKCE: import("convex/values").VUnion<boolean | null, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "required", never>;
|
|
205
|
+
dpopBoundAccessTokens: import("convex/values").VUnion<boolean | null, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "required", never>;
|
|
206
|
+
referenceId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
207
|
+
metadata: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
208
|
+
}, "required", "id" | "name" | "createdAt" | "updatedAt" | "public" | "userId" | "metadata" | "scopes" | "type" | "disabled" | "clientId" | "jwks" | "grantTypes" | "contacts" | "backchannelLogoutUri" | "backchannelLogoutSessionRequired" | "jwksUri" | "postLogoutRedirectUris" | "softwareStatement" | "tokenEndpointAuthMethod" | "clientSecret" | "requirePKCE" | "skipConsent" | "enableEndSession" | "dpopBoundAccessTokens" | "subjectType" | "responseTypes" | "redirectUris" | "uri" | "icon" | "tos" | "policy" | "softwareId" | "softwareVersion" | "referenceId">, {
|
|
209
|
+
id: ["id", "_creationTime"];
|
|
210
|
+
clientId: ["clientId", "_creationTime"];
|
|
211
|
+
userId: ["userId", "_creationTime"];
|
|
212
|
+
createdAt: ["createdAt", "_creationTime"];
|
|
213
|
+
}, {}, {}>;
|
|
214
|
+
readonly oauthResource: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
215
|
+
id: string;
|
|
216
|
+
name: string;
|
|
217
|
+
createdAt: number | null;
|
|
218
|
+
updatedAt: number | null;
|
|
219
|
+
metadata: string | null;
|
|
220
|
+
disabled: boolean | null;
|
|
221
|
+
identifier: string;
|
|
222
|
+
allowedScopes: string[] | null;
|
|
223
|
+
accessTokenTtl: number | null;
|
|
224
|
+
customClaims: string | null;
|
|
225
|
+
dpopBoundAccessTokensRequired: boolean | null;
|
|
226
|
+
refreshTokenTtl: number | null;
|
|
227
|
+
signingAlgorithm: string | null;
|
|
228
|
+
signingKeyId: string | null;
|
|
229
|
+
policyVersion: number | null;
|
|
230
|
+
}, {
|
|
231
|
+
id: import("convex/values").VString<string, "required">;
|
|
232
|
+
identifier: import("convex/values").VString<string, "required">;
|
|
233
|
+
name: import("convex/values").VString<string, "required">;
|
|
234
|
+
accessTokenTtl: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
235
|
+
refreshTokenTtl: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
236
|
+
signingAlgorithm: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
237
|
+
signingKeyId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
238
|
+
allowedScopes: import("convex/values").VUnion<string[] | null, [import("convex/values").VNull<null, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
|
|
239
|
+
customClaims: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
240
|
+
dpopBoundAccessTokensRequired: import("convex/values").VUnion<boolean | null, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "required", never>;
|
|
241
|
+
disabled: import("convex/values").VUnion<boolean | null, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "required", never>;
|
|
242
|
+
createdAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
243
|
+
updatedAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
244
|
+
policyVersion: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
245
|
+
metadata: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
246
|
+
}, "required", "id" | "name" | "createdAt" | "updatedAt" | "metadata" | "disabled" | "identifier" | "allowedScopes" | "accessTokenTtl" | "customClaims" | "dpopBoundAccessTokensRequired" | "refreshTokenTtl" | "signingAlgorithm" | "signingKeyId" | "policyVersion">, {
|
|
247
|
+
id: ["id", "_creationTime"];
|
|
248
|
+
identifier: ["identifier", "_creationTime"];
|
|
249
|
+
createdAt: ["createdAt", "_creationTime"];
|
|
250
|
+
}, {}, {}>;
|
|
251
|
+
readonly oauthClientResource: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
252
|
+
id: string;
|
|
253
|
+
createdAt: number | null;
|
|
254
|
+
metadata: string | null;
|
|
255
|
+
clientId: string;
|
|
256
|
+
resourceId: string;
|
|
257
|
+
}, {
|
|
258
|
+
id: import("convex/values").VString<string, "required">;
|
|
259
|
+
clientId: import("convex/values").VString<string, "required">;
|
|
260
|
+
resourceId: import("convex/values").VString<string, "required">;
|
|
261
|
+
metadata: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
262
|
+
createdAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
263
|
+
}, "required", "id" | "createdAt" | "metadata" | "clientId" | "resourceId">, {
|
|
264
|
+
id: ["id", "_creationTime"];
|
|
265
|
+
clientId: ["clientId", "_creationTime"];
|
|
266
|
+
resourceId: ["resourceId", "_creationTime"];
|
|
267
|
+
createdAt: ["createdAt", "_creationTime"];
|
|
268
|
+
}, {}, {}>;
|
|
269
|
+
readonly oauthRefreshToken: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
270
|
+
id: string;
|
|
271
|
+
token: string;
|
|
272
|
+
createdAt: number | null;
|
|
273
|
+
userId: string;
|
|
274
|
+
expiresAt: number | null;
|
|
275
|
+
scopes: string[];
|
|
276
|
+
clientId: string;
|
|
277
|
+
resources: string[] | null;
|
|
278
|
+
rotatedAt: number | null;
|
|
279
|
+
sessionId: string | null;
|
|
280
|
+
referenceId: string | null;
|
|
281
|
+
authorizationCodeId: string | null;
|
|
282
|
+
requestedUserInfoClaims: string[] | null;
|
|
283
|
+
revoked: number | null;
|
|
284
|
+
rotationReplayResponse: string | null;
|
|
285
|
+
rotationReplayExpiresAt: number | null;
|
|
286
|
+
authTime: number | null;
|
|
287
|
+
confirmation: string | null;
|
|
288
|
+
}, {
|
|
289
|
+
id: import("convex/values").VString<string, "required">;
|
|
290
|
+
token: import("convex/values").VString<string, "required">;
|
|
291
|
+
clientId: import("convex/values").VString<string, "required">;
|
|
292
|
+
sessionId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
293
|
+
userId: import("convex/values").VString<string, "required">;
|
|
294
|
+
referenceId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
295
|
+
authorizationCodeId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
296
|
+
resources: import("convex/values").VUnion<string[] | null, [import("convex/values").VNull<null, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
|
|
297
|
+
requestedUserInfoClaims: import("convex/values").VUnion<string[] | null, [import("convex/values").VNull<null, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
|
|
298
|
+
expiresAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
299
|
+
createdAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
300
|
+
revoked: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
301
|
+
rotatedAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
302
|
+
rotationReplayResponse: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
303
|
+
rotationReplayExpiresAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
304
|
+
authTime: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
305
|
+
confirmation: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
306
|
+
scopes: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
307
|
+
}, "required", "id" | "token" | "createdAt" | "userId" | "expiresAt" | "scopes" | "clientId" | "resources" | "rotatedAt" | "sessionId" | "referenceId" | "authorizationCodeId" | "requestedUserInfoClaims" | "revoked" | "rotationReplayResponse" | "rotationReplayExpiresAt" | "authTime" | "confirmation">, {
|
|
308
|
+
id: ["id", "_creationTime"];
|
|
309
|
+
token: ["token", "_creationTime"];
|
|
310
|
+
clientId: ["clientId", "_creationTime"];
|
|
311
|
+
sessionId: ["sessionId", "_creationTime"];
|
|
312
|
+
userId: ["userId", "_creationTime"];
|
|
313
|
+
authorizationCodeId: ["authorizationCodeId", "_creationTime"];
|
|
314
|
+
createdAt: ["createdAt", "_creationTime"];
|
|
315
|
+
}, {}, {}>;
|
|
316
|
+
readonly oauthAccessToken: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
317
|
+
id: string;
|
|
318
|
+
token: string | null;
|
|
319
|
+
createdAt: number | null;
|
|
320
|
+
userId: string | null;
|
|
321
|
+
expiresAt: number | null;
|
|
322
|
+
scopes: string[];
|
|
323
|
+
clientId: string;
|
|
324
|
+
resources: string[] | null;
|
|
325
|
+
sessionId: string | null;
|
|
326
|
+
referenceId: string | null;
|
|
327
|
+
authorizationCodeId: string | null;
|
|
328
|
+
requestedUserInfoClaims: string[] | null;
|
|
329
|
+
revoked: number | null;
|
|
330
|
+
confirmation: string | null;
|
|
331
|
+
refreshId: string | null;
|
|
332
|
+
}, {
|
|
333
|
+
id: import("convex/values").VString<string, "required">;
|
|
334
|
+
token: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
335
|
+
clientId: import("convex/values").VString<string, "required">;
|
|
336
|
+
sessionId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
337
|
+
userId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
338
|
+
referenceId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
339
|
+
authorizationCodeId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
340
|
+
resources: import("convex/values").VUnion<string[] | null, [import("convex/values").VNull<null, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
|
|
341
|
+
requestedUserInfoClaims: import("convex/values").VUnion<string[] | null, [import("convex/values").VNull<null, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
|
|
342
|
+
refreshId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
343
|
+
expiresAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
344
|
+
createdAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
345
|
+
revoked: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
346
|
+
confirmation: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
347
|
+
scopes: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
348
|
+
}, "required", "id" | "token" | "createdAt" | "userId" | "expiresAt" | "scopes" | "clientId" | "resources" | "sessionId" | "referenceId" | "authorizationCodeId" | "requestedUserInfoClaims" | "revoked" | "confirmation" | "refreshId">, {
|
|
349
|
+
id: ["id", "_creationTime"];
|
|
350
|
+
token: ["token", "_creationTime"];
|
|
351
|
+
clientId: ["clientId", "_creationTime"];
|
|
352
|
+
sessionId: ["sessionId", "_creationTime"];
|
|
353
|
+
userId: ["userId", "_creationTime"];
|
|
354
|
+
authorizationCodeId: ["authorizationCodeId", "_creationTime"];
|
|
355
|
+
refreshId: ["refreshId", "_creationTime"];
|
|
356
|
+
createdAt: ["createdAt", "_creationTime"];
|
|
357
|
+
}, {}, {}>;
|
|
358
|
+
readonly oauthConsent: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
359
|
+
id: string;
|
|
360
|
+
createdAt: number | null;
|
|
361
|
+
updatedAt: number | null;
|
|
362
|
+
userId: string | null;
|
|
363
|
+
scopes: string[];
|
|
364
|
+
clientId: string;
|
|
365
|
+
resources: string[] | null;
|
|
366
|
+
referenceId: string | null;
|
|
367
|
+
requestedUserInfoClaims: string[] | null;
|
|
368
|
+
}, {
|
|
369
|
+
id: import("convex/values").VString<string, "required">;
|
|
370
|
+
clientId: import("convex/values").VString<string, "required">;
|
|
371
|
+
userId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
372
|
+
referenceId: import("convex/values").VUnion<string | null, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "required", never>;
|
|
373
|
+
resources: import("convex/values").VUnion<string[] | null, [import("convex/values").VNull<null, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
|
|
374
|
+
requestedUserInfoClaims: import("convex/values").VUnion<string[] | null, [import("convex/values").VNull<null, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
|
|
375
|
+
scopes: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
376
|
+
createdAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
377
|
+
updatedAt: import("convex/values").VUnion<number | null, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "required", never>;
|
|
378
|
+
}, "required", "id" | "createdAt" | "updatedAt" | "userId" | "scopes" | "clientId" | "resources" | "referenceId" | "requestedUserInfoClaims">, {
|
|
379
|
+
id: ["id", "_creationTime"];
|
|
380
|
+
clientId_userId: ["clientId", "userId", "_creationTime"];
|
|
381
|
+
clientId: ["clientId", "_creationTime"];
|
|
382
|
+
userId: ["userId", "_creationTime"];
|
|
383
|
+
createdAt: ["createdAt", "_creationTime"];
|
|
384
|
+
}, {}, {}>;
|
|
385
|
+
readonly oauthClientAssertion: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
386
|
+
id: string;
|
|
387
|
+
expiresAt: number;
|
|
388
|
+
}, {
|
|
389
|
+
id: import("convex/values").VString<string, "required">;
|
|
390
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
391
|
+
}, "required", "id" | "expiresAt">, {
|
|
392
|
+
id: ["id", "_creationTime"];
|
|
393
|
+
}, {}, {}>;
|
|
394
|
+
readonly rateLimit: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
395
|
+
id: string;
|
|
396
|
+
key: string;
|
|
397
|
+
count: number;
|
|
398
|
+
lastRequest: number;
|
|
399
|
+
}, {
|
|
400
|
+
id: import("convex/values").VString<string, "required">;
|
|
401
|
+
key: import("convex/values").VString<string, "required">;
|
|
402
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
403
|
+
lastRequest: import("convex/values").VFloat64<number, "required">;
|
|
404
|
+
}, "required", "id" | "key" | "count" | "lastRequest">, {
|
|
405
|
+
id: ["id", "_creationTime"];
|
|
406
|
+
key: ["key", "_creationTime"];
|
|
407
|
+
}, {}, {}>;
|
|
408
|
+
}, true>;
|
|
409
|
+
};
|
|
410
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import schema from "./component/schema.js";
|
|
2
|
+
const modules = {
|
|
3
|
+
"./component/_generated/api.js": () => import("./component/_generated/api.js"),
|
|
4
|
+
"./component/adapter.js": () => import("./component/adapter.js")
|
|
5
|
+
};
|
|
6
|
+
export function register(test, name = "betterAuth") {
|
|
7
|
+
test.registerComponent(name, schema, modules);
|
|
8
|
+
}
|
|
9
|
+
export default { modules, register, schema };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { betterAuth } from 'better-auth';
|
|
2
|
+
import type { FunctionReference, GenericDataModel, GenericMutationCtx } from 'convex/server';
|
|
3
|
+
import type { ComponentApi } from './component/_generated/component.js';
|
|
4
|
+
import type { AuthCtx } from './context.js';
|
|
5
|
+
export type AuthFunctions = {
|
|
6
|
+
onCreate?: FunctionReference<'mutation', 'internal'>;
|
|
7
|
+
onUpdate?: FunctionReference<'mutation', 'internal'>;
|
|
8
|
+
onDelete?: FunctionReference<'mutation', 'internal'>;
|
|
9
|
+
};
|
|
10
|
+
type AuthTriggerDocument = Record<string, unknown>;
|
|
11
|
+
export type AuthComponentTriggers<DataModel extends GenericDataModel = GenericDataModel> = Partial<Record<string, {
|
|
12
|
+
onCreate?: (ctx: GenericMutationCtx<DataModel>, doc: AuthTriggerDocument) => Promise<void>;
|
|
13
|
+
onUpdate?: (ctx: GenericMutationCtx<DataModel>, newDoc: AuthTriggerDocument, oldDoc: AuthTriggerDocument) => Promise<void>;
|
|
14
|
+
onDelete?: (ctx: GenericMutationCtx<DataModel>, doc: AuthTriggerDocument) => Promise<void>;
|
|
15
|
+
}>>;
|
|
16
|
+
export type CreateAuth<DataModel extends GenericDataModel = GenericDataModel, Auth = ReturnType<typeof betterAuth>> = (ctx: AuthCtx<DataModel>) => Auth | Promise<Auth>;
|
|
17
|
+
export type AuthAdapterComponentApi = ComponentApi;
|
|
18
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export interface BetterAuthUserProjectionSource {
|
|
2
|
+
id: string;
|
|
3
|
+
name?: string | null;
|
|
4
|
+
email?: string | null;
|
|
5
|
+
image?: string | null;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
type UserProjectionDb<TExistingUser extends {
|
|
9
|
+
_id: unknown;
|
|
10
|
+
}> = {
|
|
11
|
+
insert(table: string, value: Record<string, unknown>): Promise<unknown>;
|
|
12
|
+
query(table: string): unknown;
|
|
13
|
+
patch(id: TExistingUser['_id'], value: Record<string, unknown>): Promise<unknown>;
|
|
14
|
+
delete(id: TExistingUser['_id']): Promise<unknown>;
|
|
15
|
+
};
|
|
16
|
+
type UserProjectionCtx<TExistingUser extends {
|
|
17
|
+
_id: unknown;
|
|
18
|
+
}> = {
|
|
19
|
+
db: UserProjectionDb<TExistingUser>;
|
|
20
|
+
};
|
|
21
|
+
export interface CreateUserProjectionTriggersOptions<TAuthUser extends BetterAuthUserProjectionSource = BetterAuthUserProjectionSource, TExistingUser extends {
|
|
22
|
+
_id: unknown;
|
|
23
|
+
} = {
|
|
24
|
+
_id: unknown;
|
|
25
|
+
}, TCtx extends UserProjectionCtx<TExistingUser> = UserProjectionCtx<TExistingUser>> {
|
|
26
|
+
/**
|
|
27
|
+
* Convex table to project Better Auth users into (for example: "userProfiles").
|
|
28
|
+
*/
|
|
29
|
+
table: string;
|
|
30
|
+
/**
|
|
31
|
+
* Index used to find the app user by Better Auth id (for example: "by_auth_id").
|
|
32
|
+
*/
|
|
33
|
+
index: string;
|
|
34
|
+
/**
|
|
35
|
+
* Field in your app user table storing the Better Auth user id (default: "authId").
|
|
36
|
+
*/
|
|
37
|
+
authIdField?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Build the document inserted into your app user table on user creation.
|
|
40
|
+
*/
|
|
41
|
+
createDoc: (args: {
|
|
42
|
+
ctx: TCtx;
|
|
43
|
+
user: TAuthUser;
|
|
44
|
+
now: number;
|
|
45
|
+
}) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
46
|
+
/**
|
|
47
|
+
* Build a patch for app user updates. Return null/undefined to skip patching.
|
|
48
|
+
*/
|
|
49
|
+
patchDoc?: (args: {
|
|
50
|
+
ctx: TCtx;
|
|
51
|
+
user: TAuthUser;
|
|
52
|
+
previousUser: TAuthUser;
|
|
53
|
+
existing: TExistingUser;
|
|
54
|
+
now: number;
|
|
55
|
+
}) => Record<string, unknown> | null | undefined | Promise<Record<string, unknown> | null | undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* Build a patch for rebuild jobs when the projection row already exists.
|
|
58
|
+
*
|
|
59
|
+
* Existing rows are skipped during rebuild when this is omitted, which avoids
|
|
60
|
+
* overwriting fields such as createdAt with insert-only values from createDoc.
|
|
61
|
+
*/
|
|
62
|
+
rebuildDoc?: (args: {
|
|
63
|
+
ctx: TCtx;
|
|
64
|
+
user: TAuthUser;
|
|
65
|
+
existing: TExistingUser;
|
|
66
|
+
now: number;
|
|
67
|
+
}) => Record<string, unknown> | null | undefined | Promise<Record<string, unknown> | null | undefined>;
|
|
68
|
+
}
|
|
69
|
+
interface UserProjectionRebuildResult {
|
|
70
|
+
inserted: number;
|
|
71
|
+
patched: number;
|
|
72
|
+
skipped: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Creates Better Auth trigger handlers that project auth users into a Convex app table.
|
|
76
|
+
*
|
|
77
|
+
* This intentionally scopes to user projection boilerplate only. Better Auth
|
|
78
|
+
* remains the canonical source of auth truth; app tables created with this
|
|
79
|
+
* helper must be treated as derived and rebuildable.
|
|
80
|
+
*/
|
|
81
|
+
export declare function createUserProjectionTriggers<TAuthUser extends BetterAuthUserProjectionSource = BetterAuthUserProjectionSource, TExistingUser extends {
|
|
82
|
+
_id: unknown;
|
|
83
|
+
} = {
|
|
84
|
+
_id: unknown;
|
|
85
|
+
}, TCtx extends UserProjectionCtx<TExistingUser> = UserProjectionCtx<TExistingUser>>(options: CreateUserProjectionTriggersOptions<TAuthUser, TExistingUser, TCtx>): {
|
|
86
|
+
user: {
|
|
87
|
+
onCreate: (ctx: TCtx, user: TAuthUser) => Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Patches the projected row for a Better Auth user update.
|
|
90
|
+
*
|
|
91
|
+
* If `onUpdate` fires before the corresponding `onCreate` has run
|
|
92
|
+
* for this user (e.g. out-of-order trigger delivery, or a webhook race),
|
|
93
|
+
* `findExistingByAuthId` finds nothing and this silently no-ops — the
|
|
94
|
+
* update is dropped rather than queued or retried. The row is created
|
|
95
|
+
* later by `onCreate`, but using `createDoc`'s snapshot at that later
|
|
96
|
+
* time, not the fields this update carried. If your projection needs
|
|
97
|
+
* updates to survive arriving before creation, either make `createDoc`
|
|
98
|
+
* derive from the latest known user state (not just the `onCreate`
|
|
99
|
+
* event's payload) or run `rebuild()` periodically to reconcile drift.
|
|
100
|
+
*/
|
|
101
|
+
onUpdate: (ctx: TCtx, user: TAuthUser, previousUser: TAuthUser) => Promise<void>;
|
|
102
|
+
onDelete: (ctx: TCtx, user: TAuthUser) => Promise<void>;
|
|
103
|
+
rebuild: (ctx: TCtx, users: readonly TAuthUser[]) => Promise<UserProjectionRebuildResult>;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export {};
|