···11+/* eslint-disable */
22+/**
33+ * Generated `api` utility.
44+ *
55+ * THIS CODE IS AUTOMATICALLY GENERATED.
66+ *
77+ * To regenerate, run `npx convex dev`.
88+ * @module
99+ */
1010+1111+import { anyApi } from "convex/server";
1212+1313+/**
1414+ * A utility for referencing Convex functions in your app's API.
1515+ *
1616+ * Usage:
1717+ * ```js
1818+ * const myFunctionReference = api.myModule.myFunction;
1919+ * ```
2020+ */
2121+export const api = anyApi;
2222+export const internal = anyApi;
+58
convex/_generated/dataModel.d.ts
···11+/* eslint-disable */
22+/**
33+ * Generated data model types.
44+ *
55+ * THIS CODE IS AUTOMATICALLY GENERATED.
66+ *
77+ * To regenerate, run `npx convex dev`.
88+ * @module
99+ */
1010+1111+import { AnyDataModel } from "convex/server";
1212+import type { GenericId } from "convex/values";
1313+1414+/**
1515+ * No `schema.ts` file found!
1616+ *
1717+ * This generated code has permissive types like `Doc = any` because
1818+ * Convex doesn't know your schema. If you'd like more type safety, see
1919+ * https://docs.convex.dev/using/schemas for instructions on how to add a
2020+ * schema file.
2121+ *
2222+ * After you change a schema, rerun codegen with `npx convex dev`.
2323+ */
2424+2525+/**
2626+ * The names of all of your Convex tables.
2727+ */
2828+export type TableNames = string;
2929+3030+/**
3131+ * The type of a document stored in Convex.
3232+ */
3333+export type Doc = any;
3434+3535+/**
3636+ * An identifier for a document in Convex.
3737+ *
3838+ * Convex documents are uniquely identified by their `Id`, which is accessible
3939+ * on the `_id` field. To learn more, see [Document IDs](https://docs.convex.dev/using/document-ids).
4040+ *
4141+ * Documents can be loaded using `db.get(id)` in query and mutation functions.
4242+ *
4343+ * IDs are just strings at runtime, but this type can be used to distinguish them from other
4444+ * strings when type checking.
4545+ */
4646+export type Id<TableName extends TableNames = TableNames> =
4747+ GenericId<TableName>;
4848+4949+/**
5050+ * A type describing your Convex data model.
5151+ *
5252+ * This type includes information about what tables you have, the type of
5353+ * documents stored in those tables, and the indexes defined on them.
5454+ *
5555+ * This type is used to parameterize methods like `queryGeneric` and
5656+ * `mutationGeneric` to make them type-safe.
5757+ */
5858+export type DataModel = AnyDataModel;
+142
convex/_generated/server.d.ts
···11+/* eslint-disable */
22+/**
33+ * Generated utilities for implementing server-side Convex query and mutation functions.
44+ *
55+ * THIS CODE IS AUTOMATICALLY GENERATED.
66+ *
77+ * To regenerate, run `npx convex dev`.
88+ * @module
99+ */
1010+1111+import {
1212+ ActionBuilder,
1313+ HttpActionBuilder,
1414+ MutationBuilder,
1515+ QueryBuilder,
1616+ GenericActionCtx,
1717+ GenericMutationCtx,
1818+ GenericQueryCtx,
1919+ GenericDatabaseReader,
2020+ GenericDatabaseWriter,
2121+} from "convex/server";
2222+import type { DataModel } from "./dataModel.js";
2323+2424+/**
2525+ * Define a query in this Convex app's public API.
2626+ *
2727+ * This function will be allowed to read your Convex database and will be accessible from the client.
2828+ *
2929+ * @param func - The query function. It receives a {@link QueryCtx} as its first argument.
3030+ * @returns The wrapped query. Include this as an `export` to name it and make it accessible.
3131+ */
3232+export declare const query: QueryBuilder<DataModel, "public">;
3333+3434+/**
3535+ * Define a query that is only accessible from other Convex functions (but not from the client).
3636+ *
3737+ * This function will be allowed to read from your Convex database. It will not be accessible from the client.
3838+ *
3939+ * @param func - The query function. It receives a {@link QueryCtx} as its first argument.
4040+ * @returns The wrapped query. Include this as an `export` to name it and make it accessible.
4141+ */
4242+export declare const internalQuery: QueryBuilder<DataModel, "internal">;
4343+4444+/**
4545+ * Define a mutation in this Convex app's public API.
4646+ *
4747+ * This function will be allowed to modify your Convex database and will be accessible from the client.
4848+ *
4949+ * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
5050+ * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
5151+ */
5252+export declare const mutation: MutationBuilder<DataModel, "public">;
5353+5454+/**
5555+ * Define a mutation that is only accessible from other Convex functions (but not from the client).
5656+ *
5757+ * This function will be allowed to modify your Convex database. It will not be accessible from the client.
5858+ *
5959+ * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
6060+ * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
6161+ */
6262+export declare const internalMutation: MutationBuilder<DataModel, "internal">;
6363+6464+/**
6565+ * Define an action in this Convex app's public API.
6666+ *
6767+ * An action is a function which can execute any JavaScript code, including non-deterministic
6868+ * code and code with side-effects, like calling third-party services.
6969+ * They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive.
7070+ * They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}.
7171+ *
7272+ * @param func - The action. It receives an {@link ActionCtx} as its first argument.
7373+ * @returns The wrapped action. Include this as an `export` to name it and make it accessible.
7474+ */
7575+export declare const action: ActionBuilder<DataModel, "public">;
7676+7777+/**
7878+ * Define an action that is only accessible from other Convex functions (but not from the client).
7979+ *
8080+ * @param func - The function. It receives an {@link ActionCtx} as its first argument.
8181+ * @returns The wrapped function. Include this as an `export` to name it and make it accessible.
8282+ */
8383+export declare const internalAction: ActionBuilder<DataModel, "internal">;
8484+8585+/**
8686+ * Define an HTTP action.
8787+ *
8888+ * This function will be used to respond to HTTP requests received by a Convex
8989+ * deployment if the requests matches the path and method where this action
9090+ * is routed. Be sure to route your action in `convex/http.js`.
9191+ *
9292+ * @param func - The function. It receives an {@link ActionCtx} as its first argument.
9393+ * @returns The wrapped function. Import this function from `convex/http.js` and route it to hook it up.
9494+ */
9595+export declare const httpAction: HttpActionBuilder;
9696+9797+/**
9898+ * A set of services for use within Convex query functions.
9999+ *
100100+ * The query context is passed as the first argument to any Convex query
101101+ * function run on the server.
102102+ *
103103+ * This differs from the {@link MutationCtx} because all of the services are
104104+ * read-only.
105105+ */
106106+export type QueryCtx = GenericQueryCtx<DataModel>;
107107+108108+/**
109109+ * A set of services for use within Convex mutation functions.
110110+ *
111111+ * The mutation context is passed as the first argument to any Convex mutation
112112+ * function run on the server.
113113+ */
114114+export type MutationCtx = GenericMutationCtx<DataModel>;
115115+116116+/**
117117+ * A set of services for use within Convex action functions.
118118+ *
119119+ * The action context is passed as the first argument to any Convex action
120120+ * function run on the server.
121121+ */
122122+export type ActionCtx = GenericActionCtx<DataModel>;
123123+124124+/**
125125+ * An interface to read from the database within Convex query functions.
126126+ *
127127+ * The two entry points are {@link DatabaseReader.get}, which fetches a single
128128+ * document by its {@link Id}, or {@link DatabaseReader.query}, which starts
129129+ * building a query.
130130+ */
131131+export type DatabaseReader = GenericDatabaseReader<DataModel>;
132132+133133+/**
134134+ * An interface to read from and write to the database within Convex mutation
135135+ * functions.
136136+ *
137137+ * Convex guarantees that all writes within a single mutation are
138138+ * executed atomically, so you never have to worry about partial writes leaving
139139+ * your data in an inconsistent state. See [the Convex Guide](https://docs.convex.dev/understanding/convex-fundamentals/functions#atomicity-and-optimistic-concurrency-control)
140140+ * for the guarantees Convex provides your functions.
141141+ */
142142+export type DatabaseWriter = GenericDatabaseWriter<DataModel>;
+89
convex/_generated/server.js
···11+/* eslint-disable */
22+/**
33+ * Generated utilities for implementing server-side Convex query and mutation functions.
44+ *
55+ * THIS CODE IS AUTOMATICALLY GENERATED.
66+ *
77+ * To regenerate, run `npx convex dev`.
88+ * @module
99+ */
1010+1111+import {
1212+ actionGeneric,
1313+ httpActionGeneric,
1414+ queryGeneric,
1515+ mutationGeneric,
1616+ internalActionGeneric,
1717+ internalMutationGeneric,
1818+ internalQueryGeneric,
1919+} from "convex/server";
2020+2121+/**
2222+ * Define a query in this Convex app's public API.
2323+ *
2424+ * This function will be allowed to read your Convex database and will be accessible from the client.
2525+ *
2626+ * @param func - The query function. It receives a {@link QueryCtx} as its first argument.
2727+ * @returns The wrapped query. Include this as an `export` to name it and make it accessible.
2828+ */
2929+export const query = queryGeneric;
3030+3131+/**
3232+ * Define a query that is only accessible from other Convex functions (but not from the client).
3333+ *
3434+ * This function will be allowed to read from your Convex database. It will not be accessible from the client.
3535+ *
3636+ * @param func - The query function. It receives a {@link QueryCtx} as its first argument.
3737+ * @returns The wrapped query. Include this as an `export` to name it and make it accessible.
3838+ */
3939+export const internalQuery = internalQueryGeneric;
4040+4141+/**
4242+ * Define a mutation in this Convex app's public API.
4343+ *
4444+ * This function will be allowed to modify your Convex database and will be accessible from the client.
4545+ *
4646+ * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
4747+ * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
4848+ */
4949+export const mutation = mutationGeneric;
5050+5151+/**
5252+ * Define a mutation that is only accessible from other Convex functions (but not from the client).
5353+ *
5454+ * This function will be allowed to modify your Convex database. It will not be accessible from the client.
5555+ *
5656+ * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
5757+ * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
5858+ */
5959+export const internalMutation = internalMutationGeneric;
6060+6161+/**
6262+ * Define an action in this Convex app's public API.
6363+ *
6464+ * An action is a function which can execute any JavaScript code, including non-deterministic
6565+ * code and code with side-effects, like calling third-party services.
6666+ * They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive.
6767+ * They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}.
6868+ *
6969+ * @param func - The action. It receives an {@link ActionCtx} as its first argument.
7070+ * @returns The wrapped action. Include this as an `export` to name it and make it accessible.
7171+ */
7272+export const action = actionGeneric;
7373+7474+/**
7575+ * Define an action that is only accessible from other Convex functions (but not from the client).
7676+ *
7777+ * @param func - The function. It receives an {@link ActionCtx} as its first argument.
7878+ * @returns The wrapped function. Include this as an `export` to name it and make it accessible.
7979+ */
8080+export const internalAction = internalActionGeneric;
8181+8282+/**
8383+ * Define a Convex HTTP action.
8484+ *
8585+ * @param func - The function. It receives an {@link ActionCtx} as its first argument, and a `Request` object
8686+ * as its second.
8787+ * @returns The wrapped endpoint function. Route a URL path to this function in `convex/http.js`.
8888+ */
8989+export const httpAction = httpActionGeneric;