@confect/server 9.0.0-next.4 → 9.0.0-next.6

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 (64) hide show
  1. package/CHANGELOG.md +162 -0
  2. package/dist/Auth.d.ts +1 -1
  3. package/dist/DatabaseReader.d.ts +4299 -26
  4. package/dist/DatabaseReader.d.ts.map +1 -1
  5. package/dist/DatabaseReader.js +5 -6
  6. package/dist/DatabaseReader.js.map +1 -1
  7. package/dist/DatabaseSchema.d.ts +25 -112
  8. package/dist/DatabaseSchema.d.ts.map +1 -1
  9. package/dist/DatabaseSchema.js +20 -30
  10. package/dist/DatabaseSchema.js.map +1 -1
  11. package/dist/DatabaseWriter.d.ts +4 -4
  12. package/dist/DatabaseWriter.d.ts.map +1 -1
  13. package/dist/DatabaseWriter.js +3 -4
  14. package/dist/DatabaseWriter.js.map +1 -1
  15. package/dist/FunctionImpl.d.ts +26 -17
  16. package/dist/FunctionImpl.d.ts.map +1 -1
  17. package/dist/FunctionImpl.js +22 -14
  18. package/dist/FunctionImpl.js.map +1 -1
  19. package/dist/GroupImpl.d.ts +22 -13
  20. package/dist/GroupImpl.d.ts.map +1 -1
  21. package/dist/GroupImpl.js +34 -35
  22. package/dist/GroupImpl.js.map +1 -1
  23. package/dist/Handler.d.ts +1 -1
  24. package/dist/QueryInitializer.d.ts +1 -1
  25. package/dist/QueryInitializer.d.ts.map +1 -1
  26. package/dist/QueryInitializer.js.map +1 -1
  27. package/dist/RegisteredConvexFunction.d.ts +1085 -18
  28. package/dist/RegisteredConvexFunction.d.ts.map +1 -1
  29. package/dist/RegisteredConvexFunction.js +4 -4
  30. package/dist/RegisteredConvexFunction.js.map +1 -1
  31. package/dist/RegisteredFunction.d.ts +4 -4
  32. package/dist/RegisteredFunction.d.ts.map +1 -1
  33. package/dist/RegisteredFunctions.d.ts +36 -12
  34. package/dist/RegisteredFunctions.d.ts.map +1 -1
  35. package/dist/RegisteredFunctions.js +21 -9
  36. package/dist/RegisteredFunctions.js.map +1 -1
  37. package/dist/RegisteredNodeFunction.d.ts +4 -4
  38. package/dist/RegisteredNodeFunction.d.ts.map +1 -1
  39. package/dist/RegisteredNodeFunction.js +2 -2
  40. package/dist/RegisteredNodeFunction.js.map +1 -1
  41. package/dist/StorageActionWriter.d.ts +1 -1
  42. package/dist/Table.d.ts +27 -19
  43. package/dist/Table.d.ts.map +1 -1
  44. package/dist/Table.js +69 -60
  45. package/dist/Table.js.map +1 -1
  46. package/dist/index.d.ts +4 -5
  47. package/dist/index.js +4 -5
  48. package/package.json +51 -52
  49. package/src/DatabaseReader.ts +17 -21
  50. package/src/DatabaseSchema.ts +38 -98
  51. package/src/DatabaseWriter.ts +8 -5
  52. package/src/FunctionImpl.ts +33 -43
  53. package/src/GroupImpl.ts +45 -69
  54. package/src/QueryInitializer.ts +10 -2
  55. package/src/RegisteredConvexFunction.ts +5 -6
  56. package/src/RegisteredFunctions.ts +67 -93
  57. package/src/RegisteredNodeFunction.ts +3 -4
  58. package/src/Table.ts +251 -131
  59. package/src/index.ts +0 -1
  60. package/dist/Api.d.ts +0 -43
  61. package/dist/Api.d.ts.map +0 -1
  62. package/dist/Api.js +0 -43
  63. package/dist/Api.js.map +0 -1
  64. package/src/Api.ts +0 -102
@@ -1,7 +1,6 @@
1
- import { Name, WithName } from "./Table.js";
2
- import { AnyWithProps, IncludeSystemTables, Tables } from "./DatabaseSchema.js";
3
- import { AnyWithPropsWithRuntime } from "./Api.js";
4
1
  import { Auth as Auth$1 } from "./Auth.js";
2
+ import { Name, SystemTables, Table, WithName } from "./Table.js";
3
+ import { AnyWithProps, Tables } from "./DatabaseSchema.js";
5
4
  import { DocumentDecodeError, DocumentEncodeError, WithoutSystemFields as WithoutSystemFields$1 } from "./Document.js";
6
5
  import { TableInfo } from "./TableInfo.js";
7
6
  import { DataModel, DocumentByName, FromSchema, TableInfoWithName, TableNames, ToConvex } from "./DataModel.js";
@@ -17,47 +16,1115 @@ import { StorageReader as StorageReader$1 } from "./StorageReader.js";
17
16
  import { StorageWriter as StorageWriter$1 } from "./StorageWriter.js";
18
17
  import { Any } from "./RegisteredFunction.js";
19
18
  import { AnyWithProps as AnyWithProps$1 } from "./RegistryItem.js";
20
- import { Effect, Layer } from "effect";
19
+ import { Effect, Layer, Schema } from "effect";
21
20
  import * as _confect_core_Ref0 from "@confect/core/Ref";
22
21
  import * as convex_server0 from "convex/server";
23
22
  import { GenericMutationCtx } from "convex/server";
24
23
  import * as convex_values0 from "convex/values";
25
24
  import * as _confect_core_Types0 from "@confect/core/Types";
25
+ import * as effect_ParseResult0 from "effect/ParseResult";
26
26
  import * as effect_Duration0 from "effect/Duration";
27
27
  import * as effect_DateTime0 from "effect/DateTime";
28
- import * as effect_ParseResult0 from "effect/ParseResult";
29
28
 
30
29
  //#region src/RegisteredConvexFunction.d.ts
31
30
  declare namespace RegisteredConvexFunction_d_exports {
32
31
  export { MutationServices, make, mutationLayer };
33
32
  }
