@zenstackhq/schema
Advanced tools
+3
-1
@@ -80,2 +80,3 @@ import Decimal from "decimal.js"; | ||
| isView?: boolean; | ||
| delegateMap?: string; | ||
| }; | ||
@@ -163,2 +164,3 @@ type AttributeApplication = { | ||
| type GetModelDiscriminator<Schema extends SchemaDef, Model extends GetModels<Schema>> = keyof { [Key in GetModelFields<Schema, Model> as FieldIsDelegateDiscriminator<Schema, Model, Key> extends true ? GetModelField<Schema, Model, Key>['originModel'] extends string ? never : Key : never]: true }; | ||
| type GetModelDelegateMapValue<Schema extends SchemaDef, Model extends GetModels<Schema>> = Exclude<GetModel<Schema, Model>['delegateMap'], undefined> extends never ? Model : Exclude<GetModel<Schema, Model>['delegateMap'], undefined>; | ||
| type GetModelFieldType<Schema extends SchemaDef, Model extends GetModels<Schema>, Field extends GetModelFields<Schema, Model>> = Schema['models'][Model]['fields'][Field]['type']; | ||
@@ -292,3 +294,3 @@ type GetTypeDefFields<Schema extends SchemaDef, TypeDef extends GetTypeDefs<Schema>> = Extract<keyof GetTypeDef<Schema, TypeDef>['fields'], string>; | ||
| //#endregion | ||
| export { ArrayExpression, AttributeApplication, AttributeArg, BinaryExpression, BinaryOperator, BindingExpression, BuiltinType, CallExpression, CascadeAction, DataSourceProvider, DataSourceProviderType, EnumDef, EnumField, Expression, ExpressionUtils, FieldDef, FieldDefault, FieldExpression, FieldHasDefault, FieldIsArray, FieldIsComputed, FieldIsDelegateDiscriminator, FieldIsDelegateRelation, FieldIsRelation, FieldIsRelationArray, FieldIsUnsupported, FieldType, ForeignKeyFields, GetDelegateModels, GetEnum, GetEnums, GetModel, GetModelDiscriminator, GetModelField, GetModelFieldType, GetModelFields, GetModels, GetSubModels, GetTypeDef, GetTypeDefField, GetTypeDefFieldType, GetTypeDefFields, GetTypeDefs, InvalidSchemaError, IsDelegateModel, LiteralExpression, MappedBuiltinType, MemberExpression, ModelDef, ModelFieldIsOptional, NonRelationFields, NullExpression, ProcedureDef, ProcedureParam, RelationFieldType, RelationFields, RelationInfo, ScalarFields, SchemaAccessor, SchemaDef, ThisExpression, TypeDefDef, TypeDefFieldIsArray, TypeDefFieldIsOptional, UnaryExpression, UnaryOperator, UniqueFieldsInfo, UpdatedAtInfo }; | ||
| export { ArrayExpression, AttributeApplication, AttributeArg, BinaryExpression, BinaryOperator, BindingExpression, BuiltinType, CallExpression, CascadeAction, DataSourceProvider, DataSourceProviderType, EnumDef, EnumField, Expression, ExpressionUtils, FieldDef, FieldDefault, FieldExpression, FieldHasDefault, FieldIsArray, FieldIsComputed, FieldIsDelegateDiscriminator, FieldIsDelegateRelation, FieldIsRelation, FieldIsRelationArray, FieldIsUnsupported, FieldType, ForeignKeyFields, GetDelegateModels, GetEnum, GetEnums, GetModel, GetModelDelegateMapValue, GetModelDiscriminator, GetModelField, GetModelFieldType, GetModelFields, GetModels, GetSubModels, GetTypeDef, GetTypeDefField, GetTypeDefFieldType, GetTypeDefFields, GetTypeDefs, InvalidSchemaError, IsDelegateModel, LiteralExpression, MappedBuiltinType, MemberExpression, ModelDef, ModelFieldIsOptional, NonRelationFields, NullExpression, ProcedureDef, ProcedureParam, RelationFieldType, RelationFields, RelationInfo, ScalarFields, SchemaAccessor, SchemaDef, ThisExpression, TypeDefDef, TypeDefFieldIsArray, TypeDefFieldIsOptional, UnaryExpression, UnaryOperator, UniqueFieldsInfo, UpdatedAtInfo }; | ||
| //# sourceMappingURL=index.d.cts.map |
+3
-1
@@ -80,2 +80,3 @@ import Decimal from "decimal.js"; | ||
| isView?: boolean; | ||
| delegateMap?: string; | ||
| }; | ||
@@ -163,2 +164,3 @@ type AttributeApplication = { | ||
| type GetModelDiscriminator<Schema extends SchemaDef, Model extends GetModels<Schema>> = keyof { [Key in GetModelFields<Schema, Model> as FieldIsDelegateDiscriminator<Schema, Model, Key> extends true ? GetModelField<Schema, Model, Key>['originModel'] extends string ? never : Key : never]: true }; | ||
| type GetModelDelegateMapValue<Schema extends SchemaDef, Model extends GetModels<Schema>> = Exclude<GetModel<Schema, Model>['delegateMap'], undefined> extends never ? Model : Exclude<GetModel<Schema, Model>['delegateMap'], undefined>; | ||
| type GetModelFieldType<Schema extends SchemaDef, Model extends GetModels<Schema>, Field extends GetModelFields<Schema, Model>> = Schema['models'][Model]['fields'][Field]['type']; | ||
@@ -292,3 +294,3 @@ type GetTypeDefFields<Schema extends SchemaDef, TypeDef extends GetTypeDefs<Schema>> = Extract<keyof GetTypeDef<Schema, TypeDef>['fields'], string>; | ||
| //#endregion | ||
| export { ArrayExpression, AttributeApplication, AttributeArg, BinaryExpression, BinaryOperator, BindingExpression, BuiltinType, CallExpression, CascadeAction, DataSourceProvider, DataSourceProviderType, EnumDef, EnumField, Expression, ExpressionUtils, FieldDef, FieldDefault, FieldExpression, FieldHasDefault, FieldIsArray, FieldIsComputed, FieldIsDelegateDiscriminator, FieldIsDelegateRelation, FieldIsRelation, FieldIsRelationArray, FieldIsUnsupported, FieldType, ForeignKeyFields, GetDelegateModels, GetEnum, GetEnums, GetModel, GetModelDiscriminator, GetModelField, GetModelFieldType, GetModelFields, GetModels, GetSubModels, GetTypeDef, GetTypeDefField, GetTypeDefFieldType, GetTypeDefFields, GetTypeDefs, InvalidSchemaError, IsDelegateModel, LiteralExpression, MappedBuiltinType, MemberExpression, ModelDef, ModelFieldIsOptional, NonRelationFields, NullExpression, ProcedureDef, ProcedureParam, RelationFieldType, RelationFields, RelationInfo, ScalarFields, SchemaAccessor, SchemaDef, ThisExpression, TypeDefDef, TypeDefFieldIsArray, TypeDefFieldIsOptional, UnaryExpression, UnaryOperator, UniqueFieldsInfo, UpdatedAtInfo }; | ||
| export { ArrayExpression, AttributeApplication, AttributeArg, BinaryExpression, BinaryOperator, BindingExpression, BuiltinType, CallExpression, CascadeAction, DataSourceProvider, DataSourceProviderType, EnumDef, EnumField, Expression, ExpressionUtils, FieldDef, FieldDefault, FieldExpression, FieldHasDefault, FieldIsArray, FieldIsComputed, FieldIsDelegateDiscriminator, FieldIsDelegateRelation, FieldIsRelation, FieldIsRelationArray, FieldIsUnsupported, FieldType, ForeignKeyFields, GetDelegateModels, GetEnum, GetEnums, GetModel, GetModelDelegateMapValue, GetModelDiscriminator, GetModelField, GetModelFieldType, GetModelFields, GetModels, GetSubModels, GetTypeDef, GetTypeDefField, GetTypeDefFieldType, GetTypeDefFields, GetTypeDefs, InvalidSchemaError, IsDelegateModel, LiteralExpression, MappedBuiltinType, MemberExpression, ModelDef, ModelFieldIsOptional, NonRelationFields, NullExpression, ProcedureDef, ProcedureParam, RelationFieldType, RelationFields, RelationInfo, ScalarFields, SchemaAccessor, SchemaDef, ThisExpression, TypeDefDef, TypeDefFieldIsArray, TypeDefFieldIsOptional, UnaryExpression, UnaryOperator, UniqueFieldsInfo, UpdatedAtInfo }; | ||
| //# sourceMappingURL=index.d.mts.map |
+5
-5
@@ -5,3 +5,3 @@ { | ||
| "description": "TypeScript representation of ZModel schema", | ||
| "version": "3.7.0", | ||
| "version": "3.7.1", | ||
| "type": "module", | ||
@@ -42,6 +42,6 @@ "author": { | ||
| "devDependencies": { | ||
| "@zenstackhq/eslint-config": "3.7.0", | ||
| "@zenstackhq/typescript-config": "3.7.0", | ||
| "@zenstackhq/tsdown-config": "3.7.0", | ||
| "@zenstackhq/vitest-config": "3.7.0" | ||
| "@zenstackhq/eslint-config": "3.7.1", | ||
| "@zenstackhq/tsdown-config": "3.7.1", | ||
| "@zenstackhq/typescript-config": "3.7.1", | ||
| "@zenstackhq/vitest-config": "3.7.1" | ||
| }, | ||
@@ -48,0 +48,0 @@ "funding": "https://github.com/sponsors/zenstackhq", |
78285
0.73%