@confect/server 9.0.0-next.5 → 9.0.0-next.7

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