better-convex 0.0.3 → 0.0.4
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/dist/auth/index.d.ts +99 -99
- package/dist/auth-client/index.d.ts +5 -5
- package/dist/auth-client/index.js +140 -49
- package/dist/{auth-store-DPj6Z0Xl.js → auth-store-Bu8XzPRV.js} +30 -89
- package/dist/cli.cjs +1 -1
- package/dist/{codegen-P6NmBpvG.cjs → codegen-DN-vbQih.cjs} +1 -1
- package/dist/react/index.d.ts +69 -36
- package/dist/react/index.js +1141 -1042
- package/dist/server/index.d.ts +5 -5
- package/dist/watcher.cjs +1 -1
- package/package.json +3 -2
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as better_auth_adapters0 from "better-auth/adapters";
|
|
2
2
|
import { DBAdapterDebugLogOption } from "better-auth/adapters";
|
|
3
3
|
import { BetterAuthDBSchema } from "better-auth/db";
|
|
4
|
-
import * as
|
|
4
|
+
import * as convex_server24 from "convex/server";
|
|
5
5
|
import { DocumentByName, FunctionReference, GenericDataModel, GenericMutationCtx, GenericQueryCtx, GenericSchema, HttpRouter, IdField, PaginationOptions, PaginationResult, SchemaDefinition, SystemFields, TableNamesInDataModel, internalMutationGeneric } from "convex/server";
|
|
6
6
|
import * as convex_values0 from "convex/values";
|
|
7
7
|
import { Infer } from "convex/values";
|
|
@@ -44,31 +44,31 @@ declare const createClient: <DataModel extends GenericDataModel, Schema$1 extend
|
|
|
44
44
|
}) => {
|
|
45
45
|
authFunctions: AuthFunctions;
|
|
46
46
|
triggers: Triggers<DataModel, Schema$1> | undefined;
|
|
47
|
-
adapter: (ctx: GenericCtx<DataModel>, createAuthOptions: (ctx: any) => BetterAuthOptions) =>
|
|
48
|
-
httpAdapter: (ctx: GenericCtx<DataModel>) =>
|
|
47
|
+
adapter: (ctx: GenericCtx<DataModel>, createAuthOptions: (ctx: any) => BetterAuthOptions) => better_auth_adapters0.AdapterFactory;
|
|
48
|
+
httpAdapter: (ctx: GenericCtx<DataModel>) => better_auth_adapters0.AdapterFactory;
|
|
49
49
|
triggersApi: () => {
|
|
50
|
-
beforeCreate:
|
|
51
|
-
data: any;
|
|
50
|
+
beforeCreate: convex_server24.RegisteredMutation<"internal", {
|
|
52
51
|
model: string;
|
|
52
|
+
data: any;
|
|
53
53
|
}, Promise<any>>;
|
|
54
|
-
beforeDelete:
|
|
54
|
+
beforeDelete: convex_server24.RegisteredMutation<"internal", {
|
|
55
55
|
model: string;
|
|
56
56
|
doc: any;
|
|
57
57
|
}, Promise<any>>;
|
|
58
|
-
beforeUpdate:
|
|
59
|
-
update: any;
|
|
58
|
+
beforeUpdate: convex_server24.RegisteredMutation<"internal", {
|
|
60
59
|
model: string;
|
|
60
|
+
update: any;
|
|
61
61
|
doc: any;
|
|
62
62
|
}, Promise<any>>;
|
|
63
|
-
onCreate:
|
|
63
|
+
onCreate: convex_server24.RegisteredMutation<"internal", {
|
|
64
64
|
model: string;
|
|
65
65
|
doc: any;
|
|
66
66
|
}, Promise<void>>;
|
|
67
|
-
onDelete:
|
|
67
|
+
onDelete: convex_server24.RegisteredMutation<"internal", {
|
|
68
68
|
model: string;
|
|
69
69
|
doc: any;
|
|
70
70
|
}, Promise<void>>;
|
|
71
|
-
onUpdate:
|
|
71
|
+
onUpdate: convex_server24.RegisteredMutation<"internal", {
|
|
72
72
|
model: string;
|
|
73
73
|
newDoc: any;
|
|
74
74
|
oldDoc: any;
|
|
@@ -148,7 +148,7 @@ declare const httpAdapter: <DataModel extends GenericDataModel, Schema$1 extends
|
|
|
148
148
|
authFunctions: AuthFunctions;
|
|
149
149
|
debugLogs?: DBAdapterDebugLogOption;
|
|
150
150
|
triggers?: Triggers<DataModel, Schema$1>;
|
|
151
|
-
}) =>
|
|
151
|
+
}) => better_auth_adapters0.AdapterFactory;
|
|
152
152
|
declare const dbAdapter: <DataModel extends GenericDataModel, Schema$1 extends SchemaDefinition<any, any>>(ctx: GenericCtx<DataModel>, createAuthOptions: (ctx: any) => BetterAuthOptions, {
|
|
153
153
|
authFunctions,
|
|
154
154
|
debugLogs,
|
|
@@ -159,34 +159,34 @@ declare const dbAdapter: <DataModel extends GenericDataModel, Schema$1 extends S
|
|
|
159
159
|
schema: Schema$1;
|
|
160
160
|
debugLogs?: DBAdapterDebugLogOption;
|
|
161
161
|
triggers?: Triggers<DataModel, Schema$1>;
|
|
162
|
-
}) =>
|
|
162
|
+
}) => better_auth_adapters0.AdapterFactory;
|
|
163
163
|
//#endregion
|
|
164
164
|
//#region src/auth/adapter-utils.d.ts
|
|
165
165
|
declare const adapterWhereValidator: convex_values0.VObject<{
|
|
166
|
-
operator?: "in" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
167
166
|
connector?: "AND" | "OR" | undefined;
|
|
168
|
-
|
|
167
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
169
168
|
field: string;
|
|
169
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
170
170
|
}, {
|
|
171
171
|
connector: convex_values0.VUnion<"AND" | "OR" | undefined, [convex_values0.VLiteral<"AND", "required">, convex_values0.VLiteral<"OR", "required">], "optional", never>;
|
|
172
172
|
field: convex_values0.VString<string, "required">;
|
|
173
|
-
operator: convex_values0.VUnion<"
|
|
173
|
+
operator: convex_values0.VUnion<"lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined, [convex_values0.VLiteral<"lt", "required">, convex_values0.VLiteral<"lte", "required">, convex_values0.VLiteral<"gt", "required">, convex_values0.VLiteral<"gte", "required">, convex_values0.VLiteral<"eq", "required">, convex_values0.VLiteral<"in", "required">, convex_values0.VLiteral<"not_in", "required">, convex_values0.VLiteral<"ne", "required">, convex_values0.VLiteral<"contains", "required">, convex_values0.VLiteral<"starts_with", "required">, convex_values0.VLiteral<"ends_with", "required">], "optional", never>;
|
|
174
174
|
value: convex_values0.VUnion<string | number | boolean | string[] | number[] | null, [convex_values0.VString<string, "required">, convex_values0.VFloat64<number, "required">, convex_values0.VBoolean<boolean, "required">, convex_values0.VArray<string[], convex_values0.VString<string, "required">, "required">, convex_values0.VArray<number[], convex_values0.VFloat64<number, "required">, "required">, convex_values0.VNull<null, "required">], "required", never>;
|
|
175
|
-
}, "required", "
|
|
175
|
+
}, "required", "field" | "connector" | "operator" | "value">;
|
|
176
176
|
declare const adapterArgsValidator: convex_values0.VObject<{
|
|
177
177
|
limit?: number | undefined;
|
|
178
|
-
where?: {
|
|
179
|
-
operator?: "in" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
180
|
-
connector?: "AND" | "OR" | undefined;
|
|
181
|
-
value: string | number | boolean | string[] | number[] | null;
|
|
182
|
-
field: string;
|
|
183
|
-
}[] | undefined;
|
|
184
|
-
select?: string[] | undefined;
|
|
185
178
|
offset?: number | undefined;
|
|
179
|
+
select?: string[] | undefined;
|
|
186
180
|
sortBy?: {
|
|
187
|
-
field: string;
|
|
188
181
|
direction: "asc" | "desc";
|
|
182
|
+
field: string;
|
|
189
183
|
} | undefined;
|
|
184
|
+
where?: {
|
|
185
|
+
connector?: "AND" | "OR" | undefined;
|
|
186
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
187
|
+
field: string;
|
|
188
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
189
|
+
}[] | undefined;
|
|
190
190
|
model: string;
|
|
191
191
|
}, {
|
|
192
192
|
limit: convex_values0.VFloat64<number | undefined, "optional">;
|
|
@@ -194,29 +194,29 @@ declare const adapterArgsValidator: convex_values0.VObject<{
|
|
|
194
194
|
offset: convex_values0.VFloat64<number | undefined, "optional">;
|
|
195
195
|
select: convex_values0.VArray<string[] | undefined, convex_values0.VString<string, "required">, "optional">;
|
|
196
196
|
sortBy: convex_values0.VObject<{
|
|
197
|
-
field: string;
|
|
198
197
|
direction: "asc" | "desc";
|
|
198
|
+
field: string;
|
|
199
199
|
} | undefined, {
|
|
200
200
|
direction: convex_values0.VUnion<"asc" | "desc", [convex_values0.VLiteral<"asc", "required">, convex_values0.VLiteral<"desc", "required">], "required", never>;
|
|
201
201
|
field: convex_values0.VString<string, "required">;
|
|
202
|
-
}, "optional", "
|
|
202
|
+
}, "optional", "direction" | "field">;
|
|
203
203
|
where: convex_values0.VArray<{
|
|
204
|
-
operator?: "in" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
205
204
|
connector?: "AND" | "OR" | undefined;
|
|
206
|
-
|
|
205
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
207
206
|
field: string;
|
|
207
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
208
208
|
}[] | undefined, convex_values0.VObject<{
|
|
209
|
-
operator?: "in" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
210
209
|
connector?: "AND" | "OR" | undefined;
|
|
211
|
-
|
|
210
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
212
211
|
field: string;
|
|
212
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
213
213
|
}, {
|
|
214
214
|
connector: convex_values0.VUnion<"AND" | "OR" | undefined, [convex_values0.VLiteral<"AND", "required">, convex_values0.VLiteral<"OR", "required">], "optional", never>;
|
|
215
215
|
field: convex_values0.VString<string, "required">;
|
|
216
|
-
operator: convex_values0.VUnion<"
|
|
216
|
+
operator: convex_values0.VUnion<"lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined, [convex_values0.VLiteral<"lt", "required">, convex_values0.VLiteral<"lte", "required">, convex_values0.VLiteral<"gt", "required">, convex_values0.VLiteral<"gte", "required">, convex_values0.VLiteral<"eq", "required">, convex_values0.VLiteral<"in", "required">, convex_values0.VLiteral<"not_in", "required">, convex_values0.VLiteral<"ne", "required">, convex_values0.VLiteral<"contains", "required">, convex_values0.VLiteral<"starts_with", "required">, convex_values0.VLiteral<"ends_with", "required">], "optional", never>;
|
|
217
217
|
value: convex_values0.VUnion<string | number | boolean | string[] | number[] | null, [convex_values0.VString<string, "required">, convex_values0.VFloat64<number, "required">, convex_values0.VBoolean<boolean, "required">, convex_values0.VArray<string[], convex_values0.VString<string, "required">, "required">, convex_values0.VArray<number[], convex_values0.VFloat64<number, "required">, "required">, convex_values0.VNull<null, "required">], "required", never>;
|
|
218
|
-
}, "required", "
|
|
219
|
-
}, "required", "limit" | "
|
|
218
|
+
}, "required", "field" | "connector" | "operator" | "value">, "optional">;
|
|
219
|
+
}, "required", "limit" | "model" | "offset" | "select" | "sortBy" | "where" | "sortBy.direction" | "sortBy.field">;
|
|
220
220
|
declare const hasUniqueFields: (betterAuthSchema: BetterAuthDBSchema, model: string, input: Record<string, any>) => boolean;
|
|
221
221
|
declare const checkUniqueFields: <Schema$1 extends SchemaDefinition<any, any>>(ctx: GenericQueryCtx<GenericDataModel>, schema: Schema$1, betterAuthSchema: BetterAuthDBSchema, table: string, input: Record<string, any>, doc?: Record<string, any>) => Promise<void>;
|
|
222
222
|
declare const selectFields: <T extends TableNamesInDataModel<GenericDataModel>, D extends DocumentByName<GenericDataModel, T>>(doc: D | null, select?: string[]) => Promise<D | null>;
|
|
@@ -244,7 +244,7 @@ declare const findOneHandler: (ctx: any, args: {
|
|
|
244
244
|
model: string;
|
|
245
245
|
select?: string[];
|
|
246
246
|
where?: any[];
|
|
247
|
-
}, schema: Schema, betterAuthSchema: any) => Promise<
|
|
247
|
+
}, schema: Schema, betterAuthSchema: any) => Promise<convex_server24.GenericDocument | null>;
|
|
248
248
|
declare const findManyHandler: (ctx: any, args: {
|
|
249
249
|
model: string;
|
|
250
250
|
paginationOpts: any;
|
|
@@ -255,7 +255,7 @@ declare const findManyHandler: (ctx: any, args: {
|
|
|
255
255
|
field: string;
|
|
256
256
|
};
|
|
257
257
|
where?: any[];
|
|
258
|
-
}, schema: Schema, betterAuthSchema: any) => Promise<
|
|
258
|
+
}, schema: Schema, betterAuthSchema: any) => Promise<convex_server24.PaginationResult<convex_server24.GenericDocument>>;
|
|
259
259
|
declare const updateOneHandler: (ctx: any, args: {
|
|
260
260
|
input: {
|
|
261
261
|
model: string;
|
|
@@ -278,8 +278,8 @@ declare const updateManyHandler: (ctx: any, args: {
|
|
|
278
278
|
count: number;
|
|
279
279
|
ids: any[];
|
|
280
280
|
isDone: boolean;
|
|
281
|
-
continueCursor:
|
|
282
|
-
splitCursor?:
|
|
281
|
+
continueCursor: convex_server24.Cursor;
|
|
282
|
+
splitCursor?: convex_server24.Cursor | null;
|
|
283
283
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
284
284
|
}>;
|
|
285
285
|
declare const deleteOneHandler: (ctx: any, args: {
|
|
@@ -290,7 +290,7 @@ declare const deleteOneHandler: (ctx: any, args: {
|
|
|
290
290
|
beforeDeleteHandle?: string;
|
|
291
291
|
skipBeforeHooks?: boolean;
|
|
292
292
|
onDeleteHandle?: string;
|
|
293
|
-
}, schema: Schema, betterAuthSchema: any) => Promise<
|
|
293
|
+
}, schema: Schema, betterAuthSchema: any) => Promise<convex_server24.GenericDocument | undefined>;
|
|
294
294
|
declare const deleteManyHandler: (ctx: any, args: {
|
|
295
295
|
input: {
|
|
296
296
|
model: string;
|
|
@@ -304,8 +304,8 @@ declare const deleteManyHandler: (ctx: any, args: {
|
|
|
304
304
|
count: number;
|
|
305
305
|
ids: any[];
|
|
306
306
|
isDone: boolean;
|
|
307
|
-
continueCursor:
|
|
308
|
-
splitCursor?:
|
|
307
|
+
continueCursor: convex_server24.Cursor;
|
|
308
|
+
splitCursor?: convex_server24.Cursor | null;
|
|
309
309
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
310
310
|
}>;
|
|
311
311
|
declare const createApi: <Schema$1 extends SchemaDefinition<any, any>>(schema: Schema$1, createAuth: CreateAuth, options?: {
|
|
@@ -313,54 +313,54 @@ declare const createApi: <Schema$1 extends SchemaDefinition<any, any>>(schema: S
|
|
|
313
313
|
/** Skip input validation for smaller generated types. Since these are internal functions, validation is optional. */
|
|
314
314
|
skipValidation?: boolean;
|
|
315
315
|
}) => {
|
|
316
|
-
create:
|
|
316
|
+
create: convex_server24.RegisteredMutation<"internal", {
|
|
317
317
|
select?: string[] | undefined;
|
|
318
318
|
beforeCreateHandle?: string | undefined;
|
|
319
319
|
onCreateHandle?: string | undefined;
|
|
320
320
|
input: {
|
|
321
|
-
data: any;
|
|
322
321
|
model: string;
|
|
322
|
+
data: any;
|
|
323
323
|
} | {
|
|
324
|
+
model: string;
|
|
324
325
|
data: {
|
|
325
326
|
[x: string]: unknown;
|
|
326
327
|
[x: number]: unknown;
|
|
327
328
|
[x: symbol]: unknown;
|
|
328
329
|
};
|
|
329
|
-
model: string;
|
|
330
330
|
};
|
|
331
331
|
}, Promise<any>>;
|
|
332
|
-
deleteMany:
|
|
332
|
+
deleteMany: convex_server24.RegisteredMutation<"internal", {
|
|
333
333
|
beforeDeleteHandle?: string | undefined;
|
|
334
334
|
onDeleteHandle?: string | undefined;
|
|
335
|
+
paginationOpts: {
|
|
336
|
+
id?: number;
|
|
337
|
+
endCursor?: string | null;
|
|
338
|
+
maximumRowsRead?: number;
|
|
339
|
+
maximumBytesRead?: number;
|
|
340
|
+
numItems: number;
|
|
341
|
+
cursor: string | null;
|
|
342
|
+
};
|
|
335
343
|
input: {
|
|
336
344
|
where?: any[] | undefined;
|
|
337
345
|
model: string;
|
|
338
346
|
} | {
|
|
339
347
|
where?: {
|
|
340
|
-
operator?: "in" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
341
348
|
connector?: "AND" | "OR" | undefined;
|
|
342
|
-
|
|
349
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
343
350
|
field: string;
|
|
351
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
344
352
|
}[] | undefined;
|
|
345
353
|
model: string;
|
|
346
354
|
};
|
|
347
|
-
paginationOpts: {
|
|
348
|
-
id?: number;
|
|
349
|
-
endCursor?: string | null;
|
|
350
|
-
maximumRowsRead?: number;
|
|
351
|
-
maximumBytesRead?: number;
|
|
352
|
-
numItems: number;
|
|
353
|
-
cursor: string | null;
|
|
354
|
-
};
|
|
355
355
|
}, Promise<{
|
|
356
356
|
count: number;
|
|
357
357
|
ids: any[];
|
|
358
358
|
isDone: boolean;
|
|
359
|
-
continueCursor:
|
|
360
|
-
splitCursor?:
|
|
359
|
+
continueCursor: convex_server24.Cursor;
|
|
360
|
+
splitCursor?: convex_server24.Cursor | null;
|
|
361
361
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
362
362
|
}>>;
|
|
363
|
-
deleteOne:
|
|
363
|
+
deleteOne: convex_server24.RegisteredMutation<"internal", {
|
|
364
364
|
beforeDeleteHandle?: string | undefined;
|
|
365
365
|
onDeleteHandle?: string | undefined;
|
|
366
366
|
input: {
|
|
@@ -368,28 +368,29 @@ declare const createApi: <Schema$1 extends SchemaDefinition<any, any>>(schema: S
|
|
|
368
368
|
model: string;
|
|
369
369
|
} | {
|
|
370
370
|
where?: {
|
|
371
|
-
operator?: "in" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
372
371
|
connector?: "AND" | "OR" | undefined;
|
|
373
|
-
|
|
372
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
374
373
|
field: string;
|
|
374
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
375
375
|
}[] | undefined;
|
|
376
376
|
model: string;
|
|
377
377
|
};
|
|
378
|
-
}, Promise<
|
|
379
|
-
findMany:
|
|
378
|
+
}, Promise<convex_server24.GenericDocument | undefined>>;
|
|
379
|
+
findMany: convex_server24.RegisteredQuery<"internal", {
|
|
380
380
|
limit?: number | undefined;
|
|
381
381
|
join?: any;
|
|
382
|
-
where?: {
|
|
383
|
-
operator?: "in" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
384
|
-
connector?: "AND" | "OR" | undefined;
|
|
385
|
-
value: string | number | boolean | string[] | number[] | null;
|
|
386
|
-
field: string;
|
|
387
|
-
}[] | undefined;
|
|
388
382
|
offset?: number | undefined;
|
|
389
383
|
sortBy?: {
|
|
390
|
-
field: string;
|
|
391
384
|
direction: "asc" | "desc";
|
|
385
|
+
field: string;
|
|
392
386
|
} | undefined;
|
|
387
|
+
where?: {
|
|
388
|
+
connector?: "AND" | "OR" | undefined;
|
|
389
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
390
|
+
field: string;
|
|
391
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
392
|
+
}[] | undefined;
|
|
393
|
+
model: string;
|
|
393
394
|
paginationOpts: {
|
|
394
395
|
id?: number;
|
|
395
396
|
endCursor?: string | null;
|
|
@@ -398,80 +399,79 @@ declare const createApi: <Schema$1 extends SchemaDefinition<any, any>>(schema: S
|
|
|
398
399
|
numItems: number;
|
|
399
400
|
cursor: string | null;
|
|
400
401
|
};
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
findOne: convex_server23.RegisteredQuery<"internal", {
|
|
402
|
+
}, Promise<convex_server24.PaginationResult<convex_server24.GenericDocument>>>;
|
|
403
|
+
findOne: convex_server24.RegisteredQuery<"internal", {
|
|
404
404
|
join?: any;
|
|
405
|
+
select?: string[] | undefined;
|
|
405
406
|
where?: {
|
|
406
|
-
operator?: "in" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
407
407
|
connector?: "AND" | "OR" | undefined;
|
|
408
|
-
|
|
408
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
409
409
|
field: string;
|
|
410
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
410
411
|
}[] | undefined;
|
|
411
|
-
select?: string[] | undefined;
|
|
412
412
|
model: string;
|
|
413
|
-
}, Promise<
|
|
414
|
-
updateMany:
|
|
413
|
+
}, Promise<convex_server24.GenericDocument | null>>;
|
|
414
|
+
updateMany: convex_server24.RegisteredMutation<"internal", {
|
|
415
415
|
beforeUpdateHandle?: string | undefined;
|
|
416
416
|
onUpdateHandle?: string | undefined;
|
|
417
|
+
paginationOpts: {
|
|
418
|
+
id?: number;
|
|
419
|
+
endCursor?: string | null;
|
|
420
|
+
maximumRowsRead?: number;
|
|
421
|
+
maximumBytesRead?: number;
|
|
422
|
+
numItems: number;
|
|
423
|
+
cursor: string | null;
|
|
424
|
+
};
|
|
417
425
|
input: {
|
|
418
426
|
where?: any[] | undefined;
|
|
419
|
-
update: any;
|
|
420
427
|
model: string;
|
|
428
|
+
update: any;
|
|
421
429
|
} | {
|
|
422
430
|
where?: {
|
|
423
|
-
operator?: "in" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
424
431
|
connector?: "AND" | "OR" | undefined;
|
|
425
|
-
|
|
432
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
426
433
|
field: string;
|
|
434
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
427
435
|
}[] | undefined;
|
|
436
|
+
model: string;
|
|
428
437
|
update: {
|
|
429
438
|
[x: string]: unknown;
|
|
430
439
|
[x: number]: unknown;
|
|
431
440
|
[x: symbol]: unknown;
|
|
432
441
|
};
|
|
433
|
-
model: string;
|
|
434
|
-
};
|
|
435
|
-
paginationOpts: {
|
|
436
|
-
id?: number;
|
|
437
|
-
endCursor?: string | null;
|
|
438
|
-
maximumRowsRead?: number;
|
|
439
|
-
maximumBytesRead?: number;
|
|
440
|
-
numItems: number;
|
|
441
|
-
cursor: string | null;
|
|
442
442
|
};
|
|
443
443
|
}, Promise<{
|
|
444
444
|
count: number;
|
|
445
445
|
ids: any[];
|
|
446
446
|
isDone: boolean;
|
|
447
|
-
continueCursor:
|
|
448
|
-
splitCursor?:
|
|
447
|
+
continueCursor: convex_server24.Cursor;
|
|
448
|
+
splitCursor?: convex_server24.Cursor | null;
|
|
449
449
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
450
450
|
}>>;
|
|
451
|
-
updateOne:
|
|
451
|
+
updateOne: convex_server24.RegisteredMutation<"internal", {
|
|
452
452
|
beforeUpdateHandle?: string | undefined;
|
|
453
453
|
onUpdateHandle?: string | undefined;
|
|
454
454
|
input: {
|
|
455
455
|
where?: any[] | undefined;
|
|
456
|
-
update: any;
|
|
457
456
|
model: string;
|
|
457
|
+
update: any;
|
|
458
458
|
} | {
|
|
459
459
|
where?: {
|
|
460
|
-
operator?: "in" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
461
460
|
connector?: "AND" | "OR" | undefined;
|
|
462
|
-
|
|
461
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
463
462
|
field: string;
|
|
463
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
464
464
|
}[] | undefined;
|
|
465
|
+
model: string;
|
|
465
466
|
update: {
|
|
466
467
|
[x: string]: unknown;
|
|
467
468
|
[x: number]: unknown;
|
|
468
469
|
[x: symbol]: unknown;
|
|
469
470
|
};
|
|
470
|
-
model: string;
|
|
471
471
|
};
|
|
472
472
|
}, Promise<any>>;
|
|
473
|
-
getLatestJwks:
|
|
474
|
-
rotateKeys:
|
|
473
|
+
getLatestJwks: convex_server24.RegisteredAction<"internal", {}, Promise<any>>;
|
|
474
|
+
rotateKeys: convex_server24.RegisteredAction<"internal", {}, Promise<any>>;
|
|
475
475
|
};
|
|
476
476
|
//#endregion
|
|
477
477
|
//#region src/auth/helpers.d.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { AuthClient } from "@convex-dev/better-auth/react";
|
|
3
2
|
import { ConvexReactClient } from "convex/react";
|
|
4
3
|
import { ReactNode } from "react";
|
|
5
4
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import { AuthClient, AuthClient as AuthClient$1 } from "@convex-dev/better-auth/react";
|
|
6
6
|
|
|
7
7
|
//#region src/auth-client/convex-auth-provider.d.ts
|
|
8
8
|
type ConvexAuthProviderProps = {
|
|
@@ -10,7 +10,7 @@ type ConvexAuthProviderProps = {
|
|
|
10
10
|
/** Convex client instance */
|
|
11
11
|
client: ConvexReactClient;
|
|
12
12
|
/** Better Auth client instance */
|
|
13
|
-
authClient: AuthClient;
|
|
13
|
+
authClient: AuthClient$1;
|
|
14
14
|
/** Initial session token (from SSR) */
|
|
15
15
|
initialToken?: string;
|
|
16
16
|
/** Callback when mutation called while unauthorized */
|
|
@@ -21,8 +21,8 @@ type ConvexAuthProviderProps = {
|
|
|
21
21
|
}) => void;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
24
|
+
* Unified auth provider for Convex + Better Auth.
|
|
25
|
+
* Handles token sync, HMR persistence, and auth callbacks.
|
|
26
26
|
*/
|
|
27
27
|
declare function ConvexAuthProvider({
|
|
28
28
|
children,
|
|
@@ -33,4 +33,4 @@ declare function ConvexAuthProvider({
|
|
|
33
33
|
onQueryUnauthorized
|
|
34
34
|
}: ConvexAuthProviderProps): react_jsx_runtime0.JSX.Element;
|
|
35
35
|
//#endregion
|
|
36
|
-
export { ConvexAuthProvider, ConvexAuthProviderProps };
|
|
36
|
+
export { type AuthClient, ConvexAuthProvider, ConvexAuthProviderProps };
|