@memberjunction/ai-vector-sync 2.4.0 → 2.5.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/dist/config.d.ts +13 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +21 -0
- package/dist/config.js.map +1 -0
- package/dist/db/db.d.ts +4 -0
- package/dist/db/db.d.ts.map +1 -0
- package/dist/db/db.js +40 -0
- package/dist/db/db.js.map +1 -0
- package/dist/db/dbAI.d.ts +4 -0
- package/dist/db/dbAI.d.ts.map +1 -0
- package/dist/db/dbAI.js +18 -0
- package/dist/db/dbAI.js.map +1 -0
- package/dist/generic/EntityDocumenTemplateParserBase.d.ts +14 -0
- package/dist/generic/EntityDocumenTemplateParserBase.d.ts.map +1 -0
- package/dist/generic/EntityDocumenTemplateParserBase.js +76 -0
- package/dist/generic/EntityDocumenTemplateParserBase.js.map +1 -0
- package/dist/generic/EntityDocumentTemplateParser.d.ts +7 -0
- package/dist/generic/EntityDocumentTemplateParser.d.ts.map +1 -0
- package/dist/generic/EntityDocumentTemplateParser.js +74 -0
- package/dist/generic/EntityDocumentTemplateParser.js.map +1 -0
- package/dist/generic/entitySyncConfig.types.d.ts +11 -0
- package/dist/generic/entitySyncConfig.types.d.ts.map +1 -0
- package/dist/generic/entitySyncConfig.types.js +3 -0
- package/dist/generic/entitySyncConfig.types.js.map +1 -0
- package/dist/generic/vectorSync.types.d.ts +61 -0
- package/dist/generic/vectorSync.types.d.ts.map +1 -0
- package/dist/generic/vectorSync.types.js +3 -0
- package/dist/generic/vectorSync.types.js.map +1 -0
- package/dist/index.d.ts +5 -2014
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -4
- package/dist/index.js.map +1 -1
- package/dist/models/BatchWorker.d.ts +34 -0
- package/dist/models/BatchWorker.d.ts.map +1 -0
- package/dist/models/BatchWorker.js +77 -0
- package/dist/models/BatchWorker.js.map +1 -0
- package/dist/models/EntityDocumentCache.d.ts +27 -0
- package/dist/models/EntityDocumentCache.d.ts.map +1 -0
- package/dist/models/EntityDocumentCache.js +118 -0
- package/dist/models/EntityDocumentCache.js.map +1 -0
- package/dist/models/PagedRecords.d.ts +9 -0
- package/dist/models/PagedRecords.d.ts.map +1 -0
- package/dist/models/PagedRecords.js +19 -0
- package/dist/models/PagedRecords.js.map +1 -0
- package/dist/models/entityVectorSync.d.ts +28 -0
- package/dist/models/entityVectorSync.d.ts.map +1 -0
- package/dist/models/entityVectorSync.js +486 -0
- package/dist/models/entityVectorSync.js.map +1 -0
- package/dist/models/workers/UpsertVectors.d.ts +2 -0
- package/dist/models/workers/UpsertVectors.d.ts.map +1 -0
- package/dist/models/workers/UpsertVectors.js +48 -0
- package/dist/models/workers/UpsertVectors.js.map +1 -0
- package/dist/models/workers/VectorizeTemplates.d.ts +2 -0
- package/dist/models/workers/VectorizeTemplates.d.ts.map +1 -0
- package/dist/models/workers/VectorizeTemplates.js +88 -0
- package/dist/models/workers/VectorizeTemplates.js.map +1 -0
- package/dist/models/workers/upserter.d.ts +2 -0
- package/dist/models/workers/upserter.d.ts.map +1 -0
- package/dist/models/workers/upserter.js +11 -0
- package/dist/models/workers/upserter.js.map +1 -0
- package/package.json +14 -14
package/dist/index.d.ts
CHANGED
|
@@ -1,2014 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
8
|
-
|
|
9
|
-
declare namespace util {
|
|
10
|
-
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
|
|
11
|
-
export type isAny<T> = 0 extends 1 & T ? true : false;
|
|
12
|
-
export const assertEqual: <A, B>(val: AssertEqual<A, B>) => AssertEqual<A, B>;
|
|
13
|
-
export function assertIs<T>(_arg: T): void;
|
|
14
|
-
export function assertNever(_x: never): never;
|
|
15
|
-
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
16
|
-
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
|
17
|
-
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
18
|
-
export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
|
|
19
|
-
export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k; };
|
|
20
|
-
export const getValidEnumValues: (obj: any) => any[];
|
|
21
|
-
export const objectValues: (obj: any) => any[];
|
|
22
|
-
export const objectKeys: ObjectConstructor["keys"];
|
|
23
|
-
export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;
|
|
24
|
-
export type identity<T> = objectUtil.identity<T>;
|
|
25
|
-
export type flatten<T> = objectUtil.flatten<T>;
|
|
26
|
-
export type noUndefined<T> = T extends undefined ? never : T;
|
|
27
|
-
export const isInteger: NumberConstructor["isInteger"];
|
|
28
|
-
export function joinValues<T extends any[]>(array: T, separator?: string): string;
|
|
29
|
-
export const jsonStringifyReplacer: (_: string, value: any) => any;
|
|
30
|
-
export { };
|
|
31
|
-
}
|
|
32
|
-
declare namespace objectUtil {
|
|
33
|
-
export type MergeShapes<U, V> = {
|
|
34
|
-
[k in Exclude<keyof U, keyof V>]: U[k];
|
|
35
|
-
} & V;
|
|
36
|
-
type optionalKeys<T extends object> = {
|
|
37
|
-
[k in keyof T]: undefined extends T[k] ? k : never;
|
|
38
|
-
}[keyof T];
|
|
39
|
-
type requiredKeys<T extends object> = {
|
|
40
|
-
[k in keyof T]: undefined extends T[k] ? never : k;
|
|
41
|
-
}[keyof T];
|
|
42
|
-
export type addQuestionMarks<T extends object, _O = any> = {
|
|
43
|
-
[K in requiredKeys<T>]: T[K];
|
|
44
|
-
} & {
|
|
45
|
-
[K in optionalKeys<T>]?: T[K];
|
|
46
|
-
} & {
|
|
47
|
-
[k in keyof T]?: unknown;
|
|
48
|
-
};
|
|
49
|
-
export type identity<T> = T;
|
|
50
|
-
export type flatten<T> = identity<{
|
|
51
|
-
[k in keyof T]: T[k];
|
|
52
|
-
}>;
|
|
53
|
-
export type noNeverKeys<T> = {
|
|
54
|
-
[k in keyof T]: [T[k]] extends [never] ? never : k;
|
|
55
|
-
}[keyof T];
|
|
56
|
-
export type noNever<T> = identity<{
|
|
57
|
-
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
|
|
58
|
-
}>;
|
|
59
|
-
export const mergeShapes: <U, T>(first: U, second: T) => T & U;
|
|
60
|
-
export type extendShape<A extends object, B extends object> = {
|
|
61
|
-
[K in keyof A as K extends keyof B ? never : K]: A[K];
|
|
62
|
-
} & {
|
|
63
|
-
[K in keyof B]: B[K];
|
|
64
|
-
};
|
|
65
|
-
export { };
|
|
66
|
-
}
|
|
67
|
-
declare const ZodParsedType: {
|
|
68
|
-
function: "function";
|
|
69
|
-
number: "number";
|
|
70
|
-
string: "string";
|
|
71
|
-
nan: "nan";
|
|
72
|
-
integer: "integer";
|
|
73
|
-
float: "float";
|
|
74
|
-
boolean: "boolean";
|
|
75
|
-
date: "date";
|
|
76
|
-
bigint: "bigint";
|
|
77
|
-
symbol: "symbol";
|
|
78
|
-
undefined: "undefined";
|
|
79
|
-
null: "null";
|
|
80
|
-
array: "array";
|
|
81
|
-
object: "object";
|
|
82
|
-
unknown: "unknown";
|
|
83
|
-
promise: "promise";
|
|
84
|
-
void: "void";
|
|
85
|
-
never: "never";
|
|
86
|
-
map: "map";
|
|
87
|
-
set: "set";
|
|
88
|
-
};
|
|
89
|
-
declare type ZodParsedType = keyof typeof ZodParsedType;
|
|
90
|
-
|
|
91
|
-
declare type allKeys<T> = T extends any ? keyof T : never;
|
|
92
|
-
declare type typeToFlattenedError<T, U = string> = {
|
|
93
|
-
formErrors: U[];
|
|
94
|
-
fieldErrors: {
|
|
95
|
-
[P in allKeys<T>]?: U[];
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
declare const ZodIssueCode: {
|
|
99
|
-
invalid_type: "invalid_type";
|
|
100
|
-
invalid_literal: "invalid_literal";
|
|
101
|
-
custom: "custom";
|
|
102
|
-
invalid_union: "invalid_union";
|
|
103
|
-
invalid_union_discriminator: "invalid_union_discriminator";
|
|
104
|
-
invalid_enum_value: "invalid_enum_value";
|
|
105
|
-
unrecognized_keys: "unrecognized_keys";
|
|
106
|
-
invalid_arguments: "invalid_arguments";
|
|
107
|
-
invalid_return_type: "invalid_return_type";
|
|
108
|
-
invalid_date: "invalid_date";
|
|
109
|
-
invalid_string: "invalid_string";
|
|
110
|
-
too_small: "too_small";
|
|
111
|
-
too_big: "too_big";
|
|
112
|
-
invalid_intersection_types: "invalid_intersection_types";
|
|
113
|
-
not_multiple_of: "not_multiple_of";
|
|
114
|
-
not_finite: "not_finite";
|
|
115
|
-
};
|
|
116
|
-
declare type ZodIssueCode = keyof typeof ZodIssueCode;
|
|
117
|
-
declare type ZodIssueBase = {
|
|
118
|
-
path: (string | number)[];
|
|
119
|
-
message?: string;
|
|
120
|
-
};
|
|
121
|
-
interface ZodInvalidTypeIssue extends ZodIssueBase {
|
|
122
|
-
code: typeof ZodIssueCode.invalid_type;
|
|
123
|
-
expected: ZodParsedType;
|
|
124
|
-
received: ZodParsedType;
|
|
125
|
-
}
|
|
126
|
-
interface ZodInvalidLiteralIssue extends ZodIssueBase {
|
|
127
|
-
code: typeof ZodIssueCode.invalid_literal;
|
|
128
|
-
expected: unknown;
|
|
129
|
-
received: unknown;
|
|
130
|
-
}
|
|
131
|
-
interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
|
|
132
|
-
code: typeof ZodIssueCode.unrecognized_keys;
|
|
133
|
-
keys: string[];
|
|
134
|
-
}
|
|
135
|
-
interface ZodInvalidUnionIssue extends ZodIssueBase {
|
|
136
|
-
code: typeof ZodIssueCode.invalid_union;
|
|
137
|
-
unionErrors: ZodError[];
|
|
138
|
-
}
|
|
139
|
-
interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
|
|
140
|
-
code: typeof ZodIssueCode.invalid_union_discriminator;
|
|
141
|
-
options: Primitive[];
|
|
142
|
-
}
|
|
143
|
-
interface ZodInvalidEnumValueIssue extends ZodIssueBase {
|
|
144
|
-
received: string | number;
|
|
145
|
-
code: typeof ZodIssueCode.invalid_enum_value;
|
|
146
|
-
options: (string | number)[];
|
|
147
|
-
}
|
|
148
|
-
interface ZodInvalidArgumentsIssue extends ZodIssueBase {
|
|
149
|
-
code: typeof ZodIssueCode.invalid_arguments;
|
|
150
|
-
argumentsError: ZodError;
|
|
151
|
-
}
|
|
152
|
-
interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
|
|
153
|
-
code: typeof ZodIssueCode.invalid_return_type;
|
|
154
|
-
returnTypeError: ZodError;
|
|
155
|
-
}
|
|
156
|
-
interface ZodInvalidDateIssue extends ZodIssueBase {
|
|
157
|
-
code: typeof ZodIssueCode.invalid_date;
|
|
158
|
-
}
|
|
159
|
-
declare type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "base64" | {
|
|
160
|
-
includes: string;
|
|
161
|
-
position?: number;
|
|
162
|
-
} | {
|
|
163
|
-
startsWith: string;
|
|
164
|
-
} | {
|
|
165
|
-
endsWith: string;
|
|
166
|
-
};
|
|
167
|
-
interface ZodInvalidStringIssue extends ZodIssueBase {
|
|
168
|
-
code: typeof ZodIssueCode.invalid_string;
|
|
169
|
-
validation: StringValidation;
|
|
170
|
-
}
|
|
171
|
-
interface ZodTooSmallIssue extends ZodIssueBase {
|
|
172
|
-
code: typeof ZodIssueCode.too_small;
|
|
173
|
-
minimum: number | bigint;
|
|
174
|
-
inclusive: boolean;
|
|
175
|
-
exact?: boolean;
|
|
176
|
-
type: "array" | "string" | "number" | "set" | "date" | "bigint";
|
|
177
|
-
}
|
|
178
|
-
interface ZodTooBigIssue extends ZodIssueBase {
|
|
179
|
-
code: typeof ZodIssueCode.too_big;
|
|
180
|
-
maximum: number | bigint;
|
|
181
|
-
inclusive: boolean;
|
|
182
|
-
exact?: boolean;
|
|
183
|
-
type: "array" | "string" | "number" | "set" | "date" | "bigint";
|
|
184
|
-
}
|
|
185
|
-
interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
|
|
186
|
-
code: typeof ZodIssueCode.invalid_intersection_types;
|
|
187
|
-
}
|
|
188
|
-
interface ZodNotMultipleOfIssue extends ZodIssueBase {
|
|
189
|
-
code: typeof ZodIssueCode.not_multiple_of;
|
|
190
|
-
multipleOf: number | bigint;
|
|
191
|
-
}
|
|
192
|
-
interface ZodNotFiniteIssue extends ZodIssueBase {
|
|
193
|
-
code: typeof ZodIssueCode.not_finite;
|
|
194
|
-
}
|
|
195
|
-
interface ZodCustomIssue extends ZodIssueBase {
|
|
196
|
-
code: typeof ZodIssueCode.custom;
|
|
197
|
-
params?: {
|
|
198
|
-
[k: string]: any;
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
declare type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue;
|
|
202
|
-
declare type ZodIssue = ZodIssueOptionalMessage & {
|
|
203
|
-
fatal?: boolean;
|
|
204
|
-
message: string;
|
|
205
|
-
};
|
|
206
|
-
declare type recursiveZodFormattedError<T> = T extends [any, ...any[]] ? {
|
|
207
|
-
[K in keyof T]?: ZodFormattedError<T[K]>;
|
|
208
|
-
} : T extends any[] ? {
|
|
209
|
-
[k: number]: ZodFormattedError<T[number]>;
|
|
210
|
-
} : T extends object ? {
|
|
211
|
-
[K in keyof T]?: ZodFormattedError<T[K]>;
|
|
212
|
-
} : unknown;
|
|
213
|
-
declare type ZodFormattedError<T, U = string> = {
|
|
214
|
-
_errors: U[];
|
|
215
|
-
} & recursiveZodFormattedError<NonNullable<T>>;
|
|
216
|
-
declare class ZodError<T = any> extends Error {
|
|
217
|
-
issues: ZodIssue[];
|
|
218
|
-
get errors(): ZodIssue[];
|
|
219
|
-
constructor(issues: ZodIssue[]);
|
|
220
|
-
format(): ZodFormattedError<T>;
|
|
221
|
-
format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>;
|
|
222
|
-
static create: (issues: ZodIssue[]) => ZodError<any>;
|
|
223
|
-
static assert(value: unknown): asserts value is ZodError;
|
|
224
|
-
toString(): string;
|
|
225
|
-
get message(): string;
|
|
226
|
-
get isEmpty(): boolean;
|
|
227
|
-
addIssue: (sub: ZodIssue) => void;
|
|
228
|
-
addIssues: (subs?: ZodIssue[]) => void;
|
|
229
|
-
flatten(): typeToFlattenedError<T>;
|
|
230
|
-
flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>;
|
|
231
|
-
get formErrors(): typeToFlattenedError<T, string>;
|
|
232
|
-
}
|
|
233
|
-
declare type stripPath<T extends object> = T extends any ? util.OmitKeys<T, "path"> : never;
|
|
234
|
-
declare type IssueData = stripPath<ZodIssueOptionalMessage> & {
|
|
235
|
-
path?: (string | number)[];
|
|
236
|
-
fatal?: boolean;
|
|
237
|
-
};
|
|
238
|
-
declare type ErrorMapCtx = {
|
|
239
|
-
defaultError: string;
|
|
240
|
-
data: any;
|
|
241
|
-
};
|
|
242
|
-
declare type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => {
|
|
243
|
-
message: string;
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
declare type ParseParams = {
|
|
247
|
-
path: (string | number)[];
|
|
248
|
-
errorMap: ZodErrorMap;
|
|
249
|
-
async: boolean;
|
|
250
|
-
};
|
|
251
|
-
declare type ParsePathComponent = string | number;
|
|
252
|
-
declare type ParsePath = ParsePathComponent[];
|
|
253
|
-
interface ParseContext {
|
|
254
|
-
readonly common: {
|
|
255
|
-
readonly issues: ZodIssue[];
|
|
256
|
-
readonly contextualErrorMap?: ZodErrorMap;
|
|
257
|
-
readonly async: boolean;
|
|
258
|
-
};
|
|
259
|
-
readonly path: ParsePath;
|
|
260
|
-
readonly schemaErrorMap?: ZodErrorMap;
|
|
261
|
-
readonly parent: ParseContext | null;
|
|
262
|
-
readonly data: any;
|
|
263
|
-
readonly parsedType: ZodParsedType;
|
|
264
|
-
}
|
|
265
|
-
declare type ParseInput = {
|
|
266
|
-
data: any;
|
|
267
|
-
path: (string | number)[];
|
|
268
|
-
parent: ParseContext;
|
|
269
|
-
};
|
|
270
|
-
declare class ParseStatus {
|
|
271
|
-
value: "aborted" | "dirty" | "valid";
|
|
272
|
-
dirty(): void;
|
|
273
|
-
abort(): void;
|
|
274
|
-
static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType;
|
|
275
|
-
static mergeObjectAsync(status: ParseStatus, pairs: {
|
|
276
|
-
key: ParseReturnType<any>;
|
|
277
|
-
value: ParseReturnType<any>;
|
|
278
|
-
}[]): Promise<SyncParseReturnType<any>>;
|
|
279
|
-
static mergeObjectSync(status: ParseStatus, pairs: {
|
|
280
|
-
key: SyncParseReturnType<any>;
|
|
281
|
-
value: SyncParseReturnType<any>;
|
|
282
|
-
alwaysSet?: boolean;
|
|
283
|
-
}[]): SyncParseReturnType;
|
|
284
|
-
}
|
|
285
|
-
declare type INVALID = {
|
|
286
|
-
status: "aborted";
|
|
287
|
-
};
|
|
288
|
-
declare const INVALID: INVALID;
|
|
289
|
-
declare type DIRTY<T> = {
|
|
290
|
-
status: "dirty";
|
|
291
|
-
value: T;
|
|
292
|
-
};
|
|
293
|
-
declare const DIRTY: <T>(value: T) => DIRTY<T>;
|
|
294
|
-
declare type OK<T> = {
|
|
295
|
-
status: "valid";
|
|
296
|
-
value: T;
|
|
297
|
-
};
|
|
298
|
-
declare const OK: <T>(value: T) => OK<T>;
|
|
299
|
-
declare type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;
|
|
300
|
-
declare type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;
|
|
301
|
-
declare type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;
|
|
302
|
-
|
|
303
|
-
declare namespace enumUtil {
|
|
304
|
-
type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never;
|
|
305
|
-
type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;
|
|
306
|
-
type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never] ? Tuple : UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;
|
|
307
|
-
type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;
|
|
308
|
-
export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;
|
|
309
|
-
export { };
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
declare namespace errorUtil {
|
|
313
|
-
type ErrMessage = string | {
|
|
314
|
-
message?: string;
|
|
315
|
-
};
|
|
316
|
-
const errToObj: (message?: ErrMessage | undefined) => {
|
|
317
|
-
message?: string | undefined;
|
|
318
|
-
};
|
|
319
|
-
const toString: (message?: ErrMessage | undefined) => string | undefined;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
declare namespace partialUtil {
|
|
323
|
-
type DeepPartial<T extends ZodTypeAny> = T extends ZodObject<ZodRawShape> ? ZodObject<{
|
|
324
|
-
[k in keyof T["shape"]]: ZodOptional<DeepPartial<T["shape"][k]>>;
|
|
325
|
-
}, T["_def"]["unknownKeys"], T["_def"]["catchall"]> : T extends ZodArray<infer Type, infer Card> ? ZodArray<DeepPartial<Type>, Card> : T extends ZodOptional<infer Type> ? ZodOptional<DeepPartial<Type>> : T extends ZodNullable<infer Type> ? ZodNullable<DeepPartial<Type>> : T extends ZodTuple<infer Items> ? {
|
|
326
|
-
[k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;
|
|
327
|
-
} extends infer PI ? PI extends ZodTupleItems ? ZodTuple<PI> : never : never : T;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
interface RefinementCtx {
|
|
331
|
-
addIssue: (arg: IssueData) => void;
|
|
332
|
-
path: (string | number)[];
|
|
333
|
-
}
|
|
334
|
-
declare type ZodRawShape = {
|
|
335
|
-
[k: string]: ZodTypeAny;
|
|
336
|
-
};
|
|
337
|
-
declare type ZodTypeAny = ZodType<any, any, any>;
|
|
338
|
-
declare type TypeOf<T extends ZodType<any, any, any>> = T["_output"];
|
|
339
|
-
declare type input<T extends ZodType<any, any, any>> = T["_input"];
|
|
340
|
-
declare type output<T extends ZodType<any, any, any>> = T["_output"];
|
|
341
|
-
|
|
342
|
-
declare type CustomErrorParams = Partial<util.Omit<ZodCustomIssue, "code">>;
|
|
343
|
-
interface ZodTypeDef {
|
|
344
|
-
errorMap?: ZodErrorMap;
|
|
345
|
-
description?: string;
|
|
346
|
-
}
|
|
347
|
-
declare type RawCreateParams = {
|
|
348
|
-
errorMap?: ZodErrorMap;
|
|
349
|
-
invalid_type_error?: string;
|
|
350
|
-
required_error?: string;
|
|
351
|
-
message?: string;
|
|
352
|
-
description?: string;
|
|
353
|
-
} | undefined;
|
|
354
|
-
declare type SafeParseSuccess<Output> = {
|
|
355
|
-
success: true;
|
|
356
|
-
data: Output;
|
|
357
|
-
error?: never;
|
|
358
|
-
};
|
|
359
|
-
declare type SafeParseError<Input> = {
|
|
360
|
-
success: false;
|
|
361
|
-
error: ZodError<Input>;
|
|
362
|
-
data?: never;
|
|
363
|
-
};
|
|
364
|
-
declare type SafeParseReturnType<Input, Output> = SafeParseSuccess<Output> | SafeParseError<Input>;
|
|
365
|
-
declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {
|
|
366
|
-
readonly _type: Output;
|
|
367
|
-
readonly _output: Output;
|
|
368
|
-
readonly _input: Input;
|
|
369
|
-
readonly _def: Def;
|
|
370
|
-
get description(): string | undefined;
|
|
371
|
-
abstract _parse(input: ParseInput): ParseReturnType<Output>;
|
|
372
|
-
_getType(input: ParseInput): string;
|
|
373
|
-
_getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext;
|
|
374
|
-
_processInputParams(input: ParseInput): {
|
|
375
|
-
status: ParseStatus;
|
|
376
|
-
ctx: ParseContext;
|
|
377
|
-
};
|
|
378
|
-
_parseSync(input: ParseInput): SyncParseReturnType<Output>;
|
|
379
|
-
_parseAsync(input: ParseInput): AsyncParseReturnType<Output>;
|
|
380
|
-
parse(data: unknown, params?: Partial<ParseParams>): Output;
|
|
381
|
-
safeParse(data: unknown, params?: Partial<ParseParams>): SafeParseReturnType<Input, Output>;
|
|
382
|
-
parseAsync(data: unknown, params?: Partial<ParseParams>): Promise<Output>;
|
|
383
|
-
safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
|
|
384
|
-
/** Alias of safeParseAsync */
|
|
385
|
-
spa: (data: unknown, params?: Partial<ParseParams> | undefined) => Promise<SafeParseReturnType<Input, Output>>;
|
|
386
|
-
refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>;
|
|
387
|
-
refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
|
|
388
|
-
refinement<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, RefinedOutput, Input>;
|
|
389
|
-
refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, Output, Input>;
|
|
390
|
-
_refinement(refinement: RefinementEffect<Output>["refinement"]): ZodEffects<this, Output, Input>;
|
|
391
|
-
superRefine<RefinedOutput extends Output>(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects<this, RefinedOutput, Input>;
|
|
392
|
-
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects<this, Output, Input>;
|
|
393
|
-
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => Promise<void>): ZodEffects<this, Output, Input>;
|
|
394
|
-
constructor(def: Def);
|
|
395
|
-
optional(): ZodOptional<this>;
|
|
396
|
-
nullable(): ZodNullable<this>;
|
|
397
|
-
nullish(): ZodOptional<ZodNullable<this>>;
|
|
398
|
-
array(): ZodArray<this>;
|
|
399
|
-
promise(): ZodPromise<this>;
|
|
400
|
-
or<T extends ZodTypeAny>(option: T): ZodUnion<[this, T]>;
|
|
401
|
-
and<T extends ZodTypeAny>(incoming: T): ZodIntersection<this, T>;
|
|
402
|
-
transform<NewOut>(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise<NewOut>): ZodEffects<this, NewOut>;
|
|
403
|
-
default(def: util.noUndefined<Input>): ZodDefault<this>;
|
|
404
|
-
default(def: () => util.noUndefined<Input>): ZodDefault<this>;
|
|
405
|
-
brand<B extends string | number | symbol>(brand?: B): ZodBranded<this, B>;
|
|
406
|
-
catch(def: Output): ZodCatch<this>;
|
|
407
|
-
catch(def: (ctx: {
|
|
408
|
-
error: ZodError;
|
|
409
|
-
input: Input;
|
|
410
|
-
}) => Output): ZodCatch<this>;
|
|
411
|
-
describe(description: string): this;
|
|
412
|
-
pipe<T extends ZodTypeAny>(target: T): ZodPipeline<this, T>;
|
|
413
|
-
readonly(): ZodReadonly<this>;
|
|
414
|
-
isOptional(): boolean;
|
|
415
|
-
isNullable(): boolean;
|
|
416
|
-
}
|
|
417
|
-
declare type IpVersion = "v4" | "v6";
|
|
418
|
-
declare type ZodStringCheck = {
|
|
419
|
-
kind: "min";
|
|
420
|
-
value: number;
|
|
421
|
-
message?: string;
|
|
422
|
-
} | {
|
|
423
|
-
kind: "max";
|
|
424
|
-
value: number;
|
|
425
|
-
message?: string;
|
|
426
|
-
} | {
|
|
427
|
-
kind: "length";
|
|
428
|
-
value: number;
|
|
429
|
-
message?: string;
|
|
430
|
-
} | {
|
|
431
|
-
kind: "email";
|
|
432
|
-
message?: string;
|
|
433
|
-
} | {
|
|
434
|
-
kind: "url";
|
|
435
|
-
message?: string;
|
|
436
|
-
} | {
|
|
437
|
-
kind: "emoji";
|
|
438
|
-
message?: string;
|
|
439
|
-
} | {
|
|
440
|
-
kind: "uuid";
|
|
441
|
-
message?: string;
|
|
442
|
-
} | {
|
|
443
|
-
kind: "nanoid";
|
|
444
|
-
message?: string;
|
|
445
|
-
} | {
|
|
446
|
-
kind: "cuid";
|
|
447
|
-
message?: string;
|
|
448
|
-
} | {
|
|
449
|
-
kind: "includes";
|
|
450
|
-
value: string;
|
|
451
|
-
position?: number;
|
|
452
|
-
message?: string;
|
|
453
|
-
} | {
|
|
454
|
-
kind: "cuid2";
|
|
455
|
-
message?: string;
|
|
456
|
-
} | {
|
|
457
|
-
kind: "ulid";
|
|
458
|
-
message?: string;
|
|
459
|
-
} | {
|
|
460
|
-
kind: "startsWith";
|
|
461
|
-
value: string;
|
|
462
|
-
message?: string;
|
|
463
|
-
} | {
|
|
464
|
-
kind: "endsWith";
|
|
465
|
-
value: string;
|
|
466
|
-
message?: string;
|
|
467
|
-
} | {
|
|
468
|
-
kind: "regex";
|
|
469
|
-
regex: RegExp;
|
|
470
|
-
message?: string;
|
|
471
|
-
} | {
|
|
472
|
-
kind: "trim";
|
|
473
|
-
message?: string;
|
|
474
|
-
} | {
|
|
475
|
-
kind: "toLowerCase";
|
|
476
|
-
message?: string;
|
|
477
|
-
} | {
|
|
478
|
-
kind: "toUpperCase";
|
|
479
|
-
message?: string;
|
|
480
|
-
} | {
|
|
481
|
-
kind: "datetime";
|
|
482
|
-
offset: boolean;
|
|
483
|
-
local: boolean;
|
|
484
|
-
precision: number | null;
|
|
485
|
-
message?: string;
|
|
486
|
-
} | {
|
|
487
|
-
kind: "date";
|
|
488
|
-
message?: string;
|
|
489
|
-
} | {
|
|
490
|
-
kind: "time";
|
|
491
|
-
precision: number | null;
|
|
492
|
-
message?: string;
|
|
493
|
-
} | {
|
|
494
|
-
kind: "duration";
|
|
495
|
-
message?: string;
|
|
496
|
-
} | {
|
|
497
|
-
kind: "ip";
|
|
498
|
-
version?: IpVersion;
|
|
499
|
-
message?: string;
|
|
500
|
-
} | {
|
|
501
|
-
kind: "base64";
|
|
502
|
-
message?: string;
|
|
503
|
-
};
|
|
504
|
-
interface ZodStringDef extends ZodTypeDef {
|
|
505
|
-
checks: ZodStringCheck[];
|
|
506
|
-
typeName: ZodFirstPartyTypeKind.ZodString;
|
|
507
|
-
coerce: boolean;
|
|
508
|
-
}
|
|
509
|
-
declare class ZodString extends ZodType<string, ZodStringDef, string> {
|
|
510
|
-
_parse(input: ParseInput): ParseReturnType<string>;
|
|
511
|
-
protected _regex(regex: RegExp, validation: StringValidation, message?: errorUtil.ErrMessage): ZodEffects<this, string, string>;
|
|
512
|
-
_addCheck(check: ZodStringCheck): ZodString;
|
|
513
|
-
email(message?: errorUtil.ErrMessage): ZodString;
|
|
514
|
-
url(message?: errorUtil.ErrMessage): ZodString;
|
|
515
|
-
emoji(message?: errorUtil.ErrMessage): ZodString;
|
|
516
|
-
uuid(message?: errorUtil.ErrMessage): ZodString;
|
|
517
|
-
nanoid(message?: errorUtil.ErrMessage): ZodString;
|
|
518
|
-
cuid(message?: errorUtil.ErrMessage): ZodString;
|
|
519
|
-
cuid2(message?: errorUtil.ErrMessage): ZodString;
|
|
520
|
-
ulid(message?: errorUtil.ErrMessage): ZodString;
|
|
521
|
-
base64(message?: errorUtil.ErrMessage): ZodString;
|
|
522
|
-
ip(options?: string | {
|
|
523
|
-
version?: "v4" | "v6";
|
|
524
|
-
message?: string;
|
|
525
|
-
}): ZodString;
|
|
526
|
-
datetime(options?: string | {
|
|
527
|
-
message?: string | undefined;
|
|
528
|
-
precision?: number | null;
|
|
529
|
-
offset?: boolean;
|
|
530
|
-
local?: boolean;
|
|
531
|
-
}): ZodString;
|
|
532
|
-
date(message?: string): ZodString;
|
|
533
|
-
time(options?: string | {
|
|
534
|
-
message?: string | undefined;
|
|
535
|
-
precision?: number | null;
|
|
536
|
-
}): ZodString;
|
|
537
|
-
duration(message?: errorUtil.ErrMessage): ZodString;
|
|
538
|
-
regex(regex: RegExp, message?: errorUtil.ErrMessage): ZodString;
|
|
539
|
-
includes(value: string, options?: {
|
|
540
|
-
message?: string;
|
|
541
|
-
position?: number;
|
|
542
|
-
}): ZodString;
|
|
543
|
-
startsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
544
|
-
endsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
545
|
-
min(minLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
546
|
-
max(maxLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
547
|
-
length(len: number, message?: errorUtil.ErrMessage): ZodString;
|
|
548
|
-
/**
|
|
549
|
-
* @deprecated Use z.string().min(1) instead.
|
|
550
|
-
* @see {@link ZodString.min}
|
|
551
|
-
*/
|
|
552
|
-
nonempty(message?: errorUtil.ErrMessage): ZodString;
|
|
553
|
-
trim(): ZodString;
|
|
554
|
-
toLowerCase(): ZodString;
|
|
555
|
-
toUpperCase(): ZodString;
|
|
556
|
-
get isDatetime(): boolean;
|
|
557
|
-
get isDate(): boolean;
|
|
558
|
-
get isTime(): boolean;
|
|
559
|
-
get isDuration(): boolean;
|
|
560
|
-
get isEmail(): boolean;
|
|
561
|
-
get isURL(): boolean;
|
|
562
|
-
get isEmoji(): boolean;
|
|
563
|
-
get isUUID(): boolean;
|
|
564
|
-
get isNANOID(): boolean;
|
|
565
|
-
get isCUID(): boolean;
|
|
566
|
-
get isCUID2(): boolean;
|
|
567
|
-
get isULID(): boolean;
|
|
568
|
-
get isIP(): boolean;
|
|
569
|
-
get isBase64(): boolean;
|
|
570
|
-
get minLength(): number | null;
|
|
571
|
-
get maxLength(): number | null;
|
|
572
|
-
static create: (params?: ({
|
|
573
|
-
errorMap?: ZodErrorMap | undefined;
|
|
574
|
-
invalid_type_error?: string | undefined;
|
|
575
|
-
required_error?: string | undefined;
|
|
576
|
-
message?: string | undefined;
|
|
577
|
-
description?: string | undefined;
|
|
578
|
-
} & {
|
|
579
|
-
coerce?: true | undefined;
|
|
580
|
-
}) | undefined) => ZodString;
|
|
581
|
-
}
|
|
582
|
-
declare type ZodNumberCheck = {
|
|
583
|
-
kind: "min";
|
|
584
|
-
value: number;
|
|
585
|
-
inclusive: boolean;
|
|
586
|
-
message?: string;
|
|
587
|
-
} | {
|
|
588
|
-
kind: "max";
|
|
589
|
-
value: number;
|
|
590
|
-
inclusive: boolean;
|
|
591
|
-
message?: string;
|
|
592
|
-
} | {
|
|
593
|
-
kind: "int";
|
|
594
|
-
message?: string;
|
|
595
|
-
} | {
|
|
596
|
-
kind: "multipleOf";
|
|
597
|
-
value: number;
|
|
598
|
-
message?: string;
|
|
599
|
-
} | {
|
|
600
|
-
kind: "finite";
|
|
601
|
-
message?: string;
|
|
602
|
-
};
|
|
603
|
-
interface ZodNumberDef extends ZodTypeDef {
|
|
604
|
-
checks: ZodNumberCheck[];
|
|
605
|
-
typeName: ZodFirstPartyTypeKind.ZodNumber;
|
|
606
|
-
coerce: boolean;
|
|
607
|
-
}
|
|
608
|
-
declare class ZodNumber extends ZodType<number, ZodNumberDef, number> {
|
|
609
|
-
_parse(input: ParseInput): ParseReturnType<number>;
|
|
610
|
-
static create: (params?: ({
|
|
611
|
-
errorMap?: ZodErrorMap | undefined;
|
|
612
|
-
invalid_type_error?: string | undefined;
|
|
613
|
-
required_error?: string | undefined;
|
|
614
|
-
message?: string | undefined;
|
|
615
|
-
description?: string | undefined;
|
|
616
|
-
} & {
|
|
617
|
-
coerce?: boolean | undefined;
|
|
618
|
-
}) | undefined) => ZodNumber;
|
|
619
|
-
gte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
620
|
-
min: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
621
|
-
gt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
622
|
-
lte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
623
|
-
max: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
624
|
-
lt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
625
|
-
protected setLimit(kind: "min" | "max", value: number, inclusive: boolean, message?: string): ZodNumber;
|
|
626
|
-
_addCheck(check: ZodNumberCheck): ZodNumber;
|
|
627
|
-
int(message?: errorUtil.ErrMessage): ZodNumber;
|
|
628
|
-
positive(message?: errorUtil.ErrMessage): ZodNumber;
|
|
629
|
-
negative(message?: errorUtil.ErrMessage): ZodNumber;
|
|
630
|
-
nonpositive(message?: errorUtil.ErrMessage): ZodNumber;
|
|
631
|
-
nonnegative(message?: errorUtil.ErrMessage): ZodNumber;
|
|
632
|
-
multipleOf(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
633
|
-
step: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
634
|
-
finite(message?: errorUtil.ErrMessage): ZodNumber;
|
|
635
|
-
safe(message?: errorUtil.ErrMessage): ZodNumber;
|
|
636
|
-
get minValue(): number | null;
|
|
637
|
-
get maxValue(): number | null;
|
|
638
|
-
get isInt(): boolean;
|
|
639
|
-
get isFinite(): boolean;
|
|
640
|
-
}
|
|
641
|
-
interface ZodBooleanDef extends ZodTypeDef {
|
|
642
|
-
typeName: ZodFirstPartyTypeKind.ZodBoolean;
|
|
643
|
-
coerce: boolean;
|
|
644
|
-
}
|
|
645
|
-
declare class ZodBoolean extends ZodType<boolean, ZodBooleanDef, boolean> {
|
|
646
|
-
_parse(input: ParseInput): ParseReturnType<boolean>;
|
|
647
|
-
static create: (params?: ({
|
|
648
|
-
errorMap?: ZodErrorMap | undefined;
|
|
649
|
-
invalid_type_error?: string | undefined;
|
|
650
|
-
required_error?: string | undefined;
|
|
651
|
-
message?: string | undefined;
|
|
652
|
-
description?: string | undefined;
|
|
653
|
-
} & {
|
|
654
|
-
coerce?: boolean | undefined;
|
|
655
|
-
}) | undefined) => ZodBoolean;
|
|
656
|
-
}
|
|
657
|
-
declare type ZodDateCheck = {
|
|
658
|
-
kind: "min";
|
|
659
|
-
value: number;
|
|
660
|
-
message?: string;
|
|
661
|
-
} | {
|
|
662
|
-
kind: "max";
|
|
663
|
-
value: number;
|
|
664
|
-
message?: string;
|
|
665
|
-
};
|
|
666
|
-
interface ZodDateDef extends ZodTypeDef {
|
|
667
|
-
checks: ZodDateCheck[];
|
|
668
|
-
coerce: boolean;
|
|
669
|
-
typeName: ZodFirstPartyTypeKind.ZodDate;
|
|
670
|
-
}
|
|
671
|
-
declare class ZodDate extends ZodType<Date, ZodDateDef, Date> {
|
|
672
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
673
|
-
_addCheck(check: ZodDateCheck): ZodDate;
|
|
674
|
-
min(minDate: Date, message?: errorUtil.ErrMessage): ZodDate;
|
|
675
|
-
max(maxDate: Date, message?: errorUtil.ErrMessage): ZodDate;
|
|
676
|
-
get minDate(): Date | null;
|
|
677
|
-
get maxDate(): Date | null;
|
|
678
|
-
static create: (params?: ({
|
|
679
|
-
errorMap?: ZodErrorMap | undefined;
|
|
680
|
-
invalid_type_error?: string | undefined;
|
|
681
|
-
required_error?: string | undefined;
|
|
682
|
-
message?: string | undefined;
|
|
683
|
-
description?: string | undefined;
|
|
684
|
-
} & {
|
|
685
|
-
coerce?: boolean | undefined;
|
|
686
|
-
}) | undefined) => ZodDate;
|
|
687
|
-
}
|
|
688
|
-
interface ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
689
|
-
type: T;
|
|
690
|
-
typeName: ZodFirstPartyTypeKind.ZodArray;
|
|
691
|
-
exactLength: {
|
|
692
|
-
value: number;
|
|
693
|
-
message?: string;
|
|
694
|
-
} | null;
|
|
695
|
-
minLength: {
|
|
696
|
-
value: number;
|
|
697
|
-
message?: string;
|
|
698
|
-
} | null;
|
|
699
|
-
maxLength: {
|
|
700
|
-
value: number;
|
|
701
|
-
message?: string;
|
|
702
|
-
} | null;
|
|
703
|
-
}
|
|
704
|
-
declare type ArrayCardinality = "many" | "atleastone";
|
|
705
|
-
declare type arrayOutputType<T extends ZodTypeAny, Cardinality extends ArrayCardinality = "many"> = Cardinality extends "atleastone" ? [T["_output"], ...T["_output"][]] : T["_output"][];
|
|
706
|
-
declare class ZodArray<T extends ZodTypeAny, Cardinality extends ArrayCardinality = "many"> extends ZodType<arrayOutputType<T, Cardinality>, ZodArrayDef<T>, Cardinality extends "atleastone" ? [T["_input"], ...T["_input"][]] : T["_input"][]> {
|
|
707
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
708
|
-
get element(): T;
|
|
709
|
-
min(minLength: number, message?: errorUtil.ErrMessage): this;
|
|
710
|
-
max(maxLength: number, message?: errorUtil.ErrMessage): this;
|
|
711
|
-
length(len: number, message?: errorUtil.ErrMessage): this;
|
|
712
|
-
nonempty(message?: errorUtil.ErrMessage): ZodArray<T, "atleastone">;
|
|
713
|
-
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodArray<T_1, "many">;
|
|
714
|
-
}
|
|
715
|
-
declare type UnknownKeysParam = "passthrough" | "strict" | "strip";
|
|
716
|
-
interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
717
|
-
typeName: ZodFirstPartyTypeKind.ZodObject;
|
|
718
|
-
shape: () => T;
|
|
719
|
-
catchall: Catchall;
|
|
720
|
-
unknownKeys: UnknownKeys;
|
|
721
|
-
}
|
|
722
|
-
declare type objectOutputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny, UnknownKeys extends UnknownKeysParam = UnknownKeysParam> = objectUtil.flatten<objectUtil.addQuestionMarks<baseObjectOutputType<Shape>>> & CatchallOutput<Catchall> & PassthroughType<UnknownKeys>;
|
|
723
|
-
declare type baseObjectOutputType<Shape extends ZodRawShape> = {
|
|
724
|
-
[k in keyof Shape]: Shape[k]["_output"];
|
|
725
|
-
};
|
|
726
|
-
declare type objectInputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny, UnknownKeys extends UnknownKeysParam = UnknownKeysParam> = objectUtil.flatten<baseObjectInputType<Shape>> & CatchallInput<Catchall> & PassthroughType<UnknownKeys>;
|
|
727
|
-
declare type baseObjectInputType<Shape extends ZodRawShape> = objectUtil.addQuestionMarks<{
|
|
728
|
-
[k in keyof Shape]: Shape[k]["_input"];
|
|
729
|
-
}>;
|
|
730
|
-
declare type CatchallOutput<T extends ZodType> = ZodType extends T ? unknown : {
|
|
731
|
-
[k: string]: T["_output"];
|
|
732
|
-
};
|
|
733
|
-
declare type CatchallInput<T extends ZodType> = ZodType extends T ? unknown : {
|
|
734
|
-
[k: string]: T["_input"];
|
|
735
|
-
};
|
|
736
|
-
declare type PassthroughType<T extends UnknownKeysParam> = T extends "passthrough" ? {
|
|
737
|
-
[k: string]: unknown;
|
|
738
|
-
} : unknown;
|
|
739
|
-
declare type deoptional<T extends ZodTypeAny> = T extends ZodOptional<infer U> ? deoptional<U> : T extends ZodNullable<infer U> ? ZodNullable<deoptional<U>> : T;
|
|
740
|
-
declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny, Output = objectOutputType<T, Catchall, UnknownKeys>, Input = objectInputType<T, Catchall, UnknownKeys>> extends ZodType<Output, ZodObjectDef<T, UnknownKeys, Catchall>, Input> {
|
|
741
|
-
private _cached;
|
|
742
|
-
_getCached(): {
|
|
743
|
-
shape: T;
|
|
744
|
-
keys: string[];
|
|
745
|
-
};
|
|
746
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
747
|
-
get shape(): T;
|
|
748
|
-
strict(message?: errorUtil.ErrMessage): ZodObject<T, "strict", Catchall>;
|
|
749
|
-
strip(): ZodObject<T, "strip", Catchall>;
|
|
750
|
-
passthrough(): ZodObject<T, "passthrough", Catchall>;
|
|
751
|
-
/**
|
|
752
|
-
* @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.
|
|
753
|
-
* If you want to pass through unknown properties, use `.passthrough()` instead.
|
|
754
|
-
*/
|
|
755
|
-
nonstrict: () => ZodObject<T, "passthrough", Catchall>;
|
|
756
|
-
extend<Augmentation extends ZodRawShape>(augmentation: Augmentation): ZodObject<objectUtil.extendShape<T, Augmentation>, UnknownKeys, Catchall>;
|
|
757
|
-
/**
|
|
758
|
-
* @deprecated Use `.extend` instead
|
|
759
|
-
* */
|
|
760
|
-
augment: <Augmentation extends ZodRawShape>(augmentation: Augmentation) => ZodObject<objectUtil.extendShape<T, Augmentation>, UnknownKeys, Catchall, objectOutputType<objectUtil.extendShape<T, Augmentation>, Catchall, UnknownKeys>, objectInputType<objectUtil.extendShape<T, Augmentation>, Catchall, UnknownKeys>>;
|
|
761
|
-
/**
|
|
762
|
-
* Prior to zod@1.0.12 there was a bug in the
|
|
763
|
-
* inferred type of merged objects. Please
|
|
764
|
-
* upgrade if you are experiencing issues.
|
|
765
|
-
*/
|
|
766
|
-
merge<Incoming extends AnyZodObject, Augmentation extends Incoming["shape"]>(merging: Incoming): ZodObject<objectUtil.extendShape<T, Augmentation>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>;
|
|
767
|
-
setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & {
|
|
768
|
-
[k in Key]: Schema;
|
|
769
|
-
}, UnknownKeys, Catchall>;
|
|
770
|
-
catchall<Index extends ZodTypeAny>(index: Index): ZodObject<T, UnknownKeys, Index>;
|
|
771
|
-
pick<Mask extends util.Exactly<{
|
|
772
|
-
[k in keyof T]?: true;
|
|
773
|
-
}, Mask>>(mask: Mask): ZodObject<Pick<T, Extract<keyof T, keyof Mask>>, UnknownKeys, Catchall>;
|
|
774
|
-
omit<Mask extends util.Exactly<{
|
|
775
|
-
[k in keyof T]?: true;
|
|
776
|
-
}, Mask>>(mask: Mask): ZodObject<Omit<T, keyof Mask>, UnknownKeys, Catchall>;
|
|
777
|
-
/**
|
|
778
|
-
* @deprecated
|
|
779
|
-
*/
|
|
780
|
-
deepPartial(): partialUtil.DeepPartial<this>;
|
|
781
|
-
partial(): ZodObject<{
|
|
782
|
-
[k in keyof T]: ZodOptional<T[k]>;
|
|
783
|
-
}, UnknownKeys, Catchall>;
|
|
784
|
-
partial<Mask extends util.Exactly<{
|
|
785
|
-
[k in keyof T]?: true;
|
|
786
|
-
}, Mask>>(mask: Mask): ZodObject<objectUtil.noNever<{
|
|
787
|
-
[k in keyof T]: k extends keyof Mask ? ZodOptional<T[k]> : T[k];
|
|
788
|
-
}>, UnknownKeys, Catchall>;
|
|
789
|
-
required(): ZodObject<{
|
|
790
|
-
[k in keyof T]: deoptional<T[k]>;
|
|
791
|
-
}, UnknownKeys, Catchall>;
|
|
792
|
-
required<Mask extends util.Exactly<{
|
|
793
|
-
[k in keyof T]?: true;
|
|
794
|
-
}, Mask>>(mask: Mask): ZodObject<objectUtil.noNever<{
|
|
795
|
-
[k in keyof T]: k extends keyof Mask ? deoptional<T[k]> : T[k];
|
|
796
|
-
}>, UnknownKeys, Catchall>;
|
|
797
|
-
keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>;
|
|
798
|
-
static create: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any>]: objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any>[k]; }, { [k_1 in keyof baseObjectInputType<T_1>]: baseObjectInputType<T_1>[k_1]; }>;
|
|
799
|
-
static strictCreate: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strict", ZodTypeAny, { [k in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any>]: objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any>[k]; }, { [k_1 in keyof baseObjectInputType<T_1>]: baseObjectInputType<T_1>[k_1]; }>;
|
|
800
|
-
static lazycreate: <T_1 extends ZodRawShape>(shape: () => T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any>]: objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any>[k]; }, { [k_1 in keyof baseObjectInputType<T_1>]: baseObjectInputType<T_1>[k_1]; }>;
|
|
801
|
-
}
|
|
802
|
-
declare type AnyZodObject = ZodObject<any, any, any>;
|
|
803
|
-
declare type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;
|
|
804
|
-
interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[
|
|
805
|
-
ZodTypeAny,
|
|
806
|
-
ZodTypeAny,
|
|
807
|
-
...ZodTypeAny[]
|
|
808
|
-
]>> extends ZodTypeDef {
|
|
809
|
-
options: T;
|
|
810
|
-
typeName: ZodFirstPartyTypeKind.ZodUnion;
|
|
811
|
-
}
|
|
812
|
-
declare class ZodUnion<T extends ZodUnionOptions> extends ZodType<T[number]["_output"], ZodUnionDef<T>, T[number]["_input"]> {
|
|
813
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
814
|
-
get options(): T;
|
|
815
|
-
static create: <T_1 extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T_1, params?: RawCreateParams) => ZodUnion<T_1>;
|
|
816
|
-
}
|
|
817
|
-
interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
818
|
-
left: T;
|
|
819
|
-
right: U;
|
|
820
|
-
typeName: ZodFirstPartyTypeKind.ZodIntersection;
|
|
821
|
-
}
|
|
822
|
-
declare class ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> extends ZodType<T["_output"] & U["_output"], ZodIntersectionDef<T, U>, T["_input"] & U["_input"]> {
|
|
823
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
824
|
-
static create: <T_1 extends ZodTypeAny, U_1 extends ZodTypeAny>(left: T_1, right: U_1, params?: RawCreateParams) => ZodIntersection<T_1, U_1>;
|
|
825
|
-
}
|
|
826
|
-
declare type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
|
|
827
|
-
declare type AssertArray<T> = T extends any[] ? T : never;
|
|
828
|
-
declare type OutputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
829
|
-
[k in keyof T]: T[k] extends ZodType<any, any, any> ? T[k]["_output"] : never;
|
|
830
|
-
}>;
|
|
831
|
-
declare type OutputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...OutputTypeOfTuple<T>, ...Rest["_output"][]] : OutputTypeOfTuple<T>;
|
|
832
|
-
declare type InputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
833
|
-
[k in keyof T]: T[k] extends ZodType<any, any, any> ? T[k]["_input"] : never;
|
|
834
|
-
}>;
|
|
835
|
-
declare type InputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...InputTypeOfTuple<T>, ...Rest["_input"][]] : InputTypeOfTuple<T>;
|
|
836
|
-
interface ZodTupleDef<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> extends ZodTypeDef {
|
|
837
|
-
items: T;
|
|
838
|
-
rest: Rest;
|
|
839
|
-
typeName: ZodFirstPartyTypeKind.ZodTuple;
|
|
840
|
-
}
|
|
841
|
-
declare class ZodTuple<T extends [ZodTypeAny, ...ZodTypeAny[]] | [] = [ZodTypeAny, ...ZodTypeAny[]], Rest extends ZodTypeAny | null = null> extends ZodType<OutputTypeOfTupleWithRest<T, Rest>, ZodTupleDef<T, Rest>, InputTypeOfTupleWithRest<T, Rest>> {
|
|
842
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
843
|
-
get items(): T;
|
|
844
|
-
rest<Rest extends ZodTypeAny>(rest: Rest): ZodTuple<T, Rest>;
|
|
845
|
-
static create: <T_1 extends [] | [ZodTypeAny, ...ZodTypeAny[]]>(schemas: T_1, params?: RawCreateParams) => ZodTuple<T_1, null>;
|
|
846
|
-
}
|
|
847
|
-
interface ZodLiteralDef<T = any> extends ZodTypeDef {
|
|
848
|
-
value: T;
|
|
849
|
-
typeName: ZodFirstPartyTypeKind.ZodLiteral;
|
|
850
|
-
}
|
|
851
|
-
declare class ZodLiteral<T> extends ZodType<T, ZodLiteralDef<T>, T> {
|
|
852
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
853
|
-
get value(): T;
|
|
854
|
-
static create: <T_1 extends Primitive>(value: T_1, params?: RawCreateParams) => ZodLiteral<T_1>;
|
|
855
|
-
}
|
|
856
|
-
declare type EnumValues<T extends string = string> = readonly [T, ...T[]];
|
|
857
|
-
declare type Values<T extends EnumValues> = {
|
|
858
|
-
[k in T[number]]: k;
|
|
859
|
-
};
|
|
860
|
-
interface ZodEnumDef<T extends EnumValues = EnumValues> extends ZodTypeDef {
|
|
861
|
-
values: T;
|
|
862
|
-
typeName: ZodFirstPartyTypeKind.ZodEnum;
|
|
863
|
-
}
|
|
864
|
-
declare type Writeable<T> = {
|
|
865
|
-
-readonly [P in keyof T]: T[P];
|
|
866
|
-
};
|
|
867
|
-
declare type FilterEnum<Values, ToExclude> = Values extends [] ? [] : Values extends [infer Head, ...infer Rest] ? Head extends ToExclude ? FilterEnum<Rest, ToExclude> : [Head, ...FilterEnum<Rest, ToExclude>] : never;
|
|
868
|
-
declare type typecast<A, T> = A extends T ? A : never;
|
|
869
|
-
declare function createZodEnum<U extends string, T extends Readonly<[U, ...U[]]>>(values: T, params?: RawCreateParams): ZodEnum<Writeable<T>>;
|
|
870
|
-
declare function createZodEnum<U extends string, T extends [U, ...U[]]>(values: T, params?: RawCreateParams): ZodEnum<T>;
|
|
871
|
-
declare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number], ZodEnumDef<T>, T[number]> {
|
|
872
|
-
#private;
|
|
873
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
874
|
-
get options(): T;
|
|
875
|
-
get enum(): Values<T>;
|
|
876
|
-
get Values(): Values<T>;
|
|
877
|
-
get Enum(): Values<T>;
|
|
878
|
-
extract<ToExtract extends readonly [T[number], ...T[number][]]>(values: ToExtract, newDef?: RawCreateParams): ZodEnum<Writeable<ToExtract>>;
|
|
879
|
-
exclude<ToExclude extends readonly [T[number], ...T[number][]]>(values: ToExclude, newDef?: RawCreateParams): ZodEnum<typecast<Writeable<FilterEnum<T, ToExclude[number]>>, [string, ...string[]]>>;
|
|
880
|
-
static create: typeof createZodEnum;
|
|
881
|
-
}
|
|
882
|
-
interface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
883
|
-
type: T;
|
|
884
|
-
typeName: ZodFirstPartyTypeKind.ZodPromise;
|
|
885
|
-
}
|
|
886
|
-
declare class ZodPromise<T extends ZodTypeAny> extends ZodType<Promise<T["_output"]>, ZodPromiseDef<T>, Promise<T["_input"]>> {
|
|
887
|
-
unwrap(): T;
|
|
888
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
889
|
-
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodPromise<T_1>;
|
|
890
|
-
}
|
|
891
|
-
declare type RefinementEffect<T> = {
|
|
892
|
-
type: "refinement";
|
|
893
|
-
refinement: (arg: T, ctx: RefinementCtx) => any;
|
|
894
|
-
};
|
|
895
|
-
declare type TransformEffect<T> = {
|
|
896
|
-
type: "transform";
|
|
897
|
-
transform: (arg: T, ctx: RefinementCtx) => any;
|
|
898
|
-
};
|
|
899
|
-
declare type PreprocessEffect<T> = {
|
|
900
|
-
type: "preprocess";
|
|
901
|
-
transform: (arg: T, ctx: RefinementCtx) => any;
|
|
902
|
-
};
|
|
903
|
-
declare type Effect<T> = RefinementEffect<T> | TransformEffect<T> | PreprocessEffect<T>;
|
|
904
|
-
interface ZodEffectsDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
905
|
-
schema: T;
|
|
906
|
-
typeName: ZodFirstPartyTypeKind.ZodEffects;
|
|
907
|
-
effect: Effect<any>;
|
|
908
|
-
}
|
|
909
|
-
declare class ZodEffects<T extends ZodTypeAny, Output = output<T>, Input = input<T>> extends ZodType<Output, ZodEffectsDef<T>, Input> {
|
|
910
|
-
innerType(): T;
|
|
911
|
-
sourceType(): T;
|
|
912
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
913
|
-
static create: <I extends ZodTypeAny>(schema: I, effect: Effect<I["_output"]>, params?: RawCreateParams) => ZodEffects<I, I["_output"], input<I>>;
|
|
914
|
-
static createWithPreprocess: <I extends ZodTypeAny>(preprocess: (arg: unknown, ctx: RefinementCtx) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
interface ZodOptionalDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
918
|
-
innerType: T;
|
|
919
|
-
typeName: ZodFirstPartyTypeKind.ZodOptional;
|
|
920
|
-
}
|
|
921
|
-
declare class ZodOptional<T extends ZodTypeAny> extends ZodType<T["_output"] | undefined, ZodOptionalDef<T>, T["_input"] | undefined> {
|
|
922
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
923
|
-
unwrap(): T;
|
|
924
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodOptional<T_1>;
|
|
925
|
-
}
|
|
926
|
-
interface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
927
|
-
innerType: T;
|
|
928
|
-
typeName: ZodFirstPartyTypeKind.ZodNullable;
|
|
929
|
-
}
|
|
930
|
-
declare class ZodNullable<T extends ZodTypeAny> extends ZodType<T["_output"] | null, ZodNullableDef<T>, T["_input"] | null> {
|
|
931
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
932
|
-
unwrap(): T;
|
|
933
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodNullable<T_1>;
|
|
934
|
-
}
|
|
935
|
-
interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
936
|
-
innerType: T;
|
|
937
|
-
defaultValue: () => util.noUndefined<T["_input"]>;
|
|
938
|
-
typeName: ZodFirstPartyTypeKind.ZodDefault;
|
|
939
|
-
}
|
|
940
|
-
declare class ZodDefault<T extends ZodTypeAny> extends ZodType<util.noUndefined<T["_output"]>, ZodDefaultDef<T>, T["_input"] | undefined> {
|
|
941
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
942
|
-
removeDefault(): T;
|
|
943
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
|
|
944
|
-
errorMap?: ZodErrorMap | undefined;
|
|
945
|
-
invalid_type_error?: string | undefined;
|
|
946
|
-
required_error?: string | undefined;
|
|
947
|
-
message?: string | undefined;
|
|
948
|
-
description?: string | undefined;
|
|
949
|
-
} & {
|
|
950
|
-
default: T_1["_input"] | (() => util.noUndefined<T_1["_input"]>);
|
|
951
|
-
}) => ZodDefault<T_1>;
|
|
952
|
-
}
|
|
953
|
-
interface ZodCatchDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
954
|
-
innerType: T;
|
|
955
|
-
catchValue: (ctx: {
|
|
956
|
-
error: ZodError;
|
|
957
|
-
input: unknown;
|
|
958
|
-
}) => T["_input"];
|
|
959
|
-
typeName: ZodFirstPartyTypeKind.ZodCatch;
|
|
960
|
-
}
|
|
961
|
-
declare class ZodCatch<T extends ZodTypeAny> extends ZodType<T["_output"], ZodCatchDef<T>, unknown> {
|
|
962
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
963
|
-
removeCatch(): T;
|
|
964
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
|
|
965
|
-
errorMap?: ZodErrorMap | undefined;
|
|
966
|
-
invalid_type_error?: string | undefined;
|
|
967
|
-
required_error?: string | undefined;
|
|
968
|
-
message?: string | undefined;
|
|
969
|
-
description?: string | undefined;
|
|
970
|
-
} & {
|
|
971
|
-
catch: T_1["_output"] | (() => T_1["_output"]);
|
|
972
|
-
}) => ZodCatch<T_1>;
|
|
973
|
-
}
|
|
974
|
-
interface ZodBrandedDef<T extends ZodTypeAny> extends ZodTypeDef {
|
|
975
|
-
type: T;
|
|
976
|
-
typeName: ZodFirstPartyTypeKind.ZodBranded;
|
|
977
|
-
}
|
|
978
|
-
declare const BRAND: unique symbol;
|
|
979
|
-
declare type BRAND<T extends string | number | symbol> = {
|
|
980
|
-
[BRAND]: {
|
|
981
|
-
[k in T]: true;
|
|
982
|
-
};
|
|
983
|
-
};
|
|
984
|
-
declare class ZodBranded<T extends ZodTypeAny, B extends string | number | symbol> extends ZodType<T["_output"] & BRAND<B>, ZodBrandedDef<T>, T["_input"]> {
|
|
985
|
-
_parse(input: ParseInput): ParseReturnType<any>;
|
|
986
|
-
unwrap(): T;
|
|
987
|
-
}
|
|
988
|
-
interface ZodPipelineDef<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodTypeDef {
|
|
989
|
-
in: A;
|
|
990
|
-
out: B;
|
|
991
|
-
typeName: ZodFirstPartyTypeKind.ZodPipeline;
|
|
992
|
-
}
|
|
993
|
-
declare class ZodPipeline<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodType<B["_output"], ZodPipelineDef<A, B>, A["_input"]> {
|
|
994
|
-
_parse(input: ParseInput): ParseReturnType<any>;
|
|
995
|
-
static create<A extends ZodTypeAny, B extends ZodTypeAny>(a: A, b: B): ZodPipeline<A, B>;
|
|
996
|
-
}
|
|
997
|
-
declare type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
|
|
998
|
-
readonly [Symbol.toStringTag]: string;
|
|
999
|
-
} | Date | Error | Generator | Promise<unknown> | RegExp;
|
|
1000
|
-
declare type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends Set<infer V> ? ReadonlySet<V> : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array<infer V> ? ReadonlyArray<V> : T extends BuiltIn ? T : Readonly<T>;
|
|
1001
|
-
interface ZodReadonlyDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1002
|
-
innerType: T;
|
|
1003
|
-
typeName: ZodFirstPartyTypeKind.ZodReadonly;
|
|
1004
|
-
}
|
|
1005
|
-
declare class ZodReadonly<T extends ZodTypeAny> extends ZodType<MakeReadonly<T["_output"]>, ZodReadonlyDef<T>, MakeReadonly<T["_input"]>> {
|
|
1006
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1007
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodReadonly<T_1>;
|
|
1008
|
-
unwrap(): T;
|
|
1009
|
-
}
|
|
1010
|
-
declare enum ZodFirstPartyTypeKind {
|
|
1011
|
-
ZodString = "ZodString",
|
|
1012
|
-
ZodNumber = "ZodNumber",
|
|
1013
|
-
ZodNaN = "ZodNaN",
|
|
1014
|
-
ZodBigInt = "ZodBigInt",
|
|
1015
|
-
ZodBoolean = "ZodBoolean",
|
|
1016
|
-
ZodDate = "ZodDate",
|
|
1017
|
-
ZodSymbol = "ZodSymbol",
|
|
1018
|
-
ZodUndefined = "ZodUndefined",
|
|
1019
|
-
ZodNull = "ZodNull",
|
|
1020
|
-
ZodAny = "ZodAny",
|
|
1021
|
-
ZodUnknown = "ZodUnknown",
|
|
1022
|
-
ZodNever = "ZodNever",
|
|
1023
|
-
ZodVoid = "ZodVoid",
|
|
1024
|
-
ZodArray = "ZodArray",
|
|
1025
|
-
ZodObject = "ZodObject",
|
|
1026
|
-
ZodUnion = "ZodUnion",
|
|
1027
|
-
ZodDiscriminatedUnion = "ZodDiscriminatedUnion",
|
|
1028
|
-
ZodIntersection = "ZodIntersection",
|
|
1029
|
-
ZodTuple = "ZodTuple",
|
|
1030
|
-
ZodRecord = "ZodRecord",
|
|
1031
|
-
ZodMap = "ZodMap",
|
|
1032
|
-
ZodSet = "ZodSet",
|
|
1033
|
-
ZodFunction = "ZodFunction",
|
|
1034
|
-
ZodLazy = "ZodLazy",
|
|
1035
|
-
ZodLiteral = "ZodLiteral",
|
|
1036
|
-
ZodEnum = "ZodEnum",
|
|
1037
|
-
ZodEffects = "ZodEffects",
|
|
1038
|
-
ZodNativeEnum = "ZodNativeEnum",
|
|
1039
|
-
ZodOptional = "ZodOptional",
|
|
1040
|
-
ZodNullable = "ZodNullable",
|
|
1041
|
-
ZodDefault = "ZodDefault",
|
|
1042
|
-
ZodCatch = "ZodCatch",
|
|
1043
|
-
ZodPromise = "ZodPromise",
|
|
1044
|
-
ZodBranded = "ZodBranded",
|
|
1045
|
-
ZodPipeline = "ZodPipeline",
|
|
1046
|
-
ZodReadonly = "ZodReadonly"
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* zod schema definition for the entity AI Models
|
|
1051
|
-
*/
|
|
1052
|
-
declare const AIModelSchema: ZodObject<{
|
|
1053
|
-
ID: ZodString;
|
|
1054
|
-
Name: ZodString;
|
|
1055
|
-
Description: ZodOptional<ZodNullable<ZodString>>;
|
|
1056
|
-
Vendor: ZodOptional<ZodNullable<ZodString>>;
|
|
1057
|
-
AIModelTypeID: ZodString;
|
|
1058
|
-
PowerRank: ZodOptional<ZodNullable<ZodNumber>>;
|
|
1059
|
-
IsActive: ZodBoolean;
|
|
1060
|
-
DriverClass: ZodOptional<ZodNullable<ZodString>>;
|
|
1061
|
-
DriverImportPath: ZodOptional<ZodNullable<ZodString>>;
|
|
1062
|
-
APIName: ZodOptional<ZodNullable<ZodString>>;
|
|
1063
|
-
__mj_CreatedAt: ZodDate;
|
|
1064
|
-
__mj_UpdatedAt: ZodDate;
|
|
1065
|
-
SpeedRank: ZodOptional<ZodNullable<ZodNumber>>;
|
|
1066
|
-
CostRank: ZodOptional<ZodNullable<ZodNumber>>;
|
|
1067
|
-
ModelSelectionInsights: ZodOptional<ZodNullable<ZodString>>;
|
|
1068
|
-
AIModelType: ZodString;
|
|
1069
|
-
}, "strip", ZodTypeAny, {
|
|
1070
|
-
ID?: string;
|
|
1071
|
-
__mj_CreatedAt?: Date;
|
|
1072
|
-
__mj_UpdatedAt?: Date;
|
|
1073
|
-
Name?: string;
|
|
1074
|
-
Description?: string;
|
|
1075
|
-
IsActive?: boolean;
|
|
1076
|
-
Vendor?: string;
|
|
1077
|
-
AIModelTypeID?: string;
|
|
1078
|
-
PowerRank?: number;
|
|
1079
|
-
DriverClass?: string;
|
|
1080
|
-
DriverImportPath?: string;
|
|
1081
|
-
APIName?: string;
|
|
1082
|
-
SpeedRank?: number;
|
|
1083
|
-
CostRank?: number;
|
|
1084
|
-
ModelSelectionInsights?: string;
|
|
1085
|
-
AIModelType?: string;
|
|
1086
|
-
}, {
|
|
1087
|
-
ID?: string;
|
|
1088
|
-
__mj_CreatedAt?: Date;
|
|
1089
|
-
__mj_UpdatedAt?: Date;
|
|
1090
|
-
Name?: string;
|
|
1091
|
-
Description?: string;
|
|
1092
|
-
IsActive?: boolean;
|
|
1093
|
-
Vendor?: string;
|
|
1094
|
-
AIModelTypeID?: string;
|
|
1095
|
-
PowerRank?: number;
|
|
1096
|
-
DriverClass?: string;
|
|
1097
|
-
DriverImportPath?: string;
|
|
1098
|
-
APIName?: string;
|
|
1099
|
-
SpeedRank?: number;
|
|
1100
|
-
CostRank?: number;
|
|
1101
|
-
ModelSelectionInsights?: string;
|
|
1102
|
-
AIModelType?: string;
|
|
1103
|
-
}>;
|
|
1104
|
-
type AIModelEntityType = TypeOf<typeof AIModelSchema>;
|
|
1105
|
-
/**
|
|
1106
|
-
* zod schema definition for the entity Entity Documents
|
|
1107
|
-
*/
|
|
1108
|
-
declare const EntityDocumentSchema: ZodObject<{
|
|
1109
|
-
ID: ZodString;
|
|
1110
|
-
Name: ZodString;
|
|
1111
|
-
TypeID: ZodString;
|
|
1112
|
-
EntityID: ZodString;
|
|
1113
|
-
VectorDatabaseID: ZodString;
|
|
1114
|
-
Status: ZodUnion<[ZodLiteral<"Active">, ZodLiteral<"Inactive">]>;
|
|
1115
|
-
TemplateID: ZodString;
|
|
1116
|
-
AIModelID: ZodString;
|
|
1117
|
-
PotentialMatchThreshold: ZodNumber;
|
|
1118
|
-
AbsoluteMatchThreshold: ZodNumber;
|
|
1119
|
-
__mj_CreatedAt: ZodDate;
|
|
1120
|
-
__mj_UpdatedAt: ZodDate;
|
|
1121
|
-
Type: ZodString;
|
|
1122
|
-
Entity: ZodString;
|
|
1123
|
-
VectorDatabase: ZodString;
|
|
1124
|
-
Template: ZodString;
|
|
1125
|
-
AIModel: ZodString;
|
|
1126
|
-
}, "strip", ZodTypeAny, {
|
|
1127
|
-
ID?: string;
|
|
1128
|
-
__mj_CreatedAt?: Date;
|
|
1129
|
-
__mj_UpdatedAt?: Date;
|
|
1130
|
-
Name?: string;
|
|
1131
|
-
Status?: "Active" | "Inactive";
|
|
1132
|
-
Type?: string;
|
|
1133
|
-
AIModelID?: string;
|
|
1134
|
-
AIModel?: string;
|
|
1135
|
-
TemplateID?: string;
|
|
1136
|
-
TypeID?: string;
|
|
1137
|
-
Template?: string;
|
|
1138
|
-
EntityID?: string;
|
|
1139
|
-
Entity?: string;
|
|
1140
|
-
VectorDatabaseID?: string;
|
|
1141
|
-
PotentialMatchThreshold?: number;
|
|
1142
|
-
AbsoluteMatchThreshold?: number;
|
|
1143
|
-
VectorDatabase?: string;
|
|
1144
|
-
}, {
|
|
1145
|
-
ID?: string;
|
|
1146
|
-
__mj_CreatedAt?: Date;
|
|
1147
|
-
__mj_UpdatedAt?: Date;
|
|
1148
|
-
Name?: string;
|
|
1149
|
-
Status?: "Active" | "Inactive";
|
|
1150
|
-
Type?: string;
|
|
1151
|
-
AIModelID?: string;
|
|
1152
|
-
AIModel?: string;
|
|
1153
|
-
TemplateID?: string;
|
|
1154
|
-
TypeID?: string;
|
|
1155
|
-
Template?: string;
|
|
1156
|
-
EntityID?: string;
|
|
1157
|
-
Entity?: string;
|
|
1158
|
-
VectorDatabaseID?: string;
|
|
1159
|
-
PotentialMatchThreshold?: number;
|
|
1160
|
-
AbsoluteMatchThreshold?: number;
|
|
1161
|
-
VectorDatabase?: string;
|
|
1162
|
-
}>;
|
|
1163
|
-
type EntityDocumentEntityType = TypeOf<typeof EntityDocumentSchema>;
|
|
1164
|
-
/**
|
|
1165
|
-
* zod schema definition for the entity Template Contents
|
|
1166
|
-
*/
|
|
1167
|
-
declare const TemplateContentSchema: ZodObject<{
|
|
1168
|
-
ID: ZodString;
|
|
1169
|
-
TemplateID: ZodString;
|
|
1170
|
-
TypeID: ZodString;
|
|
1171
|
-
TemplateText: ZodOptional<ZodNullable<ZodString>>;
|
|
1172
|
-
Priority: ZodNumber;
|
|
1173
|
-
IsActive: ZodBoolean;
|
|
1174
|
-
__mj_CreatedAt: ZodDate;
|
|
1175
|
-
__mj_UpdatedAt: ZodDate;
|
|
1176
|
-
Template: ZodString;
|
|
1177
|
-
Type: ZodString;
|
|
1178
|
-
}, "strip", ZodTypeAny, {
|
|
1179
|
-
ID?: string;
|
|
1180
|
-
__mj_CreatedAt?: Date;
|
|
1181
|
-
__mj_UpdatedAt?: Date;
|
|
1182
|
-
Type?: string;
|
|
1183
|
-
IsActive?: boolean;
|
|
1184
|
-
TemplateID?: string;
|
|
1185
|
-
TypeID?: string;
|
|
1186
|
-
Template?: string;
|
|
1187
|
-
Priority?: number;
|
|
1188
|
-
TemplateText?: string;
|
|
1189
|
-
}, {
|
|
1190
|
-
ID?: string;
|
|
1191
|
-
__mj_CreatedAt?: Date;
|
|
1192
|
-
__mj_UpdatedAt?: Date;
|
|
1193
|
-
Type?: string;
|
|
1194
|
-
IsActive?: boolean;
|
|
1195
|
-
TemplateID?: string;
|
|
1196
|
-
TypeID?: string;
|
|
1197
|
-
Template?: string;
|
|
1198
|
-
Priority?: number;
|
|
1199
|
-
TemplateText?: string;
|
|
1200
|
-
}>;
|
|
1201
|
-
type TemplateContentEntityType = TypeOf<typeof TemplateContentSchema>;
|
|
1202
|
-
/**
|
|
1203
|
-
* zod schema definition for the entity Templates
|
|
1204
|
-
*/
|
|
1205
|
-
declare const TemplateSchema: ZodObject<{
|
|
1206
|
-
ID: ZodString;
|
|
1207
|
-
Name: ZodString;
|
|
1208
|
-
Description: ZodOptional<ZodNullable<ZodString>>;
|
|
1209
|
-
CategoryID: ZodOptional<ZodNullable<ZodString>>;
|
|
1210
|
-
UserPrompt: ZodOptional<ZodNullable<ZodString>>;
|
|
1211
|
-
UserID: ZodString;
|
|
1212
|
-
ActiveAt: ZodOptional<ZodNullable<ZodDate>>;
|
|
1213
|
-
DisabledAt: ZodOptional<ZodNullable<ZodDate>>;
|
|
1214
|
-
IsActive: ZodBoolean;
|
|
1215
|
-
__mj_CreatedAt: ZodDate;
|
|
1216
|
-
__mj_UpdatedAt: ZodDate;
|
|
1217
|
-
Category: ZodOptional<ZodNullable<ZodString>>;
|
|
1218
|
-
User: ZodString;
|
|
1219
|
-
}, "strip", ZodTypeAny, {
|
|
1220
|
-
Category?: string;
|
|
1221
|
-
ID?: string;
|
|
1222
|
-
__mj_CreatedAt?: Date;
|
|
1223
|
-
__mj_UpdatedAt?: Date;
|
|
1224
|
-
Name?: string;
|
|
1225
|
-
Description?: string;
|
|
1226
|
-
UserID?: string;
|
|
1227
|
-
User?: string;
|
|
1228
|
-
CategoryID?: string;
|
|
1229
|
-
UserPrompt?: string;
|
|
1230
|
-
IsActive?: boolean;
|
|
1231
|
-
ActiveAt?: Date;
|
|
1232
|
-
DisabledAt?: Date;
|
|
1233
|
-
}, {
|
|
1234
|
-
Category?: string;
|
|
1235
|
-
ID?: string;
|
|
1236
|
-
__mj_CreatedAt?: Date;
|
|
1237
|
-
__mj_UpdatedAt?: Date;
|
|
1238
|
-
Name?: string;
|
|
1239
|
-
Description?: string;
|
|
1240
|
-
UserID?: string;
|
|
1241
|
-
User?: string;
|
|
1242
|
-
CategoryID?: string;
|
|
1243
|
-
UserPrompt?: string;
|
|
1244
|
-
IsActive?: boolean;
|
|
1245
|
-
ActiveAt?: Date;
|
|
1246
|
-
DisabledAt?: Date;
|
|
1247
|
-
}>;
|
|
1248
|
-
type TemplateEntityType = TypeOf<typeof TemplateSchema>;
|
|
1249
|
-
/**
|
|
1250
|
-
* zod schema definition for the entity Vector Databases
|
|
1251
|
-
*/
|
|
1252
|
-
declare const VectorDatabaseSchema: ZodObject<{
|
|
1253
|
-
ID: ZodString;
|
|
1254
|
-
Name: ZodString;
|
|
1255
|
-
Description: ZodOptional<ZodNullable<ZodString>>;
|
|
1256
|
-
DefaultURL: ZodOptional<ZodNullable<ZodString>>;
|
|
1257
|
-
ClassKey: ZodOptional<ZodNullable<ZodString>>;
|
|
1258
|
-
__mj_CreatedAt: ZodDate;
|
|
1259
|
-
__mj_UpdatedAt: ZodDate;
|
|
1260
|
-
}, "strip", ZodTypeAny, {
|
|
1261
|
-
ID?: string;
|
|
1262
|
-
__mj_CreatedAt?: Date;
|
|
1263
|
-
__mj_UpdatedAt?: Date;
|
|
1264
|
-
Name?: string;
|
|
1265
|
-
Description?: string;
|
|
1266
|
-
DefaultURL?: string;
|
|
1267
|
-
ClassKey?: string;
|
|
1268
|
-
}, {
|
|
1269
|
-
ID?: string;
|
|
1270
|
-
__mj_CreatedAt?: Date;
|
|
1271
|
-
__mj_UpdatedAt?: Date;
|
|
1272
|
-
Name?: string;
|
|
1273
|
-
Description?: string;
|
|
1274
|
-
DefaultURL?: string;
|
|
1275
|
-
ClassKey?: string;
|
|
1276
|
-
}>;
|
|
1277
|
-
type VectorDatabaseEntityType = TypeOf<typeof VectorDatabaseSchema>;
|
|
1278
|
-
/**
|
|
1279
|
-
* AI Models - strongly typed entity sub-class
|
|
1280
|
-
* * Schema: __mj
|
|
1281
|
-
* * Base Table: AIModel
|
|
1282
|
-
* * Base View: vwAIModels
|
|
1283
|
-
* * @description Catalog of all AI Models configured in the system
|
|
1284
|
-
* * Primary Key: ID
|
|
1285
|
-
* @extends {BaseEntity}
|
|
1286
|
-
* @class
|
|
1287
|
-
* @public
|
|
1288
|
-
*/
|
|
1289
|
-
declare class AIModelEntity extends BaseEntity<AIModelEntityType> {
|
|
1290
|
-
/**
|
|
1291
|
-
* Loads the AI Models record from the database
|
|
1292
|
-
* @param ID: string - primary key value to load the AI Models record.
|
|
1293
|
-
* @param EntityRelationshipsToLoad - (optional) the relationships to load
|
|
1294
|
-
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
1295
|
-
* @public
|
|
1296
|
-
* @async
|
|
1297
|
-
* @memberof AIModelEntity
|
|
1298
|
-
* @method
|
|
1299
|
-
* @override
|
|
1300
|
-
*/
|
|
1301
|
-
Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
|
|
1302
|
-
/**
|
|
1303
|
-
* * Field Name: ID
|
|
1304
|
-
* * Display Name: ID
|
|
1305
|
-
* * SQL Data Type: uniqueidentifier
|
|
1306
|
-
* * Default Value: newsequentialid()
|
|
1307
|
-
*/
|
|
1308
|
-
get ID(): string;
|
|
1309
|
-
/**
|
|
1310
|
-
* * Field Name: Name
|
|
1311
|
-
* * Display Name: Name
|
|
1312
|
-
* * SQL Data Type: nvarchar(50)
|
|
1313
|
-
*/
|
|
1314
|
-
get Name(): string;
|
|
1315
|
-
set Name(value: string);
|
|
1316
|
-
/**
|
|
1317
|
-
* * Field Name: Description
|
|
1318
|
-
* * Display Name: Description
|
|
1319
|
-
* * SQL Data Type: nvarchar(MAX)
|
|
1320
|
-
*/
|
|
1321
|
-
get Description(): string | null;
|
|
1322
|
-
set Description(value: string | null);
|
|
1323
|
-
/**
|
|
1324
|
-
* * Field Name: Vendor
|
|
1325
|
-
* * Display Name: Vendor
|
|
1326
|
-
* * SQL Data Type: nvarchar(50)
|
|
1327
|
-
*/
|
|
1328
|
-
get Vendor(): string | null;
|
|
1329
|
-
set Vendor(value: string | null);
|
|
1330
|
-
/**
|
|
1331
|
-
* * Field Name: AIModelTypeID
|
|
1332
|
-
* * Display Name: AI Model Type ID
|
|
1333
|
-
* * SQL Data Type: uniqueidentifier
|
|
1334
|
-
* * Related Entity/Foreign Key: AI Model Types (vwAIModelTypes.ID)
|
|
1335
|
-
*/
|
|
1336
|
-
get AIModelTypeID(): string;
|
|
1337
|
-
set AIModelTypeID(value: string);
|
|
1338
|
-
/**
|
|
1339
|
-
* * Field Name: PowerRank
|
|
1340
|
-
* * Display Name: Power Rank
|
|
1341
|
-
* * SQL Data Type: int
|
|
1342
|
-
* * Default Value: 0
|
|
1343
|
-
* * Description: Optional column that ranks the power of the AI model. Default is 0 and should be non-negative.
|
|
1344
|
-
*/
|
|
1345
|
-
get PowerRank(): number | null;
|
|
1346
|
-
set PowerRank(value: number | null);
|
|
1347
|
-
/**
|
|
1348
|
-
* * Field Name: IsActive
|
|
1349
|
-
* * Display Name: Is Active
|
|
1350
|
-
* * SQL Data Type: bit
|
|
1351
|
-
* * Default Value: 1
|
|
1352
|
-
*/
|
|
1353
|
-
get IsActive(): boolean;
|
|
1354
|
-
set IsActive(value: boolean);
|
|
1355
|
-
/**
|
|
1356
|
-
* * Field Name: DriverClass
|
|
1357
|
-
* * Display Name: Driver Class
|
|
1358
|
-
* * SQL Data Type: nvarchar(100)
|
|
1359
|
-
*/
|
|
1360
|
-
get DriverClass(): string | null;
|
|
1361
|
-
set DriverClass(value: string | null);
|
|
1362
|
-
/**
|
|
1363
|
-
* * Field Name: DriverImportPath
|
|
1364
|
-
* * Display Name: Driver Import Path
|
|
1365
|
-
* * SQL Data Type: nvarchar(255)
|
|
1366
|
-
*/
|
|
1367
|
-
get DriverImportPath(): string | null;
|
|
1368
|
-
set DriverImportPath(value: string | null);
|
|
1369
|
-
/**
|
|
1370
|
-
* * Field Name: APIName
|
|
1371
|
-
* * Display Name: APIName
|
|
1372
|
-
* * SQL Data Type: nvarchar(100)
|
|
1373
|
-
* * Description: The name of the model to use with API calls which might differ from the Name, if APIName is not provided, Name will be used for API calls
|
|
1374
|
-
*/
|
|
1375
|
-
get APIName(): string | null;
|
|
1376
|
-
set APIName(value: string | null);
|
|
1377
|
-
/**
|
|
1378
|
-
* * Field Name: __mj_CreatedAt
|
|
1379
|
-
* * Display Name: Created At
|
|
1380
|
-
* * SQL Data Type: datetimeoffset
|
|
1381
|
-
* * Default Value: getutcdate()
|
|
1382
|
-
*/
|
|
1383
|
-
get __mj_CreatedAt(): Date;
|
|
1384
|
-
/**
|
|
1385
|
-
* * Field Name: __mj_UpdatedAt
|
|
1386
|
-
* * Display Name: Updated At
|
|
1387
|
-
* * SQL Data Type: datetimeoffset
|
|
1388
|
-
* * Default Value: getutcdate()
|
|
1389
|
-
*/
|
|
1390
|
-
get __mj_UpdatedAt(): Date;
|
|
1391
|
-
/**
|
|
1392
|
-
* * Field Name: SpeedRank
|
|
1393
|
-
* * Display Name: Speed Rank
|
|
1394
|
-
* * SQL Data Type: int
|
|
1395
|
-
* * Default Value: 0
|
|
1396
|
-
* * Description: Optional column that ranks the speed of the AI model. Default is 0 and should be non-negative.
|
|
1397
|
-
*/
|
|
1398
|
-
get SpeedRank(): number | null;
|
|
1399
|
-
set SpeedRank(value: number | null);
|
|
1400
|
-
/**
|
|
1401
|
-
* * Field Name: CostRank
|
|
1402
|
-
* * Display Name: Cost Rank
|
|
1403
|
-
* * SQL Data Type: int
|
|
1404
|
-
* * Default Value: 0
|
|
1405
|
-
* * Description: Optional column that ranks the cost of the AI model. Default is 0 and should be non-negative.
|
|
1406
|
-
*/
|
|
1407
|
-
get CostRank(): number | null;
|
|
1408
|
-
set CostRank(value: number | null);
|
|
1409
|
-
/**
|
|
1410
|
-
* * Field Name: ModelSelectionInsights
|
|
1411
|
-
* * Display Name: Model Selection Insights
|
|
1412
|
-
* * SQL Data Type: nvarchar(MAX)
|
|
1413
|
-
* * Description: This column stores unstructured text notes that provide insights into what the model is particularly good at and areas where it may not perform as well. These notes can be used by a human or an AI to determine if the model is a good fit for various purposes.
|
|
1414
|
-
*/
|
|
1415
|
-
get ModelSelectionInsights(): string | null;
|
|
1416
|
-
set ModelSelectionInsights(value: string | null);
|
|
1417
|
-
/**
|
|
1418
|
-
* * Field Name: AIModelType
|
|
1419
|
-
* * Display Name: AIModel Type
|
|
1420
|
-
* * SQL Data Type: nvarchar(50)
|
|
1421
|
-
*/
|
|
1422
|
-
get AIModelType(): string;
|
|
1423
|
-
}
|
|
1424
|
-
/**
|
|
1425
|
-
* Entity Documents - strongly typed entity sub-class
|
|
1426
|
-
* * Schema: __mj
|
|
1427
|
-
* * Base Table: EntityDocument
|
|
1428
|
-
* * Base View: vwEntityDocuments
|
|
1429
|
-
* * Primary Key: ID
|
|
1430
|
-
* @extends {BaseEntity}
|
|
1431
|
-
* @class
|
|
1432
|
-
* @public
|
|
1433
|
-
*/
|
|
1434
|
-
declare class EntityDocumentEntity extends BaseEntity<EntityDocumentEntityType> {
|
|
1435
|
-
/**
|
|
1436
|
-
* Loads the Entity Documents record from the database
|
|
1437
|
-
* @param ID: string - primary key value to load the Entity Documents record.
|
|
1438
|
-
* @param EntityRelationshipsToLoad - (optional) the relationships to load
|
|
1439
|
-
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
1440
|
-
* @public
|
|
1441
|
-
* @async
|
|
1442
|
-
* @memberof EntityDocumentEntity
|
|
1443
|
-
* @method
|
|
1444
|
-
* @override
|
|
1445
|
-
*/
|
|
1446
|
-
Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
|
|
1447
|
-
/**
|
|
1448
|
-
* Entity Documents - AllowDeleteAPI is set to 0 in the database. Delete is not allowed, so this method is generated to override the base class method and throw an error. To enable delete for this entity, set AllowDeleteAPI to 1 in the database.
|
|
1449
|
-
* @public
|
|
1450
|
-
* @method
|
|
1451
|
-
* @override
|
|
1452
|
-
* @memberof EntityDocumentEntity
|
|
1453
|
-
* @throws {Error} - Delete is not allowed for Entity Documents, to enable it set AllowDeleteAPI to 1 in the database.
|
|
1454
|
-
*/
|
|
1455
|
-
Delete(): Promise<boolean>;
|
|
1456
|
-
/**
|
|
1457
|
-
* * Field Name: ID
|
|
1458
|
-
* * Display Name: ID
|
|
1459
|
-
* * SQL Data Type: uniqueidentifier
|
|
1460
|
-
* * Default Value: newsequentialid()
|
|
1461
|
-
*/
|
|
1462
|
-
get ID(): string;
|
|
1463
|
-
/**
|
|
1464
|
-
* * Field Name: Name
|
|
1465
|
-
* * Display Name: Name
|
|
1466
|
-
* * SQL Data Type: nvarchar(250)
|
|
1467
|
-
*/
|
|
1468
|
-
get Name(): string;
|
|
1469
|
-
set Name(value: string);
|
|
1470
|
-
/**
|
|
1471
|
-
* * Field Name: TypeID
|
|
1472
|
-
* * Display Name: Type ID
|
|
1473
|
-
* * SQL Data Type: uniqueidentifier
|
|
1474
|
-
* * Related Entity/Foreign Key: Entity Document Types (vwEntityDocumentTypes.ID)
|
|
1475
|
-
*/
|
|
1476
|
-
get TypeID(): string;
|
|
1477
|
-
set TypeID(value: string);
|
|
1478
|
-
/**
|
|
1479
|
-
* * Field Name: EntityID
|
|
1480
|
-
* * Display Name: Entity ID
|
|
1481
|
-
* * SQL Data Type: uniqueidentifier
|
|
1482
|
-
* * Related Entity/Foreign Key: Entities (vwEntities.ID)
|
|
1483
|
-
*/
|
|
1484
|
-
get EntityID(): string;
|
|
1485
|
-
set EntityID(value: string);
|
|
1486
|
-
/**
|
|
1487
|
-
* * Field Name: VectorDatabaseID
|
|
1488
|
-
* * Display Name: Vector Database ID
|
|
1489
|
-
* * SQL Data Type: uniqueidentifier
|
|
1490
|
-
* * Related Entity/Foreign Key: Vector Databases (vwVectorDatabases.ID)
|
|
1491
|
-
*/
|
|
1492
|
-
get VectorDatabaseID(): string;
|
|
1493
|
-
set VectorDatabaseID(value: string);
|
|
1494
|
-
/**
|
|
1495
|
-
* * Field Name: Status
|
|
1496
|
-
* * Display Name: Status
|
|
1497
|
-
* * SQL Data Type: nvarchar(15)
|
|
1498
|
-
* * Default Value: Active
|
|
1499
|
-
* * Value List Type: List
|
|
1500
|
-
* * Possible Values
|
|
1501
|
-
* * Active
|
|
1502
|
-
* * Inactive
|
|
1503
|
-
*/
|
|
1504
|
-
get Status(): 'Active' | 'Inactive';
|
|
1505
|
-
set Status(value: 'Active' | 'Inactive');
|
|
1506
|
-
/**
|
|
1507
|
-
* * Field Name: TemplateID
|
|
1508
|
-
* * Display Name: Template ID
|
|
1509
|
-
* * SQL Data Type: uniqueidentifier
|
|
1510
|
-
* * Related Entity/Foreign Key: Templates (vwTemplates.ID)
|
|
1511
|
-
*/
|
|
1512
|
-
get TemplateID(): string;
|
|
1513
|
-
set TemplateID(value: string);
|
|
1514
|
-
/**
|
|
1515
|
-
* * Field Name: AIModelID
|
|
1516
|
-
* * Display Name: AIModel ID
|
|
1517
|
-
* * SQL Data Type: uniqueidentifier
|
|
1518
|
-
* * Related Entity/Foreign Key: AI Models (vwAIModels.ID)
|
|
1519
|
-
*/
|
|
1520
|
-
get AIModelID(): string;
|
|
1521
|
-
set AIModelID(value: string);
|
|
1522
|
-
/**
|
|
1523
|
-
* * Field Name: PotentialMatchThreshold
|
|
1524
|
-
* * Display Name: Potential Match Threshold
|
|
1525
|
-
* * SQL Data Type: numeric(12, 11)
|
|
1526
|
-
* * Default Value: 1
|
|
1527
|
-
* * Description: Value between 0 and 1 that determines what is considered a potential matching record. Value must be <= AbsoluteMatchThreshold. This is primarily used for duplicate detection but can be used for other applications as well where matching is relevant.
|
|
1528
|
-
*/
|
|
1529
|
-
get PotentialMatchThreshold(): number;
|
|
1530
|
-
set PotentialMatchThreshold(value: number);
|
|
1531
|
-
/**
|
|
1532
|
-
* * Field Name: AbsoluteMatchThreshold
|
|
1533
|
-
* * Display Name: Absolute Match Threshold
|
|
1534
|
-
* * SQL Data Type: numeric(12, 11)
|
|
1535
|
-
* * Default Value: 1
|
|
1536
|
-
* * Description: Value between 0 and 1 that determines what is considered an absolute matching record. Value must be >= PotentialMatchThreshold. This is primarily used for duplicate detection but can be used for other applications as well where matching is relevant.
|
|
1537
|
-
*/
|
|
1538
|
-
get AbsoluteMatchThreshold(): number;
|
|
1539
|
-
set AbsoluteMatchThreshold(value: number);
|
|
1540
|
-
/**
|
|
1541
|
-
* * Field Name: __mj_CreatedAt
|
|
1542
|
-
* * Display Name: __mj _Created At
|
|
1543
|
-
* * SQL Data Type: datetimeoffset
|
|
1544
|
-
* * Default Value: getutcdate()
|
|
1545
|
-
*/
|
|
1546
|
-
get __mj_CreatedAt(): Date;
|
|
1547
|
-
/**
|
|
1548
|
-
* * Field Name: __mj_UpdatedAt
|
|
1549
|
-
* * Display Name: __mj _Updated At
|
|
1550
|
-
* * SQL Data Type: datetimeoffset
|
|
1551
|
-
* * Default Value: getutcdate()
|
|
1552
|
-
*/
|
|
1553
|
-
get __mj_UpdatedAt(): Date;
|
|
1554
|
-
/**
|
|
1555
|
-
* * Field Name: Type
|
|
1556
|
-
* * Display Name: Type
|
|
1557
|
-
* * SQL Data Type: nvarchar(100)
|
|
1558
|
-
*/
|
|
1559
|
-
get Type(): string;
|
|
1560
|
-
/**
|
|
1561
|
-
* * Field Name: Entity
|
|
1562
|
-
* * Display Name: Entity
|
|
1563
|
-
* * SQL Data Type: nvarchar(255)
|
|
1564
|
-
*/
|
|
1565
|
-
get Entity(): string;
|
|
1566
|
-
/**
|
|
1567
|
-
* * Field Name: VectorDatabase
|
|
1568
|
-
* * Display Name: Vector Database
|
|
1569
|
-
* * SQL Data Type: nvarchar(100)
|
|
1570
|
-
*/
|
|
1571
|
-
get VectorDatabase(): string;
|
|
1572
|
-
/**
|
|
1573
|
-
* * Field Name: Template
|
|
1574
|
-
* * Display Name: Template
|
|
1575
|
-
* * SQL Data Type: nvarchar(255)
|
|
1576
|
-
*/
|
|
1577
|
-
get Template(): string;
|
|
1578
|
-
/**
|
|
1579
|
-
* * Field Name: AIModel
|
|
1580
|
-
* * Display Name: AIModel
|
|
1581
|
-
* * SQL Data Type: nvarchar(50)
|
|
1582
|
-
*/
|
|
1583
|
-
get AIModel(): string;
|
|
1584
|
-
}
|
|
1585
|
-
/**
|
|
1586
|
-
* Template Contents - strongly typed entity sub-class
|
|
1587
|
-
* * Schema: __mj
|
|
1588
|
-
* * Base Table: TemplateContent
|
|
1589
|
-
* * Base View: vwTemplateContents
|
|
1590
|
-
* * @description Template content for different versions of a template for purposes like HTML/Text/etc
|
|
1591
|
-
* * Primary Key: ID
|
|
1592
|
-
* @extends {BaseEntity}
|
|
1593
|
-
* @class
|
|
1594
|
-
* @public
|
|
1595
|
-
*/
|
|
1596
|
-
declare class TemplateContentEntity extends BaseEntity<TemplateContentEntityType> {
|
|
1597
|
-
/**
|
|
1598
|
-
* Loads the Template Contents record from the database
|
|
1599
|
-
* @param ID: string - primary key value to load the Template Contents record.
|
|
1600
|
-
* @param EntityRelationshipsToLoad - (optional) the relationships to load
|
|
1601
|
-
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
1602
|
-
* @public
|
|
1603
|
-
* @async
|
|
1604
|
-
* @memberof TemplateContentEntity
|
|
1605
|
-
* @method
|
|
1606
|
-
* @override
|
|
1607
|
-
*/
|
|
1608
|
-
Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
|
|
1609
|
-
/**
|
|
1610
|
-
* Template Contents - AllowDeleteAPI is set to 0 in the database. Delete is not allowed, so this method is generated to override the base class method and throw an error. To enable delete for this entity, set AllowDeleteAPI to 1 in the database.
|
|
1611
|
-
* @public
|
|
1612
|
-
* @method
|
|
1613
|
-
* @override
|
|
1614
|
-
* @memberof TemplateContentEntity
|
|
1615
|
-
* @throws {Error} - Delete is not allowed for Template Contents, to enable it set AllowDeleteAPI to 1 in the database.
|
|
1616
|
-
*/
|
|
1617
|
-
Delete(): Promise<boolean>;
|
|
1618
|
-
/**
|
|
1619
|
-
* * Field Name: ID
|
|
1620
|
-
* * Display Name: ID
|
|
1621
|
-
* * SQL Data Type: uniqueidentifier
|
|
1622
|
-
* * Default Value: newsequentialid()
|
|
1623
|
-
*/
|
|
1624
|
-
get ID(): string;
|
|
1625
|
-
/**
|
|
1626
|
-
* * Field Name: TemplateID
|
|
1627
|
-
* * Display Name: Template ID
|
|
1628
|
-
* * SQL Data Type: uniqueidentifier
|
|
1629
|
-
* * Related Entity/Foreign Key: Templates (vwTemplates.ID)
|
|
1630
|
-
*/
|
|
1631
|
-
get TemplateID(): string;
|
|
1632
|
-
set TemplateID(value: string);
|
|
1633
|
-
/**
|
|
1634
|
-
* * Field Name: TypeID
|
|
1635
|
-
* * Display Name: Type ID
|
|
1636
|
-
* * SQL Data Type: uniqueidentifier
|
|
1637
|
-
* * Related Entity/Foreign Key: Template Content Types (vwTemplateContentTypes.ID)
|
|
1638
|
-
*/
|
|
1639
|
-
get TypeID(): string;
|
|
1640
|
-
set TypeID(value: string);
|
|
1641
|
-
/**
|
|
1642
|
-
* * Field Name: TemplateText
|
|
1643
|
-
* * Display Name: Template Text
|
|
1644
|
-
* * SQL Data Type: nvarchar(MAX)
|
|
1645
|
-
* * Description: The actual text content for the template
|
|
1646
|
-
*/
|
|
1647
|
-
get TemplateText(): string | null;
|
|
1648
|
-
set TemplateText(value: string | null);
|
|
1649
|
-
/**
|
|
1650
|
-
* * Field Name: Priority
|
|
1651
|
-
* * Display Name: Priority
|
|
1652
|
-
* * SQL Data Type: int
|
|
1653
|
-
* * Description: Priority of the content version, higher priority versions will be used ahead of lower priority versions for a given Type
|
|
1654
|
-
*/
|
|
1655
|
-
get Priority(): number;
|
|
1656
|
-
set Priority(value: number);
|
|
1657
|
-
/**
|
|
1658
|
-
* * Field Name: IsActive
|
|
1659
|
-
* * Display Name: Is Active
|
|
1660
|
-
* * SQL Data Type: bit
|
|
1661
|
-
* * Default Value: 1
|
|
1662
|
-
* * Description: Indicates whether the content is active or not. Use this to disable a particular Template Content item without having to remove it
|
|
1663
|
-
*/
|
|
1664
|
-
get IsActive(): boolean;
|
|
1665
|
-
set IsActive(value: boolean);
|
|
1666
|
-
/**
|
|
1667
|
-
* * Field Name: __mj_CreatedAt
|
|
1668
|
-
* * Display Name: Created At
|
|
1669
|
-
* * SQL Data Type: datetimeoffset
|
|
1670
|
-
* * Default Value: getutcdate()
|
|
1671
|
-
*/
|
|
1672
|
-
get __mj_CreatedAt(): Date;
|
|
1673
|
-
/**
|
|
1674
|
-
* * Field Name: __mj_UpdatedAt
|
|
1675
|
-
* * Display Name: Updated At
|
|
1676
|
-
* * SQL Data Type: datetimeoffset
|
|
1677
|
-
* * Default Value: getutcdate()
|
|
1678
|
-
*/
|
|
1679
|
-
get __mj_UpdatedAt(): Date;
|
|
1680
|
-
/**
|
|
1681
|
-
* * Field Name: Template
|
|
1682
|
-
* * Display Name: Template
|
|
1683
|
-
* * SQL Data Type: nvarchar(255)
|
|
1684
|
-
*/
|
|
1685
|
-
get Template(): string;
|
|
1686
|
-
/**
|
|
1687
|
-
* * Field Name: Type
|
|
1688
|
-
* * Display Name: Type
|
|
1689
|
-
* * SQL Data Type: nvarchar(255)
|
|
1690
|
-
*/
|
|
1691
|
-
get Type(): string;
|
|
1692
|
-
}
|
|
1693
|
-
/**
|
|
1694
|
-
* Templates - strongly typed entity sub-class
|
|
1695
|
-
* * Schema: __mj
|
|
1696
|
-
* * Base Table: Template
|
|
1697
|
-
* * Base View: vwTemplates
|
|
1698
|
-
* * @description Templates are used for dynamic expansion of a static template with data from a given context. Templates can be used to create documents, messages and anything else that requires dynamic document creation merging together static text, data and lightweight logic
|
|
1699
|
-
* * Primary Key: ID
|
|
1700
|
-
* @extends {BaseEntity}
|
|
1701
|
-
* @class
|
|
1702
|
-
* @public
|
|
1703
|
-
*/
|
|
1704
|
-
declare class TemplateEntity extends BaseEntity<TemplateEntityType> {
|
|
1705
|
-
/**
|
|
1706
|
-
* Loads the Templates record from the database
|
|
1707
|
-
* @param ID: string - primary key value to load the Templates record.
|
|
1708
|
-
* @param EntityRelationshipsToLoad - (optional) the relationships to load
|
|
1709
|
-
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
1710
|
-
* @public
|
|
1711
|
-
* @async
|
|
1712
|
-
* @memberof TemplateEntity
|
|
1713
|
-
* @method
|
|
1714
|
-
* @override
|
|
1715
|
-
*/
|
|
1716
|
-
Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
|
|
1717
|
-
/**
|
|
1718
|
-
* Templates - AllowDeleteAPI is set to 0 in the database. Delete is not allowed, so this method is generated to override the base class method and throw an error. To enable delete for this entity, set AllowDeleteAPI to 1 in the database.
|
|
1719
|
-
* @public
|
|
1720
|
-
* @method
|
|
1721
|
-
* @override
|
|
1722
|
-
* @memberof TemplateEntity
|
|
1723
|
-
* @throws {Error} - Delete is not allowed for Templates, to enable it set AllowDeleteAPI to 1 in the database.
|
|
1724
|
-
*/
|
|
1725
|
-
Delete(): Promise<boolean>;
|
|
1726
|
-
/**
|
|
1727
|
-
* * Field Name: ID
|
|
1728
|
-
* * Display Name: ID
|
|
1729
|
-
* * SQL Data Type: uniqueidentifier
|
|
1730
|
-
* * Default Value: newsequentialid()
|
|
1731
|
-
*/
|
|
1732
|
-
get ID(): string;
|
|
1733
|
-
/**
|
|
1734
|
-
* * Field Name: Name
|
|
1735
|
-
* * Display Name: Name
|
|
1736
|
-
* * SQL Data Type: nvarchar(255)
|
|
1737
|
-
* * Description: Name of the template
|
|
1738
|
-
*/
|
|
1739
|
-
get Name(): string;
|
|
1740
|
-
set Name(value: string);
|
|
1741
|
-
/**
|
|
1742
|
-
* * Field Name: Description
|
|
1743
|
-
* * Display Name: Description
|
|
1744
|
-
* * SQL Data Type: nvarchar(MAX)
|
|
1745
|
-
* * Description: Description of the template
|
|
1746
|
-
*/
|
|
1747
|
-
get Description(): string | null;
|
|
1748
|
-
set Description(value: string | null);
|
|
1749
|
-
/**
|
|
1750
|
-
* * Field Name: CategoryID
|
|
1751
|
-
* * Display Name: Category ID
|
|
1752
|
-
* * SQL Data Type: uniqueidentifier
|
|
1753
|
-
* * Related Entity/Foreign Key: Template Categories (vwTemplateCategories.ID)
|
|
1754
|
-
*/
|
|
1755
|
-
get CategoryID(): string | null;
|
|
1756
|
-
set CategoryID(value: string | null);
|
|
1757
|
-
/**
|
|
1758
|
-
* * Field Name: UserPrompt
|
|
1759
|
-
* * Display Name: User Prompt
|
|
1760
|
-
* * SQL Data Type: nvarchar(MAX)
|
|
1761
|
-
* * Description: This prompt will be used by the AI to generate template content as requested by the user.
|
|
1762
|
-
*/
|
|
1763
|
-
get UserPrompt(): string | null;
|
|
1764
|
-
set UserPrompt(value: string | null);
|
|
1765
|
-
/**
|
|
1766
|
-
* * Field Name: UserID
|
|
1767
|
-
* * Display Name: User ID
|
|
1768
|
-
* * SQL Data Type: uniqueidentifier
|
|
1769
|
-
* * Related Entity/Foreign Key: Users (vwUsers.ID)
|
|
1770
|
-
*/
|
|
1771
|
-
get UserID(): string;
|
|
1772
|
-
set UserID(value: string);
|
|
1773
|
-
/**
|
|
1774
|
-
* * Field Name: ActiveAt
|
|
1775
|
-
* * Display Name: Active At
|
|
1776
|
-
* * SQL Data Type: datetime
|
|
1777
|
-
* * Description: Optional, if provided, this template will not be available for use until the specified date. Requires IsActive to be set to 1
|
|
1778
|
-
*/
|
|
1779
|
-
get ActiveAt(): Date | null;
|
|
1780
|
-
set ActiveAt(value: Date | null);
|
|
1781
|
-
/**
|
|
1782
|
-
* * Field Name: DisabledAt
|
|
1783
|
-
* * Display Name: Disabled At
|
|
1784
|
-
* * SQL Data Type: datetime
|
|
1785
|
-
* * Description: Optional, if provided, this template will not be available for use after the specified date. If IsActive=0, this has no effect.
|
|
1786
|
-
*/
|
|
1787
|
-
get DisabledAt(): Date | null;
|
|
1788
|
-
set DisabledAt(value: Date | null);
|
|
1789
|
-
/**
|
|
1790
|
-
* * Field Name: IsActive
|
|
1791
|
-
* * Display Name: Is Active
|
|
1792
|
-
* * SQL Data Type: bit
|
|
1793
|
-
* * Default Value: 1
|
|
1794
|
-
* * Description: If set to 0, the template will be disabled regardless of the values in ActiveAt/DisabledAt.
|
|
1795
|
-
*/
|
|
1796
|
-
get IsActive(): boolean;
|
|
1797
|
-
set IsActive(value: boolean);
|
|
1798
|
-
/**
|
|
1799
|
-
* * Field Name: __mj_CreatedAt
|
|
1800
|
-
* * Display Name: Created At
|
|
1801
|
-
* * SQL Data Type: datetimeoffset
|
|
1802
|
-
* * Default Value: getutcdate()
|
|
1803
|
-
*/
|
|
1804
|
-
get __mj_CreatedAt(): Date;
|
|
1805
|
-
/**
|
|
1806
|
-
* * Field Name: __mj_UpdatedAt
|
|
1807
|
-
* * Display Name: Updated At
|
|
1808
|
-
* * SQL Data Type: datetimeoffset
|
|
1809
|
-
* * Default Value: getutcdate()
|
|
1810
|
-
*/
|
|
1811
|
-
get __mj_UpdatedAt(): Date;
|
|
1812
|
-
/**
|
|
1813
|
-
* * Field Name: Category
|
|
1814
|
-
* * Display Name: Category
|
|
1815
|
-
* * SQL Data Type: nvarchar(255)
|
|
1816
|
-
*/
|
|
1817
|
-
get Category(): string | null;
|
|
1818
|
-
/**
|
|
1819
|
-
* * Field Name: User
|
|
1820
|
-
* * Display Name: User
|
|
1821
|
-
* * SQL Data Type: nvarchar(100)
|
|
1822
|
-
*/
|
|
1823
|
-
get User(): string;
|
|
1824
|
-
}
|
|
1825
|
-
/**
|
|
1826
|
-
* Vector Databases - strongly typed entity sub-class
|
|
1827
|
-
* * Schema: __mj
|
|
1828
|
-
* * Base Table: VectorDatabase
|
|
1829
|
-
* * Base View: vwVectorDatabases
|
|
1830
|
-
* * Primary Key: ID
|
|
1831
|
-
* @extends {BaseEntity}
|
|
1832
|
-
* @class
|
|
1833
|
-
* @public
|
|
1834
|
-
*/
|
|
1835
|
-
declare class VectorDatabaseEntity extends BaseEntity<VectorDatabaseEntityType> {
|
|
1836
|
-
/**
|
|
1837
|
-
* Loads the Vector Databases record from the database
|
|
1838
|
-
* @param ID: string - primary key value to load the Vector Databases record.
|
|
1839
|
-
* @param EntityRelationshipsToLoad - (optional) the relationships to load
|
|
1840
|
-
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
1841
|
-
* @public
|
|
1842
|
-
* @async
|
|
1843
|
-
* @memberof VectorDatabaseEntity
|
|
1844
|
-
* @method
|
|
1845
|
-
* @override
|
|
1846
|
-
*/
|
|
1847
|
-
Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
|
|
1848
|
-
/**
|
|
1849
|
-
* Vector Databases - AllowDeleteAPI is set to 0 in the database. Delete is not allowed, so this method is generated to override the base class method and throw an error. To enable delete for this entity, set AllowDeleteAPI to 1 in the database.
|
|
1850
|
-
* @public
|
|
1851
|
-
* @method
|
|
1852
|
-
* @override
|
|
1853
|
-
* @memberof VectorDatabaseEntity
|
|
1854
|
-
* @throws {Error} - Delete is not allowed for Vector Databases, to enable it set AllowDeleteAPI to 1 in the database.
|
|
1855
|
-
*/
|
|
1856
|
-
Delete(): Promise<boolean>;
|
|
1857
|
-
/**
|
|
1858
|
-
* * Field Name: ID
|
|
1859
|
-
* * Display Name: ID
|
|
1860
|
-
* * SQL Data Type: uniqueidentifier
|
|
1861
|
-
* * Default Value: newsequentialid()
|
|
1862
|
-
*/
|
|
1863
|
-
get ID(): string;
|
|
1864
|
-
/**
|
|
1865
|
-
* * Field Name: Name
|
|
1866
|
-
* * Display Name: Name
|
|
1867
|
-
* * SQL Data Type: nvarchar(100)
|
|
1868
|
-
*/
|
|
1869
|
-
get Name(): string;
|
|
1870
|
-
set Name(value: string);
|
|
1871
|
-
/**
|
|
1872
|
-
* * Field Name: Description
|
|
1873
|
-
* * Display Name: Description
|
|
1874
|
-
* * SQL Data Type: nvarchar(MAX)
|
|
1875
|
-
*/
|
|
1876
|
-
get Description(): string | null;
|
|
1877
|
-
set Description(value: string | null);
|
|
1878
|
-
/**
|
|
1879
|
-
* * Field Name: DefaultURL
|
|
1880
|
-
* * Display Name: Default URL
|
|
1881
|
-
* * SQL Data Type: nvarchar(255)
|
|
1882
|
-
*/
|
|
1883
|
-
get DefaultURL(): string | null;
|
|
1884
|
-
set DefaultURL(value: string | null);
|
|
1885
|
-
/**
|
|
1886
|
-
* * Field Name: ClassKey
|
|
1887
|
-
* * Display Name: Class Key
|
|
1888
|
-
* * SQL Data Type: nvarchar(100)
|
|
1889
|
-
*/
|
|
1890
|
-
get ClassKey(): string | null;
|
|
1891
|
-
set ClassKey(value: string | null);
|
|
1892
|
-
/**
|
|
1893
|
-
* * Field Name: __mj_CreatedAt
|
|
1894
|
-
* * Display Name: Created At
|
|
1895
|
-
* * SQL Data Type: datetimeoffset
|
|
1896
|
-
* * Default Value: getutcdate()
|
|
1897
|
-
*/
|
|
1898
|
-
get __mj_CreatedAt(): Date;
|
|
1899
|
-
/**
|
|
1900
|
-
* * Field Name: __mj_UpdatedAt
|
|
1901
|
-
* * Display Name: Updated At
|
|
1902
|
-
* * SQL Data Type: datetimeoffset
|
|
1903
|
-
* * Default Value: getutcdate()
|
|
1904
|
-
*/
|
|
1905
|
-
get __mj_UpdatedAt(): Date;
|
|
1906
|
-
}
|
|
1907
|
-
|
|
1908
|
-
type VectorizeEntityParams = {
|
|
1909
|
-
entityID: string;
|
|
1910
|
-
entityDocumentID?: string;
|
|
1911
|
-
batchCount?: number;
|
|
1912
|
-
options?: any;
|
|
1913
|
-
};
|
|
1914
|
-
type VectorizeEntityResponse = {
|
|
1915
|
-
success: boolean;
|
|
1916
|
-
status: string;
|
|
1917
|
-
errorMessage: string;
|
|
1918
|
-
};
|
|
1919
|
-
type EmbeddingData = {
|
|
1920
|
-
ID: number;
|
|
1921
|
-
Vector: number[];
|
|
1922
|
-
VectorID?: unknown;
|
|
1923
|
-
EntityData: Record<string, any>;
|
|
1924
|
-
__mj_recordID: unknown;
|
|
1925
|
-
__mj_compositeKey?: unknown;
|
|
1926
|
-
EntityDocument?: Record<string, unknown>;
|
|
1927
|
-
TemplateContent?: string;
|
|
1928
|
-
VectorIndexID?: unknown;
|
|
1929
|
-
};
|
|
1930
|
-
type VectorEmeddingData = {
|
|
1931
|
-
embedding: Embeddings;
|
|
1932
|
-
vectorDB: VectorDBBase;
|
|
1933
|
-
vectorDBClassKey: string;
|
|
1934
|
-
vectorDBAPIKey: string;
|
|
1935
|
-
embeddingDriverClass: string;
|
|
1936
|
-
embeddingAPIKey: string;
|
|
1937
|
-
};
|
|
1938
|
-
type AnnotateWorkerContext = {
|
|
1939
|
-
executionId: number;
|
|
1940
|
-
entity: BaseEntity;
|
|
1941
|
-
entityDocument: Record<string, unknown>;
|
|
1942
|
-
template: TemplateEntityExtended;
|
|
1943
|
-
templateContent: TemplateContentEntity;
|
|
1944
|
-
embeddingDriverClass: string;
|
|
1945
|
-
embeddingAPIKey: string;
|
|
1946
|
-
delayTimeMS: number;
|
|
1947
|
-
};
|
|
1948
|
-
type ArchiveWorkerContext = {
|
|
1949
|
-
executionId: number;
|
|
1950
|
-
entity: BaseEntity;
|
|
1951
|
-
entityDocument: EntityDocumentEntity;
|
|
1952
|
-
vectorDBClassKey: string;
|
|
1953
|
-
vectorDBAPIKey: string;
|
|
1954
|
-
templateContent: TemplateContentEntity;
|
|
1955
|
-
embeddings: EmbedTextsResult;
|
|
1956
|
-
delayTimeMS: number;
|
|
1957
|
-
};
|
|
1958
|
-
type TemplateParamData = {
|
|
1959
|
-
ParamName: string;
|
|
1960
|
-
Data: unknown[];
|
|
1961
|
-
};
|
|
1962
|
-
|
|
1963
|
-
type EntitySyncConfig = {
|
|
1964
|
-
EntityDocumentID: string;
|
|
1965
|
-
Interval: number;
|
|
1966
|
-
RunViewParams: RunViewParams;
|
|
1967
|
-
IncludeInSync: boolean;
|
|
1968
|
-
LastRunDate: string;
|
|
1969
|
-
VectorIndexID: number;
|
|
1970
|
-
VectorID: number;
|
|
1971
|
-
};
|
|
1972
|
-
|
|
1973
|
-
declare class EntityVectorSyncer extends VectorBase {
|
|
1974
|
-
_startTime: Date;
|
|
1975
|
-
_endTime: Date;
|
|
1976
|
-
constructor();
|
|
1977
|
-
Config(forceRefresh: boolean, contextUser?: UserInfo): Promise<void>;
|
|
1978
|
-
VectorizeEntity(params: VectorizeEntityParams, contextUser?: UserInfo): Promise<VectorizeEntityResponse>;
|
|
1979
|
-
CreateDefaultEntityDocument(EntityID: string, VectorDatabase: VectorDatabaseEntity, AIModel: AIModelEntity): Promise<EntityDocumentEntity>;
|
|
1980
|
-
protected GetVectorDatabaseAndEmbeddingClassByEntityDocumentID(entityDocumentID: string, createDocumentIfNotFound?: boolean): Promise<VectorEmeddingData>;
|
|
1981
|
-
GetEntityDocument(EntityDocumentID: string): Promise<EntityDocumentEntity | null>;
|
|
1982
|
-
GetEntityDocumentByName(EntityDocumentName: string, ContextUser?: UserInfo): Promise<EntityDocumentEntity | null>;
|
|
1983
|
-
GetActiveEntityDocuments(entityNames?: string[]): Promise<EntityDocumentEntity[]>;
|
|
1984
|
-
private GetOrCreateVectorIndex;
|
|
1985
|
-
protected CreateTemplateForEntityDocument(entityDocument: EntityDocumentEntity): Promise<TemplateEntity>;
|
|
1986
|
-
protected BuildTemplateContent(entityFields: EntityField[]): string;
|
|
1987
|
-
protected GetEntityFieldsForSimilaritySearch(entityID: string): Promise<EntityField[]>;
|
|
1988
|
-
protected GetTemplateData(entity: EntityInfo, record: unknown, template: TemplateEntityExtended, relatedData: TemplateParamData[]): Promise<{
|
|
1989
|
-
[key: string]: any;
|
|
1990
|
-
}>;
|
|
1991
|
-
protected GetRelatedTemplateDataForBatch(entity: EntityInfo, records: unknown[], template: TemplateEntityExtended): Promise<TemplateParamData[]>;
|
|
1992
|
-
protected UpsertEntityRecordDocumentRecords(embeddingData: EmbeddingData, contextUser: UserInfo): Promise<void>;
|
|
1993
|
-
protected ValidateTemplateContextParamAlignment(template: TemplateEntityExtended): boolean;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
declare abstract class EntityDocumentTemplateParserBase {
|
|
1997
|
-
static ClearCache(): void;
|
|
1998
|
-
static CreateCacheKey(EntityID: string, EntityRecordPrimaryKey: string, Content: string): string;
|
|
1999
|
-
protected static __cache: {
|
|
2000
|
-
[key: string]: string;
|
|
2001
|
-
};
|
|
2002
|
-
protected static get _cache(): {
|
|
2003
|
-
[key: string]: string;
|
|
2004
|
-
};
|
|
2005
|
-
Parse(Template: string, EntityID: string, EntityRecord: any, ContextUser: UserInfo): Promise<string>;
|
|
2006
|
-
protected evalSingleArgument(argument: string, entityID: string, entityRecord: any, ContextUser: UserInfo): Promise<string>;
|
|
2007
|
-
}
|
|
2008
|
-
|
|
2009
|
-
declare class EntityDocumentTemplateParser extends EntityDocumentTemplateParserBase {
|
|
2010
|
-
static CreateInstance(): EntityDocumentTemplateParser;
|
|
2011
|
-
protected Relationship(entityID: string, entityRecord: any, ContextUser: UserInfo, relationshipName: string, maxRows: number, entityDocumentName: string): Promise<string>;
|
|
2012
|
-
}
|
|
2013
|
-
|
|
2014
|
-
export { type AnnotateWorkerContext, type ArchiveWorkerContext, type EmbeddingData, EntityDocumentTemplateParser, type EntitySyncConfig, EntityVectorSyncer, type TemplateParamData, type VectorEmeddingData, type VectorizeEntityParams, type VectorizeEntityResponse };
|
|
1
|
+
export * from './generic/vectorSync.types';
|
|
2
|
+
export * from './generic/entitySyncConfig.types';
|
|
3
|
+
export * from './models/entityVectorSync';
|
|
4
|
+
export * from './generic/EntityDocumentTemplateParser';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|