34
- declare const make: <Api_ extends AnyWithPropsWithRuntime<"Convex">>(api: Api_, {
33
+ declare const make: (databaseSchema: AnyWithProps, {
35
34
  functionSpec,
36
35
  handler
37
36
  }: AnyWithProps$1) => Any;
38
- declare const mutationLayer: <Schema extends AnyWithProps>(schema: Schema, ctx: GenericMutationCtx<ToConvex<FromSchema<Schema>>>) => Layer.Layer<StorageReader$1 | {
39
- runAfter: <Ref_ extends _confect_core_Ref0.AnyMutation | _confect_core_Ref0.AnyAction>(delay: effect_Duration0.Duration, ref: Ref_, ...args: _confect_core_Ref0.OptionalArgs<Ref_>) => Effect.Effect<convex_values0.GenericId<"_scheduled_functions">, never, never>;
40
- runAt: <Ref_ extends _confect_core_Ref0.AnyMutation | _confect_core_Ref0.AnyAction>(dateTime: effect_DateTime0.DateTime, ref: Ref_, ...args: _confect_core_Ref0.OptionalArgs<Ref_>) => Effect.Effect<convex_values0.GenericId<"_scheduled_functions">, never, never>;
41
- } | Auth$1 | StorageWriter$1 | (<Query extends _confect_core_Ref0.AnyQuery>(query: Query, ...args: _confect_core_Ref0.OptionalArgs<Query>) => Effect.Effect<_confect_core_Ref0.Returns<Query>, _confect_core_Ref0.Error<Query> | effect_ParseResult0.ParseError>) | (<Mutation extends _confect_core_Ref0.AnyMutation>(mutation: Mutation, ...args: _confect_core_Ref0.OptionalArgs<Mutation>) => Effect.Effect<_confect_core_Ref0.Returns<Mutation>, _confect_core_Ref0.Error<Mutation> | effect_ParseResult0.ParseError>) | GenericMutationCtx<ToConvex<FromSchema<Schema>>> | {
42
- table: <const TableName extends Name<IncludeSystemTables<Tables<Schema>>>>(tableName: TableName) => {
37
+ declare const mutationLayer: <Schema extends AnyWithProps>(schema: Schema, ctx: GenericMutationCtx<ToConvex<FromSchema<Schema>>>) => Layer.Layer<(<Mutation extends _confect_core_Ref0.AnyMutation>(mutation: Mutation, ...args: _confect_core_Ref0.OptionalArgs<Mutation>) => Effect.Effect<_confect_core_Ref0.Returns<Mutation>, _confect_core_Ref0.Error<Mutation> | effect_ParseResult0.ParseError>) | Auth$1 | (<Query extends _confect_core_Ref0.AnyQuery>(query: Query, ...args: _confect_core_Ref0.OptionalArgs<Query>) => Effect.Effect<_confect_core_Ref0.Returns<Query>, _confect_core_Ref0.Error<Query> | effect_ParseResult0.ParseError>) | GenericMutationCtx<ToConvex<FromSchema<Schema>>> | {
38
+ table: <const TableName extends Name<Tables<Schema>> | "_scheduled_functions" | "_storage">(tableName: TableName) => {
43
39
  readonly get: {
44
- (id: convex_values0.GenericId<TableName>): Effect.Effect<TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>["document"], GetByIdFailure | DocumentDecodeError, never>;
45
- <IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>["indexes"]>(indexName: IndexName, ...indexFieldValues: _confect_core_Types0.IndexFieldTypesForEq<ToConvex<DataModel<IncludeSystemTables<Tables<Schema>>>>, TableName, TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>["indexes"][IndexName]>): Effect.Effect<TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>["document"], DocumentDecodeError | GetByIndexFailure, never>;
40
+ (id: convex_values0.GenericId<TableName>): Effect.Effect<(TableInfo<WithName<Tables<Schema>, TableName>> | TableInfo<WithName<Table<"_scheduled_functions", Schema.Struct<{
41
+ name: typeof Schema.String;
42
+ args: Schema.Array$<typeof Schema.Any>;
43
+ scheduledTime: typeof Schema.Number;
44
+ completedTime: Schema.optionalWith<typeof Schema.Number, {
45
+ exact: true;
46
+ }>;
47
+ state: Schema.Union<[Schema.Struct<{
48
+ kind: Schema.Literal<["pending"]>;
49
+ }>, Schema.Struct<{
50
+ kind: Schema.Literal<["inProgress"]>;
51
+ }>, Schema.Struct<{
52
+ kind: Schema.Literal<["success"]>;
53
+ }>, Schema.Struct<{
54
+ kind: Schema.Literal<["failed"]>;
55
+ error: typeof Schema.String;
56
+ }>, Schema.Struct<{
57
+ kind: Schema.Literal<["canceled"]>;
58
+ }>]>;
59
+ }>, convex_values0.VObject<{
60
+ name: string;
61
+ args: any[];
62
+ scheduledTime: number;
63
+ state: {
64
+ kind: "pending";
65
+ } | {
66
+ kind: "inProgress";
67
+ } | {
68
+ kind: "success";
69
+ } | {
70
+ error: string;
71
+ kind: "failed";
72
+ } | {
73
+ kind: "canceled";
74
+ };
75
+ completedTime?: number;
76
+ }, {
77
+ name: convex_values0.VString<string, "required">;
78
+ args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
79
+ scheduledTime: convex_values0.VFloat64<number, "required">;
80
+ state: convex_values0.VUnion<{
81
+ kind: "pending";
82
+ } | {
83
+ kind: "inProgress";
84
+ } | {
85
+ kind: "success";
86
+ } | {
87
+ error: string;
88
+ kind: "failed";
89
+ } | {
90
+ kind: "canceled";
91
+ }, [convex_values0.VObject<{
92
+ kind: "pending";
93
+ }, {
94
+ kind: convex_values0.VLiteral<"pending", "required">;
95
+ }, "required", "kind">, convex_values0.VObject<{
96
+ kind: "inProgress";
97
+ }, {
98
+ kind: convex_values0.VLiteral<"inProgress", "required">;
99
+ }, "required", "kind">, convex_values0.VObject<{
100
+ kind: "success";
101
+ }, {
102
+ kind: convex_values0.VLiteral<"success", "required">;
103
+ }, "required", "kind">, convex_values0.VObject<{
104
+ error: string;
105
+ kind: "failed";
106
+ }, {
107
+ error: convex_values0.VString<string, "required">;
108
+ kind: convex_values0.VLiteral<"failed", "required">;
109
+ }, "required", "error" | "kind">, convex_values0.VObject<{
110
+ kind: "canceled";
111
+ }, {
112
+ kind: convex_values0.VLiteral<"canceled", "required">;
113
+ }, "required", "kind">], "required", "error" | "kind">;
114
+ completedTime: convex_values0.VFloat64<number | undefined, "optional">;
115
+ }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.error" | "state.kind">, {}, {}, {}>, TableName>> | TableInfo<WithName<Table<"_storage", Schema.Struct<{
116
+ sha256: typeof Schema.String;
117
+ size: typeof Schema.Number;
118
+ contentType: Schema.optionalWith<typeof Schema.String, {
119
+ exact: true;
120
+ }>;
121
+ }>, convex_values0.VObject<{
122
+ sha256: string;
123
+ size: number;
124
+ contentType?: string;
125
+ }, {
126
+ sha256: convex_values0.VString<string, "required">;
127
+ size: convex_values0.VFloat64<number, "required">;
128
+ contentType: convex_values0.VString<string | undefined, "optional">;
129
+ }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>, TableName>>)["document"], DocumentDecodeError | GetByIdFailure, never>;
130
+ <IndexName extends keyof (TableInfo<WithName<Tables<Schema>, TableName>> | TableInfo<WithName<Table<"_scheduled_functions", Schema.Struct<{
131
+ name: typeof Schema.String;
132
+ args: Schema.Array$<typeof Schema.Any>;
133
+ scheduledTime: typeof Schema.Number;
134
+ completedTime: Schema.optionalWith<typeof Schema.Number, {
135
+ exact: true;
136
+ }>;
137
+ state: Schema.Union<[Schema.Struct<{
138
+ kind: Schema.Literal<["pending"]>;
139
+ }>, Schema.Struct<{
140
+ kind: Schema.Literal<["inProgress"]>;
141
+ }>, Schema.Struct<{
142
+ kind: Schema.Literal<["success"]>;
143
+ }>, Schema.Struct<{
144
+ kind: Schema.Literal<["failed"]>;
145
+ error: typeof Schema.String;
146
+ }>, Schema.Struct<{
147
+ kind: Schema.Literal<["canceled"]>;
148
+ }>]>;
149
+ }>, convex_values0.VObject<{
150
+ name: string;
151
+ args: any[];
152
+ scheduledTime: number;
153
+ state: {
154
+ kind: "pending";
155
+ } | {
156
+ kind: "inProgress";
157
+ } | {
158
+ kind: "success";
159
+ } | {
160
+ error: string;
161
+ kind: "failed";
162
+ } | {
163
+ kind: "canceled";
164
+ };
165
+ completedTime?: number;
166
+ }, {
167
+ name: convex_values0.VString<string, "required">;
168
+ args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
169
+ scheduledTime: convex_values0.VFloat64<number, "required">;
170
+ state: convex_values0.VUnion<{
171
+ kind: "pending";
172
+ } | {
173
+ kind: "inProgress";
174
+ } | {
175
+ kind: "success";
176
+ } | {
177
+ error: string;
178
+ kind: "failed";
179
+ } | {
180
+ kind: "canceled";
181
+ }, [convex_values0.VObject<{
182
+ kind: "pending";
183
+ }, {
184
+ kind: convex_values0.VLiteral<"pending", "required">;
185
+ }, "required", "kind">, convex_values0.VObject<{
186
+ kind: "inProgress";
187
+ }, {
188
+ kind: convex_values0.VLiteral<"inProgress", "required">;
189
+ }, "required", "kind">, convex_values0.VObject<{
190
+ kind: "success";
191
+ }, {
192
+ kind: convex_values0.VLiteral<"success", "required">;
193
+ }, "required", "kind">, convex_values0.VObject<{
194
+ error: string;
195
+ kind: "failed";
196
+ }, {
197
+ error: convex_values0.VString<string, "required">;
198
+ kind: convex_values0.VLiteral<"failed", "required">;
199
+ }, "required", "error" | "kind">, convex_values0.VObject<{
200
+ kind: "canceled";
201
+ }, {
202
+ kind: convex_values0.VLiteral<"canceled", "required">;
203
+ }, "required", "kind">], "required", "error" | "kind">;
204
+ completedTime: convex_values0.VFloat64<number | undefined, "optional">;
205
+ }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.error" | "state.kind">, {}, {}, {}>, TableName>> | TableInfo<WithName<Table<"_storage", Schema.Struct<{
206
+ sha256: typeof Schema.String;
207
+ size: typeof Schema.Number;
208
+ contentType: Schema.optionalWith<typeof Schema.String, {
209
+ exact: true;
210
+ }>;
211
+ }>, convex_values0.VObject<{
212
+ sha256: string;
213
+ size: number;
214
+ contentType?: string;
215
+ }, {
216
+ sha256: convex_values0.VString<string, "required">;
217
+ size: convex_values0.VFloat64<number, "required">;
218
+ contentType: convex_values0.VString<string | undefined, "optional">;
219
+ }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>, TableName>>)["indexes"]>(indexName: IndexName, ...indexFieldValues: _confect_core_Types0.IndexFieldTypesForEq<ToConvex<DataModel<Tables<Schema> | SystemTables>>, TableName, (TableInfo<WithName<Tables<Schema>, TableName>> | TableInfo<WithName<Table<"_scheduled_functions", Schema.Struct<{
220
+ name: typeof Schema.String;
221
+ args: Schema.Array$<typeof Schema.Any>;
222
+ scheduledTime: typeof Schema.Number;
223
+ completedTime: Schema.optionalWith<typeof Schema.Number, {
224
+ exact: true;
225
+ }>;
226
+ state: Schema.Union<[Schema.Struct<{
227
+ kind: Schema.Literal<["pending"]>;
228
+ }>, Schema.Struct<{
229
+ kind: Schema.Literal<["inProgress"]>;
230
+ }>, Schema.Struct<{
231
+ kind: Schema.Literal<["success"]>;
232
+ }>, Schema.Struct<{
233
+ kind: Schema.Literal<["failed"]>;
234
+ error: typeof Schema.String;
235
+ }>, Schema.Struct<{
236
+ kind: Schema.Literal<["canceled"]>;
237
+ }>]>;
238
+ }>, convex_values0.VObject<{
239
+ name: string;
240
+ args: any[];
241
+ scheduledTime: number;
242
+ state: {
243
+ kind: "pending";
244
+ } | {
245
+ kind: "inProgress";
246
+ } | {
247
+ kind: "success";
248
+ } | {
249
+ error: string;
250
+ kind: "failed";
251
+ } | {
252
+ kind: "canceled";
253
+ };
254
+ completedTime?: number;
255
+ }, {
256
+ name: convex_values0.VString<string, "required">;
257
+ args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
258
+ scheduledTime: convex_values0.VFloat64<number, "required">;
259
+ state: convex_values0.VUnion<{
260
+ kind: "pending";
261
+ } | {
262
+ kind: "inProgress";
263
+ } | {
264
+ kind: "success";
265
+ } | {
266
+ error: string;
267
+ kind: "failed";
268
+ } | {
269
+ kind: "canceled";
270
+ }, [convex_values0.VObject<{
271
+ kind: "pending";
272
+ }, {
273
+ kind: convex_values0.VLiteral<"pending", "required">;
274
+ }, "required", "kind">, convex_values0.VObject<{
275
+ kind: "inProgress";
276
+ }, {
277
+ kind: convex_values0.VLiteral<"inProgress", "required">;
278
+ }, "required", "kind">, convex_values0.VObject<{
279
+ kind: "success";
280
+ }, {
281
+ kind: convex_values0.VLiteral<"success", "required">;
282
+ }, "required", "kind">, convex_values0.VObject<{
283
+ error: string;
284
+ kind: "failed";
285
+ }, {
286
+ error: convex_values0.VString<string, "required">;
287
+ kind: convex_values0.VLiteral<"failed", "required">;
288
+ }, "required", "error" | "kind">, convex_values0.VObject<{
289
+ kind: "canceled";
290
+ }, {
291
+ kind: convex_values0.VLiteral<"canceled", "required">;
292
+ }, "required", "kind">], "required", "error" | "kind">;
293
+ completedTime: convex_values0.VFloat64<number | undefined, "optional">;
294
+ }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.error" | "state.kind">, {}, {}, {}>, TableName>> | TableInfo<WithName<Table<"_storage", Schema.Struct<{
295
+ sha256: typeof Schema.String;
296
+ size: typeof Schema.Number;
297
+ contentType: Schema.optionalWith<typeof Schema.String, {
298
+ exact: true;
299
+ }>;
300
+ }>, convex_values0.VObject<{
301
+ sha256: string;
302
+ size: number;
303
+ contentType?: string;
304
+ }, {
305
+ sha256: convex_values0.VString<string, "required">;
306
+ size: convex_values0.VFloat64<number, "required">;
307
+ contentType: convex_values0.VString<string | undefined, "optional">;
308
+ }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>, TableName>>)["indexes"][IndexName]>): Effect.Effect<(TableInfo<WithName<Tables<Schema>, TableName>> | TableInfo<WithName<Table<"_scheduled_functions", Schema.Struct<{
309
+ name: typeof Schema.String;
310
+ args: Schema.Array$<typeof Schema.Any>;
311
+ scheduledTime: typeof Schema.Number;
312
+ completedTime: Schema.optionalWith<typeof Schema.Number, {
313
+ exact: true;
314
+ }>;
315
+ state: Schema.Union<[Schema.Struct<{
316
+ kind: Schema.Literal<["pending"]>;
317
+ }>, Schema.Struct<{
318
+ kind: Schema.Literal<["inProgress"]>;
319
+ }>, Schema.Struct<{
320
+ kind: Schema.Literal<["success"]>;
321
+ }>, Schema.Struct<{
322
+ kind: Schema.Literal<["failed"]>;
323
+ error: typeof Schema.String;
324
+ }>, Schema.Struct<{
325
+ kind: Schema.Literal<["canceled"]>;
326
+ }>]>;
327
+ }>, convex_values0.VObject<{
328
+ name: string;
329
+ args: any[];
330
+ scheduledTime: number;
331
+ state: {
332
+ kind: "pending";
333
+ } | {
334
+ kind: "inProgress";
335
+ } | {
336
+ kind: "success";
337
+ } | {
338
+ error: string;
339
+ kind: "failed";
340
+ } | {
341
+ kind: "canceled";
342
+ };
343
+ completedTime?: number;
344
+ }, {
345
+ name: convex_values0.VString<string, "required">;
346
+ args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
347
+ scheduledTime: convex_values0.VFloat64<number, "required">;
348
+ state: convex_values0.VUnion<{
349
+ kind: "pending";
350
+ } | {
351
+ kind: "inProgress";
352
+ } | {
353
+ kind: "success";
354
+ } | {
355
+ error: string;
356
+ kind: "failed";
357
+ } | {
358
+ kind: "canceled";
359
+ }, [convex_values0.VObject<{
360
+ kind: "pending";
361
+ }, {
362
+ kind: convex_values0.VLiteral<"pending", "required">;
363
+ }, "required", "kind">, convex_values0.VObject<{
364
+ kind: "inProgress";
365
+ }, {
366
+ kind: convex_values0.VLiteral<"inProgress", "required">;
367
+ }, "required", "kind">, convex_values0.VObject<{
368
+ kind: "success";
369
+ }, {
370
+ kind: convex_values0.VLiteral<"success", "required">;
371
+ }, "required", "kind">, convex_values0.VObject<{
372
+ error: string;
373
+ kind: "failed";
374
+ }, {
375
+ error: convex_values0.VString<string, "required">;
376
+ kind: convex_values0.VLiteral<"failed", "required">;
377
+ }, "required", "error" | "kind">, convex_values0.VObject<{
378
+ kind: "canceled";
379
+ }, {
380
+ kind: convex_values0.VLiteral<"canceled", "required">;
381
+ }, "required", "kind">], "required", "error" | "kind">;
382
+ completedTime: convex_values0.VFloat64<number | undefined, "optional">;
383
+ }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.error" | "state.kind">, {}, {}, {}>, TableName>> | TableInfo<WithName<Table<"_storage", Schema.Struct<{
384
+ sha256: typeof Schema.String;
385
+ size: typeof Schema.Number;
386
+ contentType: Schema.optionalWith<typeof Schema.String, {
387
+ exact: true;
388
+ }>;
389
+ }>, convex_values0.VObject<{
390
+ sha256: string;
391
+ size: number;
392
+ contentType?: string;
393
+ }, {
394
+ sha256: convex_values0.VString<string, "required">;
395
+ size: convex_values0.VFloat64<number, "required">;
396
+ contentType: convex_values0.VString<string | undefined, "optional">;
397
+ }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>, TableName>>)["document"], DocumentDecodeError | GetByIndexFailure, never>;
46
398
  };
47
399
  readonly index: {
48
- <IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>["indexes"]>(indexName: IndexName, indexRange?: ((q: convex_server0.IndexRangeBuilder<TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>["convexDocument"], convex_server0.NamedIndex<TableInfoWithName<DataModel<IncludeSystemTables<Tables<Schema>>>, TableName>, IndexName>, 0>) => convex_server0.IndexRange) | undefined, order?: "asc" | "desc"): OrderedQuery$1<TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>, TableName>;
49
- <IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>["indexes"]>(indexName: IndexName, order?: "asc" | "desc"): OrderedQuery$1<TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>, TableName>;
400
+ <IndexName extends keyof (TableInfo<WithName<Tables<Schema>, TableName>> | TableInfo<WithName<Table<"_scheduled_functions", Schema.Struct<{
401
+ name: typeof Schema.String;
402
+ args: Schema.Array$<typeof Schema.Any>;
403
+ scheduledTime: typeof Schema.Number;
404
+ completedTime: Schema.optionalWith<typeof Schema.Number, {
405
+ exact: true;
406
+ }>;
407
+ state: Schema.Union<[Schema.Struct<{
408
+ kind: Schema.Literal<["pending"]>;
409
+ }>, Schema.Struct<{
410
+ kind: Schema.Literal<["inProgress"]>;
411
+ }>, Schema.Struct<{
412
+ kind: Schema.Literal<["success"]>;
413
+ }>, Schema.Struct<{
414
+ kind: Schema.Literal<["failed"]>;
415
+ error: typeof Schema.String;
416
+ }>, Schema.Struct<{
417
+ kind: Schema.Literal<["canceled"]>;
418
+ }>]>;
419
+ }>, convex_values0.VObject<{
420
+ name: string;
421
+ args: any[];
422
+ scheduledTime: number;
423
+ state: {
424
+ kind: "pending";
425
+ } | {
426
+ kind: "inProgress";
427
+ } | {
428
+ kind: "success";
429
+ } | {
430
+ error: string;
431
+ kind: "failed";
432
+ } | {
433
+ kind: "canceled";
434
+ };
435
+ completedTime?: number;
436
+ }, {
437
+ name: convex_values0.VString<string, "required">;
438
+ args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
439
+ scheduledTime: convex_values0.VFloat64<number, "required">;
440
+ state: convex_values0.VUnion<{
441
+ kind: "pending";
442
+ } | {
443
+ kind: "inProgress";
444
+ } | {
445
+ kind: "success";
446
+ } | {
447
+ error: string;
448
+ kind: "failed";
449
+ } | {
450
+ kind: "canceled";
451
+ }, [convex_values0.VObject<{
452
+ kind: "pending";
453
+ }, {
454
+ kind: convex_values0.VLiteral<"pending", "required">;
455
+ }, "required", "kind">, convex_values0.VObject<{
456
+ kind: "inProgress";
457
+ }, {
458
+ kind: convex_values0.VLiteral<"inProgress", "required">;
459
+ }, "required", "kind">, convex_values0.VObject<{
460
+ kind: "success";
461
+ }, {
462
+ kind: convex_values0.VLiteral<"success", "required">;
463
+ }, "required", "kind">, convex_values0.VObject<{
464
+ error: string;
465
+ kind: "failed";
466
+ }, {
467
+ error: convex_values0.VString<string, "required">;
468
+ kind: convex_values0.VLiteral<"failed", "required">;
469
+ }, "required", "error" | "kind">, convex_values0.VObject<{
470
+ kind: "canceled";
471
+ }, {
472
+ kind: convex_values0.VLiteral<"canceled", "required">;
473
+ }, "required", "kind">], "required", "error" | "kind">;
474
+ completedTime: convex_values0.VFloat64<number | undefined, "optional">;
475
+ }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.error" | "state.kind">, {}, {}, {}>, TableName>> | TableInfo<WithName<Table<"_storage", Schema.Struct<{
476
+ sha256: typeof Schema.String;
477
+ size: typeof Schema.Number;
478
+ contentType: Schema.optionalWith<typeof Schema.String, {
479
+ exact: true;
480
+ }>;
481
+ }>, convex_values0.VObject<{
482
+ sha256: string;
483
+ size: number;
484
+ contentType?: string;
485
+ }, {
486
+ sha256: convex_values0.VString<string, "required">;
487
+ size: convex_values0.VFloat64<number, "required">;
488
+ contentType: convex_values0.VString<string | undefined, "optional">;
489
+ }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>, TableName>>)["indexes"]>(indexName: IndexName, indexRange?: ((q: convex_server0.IndexRangeBuilder<(TableInfo<WithName<Tables<Schema>, TableName>> | TableInfo<WithName<Table<"_scheduled_functions", Schema.Struct<{
490
+ name: typeof Schema.String;
491
+ args: Schema.Array$<typeof Schema.Any>;
492
+ scheduledTime: typeof Schema.Number;
493
+ completedTime: Schema.optionalWith<typeof Schema.Number, {
494
+ exact: true;
495
+ }>;
496
+ state: Schema.Union<[Schema.Struct<{
497
+ kind: Schema.Literal<["pending"]>;
498
+ }>, Schema.Struct<{
499
+ kind: Schema.Literal<["inProgress"]>;
500
+ }>, Schema.Struct<{
501
+ kind: Schema.Literal<["success"]>;
502
+ }>, Schema.Struct<{
503
+ kind: Schema.Literal<["failed"]>;
504
+ error: typeof Schema.String;
505
+ }>, Schema.Struct<{
506
+ kind: Schema.Literal<["canceled"]>;
507
+ }>]>;
508
+ }>, convex_values0.VObject<{
509
+ name: string;
510
+ args: any[];
511
+ scheduledTime: number;
512
+ state: {
513
+ kind: "pending";
514
+ } | {
515
+ kind: "inProgress";
516
+ } | {
517
+ kind: "success";
518
+ } | {
519
+ error: string;
520
+ kind: "failed";
521
+ } | {
522
+ kind: "canceled";
523
+ };
524
+ completedTime?: number;
525
+ }, {
526
+ name: convex_values0.VString<string, "required">;
527
+ args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
528
+ scheduledTime: convex_values0.VFloat64<number, "required">;
529
+ state: convex_values0.VUnion<{
530
+ kind: "pending";
531
+ } | {
532
+ kind: "inProgress";
533
+ } | {
534
+ kind: "success";
535
+ } | {
536
+ error: string;
537
+ kind: "failed";
538
+ } | {
539
+ kind: "canceled";
540
+ }, [convex_values0.VObject<{
541
+ kind: "pending";
542
+ }, {
543
+ kind: convex_values0.VLiteral<"pending", "required">;
544
+ }, "required", "kind">, convex_values0.VObject<{
545
+ kind: "inProgress";
546
+ }, {
547
+ kind: convex_values0.VLiteral<"inProgress", "required">;
548
+ }, "required", "kind">, convex_values0.VObject<{
549
+ kind: "success";
550
+ }, {
551
+ kind: convex_values0.VLiteral<"success", "required">;
552
+ }, "required", "kind">, convex_values0.VObject<{
553
+ error: string;
554
+ kind: "failed";
555
+ }, {
556
+ error: convex_values0.VString<string, "required">;
557
+ kind: convex_values0.VLiteral<"failed", "required">;
558
+ }, "required", "error" | "kind">, convex_values0.VObject<{
559
+ kind: "canceled";
560
+ }, {
561
+ kind: convex_values0.VLiteral<"canceled", "required">;
562
+ }, "required", "kind">], "required", "error" | "kind">;
563
+ completedTime: convex_values0.VFloat64<number | undefined, "optional">;
564
+ }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.error" | "state.kind">, {}, {}, {}>, TableName>> | TableInfo<WithName<Table<"_storage", Schema.Struct<{
565
+ sha256: typeof Schema.String;
566
+ size: typeof Schema.Number;
567
+ contentType: Schema.optionalWith<typeof Schema.String, {
568
+ exact: true;
569
+ }>;
570
+ }>, convex_values0.VObject<{
571
+ sha256: string;
572
+ size: number;
573
+ contentType?: string;
574
+ }, {
575
+ sha256: convex_values0.VString<string, "required">;
576
+ size: convex_values0.VFloat64<number, "required">;
577
+ contentType: convex_values0.VString<string | undefined, "optional">;
578
+ }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>, TableName>>)["convexDocument"], convex_server0.NamedIndex<TableInfoWithName<DataModel<Tables<Schema> | SystemTables>, TableName>, IndexName>, 0>) => convex_server0.IndexRange) | undefined, order?: "asc" | "desc"): OrderedQuery$1<TableInfo<WithName<Tables<Schema>, TableName>> | TableInfo<WithName<Table<"_scheduled_functions", Schema.Struct<{
579
+ name: typeof Schema.String;
580
+ args: Schema.Array$<typeof Schema.Any>;
581
+ scheduledTime: typeof Schema.Number;
582
+ completedTime: Schema.optionalWith<typeof Schema.Number, {
583
+ exact: true;
584
+ }>;
585
+ state: Schema.Union<[Schema.Struct<{
586
+ kind: Schema.Literal<["pending"]>;
587
+ }>, Schema.Struct<{
588
+ kind: Schema.Literal<["inProgress"]>;
589
+ }>, Schema.Struct<{
590
+ kind: Schema.Literal<["success"]>;
591
+ }>, Schema.Struct<{
592
+ kind: Schema.Literal<["failed"]>;
593
+ error: typeof Schema.String;
594
+ }>, Schema.Struct<{
595
+ kind: Schema.Literal<["canceled"]>;
596
+ }>]>;
597
+ }>, convex_values0.VObject<{
598
+ name: string;
599
+ args: any[];
600
+ scheduledTime: number;
601
+ state: {
602
+ kind: "pending";
603
+ } | {
604
+ kind: "inProgress";
605
+ } | {
606
+ kind: "success";
607
+ } | {
608
+ error: string;
609
+ kind: "failed";
610
+ } | {
611
+ kind: "canceled";
612
+ };
613
+ completedTime?: number;
614
+ }, {
615
+ name: convex_values0.VString<string, "required">;
616
+ args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
617
+ scheduledTime: convex_values0.VFloat64<number, "required">;
618
+ state: convex_values0.VUnion<{
619
+ kind: "pending";
620
+ } | {
621
+ kind: "inProgress";
622
+ } | {
623
+ kind: "success";
624
+ } | {
625
+ error: string;
626
+ kind: "failed";
627
+ } | {
628
+ kind: "canceled";
629
+ }, [convex_values0.VObject<{
630
+ kind: "pending";
631
+ }, {
632
+ kind: convex_values0.VLiteral<"pending", "required">;
633
+ }, "required", "kind">, convex_values0.VObject<{
634
+ kind: "inProgress";
635
+ }, {
636
+ kind: convex_values0.VLiteral<"inProgress", "required">;
637
+ }, "required", "kind">, convex_values0.VObject<{
638
+ kind: "success";
639
+ }, {
640
+ kind: convex_values0.VLiteral<"success", "required">;
641
+ }, "required", "kind">, convex_values0.VObject<{
642
+ error: string;
643
+ kind: "failed";
644
+ }, {
645
+ error: convex_values0.VString<string, "required">;
646
+ kind: convex_values0.VLiteral<"failed", "required">;
647
+ }, "required", "error" | "kind">, convex_values0.VObject<{
648
+ kind: "canceled";
649
+ }, {
650
+ kind: convex_values0.VLiteral<"canceled", "required">;
651
+ }, "required", "kind">], "required", "error" | "kind">;
652
+ completedTime: convex_values0.VFloat64<number | undefined, "optional">;
653
+ }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.error" | "state.kind">, {}, {}, {}>, TableName>> | TableInfo<WithName<Table<"_storage", Schema.Struct<{
654
+ sha256: typeof Schema.String;
655
+ size: typeof Schema.Number;
656
+ contentType: Schema.optionalWith<typeof Schema.String, {
657
+ exact: true;
658
+ }>;
659
+ }>, convex_values0.VObject<{
660
+ sha256: string;
661
+ size: number;
662
+ contentType?: string;
663
+ }, {
664
+ sha256: convex_values0.VString<string, "required">;
665
+ size: convex_values0.VFloat64<number, "required">;
666
+ contentType: convex_values0.VString<string | undefined, "optional">;
667
+ }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>, TableName>>, TableName>;
668
+ <IndexName extends keyof (TableInfo<WithName<Tables<Schema>, TableName>> | TableInfo<WithName<Table<"_scheduled_functions", Schema.Struct<{
669
+ name: typeof Schema.String;
670
+ args: Schema.Array$<typeof Schema.Any>;
671
+ scheduledTime: typeof Schema.Number;
672
+ completedTime: Schema.optionalWith<typeof Schema.Number, {
673
+ exact: true;
674
+ }>;
675
+ state: Schema.Union<[Schema.Struct<{
676
+ kind: Schema.Literal<["pending"]>;
677
+ }>, Schema.Struct<{
678
+ kind: Schema.Literal<["inProgress"]>;
679
+ }>, Schema.Struct<{
680
+ kind: Schema.Literal<["success"]>;
681
+ }>, Schema.Struct<{
682
+ kind: Schema.Literal<["failed"]>;
683
+ error: typeof Schema.String;
684
+ }>, Schema.Struct<{
685
+ kind: Schema.Literal<["canceled"]>;
686
+ }>]>;
687
+ }>, convex_values0.VObject<{
688
+ name: string;
689
+ args: any[];
690
+ scheduledTime: number;
691
+ state: {
692
+ kind: "pending";
693
+ } | {
694
+ kind: "inProgress";
695
+ } | {
696
+ kind: "success";
697
+ } | {
698
+ error: string;
699
+ kind: "failed";
700
+ } | {
701
+ kind: "canceled";
702
+ };
703
+ completedTime?: number;
704
+ }, {
705
+ name: convex_values0.VString<string, "required">;
706
+ args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
707
+ scheduledTime: convex_values0.VFloat64<number, "required">;
708
+ state: convex_values0.VUnion<{
709
+ kind: "pending";
710
+ } | {
711
+ kind: "inProgress";
712
+ } | {
713
+ kind: "success";
714
+ } | {
715
+ error: string;
716
+ kind: "failed";
717
+ } | {
718
+ kind: "canceled";
719
+ }, [convex_values0.VObject<{
720
+ kind: "pending";
721
+ }, {
722
+ kind: convex_values0.VLiteral<"pending", "required">;
723
+ }, "required", "kind">, convex_values0.VObject<{
724
+ kind: "inProgress";
725
+ }, {
726
+ kind: convex_values0.VLiteral<"inProgress", "required">;
727
+ }, "required", "kind">, convex_values0.VObject<{
728
+ kind: "success";
729
+ }, {
730
+ kind: convex_values0.VLiteral<"success", "required">;
731
+ }, "required", "kind">, convex_values0.VObject<{
732
+ error: string;
733
+ kind: "failed";
734
+ }, {
735
+ error: convex_values0.VString<string, "required">;
736
+ kind: convex_values0.VLiteral<"failed", "required">;
737
+ }, "required", "error" | "kind">, convex_values0.VObject<{
738
+ kind: "canceled";
739
+ }, {
740
+ kind: convex_values0.VLiteral<"canceled", "required">;
741
+ }, "required", "kind">], "required", "error" | "kind">;
742
+ completedTime: convex_values0.VFloat64<number | undefined, "optional">;
743
+ }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.error" | "state.kind">, {}, {}, {}>, TableName>> | TableInfo<WithName<Table<"_storage", Schema.Struct<{
744
+ sha256: typeof Schema.String;
745
+ size: typeof Schema.Number;
746
+ contentType: Schema.optionalWith<typeof Schema.String, {
747
+ exact: true;
748
+ }>;
749
+ }>, convex_values0.VObject<{
750
+ sha256: string;
751
+ size: number;
752
+ contentType?: string;
753
+ }, {
754
+ sha256: convex_values0.VString<string, "required">;
755
+ size: convex_values0.VFloat64<number, "required">;
756
+ contentType: convex_values0.VString<string | undefined, "optional">;
757
+ }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>, TableName>>)["indexes"]>(indexName: IndexName, order?: "asc" | "desc"): OrderedQuery$1<TableInfo<WithName<Tables<Schema>, TableName>> | TableInfo<WithName<Table<"_scheduled_functions", Schema.Struct<{
758
+ name: typeof Schema.String;
759
+ args: Schema.Array$<typeof Schema.Any>;
760
+ scheduledTime: typeof Schema.Number;
761
+ completedTime: Schema.optionalWith<typeof Schema.Number, {
762
+ exact: true;
763
+ }>;
764
+ state: Schema.Union<[Schema.Struct<{
765
+ kind: Schema.Literal<["pending"]>;
766
+ }>, Schema.Struct<{
767
+ kind: Schema.Literal<["inProgress"]>;
768
+ }>, Schema.Struct<{
769
+ kind: Schema.Literal<["success"]>;
770
+ }>, Schema.Struct<{
771
+ kind: Schema.Literal<["failed"]>;
772
+ error: typeof Schema.String;
773
+ }>, Schema.Struct<{
774
+ kind: Schema.Literal<["canceled"]>;
775
+ }>]>;
776
+ }>, convex_values0.VObject<{
777
+ name: string;
778
+ args: any[];
779
+ scheduledTime: number;
780
+ state: {
781
+ kind: "pending";
782
+ } | {
783
+ kind: "inProgress";
784
+ } | {
785
+ kind: "success";
786
+ } | {
787
+ error: string;
788
+ kind: "failed";
789
+ } | {
790
+ kind: "canceled";
791
+ };
792
+ completedTime?: number;
793
+ }, {
794
+ name: convex_values0.VString<string, "required">;
795
+ args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
796
+ scheduledTime: convex_values0.VFloat64<number, "required">;
797
+ state: convex_values0.VUnion<{
798
+ kind: "pending";
799
+ } | {
800
+ kind: "inProgress";
801
+ } | {
802
+ kind: "success";
803
+ } | {
804
+ error: string;
805
+ kind: "failed";
806
+ } | {
807
+ kind: "canceled";
808
+ }, [convex_values0.VObject<{
809
+ kind: "pending";
810
+ }, {
811
+ kind: convex_values0.VLiteral<"pending", "required">;
812
+ }, "required", "kind">, convex_values0.VObject<{
813
+ kind: "inProgress";
814
+ }, {
815
+ kind: convex_values0.VLiteral<"inProgress", "required">;
816
+ }, "required", "kind">, convex_values0.VObject<{
817
+ kind: "success";
818
+ }, {
819
+ kind: convex_values0.VLiteral<"success", "required">;
820
+ }, "required", "kind">, convex_values0.VObject<{
821
+ error: string;
822
+ kind: "failed";
823
+ }, {
824
+ error: convex_values0.VString<string, "required">;
825
+ kind: convex_values0.VLiteral<"failed", "required">;
826
+ }, "required", "error" | "kind">, convex_values0.VObject<{
827
+ kind: "canceled";
828
+ }, {
829
+ kind: convex_values0.VLiteral<"canceled", "required">;
830
+ }, "required", "kind">], "required", "error" | "kind">;
831
+ completedTime: convex_values0.VFloat64<number | undefined, "optional">;
832
+ }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.error" | "state.kind">, {}, {}, {}>, TableName>> | TableInfo<WithName<Table<"_storage", Schema.Struct<{
833
+ sha256: typeof Schema.String;
834
+ size: typeof Schema.Number;
835
+ contentType: Schema.optionalWith<typeof Schema.String, {
836
+ exact: true;
837
+ }>;
838
+ }>, convex_values0.VObject<{
839
+ sha256: string;
840
+ size: number;
841
+ contentType?: string;
842
+ }, {
843
+ sha256: convex_values0.VString<string, "required">;
844
+ size: convex_values0.VFloat64<number, "required">;
845
+ contentType: convex_values0.VString<string | undefined, "optional">;
846
+ }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>, TableName>>, TableName>;
50
847
  };
