@lssm/lib.schema 0.0.0-canary-20251207012602 → 0.0.0-canary-20251207043720

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/lib.schema",
3
- "version": "0.0.0-canary-20251207012602",
3
+ "version": "0.0.0-canary-20251207043720",
4
4
  "scripts": {
5
5
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
6
6
  "build": "bun build:bundle && bun build:types",
@@ -31,26 +31,29 @@
31
31
  "module": "./dist/index.js",
32
32
  "types": "./dist/index.d.ts",
33
33
  "exports": {
34
- ".": "./dist/index.js",
35
- "./entity": "./dist/entity/index.js",
36
- "./entity/defineEntity": "./dist/entity/defineEntity.js",
37
- "./entity/generator": "./dist/entity/generator.js",
38
- "./entity/types": "./dist/entity/types.js",
39
- "./EnumType": "./dist/EnumType.js",
40
- "./FieldType": "./dist/FieldType.js",
41
- "./ScalarTypeEnum": "./dist/ScalarTypeEnum.js",
42
- "./SchemaModel": "./dist/SchemaModel.js",
34
+ ".": "./src/index.ts",
35
+ "./entity": "./src/entity/index.ts",
36
+ "./entity/defineEntity": "./src/entity/defineEntity.ts",
37
+ "./entity/generator": "./src/entity/generator.ts",
38
+ "./entity/types": "./src/entity/types.ts",
39
+ "./EnumType": "./src/EnumType.ts",
40
+ "./FieldType": "./src/FieldType.ts",
41
+ "./ScalarTypeEnum": "./src/ScalarTypeEnum.ts",
42
+ "./SchemaModel": "./src/SchemaModel.ts",
43
43
  "./*": "./*"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public",
47
47
  "exports": {
48
48
  ".": "./dist/index.js",
49
+ "./entity": "./dist/entity/index.js",
50
+ "./entity/defineEntity": "./dist/entity/defineEntity.js",
51
+ "./entity/generator": "./dist/entity/generator.js",
52
+ "./entity/types": "./dist/entity/types.js",
49
53
  "./EnumType": "./dist/EnumType.js",
50
54
  "./FieldType": "./dist/FieldType.js",
51
55
  "./ScalarTypeEnum": "./dist/ScalarTypeEnum.js",
52
56
  "./SchemaModel": "./dist/SchemaModel.js",
53
- "./entity": "./dist/entity/index.js",
54
57
  "./*": "./*"
55
58
  }
56
59
  }
@@ -1,41 +0,0 @@
1
- import { z } from "zod";
2
- import { GraphQLEnumType } from "graphql";
3
-
4
- //#region src/EnumType.d.ts
5
-
6
- /**
7
- * Strongly-typed string enum wrapper with one source of truth for zod, GraphQL, and JSON Schema.
8
- */
9
- declare class EnumType<T extends [string, ...string[]]> {
10
- private readonly name;
11
- private readonly values;
12
- private readonly gqlEnum;
13
- constructor(name: string, values: T);
14
- /** Enum type name (used by GraphQL and JSON Schema). */
15
- getName(): string;
16
- /** Returns the literal tuple of allowed values. */
17
- getEnumValues(): T;
18
- /** GraphQL enum instance suitable for Pothos or vanilla GraphQL schemas. */
19
- getPothos(): GraphQLEnumType;
20
- /** zod schema representing this enum. */
21
- getZod(): z.ZodEnum<{ [K in T[number]]: K }>;
22
- /** Minimal JSON representation (alias of getJsonSchema). */
23
- getJson(): {
24
- type: 'string';
25
- enum: T;
26
- };
27
- /** JSON Schema for this enum. */
28
- getJsonSchema(): {
29
- type: 'string';
30
- enum: T;
31
- };
32
- }
33
- type AnyEnumType = EnumType<[string, ...string[]]>;
34
- /**
35
- * Helper to define an EnumType.
36
- * @param name Display/type name used across GraphQL and JSON Schema
37
- * @param values Literal tuple of allowed string values (at least one)
38
- */
39
- declare const defineEnum: <T extends [string, ...string[]]>(name: string, values: T) => EnumType<T>;
40
- //#endregion
41
- export { AnyEnumType, EnumType, defineEnum };
@@ -1,30 +0,0 @@
1
- import { z } from "zod";
2
- import { GraphQLScalarType, GraphQLScalarTypeConfig } from "graphql";
3
-
4
- //#region src/FieldType.d.ts
5
- interface FieldTypeConfig<TInternal, TExternal = TInternal> extends GraphQLScalarTypeConfig<TInternal, TExternal> {
6
- zod: z.ZodType<TInternal>;
7
- jsonSchema: unknown | (() => unknown);
8
- }
9
- type AnyFieldType = FieldType<any, any>;
10
- /**
11
- * GraphQL scalar wrapper that carries zod and JSON Schema metadata.
12
- *
13
- * TInternal is the runtime representation; TExternal is the GraphQL output.
14
- */
15
- declare class FieldType<TInternal, TExternal = TInternal> extends GraphQLScalarType<TInternal, TExternal> {
16
- private zodSchema;
17
- private readonly jsonSchemaDef?;
18
- constructor(config: FieldTypeConfig<TInternal, TExternal>);
19
- /** Return the attached zod schema for validation. */
20
- getZod(): z.ZodType<TInternal>;
21
- /** GraphQL scalar instance usable by Pothos or vanilla GraphQL. */
22
- getPothos(): GraphQLScalarType<TInternal, TExternal>;
23
- /** Return the JSON Schema (evaluates factory if provided). */
24
- getJson(): unknown;
25
- getJsonSchemaDef(): unknown | (() => unknown);
26
- getJsonSchema(): unknown;
27
- }
28
- type ZodFieldType<Field extends AnyFieldType> = z.infer<ReturnType<Field['getZod']>>;
29
- //#endregion
30
- export { AnyFieldType, FieldType, FieldTypeConfig, ZodFieldType };
@@ -1,32 +0,0 @@
1
- import { FieldType } from "./FieldType.js";
2
-
3
- //#region src/ScalarTypeEnum.d.ts
4
-
5
- /**
6
- * Factory functions for common scalar FieldTypes with zod/GraphQL/JSON Schema.
7
- */
8
- declare const ScalarTypeEnum: {
9
- readonly String_unsecure: () => FieldType<string>;
10
- readonly Int_unsecure: () => FieldType<number>;
11
- readonly Float_unsecure: () => FieldType<number>;
12
- readonly Boolean: () => FieldType<boolean>;
13
- readonly ID: () => FieldType<string>;
14
- readonly JSON: () => FieldType<unknown>;
15
- readonly JSONObject: () => FieldType<Record<string, unknown>>;
16
- readonly Date: () => FieldType<Date, string>;
17
- readonly DateTime: () => FieldType<Date, string>;
18
- readonly Time: () => FieldType<string>;
19
- readonly EmailAddress: () => FieldType<string>;
20
- readonly URL: () => FieldType<string>;
21
- readonly PhoneNumber: () => FieldType<string>;
22
- readonly NonEmptyString: () => FieldType<string>;
23
- readonly Locale: () => FieldType<string>;
24
- readonly TimeZone: () => FieldType<string>;
25
- readonly Latitude: () => FieldType<number>;
26
- readonly Longitude: () => FieldType<number>;
27
- readonly Currency: () => FieldType<string>;
28
- readonly CountryCode: () => FieldType<string>;
29
- };
30
- type ScalarTypeEnum = [keyof typeof ScalarTypeEnum];
31
- //#endregion
32
- export { ScalarTypeEnum };
@@ -1,61 +0,0 @@
1
- import { AnyEnumType } from "./EnumType.js";
2
- import { AnyFieldType } from "./FieldType.js";
3
- import { z } from "zod";
4
- import { Maybe } from "graphql/jsutils/Maybe";
5
-
6
- //#region src/SchemaModel.d.ts
7
- type FieldLike = AnyFieldType | AnyEnumType | AnySchemaModel;
8
- /** Field configuration for a SchemaModel property. */
9
- interface SchemaFieldConfig<Type extends FieldLike = FieldLike> {
10
- type: Type;
11
- isOptional: boolean;
12
- /** When present and true, the field is an array */
13
- isArray?: true;
14
- }
15
- type SchemaModelFieldsAnyConfig<Type extends FieldLike = FieldLike> = Record<string, SchemaFieldConfig<Type>>;
16
- /** Model definition: name and fields. */
17
- interface SchemaModelConfig<Fields extends SchemaModelFieldsAnyConfig> {
18
- name: string;
19
- description?: Maybe<string>;
20
- fields: Fields;
21
- }
22
- /**
23
- * Named object model built from FieldType/EnumType/SchemaModel fields.
24
- * Provides zod and GraphQL input helpers, and supports arrays/optional fields.
25
- */
26
- declare class SchemaModel<Fields extends SchemaModelFieldsAnyConfig> {
27
- readonly config: SchemaModelConfig<Fields>;
28
- constructor(config: SchemaModelConfig<Fields>);
29
- /**
30
- * Build a typed ZodObject from the model fields, preserving each field's
31
- * Zod schema and optionality at the type level when possible.
32
- */
33
- getZod(): TopLevelZodFromModel<Fields>;
34
- /** Input object name for GraphQL builder adapters. */
35
- getPothosInput(): string;
36
- }
37
- type AnySchemaModel = SchemaModel<SchemaModelFieldsAnyConfig>;
38
- type ZodSchemaModel<Field extends AnySchemaModel> = z.infer<ReturnType<Field['getZod']>>;
39
- type InferZodFromType<T> = T extends SchemaModel<any> ? z.ZodObject<any> : T extends AnyFieldType ? ReturnType<T['getZod']> : T extends AnyEnumType ? ReturnType<T['getZod']> : never;
40
- type MaybeArray<Z extends z.ZodType, A> = A extends true ? z.ZodArray<Z> : Z;
41
- type MaybeOptional<Z extends z.ZodType, O> = O extends true ? z.ZodOptional<Z> : Z;
42
- /**
43
- * Helper type: derive the Zod shape from the field config.
44
- * Supports nested SchemaModel and arrays, preserving optionality and list-ness.
45
- */
46
- type FieldIsArray<FC> = FC extends {
47
- isArray: true;
48
- } ? true : false;
49
- type ZodShapeFromFields<F extends SchemaModelFieldsAnyConfig> = { [K in keyof F]: MaybeOptional<MaybeArray<InferZodFromType<F[K]['type']>, FieldIsArray<F[K]>>, F[K]['isOptional']> };
50
- /**
51
- * The top-level Zod schema returned by getZod():
52
- * either ZodObject<...> or ZodArray<ZodObject<...>> when config.isArray.
53
- */
54
- type TopLevelZodFromModel<F extends SchemaModelFieldsAnyConfig> = z.ZodObject<ZodShapeFromFields<F>>;
55
- /**
56
- * Helper to define a SchemaModel with type inference.
57
- * Equivalent to `new SchemaModel(config)` but with better ergonomics.
58
- */
59
- declare const defineSchemaModel: <Fields extends SchemaModelFieldsAnyConfig>(config: SchemaModelConfig<Fields>) => SchemaModel<Fields>;
60
- //#endregion
61
- export { AnySchemaModel, SchemaFieldConfig, SchemaModel, SchemaModelConfig, SchemaModelFieldsAnyConfig, TopLevelZodFromModel, ZodSchemaModel, ZodShapeFromFields, defineSchemaModel };
@@ -1,92 +0,0 @@
1
- import { EntityEnumDef, EntityEnumField, EntityField, EntityIndex, EntityRelationField, EntityScalarField, EntitySpec } from "./types.js";
2
-
3
- //#region src/entity/defineEntity.d.ts
4
-
5
- /**
6
- * Helper to define a database entity with full type safety.
7
- *
8
- * @example
9
- * ```typescript
10
- * const UserEntity = defineEntity({
11
- * name: 'User',
12
- * schema: 'lssm_sigil',
13
- * description: 'A user of the platform.',
14
- * fields: {
15
- * id: field.id(),
16
- * email: field.string({ isUnique: true, zod: z.string().email() }),
17
- * name: field.string({ isOptional: true }),
18
- * createdAt: field.createdAt(),
19
- * updatedAt: field.updatedAt(),
20
- * memberships: field.hasMany('Member'),
21
- * },
22
- * indexes: [{ fields: ['email'], unique: true }],
23
- * });
24
- * ```
25
- */
26
- declare function defineEntity<TFields extends Record<string, EntityField>>(spec: EntitySpec<TFields>): EntitySpec<TFields>;
27
- /**
28
- * Helper to define an enum that can be shared across entities.
29
- */
30
- declare function defineEntityEnum(def: EntityEnumDef): EntityEnumDef;
31
- /**
32
- * Field builder helpers for common field patterns.
33
- */
34
- declare const field: {
35
- /** String field */
36
- string(opts?: Partial<Omit<EntityScalarField, "kind" | "type">>): EntityScalarField;
37
- /** Integer field */
38
- int(opts?: Partial<Omit<EntityScalarField, "kind" | "type">>): EntityScalarField;
39
- /** Float field */
40
- float(opts?: Partial<Omit<EntityScalarField, "kind" | "type">>): EntityScalarField;
41
- /** Boolean field */
42
- boolean(opts?: Partial<Omit<EntityScalarField, "kind" | "type">>): EntityScalarField;
43
- /** DateTime field */
44
- dateTime(opts?: Partial<Omit<EntityScalarField, "kind" | "type">>): EntityScalarField;
45
- /** JSON field */
46
- json(opts?: Partial<Omit<EntityScalarField, "kind" | "type">>): EntityScalarField;
47
- /** BigInt field */
48
- bigInt(opts?: Partial<Omit<EntityScalarField, "kind" | "type">>): EntityScalarField;
49
- /** Decimal field */
50
- decimal(opts?: Partial<Omit<EntityScalarField, "kind" | "type">>): EntityScalarField;
51
- /** Bytes field */
52
- bytes(opts?: Partial<Omit<EntityScalarField, "kind" | "type">>): EntityScalarField;
53
- /** Primary key field with cuid() default */
54
- id(opts?: Partial<Omit<EntityScalarField, "kind" | "type" | "isId">>): EntityScalarField;
55
- /** Primary key field with uuid() default */
56
- uuid(opts?: Partial<Omit<EntityScalarField, "kind" | "type" | "isId">>): EntityScalarField;
57
- /** Auto-increment integer primary key */
58
- autoIncrement(opts?: Partial<Omit<EntityScalarField, "kind" | "type" | "isId">>): EntityScalarField;
59
- /** createdAt timestamp with now() default */
60
- createdAt(opts?: Partial<Omit<EntityScalarField, "kind" | "type" | "default">>): EntityScalarField;
61
- /** updatedAt timestamp with @updatedAt */
62
- updatedAt(opts?: Partial<Omit<EntityScalarField, "kind" | "type" | "updatedAt">>): EntityScalarField;
63
- /** Email field with validation */
64
- email(opts?: Partial<Omit<EntityScalarField, "kind" | "type">>): EntityScalarField;
65
- /** URL field with validation */
66
- url(opts?: Partial<Omit<EntityScalarField, "kind" | "type">>): EntityScalarField;
67
- /** Enum field */
68
- enum(enumName: string, opts?: Partial<Omit<EntityEnumField, "kind" | "enumName">>): EntityEnumField;
69
- /** Inline enum field with values */
70
- inlineEnum(enumName: string, values: readonly string[], opts?: Partial<Omit<EntityEnumField, "kind" | "enumName" | "values">>): EntityEnumField;
71
- /** Has one relation (1:1 inverse side) */
72
- hasOne(target: string, opts?: Partial<Omit<EntityRelationField, "kind" | "type" | "target">>): EntityRelationField;
73
- /** Has many relation (1:N inverse side) */
74
- hasMany(target: string, opts?: Partial<Omit<EntityRelationField, "kind" | "type" | "target">>): EntityRelationField;
75
- /** Belongs to relation (N:1 owning side with foreign key) */
76
- belongsTo(target: string, fields: string[], references: string[], opts?: Partial<Omit<EntityRelationField, "kind" | "type" | "target" | "fields" | "references">>): EntityRelationField;
77
- /** Foreign key field (string) - use with belongsTo */
78
- foreignKey(opts?: Partial<Omit<EntityScalarField, "kind" | "type">>): EntityScalarField;
79
- };
80
- /**
81
- * Index builder helpers.
82
- */
83
- declare const index: {
84
- /** Create a regular index */
85
- on(fields: string[], opts?: Partial<Omit<EntityIndex, "fields">>): EntityIndex;
86
- /** Create a unique constraint index */
87
- unique(fields: string[], opts?: Partial<Omit<EntityIndex, "fields" | "unique">>): EntityIndex;
88
- /** Create a compound index with sort orders */
89
- compound(fields: string[], sort: Record<string, "Asc" | "Desc">, opts?: Partial<Omit<EntityIndex, "fields" | "sort">>): EntityIndex;
90
- };
91
- //#endregion
92
- export { defineEntity, defineEntityEnum, field, index };
@@ -1,37 +0,0 @@
1
- import { EntityEnumDef, EntitySpec, ModuleSchemaContribution } from "./types.js";
2
-
3
- //#region src/entity/generator.d.ts
4
-
5
- /**
6
- * Options for Prisma schema generation.
7
- */
8
- interface PrismaGeneratorOptions {
9
- /** Output file path for the generated schema */
10
- outputPath?: string;
11
- /** Prisma datasource provider (default: 'postgresql') */
12
- provider?: 'postgresql' | 'mysql' | 'sqlite' | 'mongodb' | 'sqlserver';
13
- /** Prisma generator output path */
14
- clientOutput?: string;
15
- /** Include Pothos generator */
16
- includePothos?: boolean;
17
- /** Pothos output path */
18
- pothosOutput?: string;
19
- }
20
- /**
21
- * Generate Prisma schema content from entity specifications.
22
- */
23
- declare function generatePrismaSchema(entities: EntitySpec[], options?: PrismaGeneratorOptions): string;
24
- /**
25
- * Compose multiple module schema contributions into a single schema.
26
- */
27
- declare function composeModuleSchemas(contributions: ModuleSchemaContribution[], options?: PrismaGeneratorOptions): string;
28
- /**
29
- * Generate a single entity's Prisma schema fragment (for modular output).
30
- */
31
- declare function generateEntityFragment(entity: EntitySpec): string;
32
- /**
33
- * Generate a single enum's Prisma schema fragment (for modular output).
34
- */
35
- declare function generateEnumFragment(enumDef: EntityEnumDef): string;
36
- //#endregion
37
- export { PrismaGeneratorOptions, composeModuleSchemas, generateEntityFragment, generateEnumFragment, generatePrismaSchema };
@@ -1,4 +0,0 @@
1
- import { EntityEnumDef, EntityEnumField, EntityField, EntityIndex, EntityRelationField, EntityScalarField, EntitySpec, ModuleSchemaContribution, PrismaFieldModifiers, PrismaScalarType, RelationType } from "./types.js";
2
- import { defineEntity, defineEntityEnum, field, index } from "./defineEntity.js";
3
- import { PrismaGeneratorOptions, composeModuleSchemas, generateEntityFragment, generateEnumFragment, generatePrismaSchema } from "./generator.js";
4
- export { EntityEnumDef, EntityEnumField, EntityField, EntityIndex, EntityRelationField, EntityScalarField, EntitySpec, ModuleSchemaContribution, PrismaFieldModifiers, PrismaGeneratorOptions, PrismaScalarType, RelationType, composeModuleSchemas, defineEntity, defineEntityEnum, field, generateEntityFragment, generateEnumFragment, generatePrismaSchema, index };
@@ -1,145 +0,0 @@
1
- import { z } from "zod";
2
-
3
- //#region src/entity/types.d.ts
4
-
5
- /**
6
- * Prisma scalar types that can be used in entity field definitions.
7
- */
8
- type PrismaScalarType = 'String' | 'Int' | 'Float' | 'Boolean' | 'DateTime' | 'Json' | 'BigInt' | 'Decimal' | 'Bytes';
9
- /**
10
- * Prisma field modifiers.
11
- */
12
- interface PrismaFieldModifiers {
13
- /** Field is optional (nullable) */
14
- isOptional?: boolean;
15
- /** Field is an array */
16
- isArray?: boolean;
17
- /** Field is unique */
18
- isUnique?: boolean;
19
- /** Field is the primary key (use @id) */
20
- isId?: boolean;
21
- /** Default value expression (e.g., 'cuid()', 'now()', 'autoincrement()') */
22
- default?: string | number | boolean;
23
- /** Field is auto-updated on record update (e.g., @updatedAt) */
24
- updatedAt?: boolean;
25
- /** Database column name override */
26
- map?: string;
27
- /** Database column type override */
28
- dbType?: string;
29
- }
30
- /**
31
- * Scalar field definition for an entity.
32
- */
33
- interface EntityScalarField extends PrismaFieldModifiers {
34
- kind: 'scalar';
35
- type: PrismaScalarType;
36
- /** Zod schema for validation */
37
- zod?: z.ZodType;
38
- /** Human-readable description (becomes Prisma /// comment) */
39
- description?: string;
40
- }
41
- /**
42
- * Enum field definition for an entity.
43
- */
44
- interface EntityEnumField extends PrismaFieldModifiers {
45
- kind: 'enum';
46
- /** Name of the enum type */
47
- enumName: string;
48
- /** Enum values (for inline enum definition) */
49
- values?: readonly string[];
50
- /** Zod schema for validation */
51
- zod?: z.ZodType;
52
- /** Human-readable description */
53
- description?: string;
54
- }
55
- /**
56
- * Relation types supported by Prisma.
57
- */
58
- type RelationType = 'hasOne' | 'hasMany' | 'belongsTo';
59
- /**
60
- * Relation field definition for an entity.
61
- */
62
- interface EntityRelationField {
63
- kind: 'relation';
64
- type: RelationType;
65
- /** Target entity name */
66
- target: string;
67
- /** Foreign key field(s) on this model (for belongsTo) */
68
- fields?: string[];
69
- /** Referenced field(s) on the target model */
70
- references?: string[];
71
- /** Relation name for disambiguation */
72
- name?: string;
73
- /** On delete action */
74
- onDelete?: 'Cascade' | 'SetNull' | 'Restrict' | 'NoAction' | 'SetDefault';
75
- /** On update action */
76
- onUpdate?: 'Cascade' | 'SetNull' | 'Restrict' | 'NoAction' | 'SetDefault';
77
- /** Human-readable description */
78
- description?: string;
79
- }
80
- /**
81
- * Union of all entity field types.
82
- */
83
- type EntityField = EntityScalarField | EntityEnumField | EntityRelationField;
84
- /**
85
- * Index definition for an entity.
86
- */
87
- interface EntityIndex {
88
- /** Fields included in the index */
89
- fields: string[];
90
- /** Index is unique constraint */
91
- unique?: boolean;
92
- /** Index name override */
93
- name?: string;
94
- /** Sort order per field */
95
- sort?: Record<string, 'Asc' | 'Desc'>;
96
- /** Index type */
97
- type?: 'BTree' | 'Hash' | 'Gist' | 'Gin';
98
- }
99
- /**
100
- * Enum definition that can be shared across entities.
101
- */
102
- interface EntityEnumDef {
103
- /** Enum name */
104
- name: string;
105
- /** Enum values */
106
- values: readonly string[];
107
- /** Postgres schema where the enum is defined */
108
- schema?: string;
109
- /** Human-readable description */
110
- description?: string;
111
- }
112
- /**
113
- * Complete entity specification for database-backed models.
114
- */
115
- interface EntitySpec<TFields extends Record<string, EntityField> = Record<string, EntityField>> {
116
- /** Entity/model name (PascalCase) */
117
- name: string;
118
- /** Human-readable description (becomes Prisma /// comment) */
119
- description?: string;
120
- /** Postgres schema name (default: 'public') */
121
- schema?: string;
122
- /** Database table name override */
123
- map?: string;
124
- /** Field definitions */
125
- fields: TFields;
126
- /** Index definitions */
127
- indexes?: EntityIndex[];
128
- /** Enum definitions used by this entity */
129
- enums?: EntityEnumDef[];
130
- /** Module/domain this entity belongs to (for schema composition) */
131
- module?: string;
132
- }
133
- /**
134
- * Module schema contribution for composition.
135
- */
136
- interface ModuleSchemaContribution {
137
- /** Module identifier (e.g., '@lssm/lib.identity-rbac') */
138
- moduleId: string;
139
- /** Entity specs provided by this module */
140
- entities: EntitySpec[];
141
- /** Shared enum definitions */
142
- enums?: EntityEnumDef[];
143
- }
144
- //#endregion
145
- export { EntityEnumDef, EntityEnumField, EntityField, EntityIndex, EntityRelationField, EntityScalarField, EntitySpec, ModuleSchemaContribution, PrismaFieldModifiers, PrismaScalarType, RelationType };
package/dist/index.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import { AnyEnumType, EnumType, defineEnum } from "./EnumType.js";
2
- import { AnyFieldType, FieldType, FieldTypeConfig, ZodFieldType } from "./FieldType.js";
3
- import { ScalarTypeEnum } from "./ScalarTypeEnum.js";
4
- import { AnySchemaModel, SchemaFieldConfig, SchemaModel, SchemaModelConfig, SchemaModelFieldsAnyConfig, TopLevelZodFromModel, ZodSchemaModel, ZodShapeFromFields, defineSchemaModel } from "./SchemaModel.js";
5
- import { EntityEnumDef, EntityEnumField, EntityField, EntityIndex, EntityRelationField, EntityScalarField, EntitySpec, ModuleSchemaContribution, PrismaFieldModifiers, PrismaScalarType, RelationType } from "./entity/types.js";
6
- import { defineEntity, defineEntityEnum, field, index } from "./entity/defineEntity.js";
7
- import { PrismaGeneratorOptions, composeModuleSchemas, generateEntityFragment, generateEnumFragment, generatePrismaSchema } from "./entity/generator.js";
8
- import "./entity/index.js";
9
- export { AnyEnumType, AnyFieldType, AnySchemaModel, EntityEnumDef, EntityEnumField, EntityField, EntityIndex, EntityRelationField, EntityScalarField, EntitySpec, EnumType, FieldType, FieldTypeConfig, ModuleSchemaContribution, PrismaFieldModifiers, PrismaGeneratorOptions, PrismaScalarType, RelationType, ScalarTypeEnum, SchemaFieldConfig, SchemaModel, SchemaModelConfig, SchemaModelFieldsAnyConfig, TopLevelZodFromModel, ZodFieldType, ZodSchemaModel, ZodShapeFromFields, composeModuleSchemas, defineEntity, defineEntityEnum, defineEnum, defineSchemaModel, field, generateEntityFragment, generateEnumFragment, generatePrismaSchema, index };