convex 1.41.0 → 1.42.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.
Files changed (167) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/browser.bundle.js +1 -1
  3. package/dist/browser.bundle.js.map +1 -1
  4. package/dist/cjs/browser/simple_client-node.js +85 -27
  5. package/dist/cjs/browser/simple_client-node.js.map +3 -3
  6. package/dist/cjs/cli/env.js +12 -5
  7. package/dist/cjs/cli/env.js.map +2 -2
  8. package/dist/cjs/cli/envDefault.js +12 -7
  9. package/dist/cjs/cli/envDefault.js.map +2 -2
  10. package/dist/cjs/cli/insights.js +11 -1
  11. package/dist/cjs/cli/insights.js.map +2 -2
  12. package/dist/cjs/cli/lib/env.js +5 -1
  13. package/dist/cjs/cli/lib/env.js.map +2 -2
  14. package/dist/cjs/cli/lib/login.js +16 -12
  15. package/dist/cjs/cli/lib/login.js.map +2 -2
  16. package/dist/cjs/cli/lib/logs.js +4 -1
  17. package/dist/cjs/cli/lib/logs.js.map +2 -2
  18. package/dist/cjs/cli/lib/run.js +27 -2
  19. package/dist/cjs/cli/lib/run.js.map +2 -2
  20. package/dist/cjs/cli/lib/utils/utils.js +30 -0
  21. package/dist/cjs/cli/lib/utils/utils.js.map +2 -2
  22. package/dist/cjs/cli/program.js +2 -1
  23. package/dist/cjs/cli/program.js.map +2 -2
  24. package/dist/cjs/cli/project.js +27 -0
  25. package/dist/cjs/cli/project.js.map +7 -0
  26. package/dist/cjs/cli/projectCreate.js +90 -0
  27. package/dist/cjs/cli/projectCreate.js.map +7 -0
  28. package/dist/cjs/index.js +1 -1
  29. package/dist/cjs/index.js.map +1 -1
  30. package/dist/cjs/server/database.js.map +1 -1
  31. package/dist/cjs/server/impl/meta_impl.js +6 -6
  32. package/dist/cjs/server/impl/meta_impl.js.map +2 -2
  33. package/dist/cjs/server/impl/registration_impl.js +9 -2
  34. package/dist/cjs/server/impl/registration_impl.js.map +2 -2
  35. package/dist/cjs/server/index.js.map +2 -2
  36. package/dist/cjs/server/meta.js.map +1 -1
  37. package/dist/cjs/server/query.js.map +1 -1
  38. package/dist/cjs/server/registration.js.map +1 -1
  39. package/dist/cjs/server/storage.js.map +1 -1
  40. package/dist/cjs/server/system_fields.js.map +1 -1
  41. package/dist/cjs-types/cli/env.d.ts.map +1 -1
  42. package/dist/cjs-types/cli/envDefault.d.ts.map +1 -1
  43. package/dist/cjs-types/cli/insights.d.ts +1 -0
  44. package/dist/cjs-types/cli/insights.d.ts.map +1 -1
  45. package/dist/cjs-types/cli/lib/env.d.ts +3 -1
  46. package/dist/cjs-types/cli/lib/env.d.ts.map +1 -1
  47. package/dist/cjs-types/cli/lib/env.test.d.ts +2 -0
  48. package/dist/cjs-types/cli/lib/env.test.d.ts.map +1 -0
  49. package/dist/cjs-types/cli/lib/login.d.ts.map +1 -1
  50. package/dist/cjs-types/cli/lib/logs.d.ts +1 -1
  51. package/dist/cjs-types/cli/lib/logs.d.ts.map +1 -1
  52. package/dist/cjs-types/cli/lib/run.d.ts +1 -1
  53. package/dist/cjs-types/cli/lib/run.d.ts.map +1 -1
  54. package/dist/cjs-types/cli/lib/utils/utils.d.ts +10 -0
  55. package/dist/cjs-types/cli/lib/utils/utils.d.ts.map +1 -1
  56. package/dist/cjs-types/cli/program.d.ts.map +1 -1
  57. package/dist/cjs-types/cli/project.d.ts +3 -0
  58. package/dist/cjs-types/cli/project.d.ts.map +1 -0
  59. package/dist/cjs-types/cli/projectCreate.d.ts +5 -0
  60. package/dist/cjs-types/cli/projectCreate.d.ts.map +1 -0
  61. package/dist/cjs-types/index.d.ts +1 -1
  62. package/dist/cjs-types/server/database.d.ts +21 -3
  63. package/dist/cjs-types/server/database.d.ts.map +1 -1
  64. package/dist/cjs-types/server/impl/meta_impl.d.ts.map +1 -1
  65. package/dist/cjs-types/server/impl/registration_impl.d.ts.map +1 -1
  66. package/dist/cjs-types/server/index.d.ts +1 -1
  67. package/dist/cjs-types/server/index.d.ts.map +1 -1
  68. package/dist/cjs-types/server/meta.d.ts +10 -0
  69. package/dist/cjs-types/server/meta.d.ts.map +1 -1
  70. package/dist/cjs-types/server/query.d.ts +1 -1
  71. package/dist/cjs-types/server/registration.d.ts +15 -3
  72. package/dist/cjs-types/server/registration.d.ts.map +1 -1
  73. package/dist/cjs-types/server/storage.d.ts +20 -3
  74. package/dist/cjs-types/server/storage.d.ts.map +1 -1
  75. package/dist/cli.bundle.cjs +1047 -619
  76. package/dist/cli.bundle.cjs.map +4 -4
  77. package/dist/esm/browser/simple_client-node.js +85 -27
  78. package/dist/esm/browser/simple_client-node.js.map +3 -3
  79. package/dist/esm/cli/env.js +12 -5
  80. package/dist/esm/cli/env.js.map +2 -2
  81. package/dist/esm/cli/envDefault.js +12 -7
  82. package/dist/esm/cli/envDefault.js.map +2 -2
  83. package/dist/esm/cli/insights.js +11 -1
  84. package/dist/esm/cli/insights.js.map +2 -2
  85. package/dist/esm/cli/lib/env.js +5 -1
  86. package/dist/esm/cli/lib/env.js.map +2 -2
  87. package/dist/esm/cli/lib/login.js +18 -13
  88. package/dist/esm/cli/lib/login.js.map +2 -2
  89. package/dist/esm/cli/lib/logs.js +5 -2
  90. package/dist/esm/cli/lib/logs.js.map +2 -2
  91. package/dist/esm/cli/lib/run.js +32 -3
  92. package/dist/esm/cli/lib/run.js.map +2 -2
  93. package/dist/esm/cli/lib/utils/utils.js +29 -0
  94. package/dist/esm/cli/lib/utils/utils.js.map +2 -2
  95. package/dist/esm/cli/program.js +2 -1
  96. package/dist/esm/cli/program.js.map +2 -2
  97. package/dist/esm/cli/project.js +5 -0
  98. package/dist/esm/cli/project.js.map +7 -0
  99. package/dist/esm/cli/projectCreate.js +68 -0
  100. package/dist/esm/cli/projectCreate.js.map +7 -0
  101. package/dist/esm/index.js +1 -1
  102. package/dist/esm/index.js.map +1 -1
  103. package/dist/esm/server/impl/meta_impl.js +6 -6
  104. package/dist/esm/server/impl/meta_impl.js.map +2 -2
  105. package/dist/esm/server/impl/registration_impl.js +9 -2
  106. package/dist/esm/server/impl/registration_impl.js.map +2 -2
  107. package/dist/esm/server/index.js.map +2 -2
  108. package/dist/esm-types/cli/env.d.ts.map +1 -1
  109. package/dist/esm-types/cli/envDefault.d.ts.map +1 -1
  110. package/dist/esm-types/cli/insights.d.ts +1 -0
  111. package/dist/esm-types/cli/insights.d.ts.map +1 -1
  112. package/dist/esm-types/cli/lib/env.d.ts +3 -1
  113. package/dist/esm-types/cli/lib/env.d.ts.map +1 -1
  114. package/dist/esm-types/cli/lib/env.test.d.ts +2 -0
  115. package/dist/esm-types/cli/lib/env.test.d.ts.map +1 -0
  116. package/dist/esm-types/cli/lib/login.d.ts.map +1 -1
  117. package/dist/esm-types/cli/lib/logs.d.ts +1 -1
  118. package/dist/esm-types/cli/lib/logs.d.ts.map +1 -1
  119. package/dist/esm-types/cli/lib/run.d.ts +1 -1
  120. package/dist/esm-types/cli/lib/run.d.ts.map +1 -1
  121. package/dist/esm-types/cli/lib/utils/utils.d.ts +10 -0
  122. package/dist/esm-types/cli/lib/utils/utils.d.ts.map +1 -1
  123. package/dist/esm-types/cli/program.d.ts.map +1 -1
  124. package/dist/esm-types/cli/project.d.ts +3 -0
  125. package/dist/esm-types/cli/project.d.ts.map +1 -0
  126. package/dist/esm-types/cli/projectCreate.d.ts +5 -0
  127. package/dist/esm-types/cli/projectCreate.d.ts.map +1 -0
  128. package/dist/esm-types/index.d.ts +1 -1
  129. package/dist/esm-types/server/database.d.ts +21 -3
  130. package/dist/esm-types/server/database.d.ts.map +1 -1
  131. package/dist/esm-types/server/impl/meta_impl.d.ts.map +1 -1
  132. package/dist/esm-types/server/impl/registration_impl.d.ts.map +1 -1
  133. package/dist/esm-types/server/index.d.ts +1 -1
  134. package/dist/esm-types/server/index.d.ts.map +1 -1
  135. package/dist/esm-types/server/meta.d.ts +10 -0
  136. package/dist/esm-types/server/meta.d.ts.map +1 -1
  137. package/dist/esm-types/server/query.d.ts +1 -1
  138. package/dist/esm-types/server/registration.d.ts +15 -3
  139. package/dist/esm-types/server/registration.d.ts.map +1 -1
  140. package/dist/esm-types/server/storage.d.ts +20 -3
  141. package/dist/esm-types/server/storage.d.ts.map +1 -1
  142. package/dist/react.bundle.js +1 -1
  143. package/dist/react.bundle.js.map +1 -1
  144. package/package.json +4 -4
  145. package/src/cli/env.ts +16 -6
  146. package/src/cli/envDefault.ts +13 -7
  147. package/src/cli/insights.ts +12 -0
  148. package/src/cli/lib/env.test.ts +60 -0
  149. package/src/cli/lib/env.ts +9 -1
  150. package/src/cli/lib/login.ts +18 -18
  151. package/src/cli/lib/logs.ts +7 -2
  152. package/src/cli/lib/run.ts +37 -3
  153. package/src/cli/lib/utils/utils.ts +56 -0
  154. package/src/cli/program.ts +2 -0
  155. package/src/cli/project.ts +7 -0
  156. package/src/cli/projectCreate.ts +99 -0
  157. package/src/index.ts +1 -1
  158. package/src/server/database.ts +21 -3
  159. package/src/server/impl/meta_impl.ts +7 -6
  160. package/src/server/impl/registration_impl.ts +11 -3
  161. package/src/server/index.ts +1 -0
  162. package/src/server/meta.ts +10 -0
  163. package/src/server/query.ts +1 -1
  164. package/src/server/registration.test.ts +25 -1
  165. package/src/server/registration.ts +16 -1
  166. package/src/server/storage.ts +22 -3
  167. package/src/server/system_fields.ts +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/server/registration.ts"],