51
- readonly search: <IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>["searchIndexes"]>(indexName: IndexName, searchFilter: (q: convex_server0.SearchFilterBuilder<TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>["convexDocument"], convex_server0.NamedSearchIndex<TableInfoWithName<DataModel<IncludeSystemTables<Tables<Schema>>>, TableName>, IndexName>>) => convex_server0.SearchFilter) => OrderedQuery$1<TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>, TableName>;
848
+ readonly search: <IndexName extends keyof (TableInfo<WithName<Tables<Schema>, TableName>> | TableInfo<WithName<Table<"_scheduled_functions", Schema.Struct<{
849
+ name: typeof Schema.String;
850
+ args: Schema.Array$<typeof Schema.Any>;
851
+ scheduledTime: typeof Schema.Number;
852
+ completedTime: Schema.optionalWith<typeof Schema.Number, {
853
+ exact: true;
854
+ }>;
855
+ state: Schema.Union<[Schema.Struct<{
856
+ kind: Schema.Literal<["pending"]>;
857
+ }>, Schema.Struct<{
858
+ kind: Schema.Literal<["inProgress"]>;
859
+ }>, Schema.Struct<{
860
+ kind: Schema.Literal<["success"]>;
861
+ }>, Schema.Struct<{
862
+ kind: Schema.Literal<["failed"]>;
863
+ error: typeof Schema.String;
864
+ }>, Schema.Struct<{
865
+ kind: Schema.Literal<["canceled"]>;
866
+ }>]>;
867
+ }>, convex_values0.VObject<{
868
+ name: string;
869
+ args: any[];
870
+ scheduledTime: number;
871
+ state: {
872
+ kind: "pending";
873
+ } | {
874
+ kind: "inProgress";
875
+ } | {
876
+ kind: "success";
877
+ } | {
878
+ error: string;
879
+ kind: "failed";
880
+ } | {
881
+ kind: "canceled";
882
+ };
883
+ completedTime?: number;
884
+ }, {
885
+ name: convex_values0.VString<string, "required">;
886
+ args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
887
+ scheduledTime: convex_values0.VFloat64<number, "required">;
888
+ state: convex_values0.VUnion<{
889
+ kind: "pending";
890
+ } | {
891
+ kind: "inProgress";
892
+ } | {
893
+ kind: "success";
894
+ } | {
895
+ error: string;
896
+ kind: "failed";
897
+ } | {
898
+ kind: "canceled";
899
+ }, [convex_values0.VObject<{
900
+ kind: "pending";
901
+ }, {
902
+ kind: convex_values0.VLiteral<"pending", "required">;
903
+ }, "required", "kind">, convex_values0.VObject<{
904
+ kind: "inProgress";
905
+ }, {
906
+ kind: convex_values0.VLiteral<"inProgress", "required">;
907
+ }, "required", "kind">, convex_values0.VObject<{
908
+ kind: "success";
909
+ }, {
910
+ kind: convex_values0.VLiteral<"success", "required">;
911
+ }, "required", "kind">, convex_values0.VObject<{
912
+ error: string;
913
+ kind: "failed";
914
+ }, {
915
+ error: convex_values0.VString<string, "required">;
916
+ kind: convex_values0.VLiteral<"failed", "required">;
917
+ }, "required", "error" | "kind">, convex_values0.VObject<{
918
+ kind: "canceled";
919
+ }, {
920
+ kind: convex_values0.VLiteral<"canceled", "required">;
921
+ }, "required", "kind">], "required", "error" | "kind">;
922
+ completedTime: convex_values0.VFloat64<number | undefined, "optional">;
923
+ }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.error" | "state.kind">, {}, {}, {}>, TableName>> | TableInfo<WithName<Table<"_storage", Schema.Struct<{
924
+ sha256: typeof Schema.String;
925
+ size: typeof Schema.Number;
926
+ contentType: Schema.optionalWith<typeof Schema.String, {
927
+ exact: true;
928
+ }>;
929
+ }>, convex_values0.VObject<{
930
+ sha256: string;
931
+ size: number;
932
+ contentType?: string;
933
+ }, {
934
+ sha256: convex_values0.VString<string, "required">;
935
+ size: convex_values0.VFloat64<number, "required">;
936
+ contentType: convex_values0.VString<string | undefined, "optional">;
937
+ }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>, TableName>>)["searchIndexes"]>(indexName: IndexName, searchFilter: (q: convex_server0.SearchFilterBuilder<(TableInfo<WithName<Tables<Schema>, TableName>> | TableInfo<WithName<Table<"_scheduled_functions", Schema.Struct<{
938
+ name: typeof Schema.String;
939
+ args: Schema.Array$<typeof Schema.Any>;
940
+ scheduledTime: typeof Schema.Number;
941
+ completedTime: Schema.optionalWith<typeof Schema.Number, {
942
+ exact: true;
943
+ }>;
944
+ state: Schema.Union<[Schema.Struct<{
945
+ kind: Schema.Literal<["pending"]>;
946
+ }>, Schema.Struct<{
947
+ kind: Schema.Literal<["inProgress"]>;
948
+ }>, Schema.Struct<{
949
+ kind: Schema.Literal<["success"]>;
950
+ }>, Schema.Struct<{
951
+ kind: Schema.Literal<["failed"]>;
952
+ error: typeof Schema.String;
953
+ }>, Schema.Struct<{
954
+ kind: Schema.Literal<["canceled"]>;
955
+ }>]>;
956
+ }>, convex_values0.VObject<{
957
+ name: string;
958
+ args: any[];
959
+ scheduledTime: number;
960
+ state: {
961
+ kind: "pending";
962
+ } | {
963
+ kind: "inProgress";
964
+ } | {
965
+ kind: "success";
966
+ } | {
967
+ error: string;
968
+ kind: "failed";
969
+ } | {
970
+ kind: "canceled";
971
+ };
972
+ completedTime?: number;
973
+ }, {
974
+ name: convex_values0.VString<string, "required">;
975
+ args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
976
+ scheduledTime: convex_values0.VFloat64<number, "required">;
977
+ state: convex_values0.VUnion<{
978
+ kind: "pending";
979
+ } | {
980
+ kind: "inProgress";
981
+ } | {
982
+ kind: "success";
983
+ } | {
984
+ error: string;
985
+ kind: "failed";
986
+ } | {
987
+ kind: "canceled";
988
+ }, [convex_values0.VObject<{
989
+ kind: "pending";
990
+ }, {
991
+ kind: convex_values0.VLiteral<"pending", "required">;
992
+ }, "required", "kind">, convex_values0.VObject<{
993
+ kind: "inProgress";
994
+ }, {
995
+ kind: convex_values0.VLiteral<"inProgress", "required">;
996
+ }, "required", "kind">, convex_values0.VObject<{
997
+ kind: "success";
998
+ }, {
999
+ kind: convex_values0.VLiteral<"success", "required">;
1000
+ }, "required", "kind">, convex_values0.VObject<{
1001
+ error: string;
1002
+ kind: "failed";
1003
+ }, {
1004
+ error: convex_values0.VString<string, "required">;
1005
+ kind: convex_values0.VLiteral<"failed", "required">;
1006
+ }, "required", "error" | "kind">, convex_values0.VObject<{
1007
+ kind: "canceled";
1008
+ }, {
1009
+ kind: convex_values0.VLiteral<"canceled", "required">;
1010
+ }, "required", "kind">], "required", "error" | "kind">;
1011
+ completedTime: convex_values0.VFloat64<number | undefined, "optional">;
1012
+ }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.error" | "state.kind">, {}, {}, {}>, TableName>> | TableInfo<WithName<Table<"_storage", Schema.Struct<{
1013
+ sha256: typeof Schema.String;
1014
+ size: typeof Schema.Number;
1015
+ contentType: Schema.optionalWith<typeof Schema.String, {
1016
+ exact: true;
1017
+ }>;
1018
+ }>, convex_values0.VObject<{
1019
+ sha256: string;
1020
+ size: number;
1021
+ contentType?: string;
1022
+ }, {
1023
+ sha256: convex_values0.VString<string, "required">;
1024
+ size: convex_values0.VFloat64<number, "required">;
1025
+ contentType: convex_values0.VString<string | undefined, "optional">;
1026
+ }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>, TableName>>)["convexDocument"], convex_server0.NamedSearchIndex<TableInfoWithName<DataModel<Tables<Schema> | SystemTables>, TableName>, IndexName>>) => convex_server0.SearchFilter) => OrderedQuery$1<TableInfo<WithName<Tables<Schema>, TableName>> | TableInfo<WithName<Table<"_scheduled_functions", Schema.Struct<{
1027
+ name: typeof Schema.String;
1028
+ args: Schema.Array$<typeof Schema.Any>;
1029
+ scheduledTime: typeof Schema.Number;
1030
+ completedTime: Schema.optionalWith<typeof Schema.Number, {
1031
+ exact: true;
1032
+ }>;
1033
+ state: Schema.Union<[Schema.Struct<{
1034
+ kind: Schema.Literal<["pending"]>;
1035
+ }>, Schema.Struct<{
1036
+ kind: Schema.Literal<["inProgress"]>;
1037
+ }>, Schema.Struct<{
1038
+ kind: Schema.Literal<["success"]>;
1039
+ }>, Schema.Struct<{
1040
+ kind: Schema.Literal<["failed"]>;
1041
+ error: typeof Schema.String;
1042
+ }>, Schema.Struct<{
1043
+ kind: Schema.Literal<["canceled"]>;
1044
+ }>]>;
1045
+ }>, convex_values0.VObject<{
1046
+ name: string;
1047
+ args: any[];
1048
+ scheduledTime: number;
1049
+ state: {
1050
+ kind: "pending";
1051
+ } | {
1052
+ kind: "inProgress";
1053
+ } | {
1054
+ kind: "success";
1055
+ } | {
1056
+ error: string;
1057
+ kind: "failed";
1058
+ } | {
1059
+ kind: "canceled";
1060
+ };
1061
+ completedTime?: number;
1062
+ }, {
1063
+ name: convex_values0.VString<string, "required">;
1064
+ args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
1065
+ scheduledTime: convex_values0.VFloat64<number, "required">;
1066
+ state: convex_values0.VUnion<{
1067
+ kind: "pending";
1068
+ } | {
1069
+ kind: "inProgress";
1070
+ } | {
1071
+ kind: "success";
1072
+ } | {
1073
+ error: string;
1074
+ kind: "failed";
1075
+ } | {
1076
+ kind: "canceled";
1077
+ }, [convex_values0.VObject<{
1078
+ kind: "pending";
1079
+ }, {
1080
+ kind: convex_values0.VLiteral<"pending", "required">;
1081
+ }, "required", "kind">, convex_values0.VObject<{
1082
+ kind: "inProgress";
1083
+ }, {
1084
+ kind: convex_values0.VLiteral<"inProgress", "required">;
1085
+ }, "required", "kind">, convex_values0.VObject<{
1086
+ kind: "success";
1087
+ }, {
1088
+ kind: convex_values0.VLiteral<"success", "required">;
1089
+ }, "required", "kind">, convex_values0.VObject<{
1090
+ error: string;
1091
+ kind: "failed";
1092
+ }, {
1093
+ error: convex_values0.VString<string, "required">;
1094
+ kind: convex_values0.VLiteral<"failed", "required">;
1095
+ }, "required", "error" | "kind">, convex_values0.VObject<{
1096
+ kind: "canceled";
1097
+ }, {
1098
+ kind: convex_values0.VLiteral<"canceled", "required">;
1099
+ }, "required", "kind">], "required", "error" | "kind">;
1100
+ completedTime: convex_values0.VFloat64<number | undefined, "optional">;
1101
+ }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.error" | "state.kind">, {}, {}, {}>, TableName>> | TableInfo<WithName<Table<"_storage", Schema.Struct<{
1102
+ sha256: typeof Schema.String;
1103
+ size: typeof Schema.Number;
1104
+ contentType: Schema.optionalWith<typeof Schema.String, {
1105
+ exact: true;
1106
+ }>;
1107
+ }>, convex_values0.VObject<{
1108
+ sha256: string;
1109
+ size: number;
1110
+ contentType?: string;
1111
+ }, {
1112
+ sha256: convex_values0.VString<string, "required">;
1113
+ size: convex_values0.VFloat64<number, "required">;
1114
+ contentType: convex_values0.VString<string | undefined, "optional">;
1115
+ }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>, TableName>>, TableName>;
52
1116
  };
