nuxt-backend 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +744 -0
- package/dist/convex/auth.config.d.ts +9 -0
- package/dist/convex/auth.config.d.ts.map +1 -0
- package/dist/convex/auth.config.js +14 -0
- package/dist/convex/auth.config.js.map +1 -0
- package/dist/convex/client/index.d.ts +12784 -0
- package/dist/convex/client/index.d.ts.map +1 -0
- package/dist/convex/client/index.js +230 -0
- package/dist/convex/client/index.js.map +1 -0
- package/dist/convex/component/_generated/api.d.ts +36 -0
- package/dist/convex/component/_generated/api.d.ts.map +1 -0
- package/dist/convex/component/_generated/api.js +31 -0
- package/dist/convex/component/_generated/api.js.map +1 -0
- package/dist/convex/component/_generated/component.d.ts +549 -0
- package/dist/convex/component/_generated/component.d.ts.map +1 -0
- package/dist/convex/component/_generated/component.js +11 -0
- package/dist/convex/component/_generated/component.js.map +1 -0
- package/dist/convex/component/_generated/dataModel.d.ts +46 -0
- package/dist/convex/component/_generated/dataModel.d.ts.map +1 -0
- package/dist/convex/component/_generated/dataModel.js +11 -0
- package/dist/convex/component/_generated/dataModel.js.map +1 -0
- package/dist/convex/component/_generated/server.d.ts +121 -0
- package/dist/convex/component/_generated/server.d.ts.map +1 -0
- package/dist/convex/component/_generated/server.js +78 -0
- package/dist/convex/component/_generated/server.js.map +1 -0
- package/dist/convex/component/adapter.d.ts +3 -0
- package/dist/convex/component/adapter.d.ts.map +1 -0
- package/dist/convex/component/adapter.js +23 -0
- package/dist/convex/component/adapter.js.map +1 -0
- package/dist/convex/component/constants.d.ts +3 -0
- package/dist/convex/component/constants.d.ts.map +1 -0
- package/dist/convex/component/constants.js +3 -0
- package/dist/convex/component/constants.js.map +1 -0
- package/dist/convex/component/convex.config.d.ts +14 -0
- package/dist/convex/component/convex.config.d.ts.map +1 -0
- package/dist/convex/component/convex.config.js +15 -0
- package/dist/convex/component/convex.config.js.map +1 -0
- package/dist/convex/component/schema.d.ts +278 -0
- package/dist/convex/component/schema.d.ts.map +1 -0
- package/dist/convex/component/schema.js +91 -0
- package/dist/convex/component/schema.js.map +1 -0
- package/dist/module.d.ts +47 -0
- package/dist/module.js +275 -0
- package/dist/module.json +9 -0
- package/dist/runtime/nuxt/auth/middleware.d.ts +12 -0
- package/dist/runtime/nuxt/auth/middleware.js +31 -0
- package/dist/runtime/nuxt/auth/proxy.d.ts +6 -0
- package/dist/runtime/nuxt/auth/proxy.js +11 -0
- package/dist/runtime/nuxt/auth/server.d.ts +86 -0
- package/dist/runtime/nuxt/auth/server.js +110 -0
- package/dist/runtime/nuxt/config.d.ts +7 -0
- package/dist/runtime/nuxt/config.js +12 -0
- package/dist/runtime/nuxt/index.d.ts +102 -0
- package/dist/runtime/nuxt/index.js +77 -0
- package/dist/runtime/vue/auth/client.d.ts +14 -0
- package/dist/runtime/vue/auth/client.js +7 -0
- package/dist/runtime/vue/auth/cross-domain.d.ts +8 -0
- package/dist/runtime/vue/auth/cross-domain.js +34 -0
- package/dist/runtime/vue/auth/helpers.d.ts +52 -0
- package/dist/runtime/vue/auth/helpers.js +35 -0
- package/dist/runtime/vue/auth/hydration.d.ts +14 -0
- package/dist/runtime/vue/auth/hydration.js +23 -0
- package/dist/runtime/vue/auth/index.d.ts +79 -0
- package/dist/runtime/vue/auth/index.js +81 -0
- package/dist/runtime/vue/auth/plugin.client.d.ts +6 -0
- package/dist/runtime/vue/auth/plugin.client.js +30 -0
- package/dist/runtime/vue/auth/plugin.server.d.ts +17 -0
- package/dist/runtime/vue/auth/plugin.server.js +29 -0
- package/dist/runtime/vue/auth/use-auth.d.ts +84 -0
- package/dist/runtime/vue/auth/use-auth.js +77 -0
- package/dist/runtime/vue/client.d.ts +245 -0
- package/dist/runtime/vue/client.js +341 -0
- package/dist/runtime/vue/composables/use-action.d.ts +45 -0
- package/dist/runtime/vue/composables/use-action.js +10 -0
- package/dist/runtime/vue/composables/use-connection-state.d.ts +25 -0
- package/dist/runtime/vue/composables/use-connection-state.js +13 -0
- package/dist/runtime/vue/composables/use-mutation.d.ts +60 -0
- package/dist/runtime/vue/composables/use-mutation.js +36 -0
- package/dist/runtime/vue/composables/use-paginated-query.d.ts +101 -0
- package/dist/runtime/vue/composables/use-paginated-query.js +508 -0
- package/dist/runtime/vue/composables/use-queries.d.ts +45 -0
- package/dist/runtime/vue/composables/use-queries.js +32 -0
- package/dist/runtime/vue/composables/use-query.d.ts +82 -0
- package/dist/runtime/vue/composables/use-query.js +63 -0
- package/dist/runtime/vue/composables/use-subscription.d.ts +14 -0
- package/dist/runtime/vue/composables/use-subscription.js +15 -0
- package/dist/runtime/vue/hydration.d.ts +42 -0
- package/dist/runtime/vue/hydration.js +18 -0
- package/dist/runtime/vue/index.d.ts +29 -0
- package/dist/runtime/vue/index.js +38 -0
- package/dist/runtime/vue/queries-observer.d.ts +38 -0
- package/dist/runtime/vue/queries-observer.js +127 -0
- package/dist/types.d.ts +3 -0
- package/package.json +157 -0
- package/src/convex/auth.config.ts +21 -0
- package/src/convex/client/index.ts +329 -0
- package/src/convex/component/_generated/api.ts +52 -0
- package/src/convex/component/_generated/component.ts +1338 -0
- package/src/convex/component/_generated/dataModel.ts +60 -0
- package/src/convex/component/_generated/server.ts +156 -0
- package/src/convex/component/adapter.ts +42 -0
- package/src/convex/component/constants.ts +2 -0
- package/src/convex/component/convex.config.ts +16 -0
- package/src/convex/component/schema.ts +93 -0
- package/src/convex/test.ts +34 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
export declare const tables: {
|
|
2
|
+
user: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3
|
+
image?: string | null | undefined;
|
|
4
|
+
name: string;
|
|
5
|
+
email: string;
|
|
6
|
+
emailVerified: boolean;
|
|
7
|
+
createdAt: number;
|
|
8
|
+
updatedAt: number;
|
|
9
|
+
}, {
|
|
10
|
+
name: import("convex/values").VString<string, "required">;
|
|
11
|
+
email: import("convex/values").VString<string, "required">;
|
|
12
|
+
emailVerified: import("convex/values").VBoolean<boolean, "required">;
|
|
13
|
+
image: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
14
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
15
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
16
|
+
}, "required", "name" | "email" | "emailVerified" | "image" | "createdAt" | "updatedAt">, {
|
|
17
|
+
email_name: ["email", "name", "_creationTime"];
|
|
18
|
+
name: ["name", "_creationTime"];
|
|
19
|
+
}, {}, {}>;
|
|
20
|
+
session: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
21
|
+
ipAddress?: string | null | undefined;
|
|
22
|
+
userAgent?: string | null | undefined;
|
|
23
|
+
createdAt: number;
|
|
24
|
+
updatedAt: number;
|
|
25
|
+
expiresAt: number;
|
|
26
|
+
token: string;
|
|
27
|
+
userId: string;
|
|
28
|
+
}, {
|
|
29
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
30
|
+
token: import("convex/values").VString<string, "required">;
|
|
31
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
32
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
33
|
+
ipAddress: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
34
|
+
userAgent: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
35
|
+
userId: import("convex/values").VString<string, "required">;
|
|
36
|
+
}, "required", "createdAt" | "updatedAt" | "expiresAt" | "token" | "ipAddress" | "userAgent" | "userId">, {
|
|
37
|
+
expiresAt: ["expiresAt", "_creationTime"];
|
|
38
|
+
expiresAt_userId: ["expiresAt", "userId", "_creationTime"];
|
|
39
|
+
token: ["token", "_creationTime"];
|
|
40
|
+
userId: ["userId", "_creationTime"];
|
|
41
|
+
}, {}, {}>;
|
|
42
|
+
account: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
43
|
+
accessToken?: string | null | undefined;
|
|
44
|
+
refreshToken?: string | null | undefined;
|
|
45
|
+
idToken?: string | null | undefined;
|
|
46
|
+
accessTokenExpiresAt?: number | null | undefined;
|
|
47
|
+
refreshTokenExpiresAt?: number | null | undefined;
|
|
48
|
+
scope?: string | null | undefined;
|
|
49
|
+
password?: string | null | undefined;
|
|
50
|
+
createdAt: number;
|
|
51
|
+
updatedAt: number;
|
|
52
|
+
userId: string;
|
|
53
|
+
accountId: string;
|
|
54
|
+
providerId: string;
|
|
55
|
+
}, {
|
|
56
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
57
|
+
providerId: import("convex/values").VString<string, "required">;
|
|
58
|
+
userId: import("convex/values").VString<string, "required">;
|
|
59
|
+
accessToken: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
60
|
+
refreshToken: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
61
|
+
idToken: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
62
|
+
accessTokenExpiresAt: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "optional", never>;
|
|
63
|
+
refreshTokenExpiresAt: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "optional", never>;
|
|
64
|
+
scope: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
65
|
+
password: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
66
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
67
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
68
|
+
}, "required", "createdAt" | "updatedAt" | "userId" | "accountId" | "providerId" | "accessToken" | "refreshToken" | "idToken" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "scope" | "password">, {
|
|
69
|
+
accountId: ["accountId", "_creationTime"];
|
|
70
|
+
accountId_providerId: ["accountId", "providerId", "_creationTime"];
|
|
71
|
+
providerId_userId: ["providerId", "userId", "_creationTime"];
|
|
72
|
+
userId: ["userId", "_creationTime"];
|
|
73
|
+
}, {}, {}>;
|
|
74
|
+
verification: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
75
|
+
createdAt: number;
|
|
76
|
+
updatedAt: number;
|
|
77
|
+
expiresAt: number;
|
|
78
|
+
identifier: string;
|
|
79
|
+
value: string;
|
|
80
|
+
}, {
|
|
81
|
+
identifier: import("convex/values").VString<string, "required">;
|
|
82
|
+
value: import("convex/values").VString<string, "required">;
|
|
83
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
84
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
85
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
86
|
+
}, "required", "createdAt" | "updatedAt" | "expiresAt" | "identifier" | "value">, {
|
|
87
|
+
expiresAt: ["expiresAt", "_creationTime"];
|
|
88
|
+
identifier: ["identifier", "_creationTime"];
|
|
89
|
+
}, {}, {}>;
|
|
90
|
+
rateLimit: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
91
|
+
key: string;
|
|
92
|
+
count: number;
|
|
93
|
+
lastRequest: number;
|
|
94
|
+
}, {
|
|
95
|
+
key: import("convex/values").VString<string, "required">;
|
|
96
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
97
|
+
lastRequest: import("convex/values").VFloat64<number, "required">;
|
|
98
|
+
}, "required", "key" | "count" | "lastRequest">, {
|
|
99
|
+
key: ["key", "_creationTime"];
|
|
100
|
+
}, {}, {}>;
|
|
101
|
+
passkey: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
102
|
+
name?: string | null | undefined;
|
|
103
|
+
createdAt?: number | null | undefined;
|
|
104
|
+
transports?: string | null | undefined;
|
|
105
|
+
aaguid?: string | null | undefined;
|
|
106
|
+
userId: string;
|
|
107
|
+
publicKey: string;
|
|
108
|
+
credentialID: string;
|
|
109
|
+
counter: number;
|
|
110
|
+
deviceType: string;
|
|
111
|
+
backedUp: boolean;
|
|
112
|
+
}, {
|
|
113
|
+
name: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
114
|
+
publicKey: import("convex/values").VString<string, "required">;
|
|
115
|
+
userId: import("convex/values").VString<string, "required">;
|
|
116
|
+
credentialID: import("convex/values").VString<string, "required">;
|
|
117
|
+
counter: import("convex/values").VFloat64<number, "required">;
|
|
118
|
+
deviceType: import("convex/values").VString<string, "required">;
|
|
119
|
+
backedUp: import("convex/values").VBoolean<boolean, "required">;
|
|
120
|
+
transports: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
121
|
+
createdAt: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "optional", never>;
|
|
122
|
+
aaguid: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
123
|
+
}, "required", "name" | "createdAt" | "userId" | "publicKey" | "credentialID" | "counter" | "deviceType" | "backedUp" | "transports" | "aaguid">, {
|
|
124
|
+
credentialID: ["credentialID", "_creationTime"];
|
|
125
|
+
userId: ["userId", "_creationTime"];
|
|
126
|
+
}, {}, {}>;
|
|
127
|
+
jwks: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
128
|
+
expiresAt?: number | null | undefined;
|
|
129
|
+
createdAt: number;
|
|
130
|
+
publicKey: string;
|
|
131
|
+
privateKey: string;
|
|
132
|
+
}, {
|
|
133
|
+
publicKey: import("convex/values").VString<string, "required">;
|
|
134
|
+
privateKey: import("convex/values").VString<string, "required">;
|
|
135
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
136
|
+
expiresAt: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "optional", never>;
|
|
137
|
+
}, "required", "createdAt" | "expiresAt" | "publicKey" | "privateKey">, {}, {}, {}>;
|
|
138
|
+
};
|
|
139
|
+
export declare const authSchema: import("convex/server").SchemaDefinition<{
|
|
140
|
+
user: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
141
|
+
image?: string | null | undefined;
|
|
142
|
+
name: string;
|
|
143
|
+
email: string;
|
|
144
|
+
emailVerified: boolean;
|
|
145
|
+
createdAt: number;
|
|
146
|
+
updatedAt: number;
|
|
147
|
+
}, {
|
|
148
|
+
name: import("convex/values").VString<string, "required">;
|
|
149
|
+
email: import("convex/values").VString<string, "required">;
|
|
150
|
+
emailVerified: import("convex/values").VBoolean<boolean, "required">;
|
|
151
|
+
image: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
152
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
153
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
154
|
+
}, "required", "name" | "email" | "emailVerified" | "image" | "createdAt" | "updatedAt">, {
|
|
155
|
+
email_name: ["email", "name", "_creationTime"];
|
|
156
|
+
name: ["name", "_creationTime"];
|
|
157
|
+
}, {}, {}>;
|
|
158
|
+
session: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
159
|
+
ipAddress?: string | null | undefined;
|
|
160
|
+
userAgent?: string | null | undefined;
|
|
161
|
+
createdAt: number;
|
|
162
|
+
updatedAt: number;
|
|
163
|
+
expiresAt: number;
|
|
164
|
+
token: string;
|
|
165
|
+
userId: string;
|
|
166
|
+
}, {
|
|
167
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
168
|
+
token: import("convex/values").VString<string, "required">;
|
|
169
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
170
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
171
|
+
ipAddress: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
172
|
+
userAgent: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
173
|
+
userId: import("convex/values").VString<string, "required">;
|
|
174
|
+
}, "required", "createdAt" | "updatedAt" | "expiresAt" | "token" | "ipAddress" | "userAgent" | "userId">, {
|
|
175
|
+
expiresAt: ["expiresAt", "_creationTime"];
|
|
176
|
+
expiresAt_userId: ["expiresAt", "userId", "_creationTime"];
|
|
177
|
+
token: ["token", "_creationTime"];
|
|
178
|
+
userId: ["userId", "_creationTime"];
|
|
179
|
+
}, {}, {}>;
|
|
180
|
+
account: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
181
|
+
accessToken?: string | null | undefined;
|
|
182
|
+
refreshToken?: string | null | undefined;
|
|
183
|
+
idToken?: string | null | undefined;
|
|
184
|
+
accessTokenExpiresAt?: number | null | undefined;
|
|
185
|
+
refreshTokenExpiresAt?: number | null | undefined;
|
|
186
|
+
scope?: string | null | undefined;
|
|
187
|
+
password?: string | null | undefined;
|
|
188
|
+
createdAt: number;
|
|
189
|
+
updatedAt: number;
|
|
190
|
+
userId: string;
|
|
191
|
+
accountId: string;
|
|
192
|
+
providerId: string;
|
|
193
|
+
}, {
|
|
194
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
195
|
+
providerId: import("convex/values").VString<string, "required">;
|
|
196
|
+
userId: import("convex/values").VString<string, "required">;
|
|
197
|
+
accessToken: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
198
|
+
refreshToken: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
199
|
+
idToken: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
200
|
+
accessTokenExpiresAt: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "optional", never>;
|
|
201
|
+
refreshTokenExpiresAt: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "optional", never>;
|
|
202
|
+
scope: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
203
|
+
password: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
204
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
205
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
206
|
+
}, "required", "createdAt" | "updatedAt" | "userId" | "accountId" | "providerId" | "accessToken" | "refreshToken" | "idToken" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "scope" | "password">, {
|
|
207
|
+
accountId: ["accountId", "_creationTime"];
|
|
208
|
+
accountId_providerId: ["accountId", "providerId", "_creationTime"];
|
|
209
|
+
providerId_userId: ["providerId", "userId", "_creationTime"];
|
|
210
|
+
userId: ["userId", "_creationTime"];
|
|
211
|
+
}, {}, {}>;
|
|
212
|
+
verification: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
213
|
+
createdAt: number;
|
|
214
|
+
updatedAt: number;
|
|
215
|
+
expiresAt: number;
|
|
216
|
+
identifier: string;
|
|
217
|
+
value: string;
|
|
218
|
+
}, {
|
|
219
|
+
identifier: import("convex/values").VString<string, "required">;
|
|
220
|
+
value: import("convex/values").VString<string, "required">;
|
|
221
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
222
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
223
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
224
|
+
}, "required", "createdAt" | "updatedAt" | "expiresAt" | "identifier" | "value">, {
|
|
225
|
+
expiresAt: ["expiresAt", "_creationTime"];
|
|
226
|
+
identifier: ["identifier", "_creationTime"];
|
|
227
|
+
}, {}, {}>;
|
|
228
|
+
rateLimit: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
229
|
+
key: string;
|
|
230
|
+
count: number;
|
|
231
|
+
lastRequest: number;
|
|
232
|
+
}, {
|
|
233
|
+
key: import("convex/values").VString<string, "required">;
|
|
234
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
235
|
+
lastRequest: import("convex/values").VFloat64<number, "required">;
|
|
236
|
+
}, "required", "key" | "count" | "lastRequest">, {
|
|
237
|
+
key: ["key", "_creationTime"];
|
|
238
|
+
}, {}, {}>;
|
|
239
|
+
passkey: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
240
|
+
name?: string | null | undefined;
|
|
241
|
+
createdAt?: number | null | undefined;
|
|
242
|
+
transports?: string | null | undefined;
|
|
243
|
+
aaguid?: string | null | undefined;
|
|
244
|
+
userId: string;
|
|
245
|
+
publicKey: string;
|
|
246
|
+
credentialID: string;
|
|
247
|
+
counter: number;
|
|
248
|
+
deviceType: string;
|
|
249
|
+
backedUp: boolean;
|
|
250
|
+
}, {
|
|
251
|
+
name: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
252
|
+
publicKey: import("convex/values").VString<string, "required">;
|
|
253
|
+
userId: import("convex/values").VString<string, "required">;
|
|
254
|
+
credentialID: import("convex/values").VString<string, "required">;
|
|
255
|
+
counter: import("convex/values").VFloat64<number, "required">;
|
|
256
|
+
deviceType: import("convex/values").VString<string, "required">;
|
|
257
|
+
backedUp: import("convex/values").VBoolean<boolean, "required">;
|
|
258
|
+
transports: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
259
|
+
createdAt: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "optional", never>;
|
|
260
|
+
aaguid: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
261
|
+
}, "required", "name" | "createdAt" | "userId" | "publicKey" | "credentialID" | "counter" | "deviceType" | "backedUp" | "transports" | "aaguid">, {
|
|
262
|
+
credentialID: ["credentialID", "_creationTime"];
|
|
263
|
+
userId: ["userId", "_creationTime"];
|
|
264
|
+
}, {}, {}>;
|
|
265
|
+
jwks: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
266
|
+
expiresAt?: number | null | undefined;
|
|
267
|
+
createdAt: number;
|
|
268
|
+
publicKey: string;
|
|
269
|
+
privateKey: string;
|
|
270
|
+
}, {
|
|
271
|
+
publicKey: import("convex/values").VString<string, "required">;
|
|
272
|
+
privateKey: import("convex/values").VString<string, "required">;
|
|
273
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
274
|
+
expiresAt: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "optional", never>;
|
|
275
|
+
}, "required", "createdAt" | "expiresAt" | "publicKey" | "privateKey">, {}, {}, {}>;
|
|
276
|
+
}, true>;
|
|
277
|
+
export default authSchema;
|
|
278
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/convex/component/schema.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+ElB,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAAuB,CAAA;AAE9C,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineSchema, defineTable } from 'convex/server';
|
|
2
|
+
import { v } from 'convex/values';
|
|
3
|
+
// Schema for default plugins only: passkey + emailOTP (+ convex plugin which pulls in jwt for Convex tokens + rateLimit).
|
|
4
|
+
// Core tables (user/session/account/verification) + passkey + rateLimit + jwks (required by jwt plugin used for Convex JWTs).
|
|
5
|
+
// No 2FA, no OAuth, no extra user fields (username/phone/anon/etc), no email/password specific beyond core account.
|
|
6
|
+
// This keeps the surface minimal per package defaults (even without email+password).
|
|
7
|
+
// For hybrid/local installs, users get only these tables (spread in their schema).
|
|
8
|
+
// See: https://labs.convex.dev/better-auth/features/local-install
|
|
9
|
+
export const tables = {
|
|
10
|
+
user: defineTable({
|
|
11
|
+
name: v.string(),
|
|
12
|
+
email: v.string(),
|
|
13
|
+
emailVerified: v.boolean(),
|
|
14
|
+
image: v.optional(v.union(v.null(), v.string())),
|
|
15
|
+
createdAt: v.number(),
|
|
16
|
+
updatedAt: v.number(),
|
|
17
|
+
})
|
|
18
|
+
.index('email_name', ['email', 'name'])
|
|
19
|
+
.index('name', ['name']),
|
|
20
|
+
session: defineTable({
|
|
21
|
+
expiresAt: v.number(),
|
|
22
|
+
token: v.string(),
|
|
23
|
+
createdAt: v.number(),
|
|
24
|
+
updatedAt: v.number(),
|
|
25
|
+
ipAddress: v.optional(v.union(v.null(), v.string())),
|
|
26
|
+
userAgent: v.optional(v.union(v.null(), v.string())),
|
|
27
|
+
userId: v.string(),
|
|
28
|
+
})
|
|
29
|
+
.index('expiresAt', ['expiresAt'])
|
|
30
|
+
.index('expiresAt_userId', ['expiresAt', 'userId'])
|
|
31
|
+
.index('token', ['token'])
|
|
32
|
+
.index('userId', ['userId']),
|
|
33
|
+
account: defineTable({
|
|
34
|
+
accountId: v.string(),
|
|
35
|
+
providerId: v.string(),
|
|
36
|
+
userId: v.string(),
|
|
37
|
+
accessToken: v.optional(v.union(v.null(), v.string())),
|
|
38
|
+
refreshToken: v.optional(v.union(v.null(), v.string())),
|
|
39
|
+
idToken: v.optional(v.union(v.null(), v.string())),
|
|
40
|
+
accessTokenExpiresAt: v.optional(v.union(v.null(), v.number())),
|
|
41
|
+
refreshTokenExpiresAt: v.optional(v.union(v.null(), v.number())),
|
|
42
|
+
scope: v.optional(v.union(v.null(), v.string())),
|
|
43
|
+
password: v.optional(v.union(v.null(), v.string())),
|
|
44
|
+
createdAt: v.number(),
|
|
45
|
+
updatedAt: v.number(),
|
|
46
|
+
})
|
|
47
|
+
.index('accountId', ['accountId'])
|
|
48
|
+
.index('accountId_providerId', ['accountId', 'providerId'])
|
|
49
|
+
.index('providerId_userId', ['providerId', 'userId'])
|
|
50
|
+
.index('userId', ['userId']),
|
|
51
|
+
verification: defineTable({
|
|
52
|
+
identifier: v.string(),
|
|
53
|
+
value: v.string(),
|
|
54
|
+
expiresAt: v.number(),
|
|
55
|
+
createdAt: v.number(),
|
|
56
|
+
updatedAt: v.number(),
|
|
57
|
+
})
|
|
58
|
+
.index('expiresAt', ['expiresAt'])
|
|
59
|
+
.index('identifier', ['identifier']),
|
|
60
|
+
rateLimit: defineTable({
|
|
61
|
+
key: v.string(),
|
|
62
|
+
count: v.number(),
|
|
63
|
+
lastRequest: v.number(),
|
|
64
|
+
})
|
|
65
|
+
.index('key', ['key']),
|
|
66
|
+
// Passkey table (enabled by default in our wrapper via defaultPasskey plugin)
|
|
67
|
+
passkey: defineTable({
|
|
68
|
+
name: v.optional(v.union(v.null(), v.string())),
|
|
69
|
+
publicKey: v.string(),
|
|
70
|
+
userId: v.string(),
|
|
71
|
+
credentialID: v.string(),
|
|
72
|
+
counter: v.number(),
|
|
73
|
+
deviceType: v.string(),
|
|
74
|
+
backedUp: v.boolean(),
|
|
75
|
+
transports: v.optional(v.union(v.null(), v.string())),
|
|
76
|
+
createdAt: v.optional(v.union(v.null(), v.number())),
|
|
77
|
+
aaguid: v.optional(v.union(v.null(), v.string())),
|
|
78
|
+
})
|
|
79
|
+
.index('credentialID', ['credentialID'])
|
|
80
|
+
.index('userId', ['userId']),
|
|
81
|
+
// JWKS table is required by the @convex-dev/better-auth convex plugin (always adds jwt plugin for Convex JWT issuance)
|
|
82
|
+
jwks: defineTable({
|
|
83
|
+
publicKey: v.string(),
|
|
84
|
+
privateKey: v.string(),
|
|
85
|
+
createdAt: v.number(),
|
|
86
|
+
expiresAt: v.optional(v.union(v.null(), v.number())),
|
|
87
|
+
}),
|
|
88
|
+
};
|
|
89
|
+
export const authSchema = defineSchema(tables);
|
|
90
|
+
export default authSchema;
|
|
91
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/convex/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;AAEjC,0HAA0H;AAC1H,8HAA8H;AAC9H,oHAAoH;AACpH,qFAAqF;AACrF,mFAAmF;AACnF,kEAAkE;AAClE,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,WAAW,CAAC;QAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE;QAC1B,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAA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AC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QACpD,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;KAClD,CAAC;SACC,KAAK,CAAC,cAAc,EAAE,CAAC,cAAc,CAAC,CAAC;SACvC,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC9B,uHAAuH;IACvH,IAAI,EAAE,WAAW,CAAC;QAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;QACtB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;KACrD,CAAC;CACH,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,CAAA;AAE9C,eAAe,UAAU,CAAA"}
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
|
|
3
|
+
type BackendInstallationMode = 'default' | 'local';
|
|
4
|
+
|
|
5
|
+
interface ModuleOptions {
|
|
6
|
+
url?: string;
|
|
7
|
+
siteUrl?: string;
|
|
8
|
+
authRoute?: string;
|
|
9
|
+
installation?: BackendInstallationMode;
|
|
10
|
+
}
|
|
11
|
+
declare module '@nuxt/schema' {
|
|
12
|
+
interface RuntimeConfig {
|
|
13
|
+
backend: {
|
|
14
|
+
siteUrl: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
interface PublicRuntimeConfig {
|
|
18
|
+
backend: {
|
|
19
|
+
url: string;
|
|
20
|
+
siteUrl: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Build the ordered import-alias map for the Convex backend folder and its
|
|
28
|
+
* generated modules, so user code and server routes can `import from
|
|
29
|
+
* '#backend/...'` without spelling out `_generated`.
|
|
30
|
+
*
|
|
31
|
+
* - `#backend/api` -> _generated/api (`api`, `internal`, `components`)
|
|
32
|
+
* - `#backend/server` -> _generated/server (`query`, `mutation`, `action`, `*Ctx`, ...)
|
|
33
|
+
* - `#backend/dataModel` -> _generated/dataModel (`DataModel`, `Doc`, `Id`, `TableNames`)
|
|
34
|
+
* - `#backend/_generated` -> _generated (long form, covers every generated file)
|
|
35
|
+
* - `#backend` -> <rootDir>/<functionsDir>
|
|
36
|
+
*
|
|
37
|
+
* Order is significant: both Vite and Nitro resolve aliases with
|
|
38
|
+
* `@rollup/plugin-alias`, which is first-match-wins and treats `#backend` as a
|
|
39
|
+
* prefix of `#backend/api`. The specific generated-module aliases must come
|
|
40
|
+
* before the catch-all `#backend`, otherwise `#backend/api` would resolve to
|
|
41
|
+
* `<functionsDir>/api` instead of `<functionsDir>/_generated/api` (and would
|
|
42
|
+
* shadow any user function file literally named `api.ts` / `server.ts`).
|
|
43
|
+
*/
|
|
44
|
+
declare function getBackendAliases(rootDir: string): Record<string, string>;
|
|
45
|
+
|
|
46
|
+
export { _default as default, getBackendAliases };
|
|
47
|
+
export type { ModuleOptions };
|