@confect/core 10.0.0-next.8 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +966 -46
- package/README.md +3 -1
- package/dist/FunctionProvenance.d.ts +166 -68
- package/dist/FunctionProvenance.d.ts.map +1 -1
- package/dist/FunctionProvenance.js +55 -13
- package/dist/FunctionProvenance.js.map +1 -1
- package/dist/FunctionSpec.d.ts +320 -138
- package/dist/FunctionSpec.d.ts.map +1 -1
- package/dist/FunctionSpec.js +56 -13
- package/dist/FunctionSpec.js.map +1 -1
- package/dist/GenericId.d.ts.map +1 -1
- package/dist/GenericId.js +1 -1
- package/dist/GroupPath.d.ts +6 -10
- package/dist/GroupPath.d.ts.map +1 -1
- package/dist/GroupPath.js.map +1 -1
- package/dist/GroupSpec.d.ts +25 -12
- package/dist/GroupSpec.d.ts.map +1 -1
- package/dist/GroupSpec.js +51 -14
- package/dist/GroupSpec.js.map +1 -1
- package/dist/Identifier.d.ts +6 -5
- package/dist/Identifier.d.ts.map +1 -1
- package/dist/Identifier.js +6 -5
- package/dist/Identifier.js.map +1 -1
- package/dist/Lazy.d.ts +11 -14
- package/dist/Lazy.d.ts.map +1 -1
- package/dist/Lazy.js +11 -14
- package/dist/Lazy.js.map +1 -1
- package/dist/MiddlewareAttachment.d.ts +171 -0
- package/dist/MiddlewareAttachment.d.ts.map +1 -0
- package/dist/MiddlewareAttachment.js +48 -0
- package/dist/MiddlewareAttachment.js.map +1 -0
- package/dist/MiddlewareSpec.d.ts +198 -0
- package/dist/MiddlewareSpec.d.ts.map +1 -0
- package/dist/MiddlewareSpec.js +60 -0
- package/dist/MiddlewareSpec.js.map +1 -0
- package/dist/PaginationError.d.ts +20 -0
- package/dist/PaginationError.d.ts.map +1 -0
- package/dist/PaginationError.js +31 -0
- package/dist/PaginationError.js.map +1 -0
- package/dist/PaginationOptions.d.ts +23 -0
- package/dist/PaginationOptions.d.ts.map +1 -0
- package/dist/PaginationOptions.js +29 -0
- package/dist/PaginationOptions.js.map +1 -0
- package/dist/PaginationResult.d.ts +1 -0
- package/dist/PaginationResult.d.ts.map +1 -1
- package/dist/PaginationResult.js.map +1 -1
- package/dist/Ref.d.ts +135 -47
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +104 -46
- package/dist/Ref.js.map +1 -1
- package/dist/Refs.d.ts +10 -5
- package/dist/Refs.d.ts.map +1 -1
- package/dist/Refs.js +5 -4
- package/dist/Refs.js.map +1 -1
- package/dist/SchemaToValidator.d.ts +99 -0
- package/dist/SchemaToValidator.d.ts.map +1 -0
- package/dist/SchemaToValidator.js +158 -0
- package/dist/SchemaToValidator.js.map +1 -0
- package/dist/Spec.d.ts +16 -12
- package/dist/Spec.d.ts.map +1 -1
- package/dist/Spec.js +14 -9
- package/dist/Spec.js.map +1 -1
- package/dist/SystemFields.d.ts +16 -15
- package/dist/SystemFields.d.ts.map +1 -1
- package/dist/SystemFields.js +16 -15
- package/dist/SystemFields.js.map +1 -1
- package/dist/Table.d.ts +75 -0
- package/dist/Table.d.ts.map +1 -0
- package/dist/Table.js +77 -0
- package/dist/Table.js.map +1 -0
- package/dist/Types.d.ts +8 -2
- package/dist/Types.d.ts.map +1 -1
- package/dist/Types.js.map +1 -1
- package/dist/UserIdentity.d.ts.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -4
- package/package.json +17 -15
- package/src/FunctionProvenance.ts +197 -34
- package/src/FunctionSpec.ts +332 -86
- package/src/GroupPath.ts +6 -12
- package/src/GroupSpec.ts +184 -25
- package/src/Identifier.ts +6 -5
- package/src/Lazy.ts +11 -14
- package/src/MiddlewareAttachment.ts +106 -0
- package/src/MiddlewareSpec.ts +392 -0
- package/src/PaginationError.ts +78 -0
- package/src/PaginationOptions.ts +23 -0
- package/src/PaginationResult.ts +4 -0
- package/src/Ref.ts +468 -236
- package/src/Refs.ts +43 -18
- package/src/SchemaToValidator.ts +612 -0
- package/src/Spec.ts +50 -39
- package/src/SystemFields.ts +32 -36
- package/src/Table.ts +427 -0
- package/src/Types.ts +9 -3
- package/src/index.ts +6 -1
- package/dist/Registry.d.ts +0 -24
- package/dist/Registry.d.ts.map +0 -1
- package/dist/Registry.js +0 -19
- package/dist/Registry.js.map +0 -1
- package/dist/tsconfig.src.tsbuildinfo +0 -1
- package/src/Registry.ts +0 -30
package/dist/Table.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as SystemFields from "./SystemFields";
|
|
2
|
+
import type { TableSchemaToTableValidator } from "./SchemaToValidator";
|
|
3
|
+
import type { SystemFields as ConvexSystemFields, Expand, GenericTableIndexes, GenericTableSearchIndexes, GenericTableVectorIndexes, IndexTiebreakerField, SearchIndexConfig, VectorIndexConfig } from "convex/server";
|
|
4
|
+
import type { GenericValidator, Validator } from "convex/values";
|
|
5
|
+
import type * as Schema from "effect/Schema";
|
|
6
|
+
export declare const TypeId = "~@confect/core/Table";
|
|
7
|
+
export type TypeId = typeof TypeId;
|
|
8
|
+
export declare const isTable: (u: unknown) => u is Any;
|
|
9
|
+
export declare const isUnnamedTable: (u: unknown) => u is UnnamedAny;
|
|
10
|
+
export interface Table<Name_ extends string, TableSchema_ extends Schema.Codec<any, any>, TableValidator_ extends GenericValidator = TableSchemaToTableValidator<TableSchema_>, Indexes_ extends GenericTableIndexes = {}, SearchIndexes_ extends GenericTableSearchIndexes = {}, VectorIndexes_ extends GenericTableVectorIndexes = {}> {
|
|
11
|
+
readonly [TypeId]: TypeId;
|
|
12
|
+
readonly tableName: Name_;
|
|
13
|
+
readonly Fields: TableSchema_;
|
|
14
|
+
readonly Doc: SystemFields.ExtendWithSystemFields<Name_, TableSchema_>;
|
|
15
|
+
readonly indexes: Indexes_;
|
|
16
|
+
readonly searchIndexes: SearchIndexes_;
|
|
17
|
+
readonly vectorIndexes: VectorIndexes_;
|
|
18
|
+
readonly "~TableValidator": TableValidator_;
|
|
19
|
+
}
|
|
20
|
+
export interface Any {
|
|
21
|
+
readonly [TypeId]: TypeId;
|
|
22
|
+
readonly tableName: string;
|
|
23
|
+
}
|
|
24
|
+
export type AnyWithProps = Table<any, Schema.Codec<any, any>, GenericValidator, GenericTableIndexes, GenericTableSearchIndexes, GenericTableVectorIndexes>;
|
|
25
|
+
export interface UnnamedTable<TableSchema_ extends Schema.Codec<any, any>, TableValidator_ extends GenericValidator = TableSchemaToTableValidator<TableSchema_>, Indexes_ extends GenericTableIndexes = {}, SearchIndexes_ extends GenericTableSearchIndexes = {}, VectorIndexes_ extends GenericTableVectorIndexes = {}> {
|
|
26
|
+
<const Name_ extends string>(tableName: Name_): Table<Name_, TableSchema_, TableValidator_, Indexes_, SearchIndexes_, VectorIndexes_>;
|
|
27
|
+
readonly [TypeId]: TypeId;
|
|
28
|
+
readonly indexes: Indexes_;
|
|
29
|
+
readonly searchIndexes: SearchIndexes_;
|
|
30
|
+
readonly vectorIndexes: VectorIndexes_;
|
|
31
|
+
readonly "~TableValidator": TableValidator_;
|
|
32
|
+
index<IndexName extends string, FirstFieldPath extends ExtractFieldPaths<TableValidator_>, RestFieldPaths extends ExtractFieldPaths<TableValidator_>[]>(name: IndexName, fields: [FirstFieldPath, ...RestFieldPaths]): UnnamedTable<TableSchema_, TableValidator_, Expand<Indexes_ & Record<IndexName, [
|
|
33
|
+
FirstFieldPath,
|
|
34
|
+
...RestFieldPaths,
|
|
35
|
+
IndexTiebreakerField
|
|
36
|
+
]>>, SearchIndexes_, VectorIndexes_>;
|
|
37
|
+
searchIndex<IndexName extends string, SearchField extends ExtractFieldPaths<TableValidator_>, FilterFields extends ExtractFieldPaths<TableValidator_> = never>(name: IndexName, indexConfig: Expand<SearchIndexConfig<SearchField, FilterFields>>): UnnamedTable<TableSchema_, TableValidator_, Indexes_, Expand<SearchIndexes_ & Record<IndexName, {
|
|
38
|
+
searchField: SearchField;
|
|
39
|
+
filterFields: FilterFields;
|
|
40
|
+
}>>, VectorIndexes_>;
|
|
41
|
+
vectorIndex<IndexName extends string, VectorField extends ExtractFieldPaths<TableValidator_>, FilterFields extends ExtractFieldPaths<TableValidator_> = never>(name: IndexName, indexConfig: Expand<VectorIndexConfig<VectorField, FilterFields>>): UnnamedTable<TableSchema_, TableValidator_, Indexes_, SearchIndexes_, Expand<VectorIndexes_ & Record<IndexName, {
|
|
42
|
+
vectorField: VectorField;
|
|
43
|
+
dimensions: number;
|
|
44
|
+
filterFields: FilterFields;
|
|
45
|
+
}>>>;
|
|
46
|
+
}
|
|
47
|
+
export interface UnnamedAny {
|
|
48
|
+
readonly [TypeId]: TypeId;
|
|
49
|
+
}
|
|
50
|
+
export type UnnamedAnyWithProps = UnnamedTable<Schema.Codec<any, any>, GenericValidator, GenericTableIndexes, GenericTableSearchIndexes, GenericTableVectorIndexes>;
|
|
51
|
+
export type Name<TableDef extends AnyWithProps> = TableDef["tableName"] & string;
|
|
52
|
+
export type TableSchema<TableDef extends AnyWithProps> = TableDef["Fields"];
|
|
53
|
+
export type TableValidator<TableDef extends AnyWithProps> = TableDef["~TableValidator"];
|
|
54
|
+
export type Indexes<TableDef extends AnyWithProps> = TableDef["indexes"];
|
|
55
|
+
export type SearchIndexes<TableDef extends AnyWithProps> = TableDef["searchIndexes"];
|
|
56
|
+
export type VectorIndexes<TableDef extends AnyWithProps> = TableDef["vectorIndexes"];
|
|
57
|
+
export type Doc<TableDef extends AnyWithProps> = TableDef["Doc"];
|
|
58
|
+
export type Fields<TableDef extends AnyWithProps> = TableDef["Fields"];
|
|
59
|
+
export type WithName<TableDef extends AnyWithProps, Name_ extends string> = TableDef extends {
|
|
60
|
+
readonly tableName: Name_;
|
|
61
|
+
} ? TableDef : never;
|
|
62
|
+
export type TablesRecord<Tables extends AnyWithProps> = {
|
|
63
|
+
readonly [TableName_ in Name<Tables>]: WithName<Tables, TableName_>;
|
|
64
|
+
};
|
|
65
|
+
export declare const make: <const TableSchema_ extends Schema.Codec<any, any>>(lazyFields: () => TableSchema_) => UnnamedTable<TableSchema_, TableSchemaToTableValidator<TableSchema_>>;
|
|
66
|
+
/**
|
|
67
|
+
* Extract all of the index field paths within a Convex `Validator`.
|
|
68
|
+
*
|
|
69
|
+
* This is used when declaring table indexes.
|
|
70
|
+
*
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
type ExtractFieldPaths<T extends Validator<any, any, any>> = T["fieldPaths"] | keyof ConvexSystemFields;
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../src/Table.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EACV,YAAY,IAAI,kBAAkB,EAClC,MAAM,EACN,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEjE,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAE7C,eAAO,MAAM,MAAM,yBAAyB,CAAC;AAC7C,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC;AAanC,eAAO,MAAM,OAAO,MAAO,OAAO,KAAG,CAAC,IAAI,GACiC,CAAC;AAE5E,eAAO,MAAM,cAAc,MAAO,OAAO,KAAG,CAAC,IAAI,UAC2B,CAAC;AAW7E,MAAM,WAAW,KAAK,CACpB,KAAK,SAAS,MAAM,EACpB,YAAY,SAAS,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,EAC3C,eAAe,SAAS,gBAAgB,GACtC,2BAA2B,CAAC,YAAY,CAAC,EAC3C,QAAQ,SAAS,mBAAmB,GAAG,EAA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,QAAQ,CAAC,CAAC;AAEvE,MAAM,MAAM,QAAQ,CAClB,QAAQ,SAAS,YAAY,EAC7B,KAAK,SAAS,MAAM,IAClB,QAAQ,SAAS;IAAE,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAA;CAAE,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEtE,MAAM,MAAM,YAAY,CAAC,MAAM,SAAS,YAAY,IAAI;IACtD,QAAQ,EAAE,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;CACpE,CAAC;AAwKF,eAAO,MAAM,IAAI,GAAI,KAAK,CAAC,YAAY,SAAS,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,cACxD,MAAM,YAAY,KAC7B,YAAY,CAAC,YAAY,EAAE,2BAA2B,CAAC,YAAY,CAAC,CAUtE,CAAC;AAIF;;;;;;GAMG;AACH,KAAK,iBAAiB,CAAC,CAAC,SAAS,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAIvD,CAAC,CAAC,YAAY,CAAC,GAAG,MAAM,kBAAkB,CAAC"}
|
package/dist/Table.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { defineProperty } from "./Lazy.js";
|
|
3
|
+
import { extendWithSystemFields } from "./SystemFields.js";
|
|
4
|
+
import * as Predicate from "effect/Predicate";
|
|
5
|
+
//#region src/Table.ts
|
|
6
|
+
var Table_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
+
TypeId: () => TypeId,
|
|
8
|
+
isTable: () => isTable,
|
|
9
|
+
isUnnamedTable: () => isUnnamedTable,
|
|
10
|
+
make: () => make
|
|
11
|
+
});
|
|
12
|
+
const TypeId = "~@confect/core/Table";
|
|
13
|
+
const isTable = (u) => Predicate.hasProperty(u, "~@confect/core/Table") && Predicate.hasProperty(u, "tableName");
|
|
14
|
+
const isUnnamedTable = (u) => Predicate.hasProperty(u, "~@confect/core/Table") && !Predicate.hasProperty(u, "tableName");
|
|
15
|
+
const makeBound = (tableName, state) => {
|
|
16
|
+
const bound = {
|
|
17
|
+
[TypeId]: TypeId,
|
|
18
|
+
tableName,
|
|
19
|
+
indexes: state.indexes,
|
|
20
|
+
searchIndexes: state.searchIndexes,
|
|
21
|
+
vectorIndexes: state.vectorIndexes
|
|
22
|
+
};
|
|
23
|
+
defineProperty(bound, "Fields", () => state.lazyFields());
|
|
24
|
+
defineProperty(bound, "Doc", () => extendWithSystemFields(tableName, bound.Fields));
|
|
25
|
+
return bound;
|
|
26
|
+
};
|
|
27
|
+
const makeUnnamed = (state) => {
|
|
28
|
+
const bind = (tableName) => makeBound(tableName, state);
|
|
29
|
+
const index = (name, fields) => makeUnnamed({
|
|
30
|
+
lazyFields: state.lazyFields,
|
|
31
|
+
indexes: {
|
|
32
|
+
...state.indexes,
|
|
33
|
+
[name]: fields
|
|
34
|
+
},
|
|
35
|
+
searchIndexes: state.searchIndexes,
|
|
36
|
+
vectorIndexes: state.vectorIndexes
|
|
37
|
+
});
|
|
38
|
+
const searchIndex = (name, indexConfig) => makeUnnamed({
|
|
39
|
+
lazyFields: state.lazyFields,
|
|
40
|
+
indexes: state.indexes,
|
|
41
|
+
searchIndexes: {
|
|
42
|
+
...state.searchIndexes,
|
|
43
|
+
[name]: indexConfig
|
|
44
|
+
},
|
|
45
|
+
vectorIndexes: state.vectorIndexes
|
|
46
|
+
});
|
|
47
|
+
const vectorIndex = (name, indexConfig) => makeUnnamed({
|
|
48
|
+
lazyFields: state.lazyFields,
|
|
49
|
+
indexes: state.indexes,
|
|
50
|
+
searchIndexes: state.searchIndexes,
|
|
51
|
+
vectorIndexes: {
|
|
52
|
+
...state.vectorIndexes,
|
|
53
|
+
[name]: indexConfig
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return Object.assign(bind, {
|
|
57
|
+
[TypeId]: TypeId,
|
|
58
|
+
indexes: state.indexes,
|
|
59
|
+
searchIndexes: state.searchIndexes,
|
|
60
|
+
vectorIndexes: state.vectorIndexes,
|
|
61
|
+
index,
|
|
62
|
+
searchIndex,
|
|
63
|
+
vectorIndex
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
const make = (lazyFields) => {
|
|
67
|
+
return makeUnnamed({
|
|
68
|
+
lazyFields,
|
|
69
|
+
indexes: {},
|
|
70
|
+
searchIndexes: {},
|
|
71
|
+
vectorIndexes: {}
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
75
|
+
export { Table_exports, TypeId, isTable, isUnnamedTable, make };
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.js","names":["SystemFields.extendWithSystemFields"],"sources":["../src/Table.ts"],"sourcesContent":["import * as Lazy from \"./Lazy\";\nimport * as SystemFields from \"./SystemFields\";\nimport type { TableSchemaToTableValidator } from \"./SchemaToValidator\";\nimport type {\n SystemFields as ConvexSystemFields,\n Expand,\n GenericTableIndexes,\n GenericTableSearchIndexes,\n GenericTableVectorIndexes,\n IndexTiebreakerField,\n SearchIndexConfig,\n VectorIndexConfig,\n} from \"convex/server\";\nimport type { GenericValidator, Validator } from \"convex/values\";\nimport * as Predicate from \"effect/Predicate\";\nimport type * as Schema from \"effect/Schema\";\n\nexport const TypeId = \"~@confect/core/Table\";\nexport type TypeId = typeof TypeId;\n\n// -----------------------------------------------------------------------------\n// Predicates\n// -----------------------------------------------------------------------------\n//\n// Both bound `Table`s and `UnnamedTable` callables share the same `[TypeId]`\n// brand. They disambiguate by whether a `tableName` property is set: bound\n// tables have one, unnamed callables do not.\n//\n// The discriminator is `tableName` (not `name`) so it does not collide with\n// the built-in `Function.prototype.name` that every JS function carries.\n\nexport const isTable = (u: unknown): u is Any =>\n Predicate.hasProperty(u, TypeId) && Predicate.hasProperty(u, \"tableName\");\n\nexport const isUnnamedTable = (u: unknown): u is UnnamedAny =>\n Predicate.hasProperty(u, TypeId) && !Predicate.hasProperty(u, \"tableName\");\n\n// -----------------------------------------------------------------------------\n// Bound Table\n// -----------------------------------------------------------------------------\n//\n// A bound `Table` is the client-safe document schema: `Fields`, `Doc`, and\n// the index metadata records. The Convex deploy `tableDefinition` (which\n// value-imports `convex/server`) is produced separately by\n// `@confect/server/Table.tableDefinition`.\n\nexport interface Table<\n Name_ extends string,\n TableSchema_ extends Schema.Codec<any, any>,\n TableValidator_ extends GenericValidator =\n TableSchemaToTableValidator<TableSchema_>,\n Indexes_ extends GenericTableIndexes = {},\n SearchIndexes_ extends GenericTableSearchIndexes = {},\n VectorIndexes_ extends GenericTableVectorIndexes = {},\n> {\n readonly [TypeId]: TypeId;\n readonly tableName: Name_;\n readonly Fields: TableSchema_;\n readonly Doc: SystemFields.ExtendWithSystemFields<Name_, TableSchema_>;\n readonly indexes: Indexes_;\n readonly searchIndexes: SearchIndexes_;\n readonly vectorIndexes: VectorIndexes_;\n readonly \"~TableValidator\": TableValidator_;\n}\n\nexport interface Any {\n readonly [TypeId]: TypeId;\n readonly tableName: string;\n}\n\nexport type AnyWithProps = Table<\n any,\n Schema.Codec<any, any>,\n GenericValidator,\n GenericTableIndexes,\n GenericTableSearchIndexes,\n GenericTableVectorIndexes\n>;\n\n// -----------------------------------------------------------------------------\n// UnnamedTable (callable)\n// -----------------------------------------------------------------------------\n//\n// `Table.make(lazyFields)` returns an `UnnamedTable`: a callable that\n// produces a fully bound `Table` when invoked with a name. Chaining methods\n// (`.index`, `.searchIndex`, `.vectorIndex`) live here and return new\n// `UnnamedTable`s, accumulating plain index metadata records. The\n// user-supplied `lazyFields` callback is just carried through until first\n// access of `Fields`/`Doc` on a bound table. The codegen pipeline emits a\n// wrapper file per user-authored table that simply invokes the unnamed\n// callable with the filename basename.\n\nexport interface UnnamedTable<\n TableSchema_ extends Schema.Codec<any, any>,\n TableValidator_ extends GenericValidator =\n TableSchemaToTableValidator<TableSchema_>,\n Indexes_ extends GenericTableIndexes = {},\n SearchIndexes_ extends GenericTableSearchIndexes = {},\n VectorIndexes_ extends GenericTableVectorIndexes = {},\n> {\n <const Name_ extends string>(\n tableName: Name_,\n ): Table<\n Name_,\n TableSchema_,\n TableValidator_,\n Indexes_,\n SearchIndexes_,\n VectorIndexes_\n >;\n\n readonly [TypeId]: TypeId;\n readonly indexes: Indexes_;\n readonly searchIndexes: SearchIndexes_;\n readonly vectorIndexes: VectorIndexes_;\n readonly \"~TableValidator\": TableValidator_;\n\n index<\n IndexName extends string,\n FirstFieldPath extends ExtractFieldPaths<TableValidator_>,\n RestFieldPaths extends ExtractFieldPaths<TableValidator_>[],\n >(\n name: IndexName,\n fields: [FirstFieldPath, ...RestFieldPaths],\n ): UnnamedTable<\n TableSchema_,\n TableValidator_,\n Expand<\n Indexes_ &\n Record<\n IndexName,\n [FirstFieldPath, ...RestFieldPaths, IndexTiebreakerField]\n >\n >,\n SearchIndexes_,\n VectorIndexes_\n >;\n\n searchIndex<\n IndexName extends string,\n SearchField extends ExtractFieldPaths<TableValidator_>,\n FilterFields extends ExtractFieldPaths<TableValidator_> = never,\n >(\n name: IndexName,\n indexConfig: Expand<SearchIndexConfig<SearchField, FilterFields>>,\n ): UnnamedTable<\n TableSchema_,\n TableValidator_,\n Indexes_,\n Expand<\n SearchIndexes_ &\n Record<\n IndexName,\n {\n searchField: SearchField;\n filterFields: FilterFields;\n }\n >\n >,\n VectorIndexes_\n >;\n\n vectorIndex<\n IndexName extends string,\n VectorField extends ExtractFieldPaths<TableValidator_>,\n FilterFields extends ExtractFieldPaths<TableValidator_> = never,\n >(\n name: IndexName,\n indexConfig: Expand<VectorIndexConfig<VectorField, FilterFields>>,\n ): UnnamedTable<\n TableSchema_,\n TableValidator_,\n Indexes_,\n SearchIndexes_,\n Expand<\n VectorIndexes_ &\n Record<\n IndexName,\n {\n vectorField: VectorField;\n dimensions: number;\n filterFields: FilterFields;\n }\n >\n >\n >;\n}\n\nexport interface UnnamedAny {\n readonly [TypeId]: TypeId;\n}\n\nexport type UnnamedAnyWithProps = UnnamedTable<\n Schema.Codec<any, any>,\n GenericValidator,\n GenericTableIndexes,\n GenericTableSearchIndexes,\n GenericTableVectorIndexes\n>;\n\n// -----------------------------------------------------------------------------\n// Type extractors\n// -----------------------------------------------------------------------------\n\nexport type Name<TableDef extends AnyWithProps> = TableDef[\"tableName\"] &\n string;\n\nexport type TableSchema<TableDef extends AnyWithProps> = TableDef[\"Fields\"];\n\nexport type TableValidator<TableDef extends AnyWithProps> =\n TableDef[\"~TableValidator\"];\n\nexport type Indexes<TableDef extends AnyWithProps> = TableDef[\"indexes\"];\n\nexport type SearchIndexes<TableDef extends AnyWithProps> =\n TableDef[\"searchIndexes\"];\n\nexport type VectorIndexes<TableDef extends AnyWithProps> =\n TableDef[\"vectorIndexes\"];\n\nexport type Doc<TableDef extends AnyWithProps> = TableDef[\"Doc\"];\n\nexport type Fields<TableDef extends AnyWithProps> = TableDef[\"Fields\"];\n\nexport type WithName<\n TableDef extends AnyWithProps,\n Name_ extends string,\n> = TableDef extends { readonly tableName: Name_ } ? TableDef : never;\n\nexport type TablesRecord<Tables extends AnyWithProps> = {\n readonly [TableName_ in Name<Tables>]: WithName<Tables, TableName_>;\n};\n\n// -----------------------------------------------------------------------------\n// Construction\n// -----------------------------------------------------------------------------\n//\n// `make` only stores the user-supplied `lazyFields` callback alongside any\n// chained index metadata. Neither `Fields` nor `Doc` is constructed until\n// first access on a bound `Table`. Each chain step is O(1) (plain object\n// spread of the metadata records) and never invokes the callback. Binding\n// via `unnamed(tableName)` installs lazy memoised getters for `Fields` and\n// `Doc` via `Lazy.defineProperty`, so the first access materialises the\n// value and replaces the getter with a plain data property—second-and-\n// subsequent accesses are observably indistinguishable from a plain\n// property and avoid all function-call overhead.\n\ninterface UnnamedState<\n TableSchema_ extends Schema.Codec<any, any>,\n Indexes_ extends GenericTableIndexes,\n SearchIndexes_ extends GenericTableSearchIndexes,\n VectorIndexes_ extends GenericTableVectorIndexes,\n> {\n readonly lazyFields: () => TableSchema_;\n readonly indexes: Indexes_;\n readonly searchIndexes: SearchIndexes_;\n readonly vectorIndexes: VectorIndexes_;\n}\n\nconst makeBound = <\n Name_ extends string,\n TableSchema_ extends Schema.Codec<any, any>,\n TableValidator_ extends Validator<any, any, any>,\n Indexes_ extends GenericTableIndexes,\n SearchIndexes_ extends GenericTableSearchIndexes,\n VectorIndexes_ extends GenericTableVectorIndexes,\n>(\n tableName: Name_,\n state: UnnamedState<TableSchema_, Indexes_, SearchIndexes_, VectorIndexes_>,\n): Table<\n Name_,\n TableSchema_,\n TableValidator_,\n Indexes_,\n SearchIndexes_,\n VectorIndexes_\n> => {\n const bound = {\n [TypeId]: TypeId as TypeId,\n tableName,\n indexes: state.indexes,\n searchIndexes: state.searchIndexes,\n vectorIndexes: state.vectorIndexes,\n } as Table<\n Name_,\n TableSchema_,\n TableValidator_,\n Indexes_,\n SearchIndexes_,\n VectorIndexes_\n >;\n\n Lazy.defineProperty(bound, \"Fields\", () => state.lazyFields());\n\n Lazy.defineProperty(bound, \"Doc\", () =>\n SystemFields.extendWithSystemFields(\n tableName,\n (bound as { Fields: TableSchema_ }).Fields,\n ),\n );\n\n return bound;\n};\n\nconst makeUnnamed = <\n TableSchema_ extends Schema.Codec<any, any>,\n TableValidator_ extends Validator<any, any, any>,\n Indexes_ extends GenericTableIndexes,\n SearchIndexes_ extends GenericTableSearchIndexes,\n VectorIndexes_ extends GenericTableVectorIndexes,\n>(\n state: UnnamedState<TableSchema_, Indexes_, SearchIndexes_, VectorIndexes_>,\n): UnnamedTable<\n TableSchema_,\n TableValidator_,\n Indexes_,\n SearchIndexes_,\n VectorIndexes_\n> => {\n type UnnamedTable_ = UnnamedTable<\n TableSchema_,\n TableValidator_,\n Indexes_,\n SearchIndexes_,\n VectorIndexes_\n >;\n\n type UnnamedTableFunction<FunctionName extends keyof UnnamedTable_> =\n UnnamedTable_[FunctionName];\n\n const bind = <const Name_ extends string>(\n tableName: Name_,\n ): Table<\n Name_,\n TableSchema_,\n TableValidator_,\n Indexes_,\n SearchIndexes_,\n VectorIndexes_\n > =>\n makeBound<\n Name_,\n TableSchema_,\n TableValidator_,\n Indexes_,\n SearchIndexes_,\n VectorIndexes_\n >(tableName, state);\n\n const index: UnnamedTableFunction<\"index\"> = (name, fields) =>\n makeUnnamed({\n lazyFields: state.lazyFields,\n indexes: {\n ...state.indexes,\n [name]: fields,\n } as any,\n searchIndexes: state.searchIndexes,\n vectorIndexes: state.vectorIndexes,\n });\n\n const searchIndex: UnnamedTableFunction<\"searchIndex\"> = (\n name,\n indexConfig,\n ) =>\n makeUnnamed({\n lazyFields: state.lazyFields,\n indexes: state.indexes,\n searchIndexes: {\n ...state.searchIndexes,\n [name]: indexConfig,\n } as any,\n vectorIndexes: state.vectorIndexes,\n });\n\n const vectorIndex: UnnamedTableFunction<\"vectorIndex\"> = (\n name,\n indexConfig,\n ) =>\n makeUnnamed({\n lazyFields: state.lazyFields,\n indexes: state.indexes,\n searchIndexes: state.searchIndexes,\n vectorIndexes: {\n ...state.vectorIndexes,\n [name]: indexConfig,\n } as any,\n });\n\n return Object.assign(bind, {\n [TypeId]: TypeId as TypeId,\n indexes: state.indexes,\n searchIndexes: state.searchIndexes,\n vectorIndexes: state.vectorIndexes,\n index,\n searchIndex,\n vectorIndex,\n }) as UnnamedTable_;\n};\n\nexport const make = <const TableSchema_ extends Schema.Codec<any, any>>(\n lazyFields: () => TableSchema_,\n): UnnamedTable<TableSchema_, TableSchemaToTableValidator<TableSchema_>> => {\n type TableValidator_ = TableSchemaToTableValidator<TableSchema_>;\n type UnnamedTable_ = UnnamedTable<TableSchema_, TableValidator_>;\n\n return makeUnnamed<TableSchema_, TableValidator_, {}, {}, {}>({\n lazyFields,\n indexes: {},\n searchIndexes: {},\n vectorIndexes: {},\n }) as UnnamedTable_;\n};\n\n// Vendored types from convex-js, partially modified. Ideally we could use these directly. See https://github.com/get-convex/convex-js/pull/14\n\n/**\n * Extract all of the index field paths within a Convex `Validator`.\n *\n * This is used when declaring table indexes.\n *\n * @public\n */\ntype ExtractFieldPaths<T extends Validator<any, any, any>> =\n // Add in the system fields available in index definitions.\n // This should be everything except for `_id` because thats added to indexes\n // automatically.\n T[\"fieldPaths\"] | keyof ConvexSystemFields;\n"],"mappings":";;;;;;;;;;;AAiBA,MAAa,SAAS;AActB,MAAa,WAAW,MACtB,UAAU,YAAY,GAAA,sBAAS,KAAK,UAAU,YAAY,GAAG,WAAW;AAE1E,MAAa,kBAAkB,MAC7B,UAAU,YAAY,GAAA,sBAAS,KAAK,CAAC,UAAU,YAAY,GAAG,WAAW;AAgO3E,MAAM,aAQJ,WACA,UAQG;CACH,MAAM,QAAQ;GACX,SAAS;EACV;EACA,SAAS,MAAM;EACf,eAAe,MAAM;EACrB,eAAe,MAAM;CACvB;CASA,eAAoB,OAAO,gBAAgB,MAAM,WAAW,CAAC;CAE7D,eAAoB,OAAO,aACzBA,uBACE,WACC,MAAmC,MACtC,CACF;CAEA,OAAO;AACT;AAEA,MAAM,eAOJ,UAOG;CAYH,MAAM,QACJ,cASA,UAOE,WAAW,KAAK;CAEpB,MAAM,SAAwC,MAAM,WAClD,YAAY;EACV,YAAY,MAAM;EAClB,SAAS;GACP,GAAG,MAAM;IACR,OAAO;EACV;EACA,eAAe,MAAM;EACrB,eAAe,MAAM;CACvB,CAAC;CAEH,MAAM,eACJ,MACA,gBAEA,YAAY;EACV,YAAY,MAAM;EAClB,SAAS,MAAM;EACf,eAAe;GACb,GAAG,MAAM;IACR,OAAO;EACV;EACA,eAAe,MAAM;CACvB,CAAC;CAEH,MAAM,eACJ,MACA,gBAEA,YAAY;EACV,YAAY,MAAM;EAClB,SAAS,MAAM;EACf,eAAe,MAAM;EACrB,eAAe;GACb,GAAG,MAAM;IACR,OAAO;EACV;CACF,CAAC;CAEH,OAAO,OAAO,OAAO,MAAM;GACxB,SAAS;EACV,SAAS,MAAM;EACf,eAAe,MAAM;EACrB,eAAe,MAAM;EACrB;EACA;EACA;CACF,CAAC;AACH;AAEA,MAAa,QACX,eAC0E;CAI1E,OAAO,YAAuD;EAC5D;EACA,SAAS,CAAC;EACV,eAAe,CAAC;EAChB,eAAe,CAAC;CAClB,CAAC;AACH"}
|
package/dist/Types.d.ts
CHANGED
|
@@ -12,8 +12,14 @@ export type IsRecord<T> = [T] extends [never] ? false : IsUnion<T> extends true
|
|
|
12
12
|
export type DeepMutable<T> = IsAny<T> extends true ? any : T extends NonRecursiveLeaf ? T : T extends ReadonlyMap<infer K, infer V> ? Map<DeepMutable<K>, DeepMutable<V>> : T extends ReadonlySet<infer V> ? Set<DeepMutable<V>> : [keyof T] extends [never] ? T : {
|
|
13
13
|
-readonly [K in keyof T]: IsOptional<T, K> extends true ? DeepMutable<Exclude<T[K], undefined>> : DeepMutable<T[K]>;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
16
|
-
|
|
15
|
+
export interface TypeError<Message extends string, T = never> {
|
|
16
|
+
readonly "~@confect/core/Types/TypeError": Message;
|
|
17
|
+
readonly "~value"?: T;
|
|
18
|
+
}
|
|
19
|
+
export interface TypeDefect<Message extends string, T = never> {
|
|
20
|
+
readonly "~@confect/core/Types/TypeDefect": Message;
|
|
21
|
+
readonly "~value"?: T;
|
|
22
|
+
}
|
|
17
23
|
export type IsRecursive<T> = true extends DetectCycle<T> ? true : false;
|
|
18
24
|
type NonRecursiveLeaf = Brand.Brand<any> | GenericId<any> | ArrayBuffer;
|
|
19
25
|
type DetectCycle<T, Cache extends any[] = []> = IsAny<T> extends true ? false : [T] extends [any] ? T extends NonRecursiveLeaf ? false : T extends Cache[number] ? true : T extends Array<infer U> ? DetectCycle<U, [...Cache, T]> : T extends Map<infer _U, infer V> ? DetectCycle<V, [...Cache, T]> : T extends Set<infer U> ? DetectCycle<U, [...Cache, T]> : T extends object ? true extends {
|
package/dist/Types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Types.d.ts","sourceRoot":"","s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AG,sBAAsB,CACvC,cAAc,CAAC,eAAe,EAAE,KAAK,CAAC,EACtC,IAAI,CAAC,CAAC,CAAC,CACR;CACF,GACD,KAAK,GACP,KAAK,CAAC;AAGV,MAAM,MAAM,kBAAkB,CAAC,SAAS,SAAS,gBAAgB,IAAI;IACnE,GAAG,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC;IAC7C,KAAK,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC;CAClD,CAAC"}
|
package/dist/Types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Types.js","names":[],"sources":["../src/Types.ts"],"sourcesContent":["import type {\n DocumentByName,\n FieldTypeFromFieldPath,\n GenericDatabaseReader,\n GenericDataModel,\n TableNamesInDataModel,\n} from \"convex/server\";\nimport type { GenericId } from \"convex/values\";\nimport type { Brand } from \"effect\";\n\nexport type IsOptional<T, K extends keyof T> =\n {} extends Pick<T, K> ? true : false;\n\nexport type IsAny<T> = 0 extends 1 & T ? true : false;\n\nexport type IsUnion<T, U extends T = T> = T extends unknown\n ? [U] extends [T]\n ? false\n : true\n : never;\n\n// https://stackoverflow.com/a/52806744\nexport type IsValueLiteral<Vl> = [Vl] extends [never]\n ? never\n : IsUnion<Vl> extends true\n ? false\n : [Vl] extends [string | number | bigint | boolean]\n ? [string] extends [Vl]\n ? false\n : [number] extends [Vl]\n ? false\n : [boolean] extends [Vl]\n ? false\n : [bigint] extends [Vl]\n ? false\n : true\n : false;\n\n/**\n * Only checks for records with string keys.\n */\nexport type IsRecord<T> = [T] extends [never]\n ? false\n : IsUnion<T> extends true\n ? false\n : T extends Record<string, infer V>\n ? string extends keyof T\n ? keyof T extends string\n ? T extends Record<string, V>\n ? Record<string, V> extends T\n ? true\n : false\n : false\n : false\n : false\n : false;\n\nexport type DeepMutable<T> =\n IsAny<T> extends true\n ? any\n : T extends NonRecursiveLeaf\n ? T\n : T extends ReadonlyMap<infer K, infer V>\n ? Map<DeepMutable<K>, DeepMutable<V>>\n : T extends ReadonlySet<infer V>\n ? Set<DeepMutable<V>>\n : [keyof T] extends [never]\n ? T\n : {\n -readonly [K in keyof T]: IsOptional<T, K> extends true\n ? DeepMutable<Exclude<T[K], undefined>>\n : DeepMutable<T[K]>;\n };\n\nexport
|
|
1
|
+
{"version":3,"file":"Types.js","names":[],"sources":["../src/Types.ts"],"sourcesContent":["import type {\n DocumentByName,\n FieldTypeFromFieldPath,\n GenericDatabaseReader,\n GenericDataModel,\n TableNamesInDataModel,\n} from \"convex/server\";\nimport type { GenericId } from \"convex/values\";\nimport type { Brand } from \"effect\";\n\nexport type IsOptional<T, K extends keyof T> =\n {} extends Pick<T, K> ? true : false;\n\nexport type IsAny<T> = 0 extends 1 & T ? true : false;\n\nexport type IsUnion<T, U extends T = T> = T extends unknown\n ? [U] extends [T]\n ? false\n : true\n : never;\n\n// https://stackoverflow.com/a/52806744\nexport type IsValueLiteral<Vl> = [Vl] extends [never]\n ? never\n : IsUnion<Vl> extends true\n ? false\n : [Vl] extends [string | number | bigint | boolean]\n ? [string] extends [Vl]\n ? false\n : [number] extends [Vl]\n ? false\n : [boolean] extends [Vl]\n ? false\n : [bigint] extends [Vl]\n ? false\n : true\n : false;\n\n/**\n * Only checks for records with string keys.\n */\nexport type IsRecord<T> = [T] extends [never]\n ? false\n : IsUnion<T> extends true\n ? false\n : T extends Record<string, infer V>\n ? string extends keyof T\n ? keyof T extends string\n ? T extends Record<string, V>\n ? Record<string, V> extends T\n ? true\n : false\n : false\n : false\n : false\n : false;\n\nexport type DeepMutable<T> =\n IsAny<T> extends true\n ? any\n : T extends NonRecursiveLeaf\n ? T\n : T extends ReadonlyMap<infer K, infer V>\n ? Map<DeepMutable<K>, DeepMutable<V>>\n : T extends ReadonlySet<infer V>\n ? Set<DeepMutable<V>>\n : [keyof T] extends [never]\n ? T\n : {\n -readonly [K in keyof T]: IsOptional<T, K> extends true\n ? DeepMutable<Exclude<T[K], undefined>>\n : DeepMutable<T[K]>;\n };\n\nexport interface TypeError<Message extends string, T = never> {\n readonly \"~@confect/core/Types/TypeError\": Message;\n readonly \"~value\"?: T;\n}\n\nexport interface TypeDefect<Message extends string, T = never> {\n readonly \"~@confect/core/Types/TypeDefect\": Message;\n readonly \"~value\"?: T;\n}\n\nexport type IsRecursive<T> = true extends DetectCycle<T> ? true : false;\n\ntype NonRecursiveLeaf = Brand.Brand<any> | GenericId<any> | ArrayBuffer;\n\ntype DetectCycle<T, Cache extends any[] = []> =\n IsAny<T> extends true\n ? false\n : [T] extends [any]\n ? T extends NonRecursiveLeaf\n ? false\n : T extends Cache[number]\n ? true\n : T extends Array<infer U>\n ? DetectCycle<U, [...Cache, T]>\n : T extends Map<infer _U, infer V>\n ? DetectCycle<V, [...Cache, T]>\n : T extends Set<infer U>\n ? DetectCycle<U, [...Cache, T]>\n : T extends object\n ? true extends {\n [K in keyof T]: DetectCycle<T[K], [...Cache, T]>;\n }[keyof T]\n ? true\n : false\n : false\n : never;\n\n//////////////////////////////////\n// START: Vendored from Arktype //\n//////////////////////////////////\n\n// https://github.com/arktypeio/arktype/blob/2e911d01a741ccee7a17e31ee144049817fabbb8/ark/util/unionToTuple.ts#L9\n\nexport type UnionToTuple<t> =\n _unionToTuple<t, []> extends infer result ? conform<result, t[]> : never;\n\ntype _unionToTuple<t, result extends unknown[]> =\n getLastBranch<t> extends infer current\n ? [t] extends [never]\n ? result\n : _unionToTuple<Exclude<t, current>, [current, ...result]>\n : never;\n\ntype getLastBranch<t> =\n intersectUnion<t extends unknown ? (x: t) => void : never> extends (\n x: infer branch,\n ) => void\n ? branch\n : never;\n\ntype intersectUnion<t> = (t extends unknown ? (_: t) => void : never) extends (\n _: infer intersection,\n) => void\n ? intersection\n : never;\n\ntype conform<t, base> = t extends base ? t : base;\n\n////////////////////////////////\n// END: Vendored from Arktype //\n////////////////////////////////\n\nexport type IndexFieldTypesForEq<\n ConvexDataModel extends GenericDataModel,\n Table extends TableNamesInDataModel<ConvexDataModel>,\n T extends string[],\n> = T extends readonly [...infer Rest, any]\n ? Rest extends readonly string[]\n ? {\n [K in keyof Rest]: FieldTypeFromFieldPath<\n DocumentByName<ConvexDataModel, Table>,\n Rest[K]\n >;\n }\n : never\n : never;\n\n// Would prefer to use `BaseDatabaseReader` from the `convex` package, but it's not exported.\nexport type BaseDatabaseReader<DataModel extends GenericDataModel> = {\n get: GenericDatabaseReader<DataModel>[\"get\"];\n query: GenericDatabaseReader<DataModel>[\"query\"];\n};\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserIdentity.d.ts","sourceRoot":"","sources":["../src/UserIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,eAAO,MAAM,YAAY,GAAI,kBAAkB,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"UserIdentity.d.ts","sourceRoot":"","sources":["../src/UserIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,eAAO,MAAM,YAAY,GAAI,kBAAkB,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,sBACtD,kBAAkB;;;;;;;;;;;;;;;;;;;;;EAwBpC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,13 +5,18 @@ export * as GroupPath from "./GroupPath";
|
|
|
5
5
|
export * as GroupSpec from "./GroupSpec";
|
|
6
6
|
export * as Identifier from "./Identifier";
|
|
7
7
|
export * as Lazy from "./Lazy";
|
|
8
|
+
export * as MiddlewareAttachment from "./MiddlewareAttachment";
|
|
9
|
+
export * as MiddlewareSpec from "./MiddlewareSpec";
|
|
10
|
+
export * as PaginationError from "./PaginationError";
|
|
11
|
+
export * as PaginationOptions from "./PaginationOptions";
|
|
8
12
|
export * as PaginationResult from "./PaginationResult";
|
|
9
13
|
export * as Ref from "./Ref";
|
|
10
14
|
export * as Refs from "./Refs";
|
|
11
|
-
export * as Registry from "./Registry";
|
|
12
15
|
export * as RuntimeAndFunctionType from "./RuntimeAndFunctionType";
|
|
16
|
+
export * as SchemaToValidator from "./SchemaToValidator";
|
|
13
17
|
export * as Spec from "./Spec";
|
|
14
18
|
export * as SystemFields from "./SystemFields";
|
|
19
|
+
export * as Table from "./Table";
|
|
15
20
|
export * as Types from "./Types";
|
|
16
21
|
export * as UserIdentity from "./UserIdentity";
|
|
17
22
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,oBAAoB,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,sBAAsB,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { Lazy_exports } from "./Lazy.js";
|
|
2
|
+
import { PaginationOptions_exports } from "./PaginationOptions.js";
|
|
3
|
+
import { PaginationResult_exports } from "./PaginationResult.js";
|
|
2
4
|
import { FunctionProvenance_exports } from "./FunctionProvenance.js";
|
|
3
5
|
import { Identifier_exports } from "./Identifier.js";
|
|
4
6
|
import { RuntimeAndFunctionType_exports } from "./RuntimeAndFunctionType.js";
|
|
5
7
|
import { FunctionSpec_exports } from "./FunctionSpec.js";
|
|
6
8
|
import { GenericId_exports } from "./GenericId.js";
|
|
7
9
|
import { GroupPath_exports } from "./GroupPath.js";
|
|
10
|
+
import { MiddlewareAttachment_exports } from "./MiddlewareAttachment.js";
|
|
8
11
|
import { GroupSpec_exports } from "./GroupSpec.js";
|
|
9
|
-
import {
|
|
12
|
+
import { MiddlewareSpec_exports } from "./MiddlewareSpec.js";
|
|
13
|
+
import { PaginationError_exports } from "./PaginationError.js";
|
|
10
14
|
import { Ref_exports } from "./Ref.js";
|
|
11
|
-
import { Refs_exports } from "./Refs.js";
|
|
12
|
-
import { Registry_exports } from "./Registry.js";
|
|
13
15
|
import { Spec_exports } from "./Spec.js";
|
|
16
|
+
import { Refs_exports } from "./Refs.js";
|
|
17
|
+
import { SchemaToValidator_exports } from "./SchemaToValidator.js";
|
|
14
18
|
import { SystemFields_exports } from "./SystemFields.js";
|
|
19
|
+
import { Table_exports } from "./Table.js";
|
|
15
20
|
import { Types_exports } from "./Types.js";
|
|
16
21
|
import { UserIdentity_exports } from "./UserIdentity.js";
|
|
17
|
-
export { FunctionProvenance_exports as FunctionProvenance, FunctionSpec_exports as FunctionSpec, GenericId_exports as GenericId, GroupPath_exports as GroupPath, GroupSpec_exports as GroupSpec, Identifier_exports as Identifier, Lazy_exports as Lazy, PaginationResult_exports as PaginationResult, Ref_exports as Ref, Refs_exports as Refs,
|
|
22
|
+
export { FunctionProvenance_exports as FunctionProvenance, FunctionSpec_exports as FunctionSpec, GenericId_exports as GenericId, GroupPath_exports as GroupPath, GroupSpec_exports as GroupSpec, Identifier_exports as Identifier, Lazy_exports as Lazy, MiddlewareAttachment_exports as MiddlewareAttachment, MiddlewareSpec_exports as MiddlewareSpec, PaginationError_exports as PaginationError, PaginationOptions_exports as PaginationOptions, PaginationResult_exports as PaginationResult, Ref_exports as Ref, Refs_exports as Refs, RuntimeAndFunctionType_exports as RuntimeAndFunctionType, SchemaToValidator_exports as SchemaToValidator, Spec_exports as Spec, SystemFields_exports as SystemFields, Table_exports as Table, Types_exports as Types, UserIdentity_exports as UserIdentity };
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@confect/core",
|
|
3
3
|
"description": "Shared specs and schemas used by all Confect packages",
|
|
4
|
-
"version": "10.0.0
|
|
4
|
+
"version": "10.0.0",
|
|
5
5
|
"author": "RJ Dellecese",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/rjdellecese/confect/issues"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@
|
|
11
|
-
"@
|
|
12
|
-
"
|
|
13
|
-
"effect": "4.0.0
|
|
14
|
-
"tsdown": "0.
|
|
15
|
-
"tsx": "4.23.
|
|
16
|
-
"typescript": "
|
|
10
|
+
"@effect/vitest": "4.0.0",
|
|
11
|
+
"@types/node": "24.13.3",
|
|
12
|
+
"confect-bench-harness": "0.0.0",
|
|
13
|
+
"effect": "4.0.0",
|
|
14
|
+
"tsdown": "0.23.0",
|
|
15
|
+
"tsx": "4.23.15",
|
|
16
|
+
"typescript": "7.0.2",
|
|
17
17
|
"unrun": "0.3.1",
|
|
18
|
-
"vitest": "
|
|
18
|
+
"vitest": "5.0.2"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
21
|
+
"node": ">=24"
|
|
22
22
|
},
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"LICENSE",
|
|
38
38
|
"README.md",
|
|
39
39
|
"dist",
|
|
40
|
+
"!dist/*.tsbuildinfo",
|
|
40
41
|
"package.json",
|
|
41
42
|
"src"
|
|
42
43
|
],
|
|
@@ -50,20 +51,21 @@
|
|
|
50
51
|
"module": "./dist/index.js",
|
|
51
52
|
"peerDependencies": {
|
|
52
53
|
"convex": "^1.32.0",
|
|
53
|
-
"effect": "^4.0.0
|
|
54
|
+
"effect": "^4.0.0"
|
|
54
55
|
},
|
|
55
56
|
"repository": {
|
|
56
57
|
"type": "git",
|
|
57
|
-
"url": "https://github.com/rjdellecese/confect.git"
|
|
58
|
+
"url": "git+https://github.com/rjdellecese/confect.git"
|
|
58
59
|
},
|
|
59
60
|
"sideEffects": false,
|
|
60
61
|
"type": "module",
|
|
61
62
|
"types": "./dist/index.d.ts",
|
|
62
63
|
"scripts": {
|
|
63
64
|
"bench": "tsx test/Refs.bench.ts",
|
|
64
|
-
"clean": "rm -rf dist coverage node_modules",
|
|
65
|
-
"dev": "tsdown --watch --config-loader unrun",
|
|
65
|
+
"clean": "shx rm -rf dist coverage node_modules",
|
|
66
|
+
"dev": "tsdown --watch --no-clean --config-loader unrun",
|
|
66
67
|
"test": "vitest run",
|
|
67
|
-
"typecheck": "tsc -b tsconfig.src.json"
|
|
68
|
+
"typecheck": "tsc -b tsconfig.src.json",
|
|
69
|
+
"typecheck:inexact": "tsc --noEmit --project tsconfig.json --exactOptionalPropertyTypes false"
|
|
68
70
|
}
|
|
69
71
|
}
|