4
- "sourcesContent": ["import {\n Auth,\n GenericDatabaseReader,\n GenericDatabaseReaderWithTable,\n GenericDatabaseWriter,\n GenericDatabaseWriterWithTable,\n StorageActionWriter,\n StorageReader,\n StorageWriter,\n} from \"./index.js\";\nimport {\n ActionMeta,\n MutationMeta,\n QueryMeta,\n TransactionLimits,\n} from \"./meta.js\";\nimport {\n ArgsAndOptions,\n FunctionReference,\n FunctionReturnType,\n OptionalRestArgs,\n ValidatorTypeToReturnType,\n} from \"../server/api.js\";\nimport {\n GenericValidator,\n Infer,\n ObjectType,\n PropertyValidators,\n} from \"../values/validator.js\";\nimport { Id } from \"../values/value.js\";\nimport {\n GenericDataModel,\n NamedTableInfo,\n TableNamesInDataModel,\n VectorIndexNames,\n} from \"./data_model.js\";\nimport { Scheduler } from \"./scheduler.js\";\nimport { VectorSearchQuery } from \"./vector_search.js\";\nimport { Expand } from \"../type_utils.js\";\nimport { Validator } from \"../values/validators.js\";\n\n/**\n * A set of services for use within Convex mutation functions.\n *\n * The mutation context is passed as the first argument to any Convex mutation\n * function run on the server. Mutations run **transactionally**, all reads\n * and writes within a single mutation are atomic and isolated.\n *\n * You should generally use the `MutationCtx` type from\n * `\"./_generated/server\"`.\n *\n * @example\n * ```typescript\n * import { mutation } from \"./_generated/server\";\n * import { internal } from \"./_generated/api\";\n * import { v } from \"convex/values\";\n *\n * export const createTask = mutation({\n * args: { text: v.string() },\n * returns: v.id(\"tasks\"),\n * handler: async (ctx, args) => {\n * // ctx.db: read and write documents\n * const taskId = await ctx.db.insert(\"tasks\", { text: args.text, completed: false });\n *\n * // ctx.auth: check the authenticated user\n * const identity = await ctx.auth.getUserIdentity();\n *\n * // ctx.scheduler: schedule functions for later\n * await ctx.scheduler.runAfter(0, internal.notifications.send, { taskId });\n *\n * return taskId;\n * },\n * });\n * ```\n *\n * @public\n */\nexport interface GenericMutationCtx<DataModel extends GenericDataModel> {\n /**\n * A utility for reading and writing data in the database.\n *\n * Use `ctx.db.insert()`, `ctx.db.patch()`, `ctx.db.replace()`, and\n * `ctx.db.delete()` to write data. Use `ctx.db.get()` and `ctx.db.query()`\n * to read data. All operations within a mutation are atomic.\n */\n db: GenericDatabaseWriter<DataModel>;\n\n /**\n * Information about the currently authenticated user.\n *\n * Call `await ctx.auth.getUserIdentity()` to get the current user's identity,\n * or `null` if the user is not authenticated.\n */\n auth: Auth;\n\n /**\n * A utility for reading and writing files in storage.\n *\n * Use `ctx.storage.generateUploadUrl()` to create an upload URL for clients,\n * `ctx.storage.getUrl(storageId)` to get a URL for a stored file,\n * or `ctx.storage.delete(storageId)` to remove one.\n */\n storage: StorageWriter;\n\n /**\n * A utility for scheduling Convex functions to run in the future.\n *\n * @example\n * ```typescript\n * // Schedule an action to run immediately after this mutation commits:\n * await ctx.scheduler.runAfter(0, internal.emails.sendWelcome, { userId });\n *\n * // Schedule a cleanup to run in 24 hours:\n * await ctx.scheduler.runAfter(24 * 60 * 60 * 1000, internal.tasks.cleanup, {});\n * ```\n */\n scheduler: Scheduler;\n\n /**\n * Call a query function within the same transaction.\n *\n * The query runs within the same transaction as the calling mutation,\n * seeing a consistent snapshot of the database. Requires a\n * {@link FunctionReference} (e.g., `api.myModule.myQuery` or\n * `internal.myModule.myQuery`).\n *\n * NOTE: Often you can extract shared logic into a helper function instead.\n * `runQuery` incurs overhead of running argument and return value validation,\n * and creating a new isolated JS context.\n *\n * @example\n * ```typescript\n * const user = await ctx.runQuery(internal.users.getUser, { userId });\n * ```\n */\n runQuery: <Query extends FunctionReference<\"query\", \"public\" | \"internal\">>(\n query: Query,\n ...args: ArgsAndOptions<Query, { transactionLimits?: TransactionLimits }>\n ) => Promise<FunctionReturnType<Query>>;\n\n /**\n * Call a mutation function within the same transaction.\n *\n * The mutation runs in a sub-transaction, so if it throws an error, all of\n * its writes will be rolled back. Requires a {@link FunctionReference}.\n *\n * NOTE: Often you can extract shared logic into a helper function instead.\n * `runMutation` incurs overhead of running argument and return value\n * validation, and creating a new isolated JS context.\n */\n runMutation: <\n Mutation extends FunctionReference<\"mutation\", \"public\" | \"internal\">,\n >(\n mutation: Mutation,\n ...args: ArgsAndOptions<Mutation, { transactionLimits?: TransactionLimits }>\n ) => Promise<FunctionReturnType<Mutation>>;\n\n meta: MutationMeta;\n}\n\n/**\n * A set of services for use within Convex mutation functions.\n *\n * The mutation context is passed as the first argument to any Convex mutation\n * function run on the server.\n *\n * You should generally use the `MutationCtx` type from\n * `\"./_generated/server\"`.\n *\n * @public\n */\nexport type GenericMutationCtxWithTable<DataModel extends GenericDataModel> =\n Omit<GenericMutationCtx<DataModel>, \"db\"> & {\n db: GenericDatabaseWriterWithTable<DataModel>;\n };\n\n/**\n * A set of services for use within Convex query functions.\n *\n * The query context is passed as the first argument to any Convex query\n * function run on the server. Queries are **read-only**, they can read from\n * the database but cannot write. They are also **reactive**, when used with\n * `useQuery` on the client, the result automatically updates when data changes.\n *\n * You should generally use the `QueryCtx` type from\n * `\"./_generated/server\"`.\n *\n * @example\n * ```typescript\n * import { query } from \"./_generated/server\";\n * import { v } from \"convex/values\";\n *\n * export const listTasks = query({\n * args: {},\n * returns: v.array(v.object({\n * _id: v.id(\"tasks\"),\n * _creationTime: v.number(),\n * text: v.string(),\n * completed: v.boolean(),\n * })),\n * handler: async (ctx, args) => {\n * // ctx.db: read-only database access\n * return await ctx.db.query(\"tasks\").order(\"desc\").take(100);\n * },\n * });\n * ```\n *\n * @public\n */\nexport interface GenericQueryCtx<DataModel extends GenericDataModel> {\n /**\n * A utility for reading data in the database.\n *\n * Use `ctx.db.get(table, id)` to fetch a single document by ID, or\n * `ctx.db.query(\"tableName\")` to query multiple documents with filtering\n * and ordering. Queries are read-only, no write methods are available.\n */\n db: GenericDatabaseReader<DataModel>;\n\n /**\n * Information about the currently authenticated user.\n *\n * Call `await ctx.auth.getUserIdentity()` to get the current user's identity,\n * or `null` if the user is not authenticated.\n */\n auth: Auth;\n\n /**\n * A utility for reading files in storage.\n *\n * Use `ctx.storage.getUrl(storageId)` to get a URL for a stored file.\n */\n storage: StorageReader;\n\n /**\n * Call a query function within the same transaction.\n *\n * The query runs within the same read snapshot. Requires a\n * {@link FunctionReference} (e.g., `api.myModule.myQuery` or\n * `internal.myModule.myQuery`).\n *\n * NOTE: Often you can extract shared logic into a helper function instead.\n * `runQuery` incurs overhead of running argument and return value validation,\n * and creating a new isolated JS context.\n */\n runQuery: <Query extends FunctionReference<\"query\", \"public\" | \"internal\">>(\n query: Query,\n ...args: ArgsAndOptions<Query, { transactionLimits?: TransactionLimits }>\n ) => Promise<FunctionReturnType<Query>>;\n\n meta: QueryMeta;\n}\n\n/**\n * A set of services for use within Convex query functions.\n *\n * The query context is passed as the first argument to any Convex query\n * function run on the server.\n *\n * This differs from the {@link MutationCtx} because all of the services are\n * read-only.\n *\n *\n * @public\n */\nexport type GenericQueryCtxWithTable<DataModel extends GenericDataModel> = Omit<\n GenericQueryCtx<DataModel>,\n \"db\"\n> & {\n db: GenericDatabaseReaderWithTable<DataModel>;\n};\n\n/**\n * A set of services for use within Convex action functions.\n *\n * The action context is passed as the first argument to any Convex action\n * run on the server. Actions can call external APIs and use Node.js libraries,\n * but do **not** have direct database access (`ctx.db` is not available).\n * Use `ctx.runQuery` and `ctx.runMutation` to interact with the database.\n *\n * You should generally use the `ActionCtx` type from\n * `\"./_generated/server\"`.\n *\n * @example\n * ```typescript\n * import { action } from \"./_generated/server\";\n * import { internal } from \"./_generated/api\";\n * import { v } from \"convex/values\";\n *\n * export const processPayment = action({\n * args: { orderId: v.id(\"orders\"), amount: v.number() },\n * returns: v.null(),\n * handler: async (ctx, args) => {\n * // Read data via ctx.runQuery:\n * const order = await ctx.runQuery(internal.orders.get, { id: args.orderId });\n *\n * // Call external API:\n * const result = await fetch(\"https://api.stripe.com/v1/charges\", { ... });\n *\n * // Write results back via ctx.runMutation:\n * await ctx.runMutation(internal.orders.markPaid, { id: args.orderId });\n *\n * return null;\n * },\n * });\n * ```\n *\n * **Common mistake:** `ctx.db` is not available in actions. Do not try to\n * access it, use `ctx.runQuery` and `ctx.runMutation` instead.\n *\n * @public\n */\nexport interface GenericActionCtx<DataModel extends GenericDataModel> {\n /**\n * Run the Convex query with the given name and arguments.\n *\n * Each `runQuery` call is a separate read transaction. Consider using an\n * {@link internalQuery} to prevent users from calling the query directly.\n *\n * @example\n * ```typescript\n * const user = await ctx.runQuery(internal.users.get, { userId });\n * ```\n *\n * @param query - A {@link FunctionReference} for the query to run.\n * @param args - The arguments to the query function.\n * @returns A promise of the query's result.\n */\n runQuery<Query extends FunctionReference<\"query\", \"public\" | \"internal\">>(\n query: Query,\n ...args: OptionalRestArgs<Query>\n ): Promise<FunctionReturnType<Query>>;\n\n /**\n * Run the Convex mutation with the given name and arguments.\n *\n * Each `runMutation` call is a separate write transaction. Consider using\n * an {@link internalMutation} to prevent users from calling it directly.\n *\n * @example\n * ```typescript\n * await ctx.runMutation(internal.orders.markPaid, { id: orderId });\n * ```\n *\n * @param mutation - A {@link FunctionReference} for the mutation to run.\n * @param args - The arguments to the mutation function.\n * @returns A promise of the mutation's result.\n */\n runMutation<\n Mutation extends FunctionReference<\"mutation\", \"public\" | \"internal\">,\n >(\n mutation: Mutation,\n ...args: OptionalRestArgs<Mutation>\n ): Promise<FunctionReturnType<Mutation>>;\n\n /**\n * Run the Convex action with the given name and arguments.\n *\n * **Important:** Only use `runAction` when you need to cross runtimes\n * (e.g., calling a `\"use node\"` action from the default Convex runtime).\n * For code in the same runtime, extract shared logic into a plain\n * TypeScript helper function instead, `runAction` has significant\n * overhead (separate function call, separate resource allocation).\n *\n * Consider using an {@link internalAction} to prevent users from calling the\n * action directly.\n *\n * @param action - A {@link FunctionReference} for the action to run.\n * @param args - The arguments to the action function.\n * @returns A promise of the action's result.\n */\n runAction<Action extends FunctionReference<\"action\", \"public\" | \"internal\">>(\n action: Action,\n ...args: OptionalRestArgs<Action>\n ): Promise<FunctionReturnType<Action>>;\n\n /**\n * A utility for scheduling Convex functions to run in the future.\n */\n scheduler: Scheduler;\n\n /**\n * Information about the currently authenticated user.\n */\n auth: Auth;\n\n /**\n * A utility for reading and writing files in storage.\n */\n storage: StorageActionWriter;\n\n /**\n * Run a vector search on the given table and index.\n *\n * @param tableName - The name of the table to query.\n * @param indexName - The name of the vector index on the table to query.\n * @param query - A {@link VectorSearchQuery} containing the vector to query,\n * the number of results to return, and any filters.\n * @returns A promise of IDs and scores for the documents with the nearest\n * vectors\n */\n vectorSearch<\n TableName extends TableNamesInDataModel<DataModel>,\n IndexName extends VectorIndexNames<NamedTableInfo<DataModel, TableName>>,\n >(\n tableName: TableName,\n indexName: IndexName,\n query: Expand<\n VectorSearchQuery<NamedTableInfo<DataModel, TableName>, IndexName>\n >,\n ): Promise<Array<{ _id: Id<TableName>; _score: number }>>;\n\n meta: ActionMeta;\n}\n\n/**\n * The default arguments type for a Convex query, mutation, or action function.\n *\n * Convex functions always take an arguments object that maps the argument\n * names to their values.\n *\n * @public\n */\nexport type DefaultFunctionArgs = Record<string, unknown>;\n\n/**\n * The arguments array for a function that takes arguments.\n *\n * This is an array of a single {@link DefaultFunctionArgs} element.\n */\ntype OneArgArray<ArgsObject extends DefaultFunctionArgs = DefaultFunctionArgs> =\n [ArgsObject];\n\n/**\n * The arguments to a function that takes no arguments (just an empty array).\n */\ntype NoArgsArray = [];\n\n/**\n * An array of arguments to a Convex function.\n *\n * Convex functions can take either a single {@link DefaultFunctionArgs} object or no\n * args at all.\n *\n * @public\n */\nexport type ArgsArray = OneArgArray | NoArgsArray;\n\n/**\n * A type for the empty object `{}`.\n *\n * Note that we don't use `type EmptyObject = {}` because that matches every object.\n */\nexport type EmptyObject = Record<string, never>;\n\n/**\n * Convert an {@link ArgsArray} into a single object type.\n *\n * Empty arguments arrays are converted to {@link EmptyObject}.\n * @public\n */\nexport type ArgsArrayToObject<Args extends ArgsArray> =\n Args extends OneArgArray<infer ArgsObject> ? ArgsObject : EmptyObject;\n\n/**\n * A type representing the visibility of a Convex function.\n *\n * @public\n */\nexport type FunctionVisibility = \"public\" | \"internal\";\n\n/**\n * Given a {@link FunctionVisibility}, should this function have `isPublic: true`\n * or `isInternal: true`?\n */\ntype VisibilityProperties<Visiblity extends FunctionVisibility> = {\n /** Phantom type marker; not present at runtime. */\n _visibility: Visiblity;\n} & (Visiblity extends \"public\"\n ? {\n isPublic: true;\n }\n : {\n isInternal: true;\n });\n\n/**\n * A mutation function that is part of this app.\n *\n * You can create a mutation by wrapping your function in\n * {@link mutationGeneric} or {@link internalMutationGeneric} and exporting it.\n *\n * @public\n */\nexport type RegisteredMutation<\n Visibility extends FunctionVisibility,\n Args extends DefaultFunctionArgs,\n Returns,\n> = {\n isConvexFunction: true;\n isMutation: true;\n\n /** @internal */\n invokeMutation(argsStr: string): Promise<string>;\n\n /** @internal */\n exportArgs(): string;\n\n /** @internal */\n exportReturns(): string;\n\n /** @internal */\n _handler: (ctx: GenericMutationCtx<any>, args: Args) => Returns;\n} & VisibilityProperties<Visibility>;\n\n/**\n * A query function that is part of this app.\n *\n * You can create a query by wrapping your function in\n * {@link queryGeneric} or {@link internalQueryGeneric} and exporting it.\n *\n * @public\n */\nexport type RegisteredQuery<\n Visibility extends FunctionVisibility,\n Args extends DefaultFunctionArgs,\n Returns,\n> = {\n isConvexFunction: true;\n isQuery: true;\n\n /** @internal */\n invokeQuery(argsStr: string): Promise<string>;\n\n /** @internal */\n exportArgs(): string;\n\n /** @internal */\n exportReturns(): string;\n\n /** @internal */\n _handler: (ctx: GenericQueryCtx<any>, args: Args) => Returns;\n} & VisibilityProperties<Visibility>;\n\n/**\n * An action that is part of this app.\n *\n * You can create an action by wrapping your function in\n * {@link actionGeneric} or {@link internalActionGeneric} and exporting it.\n *\n * @public\n */\nexport type RegisteredAction<\n Visibility extends FunctionVisibility,\n Args extends DefaultFunctionArgs,\n Returns,\n> = {\n isConvexFunction: true;\n isAction: true;\n\n /** @internal */\n invokeAction(requestId: string, argsStr: string): Promise<string>;\n\n /** @internal */\n exportArgs(): string;\n\n /** @internal */\n exportReturns(): string;\n\n /** @internal */\n _handler: (ctx: GenericActionCtx<any>, args: Args) => Returns;\n} & VisibilityProperties<Visibility>;\n\n/**\n * An HTTP action that is part of this app's public API.\n *\n * You can create public HTTP actions by wrapping your function in\n * {@link httpActionGeneric} and exporting it.\n *\n * @public\n */\nexport type PublicHttpAction = {\n isHttp: true;\n\n /** @internal */\n invokeHttpAction(request: Request): Promise<Response>;\n /** @internal */\n _handler: (ctx: GenericActionCtx<any>, request: Request) => Promise<Response>;\n};\n\n/**\n * @deprecated -- See the type definition for `MutationBuilder` or similar for\n * the types used for defining Convex functions.\n *\n * The definition of a Convex query, mutation, or action function without\n * argument validation.\n *\n * Convex functions always take a context object as their first argument\n * and an (optional) args object as their second argument.\n *\n * This can be written as a function like:\n * ```js\n * import { query } from \"./_generated/server\";\n *\n * export const func = query(({ db }, { arg }) => {...});\n * ```\n * or as an object like:\n *\n * ```js\n * import { query } from \"./_generated/server\";\n *\n * export const func = query({\n * handler: ({ db }, { arg }) => {...},\n * });\n * ```\n * See {@link ValidatedFunction} to add argument validation.\n *\n * @public\n */\nexport type UnvalidatedFunction<Ctx, Args extends ArgsArray, Returns> =\n | ((ctx: Ctx, ...args: Args) => Returns)\n | {\n handler: (ctx: Ctx, ...args: Args) => Returns;\n };\n\n/**\n * @deprecated -- See the type definition for `MutationBuilder` or similar for\n * the types used for defining Convex functions.\n *\n * The definition of a Convex query, mutation, or action function with argument\n * validation.\n *\n * Argument validation allows you to assert that the arguments to this function\n * are the expected type.\n *\n * Example:\n *\n * ```js\n * import { query } from \"./_generated/server\";\n * import { v } from \"convex/values\";\n *\n * export const func = query({\n * args: {\n * arg: v.string()\n * },\n * handler: ({ db }, { arg }) => {...},\n * });\n * ```\n *\n * **For security, argument validation should be added to all public functions in\n * production apps.**\n *\n * See {@link UnvalidatedFunction} for functions without argument validation.\n * @public\n */\nexport interface ValidatedFunction<\n Ctx,\n ArgsValidator extends PropertyValidators,\n Returns,\n> {\n /**\n * A validator for the arguments of this function.\n *\n * This is an object mapping argument names to validators constructed with\n * {@link values.v}.\n *\n * ```js\n * import { v } from \"convex/values\";\n *\n * const args = {\n * stringArg: v.string(),\n * optionalNumberArg: v.optional(v.number()),\n * }\n * ```\n */\n args: ArgsValidator;\n\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator.\n * @returns\n */\n handler: (ctx: Ctx, args: ObjectType<ArgsValidator>) => Returns;\n}\n\n/**\n * There are multiple syntaxes for defining a Convex function:\n * ```\n * - query(async (ctx, args) => {...})\n * - query({ handler: async (ctx, args) => {...} })\n * - query({ args: { a: v.string }, handler: async (ctx, args) => {...} } })\n * - query({ args: { a: v.string }, returns: v.string(), handler: async (ctx, args) => {...} } })\n *```\n *\n * In each of these, we want to correctly infer the type for the arguments and\n * return value, preferring the type derived from a validator if it's provided.\n *\n * To avoid having a separate overload for each, which would show up in error messages,\n * we use the type params -- ArgsValidator, ReturnsValidator, ReturnValue, OneOrZeroArgs.\n *\n * The type for ReturnValue and OneOrZeroArgs are constrained by the type or ArgsValidator and\n * ReturnsValidator if they're present, and inferred from any explicit type annotations to the\n * arguments or return value of the function.\n *\n * Below are a few utility types to get the appropriate type constraints based on\n * an optional validator.\n *\n * Additional tricks:\n * - We use Validator | void instead of Validator | undefined because the latter does\n * not work with `strictNullChecks` since it's equivalent to just `Validator`.\n * - We use a tuple type of length 1 to avoid distribution over the union\n * https://github.com/microsoft/TypeScript/issues/29368#issuecomment-453529532\n */\n\nexport type ReturnValueForOptionalValidator<\n ReturnsValidator extends Validator<any, any, any> | PropertyValidators | void,\n> = [ReturnsValidator] extends [Validator<any, any, any>]\n ? ValidatorTypeToReturnType<Infer<ReturnsValidator>>\n : [ReturnsValidator] extends [PropertyValidators]\n ? ValidatorTypeToReturnType<ObjectType<ReturnsValidator>>\n : any;\n\nexport type ArgsArrayForOptionalValidator<\n ArgsValidator extends GenericValidator | PropertyValidators | void,\n> = [ArgsValidator] extends [Validator<any, any, any>]\n ? OneArgArray<Infer<ArgsValidator>>\n : [ArgsValidator] extends [PropertyValidators]\n ? OneArgArray<ObjectType<ArgsValidator>>\n : ArgsArray;\n\nexport type DefaultArgsForOptionalValidator<\n ArgsValidator extends GenericValidator | PropertyValidators | void,\n> = [ArgsValidator] extends [Validator<any, any, any>]\n ? [Infer<ArgsValidator>]\n : [ArgsValidator] extends [PropertyValidators]\n ? [ObjectType<ArgsValidator>]\n : OneArgArray;\n\n/**\n * Internal type helper used by Convex code generation.\n *\n * Used to give {@link mutationGeneric} a type specific to your data model.\n * @public\n */\nexport type MutationBuilder<\n DataModel extends GenericDataModel,\n Visibility extends FunctionVisibility,\n> = {\n <\n ArgsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnValue extends ReturnValueForOptionalValidator<ReturnsValidator> = any,\n OneOrZeroArgs extends\n ArgsArrayForOptionalValidator<ArgsValidator> = DefaultArgsForOptionalValidator<ArgsValidator>,\n >(\n mutation:\n | {\n /**\n * Argument validation.\n *\n * Examples:\n *\n * ```\n * args: {}\n * args: { input: v.optional(v.number()) }\n * args: { message: v.string(), author: v.id(\"authors\") }\n * args: { messages: v.array(v.string()) }\n * ```\n */\n args?: ArgsValidator;\n /**\n * The return value validator.\n *\n * Examples:\n *\n * ```\n * returns: v.null()\n * returns: v.string()\n * returns: { message: v.string(), author: v.id(\"authors\") }\n * returns: v.array(v.string())\n * ```\n */\n returns?: ReturnsValidator;\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n handler: (\n ctx: GenericMutationCtx<DataModel>,\n ...args: OneOrZeroArgs\n ) => ReturnValue;\n }\n | {\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n (\n ctx: GenericMutationCtx<DataModel>,\n ...args: OneOrZeroArgs\n ): ReturnValue;\n },\n ): RegisteredMutation<\n Visibility,\n ArgsArrayToObject<OneOrZeroArgs>,\n ReturnValue\n >;\n};\n\n/**\n * Internal type helper used by Convex code generation.\n *\n * Used to give {@link mutationGeneric} a type specific to your data model.\n * @public\n */\nexport type MutationBuilderWithTable<\n DataModel extends GenericDataModel,\n Visibility extends FunctionVisibility,\n> = {\n <\n ArgsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnValue extends ReturnValueForOptionalValidator<ReturnsValidator> = any,\n OneOrZeroArgs extends\n ArgsArrayForOptionalValidator<ArgsValidator> = DefaultArgsForOptionalValidator<ArgsValidator>,\n >(\n mutation:\n | {\n /**\n * Argument validation.\n *\n * Examples:\n *\n * ```\n * args: {}\n * args: { input: v.optional(v.number()) }\n * args: { message: v.string(), author: v.id(\"authors\") }\n * args: { messages: v.array(v.string()) }\n * ```\n */\n args?: ArgsValidator;\n /**\n * The return value validator.\n *\n * Examples:\n *\n * ```\n * returns: v.null()\n * returns: v.string()\n * returns: { message: v.string(), author: v.id(\"authors\") }\n * returns: v.array(v.string())\n * ```\n */\n returns?: ReturnsValidator;\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n handler: (\n ctx: GenericMutationCtxWithTable<DataModel>,\n ...args: OneOrZeroArgs\n ) => ReturnValue;\n }\n | {\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n (\n ctx: GenericMutationCtxWithTable<DataModel>,\n ...args: OneOrZeroArgs\n ): ReturnValue;\n },\n ): RegisteredMutation<\n Visibility,\n ArgsArrayToObject<OneOrZeroArgs>,\n ReturnValue\n >;\n};\n\n/**\n * Internal type helper used by Convex code generation.\n *\n * Used to give {@link queryGeneric} a type specific to your data model.\n * @public\n */\nexport type QueryBuilder<\n DataModel extends GenericDataModel,\n Visibility extends FunctionVisibility,\n> = {\n <\n ArgsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnValue extends ReturnValueForOptionalValidator<ReturnsValidator> = any,\n OneOrZeroArgs extends\n ArgsArrayForOptionalValidator<ArgsValidator> = DefaultArgsForOptionalValidator<ArgsValidator>,\n >(\n query:\n | {\n /**\n * Argument validation.\n *\n * Examples:\n *\n * ```\n * args: {}\n * args: { input: v.optional(v.number()) }\n * args: { message: v.string(), author: v.id(\"authors\") }\n * args: { messages: v.array(v.string()) }\n * ```\n */\n args?: ArgsValidator;\n /**\n * The return value validator.\n *\n * Examples:\n *\n * ```\n * returns: v.null()\n * returns: v.string()\n * returns: { message: v.string(), author: v.id(\"authors\") }\n * returns: v.array(v.string())\n * ```\n */\n returns?: ReturnsValidator;\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n handler: (\n ctx: GenericQueryCtx<DataModel>,\n ...args: OneOrZeroArgs\n ) => ReturnValue;\n }\n | {\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n (\n ctx: GenericQueryCtx<DataModel>,\n ...args: OneOrZeroArgs\n ): ReturnValue;\n },\n ): RegisteredQuery<Visibility, ArgsArrayToObject<OneOrZeroArgs>, ReturnValue>;\n};\n\n/**\n * Internal type helper used by Convex code generation.\n *\n * Used to give {@link queryGeneric} a type specific to your data model.\n * @public\n */\nexport type QueryBuilderWithTable<\n DataModel extends GenericDataModel,\n Visibility extends FunctionVisibility,\n> = {\n <\n ArgsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnValue extends ReturnValueForOptionalValidator<ReturnsValidator> = any,\n OneOrZeroArgs extends\n ArgsArrayForOptionalValidator<ArgsValidator> = DefaultArgsForOptionalValidator<ArgsValidator>,\n >(\n query:\n | {\n /**\n * Argument validation.\n *\n * Examples:\n *\n * ```\n * args: {}\n * args: { input: v.optional(v.number()) }\n * args: { message: v.string(), author: v.id(\"authors\") }\n * args: { messages: v.array(v.string()) }\n * ```\n */\n args?: ArgsValidator;\n /**\n * The return value validator.\n *\n * Examples:\n *\n * ```\n * returns: v.null()\n * returns: v.string()\n * returns: { message: v.string(), author: v.id(\"authors\") }\n * returns: v.array(v.string())\n * ```\n */\n returns?: ReturnsValidator;\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n handler: (\n ctx: GenericQueryCtxWithTable<DataModel>,\n ...args: OneOrZeroArgs\n ) => ReturnValue;\n }\n | {\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n (\n ctx: GenericQueryCtxWithTable<DataModel>,\n ...args: OneOrZeroArgs\n ): ReturnValue;\n },\n ): RegisteredQuery<Visibility, ArgsArrayToObject<OneOrZeroArgs>, ReturnValue>;\n};\n\n/**\n * Internal type helper used by Convex code generation.\n *\n * Used to give {@link actionGeneric} a type specific to your data model.\n * @public\n */\nexport type ActionBuilder<\n DataModel extends GenericDataModel,\n Visibility extends FunctionVisibility,\n> = {\n <\n ArgsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnValue extends ReturnValueForOptionalValidator<ReturnsValidator> = any,\n OneOrZeroArgs extends\n ArgsArrayForOptionalValidator<ArgsValidator> = DefaultArgsForOptionalValidator<ArgsValidator>,\n >(\n func:\n | {\n /**\n * Argument validation.\n *\n * Examples:\n *\n * ```\n * args: {}\n * args: { input: v.optional(v.number()) }\n * args: { message: v.string(), author: v.id(\"authors\") }\n * args: { messages: v.array(v.string()) }\n * ```\n *\n */\n args?: ArgsValidator;\n /**\n * The return value validator.\n *\n * Examples:\n *\n * ```\n * returns: v.null()\n * returns: v.string()\n * returns: { message: v.string(), author: v.id(\"authors\") }\n * returns: v.array(v.string())\n * ```\n */\n returns?: ReturnsValidator;\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n handler: (\n ctx: GenericActionCtx<DataModel>,\n ...args: OneOrZeroArgs\n ) => ReturnValue;\n }\n | {\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n (\n ctx: GenericActionCtx<DataModel>,\n ...args: OneOrZeroArgs\n ): ReturnValue;\n },\n ): RegisteredAction<\n Visibility,\n ArgsArrayToObject<OneOrZeroArgs>,\n ReturnValue\n >;\n};\n\n/**\n * Internal type helper used by Convex code generation.\n *\n * Used to give {@link httpActionGeneric} a type specific to your data model\n * and functions.\n * @public\n */\nexport type HttpActionBuilder = (\n func: (ctx: GenericActionCtx<any>, request: Request) => Promise<Response>,\n) => PublicHttpAction;\n"],
4
+ "sourcesContent": ["import {\n Auth,\n GenericDatabaseReader,\n GenericDatabaseReaderWithTable,\n GenericDatabaseWriter,\n GenericDatabaseWriterWithTable,\n StorageActionWriter,\n StorageReader,\n StorageWriter,\n} from \"./index.js\";\nimport {\n ActionMeta,\n MutationMeta,\n QueryMeta,\n TransactionLimits,\n} from \"./meta.js\";\nimport {\n ArgsAndOptions,\n FunctionReference,\n FunctionReturnType,\n OptionalRestArgs,\n ValidatorTypeToReturnType,\n} from \"../server/api.js\";\nimport {\n GenericValidator,\n Infer,\n ObjectType,\n PropertyValidators,\n} from \"../values/validator.js\";\nimport { Id } from \"../values/value.js\";\nimport {\n GenericDataModel,\n NamedTableInfo,\n TableNamesInDataModel,\n VectorIndexNames,\n} from \"./data_model.js\";\nimport { Scheduler } from \"./scheduler.js\";\nimport { VectorSearchQuery } from \"./vector_search.js\";\nimport { Expand } from \"../type_utils.js\";\nimport { Validator } from \"../values/validators.js\";\n\n/**\n * A set of services for use within Convex mutation functions.\n *\n * The mutation context is passed as the first argument to any Convex mutation\n * function run on the server. Mutations run **transactionally**, all reads\n * and writes within a single mutation are atomic and isolated.\n *\n * You should generally use the `MutationCtx` type from\n * `\"./_generated/server\"`.\n *\n * @example\n * ```typescript\n * import { mutation } from \"./_generated/server\";\n * import { internal } from \"./_generated/api\";\n * import { v } from \"convex/values\";\n *\n * export const createTask = mutation({\n * args: { text: v.string() },\n * returns: v.id(\"tasks\"),\n * handler: async (ctx, args) => {\n * // ctx.db: read and write documents\n * const taskId = await ctx.db.insert(\"tasks\", { text: args.text, completed: false });\n *\n * // ctx.auth: check the authenticated user\n * const identity = await ctx.auth.getUserIdentity();\n *\n * // ctx.scheduler: schedule functions for later\n * await ctx.scheduler.runAfter(0, internal.notifications.send, { taskId });\n *\n * return taskId;\n * },\n * });\n * ```\n *\n * @public\n */\nexport interface GenericMutationCtx<DataModel extends GenericDataModel> {\n /**\n * A utility for reading and writing data in the database.\n *\n * Use `ctx.db.insert()`, `ctx.db.patch()`, `ctx.db.replace()`, and\n * `ctx.db.delete()` to write data. Use `ctx.db.get()` and `ctx.db.query()`\n * to read data. All operations within a mutation are atomic.\n */\n db: GenericDatabaseWriter<DataModel>;\n\n /**\n * Information about the currently authenticated user.\n *\n * Call `await ctx.auth.getUserIdentity()` to get the current user's identity,\n * or `null` if the user is not authenticated.\n */\n auth: Auth;\n\n /**\n * A utility for reading and writing files in storage.\n *\n * Use `ctx.storage.generateUploadUrl()` to create an upload URL for clients,\n * `ctx.storage.getUrl(storageId)` to get a URL for a stored file,\n * or `ctx.storage.delete(storageId)` to remove one.\n */\n storage: StorageWriter;\n\n /**\n * A utility for scheduling Convex functions to run in the future.\n *\n * @example\n * ```typescript\n * // Schedule an action to run immediately after this mutation commits:\n * await ctx.scheduler.runAfter(0, internal.emails.sendWelcome, { userId });\n *\n * // Schedule a cleanup to run in 24 hours:\n * await ctx.scheduler.runAfter(24 * 60 * 60 * 1000, internal.tasks.cleanup, {});\n * ```\n */\n scheduler: Scheduler;\n\n /**\n * Call a query function within the same transaction.\n *\n * The query runs within the same transaction as the calling mutation,\n * seeing a consistent snapshot of the database. Requires a\n * {@link FunctionReference} (e.g., `api.myModule.myQuery` or\n * `internal.myModule.myQuery`).\n *\n * NOTE: Often you can extract shared logic into a helper function instead.\n * `runQuery` incurs overhead of running argument and return value validation,\n * and creating a new isolated JS context.\n *\n * @example\n * ```typescript\n * const user = await ctx.runQuery(internal.users.getUser, { userId });\n * ```\n */\n runQuery: <Query extends FunctionReference<\"query\", \"public\" | \"internal\">>(\n query: Query,\n ...args: ArgsAndOptions<Query, AdvancedRunQueryOptions>\n ) => Promise<FunctionReturnType<Query>>;\n\n /**\n * Call a mutation function within the same transaction.\n *\n * The mutation runs in a sub-transaction, so if it throws an error, all of\n * its writes will be rolled back. Requires a {@link FunctionReference}.\n *\n * NOTE: Often you can extract shared logic into a helper function instead.\n * `runMutation` incurs overhead of running argument and return value\n * validation, and creating a new isolated JS context.\n */\n runMutation: <\n Mutation extends FunctionReference<\"mutation\", \"public\" | \"internal\">,\n >(\n mutation: Mutation,\n ...args: ArgsAndOptions<Mutation, { transactionLimits?: TransactionLimits }>\n ) => Promise<FunctionReturnType<Mutation>>;\n\n meta: MutationMeta;\n}\n\n/**\n * A set of services for use within Convex mutation functions.\n *\n * The mutation context is passed as the first argument to any Convex mutation\n * function run on the server.\n *\n * You should generally use the `MutationCtx` type from\n * `\"./_generated/server\"`.\n *\n * @public\n */\nexport type GenericMutationCtxWithTable<DataModel extends GenericDataModel> =\n Omit<GenericMutationCtx<DataModel>, \"db\"> & {\n db: GenericDatabaseWriterWithTable<DataModel>;\n };\n\n/**\n * A set of services for use within Convex query functions.\n *\n * The query context is passed as the first argument to any Convex query\n * function run on the server. Queries are **read-only**, they can read from\n * the database but cannot write. They are also **reactive**, when used with\n * `useQuery` on the client, the result automatically updates when data changes.\n *\n * You should generally use the `QueryCtx` type from\n * `\"./_generated/server\"`.\n *\n * @example\n * ```typescript\n * import { query } from \"./_generated/server\";\n * import { v } from \"convex/values\";\n *\n * export const listTasks = query({\n * args: {},\n * returns: v.array(v.object({\n * _id: v.id(\"tasks\"),\n * _creationTime: v.number(),\n * text: v.string(),\n * completed: v.boolean(),\n * })),\n * handler: async (ctx, args) => {\n * // ctx.db: read-only database access\n * return await ctx.db.query(\"tasks\").order(\"desc\").take(100);\n * },\n * });\n * ```\n *\n * @public\n */\nexport interface GenericQueryCtx<DataModel extends GenericDataModel> {\n /**\n * A utility for reading data in the database.\n *\n * Use `ctx.db.get(table, id)` to fetch a single document by ID, or\n * `ctx.db.query(\"tableName\")` to query multiple documents with filtering\n * and ordering. Queries are read-only, no write methods are available.\n */\n db: GenericDatabaseReader<DataModel>;\n\n /**\n * Information about the currently authenticated user.\n *\n * Call `await ctx.auth.getUserIdentity()` to get the current user's identity,\n * or `null` if the user is not authenticated.\n */\n auth: Auth;\n\n /**\n * A utility for reading files in storage.\n *\n * Use `ctx.storage.getUrl(storageId)` to get a URL for a stored file.\n */\n storage: StorageReader;\n\n /**\n * Call a query function within the same transaction.\n *\n * The query runs within the same read snapshot. Requires a\n * {@link FunctionReference} (e.g., `api.myModule.myQuery` or\n * `internal.myModule.myQuery`).\n *\n * NOTE: Often you can extract shared logic into a helper function instead.\n * `runQuery` incurs overhead of running argument and return value validation,\n * and creating a new isolated JS context.\n */\n runQuery: <Query extends FunctionReference<\"query\", \"public\" | \"internal\">>(\n query: Query,\n ...args: ArgsAndOptions<Query, { transactionLimits?: TransactionLimits }>\n ) => Promise<FunctionReturnType<Query>>;\n\n meta: QueryMeta;\n}\n\n/**\n * A set of services for use within Convex query functions.\n *\n * The query context is passed as the first argument to any Convex query\n * function run on the server.\n *\n * This differs from the {@link MutationCtx} because all of the services are\n * read-only.\n *\n *\n * @public\n */\nexport type GenericQueryCtxWithTable<DataModel extends GenericDataModel> = Omit<\n GenericQueryCtx<DataModel>,\n \"db\"\n> & {\n db: GenericDatabaseReaderWithTable<DataModel>;\n};\n\n/**\n * A set of services for use within Convex action functions.\n *\n * The action context is passed as the first argument to any Convex action\n * run on the server. Actions can call external APIs and use Node.js libraries,\n * but do **not** have direct database access (`ctx.db` is not available).\n * Use `ctx.runQuery` and `ctx.runMutation` to interact with the database.\n *\n * You should generally use the `ActionCtx` type from\n * `\"./_generated/server\"`.\n *\n * @example\n * ```typescript\n * import { action } from \"./_generated/server\";\n * import { internal } from \"./_generated/api\";\n * import { v } from \"convex/values\";\n *\n * export const processPayment = action({\n * args: { orderId: v.id(\"orders\"), amount: v.number() },\n * returns: v.null(),\n * handler: async (ctx, args) => {\n * // Read data via ctx.runQuery:\n * const order = await ctx.runQuery(internal.orders.get, { id: args.orderId });\n *\n * // Call external API:\n * const result = await fetch(\"https://api.stripe.com/v1/charges\", { ... });\n *\n * // Write results back via ctx.runMutation:\n * await ctx.runMutation(internal.orders.markPaid, { id: args.orderId });\n *\n * return null;\n * },\n * });\n * ```\n *\n * **Common mistake:** `ctx.db` is not available in actions. Do not try to\n * access it, use `ctx.runQuery` and `ctx.runMutation` instead.\n *\n * @public\n */\nexport interface GenericActionCtx<DataModel extends GenericDataModel> {\n /**\n * Run the Convex query with the given name and arguments.\n *\n * Each `runQuery` call is a separate read transaction. Consider using an\n * {@link internalQuery} to prevent users from calling the query directly.\n *\n * @example\n * ```typescript\n * const user = await ctx.runQuery(internal.users.get, { userId });\n * ```\n *\n * @param query - A {@link FunctionReference} for the query to run.\n * @param args - The arguments to the query function.\n * @returns A promise of the query's result.\n */\n runQuery<Query extends FunctionReference<\"query\", \"public\" | \"internal\">>(\n query: Query,\n ...args: OptionalRestArgs<Query>\n ): Promise<FunctionReturnType<Query>>;\n\n /**\n * Run the Convex mutation with the given name and arguments.\n *\n * Each `runMutation` call is a separate write transaction. Consider using\n * an {@link internalMutation} to prevent users from calling it directly.\n *\n * @example\n * ```typescript\n * await ctx.runMutation(internal.orders.markPaid, { id: orderId });\n * ```\n *\n * @param mutation - A {@link FunctionReference} for the mutation to run.\n * @param args - The arguments to the mutation function.\n * @returns A promise of the mutation's result.\n */\n runMutation<\n Mutation extends FunctionReference<\"mutation\", \"public\" | \"internal\">,\n >(\n mutation: Mutation,\n ...args: OptionalRestArgs<Mutation>\n ): Promise<FunctionReturnType<Mutation>>;\n\n /**\n * Run the Convex action with the given name and arguments.\n *\n * **Important:** Only use `runAction` when you need to cross runtimes\n * (e.g., calling a `\"use node\"` action from the default Convex runtime).\n * For code in the same runtime, extract shared logic into a plain\n * TypeScript helper function instead, `runAction` has significant\n * overhead (separate function call, separate resource allocation).\n *\n * Consider using an {@link internalAction} to prevent users from calling the\n * action directly.\n *\n * @param action - A {@link FunctionReference} for the action to run.\n * @param args - The arguments to the action function.\n * @returns A promise of the action's result.\n */\n runAction<Action extends FunctionReference<\"action\", \"public\" | \"internal\">>(\n action: Action,\n ...args: OptionalRestArgs<Action>\n ): Promise<FunctionReturnType<Action>>;\n\n /**\n * A utility for scheduling Convex functions to run in the future.\n */\n scheduler: Scheduler;\n\n /**\n * Information about the currently authenticated user.\n */\n auth: Auth;\n\n /**\n * A utility for reading and writing files in storage.\n */\n storage: StorageActionWriter;\n\n /**\n * Run a vector search on the given table and index.\n *\n * @param tableName - The name of the table to query.\n * @param indexName - The name of the vector index on the table to query.\n * @param query - A {@link VectorSearchQuery} containing the vector to query,\n * the number of results to return, and any filters.\n * @returns A promise of IDs and scores for the documents with the nearest\n * vectors\n */\n vectorSearch<\n TableName extends TableNamesInDataModel<DataModel>,\n IndexName extends VectorIndexNames<NamedTableInfo<DataModel, TableName>>,\n >(\n tableName: TableName,\n indexName: IndexName,\n query: Expand<\n VectorSearchQuery<NamedTableInfo<DataModel, TableName>, IndexName>\n >,\n ): Promise<Array<{ _id: Id<TableName>; _score: number }>>;\n\n meta: ActionMeta;\n}\n\n/**\n * The default arguments type for a Convex query, mutation, or action function.\n *\n * Convex functions always take an arguments object that maps the argument\n * names to their values.\n *\n * @public\n */\nexport type DefaultFunctionArgs = Record<string, unknown>;\n\n/**\n * The arguments array for a function that takes arguments.\n *\n * This is an array of a single {@link DefaultFunctionArgs} element.\n */\ntype OneArgArray<ArgsObject extends DefaultFunctionArgs = DefaultFunctionArgs> =\n [ArgsObject];\n\n/**\n * The arguments to a function that takes no arguments (just an empty array).\n */\ntype NoArgsArray = [];\n\n/**\n * An array of arguments to a Convex function.\n *\n * Convex functions can take either a single {@link DefaultFunctionArgs} object or no\n * args at all.\n *\n * @public\n */\nexport type ArgsArray = OneArgArray | NoArgsArray;\n\n/**\n * A type for the empty object `{}`.\n *\n * Note that we don't use `type EmptyObject = {}` because that matches every object.\n */\nexport type EmptyObject = Record<string, never>;\n\n/**\n * Convert an {@link ArgsArray} into a single object type.\n *\n * Empty arguments arrays are converted to {@link EmptyObject}.\n * @public\n */\nexport type ArgsArrayToObject<Args extends ArgsArray> =\n Args extends OneArgArray<infer ArgsObject> ? ArgsObject : EmptyObject;\n\n/**\n * A type representing the visibility of a Convex function.\n *\n * @public\n */\nexport type FunctionVisibility = \"public\" | \"internal\";\n\n/**\n * Given a {@link FunctionVisibility}, should this function have `isPublic: true`\n * or `isInternal: true`?\n */\ntype VisibilityProperties<Visiblity extends FunctionVisibility> = {\n /** Phantom type marker; not present at runtime. */\n _visibility: Visiblity;\n} & (Visiblity extends \"public\"\n ? {\n isPublic: true;\n }\n : {\n isInternal: true;\n });\n\n/**\n * A mutation function that is part of this app.\n *\n * You can create a mutation by wrapping your function in\n * {@link mutationGeneric} or {@link internalMutationGeneric} and exporting it.\n *\n * @public\n */\nexport type RegisteredMutation<\n Visibility extends FunctionVisibility,\n Args extends DefaultFunctionArgs,\n Returns,\n> = {\n isConvexFunction: true;\n isMutation: true;\n\n /** @internal */\n invokeMutation(argsStr: string): Promise<string>;\n\n /** @internal */\n exportArgs(): string;\n\n /** @internal */\n exportReturns(): string;\n\n /** @internal */\n _handler: (ctx: GenericMutationCtx<any>, args: Args) => Returns;\n} & VisibilityProperties<Visibility>;\n\n/**\n * A query function that is part of this app.\n *\n * You can create a query by wrapping your function in\n * {@link queryGeneric} or {@link internalQueryGeneric} and exporting it.\n *\n * @public\n */\nexport type RegisteredQuery<\n Visibility extends FunctionVisibility,\n Args extends DefaultFunctionArgs,\n Returns,\n> = {\n isConvexFunction: true;\n isQuery: true;\n\n /** @internal */\n invokeQuery(argsStr: string): Promise<string>;\n\n /** @internal */\n exportArgs(): string;\n\n /** @internal */\n exportReturns(): string;\n\n /** @internal */\n _handler: (ctx: GenericQueryCtx<any>, args: Args) => Returns;\n} & VisibilityProperties<Visibility>;\n\n/**\n * An action that is part of this app.\n *\n * You can create an action by wrapping your function in\n * {@link actionGeneric} or {@link internalActionGeneric} and exporting it.\n *\n * @public\n */\nexport type RegisteredAction<\n Visibility extends FunctionVisibility,\n Args extends DefaultFunctionArgs,\n Returns,\n> = {\n isConvexFunction: true;\n isAction: true;\n\n /** @internal */\n invokeAction(requestId: string, argsStr: string): Promise<string>;\n\n /** @internal */\n exportArgs(): string;\n\n /** @internal */\n exportReturns(): string;\n\n /** @internal */\n _handler: (ctx: GenericActionCtx<any>, args: Args) => Returns;\n} & VisibilityProperties<Visibility>;\n\n/**\n * An HTTP action that is part of this app's public API.\n *\n * You can create public HTTP actions by wrapping your function in\n * {@link httpActionGeneric} and exporting it.\n *\n * @public\n */\nexport type PublicHttpAction = {\n isHttp: true;\n\n /** @internal */\n invokeHttpAction(request: Request): Promise<Response>;\n /** @internal */\n _handler: (ctx: GenericActionCtx<any>, request: Request) => Promise<Response>;\n};\n\n/**\n * @deprecated -- See the type definition for `MutationBuilder` or similar for\n * the types used for defining Convex functions.\n *\n * The definition of a Convex query, mutation, or action function without\n * argument validation.\n *\n * Convex functions always take a context object as their first argument\n * and an (optional) args object as their second argument.\n *\n * This can be written as a function like:\n * ```js\n * import { query } from \"./_generated/server\";\n *\n * export const func = query(({ db }, { arg }) => {...});\n * ```\n * or as an object like:\n *\n * ```js\n * import { query } from \"./_generated/server\";\n *\n * export const func = query({\n * handler: ({ db }, { arg }) => {...},\n * });\n * ```\n * See {@link ValidatedFunction} to add argument validation.\n *\n * @public\n */\nexport type UnvalidatedFunction<Ctx, Args extends ArgsArray, Returns> =\n | ((ctx: Ctx, ...args: Args) => Returns)\n | {\n handler: (ctx: Ctx, ...args: Args) => Returns;\n };\n\n/**\n * @deprecated -- See the type definition for `MutationBuilder` or similar for\n * the types used for defining Convex functions.\n *\n * The definition of a Convex query, mutation, or action function with argument\n * validation.\n *\n * Argument validation allows you to assert that the arguments to this function\n * are the expected type.\n *\n * Example:\n *\n * ```js\n * import { query } from \"./_generated/server\";\n * import { v } from \"convex/values\";\n *\n * export const func = query({\n * args: {\n * arg: v.string()\n * },\n * handler: ({ db }, { arg }) => {...},\n * });\n * ```\n *\n * **For security, argument validation should be added to all public functions in\n * production apps.**\n *\n * See {@link UnvalidatedFunction} for functions without argument validation.\n * @public\n */\nexport interface ValidatedFunction<\n Ctx,\n ArgsValidator extends PropertyValidators,\n Returns,\n> {\n /**\n * A validator for the arguments of this function.\n *\n * This is an object mapping argument names to validators constructed with\n * {@link values.v}.\n *\n * ```js\n * import { v } from \"convex/values\";\n *\n * const args = {\n * stringArg: v.string(),\n * optionalNumberArg: v.optional(v.number()),\n * }\n * ```\n */\n args: ArgsValidator;\n\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator.\n * @returns\n */\n handler: (ctx: Ctx, args: ObjectType<ArgsValidator>) => Returns;\n}\n\n/**\n * There are multiple syntaxes for defining a Convex function:\n * ```\n * - query(async (ctx, args) => {...})\n * - query({ handler: async (ctx, args) => {...} })\n * - query({ args: { a: v.string }, handler: async (ctx, args) => {...} } })\n * - query({ args: { a: v.string }, returns: v.string(), handler: async (ctx, args) => {...} } })\n *```\n *\n * In each of these, we want to correctly infer the type for the arguments and\n * return value, preferring the type derived from a validator if it's provided.\n *\n * To avoid having a separate overload for each, which would show up in error messages,\n * we use the type params -- ArgsValidator, ReturnsValidator, ReturnValue, OneOrZeroArgs.\n *\n * The type for ReturnValue and OneOrZeroArgs are constrained by the type or ArgsValidator and\n * ReturnsValidator if they're present, and inferred from any explicit type annotations to the\n * arguments or return value of the function.\n *\n * Below are a few utility types to get the appropriate type constraints based on\n * an optional validator.\n *\n * Additional tricks:\n * - We use Validator | void instead of Validator | undefined because the latter does\n * not work with `strictNullChecks` since it's equivalent to just `Validator`.\n * - We use a tuple type of length 1 to avoid distribution over the union\n * https://github.com/microsoft/TypeScript/issues/29368#issuecomment-453529532\n */\n\nexport type ReturnValueForOptionalValidator<\n ReturnsValidator extends Validator<any, any, any> | PropertyValidators | void,\n> = [ReturnsValidator] extends [Validator<any, any, any>]\n ? ValidatorTypeToReturnType<Infer<ReturnsValidator>>\n : [ReturnsValidator] extends [PropertyValidators]\n ? ValidatorTypeToReturnType<ObjectType<ReturnsValidator>>\n : any;\n\nexport type ArgsArrayForOptionalValidator<\n ArgsValidator extends GenericValidator | PropertyValidators | void,\n> = [ArgsValidator] extends [Validator<any, any, any>]\n ? OneArgArray<Infer<ArgsValidator>>\n : [ArgsValidator] extends [PropertyValidators]\n ? OneArgArray<ObjectType<ArgsValidator>>\n : ArgsArray;\n\nexport type DefaultArgsForOptionalValidator<\n ArgsValidator extends GenericValidator | PropertyValidators | void,\n> = [ArgsValidator] extends [Validator<any, any, any>]\n ? [Infer<ArgsValidator>]\n : [ArgsValidator] extends [PropertyValidators]\n ? [ObjectType<ArgsValidator>]\n : OneArgArray;\n\n/**\n * Internal type helper used by Convex code generation.\n *\n * Used to give {@link mutationGeneric} a type specific to your data model.\n * @public\n */\nexport type MutationBuilder<\n DataModel extends GenericDataModel,\n Visibility extends FunctionVisibility,\n> = {\n <\n ArgsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnValue extends ReturnValueForOptionalValidator<ReturnsValidator> = any,\n OneOrZeroArgs extends\n ArgsArrayForOptionalValidator<ArgsValidator> = DefaultArgsForOptionalValidator<ArgsValidator>,\n >(\n mutation:\n | {\n /**\n * Argument validation.\n *\n * Examples:\n *\n * ```\n * args: {}\n * args: { input: v.optional(v.number()) }\n * args: { message: v.string(), author: v.id(\"authors\") }\n * args: { messages: v.array(v.string()) }\n * ```\n */\n args?: ArgsValidator;\n /**\n * The return value validator.\n *\n * Examples:\n *\n * ```\n * returns: v.null()\n * returns: v.string()\n * returns: { message: v.string(), author: v.id(\"authors\") }\n * returns: v.array(v.string())\n * ```\n */\n returns?: ReturnsValidator;\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n handler: (\n ctx: GenericMutationCtx<DataModel>,\n ...args: OneOrZeroArgs\n ) => ReturnValue;\n }\n | {\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n (\n ctx: GenericMutationCtx<DataModel>,\n ...args: OneOrZeroArgs\n ): ReturnValue;\n },\n ): RegisteredMutation<\n Visibility,\n ArgsArrayToObject<OneOrZeroArgs>,\n ReturnValue\n >;\n};\n\n/**\n * Internal type helper used by Convex code generation.\n *\n * Used to give {@link mutationGeneric} a type specific to your data model.\n * @public\n */\nexport type MutationBuilderWithTable<\n DataModel extends GenericDataModel,\n Visibility extends FunctionVisibility,\n> = {\n <\n ArgsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnValue extends ReturnValueForOptionalValidator<ReturnsValidator> = any,\n OneOrZeroArgs extends\n ArgsArrayForOptionalValidator<ArgsValidator> = DefaultArgsForOptionalValidator<ArgsValidator>,\n >(\n mutation:\n | {\n /**\n * Argument validation.\n *\n * Examples:\n *\n * ```\n * args: {}\n * args: { input: v.optional(v.number()) }\n * args: { message: v.string(), author: v.id(\"authors\") }\n * args: { messages: v.array(v.string()) }\n * ```\n */\n args?: ArgsValidator;\n /**\n * The return value validator.\n *\n * Examples:\n *\n * ```\n * returns: v.null()\n * returns: v.string()\n * returns: { message: v.string(), author: v.id(\"authors\") }\n * returns: v.array(v.string())\n * ```\n */\n returns?: ReturnsValidator;\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n handler: (\n ctx: GenericMutationCtxWithTable<DataModel>,\n ...args: OneOrZeroArgs\n ) => ReturnValue;\n }\n | {\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n (\n ctx: GenericMutationCtxWithTable<DataModel>,\n ...args: OneOrZeroArgs\n ): ReturnValue;\n },\n ): RegisteredMutation<\n Visibility,\n ArgsArrayToObject<OneOrZeroArgs>,\n ReturnValue\n >;\n};\n\n/**\n * Internal type helper used by Convex code generation.\n *\n * Used to give {@link queryGeneric} a type specific to your data model.\n * @public\n */\nexport type QueryBuilder<\n DataModel extends GenericDataModel,\n Visibility extends FunctionVisibility,\n> = {\n <\n ArgsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnValue extends ReturnValueForOptionalValidator<ReturnsValidator> = any,\n OneOrZeroArgs extends\n ArgsArrayForOptionalValidator<ArgsValidator> = DefaultArgsForOptionalValidator<ArgsValidator>,\n >(\n query:\n | {\n /**\n * Argument validation.\n *\n * Examples:\n *\n * ```\n * args: {}\n * args: { input: v.optional(v.number()) }\n * args: { message: v.string(), author: v.id(\"authors\") }\n * args: { messages: v.array(v.string()) }\n * ```\n */\n args?: ArgsValidator;\n /**\n * The return value validator.\n *\n * Examples:\n *\n * ```\n * returns: v.null()\n * returns: v.string()\n * returns: { message: v.string(), author: v.id(\"authors\") }\n * returns: v.array(v.string())\n * ```\n */\n returns?: ReturnsValidator;\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n handler: (\n ctx: GenericQueryCtx<DataModel>,\n ...args: OneOrZeroArgs\n ) => ReturnValue;\n }\n | {\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n (\n ctx: GenericQueryCtx<DataModel>,\n ...args: OneOrZeroArgs\n ): ReturnValue;\n },\n ): RegisteredQuery<Visibility, ArgsArrayToObject<OneOrZeroArgs>, ReturnValue>;\n};\n\n/**\n * Internal type helper used by Convex code generation.\n *\n * Used to give {@link queryGeneric} a type specific to your data model.\n * @public\n */\nexport type QueryBuilderWithTable<\n DataModel extends GenericDataModel,\n Visibility extends FunctionVisibility,\n> = {\n <\n ArgsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnValue extends ReturnValueForOptionalValidator<ReturnsValidator> = any,\n OneOrZeroArgs extends\n ArgsArrayForOptionalValidator<ArgsValidator> = DefaultArgsForOptionalValidator<ArgsValidator>,\n >(\n query:\n | {\n /**\n * Argument validation.\n *\n * Examples:\n *\n * ```\n * args: {}\n * args: { input: v.optional(v.number()) }\n * args: { message: v.string(), author: v.id(\"authors\") }\n * args: { messages: v.array(v.string()) }\n * ```\n */\n args?: ArgsValidator;\n /**\n * The return value validator.\n *\n * Examples:\n *\n * ```\n * returns: v.null()\n * returns: v.string()\n * returns: { message: v.string(), author: v.id(\"authors\") }\n * returns: v.array(v.string())\n * ```\n */\n returns?: ReturnsValidator;\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n handler: (\n ctx: GenericQueryCtxWithTable<DataModel>,\n ...args: OneOrZeroArgs\n ) => ReturnValue;\n }\n | {\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n (\n ctx: GenericQueryCtxWithTable<DataModel>,\n ...args: OneOrZeroArgs\n ): ReturnValue;\n },\n ): RegisteredQuery<Visibility, ArgsArrayToObject<OneOrZeroArgs>, ReturnValue>;\n};\n\n/**\n * Internal type helper used by Convex code generation.\n *\n * Used to give {@link actionGeneric} a type specific to your data model.\n * @public\n */\nexport type ActionBuilder<\n DataModel extends GenericDataModel,\n Visibility extends FunctionVisibility,\n> = {\n <\n ArgsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnsValidator extends\n | PropertyValidators\n | Validator<any, \"required\", any>\n | void,\n ReturnValue extends ReturnValueForOptionalValidator<ReturnsValidator> = any,\n OneOrZeroArgs extends\n ArgsArrayForOptionalValidator<ArgsValidator> = DefaultArgsForOptionalValidator<ArgsValidator>,\n >(\n func:\n | {\n /**\n * Argument validation.\n *\n * Examples:\n *\n * ```\n * args: {}\n * args: { input: v.optional(v.number()) }\n * args: { message: v.string(), author: v.id(\"authors\") }\n * args: { messages: v.array(v.string()) }\n * ```\n *\n */\n args?: ArgsValidator;\n /**\n * The return value validator.\n *\n * Examples:\n *\n * ```\n * returns: v.null()\n * returns: v.string()\n * returns: { message: v.string(), author: v.id(\"authors\") }\n * returns: v.array(v.string())\n * ```\n */\n returns?: ReturnsValidator;\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n handler: (\n ctx: GenericActionCtx<DataModel>,\n ...args: OneOrZeroArgs\n ) => ReturnValue;\n }\n | {\n /**\n * The implementation of this function.\n *\n * This is a function that takes in the appropriate context and arguments\n * and produces some result.\n *\n * @param ctx - The context object. This is one of {@link QueryCtx},\n * {@link MutationCtx}, or {@link ActionCtx} depending on the function type.\n * @param args - The arguments object for this function. This will match\n * the type defined by the argument validator if provided.\n * @returns\n */\n (\n ctx: GenericActionCtx<DataModel>,\n ...args: OneOrZeroArgs\n ): ReturnValue;\n },\n ): RegisteredAction<\n Visibility,\n ArgsArrayToObject<OneOrZeroArgs>,\n ReturnValue\n >;\n};\n\n/**\n * Internal type helper used by Convex code generation.\n *\n * Used to give {@link httpActionGeneric} a type specific to your data model\n * and functions.\n * @public\n */\nexport type HttpActionBuilder = (\n func: (ctx: GenericActionCtx<any>, request: Request) => Promise<Response>,\n) => PublicHttpAction;\n\nexport interface AdvancedRunQueryOptions {\n transactionLimits?: TransactionLimits;\n /**\n * Run a query on a recent snapshot of the database that is not guaranteed\n * to be up-to-date when this transaction commits.\n *\n * This is an advanced feature which can introduce subtle race conditions,\n * so its use is generally discouraged except for specific use-cases where\n * database read conflicts are expected, e.g. reading from an append-only\n * table with immutable records where the only read conflicts are from\n * concurrent appends.\n */\n useStaleSnapshot?: boolean;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/server/storage.ts"],
4
- "sourcesContent": ["import { GenericId } from \"../values/index.js\";\n\n/**\n * A reference to a file in storage.\n *\n * This is used in the {@link StorageReader} and {@link StorageWriter} which are accessible in\n * Convex queries and mutations via {@link QueryCtx} and {@link MutationCtx} respectively.\n *\n * @public\n */\nexport type StorageId = string;\nexport type FileStorageId = GenericId<\"_storage\"> | StorageId;\n/**\n * Metadata for a single file as returned by {@link StorageReader.getMetadata | storage.getMetadata}.\n *\n * @public\n */\nexport type FileMetadata = {\n /**\n * ID for referencing the file (eg. via {@link StorageReader.getUrl | storage.getUrl})\n */\n storageId: StorageId;\n /**\n * Hex encoded sha256 checksum of file contents\n */\n sha256: string;\n /**\n * Size of the file in bytes\n */\n size: number;\n /**\n * ContentType of the file if it was provided on upload\n */\n contentType: string | null;\n};\n\n/**\n * An interface to read files from storage within Convex query functions.\n *\n * Available as `ctx.storage` in queries (read-only), mutations, and actions.\n *\n * @example\n * ```typescript\n * // Get a URL for a stored file:\n * const url = await ctx.storage.getUrl(storageId);\n * if (url) {\n * // Use the URL (e.g., return it to the client)\n * }\n *\n * // Get file metadata via the system table (preferred over deprecated getMetadata):\n * const metadata = await ctx.db.system.get(\"_storage\", storageId);\n * // metadata: { _id, _creationTime, sha256, size, contentType? }\n * ```\n *\n * @see https://docs.convex.dev/file-storage\n * @public\n */\nexport interface StorageReader {\n /**\n * Get the URL for a file in storage by its `Id<\"_storage\">`.\n *\n * The GET response includes a standard HTTP Digest header with a sha256 checksum.\n *\n * @example\n * ```typescript\n * const url = await ctx.storage.getUrl(storageId);\n * ```\n *\n * @param storageId - The `Id<\"_storage\">` of the file to fetch from Convex storage.\n * @returns - A URL which fetches the file via an HTTP GET, or `null` if the file no longer exists.\n */\n getUrl(storageId: GenericId<\"_storage\">): Promise<string | null>;\n\n /**\n * @deprecated Passing a string is deprecated, use `storage.getUrl(Id<\"_storage\">)` instead.\n *\n * Get the URL for a file in storage by its {@link StorageId}.\n *\n * The GET response includes a standard HTTP Digest header with a sha256 checksum.\n *\n * @param storageId - The {@link StorageId} of the file to fetch from Convex storage.\n * @returns - A url which fetches the file via an HTTP GET, or `null` if it no longer exists.\n */\n getUrl<T extends StorageId>(\n storageId: T extends { __tableName: any } ? never : T,\n ): Promise<string | null>;\n\n /**\n * @deprecated Use `ctx.db.system.get(\"_storage\", storageId)` instead, which returns\n * equivalent metadata from the `_storage` system table (with a slightly different shape):\n * ```typescript\n * const metadata = await ctx.db.system.get(\"_storage\", storageId);\n * // { _id, _creationTime, sha256, size, contentType? }\n * ```\n *\n * Get metadata for a file.\n *\n * @param storageId - The `Id<\"_storage\">` of the file.\n * @returns - A {@link FileMetadata} object if found or `null` if not found.\n */\n getMetadata(storageId: GenericId<\"_storage\">): Promise<FileMetadata | null>;\n\n /**\n * @deprecated Use `ctx.db.system.get(\"_storage\", storageId)` instead.\n *\n * Get metadata for a file.\n *\n * @param storageId - The {@link StorageId} of the file.\n * @returns - A {@link FileMetadata} object if found or `null` if not found.\n */\n getMetadata<T extends StorageId>(\n storageId: T extends { __tableName: any } ? never : T,\n ): Promise<FileMetadata | null>;\n}\n\n/**\n * An interface to write files to storage within Convex mutation functions.\n *\n * Available as `ctx.storage` in mutations.\n *\n * @see https://docs.convex.dev/file-storage\n * @public\n */\nexport interface StorageWriter extends StorageReader {\n /**\n * Generate a short-lived URL for uploading a file into storage.\n *\n * The client should make a POST request to this URL with the file as the\n * body. The response will be a JSON object containing a newly allocated\n * `Id<\"_storage\">` (`{ storageId: \"...\" }`).\n *\n * @example\n * ```typescript\n * // In a mutation, generate the upload URL:\n * export const generateUploadUrl = mutation({\n * args: {},\n * returns: v.string(),\n * handler: async (ctx) => {\n * return await ctx.storage.generateUploadUrl();\n * },\n * });\n *\n * // On the client, upload the file:\n * // const uploadUrl = await generateUploadUrl();\n * // const result = await fetch(uploadUrl, { method: \"POST\", body: file });\n * // const { storageId } = await result.json();\n * ```\n *\n * @returns - A short-lived URL for uploading a file via HTTP POST.\n */\n generateUploadUrl(): Promise<string>;\n /**\n * Delete a file from Convex storage.\n *\n * Once a file is deleted, any URLs previously generated by {@link StorageReader.getUrl} will return 404s.\n *\n * @example\n * ```typescript\n * await ctx.storage.delete(storageId);\n * ```\n *\n * @param storageId - The `Id<\"_storage\">` of the file to delete from Convex storage.\n */\n delete(storageId: GenericId<\"_storage\">): Promise<void>;\n\n /**\n * @deprecated Passing a string is deprecated, use `storage.delete(Id<\"_storage\">)` instead.\n *\n * Delete a file from Convex storage.\n *\n * Once a file is deleted, any URLs previously generated by {@link StorageReader.getUrl} will return 404s.\n *\n * @param storageId - The {@link StorageId} of the file to delete from Convex storage.\n */\n delete<T extends StorageId>(\n storageId: T extends { __tableName: any } ? never : T,\n ): Promise<void>;\n}\n\n/**\n * An interface to read and write files to storage within Convex actions and HTTP actions.\n *\n * In actions, `ctx.storage` has additional methods not available in mutations:\n * `get()` to download a file as a Blob, and `store()` to upload a Blob directly.\n *\n * @example\n * ```typescript\n * // In an action, download and re-upload a file:\n * const blob = await ctx.storage.get(storageId);\n * if (blob) {\n * const newStorageId = await ctx.storage.store(blob);\n * }\n * ```\n *\n * @public\n */\nexport interface StorageActionWriter extends StorageWriter {\n /**\n * Download a file from storage as a Blob.\n *\n * Only available in actions and HTTP actions (not in mutations or queries).\n *\n * @param storageId - The `Id<\"_storage\">` of the file.\n * @returns A Blob containing the file contents, or `null` if the file doesn't exist.\n */\n get(storageId: GenericId<\"_storage\">): Promise<Blob | null>;\n\n /**\n * @deprecated Passing a string is deprecated, use `storage.get(Id<\"_storage\">)` instead.\n *\n * Get a Blob containing the file associated with the provided {@link StorageId}, or `null` if there is no file.\n */\n get<T extends StorageId>(\n storageId: T extends { __tableName: any } ? never : T,\n ): Promise<Blob | null>;\n /**\n * Upload a Blob directly to storage.\n *\n * Only available in actions and HTTP actions. For client-side uploads from\n * mutations, use `generateUploadUrl()` instead.\n *\n * @example\n * ```typescript\n * const storageId = await ctx.storage.store(blob);\n * // Save storageId to the database via ctx.runMutation\n * ```\n *\n * @param blob - The Blob to store.\n * @param options - Optional settings. Pass `sha256` to verify the file integrity.\n * @returns The `Id<\"_storage\">` of the newly stored file.\n */\n store(\n blob: Blob,\n options?: { sha256?: string },\n ): Promise<GenericId<\"_storage\">>;\n}\n"],
4
+ "sourcesContent": ["import { GenericId } from \"../values/index.js\";\n\n/**\n * @deprecated This ID format is no longer returned by stable file storage APIs. Use `Id<\"_storage\">` instead.\n *\n * The old ID format used by Convex file storage.\n *\n * \u26A0\uFE0F Security warning: Anyone that has knows to this ID can download the underlying file\n * from `https://<deployment>.convex.cloud/api/storage/<storageId>`.\n * (Note that it\u2019s safe to share the new ID format, `Id<\"_storage\">`, to anyone).\n *\n * @public\n */\nexport type StorageId = string;\n\n/**\n * @deprecated This type is only necessary for backwards compatibility with Convex versions that\n * pre-date `convex@1.6.0`. Use `Id<\"_storage\">` instead.\n */\nexport type FileStorageId = GenericId<\"_storage\"> | StorageId;\n\n/**\n * @deprecated This type is only returned by {@link StorageReader.getUrl | storage.getUrl}.\n * To get the details of a document, use `ctx.db.system.get(\"_storage\", storageId)` instead.\n *\n * Metadata for a single file as returned by {@link StorageReader.getMetadata | storage.getMetadata}.\n *\n * @public\n */\nexport type FileMetadata = {\n /**\n * ID for referencing the file (eg. via {@link StorageReader.getUrl | storage.getUrl})\n *\n * This is an older ID format that is no longer returned by stable file storage APIs.\n * Consider using `Id<\"_storage\">` instead.\n *\n * \u26A0\uFE0F Security warning: Anyone that has knows to this ID can download the underlying file\n * from `https://<deployment>.convex.cloud/api/storage/<storageId>`.\n * (Note that it\u2019s safe to share the new ID format, `Id<\"_storage\">`, to anyone).\n */\n storageId: StorageId;\n /**\n * Hex encoded sha256 checksum of file contents\n */\n sha256: string;\n /**\n * Size of the file in bytes\n */\n size: number;\n /**\n * ContentType of the file if it was provided on upload\n */\n contentType: string | null;\n};\n\n/**\n * An interface to read files from storage within Convex query functions.\n *\n * Available as `ctx.storage` in queries (read-only), mutations, and actions.\n *\n * @example\n * ```typescript\n * // Get a URL for a stored file:\n * const url = await ctx.storage.getUrl(storageId);\n * if (url) {\n * // Use the URL (e.g., return it to the client)\n * }\n *\n * // Get file metadata via the system table (preferred over deprecated getMetadata):\n * const metadata = await ctx.db.system.get(\"_storage\", storageId);\n * // metadata: { _id, _creationTime, sha256, size, contentType? }\n * ```\n *\n * @see https://docs.convex.dev/file-storage\n * @public\n */\nexport interface StorageReader {\n /**\n * Get the URL for a file in storage by its `Id<\"_storage\">`.\n *\n * The GET response includes a standard HTTP Digest header with a sha256 checksum.\n *\n * @example\n * ```typescript\n * const url = await ctx.storage.getUrl(storageId);\n * ```\n *\n * @param storageId - The `Id<\"_storage\">` of the file to fetch from Convex storage.\n * @returns - A URL which fetches the file via an HTTP GET, or `null` if the file no longer exists.\n */\n getUrl(storageId: GenericId<\"_storage\">): Promise<string | null>;\n\n /**\n * @deprecated Passing a string is deprecated, use `storage.getUrl(Id<\"_storage\">)` instead.\n *\n * Get the URL for a file in storage by its {@link StorageId}.\n *\n * The GET response includes a standard HTTP Digest header with a sha256 checksum.\n *\n * @param storageId - The {@link StorageId} of the file to fetch from Convex storage.\n * @returns - A url which fetches the file via an HTTP GET, or `null` if it no longer exists.\n */\n getUrl<T extends StorageId>(\n storageId: T extends { __tableName: any } ? never : T,\n ): Promise<string | null>;\n\n /**\n * @deprecated Use `ctx.db.system.get(\"_storage\", storageId)` instead, which returns\n * equivalent metadata from the `_storage` system table (with a slightly different shape):\n * ```typescript\n * const metadata = await ctx.db.system.get(\"_storage\", storageId);\n * // { _id, _creationTime, sha256, size, contentType? }\n * ```\n *\n * Get metadata for a file.\n *\n * @param storageId - The `Id<\"_storage\">` of the file.\n * @returns - A {@link FileMetadata} object if found or `null` if not found.\n */\n getMetadata(storageId: GenericId<\"_storage\">): Promise<FileMetadata | null>;\n\n /**\n * @deprecated Use `ctx.db.system.get(\"_storage\", storageId)` instead.\n *\n * Get metadata for a file.\n *\n * @param storageId - The {@link StorageId} of the file.\n * @returns - A {@link FileMetadata} object if found or `null` if not found.\n */\n getMetadata<T extends StorageId>(\n storageId: T extends { __tableName: any } ? never : T,\n ): Promise<FileMetadata | null>;\n}\n\n/**\n * An interface to write files to storage within Convex mutation functions.\n *\n * Available as `ctx.storage` in mutations.\n *\n * @see https://docs.convex.dev/file-storage\n * @public\n */\nexport interface StorageWriter extends StorageReader {\n /**\n * Generate a short-lived URL for uploading a file into storage.\n *\n * The client should make a POST request to this URL with the file as the\n * body. The response will be a JSON object containing a newly allocated\n * `Id<\"_storage\">` (`{ storageId: \"...\" }`).\n *\n * @example\n * ```typescript\n * // In a mutation, generate the upload URL:\n * export const generateUploadUrl = mutation({\n * args: {},\n * returns: v.string(),\n * handler: async (ctx) => {\n * return await ctx.storage.generateUploadUrl();\n * },\n * });\n *\n * // On the client, upload the file:\n * // const uploadUrl = await generateUploadUrl();\n * // const result = await fetch(uploadUrl, { method: \"POST\", body: file });\n * // const { storageId } = await result.json();\n * ```\n *\n * @returns - A short-lived URL for uploading a file via HTTP POST.\n */\n generateUploadUrl(): Promise<string>;\n /**\n * Delete a file from Convex storage.\n *\n * Once a file is deleted, any URLs previously generated by {@link StorageReader.getUrl} will return 404s.\n *\n * @example\n * ```typescript\n * await ctx.storage.delete(storageId);\n * ```\n *\n * @param storageId - The `Id<\"_storage\">` of the file to delete from Convex storage.\n */\n delete(storageId: GenericId<\"_storage\">): Promise<void>;\n\n /**\n * @deprecated Passing a string is deprecated, use `storage.delete(Id<\"_storage\">)` instead.\n *\n * Delete a file from Convex storage.\n *\n * Once a file is deleted, any URLs previously generated by {@link StorageReader.getUrl} will return 404s.\n *\n * @param storageId - The {@link StorageId} of the file to delete from Convex storage.\n */\n delete<T extends StorageId>(\n storageId: T extends { __tableName: any } ? never : T,\n ): Promise<void>;\n}\n\n/**\n * An interface to read and write files to storage within Convex actions and HTTP actions.\n *\n * In actions, `ctx.storage` has additional methods not available in mutations:\n * `get()` to download a file as a Blob, and `store()` to upload a Blob directly.\n *\n * @example\n * ```typescript\n * // In an action, download and re-upload a file:\n * const blob = await ctx.storage.get(storageId);\n * if (blob) {\n * const newStorageId = await ctx.storage.store(blob);\n * }\n * ```\n *\n * @public\n */\nexport interface StorageActionWriter extends StorageWriter {\n /**\n * Download a file from storage as a Blob.\n *\n * Only available in actions and HTTP actions (not in mutations or queries).\n *\n * @param storageId - The `Id<\"_storage\">` of the file.\n * @returns A Blob containing the file contents, or `null` if the file doesn't exist.\n */\n get(storageId: GenericId<\"_storage\">): Promise<Blob | null>;\n\n /**\n * @deprecated Passing a string is deprecated, use `storage.get(Id<\"_storage\">)` instead.\n *\n * Get a Blob containing the file associated with the provided {@link StorageId}, or `null` if there is no file.\n */\n get<T extends StorageId>(\n storageId: T extends { __tableName: any } ? never : T,\n ): Promise<Blob | null>;\n /**\n * Upload a Blob directly to storage.\n *\n * Only available in actions and HTTP actions. For client-side uploads from\n * mutations, use `generateUploadUrl()` instead.\n *\n * @example\n * ```typescript\n * const storageId = await ctx.storage.store(blob);\n * // Save storageId to the database via ctx.runMutation\n * ```\n *\n * @param blob - The Blob to store.\n * @param options - Optional settings. Pass `sha256` to verify the file integrity.\n * @returns The `Id<\"_storage\">` of the newly stored file.\n */\n store(\n blob: Blob,\n options?: { sha256?: string },\n ): Promise<GenericId<\"_storage\">>;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/server/system_fields.ts"],
4
- "sourcesContent": ["import { GenericId } from \"../values/index.js\";\nimport { BetterOmit, Expand } from \"../type_utils.js\";\nimport { GenericDocument } from \"./data_model.js\";\n\n/**\n * The fields that Convex automatically adds to documents, not including `_id`.\n *\n * This is an object type mapping field name to field type.\n * @public\n */\nexport type SystemFields = {\n _creationTime: number;\n};\n\n/**\n * The `_id` field that Convex automatically adds to documents.\n * @public\n */\nexport type IdField<TableName extends string> = {\n _id: GenericId<TableName>;\n};\n\n/**\n * A Convex document with the system fields like `_id` and `_creationTime` omitted.\n *\n * @public\n */\nexport type WithoutSystemFields<Document extends GenericDocument> = Expand<\n BetterOmit<Document, keyof SystemFields | \"_id\">\n>;\n\n/**\n * A Convex document with the system fields like `_id` and `_creationTime` optional.\n *\n * @public\n */\nexport type WithOptionalSystemFields<Document extends GenericDocument> = Expand<\n WithoutSystemFields<Document> &\n Partial<Pick<Document, keyof SystemFields | \"_id\">>\n>;\n\n/**\n * The indexes that Convex automatically adds to every table.\n *\n * This is an object mapping index names to index field paths.\n * @public\n */\nexport type SystemIndexes = {\n // Note `db.get(id)` is simpler and equivalent to a query on `by_id`.\n // Unless the query is being built dynamically, or doing manual pagination.\n by_id: [\"_id\"];\n\n by_creation_time: [\"_creationTime\"];\n};\n\n/**\n * Convex automatically appends \"_creationTime\" to the end of every index to\n * break ties if all of the other fields are identical.\n * @public\n */\nexport type IndexTiebreakerField = \"_creationTime\";\n"],
4
+ "sourcesContent": ["import { GenericId } from \"../values/index.js\";\nimport { BetterOmit, Expand } from \"../type_utils.js\";\nimport { GenericDocument } from \"./data_model.js\";\n\n/**\n * The fields that Convex automatically adds to documents, not including `_id`.\n *\n * This is an object type mapping field name to field type.\n * @public\n */\nexport type SystemFields = {\n _creationTime: number;\n};\n\n/**\n * The `_id` field that Convex automatically adds to documents.\n * @public\n */\nexport type IdField<TableName extends string> = {\n _id: GenericId<TableName>;\n};\n\n/**\n * A Convex document with the system fields like `_id` and `_creationTime` omitted.\n *\n * @public\n */\nexport type WithoutSystemFields<Document extends GenericDocument> = Expand<\n BetterOmit<Document, keyof SystemFields | \"_id\">\n>;\n\n/**\n * A Convex document with the system fields like `_id` and `_creationTime` optional.\n *\n * @public\n */\nexport type WithOptionalSystemFields<Document extends GenericDocument> = Expand<\n WithoutSystemFields<Document> &\n Partial<Pick<Document, keyof SystemFields | \"_id\">>\n>;\n\n/**\n * The indexes that Convex automatically adds to every table.\n *\n * This is an object mapping index names to index field paths.\n * @public\n */\nexport type SystemIndexes = {\n // Note `db.get(tableName, id)` is simpler and equivalent to a query on `by_id`.\n // Unless the query is being built dynamically, or doing manual pagination.\n by_id: [\"_id\"];\n\n by_creation_time: [\"_creationTime\"];\n};\n\n/**\n * Convex automatically appends \"_creationTime\" to the end of every index to\n * break ties if all of the other fields are identical.\n * @public\n */\nexport type IndexTiebreakerField = \"_creationTime\";\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/cli/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAiB,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAE9B,MAAM,cAAc,CAAC;AA4EtB,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC;IACT,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC;QACjB,gBAAgB,EAAE,MAAM,CAAC;QACzB,gBAAgB,EAAE,6BAA6B,CAAC,kBAAkB,CAAC,CAAC;KACrE,CAAC;CACH,CAAC,CAyBD;AAwED,eAAO,MAAM,GAAG;;;;;;;;MA0Bb,CAAC"}
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/cli/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAiB,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAE9B,MAAM,cAAc,CAAC;AA4EtB,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC;IACT,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC;QACjB,gBAAgB,EAAE,MAAM,CAAC;QACzB,gBAAgB,EAAE,6BAA6B,CAAC,kBAAkB,CAAC,CAAC;KACrE,CAAC;CACH,CAAC,CAyBD;AAiFD,eAAO,MAAM,GAAG;;;;;;;;MA2Bb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"envDefault.d.ts","sourceRoot":"","sources":["../../../src/cli/envDefault.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAKL,aAAa,EACd,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,mBAAmB,EAEnB,cAAc,EAEf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAiB,MAAM,uBAAuB,CAAC;AAmJ/D,eAAO,MAAM,UAAU,qBAkBF,CAAC;AAqGtB,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,OAAO,EACZ,gBAAgB,EAAE;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,cAAc,CAAC;CAChC,GAAG,IAAI,EACR,aAAa,CAAC,EAAE,mBAAmB,GAClC,OAAO,CAAC,aAAa,CAAC,CAwBxB"}
1
+ {"version":3,"file":"envDefault.d.ts","sourceRoot":"","sources":["../../../src/cli/envDefault.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAKL,aAAa,EACd,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,mBAAmB,EAEnB,cAAc,EAEf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAiB,MAAM,uBAAuB,CAAC;AAwJ/D,eAAO,MAAM,UAAU,qBAmBF,CAAC;AAqGtB,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,OAAO,EACZ,gBAAgB,EAAE;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,cAAc,CAAC;CAChC,GAAG,IAAI,EACR,aAAa,CAAC,EAAE,mBAAmB,GAClC,OAAO,CAAC,aAAa,CAAC,CAwBxB"}
@@ -1,6 +1,7 @@
1
1
  import { Command } from "@commander-js/extra-typings";
2
2
  export declare const insights: Command<[], {
3
3
  details: boolean;
4
+ json: boolean;
4
5
  } & {
5
6
  envFile?: string;
6
7
  url?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"insights.d.ts","sourceRoot":"","sources":["../../../src/cli/insights.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAuFtD,eAAO,MAAM,QAAQ;;;;;;;;;;MA2FjB,CAAC"}
1
+ {"version":3,"file":"insights.d.ts","sourceRoot":"","sources":["../../../src/cli/insights.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAuFtD,eAAO,MAAM,QAAQ;;;;;;;;;;;MAuGjB,CAAC"}
@@ -25,5 +25,7 @@ export declare function envSet(ctx: Context, backend: EnvVarBackend, originalNam
25
25
  }): Promise<boolean>;
26
26
  export declare function envGet(ctx: Context, backend: EnvVarBackend, name: string): Promise<void>;
27
27
  export declare function envRemove(ctx: Context, backend: EnvVarBackend, name: string): Promise<void>;
28
- export declare function envList(ctx: Context, backend: EnvVarBackend): Promise<void>;
28
+ export declare function envList(ctx: Context, backend: EnvVarBackend, options?: {
29
+ namesOnly?: boolean;
30
+ }): Promise<void>;
29
31
  //# sourceMappingURL=env.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/env.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AA+BnD,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE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a,EACtB,IAAI,EAAE,MAAM,iBAMb;AAED,wBAAsB,OAAO,CAC3B,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,iBAkBlC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=env.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.test.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/env.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/login.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAiCnD,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,OAAO,EACZ,YAAY,EAAE,OAAO,GACpB,OAAO,CAAC,OAAO,CAAC,CAqClB;AA0LD,wBAAsB,YAAY,CAChC,GAAG,EAAE,OAAO,EACZ,EACE,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,eAAe,EACf,UAAU,EAAE,kBAAkB,EAC9B,WAAW,EACX,MAAM,EACN,cAAc,GACf,GAAE;IACD,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAElD,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE3B,YAAY,CAAC,EAAE,OAAO,G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C1C,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAElD,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE3B,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACnC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,sBAwIP;AAoID,wBAAsB,cAAc,CAClC,GAAG,EAAE,OAAO,EACZ,OAAO,CAAC,EAAE;IACR,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C,iBAeF"}
@@ -25,7 +25,7 @@ export declare function watchLogs(ctx: Context, url: string, adminKey: string, d
25
25
  history?: number | boolean;
26
26
  jsonl?: boolean;
27
27
  logManager?: LogManager;
28
- }): Promise<void>;
28
+ }): Promise<never>;
29
29
  type UdfType = "Query" | "Mutation" | "Action" | "HttpAction";
