@prisma-next/sql-contract 0.3.0-dev.15 → 0.3.0-dev.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +80 -11
  3. package/dist/factories.d.mts +29 -0
  4. package/dist/factories.d.mts.map +1 -0
  5. package/dist/factories.mjs +64 -0
  6. package/dist/factories.mjs.map +1 -0
  7. package/dist/pack-types.d.mts +13 -0
  8. package/dist/pack-types.d.mts.map +1 -0
  9. package/dist/pack-types.mjs +1 -0
  10. package/dist/types-BYQMEXGG.d.mts +176 -0
  11. package/dist/types-BYQMEXGG.d.mts.map +1 -0
  12. package/dist/types-DRR5stkj.mjs +13 -0
  13. package/dist/types-DRR5stkj.mjs.map +1 -0
  14. package/dist/types.d.mts +2 -0
  15. package/dist/types.mjs +3 -0
  16. package/dist/validate.d.mts +9 -0
  17. package/dist/validate.d.mts.map +1 -0
  18. package/dist/validate.mjs +107 -0
  19. package/dist/validate.mjs.map +1 -0
  20. package/dist/validators-BjZ6lOS1.mjs +281 -0
  21. package/dist/validators-BjZ6lOS1.mjs.map +1 -0
  22. package/dist/validators.d.mts +61 -0
  23. package/dist/validators.d.mts.map +1 -0
  24. package/dist/validators.mjs +3 -0
  25. package/package.json +22 -25
  26. package/src/exports/factories.ts +1 -11
  27. package/src/exports/types.ts +24 -6
  28. package/src/exports/validate.ts +1 -0
  29. package/src/exports/validators.ts +1 -1
  30. package/src/factories.ts +29 -57
  31. package/src/index.ts +1 -0
  32. package/src/types.ts +164 -30
  33. package/src/validate.ts +227 -0
  34. package/src/validators.ts +300 -50
  35. package/dist/exports/factories.d.ts +0 -2
  36. package/dist/exports/factories.d.ts.map +0 -1
  37. package/dist/exports/factories.js +0 -83
  38. package/dist/exports/factories.js.map +0 -1
  39. package/dist/exports/pack-types.d.ts +0 -2
  40. package/dist/exports/pack-types.d.ts.map +0 -1
  41. package/dist/exports/pack-types.js +0 -1
  42. package/dist/exports/pack-types.js.map +0 -1
  43. package/dist/exports/types.d.ts +0 -2
  44. package/dist/exports/types.d.ts.map +0 -1
  45. package/dist/exports/types.js +0 -1
  46. package/dist/exports/types.js.map +0 -1
  47. package/dist/exports/validators.d.ts +0 -2
  48. package/dist/exports/validators.d.ts.map +0 -1
  49. package/dist/exports/validators.js +0 -96
  50. package/dist/exports/validators.js.map +0 -1
  51. package/dist/factories.d.ts +0 -38
  52. package/dist/factories.d.ts.map +0 -1
  53. package/dist/index.d.ts +0 -4
  54. package/dist/index.d.ts.map +0 -1
  55. package/dist/pack-types.d.ts +0 -10
  56. package/dist/pack-types.d.ts.map +0 -1
  57. package/dist/types.d.ts +0 -68
  58. package/dist/types.d.ts.map +0 -1
  59. package/dist/validators.d.ts +0 -35
  60. package/dist/validators.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,50 +1,47 @@
