@convex-dev/sharded-counter 0.1.8 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -41
- package/dist/{commonjs/client → client}/index.d.ts +24 -33
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js.map +1 -0
- package/dist/component/_generated/api.d.ts +34 -0
- package/dist/component/_generated/api.d.ts.map +1 -0
- package/{src → dist}/component/_generated/api.js +11 -3
- package/dist/component/_generated/api.js.map +1 -0
- package/dist/component/_generated/component.d.ts +46 -0
- package/dist/component/_generated/component.d.ts.map +1 -0
- package/dist/component/_generated/component.js +11 -0
- package/dist/component/_generated/component.js.map +1 -0
- package/dist/component/_generated/dataModel.d.ts +46 -0
- package/dist/component/_generated/dataModel.d.ts.map +1 -0
- package/dist/component/_generated/dataModel.js +11 -0
- package/dist/component/_generated/dataModel.js.map +1 -0
- package/{src → dist}/component/_generated/server.d.ts +10 -38
- package/dist/component/_generated/server.d.ts.map +1 -0
- package/dist/{esm/component → component}/_generated/server.js +9 -5
- package/dist/component/_generated/server.js.map +1 -0
- package/dist/component/convex.config.d.ts.map +1 -0
- package/dist/component/convex.config.js.map +1 -0
- package/dist/{commonjs/component → component}/public.d.ts +1 -1
- package/dist/component/public.d.ts.map +1 -0
- package/dist/{commonjs/component → component}/public.js +4 -4
- package/dist/component/public.js.map +1 -0
- package/dist/{commonjs/component → component}/schema.d.ts +2 -2
- package/dist/component/schema.d.ts.map +1 -0
- package/dist/component/schema.js.map +1 -0
- package/package.json +61 -38
- package/src/client/index.ts +45 -58
- package/src/component/_generated/api.ts +50 -0
- package/src/component/_generated/component.ts +63 -0
- package/src/component/_generated/{dataModel.d.ts → dataModel.ts} +1 -1
- package/src/component/_generated/server.ts +156 -0
- package/src/component/counter.test.ts +12 -9
- package/src/component/public.ts +4 -4
- package/src/test.ts +18 -0
- package/dist/commonjs/client/index.d.ts.map +0 -1
- package/dist/commonjs/client/index.js.map +0 -1
- package/dist/commonjs/component/_generated/api.d.ts +0 -14
- package/dist/commonjs/component/_generated/api.d.ts.map +0 -1
- package/dist/commonjs/component/_generated/api.js +0 -22
- package/dist/commonjs/component/_generated/api.js.map +0 -1
- package/dist/commonjs/component/_generated/server.d.ts +0 -64
- package/dist/commonjs/component/_generated/server.d.ts.map +0 -1
- package/dist/commonjs/component/_generated/server.js +0 -74
- package/dist/commonjs/component/_generated/server.js.map +0 -1
- package/dist/commonjs/component/convex.config.d.ts.map +0 -1
- package/dist/commonjs/component/convex.config.js.map +0 -1
- package/dist/commonjs/component/public.d.ts.map +0 -1
- package/dist/commonjs/component/public.js.map +0 -1
- package/dist/commonjs/component/schema.d.ts.map +0 -1
- package/dist/commonjs/component/schema.js.map +0 -1
- package/dist/commonjs/package.json +0 -3
- package/dist/esm/client/index.d.ts +0 -178
- package/dist/esm/client/index.d.ts.map +0 -1
- package/dist/esm/client/index.js +0 -193
- package/dist/esm/client/index.js.map +0 -1
- package/dist/esm/component/_generated/api.d.ts +0 -14
- package/dist/esm/component/_generated/api.d.ts.map +0 -1
- package/dist/esm/component/_generated/api.js +0 -22
- package/dist/esm/component/_generated/api.js.map +0 -1
- package/dist/esm/component/_generated/server.d.ts +0 -64
- package/dist/esm/component/_generated/server.d.ts.map +0 -1
- package/dist/esm/component/_generated/server.js.map +0 -1
- package/dist/esm/component/convex.config.d.ts +0 -3
- package/dist/esm/component/convex.config.d.ts.map +0 -1
- package/dist/esm/component/convex.config.js +0 -3
- package/dist/esm/component/convex.config.js.map +0 -1
- package/dist/esm/component/public.d.ts +0 -23
- package/dist/esm/component/public.d.ts.map +0 -1
- package/dist/esm/component/public.js +0 -115
- package/dist/esm/component/public.js.map +0 -1
- package/dist/esm/component/schema.d.ts +0 -15
- package/dist/esm/component/schema.d.ts.map +0 -1
- package/dist/esm/component/schema.js +0 -10
- package/dist/esm/component/schema.js.map +0 -1
- package/dist/esm/package.json +0 -3
- package/src/component/_generated/api.d.ts +0 -67
- package/src/component/_generated/server.js +0 -90
- /package/dist/{commonjs/client → client}/index.js +0 -0
- /package/dist/{commonjs/component → component}/convex.config.d.ts +0 -0
- /package/dist/{commonjs/component → component}/convex.config.js +0 -0
- /package/dist/{commonjs/component → component}/schema.js +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Generated `api` utility.
|
|
4
|
+
*
|
|
5
|
+
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate, run `npx convex dev`.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type * as public_ from "../public.js";
|
|
12
|
+
|
|
13
|
+
import type {
|
|
14
|
+
ApiFromModules,
|
|
15
|
+
FilterApi,
|
|
16
|
+
FunctionReference,
|
|
17
|
+
} from "convex/server";
|
|
18
|
+
import { anyApi, componentsGeneric } from "convex/server";
|
|
19
|
+
|
|
20
|
+
const fullApi: ApiFromModules<{
|
|
21
|
+
public: typeof public_;
|
|
22
|
+
}> = anyApi as any;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A utility for referencing Convex functions in your app's public API.
|
|
26
|
+
*
|
|
27
|
+
* Usage:
|
|
28
|
+
* ```js
|
|
29
|
+
* const myFunctionReference = api.myModule.myFunction;
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export const api: FilterApi<
|
|
33
|
+
typeof fullApi,
|
|
34
|
+
FunctionReference<any, "public">
|
|
35
|
+
> = anyApi as any;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A utility for referencing Convex functions in your app's internal API.
|
|
39
|
+
*
|
|
40
|
+
* Usage:
|
|
41
|
+
* ```js
|
|
42
|
+
* const myFunctionReference = internal.myModule.myFunction;
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export const internal: FilterApi<
|
|
46
|
+
typeof fullApi,
|
|
47
|
+
FunctionReference<any, "internal">
|
|
48
|
+
> = anyApi as any;
|
|
49
|
+
|
|
50
|
+
export const components = componentsGeneric() as unknown as {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Generated `ComponentApi` utility.
|
|
4
|
+
*
|
|
5
|
+
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate, run `npx convex dev`.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { FunctionReference } from "convex/server";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A utility for referencing a Convex component's exposed API.
|
|
15
|
+
*
|
|
16
|
+
* Useful when expecting a parameter like `components.myComponent`.
|
|
17
|
+
* Usage:
|
|
18
|
+
* ```ts
|
|
19
|
+
* async function myFunction(ctx: QueryCtx, component: ComponentApi) {
|
|
20
|
+
* return ctx.runQuery(component.someFile.someQuery, { ...args });
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
25
|
+
{
|
|
26
|
+
public: {
|
|
27
|
+
add: FunctionReference<
|
|
28
|
+
"mutation",
|
|
29
|
+
"internal",
|
|
30
|
+
{ count: number; name: string; shard?: number; shards?: number },
|
|
31
|
+
number,
|
|
32
|
+
Name
|
|
33
|
+
>;
|
|
34
|
+
count: FunctionReference<
|
|
35
|
+
"query",
|
|
36
|
+
"internal",
|
|
37
|
+
{ name: string },
|
|
38
|
+
number,
|
|
39
|
+
Name
|
|
40
|
+
>;
|
|
41
|
+
estimateCount: FunctionReference<
|
|
42
|
+
"query",
|
|
43
|
+
"internal",
|
|
44
|
+
{ name: string; readFromShards?: number; shards?: number },
|
|
45
|
+
any,
|
|
46
|
+
Name
|
|
47
|
+
>;
|
|
48
|
+
rebalance: FunctionReference<
|
|
49
|
+
"mutation",
|
|
50
|
+
"internal",
|
|
51
|
+
{ name: string; shards?: number },
|
|
52
|
+
any,
|
|
53
|
+
Name
|
|
54
|
+
>;
|
|
55
|
+
reset: FunctionReference<
|
|
56
|
+
"mutation",
|
|
57
|
+
"internal",
|
|
58
|
+
{ name: string },
|
|
59
|
+
any,
|
|
60
|
+
Name
|
|
61
|
+
>;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -38,7 +38,7 @@ export type Doc<TableName extends TableNames> = DocumentByName<
|
|
|
38
38
|
* Convex documents are uniquely identified by their `Id`, which is accessible
|
|
39
39
|
* on the `_id` field. To learn more, see [Document IDs](https://docs.convex.dev/using/document-ids).
|
|
40
40
|
*
|
|
41
|
-
* Documents can be loaded using `db.get(id)` in query and mutation functions.
|
|
41
|
+
* Documents can be loaded using `db.get(tableName, id)` in query and mutation functions.
|
|
42
42
|
*
|
|
43
43
|
* IDs are just strings at runtime, but this type can be used to distinguish them from other
|
|
44
44
|
* strings when type checking.
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Generated utilities for implementing server-side Convex query and mutation functions.
|
|
4
|
+
*
|
|
5
|
+
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate, run `npx convex dev`.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type {
|
|
12
|
+
ActionBuilder,
|
|
13
|
+
HttpActionBuilder,
|
|
14
|
+
MutationBuilder,
|
|
15
|
+
QueryBuilder,
|
|
16
|
+
GenericActionCtx,
|
|
17
|
+
GenericMutationCtx,
|
|
18
|
+
GenericQueryCtx,
|
|
19
|
+
GenericDatabaseReader,
|
|
20
|
+
GenericDatabaseWriter,
|
|
21
|
+
} from "convex/server";
|
|
22
|
+
import {
|
|
23
|
+
actionGeneric,
|
|
24
|
+
httpActionGeneric,
|
|
25
|
+
queryGeneric,
|
|
26
|
+
mutationGeneric,
|
|
27
|
+
internalActionGeneric,
|
|
28
|
+
internalMutationGeneric,
|
|
29
|
+
internalQueryGeneric,
|
|
30
|
+
} from "convex/server";
|
|
31
|
+
import type { DataModel } from "./dataModel.js";
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Define a query in this Convex app's public API.
|
|
35
|
+
*
|
|
36
|
+
* This function will be allowed to read your Convex database and will be accessible from the client.
|
|
37
|
+
*
|
|
38
|
+
* @param func - The query function. It receives a {@link QueryCtx} as its first argument.
|
|
39
|
+
* @returns The wrapped query. Include this as an `export` to name it and make it accessible.
|
|
40
|
+
*/
|
|
41
|
+
export const query: QueryBuilder<DataModel, "public"> = queryGeneric;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Define a query that is only accessible from other Convex functions (but not from the client).
|
|
45
|
+
*
|
|
46
|
+
* This function will be allowed to read from your Convex database. It will not be accessible from the client.
|
|
47
|
+
*
|
|
48
|
+
* @param func - The query function. It receives a {@link QueryCtx} as its first argument.
|
|
49
|
+
* @returns The wrapped query. Include this as an `export` to name it and make it accessible.
|
|
50
|
+
*/
|
|
51
|
+
export const internalQuery: QueryBuilder<DataModel, "internal"> =
|
|
52
|
+
internalQueryGeneric;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Define a mutation in this Convex app's public API.
|
|
56
|
+
*
|
|
57
|
+
* This function will be allowed to modify your Convex database and will be accessible from the client.
|
|
58
|
+
*
|
|
59
|
+
* @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
|
|
60
|
+
* @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
|
|
61
|
+
*/
|
|
62
|
+
export const mutation: MutationBuilder<DataModel, "public"> = mutationGeneric;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Define a mutation that is only accessible from other Convex functions (but not from the client).
|
|
66
|
+
*
|
|
67
|
+
* This function will be allowed to modify your Convex database. It will not be accessible from the client.
|
|
68
|
+
*
|
|
69
|
+
* @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
|
|
70
|
+
* @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
|
|
71
|
+
*/
|
|
72
|
+
export const internalMutation: MutationBuilder<DataModel, "internal"> =
|
|
73
|
+
internalMutationGeneric;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Define an action in this Convex app's public API.
|
|
77
|
+
*
|
|
78
|
+
* An action is a function which can execute any JavaScript code, including non-deterministic
|
|
79
|
+
* code and code with side-effects, like calling third-party services.
|
|
80
|
+
* They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive.
|
|
81
|
+
* They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}.
|
|
82
|
+
*
|
|
83
|
+
* @param func - The action. It receives an {@link ActionCtx} as its first argument.
|
|
84
|
+
* @returns The wrapped action. Include this as an `export` to name it and make it accessible.
|
|
85
|
+
*/
|
|
86
|
+
export const action: ActionBuilder<DataModel, "public"> = actionGeneric;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Define an action that is only accessible from other Convex functions (but not from the client).
|
|
90
|
+
*
|
|
91
|
+
* @param func - The function. It receives an {@link ActionCtx} as its first argument.
|
|
92
|
+
* @returns The wrapped function. Include this as an `export` to name it and make it accessible.
|
|
93
|
+
*/
|
|
94
|
+
export const internalAction: ActionBuilder<DataModel, "internal"> =
|
|
95
|
+
internalActionGeneric;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Define an HTTP action.
|
|
99
|
+
*
|
|
100
|
+
* The wrapped function will be used to respond to HTTP requests received
|
|
101
|
+
* by a Convex deployment if the requests matches the path and method where
|
|
102
|
+
* this action is routed. Be sure to route your httpAction in `convex/http.js`.
|
|
103
|
+
*
|
|
104
|
+
* @param func - The function. It receives an {@link ActionCtx} as its first argument
|
|
105
|
+
* and a Fetch API `Request` object as its second.
|
|
106
|
+
* @returns The wrapped function. Import this function from `convex/http.js` and route it to hook it up.
|
|
107
|
+
*/
|
|
108
|
+
export const httpAction: HttpActionBuilder = httpActionGeneric;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* A set of services for use within Convex query functions.
|
|
112
|
+
*
|
|
113
|
+
* The query context is passed as the first argument to any Convex query
|
|
114
|
+
* function run on the server.
|
|
115
|
+
*
|
|
116
|
+
* If you're using code generation, use the `QueryCtx` type in `convex/_generated/server.d.ts` instead.
|
|
117
|
+
*/
|
|
118
|
+
export type QueryCtx = GenericQueryCtx<DataModel>;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* A set of services for use within Convex mutation functions.
|
|
122
|
+
*
|
|
123
|
+
* The mutation context is passed as the first argument to any Convex mutation
|
|
124
|
+
* function run on the server.
|
|
125
|
+
*
|
|
126
|
+
* If you're using code generation, use the `MutationCtx` type in `convex/_generated/server.d.ts` instead.
|
|
127
|
+
*/
|
|
128
|
+
export type MutationCtx = GenericMutationCtx<DataModel>;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* A set of services for use within Convex action functions.
|
|
132
|
+
*
|
|
133
|
+
* The action context is passed as the first argument to any Convex action
|
|
134
|
+
* function run on the server.
|
|
135
|
+
*/
|
|
136
|
+
export type ActionCtx = GenericActionCtx<DataModel>;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* An interface to read from the database within Convex query functions.
|
|
140
|
+
*
|
|
141
|
+
* The two entry points are {@link DatabaseReader.get}, which fetches a single
|
|
142
|
+
* document by its {@link Id}, or {@link DatabaseReader.query}, which starts
|
|
143
|
+
* building a query.
|
|
144
|
+
*/
|
|
145
|
+
export type DatabaseReader = GenericDatabaseReader<DataModel>;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* An interface to read from and write to the database within Convex mutation
|
|
149
|
+
* functions.
|
|
150
|
+
*
|
|
151
|
+
* Convex guarantees that all writes within a single mutation are
|
|
152
|
+
* executed atomically, so you never have to worry about partial writes leaving
|
|
153
|
+
* your data in an inconsistent state. See [the Convex Guide](https://docs.convex.dev/understanding/convex-fundamentals/functions#atomicity-and-optimistic-concurrency-control)
|
|
154
|
+
* for the guarantees Convex provides your functions.
|
|
155
|
+
*/
|
|
156
|
+
export type DatabaseWriter = GenericDatabaseWriter<DataModel>;
|
|
@@ -47,15 +47,18 @@ describe("counter", () => {
|
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
fcTest.prop(
|
|
51
|
-
|
|
52
|
-
fc.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
fcTest.prop(
|
|
51
|
+
{
|
|
52
|
+
updates: fc.array(
|
|
53
|
+
fc.record({
|
|
54
|
+
v: fc.integer({ min: -10000, max: 10000 }).map((i) => i / 100),
|
|
55
|
+
key: fc.string(),
|
|
56
|
+
shards: fc.option(fc.integer({ min: 1, max: 100 })),
|
|
57
|
+
}),
|
|
58
|
+
),
|
|
59
|
+
},
|
|
60
|
+
{ numRuns: 10 },
|
|
61
|
+
)(
|
|
59
62
|
"updates to counter should match in-memory counter which ignores sharding",
|
|
60
63
|
async ({ updates }) => {
|
|
61
64
|
const t = convexTest(schema, modules);
|
package/src/component/public.ts
CHANGED
|
@@ -20,7 +20,7 @@ export const add = mutation({
|
|
|
20
20
|
.withIndex("name", (q) => q.eq("name", args.name).eq("shard", shard))
|
|
21
21
|
.unique();
|
|
22
22
|
if (counter) {
|
|
23
|
-
await ctx.db.patch(counter._id, {
|
|
23
|
+
await ctx.db.patch("counters", counter._id, {
|
|
24
24
|
value: counter.value + args.count,
|
|
25
25
|
});
|
|
26
26
|
} else {
|
|
@@ -59,7 +59,7 @@ export const rebalance = mutation({
|
|
|
59
59
|
for (let i = 0; i < shardCount; i++) {
|
|
60
60
|
const shard = counters.find((c) => c.shard === i);
|
|
61
61
|
if (shard) {
|
|
62
|
-
await ctx.db.patch(shard._id, { value });
|
|
62
|
+
await ctx.db.patch("counters", shard._id, { value });
|
|
63
63
|
} else {
|
|
64
64
|
await ctx.db.insert("counters", {
|
|
65
65
|
name: args.name,
|
|
@@ -70,7 +70,7 @@ export const rebalance = mutation({
|
|
|
70
70
|
}
|
|
71
71
|
const toDelete = counters.filter((c) => c.shard >= shardCount);
|
|
72
72
|
for (const counter of toDelete) {
|
|
73
|
-
await ctx.db.delete(counter._id);
|
|
73
|
+
await ctx.db.delete("counters", counter._id);
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
});
|
|
@@ -83,7 +83,7 @@ export const reset = mutation({
|
|
|
83
83
|
.withIndex("name", (q) => q.eq("name", args.name))
|
|
84
84
|
.collect()
|
|
85
85
|
.then((counters) =>
|
|
86
|
-
Promise.all(counters.map((c) => ctx.db.delete(c._id))),
|
|
86
|
+
Promise.all(counters.map((c) => ctx.db.delete("counters", c._id))),
|
|
87
87
|
);
|
|
88
88
|
},
|
|
89
89
|
});
|
package/src/test.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
import type { TestConvex } from "convex-test";
|
|
3
|
+
import type { GenericSchema, SchemaDefinition } from "convex/server";
|
|
4
|
+
import schema from "./component/schema.js";
|
|
5
|
+
const modules = import.meta.glob("./component/**/*.ts");
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Register the component with the test convex instance.
|
|
9
|
+
* @param t - The test convex instance, e.g. from calling `convexTest`.
|
|
10
|
+
* @param name - The name of the component, as registered in convex.config.ts.
|
|
11
|
+
*/
|
|
12
|
+
export function register(
|
|
13
|
+
t: TestConvex<SchemaDefinition<GenericSchema, boolean>>,
|
|
14
|
+
name: string = "shardedCounter",
|
|
15
|
+
) {
|
|
16
|
+
t.registerComponent(name, schema, modules);
|
|
17
|
+
}
|
|
18
|
+
export default { register, schema, modules };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,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IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;aAC3B;iBAAM,IAAI,MAAM,CAAC,SAAS,KAAK,QAAQ,EAAE;gBACxC,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;aAC3B;QACH,CAAC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A utility for referencing Convex functions in your app's API.
|
|
3
|
-
*
|
|
4
|
-
* Usage:
|
|
5
|
-
* ```js
|
|
6
|
-
* const myFunctionReference = api.myModule.myFunction;
|
|
7
|
-
* ```
|
|
8
|
-
*/
|
|
9
|
-
export const api: import("convex/server").AnyApi;
|
|
10
|
-
export const internal: import("convex/server").AnyApi;
|
|
11
|
-
export const components: {
|
|
12
|
-
[x: string]: import("../../../node_modules/convex/dist/esm-types/server/components").AnyComponentReference;
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=api.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/component/_generated/api.js"],"names":[],"mappings":"AAYA;;;;;;;GAOG;AACH,iDAA0B;AAC1B,sDAA+B;AAC/B;;EAA8C"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/**
|
|
3
|
-
* Generated `api` utility.
|
|
4
|
-
*
|
|
5
|
-
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
-
*
|
|
7
|
-
* To regenerate, run `npx convex dev`.
|
|
8
|
-
* @module
|
|
9
|
-
*/
|
|
10
|
-
import { anyApi, componentsGeneric } from "convex/server";
|
|
11
|
-
/**
|
|
12
|
-
* A utility for referencing Convex functions in your app's API.
|
|
13
|
-
*
|
|
14
|
-
* Usage:
|
|
15
|
-
* ```js
|
|
16
|
-
* const myFunctionReference = api.myModule.myFunction;
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export const api = anyApi;
|
|
20
|
-
export const internal = anyApi;
|
|
21
|
-
export const components = componentsGeneric();
|
|
22
|
-
//# sourceMappingURL=api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/component/_generated/api.js"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE1D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC;AAC1B,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC;AAC/B,MAAM,CAAC,MAAM,UAAU,GAAG,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Define a query in this Convex app's public API.
|
|
3
|
-
*
|
|
4
|
-
* This function will be allowed to read your Convex database and will be accessible from the client.
|
|
5
|
-
*
|
|
6
|
-
* @param func - The query function. It receives a {@link QueryCtx} as its first argument.
|
|
7
|
-
* @returns The wrapped query. Include this as an `export` to name it and make it accessible.
|
|
8
|
-
*/
|
|
9
|
-
export const query: import("convex/server").QueryBuilder<any, "public">;
|
|
10
|
-
/**
|
|
11
|
-
* Define a query that is only accessible from other Convex functions (but not from the client).
|
|
12
|
-
*
|
|
13
|
-
* This function will be allowed to read from your Convex database. It will not be accessible from the client.
|
|
14
|
-
*
|
|
15
|
-
* @param func - The query function. It receives a {@link QueryCtx} as its first argument.
|
|
16
|
-
* @returns The wrapped query. Include this as an `export` to name it and make it accessible.
|
|
17
|
-
*/
|
|
18
|
-
export const internalQuery: import("convex/server").QueryBuilder<any, "internal">;
|
|
19
|
-
/**
|
|
20
|
-
* Define a mutation in this Convex app's public API.
|
|
21
|
-
*
|
|
22
|
-
* This function will be allowed to modify your Convex database and will be accessible from the client.
|
|
23
|
-
*
|
|
24
|
-
* @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
|
|
25
|
-
* @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
|
|
26
|
-
*/
|
|
27
|
-
export const mutation: import("convex/server").MutationBuilder<any, "public">;
|
|
28
|
-
/**
|
|
29
|
-
* Define a mutation that is only accessible from other Convex functions (but not from the client).
|
|
30
|
-
*
|
|
31
|
-
* This function will be allowed to modify your Convex database. It will not be accessible from the client.
|
|
32
|
-
*
|
|
33
|
-
* @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
|
|
34
|
-
* @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
|
|
35
|
-
*/
|
|
36
|
-
export const internalMutation: import("convex/server").MutationBuilder<any, "internal">;
|
|
37
|
-
/**
|
|
38
|
-
* Define an action in this Convex app's public API.
|
|
39
|
-
*
|
|
40
|
-
* An action is a function which can execute any JavaScript code, including non-deterministic
|
|
41
|
-
* code and code with side-effects, like calling third-party services.
|
|
42
|
-
* They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive.
|
|
43
|
-
* They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}.
|
|
44
|
-
*
|
|
45
|
-
* @param func - The action. It receives an {@link ActionCtx} as its first argument.
|
|
46
|
-
* @returns The wrapped action. Include this as an `export` to name it and make it accessible.
|
|
47
|
-
*/
|
|
48
|
-
export const action: import("convex/server").ActionBuilder<any, "public">;
|
|
49
|
-
/**
|
|
50
|
-
* Define an action that is only accessible from other Convex functions (but not from the client).
|
|
51
|
-
*
|
|
52
|
-
* @param func - The function. It receives an {@link ActionCtx} as its first argument.
|
|
53
|
-
* @returns The wrapped function. Include this as an `export` to name it and make it accessible.
|
|
54
|
-
*/
|
|
55
|
-
export const internalAction: import("convex/server").ActionBuilder<any, "internal">;
|
|
56
|
-
/**
|
|
57
|
-
* Define a Convex HTTP action.
|
|
58
|
-
*
|
|
59
|
-
* @param func - The function. It receives an {@link ActionCtx} as its first argument, and a `Request` object
|
|
60
|
-
* as its second.
|
|
61
|
-
* @returns The wrapped endpoint function. Route a URL path to this function in `convex/http.js`.
|
|
62
|
-
*/
|
|
63
|
-
export const httpAction: (func: (ctx: import("convex/server").GenericActionCtx<import("convex/server").GenericDataModel>, request: Request) => Promise<Response>) => import("convex/server").PublicHttpAction;
|
|
64
|
-
//# sourceMappingURL=server.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/component/_generated/server.js"],"names":[],"mappings":"AAqBA;;;;;;;GAOG;AACH,wEAAkC;AAElC;;;;;;;GAOG;AACH,kFAAkD;AAElD;;;;;;;GAOG;AACH,8EAAwC;AAExC;;;;;;;GAOG;AACH,wFAAwD;AAExD;;;;;;;;;;GAUG;AACH,0EAAoC;AAEpC;;;;;GAKG;AACH,oFAAoD;AAEpD;;;;;;GAMG;AACH,8MAA4C"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/**
|
|
3
|
-
* Generated utilities for implementing server-side Convex query and mutation functions.
|
|
4
|
-
*
|
|
5
|
-
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
-
*
|
|
7
|
-
* To regenerate, run `npx convex dev`.
|
|
8
|
-
* @module
|
|
9
|
-
*/
|
|
10
|
-
import { actionGeneric, httpActionGeneric, queryGeneric, mutationGeneric, internalActionGeneric, internalMutationGeneric, internalQueryGeneric, componentsGeneric, } from "convex/server";
|
|
11
|
-
/**
|
|
12
|
-
* Define a query in this Convex app's public API.
|
|
13
|
-
*
|
|
14
|
-
* This function will be allowed to read your Convex database and will be accessible from the client.
|
|
15
|
-
*
|
|
16
|
-
* @param func - The query function. It receives a {@link QueryCtx} as its first argument.
|
|
17
|
-
* @returns The wrapped query. Include this as an `export` to name it and make it accessible.
|
|
18
|
-
*/
|
|
19
|
-
export const query = queryGeneric;
|
|
20
|
-
/**
|
|
21
|
-
* Define a query that is only accessible from other Convex functions (but not from the client).
|
|
22
|
-
*
|
|
23
|
-
* This function will be allowed to read from your Convex database. It will not be accessible from the client.
|
|
24
|
-
*
|
|
25
|
-
* @param func - The query function. It receives a {@link QueryCtx} as its first argument.
|
|
26
|
-
* @returns The wrapped query. Include this as an `export` to name it and make it accessible.
|
|
27
|
-
*/
|
|
28
|
-
export const internalQuery = internalQueryGeneric;
|
|
29
|
-
/**
|
|
30
|
-
* Define a mutation in this Convex app's public API.
|
|
31
|
-
*
|
|
32
|
-
* This function will be allowed to modify your Convex database and will be accessible from the client.
|
|
33
|
-
*
|
|
34
|
-
* @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
|
|
35
|
-
* @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
|
|
36
|
-
*/
|
|
37
|
-
export const mutation = mutationGeneric;
|
|
38
|
-
/**
|
|
39
|
-
* Define a mutation that is only accessible from other Convex functions (but not from the client).
|
|
40
|
-
*
|
|
41
|
-
* This function will be allowed to modify your Convex database. It will not be accessible from the client.
|
|
42
|
-
*
|
|
43
|
-
* @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
|
|
44
|
-
* @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
|
|
45
|
-
*/
|
|
46
|
-
export const internalMutation = internalMutationGeneric;
|
|
47
|
-
/**
|
|
48
|
-
* Define an action in this Convex app's public API.
|
|
49
|
-
*
|
|
50
|
-
* An action is a function which can execute any JavaScript code, including non-deterministic
|
|
51
|
-
* code and code with side-effects, like calling third-party services.
|
|
52
|
-
* They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive.
|
|
53
|
-
* They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}.
|
|
54
|
-
*
|
|
55
|
-
* @param func - The action. It receives an {@link ActionCtx} as its first argument.
|
|
56
|
-
* @returns The wrapped action. Include this as an `export` to name it and make it accessible.
|
|
57
|
-
*/
|
|
58
|
-
export const action = actionGeneric;
|
|
59
|
-
/**
|
|
60
|
-
* Define an action that is only accessible from other Convex functions (but not from the client).
|
|
61
|
-
*
|
|
62
|
-
* @param func - The function. It receives an {@link ActionCtx} as its first argument.
|
|
63
|
-
* @returns The wrapped function. Include this as an `export` to name it and make it accessible.
|
|
64
|
-
*/
|
|
65
|
-
export const internalAction = internalActionGeneric;
|
|
66
|
-
/**
|
|
67
|
-
* Define a Convex HTTP action.
|
|
68
|
-
*
|
|
69
|
-
* @param func - The function. It receives an {@link ActionCtx} as its first argument, and a `Request` object
|
|
70
|
-
* as its second.
|
|
71
|
-
* @returns The wrapped endpoint function. Route a URL path to this function in `convex/http.js`.
|
|
72
|
-
*/
|
|
73
|
-
export const httpAction = httpActionGeneric;
|
|
74
|
-
//# sourceMappingURL=server.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../src/component/_generated/server.js"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;;;;;GAOG;AAEH,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AAEvB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,YAAY,CAAC;AAElC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAExD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convex.config.d.ts","sourceRoot":"","sources":["../../../src/component/convex.config.ts"],"names":[],"mappings":";AAEA,wBAAiD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convex.config.js","sourceRoot":"","sources":["../../../src/component/convex.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAe,eAAe,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/component/public.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,GAAG;;;;;mBA6Bd,CAAC;AAEH,eAAO,MAAM,KAAK;;mBAUhB,CAAC;AAEH,eAAO,MAAM,SAAS;;;iBA2BpB,CAAC;AAEH,eAAO,MAAM,KAAK;;iBAWhB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;mBA2BxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/component/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAEtC,MAAM,CAAC,MAAM,GAAG,GAAG,QAAQ,CAAC;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QAC7B,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KAC/B;IACD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE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vB,SAAS,OAAO,CAAI,KAAU;IAC5B,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACzC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC9C,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7C;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAGA,wBAMG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,eAAe,YAAY,CAAC;IAC1B,QAAQ,EAAE,WAAW,CAAC;QACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KAClB,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,CAAC,CAAC"}
|