30
30
  type StructuredLogLine = {
31
31
  messages: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAInD,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,MAAM,CAAC;CAC1B,iBAQF;AAED,wBAAsB,SAAS,CAC7B,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,cAAc,EACpB,OAAO,CAAC,EAAE;IACR,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,kBA4EF;AAED,KAAK,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE9D,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AACF,KAAK,OAAO,GAAG,MAAM,GAAG,iBAAiB,CAAC;AAmF1C,wBAAgB,8BAA8B,CAC5C,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,MAAM,GACtB,MAAM,CAER;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,GAAG,OAAO,EACtB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,EAChB,aAAa,GAAE,OAAO,KAAa,GAClC,MAAM,CAyBR;AAoBD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,iBAAiB,EAAE,EAC5B,qBAAqB,GAAE,OAAe,GACrC,MAAM,CAMR"}
@@ -38,7 +38,7 @@ export declare function subscribeAndLog(ctx: Context, args: {
38
38
  identityString?: string | undefined;
39
39
  componentPath: string | undefined;
40
40
  }): Promise<void>;
41
- export declare function subscribe(_ctx: Context, args: {
41
+ export declare function subscribe(ctx: Context, args: {
42
42
  deploymentUrl: string;
43
43
  adminKey: string;
44
44
  identity?: UserIdentityAttributes | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/run.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,sBAAsB,EAEvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,EAA8B,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAS9D,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE;IACJ,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,SAAS,CAAC,EACN;QACE,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,SAAS,CAAC;KACpC,GACD,SAAS,CAAC;CACf,sBA6FF;AAyBD,wBAAsB,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAW/D;AAED,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,OAAO,EACZ,YAAY,EAAE,MAAM,EAEpB,eAAe,EAAE,MAAM,mBA6ExB;AAYD,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE;IACJ,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5B,KAAK,CAAC,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AAE,MAAM,GAAG,SAAS,CAAC;IAClC,oBAAoB,EAAE,OAAO,CAAC;CAC/B,iBAQF;AAED,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,SAAS,EACd,IAAI,EAAE;IACJ,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IACxC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;CAC/B,iBA0BF"}
@@ -32,6 +32,16 @@ export declare function processDeployKeyValue(ctx: Context, deployKey: string |
32
32
  * takes precedence when both are set.
33
33
  */
34
34
  export declare function readDeployKeyFromEnv(getEnv: (name: string) => string | undefined | null): string | undefined;
35
+ /**
36
+ * Detects a server-side authorization failure (a `require_operation` error,
37
+ * surfaced both as an HTTP 403 and as an error from a system UDF query) and
38
+ * produces a clean, single-line message naming the missing permission. When a
39
+ * deploy key is in use, appends advice for configuring its permissions.
40
+ *
41
+ * Returns `null` if `errorMessage` is not a permission error, so callers can
42
+ * fall back to their normal error handling.
43
+ */
44
+ export declare function permissionDeniedErrorMessage(errorMessage: string): string | null;
35
45
  export declare function parsePositiveInteger(value: string): number;
36
46
  export declare function parseInteger(value: string): number;
37
47
  export type ErrorData = {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/cli/lib/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,KAAK,IAAI,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAKtF,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7C,OAA0B,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EA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,OAAO,EAAE;IACP,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;CAC9B,GACA,OAAO,aAAa,CA0BtB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,OAAO,EACb,OAAO,EAAE;IACP,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;CAC9B,GACA,OAAO,KAAK,CAsCd;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAgBxC;AAGD,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,OAAO,GACX,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAmBxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../../src/cli/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AA6BtD,wBAAgB,YAAY,wBAwC3B"}
1
+ {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../../src/cli/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AA8BtD,wBAAgB,YAAY,wBAyC3B"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "@commander-js/extra-typings";
2
+ export declare const project: Command<[], {}, {}>;
3
+ //# sourceMappingURL=project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/cli/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAGtD,eAAO,MAAM,OAAO,qBAGQ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Command } from "@commander-js/extra-typings";
2
+ export declare const projectCreate: Command<[string | undefined], {
3
+ team?: string;
4
+ }, {}>;
5
+ //# sourceMappingURL=projectCreate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projectCreate.d.ts","sourceRoot":"","sources":["../../../src/cli/projectCreate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,6BAA6B,CAAC;AAwE9D,eAAO,MAAM,aAAa;;MA0BC,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const version = "1.41.0";
1
+ export declare const version = "1.42.0";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -5,7 +5,13 @@ import { SystemDataModel } from "./schema.js";
5
5
  import { WithOptionalSystemFields, WithoutSystemFields } from "./system_fields.js";
6
6
  interface BaseDatabaseReader<DataModel extends GenericDataModel> {
7
7
  /**
8
- * Fetch a single document from the database by its {@link values.GenericId}.
8
+ * Fetch a single document from the database by table name and
9
+ * {@link values.GenericId}.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * const user = await ctx.db.get("users", userId);
14
+ * ```
9
15
  *
10
16
  * @param table - The name of the table to fetch the document from.
11
17
  * @param id - The {@link values.GenericId} of the document to fetch from the database.
@@ -15,6 +21,9 @@ interface BaseDatabaseReader<DataModel extends GenericDataModel> {
15
21
  /**
16
22
  * Fetch a single document from the database by its {@link values.GenericId}.
17
23
  *
24
+ * Supported for backwards compatibility. Prefer `db.get(tableName, id)` in
25
+ * new code, or `db.system.get(tableName, id)` for system tables.
26
+ *
18
27
  * @param id - The {@link values.GenericId} of the document to fetch from the database.
19
28
  * @returns - The {@link GenericDocument} of the document at the given {@link values.GenericId}, or `null` if it no longer exists.
20
29
  */
@@ -36,7 +45,7 @@ interface BaseDatabaseReader<DataModel extends GenericDataModel> {
36
45
  * This accepts the string ID format as well as the `.toString()` representation
37
46
  * of the legacy class-based ID format.
38
47
  *
39
- * This does not guarantee that the ID exists (i.e. `db.get(id)` may return `null`).
48
+ * This does not guarantee that the ID exists (i.e. `db.get(tableName, id)` may return `null`).
40
49
  *
41
50
  * @param tableName - The name of the table.
42
51
  * @param id - The ID string.
@@ -76,7 +85,7 @@ export interface BaseTableReader<DataModel extends GenericDataModel, TableName e
76
85
  *
77
86
  * The two entry points are:
78
87
  * - {@link GenericDatabaseReader.get}, which fetches a single document
79
- * by its {@link values.GenericId}.
88
+ * by table name and {@link values.GenericId}.
80
89
  * - {@link GenericDatabaseReader.query}, which starts building a query.
81
90
  *
82
91
  * @example
@@ -224,6 +233,9 @@ export interface GenericDatabaseWriter<DataModel extends GenericDataModel> exten
224
233
  *
225
234
  * This method will throw if the document does not exist.
226
235
  *
236
+ * Supported for backwards compatibility. Prefer `db.patch(tableName, id, value)`
237
+ * in new code.
238
+ *
227
239
  * @param id - The {@link values.GenericId} of the document to patch.
228
240
  * @param value - The partial document to merge into the existing document.
229
241
  */
@@ -259,6 +271,9 @@ export interface GenericDatabaseWriter<DataModel extends GenericDataModel> exten
259
271
  * Unlike `patch`, which does a shallow merge, `replace` overwrites the
260
272
  * entire document.
261
273
  *
274
+ * Supported for backwards compatibility. Prefer `db.replace(tableName, id, value)`
275
+ * in new code.
276
+ *
262
277
  * @param id - The {@link values.GenericId} of the document to replace.
263
278
  * @param value - The new document. System fields can be omitted.
264
279
  */
@@ -278,6 +293,9 @@ export interface GenericDatabaseWriter<DataModel extends GenericDataModel> exten
278
293
  /**
279
294
  * Delete an existing document.
280
295
  *
296
+ * Supported for backwards compatibility. Prefer `db.delete(tableName, id)` in
297
+ * new code.
298
+ *
281
299
  * **Note:** Convex queries do not support `.delete()` directly on query
282
300
  * results. To delete multiple documents, `.collect()` them first, then
283
301
  * delete each one individually.
@@ -1 +1 @@
1
- {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../src/server/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB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AS,CAAC,CAAC,GACpE,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD;AAED;;;GAGG;AACH,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,GAC9B,KAAK,GACL,CAAC,CAAC;AAEN;;;GAGG;AACH,KAAK,UAAU,CAAC,CAAC,IAAI;KAClB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC;CAClE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"meta_impl.d.ts","sourceRoot":"","sources":["../../../../src/server/impl/meta_impl.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,SAAS,EAET,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AAmDpB,wBAAgB,cAAc,CAC5B,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,GACzC,SAAS,CAUX;AAED,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,GACzC,YAAY,CAWd;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,GACzC,UAAU,CAUZ"}
1
+ {"version":3,"file":"meta_impl.d.ts","sourceRoot":"","sources":["../../../../src/server/impl/meta_impl.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,SAAS,EAET,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AAoDpB,wBAAgB,cAAc,CAC5B,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,GACzC,SAAS,CAUX;AAED,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,gBAAgB,CAAC,YA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C,GAAG,EAAE,UAAU,CAsB/B,CAAC;AA4BvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,GAAG,EAAE,QAAQ,CAsBpB,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,GAAG,EAAE,UAAU,CAuB5B,CAAC;AAoBpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,GAAG,EAAE,QAAQ,CAuBrB,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,GAAG,EAAE,UAAU,CAuB7B,CAAC;AAqBrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,iBAAiB,eAErB,iBAAiB,gBAAgB,CAAC,WAC9B,OAAO,KACb,QAAQ,QAAQ,CAAC,KACrB,gBAOF,CAAC"}
@@ -59,7 +59,7 @@ export type { TransactionMetric, TransactionMetrics, TransactionLimits, Function
59
59
  export type { IndexRange, IndexRangeBuilder } from "./index_range_builder.js";
60
60
  export * from "./pagination.js";
61
61
  export type { OrderedQuery, Query, QueryInitializer } from "./query.js";
62
- export type { ArgsArray, DefaultFunctionArgs, FunctionVisibility, ActionBuilder, MutationBuilder, MutationBuilderWithTable, QueryBuilder, QueryBuilderWithTable, HttpActionBuilder, GenericActionCtx, GenericMutationCtx, GenericMutationCtxWithTable, GenericQueryCtx, GenericQueryCtxWithTable, RegisteredAction, RegisteredMutation, RegisteredQuery, PublicHttpAction, UnvalidatedFunction, ValidatedFunction, ReturnValueForOptionalValidator, ArgsArrayForOptionalValidator, ArgsArrayToObject, DefaultArgsForOptionalValidator, } from "./registration.js";
62
+ export type { AdvancedRunQueryOptions, ArgsArray, DefaultFunctionArgs, FunctionVisibility, ActionBuilder, MutationBuilder, MutationBuilderWithTable, QueryBuilder, QueryBuilderWithTable, HttpActionBuilder, GenericActionCtx, GenericMutationCtx, GenericMutationCtxWithTable, GenericQueryCtx, GenericQueryCtxWithTable, RegisteredAction, RegisteredMutation, RegisteredQuery, PublicHttpAction, UnvalidatedFunction, ValidatedFunction, ReturnValueForOptionalValidator, ArgsArrayForOptionalValidator, ArgsArrayToObject, DefaultArgsForOptionalValidator, } from "./registration.js";
63
63
  export * from "./search_filter_builder.js";
64
64
  export * from "./storage.js";
65
65
  export type { Scheduler, SchedulableFunctionReference } from "./scheduler.js";