1
1
  {
2
2
  "name": "@prisma-next/sql-contract",
3
- "version": "0.3.0-dev.15",
3
+ "version": "0.3.0-dev.162",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "SQL contract types, validators, and IR factories for Prisma Next",
7
7
  "dependencies": {
8
8
  "arktype": "^2.1.25",
9
- "@prisma-next/contract": "0.3.0-dev.15"
9
+ "@prisma-next/contract": "0.3.0-dev.162",
10
+ "@prisma-next/framework-components": "0.3.0-dev.162"
10
11
  },
11
12
  "devDependencies": {
12
- "@vitest/coverage-v8": "4.0.16",
13
- "tsup": "8.5.1",
13
+ "tsdown": "0.18.4",
14
14
  "typescript": "5.9.3",
15
- "vitest": "4.0.16",
16
- "@prisma-next/test-utils": "0.0.1"
15
+ "vitest": "4.0.17",
16
+ "@prisma-next/test-utils": "0.0.1",
17
+ "@prisma-next/tsconfig": "0.0.0",
18
+ "@prisma-next/tsdown": "0.0.0"
17
19
  },
18
20
  "files": [
19
21
  "dist",
20
22
  "src"
21
23
  ],
22
24
  "exports": {
23
- "./types": {
24
- "types": "./dist/exports/types.d.ts",
25
- "import": "./dist/exports/types.js"
26
- },
27
- "./validators": {
28
- "types": "./dist/exports/validators.d.ts",
29
- "import": "./dist/exports/validators.js"
30
- },
31
- "./factories": {
32
- "types": "./dist/exports/factories.d.ts",
33
- "import": "./dist/exports/factories.js"
34
- },
35
- "./pack-types": {
36
- "types": "./dist/exports/pack-types.d.ts",
37
- "import": "./dist/exports/pack-types.js"
38
- }
25
+ "./factories": "./dist/factories.mjs",
26
+ "./pack-types": "./dist/pack-types.mjs",
27
+ "./types": "./dist/types.mjs",
28
+ "./validate": "./dist/validate.mjs",
29
+ "./validators": "./dist/validators.mjs",
30
+ "./package.json": "./package.json"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/prisma/prisma-next.git",
35
+ "directory": "packages/2-sql/1-core/contract"
39
36
  },
40
37
  "scripts": {
41
- "build": "tsup --config tsup.config.ts && tsc --project tsconfig.build.json",
38
+ "build": "tsdown",
42
39
  "test": "vitest run",
43
40
  "test:coverage": "vitest run --coverage",
44
- "typecheck": "tsc --project tsconfig.json --noEmit",
41
+ "typecheck": "tsc --noEmit",
45
42
  "lint": "biome check . --error-on-warnings",
46
43
  "lint:fix": "biome check --write .",
47
44
  "lint:fix:unsafe": "biome check --write --unsafe .",
48
- "clean": "node ../../../../scripts/clean.mjs"
45
+ "clean": "rm -rf dist dist-tsc dist-tsc-prod coverage .tmp-output"
49
46
  }
50
47
  }
@@ -1,11 +1 @@
1
- export {
2
- col,
3
- contract,
4
- fk,
5
- index,
6
- model,
7
- pk,
8
- storage,
9
- table,
10
- unique,
11
- } from '../factories';
1
+ export { col, fk, index, model, pk, table, unique } from '../factories';
@@ -1,17 +1,35 @@
1
1
  export type {
2
+ CodecTypesOf,
3
+ ContractWithTypeMaps,
2
4
  ExtractCodecTypes,
3
- ExtractOperationTypes,
5
+ ExtractFieldInputTypes,
6
+ ExtractFieldOutputTypes,
7
+ ExtractQueryOperationTypes,
8
+ ExtractTypeMapsFromContract,
9
+ FieldInputTypesOf,
10
+ FieldOutputTypesOf,
4
11
  ForeignKey,
12
+ ForeignKeyOptions,
5
13
  ForeignKeyReferences,
6
14
  Index,
7
- ModelDefinition,
8
- ModelField,
9
- ModelStorage,
15
+ OperationTypesOf,
10
16
  PrimaryKey,
11
- SqlContract,
12
- SqlMappings,
17
+ QueryOperationTypeEntry,
18
+ QueryOperationTypesBase,
19
+ QueryOperationTypesOf,
20
+ ReferentialAction,
21
+ ResolveCodecTypes,
22
+ ResolveOperationTypes,
23
+ SqlModelFieldStorage,
24
+ SqlModelStorage,
25
+ SqlQueryOperationTypes,
13
26
  SqlStorage,
14
27
  StorageColumn,
15
28
  StorageTable,
29
+ StorageTypeInstance,
30
+ TypeMaps,
31
+ TypeMapsPhantomKey,
16
32
  UniqueConstraint,
17
33
  } from '../types';
