@convex-dev/crons 0.1.8 → 0.2.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/README.md +18 -16
- package/dist/{commonjs/client → client}/index.d.ts +5 -5
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/utils.d.ts +8 -0
- package/dist/client/utils.d.ts.map +1 -0
- package/dist/client/utils.js +2 -0
- package/dist/{commonjs/client → client}/utils.js.map +1 -1
- 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 -7
- package/dist/component/_generated/api.js.map +1 -0
- package/dist/component/_generated/component.d.ts +79 -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 -42
- package/dist/component/_generated/server.d.ts.map +1 -0
- package/dist/{commonjs/component → component}/_generated/server.js +9 -7
- 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 +6 -2
- package/dist/component/public.d.ts.map +1 -0
- package/dist/{commonjs/component → component}/public.js +2 -1
- package/dist/component/public.js.map +1 -0
- package/dist/{commonjs/component → component}/schema.d.ts +7 -3
- package/dist/component/schema.d.ts.map +1 -0
- package/dist/{commonjs/component → component}/schema.js +3 -2
- package/dist/component/schema.js.map +1 -0
- package/package.json +63 -43
- package/src/client/index.ts +10 -10
- package/src/client/utils.ts +0 -32
- package/src/component/_generated/api.ts +50 -0
- package/src/component/_generated/component.ts +79 -0
- package/src/component/_generated/{dataModel.d.ts → dataModel.ts} +0 -4
- package/src/component/_generated/server.ts +161 -0
- package/src/component/public.ts +14 -12
- package/src/component/schema.ts +2 -1
- 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/client/utils.d.ts +0 -15
- package/dist/commonjs/client/utils.d.ts.map +0 -1
- package/dist/commonjs/client/utils.js +0 -3
- 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 -24
- 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.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 -89
- package/dist/esm/client/index.d.ts.map +0 -1
- package/dist/esm/client/index.js +0 -104
- package/dist/esm/client/index.js.map +0 -1
- package/dist/esm/client/utils.d.ts +0 -15
- package/dist/esm/client/utils.d.ts.map +0 -1
- package/dist/esm/client/utils.js +0 -3
- package/dist/esm/client/utils.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 -24
- 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 +0 -76
- 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 -115
- package/dist/esm/component/public.d.ts.map +0 -1
- package/dist/esm/component/public.js +0 -225
- package/dist/esm/component/public.js.map +0 -1
- package/dist/esm/component/schema.d.ts +0 -45
- package/dist/esm/component/schema.d.ts.map +0 -1
- package/dist/esm/component/schema.js +0 -20
- package/dist/esm/component/schema.js.map +0 -1
- package/dist/esm/package.json +0 -3
- package/src/component/_generated/api.d.ts +0 -98
- package/src/component/_generated/server.js +0 -94
- /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/src/component/public.ts
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
//
|
|
3
3
|
// See ../client/index.ts for the public API.
|
|
4
4
|
|
|
5
|
-
import { FunctionHandle } from "convex/server";
|
|
5
|
+
import type { FunctionHandle } from "convex/server";
|
|
6
6
|
import { v } from "convex/values";
|
|
7
7
|
import {
|
|
8
|
-
MutationCtx,
|
|
8
|
+
type MutationCtx,
|
|
9
9
|
mutation,
|
|
10
10
|
query,
|
|
11
11
|
internalMutation,
|
|
12
12
|
} from "./_generated/server.js";
|
|
13
13
|
import { internal } from "./_generated/api.js";
|
|
14
|
-
import { Doc, Id } from "./_generated/dataModel.js";
|
|
14
|
+
import type { Doc, Id } from "./_generated/dataModel.js";
|
|
15
15
|
import parser from "cron-parser";
|
|
16
16
|
import schema from "./schema.js";
|
|
17
17
|
|
|
@@ -35,6 +35,7 @@ export type Schedule =
|
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
cronspec: string;
|
|
38
|
+
tz?: string; // Optional timezone, e.g. "America/New_York".
|
|
38
39
|
}
|
|
39
40
|
| {
|
|
40
41
|
/** A schedule using an interval in milliseconds. */
|
|
@@ -98,7 +99,7 @@ export const register = mutation({
|
|
|
98
99
|
schedule,
|
|
99
100
|
});
|
|
100
101
|
console.log(
|
|
101
|
-
`Scheduling cron "${name}" (${id}) on schedule ${JSON.stringify(schedule)}
|
|
102
|
+
`Scheduling cron "${name}" (${id}) on schedule ${JSON.stringify(schedule)}`,
|
|
102
103
|
);
|
|
103
104
|
|
|
104
105
|
await scheduleNextRun(ctx, id, new Date(), schedule);
|
|
@@ -112,7 +113,7 @@ function validateSchedule(schedule: Schedule) {
|
|
|
112
113
|
}
|
|
113
114
|
if (schedule.kind === "cron") {
|
|
114
115
|
try {
|
|
115
|
-
parser.parseExpression(schedule.cronspec);
|
|
116
|
+
parser.parseExpression(schedule.cronspec, { tz: schedule.tz });
|
|
116
117
|
} catch {
|
|
117
118
|
throw new Error(`Invalid cronspec: "${schedule.cronspec}"`);
|
|
118
119
|
}
|
|
@@ -123,13 +124,13 @@ async function scheduleNextRun(
|
|
|
123
124
|
ctx: MutationCtx,
|
|
124
125
|
id: Id<"crons">,
|
|
125
126
|
lastScheduled: Date,
|
|
126
|
-
schedule: Schedule
|
|
127
|
+
schedule: Schedule,
|
|
127
128
|
) {
|
|
128
129
|
const nextRun = calculateNextRun(lastScheduled, schedule);
|
|
129
130
|
const schedulerJobId = await ctx.scheduler.runAt(
|
|
130
131
|
nextRun,
|
|
131
132
|
internal.public.rescheduler,
|
|
132
|
-
{ id }
|
|
133
|
+
{ id },
|
|
133
134
|
);
|
|
134
135
|
await ctx.db.patch(id, { schedulerJobId });
|
|
135
136
|
}
|
|
@@ -140,6 +141,7 @@ function calculateNextRun(lastScheduled: Date, schedule: Schedule): Date {
|
|
|
140
141
|
} else {
|
|
141
142
|
const cron = parser.parseExpression(schedule.cronspec, {
|
|
142
143
|
currentDate: lastScheduled,
|
|
144
|
+
tz: schedule.tz,
|
|
143
145
|
});
|
|
144
146
|
return cron.next().toDate();
|
|
145
147
|
}
|
|
@@ -175,7 +177,7 @@ export const get = query({
|
|
|
175
177
|
args: {
|
|
176
178
|
identifier: v.union(
|
|
177
179
|
v.object({ id: v.id("crons") }),
|
|
178
|
-
v.object({ name: v.string() })
|
|
180
|
+
v.object({ name: v.string() }),
|
|
179
181
|
),
|
|
180
182
|
},
|
|
181
183
|
returns: v.union(cronInfoValidator, v.null()),
|
|
@@ -207,7 +209,7 @@ export const del = mutation({
|
|
|
207
209
|
args: {
|
|
208
210
|
identifier: v.union(
|
|
209
211
|
v.object({ id: v.id("crons") }),
|
|
210
|
-
v.object({ name: v.string() })
|
|
212
|
+
v.object({ name: v.string() }),
|
|
211
213
|
),
|
|
212
214
|
},
|
|
213
215
|
returns: v.null(),
|
|
@@ -274,7 +276,7 @@ export const rescheduler = internalMutation({
|
|
|
274
276
|
schedulerJob.state.kind !== "inProgress"
|
|
275
277
|
) {
|
|
276
278
|
throw Error(
|
|
277
|
-
`We are running in job ${schedulerJob._id} but state is ${schedulerJob.state.kind}
|
|
279
|
+
`We are running in job ${schedulerJob._id} but state is ${schedulerJob.state.kind}`,
|
|
278
280
|
);
|
|
279
281
|
}
|
|
280
282
|
|
|
@@ -297,7 +299,7 @@ export const rescheduler = internalMutation({
|
|
|
297
299
|
await ctx.scheduler.runAfter(
|
|
298
300
|
0,
|
|
299
301
|
cronJob.functionHandle as FunctionHandle<"mutation" | "action">,
|
|
300
|
-
cronJob.args
|
|
302
|
+
cronJob.args,
|
|
301
303
|
);
|
|
302
304
|
}
|
|
303
305
|
|
|
@@ -305,7 +307,7 @@ export const rescheduler = internalMutation({
|
|
|
305
307
|
ctx,
|
|
306
308
|
id,
|
|
307
309
|
new Date(schedulerJob.scheduledTime),
|
|
308
|
-
cronJob.schedule
|
|
310
|
+
cronJob.schedule,
|
|
309
311
|
);
|
|
310
312
|
},
|
|
311
313
|
});
|
package/src/component/schema.ts
CHANGED
|
@@ -15,7 +15,8 @@ export default defineSchema({
|
|
|
15
15
|
v.object({
|
|
16
16
|
kind: v.literal("cron"),
|
|
17
17
|
cronspec: v.string(), // "* * * * *"
|
|
18
|
-
|
|
18
|
+
tz: v.optional(v.string()), // optional timezone, e.g. "America/New_York"
|
|
19
|
+
}),
|
|
19
20
|
),
|
|
20
21
|
schedulerJobId: v.optional(v.id("_scheduled_functions")), // job to wait for the next execution
|
|
21
22
|
executionJobId: v.optional(v.id("_scheduled_functions")), // async job to run the function
|
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 = "crons",
|
|
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":"AAEA,OAAO,EAEL,YAAY,EAEZ,4BAA4B,EAC7B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEjE,YAAY,EAAE,QAAQ,EAAE,CAAC;AAEzB,qBAAa,KAAK;IAwCJ,OAAO,CAAC,SAAS;IAvC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE;YACrD,IAAI;YACJ,QAAQ;YACR,cAAc,EAAE,MAAM,oBAAoB,CAAC,IAAI,CAAC;YAChD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,IAAI,CAAC,GAAgB;QACzB,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACjE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC1B,GAAG,IAAI;YACP,cAAc,EAAE,IAAI,CAAC,cAEpB;SACF,CAAC,CAAC,CAAC;IACN,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,GAAgB,EAChB,UAA6C;QAE7C,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QAC3E,IAAI,IAAI,KAAK,IAAI,EAAE;YACjB,OAAO,IAAI,CAAC;SACb;QACD,OAAO;YACL,GAAG,IAAI;YACP,cAAc,EAAE,IAAI,CAAC,cAEpB;SACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CACV,GAAmB,EACnB,UAA6C;QAE7C,OAAO,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;IACpE,CAAC;CACF"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Expand, FunctionReference, GenericDataModel, GenericMutationCtx, GenericQueryCtx } from "convex/server";
|
|
2
|
-
import type { GenericId } from "convex/values";
|
|
3
|
-
export type RunQueryCtx = {
|
|
4
|
-
runQuery: GenericQueryCtx<GenericDataModel>["runQuery"];
|
|
5
|
-
};
|
|
6
|
-
export type RunMutationCtx = {
|
|
7
|
-
runMutation: GenericMutationCtx<GenericDataModel>["runMutation"];
|
|
8
|
-
};
|
|
9
|
-
export type OpaqueIds<T> = T extends GenericId<infer _T> ? string : T extends (infer U)[] ? OpaqueIds<U>[] : T extends object ? {
|
|
10
|
-
[K in keyof T]: OpaqueIds<T[K]>;
|
|
11
|
-
} : T;
|
|
12
|
-
export type UseApi<API> = Expand<{
|
|
13
|
-
[mod in keyof API]: API[mod] extends FunctionReference<infer FType, "public", infer FArgs, infer FReturnType, infer FComponentPath> ? FunctionReference<FType, "internal", OpaqueIds<FArgs>, OpaqueIds<FReturnType>, FComponentPath> : UseApi<API[mod]>;
|
|
14
|
-
}>;
|
|
15
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/client/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,CAAC;CACzD,CAAC;AACF,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,aAAa,CAAC,CAAC;CAClE,CAAC;AAEF,MAAM,MAAM,SAAS,CAAC,CAAC,IACrB,CAAC,SAAS,SAAS,CAAC,MAAM,EAAE,CAAC,GACzB,MAAM,GACN,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GACnB,SAAS,CAAC,CAAC,CAAC,EAAE,GACd,CAAC,SAAS,MAAM,GACd;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACnC,CAAC,CAAC;AAEZ,MAAM,MAAM,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC;KAC9B,GAAG,IAAI,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,SAAS,iBAAiB,CACpD,MAAM,KAAK,EACX,QAAQ,EACR,MAAM,KAAK,EACX,MAAM,WAAW,EACjB,MAAM,cAAc,CACrB,GACG,iBAAiB,CACf,KAAK,EACL,UAAU,EACV,SAAS,CAAC,KAAK,CAAC,EAChB,SAAS,CAAC,WAAW,CAAC,EACtB,cAAc,CACf,GACD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACrB,CAAC,CAAC"}
|
|
@@ -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/index.js").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":"AAcA;;;;;;;GAOG;AACH,iDAA0B;AAC1B,sDAA+B;AAC/B;;EAA8C"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* prettier-ignore-start */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Generated `api` utility.
|
|
5
|
-
*
|
|
6
|
-
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
7
|
-
*
|
|
8
|
-
* To regenerate, run `npx convex dev`.
|
|
9
|
-
* @module
|
|
10
|
-
*/
|
|
11
|
-
import { anyApi, componentsGeneric } from "convex/server";
|
|
12
|
-
/**
|
|
13
|
-
* A utility for referencing Convex functions in your app's API.
|
|
14
|
-
*
|
|
15
|
-
* Usage:
|
|
16
|
-
* ```js
|
|
17
|
-
* const myFunctionReference = api.myModule.myFunction;
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export const api = anyApi;
|
|
21
|
-
export const internal = anyApi;
|
|
22
|
-
export const components = componentsGeneric();
|
|
23
|
-
/* prettier-ignore-end */
|
|
24
|
-
//# sourceMappingURL=api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/component/_generated/api.js"],"names":[],"mappings":"AAAA,2BAA2B;AAE3B,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;AAE9C,yBAAyB"}
|
|
@@ -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":"AAuBA;;;;;;;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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../src/component/_generated/server.js"],"names":[],"mappings":"AAAA,2BAA2B;AAE3B,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;AAE5C,yBAAyB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convex.config.d.ts","sourceRoot":"","sources":["../../../src/component/convex.config.ts"],"names":[],"mappings":";AAEA,wBAAwC"}
|
|
@@ -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,OAAO,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/component/public.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAc/C,MAAM,MAAM,QAAQ,GAChB;IACE,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;;OAaG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,GACD;IACE,oDAAoD;IACpD,IAAI,EAAE,UAAU,CAAC;IACjB,oCAAoC;IACpC,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAGN,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC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AC,CAAC;YACrE,IACE,YAAY;gBACZ,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS;oBACpC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,YAAY,CAAC,EAC3C;gBACA,YAAY,GAAG,IAAI,CAAC;aACrB;SACF;QACD,IAAI,YAAY,EAAE;YAChB,OAAO,CAAC,GAAG,CAAC,QAAQ,OAAO,CAAC,GAAG,oCAAoC,CAAC,CAAC;SACtE;aAAM;YACL,OAAO,CAAC,GAAG,CAAC,gBAAgB,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;YAC5C,MAAM,GAAG,CAAC,SAAS,CAAC,QAAQ,CAC1B,CAAC,EACD,OAAO,CAAC,cAAuD,EAC/D,OAAO,CAAC,IAAI,CACb,CAAC;SACH;QAED,MAAM,eAAe,CACnB,GAAG,EACH,EAAE,EACF,IAAI,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,EACpC,OAAO,CAAC,QAAQ,CACjB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAmBG"}
|
|
@@ -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,oBAAoB;IACpB,KAAK,EAAE,WAAW,CAAC;QACjB,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;QAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;QACnC,QAAQ,EAAE,CAAC,CAAC,KAAK,CACf,CAAC,CAAC,MAAM,CAAC;YACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;YAC3B,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,eAAe;SACjC,CAAC,EACF,CAAC,CAAC,MAAM,CAAC;YACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;YACvB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,cAAc;SACrC,CAAC,CACH;QACD,cAAc,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,sBAAsB,CAAC,CAAC;QACxD,cAAc,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,sBAAsB,CAAC,CAAC,EAAE,gCAAgC;KAC3F,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;CAC3B,CAAC,CAAC"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { FunctionArgs, SchedulableFunctionReference } from "convex/server";
|
|
2
|
-
import { api } from "../component/_generated/api.js";
|
|
3
|
-
import { CronInfo, Schedule } from "../component/public.js";
|
|
4
|
-
import { RunMutationCtx, RunQueryCtx, UseApi } from "./utils.js";
|
|
5
|
-
export type { CronInfo };
|
|
6
|
-
export declare class Crons {
|
|
7
|
-
private component;
|
|
8
|
-
/**
|
|
9
|
-
* Implementation of crons in user space.
|
|
10
|
-
*
|
|
11
|
-
* Supports intervals in ms as well as cron schedules with the same format as
|
|
12
|
-
* the unix `cron` command:
|
|
13
|
-
*
|
|
14
|
-
* ```
|
|
15
|
-
* * * * * * *
|
|
16
|
-
* ┬ ┬ ┬ ┬ ┬ ┬
|
|
17
|
-
* │ │ │ │ │ |
|
|
18
|
-
* │ │ │ │ │ └── day of week (0 - 7, 1L - 7L) (0 or 7 is Sun)
|
|
19
|
-
* │ │ │ │ └───── month (1 - 12)
|
|
20
|
-
* │ │ │ └──────── day of month (1 - 31, L)
|
|
21
|
-
* │ │ └─────────── hour (0 - 23)
|
|
22
|
-
* │ └────────────── minute (0 - 59)
|
|
23
|
-
* └───────────────── second (0 - 59, optional)
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* Crons can be registered at runtime via the `register` function.
|
|
27
|
-
*
|
|
28
|
-
* If you'd like to statically define cronjobs like in the built-in `crons.ts`
|
|
29
|
-
* Convex feature you can do so via an init script that idempotently registers a
|
|
30
|
-
* cron with a given name. e.g., in an `init.ts` file that gets run on every
|
|
31
|
-
* deploy via `convex dev --run init`:
|
|
32
|
-
*
|
|
33
|
-
* ```ts
|
|
34
|
-
* const crons = new Crons(components.crons);
|
|
35
|
-
* ...
|
|
36
|
-
* if ((await crons.get(ctx, { name: "daily" })) === null) {
|
|
37
|
-
* await crons.register(
|
|
38
|
-
* ctx,
|
|
39
|
-
* { kind: "cron", cronspec: "0 0 * * *" },
|
|
40
|
-
* internal.example.logStuff,
|
|
41
|
-
* { message: "daily cron" },
|
|
42
|
-
* "daily"
|
|
43
|
-
* );
|
|
44
|
-
* }
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
constructor(component: UseApi<typeof api>);
|
|
48
|
-
/**
|
|
49
|
-
* Schedule a mutation or action to run on a cron schedule or interval.
|
|
50
|
-
*
|
|
51
|
-
* @param ctx - The mutation context from the calling Convex mutation.
|
|
52
|
-
* @param schedule - Either a cron specification string or an interval in
|
|
53
|
-
* milliseconds. For intervals, ms must be >= 1000.
|
|
54
|
-
* @param func - A function reference to the mutation or action to schedule.
|
|
55
|
-
* @param args - The arguments to the function.
|
|
56
|
-
* @param name - Optional unique name for the cron. Will throw if a name is
|
|
57
|
-
* provided and a cron with the same name already exists.
|
|
58
|
-
* @returns A string identifier for the cron job.
|
|
59
|
-
*/
|
|
60
|
-
register<F extends SchedulableFunctionReference>(ctx: RunMutationCtx, schedule: Schedule, func: F, args: FunctionArgs<F>, name?: string): Promise<string>;
|
|
61
|
-
/**
|
|
62
|
-
* List all user space cron jobs.
|
|
63
|
-
*
|
|
64
|
-
* @returns List of `cron` table rows.
|
|
65
|
-
*/
|
|
66
|
-
list(ctx: RunQueryCtx): Promise<CronInfo[]>;
|
|
67
|
-
/**
|
|
68
|
-
* Get an existing cron job by id or name.
|
|
69
|
-
*
|
|
70
|
-
* @param identifier - Either the ID or name of the cron job.
|
|
71
|
-
* @returns Cron job document.
|
|
72
|
-
*/
|
|
73
|
-
get(ctx: RunQueryCtx, identifier: {
|
|
74
|
-
id: string;
|
|
75
|
-
} | {
|
|
76
|
-
name: string;
|
|
77
|
-
}): Promise<CronInfo | null>;
|
|
78
|
-
/**
|
|
79
|
-
* Delete and deschedule a cron job by id or name.
|
|
80
|
-
*
|
|
81
|
-
* @param identifier - Either the ID or name of the cron job.
|
|
82
|
-
*/
|
|
83
|
-
delete(ctx: RunMutationCtx, identifier: {
|
|
84
|
-
id: string;
|
|
85
|
-
} | {
|
|
86
|
-
name: string;
|
|
87
|
-
}): Promise<null>;
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,YAAY,EAEZ,4BAA4B,EAC7B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEjE,YAAY,EAAE,QAAQ,EAAE,CAAC;AAEzB,qBAAa,KAAK;IAwCJ,OAAO,CAAC,SAAS;IAvC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;gBACiB,SAAS,EAAE,MAAM,CAAC,OAAO,GAAG,CAAC;IAEjD;;;;;;;;;;;OAWG;IACG,QAAQ,CAAC,CAAC,SAAS,4BAA4B,EACnD,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,EACrB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC;IASlB;;;;OAIG;IACG,IAAI,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAUjD;;;;;OAKG;IACG,GAAG,CACP,GAAG,EAAE,WAAW,EAChB,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAC5C,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAa3B;;;;OAIG;IACG,MAAM,CACV,GAAG,EAAE,cAAc,EACnB,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAC5C,OAAO,CAAC,IAAI,CAAC;CAGjB"}
|
package/dist/esm/client/index.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
// Client side implementation of the Crons component.
|
|
2
|
-
import { createFunctionHandle, } from "convex/server";
|
|
3
|
-
export class Crons {
|
|
4
|
-
component;
|
|
5
|
-
/**
|
|
6
|
-
* Implementation of crons in user space.
|
|
7
|
-
*
|
|
8
|
-
* Supports intervals in ms as well as cron schedules with the same format as
|
|
9
|
-
* the unix `cron` command:
|
|
10
|
-
*
|
|
11
|
-
* ```
|
|
12
|
-
* * * * * * *
|
|
13
|
-
* ┬ ┬ ┬ ┬ ┬ ┬
|
|
14
|
-
* │ │ │ │ │ |
|
|
15
|
-
* │ │ │ │ │ └── day of week (0 - 7, 1L - 7L) (0 or 7 is Sun)
|
|
16
|
-
* │ │ │ │ └───── month (1 - 12)
|
|
17
|
-
* │ │ │ └──────── day of month (1 - 31, L)
|
|
18
|
-
* │ │ └─────────── hour (0 - 23)
|
|
19
|
-
* │ └────────────── minute (0 - 59)
|
|
20
|
-
* └───────────────── second (0 - 59, optional)
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* Crons can be registered at runtime via the `register` function.
|
|
24
|
-
*
|
|
25
|
-
* If you'd like to statically define cronjobs like in the built-in `crons.ts`
|
|
26
|
-
* Convex feature you can do so via an init script that idempotently registers a
|
|
27
|
-
* cron with a given name. e.g., in an `init.ts` file that gets run on every
|
|
28
|
-
* deploy via `convex dev --run init`:
|
|
29
|
-
*
|
|
30
|
-
* ```ts
|
|
31
|
-
* const crons = new Crons(components.crons);
|
|
32
|
-
* ...
|
|
33
|
-
* if ((await crons.get(ctx, { name: "daily" })) === null) {
|
|
34
|
-
* await crons.register(
|
|
35
|
-
* ctx,
|
|
36
|
-
* { kind: "cron", cronspec: "0 0 * * *" },
|
|
37
|
-
* internal.example.logStuff,
|
|
38
|
-
* { message: "daily cron" },
|
|
39
|
-
* "daily"
|
|
40
|
-
* );
|
|
41
|
-
* }
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
constructor(component) {
|
|
45
|
-
this.component = component;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Schedule a mutation or action to run on a cron schedule or interval.
|
|
49
|
-
*
|
|
50
|
-
* @param ctx - The mutation context from the calling Convex mutation.
|
|
51
|
-
* @param schedule - Either a cron specification string or an interval in
|
|
52
|
-
* milliseconds. For intervals, ms must be >= 1000.
|
|
53
|
-
* @param func - A function reference to the mutation or action to schedule.
|
|
54
|
-
* @param args - The arguments to the function.
|
|
55
|
-
* @param name - Optional unique name for the cron. Will throw if a name is
|
|
56
|
-
* provided and a cron with the same name already exists.
|
|
57
|
-
* @returns A string identifier for the cron job.
|
|
58
|
-
*/
|
|
59
|
-
async register(ctx, schedule, func, args, name) {
|
|
60
|
-
return ctx.runMutation(this.component.public.register, {
|
|
61
|
-
name,
|
|
62
|
-
schedule,
|
|
63
|
-
functionHandle: await createFunctionHandle(func),
|
|
64
|
-
args,
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* List all user space cron jobs.
|
|
69
|
-
*
|
|
70
|
-
* @returns List of `cron` table rows.
|
|
71
|
-
*/
|
|
72
|
-
async list(ctx) {
|
|
73
|
-
const crons = await ctx.runQuery(this.component.public.list, {});
|
|
74
|
-
return crons.map((cron) => ({
|
|
75
|
-
...cron,
|
|
76
|
-
functionHandle: cron.functionHandle,
|
|
77
|
-
}));
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Get an existing cron job by id or name.
|
|
81
|
-
*
|
|
82
|
-
* @param identifier - Either the ID or name of the cron job.
|
|
83
|
-
* @returns Cron job document.
|
|
84
|
-
*/
|
|
85
|
-
async get(ctx, identifier) {
|
|
86
|
-
const cron = await ctx.runQuery(this.component.public.get, { identifier });
|
|
87
|
-
if (cron === null) {
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
...cron,
|
|
92
|
-
functionHandle: cron.functionHandle,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Delete and deschedule a cron job by id or name.
|
|
97
|
-
*
|
|
98
|
-
* @param identifier - Either the ID or name of the cron job.
|
|
99
|
-
*/
|
|
100
|
-
async delete(ctx, identifier) {
|
|
101
|
-
return ctx.runMutation(this.component.public.del, { identifier });
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,EACL,oBAAoB,GA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A6C;QAE7C,OAAO,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;IACpE,CAAC;CACF"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Expand, FunctionReference, GenericDataModel, GenericMutationCtx, GenericQueryCtx } from "convex/server";
|
|
2
|
-
import type { GenericId } from "convex/values";
|
|
3
|
-
export type RunQueryCtx = {
|
|
4
|
-
runQuery: GenericQueryCtx<GenericDataModel>["runQuery"];
|
|
5
|
-
};
|
|
6
|
-
export type RunMutationCtx = {
|
|
7
|
-
runMutation: GenericMutationCtx<GenericDataModel>["runMutation"];
|
|
8
|
-
};
|
|
9
|
-
export type OpaqueIds<T> = T extends GenericId<infer _T> ? string : T extends (infer U)[] ? OpaqueIds<U>[] : T extends object ? {
|
|
10
|
-
[K in keyof T]: OpaqueIds<T[K]>;
|
|
11
|
-
} : T;
|
|
12
|
-
export type UseApi<API> = Expand<{
|
|
13
|
-
[mod in keyof API]: API[mod] extends FunctionReference<infer FType, "public", infer FArgs, infer FReturnType, infer FComponentPath> ? FunctionReference<FType, "internal", OpaqueIds<FArgs>, OpaqueIds<FReturnType>, FComponentPath> : UseApi<API[mod]>;
|
|
14
|
-
}>;
|
|
15
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/client/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,CAAC;CACzD,CAAC;AACF,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,aAAa,CAAC,CAAC;CAClE,CAAC;AAEF,MAAM,MAAM,SAAS,CAAC,CAAC,IACrB,CAAC,SAAS,SAAS,CAAC,MAAM,EAAE,CAAC,GACzB,MAAM,GACN,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GACnB,SAAS,CAAC,CAAC,CAAC,EAAE,GACd,CAAC,SAAS,MAAM,GACd;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACnC,CAAC,CAAC;AAEZ,MAAM,MAAM,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC;KAC9B,GAAG,IAAI,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,SAAS,iBAAiB,CACpD,MAAM,KAAK,EACX,QAAQ,EACR,MAAM,KAAK,EACX,MAAM,WAAW,EACjB,MAAM,cAAc,CACrB,GACG,iBAAiB,CACf,KAAK,EACL,UAAU,EACV,SAAS,CAAC,KAAK,CAAC,EAChB,SAAS,CAAC,WAAW,CAAC,EACtB,cAAc,CACf,GACD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACrB,CAAC,CAAC"}
|
package/dist/esm/client/utils.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/client/utils.ts"],"names":[],"mappings":"AAAA,wCAAwC"}
|
|
@@ -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/index.js").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":"AAcA;;;;;;;GAOG;AACH,iDAA0B;AAC1B,sDAA+B;AAC/B;;EAA8C"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* prettier-ignore-start */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Generated `api` utility.
|
|
5
|
-
*
|
|
6
|
-
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
7
|
-
*
|
|
8
|
-
* To regenerate, run `npx convex dev`.
|
|
9
|
-
* @module
|
|
10
|
-
*/
|
|
11
|
-
import { anyApi, componentsGeneric } from "convex/server";
|
|
12
|
-
/**
|
|
13
|
-
* A utility for referencing Convex functions in your app's API.
|
|
14
|
-
*
|
|
15
|
-
* Usage:
|
|
16
|
-
* ```js
|
|
17
|
-
* const myFunctionReference = api.myModule.myFunction;
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export const api = anyApi;
|
|
21
|
-
export const internal = anyApi;
|
|
22
|
-
export const components = componentsGeneric();
|
|
23
|
-
/* prettier-ignore-end */
|
|
24
|
-
//# sourceMappingURL=api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/component/_generated/api.js"],"names":[],"mappings":"AAAA,2BAA2B;AAE3B,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;AAE9C,yBAAyB"}
|