53
1117
  } | {
54
1118
  table: <const TableName extends TableNames<FromSchema<Schema>>>(tableName: TableName) => {
55
1119
  insert: (document: WithoutSystemFields$1<DocumentByName<FromSchema<Schema>, TableName>>) => Effect.Effect<convex_values0.GenericId<TableName>, DocumentEncodeError, never>;
56
- patch: (id: convex_values0.GenericId<TableName>, patchedValues: Partial<convex_server0.Expand<convex_server0.BetterOmit<DocumentByName<FromSchema<Schema>, TableName>, "_id" | "_creationTime">>>) => Effect.Effect<void, GetByIdFailure | DocumentDecodeError | DocumentEncodeError, never>;
1120
+ patch: (id: convex_values0.GenericId<TableName>, patchedValues: Partial<convex_server0.Expand<convex_server0.BetterOmit<DocumentByName<FromSchema<Schema>, TableName>, "_id" | "_creationTime">>>) => Effect.Effect<void, DocumentDecodeError | DocumentEncodeError | GetByIdFailure, never>;
57
1121
  replace: (id: convex_values0.GenericId<TableName>, value: convex_server0.Expand<convex_server0.BetterOmit<DocumentByName<FromSchema<Schema>, TableName>, "_id" | "_creationTime">>) => Effect.Effect<void, DocumentEncodeError, never>;
58
1122
  delete: (id: convex_values0.GenericId<TableName>) => Effect.Effect<void, never, never>;
59
1123
  };
60
- }, never, never>;
1124
+ } | {
1125
+ runAfter: <Ref_ extends _confect_core_Ref0.AnyMutation | _confect_core_Ref0.AnyAction>(delay: effect_Duration0.Duration, ref: Ref_, ...args: _confect_core_Ref0.OptionalArgs<Ref_>) => Effect.Effect<convex_values0.GenericId<"_scheduled_functions">, never, never>;
1126
+ runAt: <Ref_ extends _confect_core_Ref0.AnyMutation | _confect_core_Ref0.AnyAction>(dateTime: effect_DateTime0.DateTime, ref: Ref_, ...args: _confect_core_Ref0.OptionalArgs<Ref_>) => Effect.Effect<convex_values0.GenericId<"_scheduled_functions">, never, never>;
1127
+ } | StorageReader$1 | StorageWriter$1, never, never>;
61
1128
  type MutationServices<Schema extends AnyWithProps> = DatabaseReader<Schema> | DatabaseWriter<Schema> | Auth$1 | Scheduler$1 | StorageReader$1 | StorageWriter$1 | QueryRunner | MutationRunner | MutationCtx<ToConvex<FromSchema<Schema>>>;
62
1129
  //#endregion
63
1130
  export { MutationServices, RegisteredConvexFunction_d_exports, make, mutationLayer };