34
+
35
+ export { applyFkDefaults, DEFAULT_FK_CONSTRAINT, DEFAULT_FK_INDEX } from '../types';
@@ -0,0 +1 @@
1
+ export { validateContract } from '../validate';
@@ -1 +1 @@
1
- export { validateModel, validateSqlContract, validateStorage } from '../validators';
1
+ export * from '../validators';
package/src/factories.ts CHANGED
@@ -1,27 +1,18 @@
1
+ import type { ScalarFieldType } from '@prisma-next/contract/types';
1
2
  import type {
2
3
  ForeignKey,
4
+ ForeignKeyOptions,
3
5
  ForeignKeyReferences,
4
6
  Index,
5
- ModelDefinition,
6
- ModelField,
7
- ModelStorage,
8
7
  PrimaryKey,
9
- SqlContract,
10
- SqlMappings,
11
- SqlStorage,
8
+ SqlModelFieldStorage,
9
+ SqlModelStorage,
12
10
  StorageColumn,
13
11
  StorageTable,
14
12
  UniqueConstraint,
15
13
  } from './types';
14
+ import { applyFkDefaults } from './types';
16
15
 
17
- /**
18
- * Creates a StorageColumn with nativeType and codecId.
19
- *
20
- * @param nativeType - Native database type identifier (e.g., 'int4', 'text', 'vector')
21
- * @param codecId - Codec identifier (e.g., 'pg/int4@1', 'pg/text@1')
22
- * @param nullable - Whether the column is nullable (default: false)
23
- * @returns StorageColumn with nativeType and codecId
24
- */
25
16
  export function col(nativeType: string, codecId: string, nullable = false): StorageColumn {
26
17
  return {
27
18
  nativeType,
@@ -52,16 +43,20 @@ export function fk(
52
43
  columns: readonly string[],
53
44
  refTable: string,
54
45
  refColumns: readonly string[],
55
- name?: string,
46
+ opts?: ForeignKeyOptions & { constraint?: boolean; index?: boolean },
56
47
  ): ForeignKey {
57
48
  const references: ForeignKeyReferences = {
58
49
  table: refTable,
59
50
  columns: refColumns,
60
51
  };
52
+
61
53
  return {
62
54
  columns,
63
55
  references,
64
- ...(name !== undefined && { name }),
56
+ ...(opts?.name !== undefined && { name: opts.name }),
57
+ ...(opts?.onDelete !== undefined && { onDelete: opts.onDelete }),
58
+ ...(opts?.onUpdate !== undefined && { onUpdate: opts.onUpdate }),
59
+ ...applyFkDefaults({ constraint: opts?.constraint, index: opts?.index }),
65
60
  };
66
61
  }
67
62
 
@@ -84,50 +79,27 @@ export function table(
84
79
  }
85
80
 
86
81
  export function model(
87
- table: string,
88
- fields: Record<string, ModelField>,
82
+ tableName: string,
83
+ fields: Record<string, SqlModelFieldStorage>,
89
84
  relations: Record<string, unknown> = {},
90
- ): ModelDefinition {
91
- const storage: ModelStorage = { table };
85
+ ): {
86
+ storage: SqlModelStorage;
87
+ fields: Record<string, { readonly nullable: boolean; readonly type: ScalarFieldType }>;
88
+ relations: Record<string, unknown>;
89
+ } {
90
+ const storage: SqlModelStorage = { table: tableName, fields };
91
+ const domainFields = Object.fromEntries(
92
+ Object.entries(fields).map(([name, field]) => [
93
+ name,
94
+ {
95
+ nullable: field.nullable ?? false,
96
+ type: { kind: 'scalar' as const, codecId: field.codecId ?? 'core/unknown@1' },
97
+ },
98
+ ]),
99
+ ) as Record<string, { nullable: boolean; type: ScalarFieldType }>;
92
100
  return {
93
101
  storage,
94
- fields,
102
+ fields: domainFields,
95
103
  relations,
96
104
  };
97
105
  }
98
-
99
- export function storage(tables: Record<string, StorageTable>): SqlStorage {
100
- return { tables };
101
- }
102
-
103
- export function contract(opts: {
104
- target: string;
105
- coreHash: string;
106
- storage: SqlStorage;
107
- models?: Record<string, ModelDefinition>;
108
- relations?: Record<string, unknown>;
109
- mappings?: Partial<SqlMappings>;
110
- schemaVersion?: '1';
111
- targetFamily?: 'sql';
112
- profileHash?: string;
113
- capabilities?: Record<string, Record<string, boolean>>;
114
- extensionPacks?: Record<string, unknown>;
115
- meta?: Record<string, unknown>;
116
- sources?: Record<string, unknown>;
117
- }): SqlContract {
118
- return {
119
- schemaVersion: opts.schemaVersion ?? '1',
120
- target: opts.target,
121
- targetFamily: opts.targetFamily ?? 'sql',
122
- coreHash: opts.coreHash,
123
- storage: opts.storage,
124
- models: opts.models ?? {},
125
- relations: opts.relations ?? {},
126
- mappings: (opts.mappings ?? {}) as SqlMappings,
127
- ...(opts.profileHash !== undefined && { profileHash: opts.profileHash }),
128
- ...(opts.capabilities !== undefined && { capabilities: opts.capabilities }),
129
- ...(opts.extensionPacks !== undefined && { extensionPacks: opts.extensionPacks }),
130
- ...(opts.meta !== undefined && { meta: opts.meta }),
131
- ...(opts.sources !== undefined && { sources: opts.sources as Record<string, unknown> }),
132
- } as SqlContract;
133
- }
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './exports/factories';
2
2
  export * from './exports/types';
3
+ export * from './exports/validate';
3
4
  export * from './exports/validators';
package/src/types.ts CHANGED
@@ -1,9 +1,32 @@
1
- import type { ContractBase } from '@prisma-next/contract/types';
1
+ import type { ColumnDefault, StorageBase } from '@prisma-next/contract/types';
2
2
 
3
+ /**
4
+ * A column definition in storage.
5
+ *
6
+ * `typeParams` is optional because most columns use non-parameterized types.
7
+ * Columns with parameterized types can either inline `typeParams` or reference
8
+ * a named {@link StorageTypeInstance} via `typeRef`.
9
+ */
3
10
  export type StorageColumn = {
4
11
  readonly nativeType: string;
5
12
  readonly codecId: string;
6
13
  readonly nullable: boolean;
14
+ /**
15
+ * Opaque, codec-owned JS/type parameters.
16
+ * The codec that owns `codecId` defines the shape and semantics.
17
+ * Mutually exclusive with `typeRef`.
18
+ */
19
+ readonly typeParams?: Record<string, unknown>;
20
+ /**
21
+ * Reference to a named type instance in `storage.types`.
22
+ * Mutually exclusive with `typeParams`.
23
+ */
24
+ readonly typeRef?: string;
25
+ /**
26
+ * Default value for the column.
27
+ * Can be a literal value or database function.
28
+ */
29
+ readonly default?: ColumnDefault;
7
30
  };
8
31
 
9
32
  export type PrimaryKey = {
@@ -19,6 +42,16 @@ export type UniqueConstraint = {
19
42
  export type Index = {
20
43
  readonly columns: readonly string[];
21
44
  readonly name?: string;
45
+ /**
46
+ * Optional access method identifier.
47
+ * Extension-specific methods are represented as strings and interpreted
48
+ * by the owning extension package.
49
+ */
50
+ readonly using?: string;
51
+ /**
52
+ * Optional extension-owned index configuration payload.
53
+ */
54
+ readonly config?: Record<string, unknown>;
22
55
  };
23
56
 
24
57
  export type ForeignKeyReferences = {
@@ -26,10 +59,24 @@ export type ForeignKeyReferences = {
26
59
  readonly columns: readonly string[];
27
60
  };
28
61
 
62
+ export type ReferentialAction = 'noAction' | 'restrict' | 'cascade' | 'setNull' | 'setDefault';
63
+
64
+ export type ForeignKeyOptions = {
65
+ readonly name?: string;
66
+ readonly onDelete?: ReferentialAction;
67
+ readonly onUpdate?: ReferentialAction;
68
+ };
69
+
29
70
  export type ForeignKey = {
30
71
  readonly columns: readonly string[];
31
72
  readonly references: ForeignKeyReferences;
32
73
  readonly name?: string;
74
+ readonly onDelete?: ReferentialAction;
75
+ readonly onUpdate?: ReferentialAction;
76
+ /** Whether to emit FK constraint DDL (ALTER TABLE … ADD CONSTRAINT … FOREIGN KEY). */
77
+ readonly constraint: boolean;
78
+ /** Whether to emit a backing index for the FK columns. */
79
+ readonly index: boolean;
33
80
  };
34
81
 
35
82
  export type StorageTable = {
@@ -40,48 +87,135 @@ export type StorageTable = {
40
87
  readonly foreignKeys: ReadonlyArray<ForeignKey>;
41
88
  };
42
89
 
43
- export type SqlStorage = {
90
+ /**
91
+ * A named, parameterized type instance.
92
+ * These are registered in `storage.types` for reuse across columns
93
+ * and to enable ergonomic schema surfaces like `schema.types.MyType`.
94
+ *
95
+ * Unlike {@link StorageColumn}, `typeParams` is required here because
96
+ * `StorageTypeInstance` exists specifically to define reusable parameterized types.
97
+ * A type instance without parameters would be redundant—columns can reference
98
+ * the codec directly via `codecId`.
99
+ */
100
+ export type StorageTypeInstance = {
101
+ readonly codecId: string;
102
+ readonly nativeType: string;
103
+ readonly typeParams: Record<string, unknown>;
104
+ };
105
+
106
+ export type SqlStorage<THash extends string = string> = StorageBase<THash> & {
44
107
  readonly tables: Record<string, StorageTable>;
108
+ /**
109
+ * Named type instances for parameterized/custom types.
110
+ * Columns can reference these via `typeRef`.
111
+ */
112
+ readonly types?: Record<string, StorageTypeInstance>;
45
113
  };
46
114
 
47
- export type ModelField = {
115
+ export type SqlModelFieldStorage = {
48
116
  readonly column: string;
117
+ readonly codecId?: string;
118
+ readonly nullable?: boolean;
49
119
  };
50
120
 
51
- export type ModelStorage = {
121
+ export type SqlModelStorage = {
52
122
  readonly table: string;
123
+ readonly fields: Record<string, SqlModelFieldStorage>;
53
124
  };
54
125
 
55
- export type ModelDefinition = {
56
- readonly storage: ModelStorage;
57
- readonly fields: Record<string, ModelField>;
58
- readonly relations: Record<string, unknown>;
126
+ export const DEFAULT_FK_CONSTRAINT = true;
127
+ export const DEFAULT_FK_INDEX = true;
128
+
129
+ export function applyFkDefaults(
130
+ fk: { constraint?: boolean | undefined; index?: boolean | undefined },
131
+ overrideDefaults?: { constraint?: boolean | undefined; index?: boolean | undefined },
132
+ ): { constraint: boolean; index: boolean } {
133
+ return {
134
+ constraint: fk.constraint ?? overrideDefaults?.constraint ?? DEFAULT_FK_CONSTRAINT,
135
+ index: fk.index ?? overrideDefaults?.index ?? DEFAULT_FK_INDEX,
136
+ };
137
+ }
138
+
139
+ export type TypeMaps<
140
+ TCodecTypes extends Record<string, { output: unknown }> = Record<string, never>,
141
+ TOperationTypes extends Record<string, unknown> = Record<string, never>,
142
+ TQueryOperationTypes extends Record<string, unknown> = Record<string, never>,
143
+ TFieldOutputTypes extends Record<string, Record<string, unknown>> = Record<string, never>,
144
+ TFieldInputTypes extends Record<string, Record<string, unknown>> = Record<string, never>,
145
+ > = {
146
+ readonly codecTypes: TCodecTypes;
147
+ readonly operationTypes: TOperationTypes;
148
+ readonly queryOperationTypes: TQueryOperationTypes;
149
+ readonly fieldOutputTypes: TFieldOutputTypes;
150
+ readonly fieldInputTypes: TFieldInputTypes;
59
151
  };
60
152
 
61
- export type SqlMappings = {
62
- readonly modelToTable?: Record<string, string>;
63
- readonly tableToModel?: Record<string, string>;
64
- readonly fieldToColumn?: Record<string, Record<string, string>>;
65
- readonly columnToField?: Record<string, Record<string, string>>;
66
- readonly codecTypes: Record<string, { readonly output: unknown }>;
67
- readonly operationTypes: Record<string, Record<string, unknown>>;
153
+ export type CodecTypesOf<T> = [T] extends [never]
154
+ ? Record<string, never>
155
+ : T extends { readonly codecTypes: infer C }
156
+ ? C extends Record<string, { output: unknown }>
157
+ ? C
158
+ : Record<string, never>
159
+ : Record<string, never>;
160
+
161
+ export type OperationTypesOf<T> = [T] extends [never]
162
+ ? Record<string, never>
163
+ : T extends { readonly operationTypes: infer O }
164
+ ? O extends Record<string, unknown>
165
+ ? O
166
+ : Record<string, never>
167
+ : Record<string, never>;
168
+
169
+ export type QueryOperationTypeEntry = {
170
+ readonly args: readonly { readonly codecId: string; readonly nullable: boolean }[];
171
+ readonly returns: { readonly codecId: string; readonly nullable: boolean };
68
172
  };
69
173
 
70
- export type SqlContract<
71
- S extends SqlStorage = SqlStorage,
72
- M extends Record<string, unknown> = Record<string, unknown>,
73
- R extends Record<string, unknown> = Record<string, unknown>,
74
- Map extends SqlMappings = SqlMappings,
75
- > = ContractBase & {
76
- readonly targetFamily: string;
77
- readonly storage: S;
78
- readonly models: M;
79
- readonly relations: R;
80
- readonly mappings: Map;
174
+ export type SqlQueryOperationTypes<T extends Record<string, QueryOperationTypeEntry>> = T;
175
+
176
+ export type QueryOperationTypesBase = Record<string, QueryOperationTypeEntry>;
177
+
178
+ export type QueryOperationTypesOf<T> = [T] extends [never]
179
+ ? Record<string, never>
180
+ : T extends { readonly queryOperationTypes: infer Q }
181
+ ? Q extends Record<string, unknown>
182
+ ? Q
183
+ : Record<string, never>
184
+ : Record<string, never>;
185
+
186
+ export type TypeMapsPhantomKey = '__@prisma-next/sql-contract/typeMaps@__';
187
+
188
+ export type ContractWithTypeMaps<TContract, TTypeMaps> = TContract & {
189
+ readonly [K in TypeMapsPhantomKey]?: TTypeMaps;
81
190
  };
82
191
 
83
- export type ExtractCodecTypes<TContract extends SqlContract<SqlStorage>> =
84
- TContract['mappings']['codecTypes'];
192
+ export type ExtractTypeMapsFromContract<T> = TypeMapsPhantomKey extends keyof T
193
+ ? NonNullable<T[TypeMapsPhantomKey & keyof T]>
194
+ : never;
195
+
196
+ export type FieldOutputTypesOf<T> = [T] extends [never]
197
+ ? Record<string, never>
198
+ : T extends { readonly fieldOutputTypes: infer F }
199
+ ? F extends Record<string, Record<string, unknown>>
200
+ ? F
201
+ : Record<string, never>
202
+ : Record<string, never>;
203
+
204
+ export type FieldInputTypesOf<T> = [T] extends [never]
205
+ ? Record<string, never>
206
+ : T extends { readonly fieldInputTypes: infer F }
207
+ ? F extends Record<string, Record<string, unknown>>
208
+ ? F
209
+ : Record<string, never>
210
+ : Record<string, never>;
211
+
212
+ export type ExtractCodecTypes<T> = CodecTypesOf<ExtractTypeMapsFromContract<T>>;
213
+ export type ExtractQueryOperationTypes<T> = QueryOperationTypesOf<ExtractTypeMapsFromContract<T>>;
214
+ export type ExtractFieldOutputTypes<T> = FieldOutputTypesOf<ExtractTypeMapsFromContract<T>>;
215
+ export type ExtractFieldInputTypes<T> = FieldInputTypesOf<ExtractTypeMapsFromContract<T>>;
216
+
217
+ export type ResolveCodecTypes<TContract, TTypeMaps> = [TTypeMaps] extends [never]
218
+ ? ExtractCodecTypes<TContract>
219
+ : CodecTypesOf<TTypeMaps>;
85
220
 
86
- export type ExtractOperationTypes<TContract extends SqlContract<SqlStorage>> =
87
- TContract['mappings']['operationTypes'];
221
+ export type ResolveOperationTypes<_TContract, TTypeMaps> = OperationTypesOf<TTypeMaps>;