-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontract.d.ts
More file actions
273 lines (265 loc) · 9 KB
/
Copy pathcontract.d.ts
File metadata and controls
273 lines (265 loc) · 9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
// ⚠️ GENERATED FILE - DO NOT EDIT
// This file is automatically generated by 'prisma-next contract emit'.
// To regenerate, run: prisma-next contract emit
import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma-next/adapter-postgres/operation-types';
import type { CodecTypes as ParadeDbCodecTypes } from '@prisma-next/extension-paradedb/codec-types';
import type { QueryOperationTypes as ParadeDbQueryOperationTypes } from '@prisma-next/extension-paradedb/operation-types';
import type {
Bit,
Char,
CodecTypes as PgTypes,
Interval,
JsonValue,
Numeric,
Time,
Timestamp,
Timestamptz,
Timetz,
VarBit,
Varchar,
} from '@prisma-next/target-postgres/codec-types';
import type {
ContractWithTypeMaps,
TypeMaps as TypeMapsType,
} from '@prisma-next/sql-contract/types';
import type {
Contract as ContractType,
ExecutionHashBase,
NamespaceId,
ProfileHashBase,
StorageHashBase,
} from '@prisma-next/contract/types';
export type StorageHash =
StorageHashBase<'sha256:a9d70bb2a26470e9db304a036763fda7d1bc77158069e9de655e91f8126c705f'>;
export type ExecutionHash = ExecutionHashBase<string>;
export type ProfileHash =
ProfileHashBase<'sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb'>;
export type CodecTypes = PgTypes & ParadeDbCodecTypes;
export type LaneCodecTypes = CodecTypes;
export type QueryOperationTypes = PgAdapterQueryOps<CodecTypes> &
ParadeDbQueryOperationTypes<CodecTypes>;
type DefaultLiteralValue<CodecId extends string, _Encoded> = CodecId extends keyof CodecTypes
? CodecTypes[CodecId]['output']
: _Encoded;
export type FieldOutputTypes = {
readonly public: {
readonly Item: {
readonly id: CodecTypes['pg/int4@1']['output'];
readonly description: CodecTypes['pg/text@1']['output'];
readonly category: CodecTypes['pg/text@1']['output'];
readonly rating: CodecTypes['pg/int4@1']['output'];
readonly embedding: CodecTypes['paradedb/vector@1']['output'];
};
};
};
export type FieldInputTypes = {
readonly public: {
readonly Item: {
readonly id: CodecTypes['pg/int4@1']['input'];
readonly description: CodecTypes['pg/text@1']['input'];
readonly category: CodecTypes['pg/text@1']['input'];
readonly rating: CodecTypes['pg/int4@1']['input'];
readonly embedding: CodecTypes['paradedb/vector@1']['input'];
};
};
};
export type StorageColumnTypes = {
readonly public: {
readonly item: {
readonly category: CodecTypes['pg/text@1']['output'];
readonly description: CodecTypes['pg/text@1']['output'];
readonly embedding: CodecTypes['paradedb/vector@1']['output'];
readonly id: CodecTypes['pg/int4@1']['output'];
readonly rating: CodecTypes['pg/int4@1']['output'];
};
};
};
export type StorageColumnInputTypes = {
readonly public: {
readonly item: {
readonly category: CodecTypes['pg/text@1']['input'];
readonly description: CodecTypes['pg/text@1']['input'];
readonly embedding: CodecTypes['paradedb/vector@1']['input'];
readonly id: CodecTypes['pg/int4@1']['input'];
readonly rating: CodecTypes['pg/int4@1']['input'];
};
};
};
export type TypeMaps = TypeMapsType<
CodecTypes,
QueryOperationTypes,
FieldOutputTypes,
FieldInputTypes,
StorageColumnTypes,
StorageColumnInputTypes
>;
type ContractBase = Omit<
ContractType<{
readonly namespaces: {
readonly public: {
readonly id: 'public';
readonly kind: 'postgres-schema';
readonly entries: {
readonly table: {
readonly item: {
columns: {
readonly id: {
readonly nativeType: 'int4';
readonly codecId: 'pg/int4@1';
readonly nullable: false;
};
readonly description: {
readonly nativeType: 'text';
readonly codecId: 'pg/text@1';
readonly nullable: false;
};
readonly category: {
readonly nativeType: 'text';
readonly codecId: 'pg/text@1';
readonly nullable: false;
};
readonly rating: {
readonly nativeType: 'int4';
readonly codecId: 'pg/int4@1';
readonly nullable: false;
};
readonly embedding: {
readonly nativeType: 'vector';
readonly codecId: 'paradedb/vector@1';
readonly nullable: false;
readonly typeParams: { readonly dimensions: 3 };
};
};
primaryKey: { readonly columns: readonly ['id'] };
uniques: readonly [];
indexes: readonly [
{
readonly columns: readonly ['category', 'description', 'id', 'rating'];
readonly name: 'item_bm25_idx';
readonly type: 'paradedb';
readonly options: { readonly key_field: 'id' };
},
];
foreignKeys: readonly [];
};
};
};
};
};
readonly storageHash: StorageHash;
}>,
'roots' | 'domain'
> & {
readonly target: 'postgres';
readonly targetFamily: 'sql';
readonly roots: {
readonly item: { readonly namespace: 'public' & NamespaceId; readonly model: 'Item' };
};
readonly domain: {
readonly namespaces: {
readonly public: {
readonly models: {
readonly Item: {
readonly fields: {
readonly id: {
readonly nullable: false;
readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/int4@1' };
};
readonly description: {
readonly nullable: false;
readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/text@1' };
};
readonly category: {
readonly nullable: false;
readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/text@1' };
};
readonly rating: {
readonly nullable: false;
readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/int4@1' };
};
readonly embedding: {
readonly nullable: false;
readonly type: {
readonly kind: 'scalar';
readonly codecId: 'paradedb/vector@1';
readonly typeParams: { readonly dimensions: 3 };
};
};
};
readonly relations: Record<string, never>;
readonly storage: {
readonly table: 'item';
readonly namespaceId: 'public';
readonly fields: {
readonly id: { readonly column: 'id' };
readonly description: { readonly column: 'description' };
readonly category: { readonly column: 'category' };
readonly rating: { readonly column: 'rating' };
readonly embedding: { readonly column: 'embedding' };
};
};
};
};
};
};
};
readonly capabilities: {
readonly postgres: {
readonly distinctOn: true;
readonly jsonAgg: true;
readonly lateral: true;
readonly limit: true;
readonly orderBy: true;
readonly 'paradedb/bm25': true;
readonly 'paradedb/vector': true;
readonly returning: true;
};
readonly sql: {
readonly defaultInInsert: true;
readonly enums: true;
readonly lateral: true;
readonly returning: true;
readonly scalarList: true;
};
};
readonly extensionPacks: {
readonly paradedb: {
readonly capabilities: {
readonly postgres: { readonly 'paradedb/bm25': true; readonly 'paradedb/vector': true };
};
readonly familyId: 'sql';
readonly id: 'paradedb';
readonly kind: 'extension';
readonly targetId: 'postgres';
readonly types: {
readonly codecTypes: {
readonly import: {
readonly alias: 'ParadeDbCodecTypes';
readonly named: 'CodecTypes';
readonly package: '@prisma-next/extension-paradedb/codec-types';
};
};
readonly queryOperationTypes: {
readonly import: {
readonly alias: 'ParadeDbQueryOperationTypes';
readonly named: 'QueryOperationTypes';
readonly package: '@prisma-next/extension-paradedb/operation-types';
};
};
readonly storage: readonly [
{
readonly familyId: 'sql';
readonly nativeType: 'vector';
readonly targetId: 'postgres';
readonly typeId: 'paradedb/vector@1';
},
];
};
readonly version: '0.0.1';
};
};
readonly meta: {};
readonly profileHash: ProfileHash;
};
export type Contract = ContractWithTypeMaps<ContractBase, TypeMaps>;
export type Namespaces = Contract['storage']['namespaces'];