@confect/server 1.0.0-next.1 → 1.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/ActionCtx.d.ts.map +1 -1
- package/dist/ActionCtx.js +2 -2
- package/dist/ActionRunner.d.ts.map +1 -1
- package/dist/ActionRunner.js +2 -2
- package/dist/Api.d.ts.map +1 -1
- package/dist/Api.js +2 -2
- package/dist/Api.js.map +1 -1
- package/dist/Auth.d.ts +4 -4
- package/dist/Auth.d.ts.map +1 -1
- package/dist/Auth.js +2 -2
- package/dist/DataModel.d.ts +3 -3
- package/dist/DataModel.d.ts.map +1 -1
- package/dist/DataModel.js +3 -1
- package/dist/DatabaseReader.d.ts.map +1 -1
- package/dist/DatabaseReader.js +2 -2
- package/dist/DatabaseReader.js.map +1 -1
- package/dist/DatabaseSchema.d.ts +32 -32
- package/dist/DatabaseSchema.d.ts.map +1 -1
- package/dist/DatabaseSchema.js +2 -2
- package/dist/DatabaseWriter.d.ts +24 -16
- package/dist/DatabaseWriter.d.ts.map +1 -1
- package/dist/DatabaseWriter.js +27 -25
- package/dist/DatabaseWriter.js.map +1 -1
- package/dist/Document.d.ts.map +1 -1
- package/dist/Document.js +2 -2
- package/dist/FunctionImpl.d.ts.map +1 -1
- package/dist/FunctionImpl.js +2 -2
- package/dist/GroupImpl.d.ts +1 -1
- package/dist/GroupImpl.d.ts.map +1 -1
- package/dist/GroupImpl.js +2 -2
- package/dist/Handler.d.ts.map +1 -1
- package/dist/Handler.js +3 -1
- package/dist/HttpApi.d.ts.map +1 -1
- package/dist/HttpApi.js +2 -2
- package/dist/HttpApi.js.map +1 -1
- package/dist/Impl.d.ts.map +1 -1
- package/dist/Impl.js +2 -2
- package/dist/Impl.js.map +1 -1
- package/dist/MutationCtx.d.ts.map +1 -1
- package/dist/MutationCtx.js +2 -2
- package/dist/MutationRunner.d.ts +3 -3
- package/dist/MutationRunner.d.ts.map +1 -1
- package/dist/MutationRunner.js +2 -2
- package/dist/OrderedQuery.d.ts.map +1 -1
- package/dist/OrderedQuery.js +2 -2
- package/dist/OrderedQuery.js.map +1 -1
- package/dist/QueryCtx.d.ts.map +1 -1
- package/dist/QueryCtx.js +2 -2
- package/dist/QueryInitializer.d.ts.map +1 -1
- package/dist/QueryInitializer.js +2 -2
- package/dist/QueryInitializer.js.map +1 -1
- package/dist/QueryRunner.d.ts.map +1 -1
- package/dist/QueryRunner.js +2 -2
- package/dist/RegisteredFunctions.d.ts +22 -20
- package/dist/RegisteredFunctions.d.ts.map +1 -1
- package/dist/RegisteredFunctions.js +2 -2
- package/dist/Registry.d.ts.map +1 -1
- package/dist/Registry.js +2 -2
- package/dist/RegistryItem.d.ts.map +1 -1
- package/dist/RegistryItem.js +2 -2
- package/dist/Scheduler.d.ts +7 -7
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +2 -2
- package/dist/SchemaToValidator.d.ts +7 -7
- package/dist/SchemaToValidator.d.ts.map +1 -1
- package/dist/SchemaToValidator.js +2 -2
- package/dist/Storage.d.ts.map +1 -1
- package/dist/Storage.js +2 -2
- package/dist/Table.d.ts +53 -53
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +2 -2
- package/dist/Table.js.map +1 -1
- package/dist/TableInfo.d.ts +1 -1
- package/dist/TableInfo.d.ts.map +1 -1
- package/dist/TableInfo.js +3 -1
- package/dist/VectorSearch.d.ts +7 -7
- package/dist/VectorSearch.d.ts.map +1 -1
- package/dist/VectorSearch.js +2 -2
- package/dist/_virtual/_rolldown/runtime.js +18 -0
- package/dist/internal/utils.d.ts.map +1 -1
- package/dist/internal/utils.js +2 -2
- package/dist/internal/utils.js.map +1 -1
- package/package.json +25 -23
- package/src/Api.ts +4 -2
- package/src/DatabaseWriter.ts +102 -113
- package/src/Impl.ts +4 -2
- package/src/Table.ts +4 -4
- package/dist/_virtual/rolldown_runtime.js +0 -13
|
@@ -17,12 +17,12 @@ import { StorageReader as StorageReader$1, StorageWriter as StorageWriter$1 } fr
|
|
|
17
17
|
import { Impl } from "./Impl.js";
|
|
18
18
|
import { Effect, Layer, Types } from "effect";
|
|
19
19
|
import * as _confect_core_Ref0 from "@confect/core/Ref";
|
|
20
|
-
import * as
|
|
20
|
+
import * as convex_server0 from "convex/server";
|
|
21
21
|
import { DefaultFunctionArgs, FunctionVisibility, GenericMutationCtx, RegisteredAction, RegisteredMutation, RegisteredQuery } from "convex/server";
|
|
22
|
-
import * as
|
|
23
|
-
import * as
|
|
22
|
+
import * as convex_values0 from "convex/values";
|
|
23
|
+
import * as effect_ParseResult0 from "effect/ParseResult";
|
|
24
24
|
import * as Spec from "@confect/core/Spec";
|
|
25
|
-
import * as
|
|
25
|
+
import * as _confect_core_Types0 from "@confect/core/Types";
|
|
26
26
|
import * as FunctionSpec from "@confect/core/FunctionSpec";
|
|
27
27
|
import * as GroupSpec from "@confect/core/GroupSpec";
|
|
28
28
|
import * as effect_Duration0 from "effect/Duration";
|
|
@@ -39,28 +39,30 @@ interface AnyWithProps {
|
|
|
39
39
|
readonly [key: string]: RegisteredFunction | AnyWithProps;
|
|
40
40
|
}
|
|
41
41
|
declare const make: <Api_ extends AnyWithProps$2>(impl: Layer.Layer<Impl<Api_, "Finalized">>) => Types.Simplify<RegisteredFunctionsHelper<Spec.Groups<Api_["spec"]>>>;
|
|
42
|
-
declare const mutationLayer: <Schema
|
|
43
|
-
runAfter: <FuncRef extends
|
|
44
|
-
runAt: <FuncRef extends
|
|
45
|
-
} |
|
|
46
|
-
table: <const TableName extends Name<IncludeSystemTables<Tables<Schema
|
|
42
|
+
declare const mutationLayer: <Schema extends AnyWithProps$1>(schema: Schema, ctx: GenericMutationCtx<ToConvex<FromSchema<Schema>>>) => Layer.Layer<Auth$1 | (<Mutation extends _confect_core_Ref0.AnyMutation>(mutation: Mutation, args: _confect_core_Ref0.Args<Mutation>["Type"]) => Effect.Effect<any, effect_ParseResult0.ParseError, never>) | {
|
|
43
|
+
runAfter: <FuncRef extends convex_server0.SchedulableFunctionReference>(delay: effect_Duration0.Duration, functionReference: FuncRef, ...args: convex_server0.OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values0.GenericId<"_scheduled_functions">, never, never>;
|
|
44
|
+
runAt: <FuncRef extends convex_server0.SchedulableFunctionReference>(dateTime: effect_DateTime0.DateTime, functionReference: FuncRef, ...args: convex_server0.OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values0.GenericId<"_scheduled_functions">, never, never>;
|
|
45
|
+
} | StorageReader$1 | StorageWriter$1 | GenericMutationCtx<ToConvex<FromSchema<Schema>>> | {
|
|
46
|
+
table: <const TableName extends Name<IncludeSystemTables<Tables<Schema>>>>(tableName: TableName) => {
|
|
47
47
|
readonly get: {
|
|
48
|
-
(id:
|
|
49
|
-
<IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema
|
|
48
|
+
(id: convex_values0.GenericId<TableName>): Effect.Effect<TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>["document"], DocumentDecodeError | GetByIdFailure, never>;
|
|
49
|
+
<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>;
|
|
50
50
|
};
|
|
51
51
|
readonly index: {
|
|
52
|
-
<IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema
|
|
53
|
-
<IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema
|
|
52
|
+
<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>;
|
|
53
|
+
<IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>["indexes"]>(indexName: IndexName, order?: "asc" | "desc"): OrderedQuery$1<TableInfo<WithName<IncludeSystemTables<Tables<Schema>>, TableName>>, TableName>;
|
|
54
54
|
};
|
|
55
|
-
readonly search: <IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema
|
|
55
|
+
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>;
|
|
56
56
|
};
|
|
57
57
|
} | {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
table: <const TableName extends TableNames<FromSchema<Schema>>>(tableName: TableName) => {
|
|
59
|
+
insert: (document: WithoutSystemFields$1<DocumentByName<FromSchema<Schema>, TableName>>) => Effect.Effect<convex_values0.GenericId<TableName>, DocumentEncodeError, never>;
|
|
60
|
+
patch: (id: convex_values0.GenericId<TableName>, patchedValues: Partial<convex_server0.Expand<convex_server0.BetterOmit<DocumentByName<FromSchema<Schema>, TableName>, "_id" | "_creationTime">>>) => Effect.Effect<void, DocumentDecodeError | GetByIdFailure | DocumentEncodeError, never>;
|
|
61
|
+
replace: (id: convex_values0.GenericId<TableName>, value: convex_server0.Expand<convex_server0.BetterOmit<DocumentByName<FromSchema<Schema>, TableName>, "_id" | "_creationTime">>) => Effect.Effect<void, DocumentEncodeError, never>;
|
|
62
|
+
delete: (id: convex_values0.GenericId<TableName>) => Effect.Effect<void, never, never>;
|
|
63
|
+
};
|
|
64
|
+
} | (<Query extends _confect_core_Ref0.AnyQuery>(query: Query, args: _confect_core_Ref0.Args<Query>["Type"]) => Effect.Effect<_confect_core_Ref0.Returns<Query>["Type"], effect_ParseResult0.ParseError>), never, never>;
|
|
65
|
+
type MutationServices<Schema extends AnyWithProps$1> = DatabaseReader<Schema> | DatabaseWriter<Schema> | Auth$1 | Scheduler$1 | StorageReader$1 | StorageWriter$1 | QueryRunner | MutationRunner | MutationCtx<ToConvex<FromSchema<Schema>>>;
|
|
64
66
|
//#endregion
|
|
65
67
|
export { AnyWithProps, MutationServices, RegisteredFunction, RegisteredFunctions, RegisteredFunctions_d_exports, make, mutationLayer };
|
|
66
68
|
//# sourceMappingURL=RegisteredFunctions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegisteredFunctions.d.ts","names":[],"sources":["../src/RegisteredFunctions.ts"],"
|
|
1
|
+
{"version":3,"file":"RegisteredFunctions.d.ts","names":[],"sources":["../src/RegisteredFunctions.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyCY,kBAAA,GACR,eAAA,CAAgB,kBAAA,EAAoB,mBAAA,SACpC,kBAAA,CAAmB,kBAAA,EAAoB,mBAAA,SACvC,gBAAA,CAAiB,kBAAA,EAAoB,mBAAA;AAAA,KAE7B,mBAAA,eAAkC,IAAA,CAAK,YAAA,IACjD,KAAA,CAAM,QAAA,CAAS,yBAAA,CAA0B,IAAA,CAAK,MAAA,CAAO,KAAA;AAAA,KAElD,yBAAA,gBAAyC,SAAA,CAAU,YA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,gBAAA,gBAAgC,cAAA,IACxC,cAAA,CAA8B,MAAA,IAC9B,cAAA,CAA8B,MAAA,IAC9B,MAAA,GACA,WAAA,GACA,eAAA,GACA,eAAA,GACA,WAAA,GACA,cAAA,GACA,WAAA,CAAwB,QAAA,CAAmB,UAAA,CAAqB,MAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { ActionCtx } from "./ActionCtx.js";
|
|
3
3
|
import { layer } from "./ActionRunner.js";
|
|
4
4
|
import { layer as layer$1 } from "./Auth.js";
|
|
@@ -20,7 +20,7 @@ import { Effect, Layer, Match, Ref, Schema, pipe } from "effect";
|
|
|
20
20
|
import { actionGeneric, internalActionGeneric, internalMutationGeneric, internalQueryGeneric, mutationGeneric, queryGeneric } from "convex/server";
|
|
21
21
|
|
|
22
22
|
//#region src/RegisteredFunctions.ts
|
|
23
|
-
var RegisteredFunctions_exports = /* @__PURE__ */
|
|
23
|
+
var RegisteredFunctions_exports = /* @__PURE__ */ __exportAll({
|
|
24
24
|
make: () => make,
|
|
25
25
|
mutationLayer: () => mutationLayer
|
|
26
26
|
});
|
package/dist/Registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Registry.d.ts","names":[],"sources":["../src/Registry.ts"],"
|
|
1
|
+
{"version":3,"file":"Registry.d.ts","names":[],"sources":["../src/Registry.ts"],"mappings":";;;;;;;UAGiB,aAAA;EAAA,UACL,GAAA,WAAc,YAAA,GAA4B,aAAA;AAAA;AAAA,cACrD,aAAA;cAEY,QAAA,SAAiB,aAAA"}
|
package/dist/Registry.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { Context, Ref } from "effect";
|
|
3
3
|
|
|
4
4
|
//#region src/Registry.ts
|
|
5
|
-
var Registry_exports = /* @__PURE__ */
|
|
5
|
+
var Registry_exports = /* @__PURE__ */ __exportAll({ Registry: () => Registry });
|
|
6
6
|
var Registry = class extends Context.Reference()("@confect/server/Registry", { defaultValue: () => Ref.unsafeMake({}) }) {};
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegistryItem.d.ts","names":[],"sources":["../src/RegistryItem.ts"],"
|
|
1
|
+
{"version":3,"file":"RegistryItem.d.ts","names":[],"sources":["../src/RegistryItem.ts"],"mappings":";;;;;;;;cAKa,MAAA;AAAA,KACD,MAAA,UAAgB,MAAA;AAAA,cAEf,cAAA,GAAkB,KAAA,cAAiB,KAAA,IAAS,YAAA;AAAA,UAOxC,YAAA,yBACS,cAAA,wBACF,YAAA,CAAa,YAAA;EAAA,UAEzB,MAAA,GAAS,MAAA;EAAA,SACV,SAAA,EAAW,aAAA;EAAA,SACX,OAAA,EAAS,OAAA,CAAgB,eAAA,EAAiB,aAAA;AAAA;AAAA,UAGpC,YAAA;EAAA,UACL,MAAA,GAAS,MAAA;EAAA,SACV,SAAA,EAAW,YAAA,CAAa,YAAA;EAAA,SACxB,OAAA,EAAS,cAAA;AAAA;AAAA,cAGP,IAAA,2BACa,cAAA,wBACF,YAAA,CAAa,YAAA;EACnC,SAAA;EAAA;AAAA;EAIA,SAAA,EAAW,aAAA;EACX,OAAA,EAAS,OAAA,CAAgB,eAAA,EAAiB,aAAA;AAAA,MACxC,YAAA,CAAa,eAAA,EAAiB,aAAA"}
|
package/dist/RegistryItem.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { Predicate } from "effect";
|
|
3
3
|
|
|
4
4
|
//#region src/RegistryItem.ts
|
|
5
|
-
var RegistryItem_exports = /* @__PURE__ */
|
|
5
|
+
var RegistryItem_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
TypeId: () => TypeId,
|
|
7
7
|
isRegistryItem: () => isRegistryItem,
|
|
8
8
|
make: () => make
|
package/dist/Scheduler.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { Context, DateTime, Duration, Effect, Layer } from "effect";
|
|
2
2
|
import { OptionalRestArgs, SchedulableFunctionReference, Scheduler as Scheduler$1 } from "convex/server";
|
|
3
|
-
import * as
|
|
3
|
+
import * as convex_values0 from "convex/values";
|
|
4
4
|
|
|
5
5
|
//#region src/Scheduler.d.ts
|
|
6
6
|
declare namespace Scheduler_d_exports {
|
|
7
7
|
export { Scheduler, layer };
|
|
8
8
|
}
|
|
9
9
|
declare const Scheduler: Context.Tag<{
|
|
10
|
-
runAfter: <FuncRef extends SchedulableFunctionReference>(delay: Duration.Duration, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<
|
|
11
|
-
runAt: <FuncRef extends SchedulableFunctionReference>(dateTime: DateTime.DateTime, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<
|
|
10
|
+
runAfter: <FuncRef extends SchedulableFunctionReference>(delay: Duration.Duration, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values0.GenericId<"_scheduled_functions">, never, never>;
|
|
11
|
+
runAt: <FuncRef extends SchedulableFunctionReference>(dateTime: DateTime.DateTime, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values0.GenericId<"_scheduled_functions">, never, never>;
|
|
12
12
|
}, {
|
|
13
|
-
runAfter: <FuncRef extends SchedulableFunctionReference>(delay: Duration.Duration, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<
|
|
14
|
-
runAt: <FuncRef extends SchedulableFunctionReference>(dateTime: DateTime.DateTime, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<
|
|
13
|
+
runAfter: <FuncRef extends SchedulableFunctionReference>(delay: Duration.Duration, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values0.GenericId<"_scheduled_functions">, never, never>;
|
|
14
|
+
runAt: <FuncRef extends SchedulableFunctionReference>(dateTime: DateTime.DateTime, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values0.GenericId<"_scheduled_functions">, never, never>;
|
|
15
15
|
}>;
|
|
16
16
|
type Scheduler = typeof Scheduler.Identifier;
|
|
17
17
|
declare const layer: (scheduler: Scheduler$1) => Layer.Layer<{
|
|
18
|
-
runAfter: <FuncRef extends SchedulableFunctionReference>(delay: Duration.Duration, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<
|
|
19
|
-
runAt: <FuncRef extends SchedulableFunctionReference>(dateTime: DateTime.DateTime, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<
|
|
18
|
+
runAfter: <FuncRef extends SchedulableFunctionReference>(delay: Duration.Duration, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values0.GenericId<"_scheduled_functions">, never, never>;
|
|
19
|
+
runAt: <FuncRef extends SchedulableFunctionReference>(dateTime: DateTime.DateTime, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values0.GenericId<"_scheduled_functions">, never, never>;
|
|
20
20
|
}, never, never>;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { Scheduler, Scheduler_d_exports, layer };
|
package/dist/Scheduler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scheduler.d.ts","names":[],"sources":["../src/Scheduler.ts"],"
|
|
1
|
+
{"version":3,"file":"Scheduler.d.ts","names":[],"sources":["../src/Scheduler.ts"],"mappings":";;;;;;;;cAgCa,SAAA,EAAS,OAAA,CAAA,GAAA;6BAxBO,4BAAA,EAA4B,KAAA,EAC9C,QAAA,CAAS,QAAA,EAAQ,iBAAA,EACL,OAAA,KAAO,IAAA,EACjB,gBAAA,CAAiB,OAAA,MAAQ,MAAA,CAAA,MAAA,CAAT,cAAA,CAAS,SAAA;0BAQZ,4BAAA,EAA4B,QAAA,EACxC,QAAA,CAAS,QAAA,EAAQ,iBAAA,EACR,OAAA,KAAO,IAAA,EACjB,gBAAA,CAAiB,OAAA,MAAQ,MAAA,CAAA,MAAA,CAAT,cAAA,CAAS,SAAA;AAAA;6BAdT,4BAAA,EAA4B,KAAA,EAC9C,QAAA,CAAS,QAAA,EAAQ,iBAAA,EACL,OAAA,KAAO,IAAA,EACjB,gBAAA,CAAiB,OAAA,MAAQ,MAAA,CAAA,MAAA,CAAT,cAAA,CAAS,SAAA;0BAQZ,4BAAA,EAA4B,QAAA,EACxC,QAAA,CAAS,QAAA,EAAQ,iBAAA,EACR,OAAA,KAAO,IAAA,EACjB,gBAAA,CAAiB,OAAA,MAAQ,MAAA,CAAA,MAAA,CAAT,cAAA,CAAS,SAAA;AAAA;AAAA,KAa1B,SAAA,UAAmB,SAAA,CAAU,UAAA;AAAA,cAE5B,KAAA,GAAS,SAAA,EAAW,WAAA,KAAe,KAAA,CAAA,KAAA;6BA7BnB,4BAAA,EAA4B,KAAA,EAC9C,QAAA,CAAS,QAAA,EAAQ,iBAAA,EACL,OAAA,KAAO,IAAA,EACjB,gBAAA,CAAiB,OAAA,MAAQ,MAAA,CAAA,MAAA,CAAT,cAAA,CAAS,SAAA;0BAQZ,4BAAA,EAA4B,QAAA,EACxC,QAAA,CAAS,QAAA,EAAQ,iBAAA,EACR,OAAA,KAAO,IAAA,EACjB,gBAAA,CAAiB,OAAA,MAAQ,MAAA,CAAA,MAAA,CAAT,cAAA,CAAS,SAAA;AAAA"}
|
package/dist/Scheduler.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { Context, DateTime, Duration, Effect, Layer } from "effect";
|
|
3
3
|
|
|
4
4
|
//#region src/Scheduler.ts
|
|
5
|
-
var Scheduler_exports = /* @__PURE__ */
|
|
5
|
+
var Scheduler_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
Scheduler: () => Scheduler,
|
|
7
7
|
layer: () => layer
|
|
8
8
|
});
|
|
@@ -20,14 +20,14 @@ type ReadonlyArrayValue = readonly ReadonlyValue[];
|
|
|
20
20
|
type ReadonlyRecordValue = {
|
|
21
21
|
readonly [key: string]: ReadonlyValue | undefined;
|
|
22
22
|
};
|
|
23
|
-
type ValueToValidator<Vl
|
|
23
|
+
type ValueToValidator<Vl> = IsRecursive<Vl> extends true ? VAny : [Vl] extends [never] ? never : IsAny<Vl> extends true ? VAny : [Vl] extends [ReadonlyValue] ? Vl extends {
|
|
24
24
|
__tableName: infer TableName extends string;
|
|
25
|
-
} ? VId<GenericId$1.GenericId<TableName>> : IsValueLiteral<Vl
|
|
26
|
-
type ArrayValueToValidator<Vl
|
|
27
|
-
type RecordValueToValidator<Vl
|
|
28
|
-
type UndefinedOrValueToValidator<Vl
|
|
29
|
-
type UnionValueToValidator<Vl
|
|
30
|
-
type ValueTupleToValidatorTuple<VlTuple
|
|
25
|
+
} ? VId<GenericId$1.GenericId<TableName>> : IsValueLiteral<Vl> extends true ? VLiteral<Vl> : [Vl] extends [null] ? VNull : [Vl] extends [boolean] ? VBoolean : IsUnion<Vl> extends true ? UnionValueToValidator<Vl> : [Vl] extends [number] ? VFloat64 : [Vl] extends [bigint] ? VInt64 : [Vl] extends [string] ? VString : [Vl] extends [ArrayBuffer] ? VBytes : Vl extends ReadonlyArray<ReadonlyValue> ? ArrayValueToValidator<Vl> : Vl extends ReadonlyRecordValue ? RecordValueToValidator<Vl> : TypeError<"Unexpected value", Vl> : TypeError<"Provided value is not a valid Convex value", Vl>;
|
|
26
|
+
type ArrayValueToValidator<Vl extends ReadonlyArray<ReadonlyValue>> = Vl extends ReadonlyArray<infer El extends ReadonlyValue> ? ValueToValidator<El> extends infer Vd extends Validator<any, any, any> ? VArray<DeepMutable<El[]>, Vd> : never : never;
|
|
27
|
+
type RecordValueToValidator<Vl> = Vl extends ReadonlyRecordValue ? { -readonly [K in keyof Vl]-?: IsAny<Vl[K]> extends true ? IsOptional<Vl, K> extends true ? VOptional<VAny> : VAny : UndefinedOrValueToValidator<Vl[K]> } extends infer VdRecord extends Record<string, any> ? { -readonly [K in keyof Vl]: undefined extends Vl[K] ? DeepMutable<Exclude<Vl[K], undefined>> : DeepMutable<Vl[K]> } extends infer VlRecord extends Record<string, any> ? IsRecord<VlRecord> extends true ? VRecord<VlRecord, VString, VdRecord[keyof VdRecord]> : VObject<VlRecord, VdRecord> : never : never : never;
|
|
28
|
+
type UndefinedOrValueToValidator<Vl extends ReadonlyValue | undefined> = undefined extends Vl ? [Vl] extends [(infer Val extends ReadonlyValue) | undefined] ? ValueToValidator<Val> extends infer Vd extends Validator<any, "required", any> ? VOptional<Vd> : never : never : [Vl] extends [ReadonlyValue] ? ValueToValidator<Vl> : never;
|
|
29
|
+
type UnionValueToValidator<Vl extends ReadonlyValue> = [Vl] extends [ReadonlyValue] ? IsUnion<Vl> extends true ? UnionToTuple<Vl> extends infer VlTuple extends ReadonlyArray<ReadonlyValue> ? ValueTupleToValidatorTuple<VlTuple> extends infer VdTuple extends Validator<any, "required", any>[] ? VUnion<DeepMutable<Vl>, VdTuple> : TypeError<"Failed to convert value tuple to validator tuple"> : TypeError<"Failed to convert union to tuple"> : TypeError<"Expected a union of values, but got a single value instead"> : TypeError<"Provided value is not a valid Convex value">;
|
|
30
|
+
type ValueTupleToValidatorTuple<VlTuple extends ReadonlyArray<ReadonlyValue>> = VlTuple extends [true, false, ...infer VlRest extends ReadonlyArray<ReadonlyValue>] | [false, true, ...infer VlRest extends ReadonlyArray<ReadonlyValue>] ? ValueTupleToValidatorTuple<VlRest> extends infer VdRest extends Validator<any, any, any>[] ? [VBoolean<boolean>, ...VdRest] : never : VlTuple extends [infer Vl extends ReadonlyValue, ...infer VlRest extends ReadonlyArray<ReadonlyValue>] ? ValueToValidator<Vl> extends infer Vd extends Validator<any, any, any> ? ValueTupleToValidatorTuple<VlRest> extends infer VdRest extends Validator<any, "required", any>[] ? [Vd, ...VdRest] : never : never : [];
|
|
31
31
|
declare const compileSchema: <T, E>(schema: Schema.Schema<T, E>) => ValueToValidator<(typeof schema)["Encoded"]>;
|
|
32
32
|
declare const isRecursive: (ast: SchemaAST.AST) => boolean;
|
|
33
33
|
declare const compileAst: (ast: SchemaAST.AST, isOptionalPropertyOfTypeLiteral?: boolean) => Effect.Effect<Validator<any, any, any>, UnsupportedSchemaTypeError | UnsupportedPropertySignatureKeyTypeError | IndexSignaturesAreNotSupportedError | MixedIndexAndPropertySignaturesAreNotSupportedError | OptionalTupleElementsAreNotSupportedError | EmptyTupleIsNotSupportedError>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaToValidator.d.ts","names":[],"sources":["../src/SchemaToValidator.ts"],"
|
|
1
|
+
{"version":3,"file":"SchemaToValidator.d.ts","names":[],"sources":["../src/SchemaToValidator.ts"],"mappings":";;;;;;;;;;cAmDa,iBAAA,8BACX,UAAA,EAAY,MAAA,CAAO,MAAA,CAAO,YAAA,EAAc,WAAA,MACvC,kBAAA;AAAA,cAkBU,oBAAA,8BACX,MAAA,EAAQ,MAAA,CAAO,MAAA,CAAO,YAAA,EAAc,WAAA,MACnC,SAAA;;;;KAQS,2BAAA,qBACU,MAAA,CAAO,MAAA,CAAO,YAAA,IAElC,gBAAA,CAAiB,WAAA,sCACb,OAAA,uBACA,MAAA,uBACA,EAAA;AAAA,cAGO,kBAAA,uBACS,MAAA,CAAO,MAAA,CAAO,YAAA,EAElC,MAAA,EAAQ,WAAA,KACP,2BAAA,CAA4B,WAAA;AAAA,KAmBnB,aAAA,wCAKR,WAAA,GACA,kBAAA,GACA,mBAAA;AAAA,KAGC,kBAAA,YAA8B,aAAA;AAAA,KAEvB,mBAAA;EAAA,UACA,GAAA,WAAc,aAAA;AAAA;AAAA,KAGd,gBAAA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AAA;AAAA;AAAA,cAId,qCAAA;;;cAEY,gCAAA,SAAyC,qCAAA;EAAA,IAIvC,OAAA,CAAA;AAAA;AAAA,cAId,6CAAA;;;cAEY,wCAAA,SAAiD,6CAAA;EAAA,SAGnD,WAAA;AAAA;EAAA,IAGI,OAAA,CAAA;AAAA;AAAA,cAId,kCAAA;;;cAEY,6BAAA,SAAsC,kCAAA;EAAA,IAIpC,OAAA,CAAA;AAAA;AAAA,cAId,+BAAA;;;cAEY,0BAAA,SAAmC,+BAAA;EAAA,SAGrC,UAAA,EAAY,SAAA,CAAU,GAAA;AAAA;EAAA,IAGlB,OAAA,CAAA;AAAA;AAAA,cAId,wCAAA;;;cAEY,mCAAA,SAA4C,wCAAA;EAAA,IAI1C,OAAA,CAAA;AAAA;AAAA,cAId,wDAAA;;;cAEY,mDAAA,SAA4D,wDAAA;EAAA,IAI1D,OAAA,CAAA;AAAA;AAAA,cAId,8CAAA;;;cAEY,yCAAA,SAAkD,8CAAA;EAAA,IAIhD,OAAA,CAAA;AAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { Array, Cause, Data, Effect, Exit, Match, Number, Option, Predicate, Schema, SchemaAST, String, pipe } from "effect";
|
|
3
3
|
import { v } from "convex/values";
|
|
4
4
|
import * as GenericId$1 from "@confect/core/GenericId";
|
|
5
5
|
|
|
6
6
|
//#region src/SchemaToValidator.ts
|
|
7
|
-
var SchemaToValidator_exports = /* @__PURE__ */
|
|
7
|
+
var SchemaToValidator_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
EmptyTupleIsNotSupportedError: () => EmptyTupleIsNotSupportedError,
|
|
9
9
|
IndexSignaturesAreNotSupportedError: () => IndexSignaturesAreNotSupportedError,
|
|
10
10
|
MixedIndexAndPropertySignaturesAreNotSupportedError: () => MixedIndexAndPropertySignaturesAreNotSupportedError,
|
package/dist/Storage.d.ts.map
CH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AA;;qBAZhC,SAAA,iBAAqB,MAAA,CAAA,MAAA,CAAA,IAAA,EAAA,iBAAA;kBAYxB,IAAA,EAAI,OAAA;MAAc,MAAA;IAAA,MAAiB,MAAA,CAAA,MAAA,CAAA,SAAA;EAAA;;cAkBtC,mBAAA,SAA4B,wBAAA;EAAA,gBAGvB,KAAA,GAAS,mBAAA,EAAqB,qBAAA,KAAyB,KAAA,CAAA,KAAA,CAAA,mBAAA;AAAA;AAAA,cAExE,sBAAA;;;;;cAEY,iBAAA,SAA0B,sBAAA;EAAA,IAKxB,OAAA,CAAA;AAAA"}
|
package/dist/Storage.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { Effect, Layer, Option, Schema, flow, pipe } from "effect";
|
|
3
3
|
|
|
4
4
|
//#region src/Storage.ts
|
|
5
|
-
var Storage_exports = /* @__PURE__ */
|
|
5
|
+
var Storage_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
BlobNotFoundError: () => BlobNotFoundError,
|
|
7
7
|
StorageActionWriter: () => StorageActionWriter,
|
|
8
8
|
StorageReader: () => StorageReader,
|
package/dist/Table.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { TableSchemaToTableValidator } from "./SchemaToValidator.js";
|
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { Expand, GenericTableIndexes, GenericTableSearchIndexes, GenericTableVectorIndexes, IndexTiebreakerField, SearchIndexConfig, SystemFields, TableDefinition, VectorIndexConfig } from "convex/server";
|
|
4
4
|
import * as SystemFields$1 from "@confect/core/SystemFields";
|
|
5
|
-
import * as
|
|
5
|
+
import * as convex_values0 from "convex/values";
|
|
6
6
|
import { GenericValidator, Validator } from "convex/values";
|
|
7
7
|
|
|
8
8
|
//#region src/Table.d.ts
|
|
@@ -12,19 +12,19 @@ declare namespace Table_d_exports {
|
|
|
12
12
|
declare const TypeId = "@confect/server/Table";
|
|
13
13
|
type TypeId = typeof TypeId;
|
|
14
14
|
declare const isTable: (u: unknown) => u is Any;
|
|
15
|
-
interface Table<Name_ extends string, TableSchema_
|
|
15
|
+
interface Table<Name_ extends string, TableSchema_ extends Schema.Schema.AnyNoContext, TableValidator_ extends GenericValidator = TableSchemaToTableValidator<TableSchema_>, Indexes_ extends GenericTableIndexes = {}, SearchIndexes_ extends GenericTableSearchIndexes = {}, VectorIndexes_ extends GenericTableVectorIndexes = {}> {
|
|
16
16
|
readonly [TypeId]: TypeId;
|
|
17
|
-
readonly tableDefinition: TableDefinition<TableValidator_
|
|
17
|
+
readonly tableDefinition: TableDefinition<TableValidator_, Indexes_, SearchIndexes_, VectorIndexes_>;
|
|
18
18
|
readonly name: Name_;
|
|
19
|
-
readonly Fields: TableSchema_
|
|
20
|
-
readonly Doc: SystemFields$1.ExtendWithSystemFields<Name_, TableSchema_
|
|
21
|
-
readonly indexes: Indexes_
|
|
22
|
-
index<IndexName extends string, FirstFieldPath extends ExtractFieldPaths<TableValidator_
|
|
23
|
-
searchIndex<IndexName extends string, SearchField extends ExtractFieldPaths<TableValidator_
|
|
19
|
+
readonly Fields: TableSchema_;
|
|
20
|
+
readonly Doc: SystemFields$1.ExtendWithSystemFields<Name_, TableSchema_>;
|
|
21
|
+
readonly indexes: Indexes_;
|
|
22
|
+
index<IndexName extends string, FirstFieldPath extends ExtractFieldPaths<TableValidator_>, RestFieldPaths extends ExtractFieldPaths<TableValidator_>[]>(name: IndexName, fields: [FirstFieldPath, ...RestFieldPaths]): Table<Name_, TableSchema_, TableValidator_, Expand<Indexes_ & Record<IndexName, [FirstFieldPath, ...RestFieldPaths, IndexTiebreakerField]>>, SearchIndexes_, VectorIndexes_>;
|
|
23
|
+
searchIndex<IndexName extends string, SearchField extends ExtractFieldPaths<TableValidator_>, FilterFields extends ExtractFieldPaths<TableValidator_> = never>(name: IndexName, indexConfig: Expand<SearchIndexConfig<SearchField, FilterFields>>): Table<Name_, TableSchema_, TableValidator_, Indexes_, Expand<SearchIndexes_ & Record<IndexName, {
|
|
24
24
|
searchField: SearchField;
|
|
25
25
|
filterFields: FilterFields;
|
|
26
|
-
}>>, VectorIndexes_
|
|
27
|
-
vectorIndex<IndexName extends string, VectorField extends ExtractFieldPaths<TableValidator_
|
|
26
|
+
}>>, VectorIndexes_>;
|
|
27
|
+
vectorIndex<IndexName extends string, VectorField extends ExtractFieldPaths<TableValidator_>, FilterFields extends ExtractFieldPaths<TableValidator_> = never>(name: IndexName, indexConfig: Expand<VectorIndexConfig<VectorField, FilterFields>>): Table<Name_, TableSchema_, TableValidator_, Indexes_, SearchIndexes_, Expand<VectorIndexes_ & Record<IndexName, {
|
|
28
28
|
vectorField: VectorField;
|
|
29
29
|
dimensions: number;
|
|
30
30
|
filterFields: FilterFields;
|
|
@@ -49,7 +49,7 @@ type TablesRecord<Tables extends AnyWithProps> = { readonly [TableName_ in Name<
|
|
|
49
49
|
/**
|
|
50
50
|
* Create a table.
|
|
51
51
|
*/
|
|
52
|
-
declare const make: <const Name_ extends string, TableSchema_
|
|
52
|
+
declare const make: <const Name_ extends string, TableSchema_ extends Schema.Schema.AnyNoContext, TableValidator_ extends GenericValidator = TableSchemaToTableValidator<TableSchema_>, Indexes_ extends GenericTableIndexes = {}, SearchIndexes_ extends GenericTableSearchIndexes = {}, VectorIndexes_ extends GenericTableVectorIndexes = {}>(name: Name_, fields: TableSchema_) => Table<Name_, TableSchema_, TableValidator_, Indexes_, SearchIndexes_, VectorIndexes_>;
|
|
53
53
|
declare const scheduledFunctionsTable: Table<"_scheduled_functions", Schema.Struct<{
|
|
54
54
|
name: typeof Schema.String;
|
|
55
55
|
args: Schema.Array$<typeof Schema.Any>;
|
|
@@ -69,7 +69,7 @@ declare const scheduledFunctionsTable: Table<"_scheduled_functions", Schema.Stru
|
|
|
69
69
|
}>, Schema.Struct<{
|
|
70
70
|
kind: Schema.Literal<["canceled"]>;
|
|
71
71
|
}>]>;
|
|
72
|
-
}>,
|
|
72
|
+
}>, convex_values0.VObject<{
|
|
73
73
|
name: string;
|
|
74
74
|
args: any[];
|
|
75
75
|
scheduledTime: number;
|
|
@@ -87,10 +87,10 @@ declare const scheduledFunctionsTable: Table<"_scheduled_functions", Schema.Stru
|
|
|
87
87
|
};
|
|
88
88
|
completedTime?: number;
|
|
89
89
|
}, {
|
|
90
|
-
name:
|
|
91
|
-
args:
|
|
92
|
-
scheduledTime:
|
|
93
|
-
state:
|
|
90
|
+
name: convex_values0.VString<string, "required">;
|
|
91
|
+
args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
|
|
92
|
+
scheduledTime: convex_values0.VFloat64<number, "required">;
|
|
93
|
+
state: convex_values0.VUnion<{
|
|
94
94
|
kind: "pending";
|
|
95
95
|
} | {
|
|
96
96
|
kind: "inProgress";
|
|
@@ -101,30 +101,30 @@ declare const scheduledFunctionsTable: Table<"_scheduled_functions", Schema.Stru
|
|
|
101
101
|
error: string;
|
|
102
102
|
} | {
|
|
103
103
|
kind: "canceled";
|
|
104
|
-
}, [
|
|
104
|
+
}, [convex_values0.VObject<{
|
|
105
105
|
kind: "pending";
|
|
106
106
|
}, {
|
|
107
|
-
kind:
|
|
108
|
-
}, "required", "kind">,
|
|
107
|
+
kind: convex_values0.VLiteral<"pending", "required">;
|
|
108
|
+
}, "required", "kind">, convex_values0.VObject<{
|
|
109
109
|
kind: "inProgress";
|
|
110
110
|
}, {
|
|
111
|
-
kind:
|
|
112
|
-
}, "required", "kind">,
|
|
111
|
+
kind: convex_values0.VLiteral<"inProgress", "required">;
|
|
112
|
+
}, "required", "kind">, convex_values0.VObject<{
|
|
113
113
|
kind: "success";
|
|
114
114
|
}, {
|
|
115
|
-
kind:
|
|
116
|
-
}, "required", "kind">,
|
|
115
|
+
kind: convex_values0.VLiteral<"success", "required">;
|
|
116
|
+
}, "required", "kind">, convex_values0.VObject<{
|
|
117
117
|
kind: "failed";
|
|
118
118
|
error: string;
|
|
119
119
|
}, {
|
|
120
|
-
kind:
|
|
121
|
-
error:
|
|
122
|
-
}, "required", "kind" | "error">,
|
|
120
|
+
kind: convex_values0.VLiteral<"failed", "required">;
|
|
121
|
+
error: convex_values0.VString<string, "required">;
|
|
122
|
+
}, "required", "kind" | "error">, convex_values0.VObject<{
|
|
123
123
|
kind: "canceled";
|
|
124
124
|
}, {
|
|
125
|
-
kind:
|
|
125
|
+
kind: convex_values0.VLiteral<"canceled", "required">;
|
|
126
126
|
}, "required", "kind">], "required", "kind" | "error">;
|
|
127
|
-
completedTime:
|
|
127
|
+
completedTime: convex_values0.VFloat64<number | undefined, "optional">;
|
|
128
128
|
}, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.kind" | "state.error">, {}, {}, {}>;
|
|
129
129
|
declare const storageTable: Table<"_storage", Schema.Struct<{
|
|
130
130
|
sha256: typeof Schema.String;
|
|
@@ -132,14 +132,14 @@ declare const storageTable: Table<"_storage", Schema.Struct<{
|
|
|
132
132
|
contentType: Schema.optionalWith<typeof Schema.String, {
|
|
133
133
|
exact: true;
|
|
134
134
|
}>;
|
|
135
|
-
}>,
|
|
135
|
+
}>, convex_values0.VObject<{
|
|
136
136
|
sha256: string;
|
|
137
137
|
size: number;
|
|
138
138
|
contentType?: string;
|
|
139
139
|
}, {
|
|
140
|
-
sha256:
|
|
141
|
-
size:
|
|
142
|
-
contentType:
|
|
140
|
+
sha256: convex_values0.VString<string, "required">;
|
|
141
|
+
size: convex_values0.VFloat64<number, "required">;
|
|
142
|
+
contentType: convex_values0.VString<string | undefined, "optional">;
|
|
143
143
|
}, "required", "sha256" | "size" | "contentType">, {}, {}, {}>;
|
|
144
144
|
declare const systemTables: {
|
|
145
145
|
readonly _scheduled_functions: Table<"_scheduled_functions", Schema.Struct<{
|
|
@@ -161,7 +161,7 @@ declare const systemTables: {
|
|
|
161
161
|
}>, Schema.Struct<{
|
|
162
162
|
kind: Schema.Literal<["canceled"]>;
|
|
163
163
|
}>]>;
|
|
164
|
-
}>,
|
|
164
|
+
}>, convex_values0.VObject<{
|
|
165
165
|
name: string;
|
|
166
166
|
args: any[];
|
|
167
167
|
scheduledTime: number;
|
|
@@ -179,10 +179,10 @@ declare const systemTables: {
|
|
|
179
179
|
};
|
|
180
180
|
completedTime?: number;
|
|
181
181
|
}, {
|
|
182
|
-
name:
|
|
183
|
-
args:
|
|
184
|
-
scheduledTime:
|
|
185
|
-
state:
|
|
182
|
+
name: convex_values0.VString<string, "required">;
|
|
183
|
+
args: convex_values0.VArray<any[], convex_values0.VAny<any, "required", string>, "required">;
|
|
184
|
+
scheduledTime: convex_values0.VFloat64<number, "required">;
|
|
185
|
+
state: convex_values0.VUnion<{
|
|
186
186
|
kind: "pending";
|
|
187
187
|
} | {
|
|
188
188
|
kind: "inProgress";
|
|
@@ -193,30 +193,30 @@ declare const systemTables: {
|
|
|
193
193
|
error: string;
|
|
194
194
|
} | {
|
|
195
195
|
kind: "canceled";
|
|
196
|
-
}, [
|
|
196
|
+
}, [convex_values0.VObject<{
|
|
197
197
|
kind: "pending";
|
|
198
198
|
}, {
|
|
199
|
-
kind:
|
|
200
|
-
}, "required", "kind">,
|
|
199
|
+
kind: convex_values0.VLiteral<"pending", "required">;
|
|
200
|
+
}, "required", "kind">, convex_values0.VObject<{
|
|
201
201
|
kind: "inProgress";
|
|
202
202
|
}, {
|
|
203
|
-
kind:
|
|
204
|
-
}, "required", "kind">,
|
|
203
|
+
kind: convex_values0.VLiteral<"inProgress", "required">;
|
|
204
|
+
}, "required", "kind">, convex_values0.VObject<{
|
|
205
205
|
kind: "success";
|
|
206
206
|
}, {
|
|
207
|
-
kind:
|
|
208
|
-
}, "required", "kind">,
|
|
207
|
+
kind: convex_values0.VLiteral<"success", "required">;
|
|
208
|
+
}, "required", "kind">, convex_values0.VObject<{
|
|
209
209
|
kind: "failed";
|
|
210
210
|
error: string;
|
|
211
211
|
}, {
|
|
212
|
-
kind:
|
|
213
|
-
error:
|
|
214
|
-
}, "required", "kind" | "error">,
|
|
212
|
+
kind: convex_values0.VLiteral<"failed", "required">;
|
|
213
|
+
error: convex_values0.VString<string, "required">;
|
|
214
|
+
}, "required", "kind" | "error">, convex_values0.VObject<{
|
|
215
215
|
kind: "canceled";
|
|
216
216
|
}, {
|
|
217
|
-
kind:
|
|
217
|
+
kind: convex_values0.VLiteral<"canceled", "required">;
|
|
218
218
|
}, "required", "kind">], "required", "kind" | "error">;
|
|
219
|
-
completedTime:
|
|
219
|
+
completedTime: convex_values0.VFloat64<number | undefined, "optional">;
|
|
220
220
|
}, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.kind" | "state.error">, {}, {}, {}>;
|
|
221
221
|
readonly _storage: Table<"_storage", Schema.Struct<{
|
|
222
222
|
sha256: typeof Schema.String;
|
|
@@ -224,14 +224,14 @@ declare const systemTables: {
|
|
|
224
224
|
contentType: Schema.optionalWith<typeof Schema.String, {
|
|
225
225
|
exact: true;
|
|
226
226
|
}>;
|
|
227
|
-
}>,
|
|
227
|
+
}>, convex_values0.VObject<{
|
|
228
228
|
sha256: string;
|
|
229
229
|
size: number;
|
|
230
230
|
contentType?: string;
|
|
231
231
|
}, {
|
|
232
|
-
sha256:
|
|
233
|
-
size:
|
|
234
|
-
contentType:
|
|
232
|
+
sha256: convex_values0.VString<string, "required">;
|
|
233
|
+
size: convex_values0.VFloat64<number, "required">;
|
|
234
|
+
contentType: convex_values0.VString<string | undefined, "optional">;
|
|
235
235
|
}, "required", "sha256" | "size" | "contentType">, {}, {}, {}>;
|
|
236
236
|
};
|
|
237
237
|
type SystemTables = typeof scheduledFunctionsTable | typeof storageTable;
|