@cossistant/react 0.0.28 → 0.0.29
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/README.md +1 -1
- package/api.d.ts +1 -1
- package/api.d.ts.map +1 -1
- package/checks.d.ts +1 -1
- package/checks.d.ts.map +1 -1
- package/clsx.d.ts +1 -1
- package/clsx.d.ts.map +1 -1
- package/coerce.d.ts +1 -1
- package/coerce.d.ts.map +1 -1
- package/conversation.d.ts +3 -3
- package/core.d.ts +1 -1
- package/core.d.ts.map +1 -1
- package/errors.d.ts +12 -3
- package/errors.d.ts.map +1 -1
- package/errors2.d.ts +1 -1
- package/errors2.d.ts.map +1 -1
- package/hooks/index.d.ts +2 -2
- package/hooks/private/use-grouped-messages.d.ts +8 -5
- package/hooks/private/use-grouped-messages.d.ts.map +1 -1
- package/hooks/private/use-grouped-messages.js +44 -11
- package/hooks/private/use-grouped-messages.js.map +1 -1
- package/hooks/use-conversation-seen.js +1 -1
- package/hooks/use-conversation-seen.js.map +1 -1
- package/hooks/use-conversation-timeline.d.ts.map +1 -1
- package/hooks/use-conversation-timeline.js +1 -3
- package/hooks/use-conversation-timeline.js.map +1 -1
- package/index.d.ts +2 -2
- package/json-schema.d.ts +70 -0
- package/json-schema.d.ts.map +1 -0
- package/openapi30.d.ts +1 -1
- package/openapi30.d.ts.map +1 -1
- package/openapi31.d.ts +1 -1
- package/openapi31.d.ts.map +1 -1
- package/package.json +3 -3
- package/parse.d.ts +1 -1
- package/parse.d.ts.map +1 -1
- package/primitives/avatar/fallback.d.ts.map +1 -1
- package/primitives/avatar/fallback.js +1 -1
- package/primitives/avatar/fallback.js.map +1 -1
- package/primitives/avatar/image.d.ts +1 -1
- package/primitives/day-separator.d.ts +76 -0
- package/primitives/day-separator.d.ts.map +1 -0
- package/primitives/day-separator.js +111 -0
- package/primitives/day-separator.js.map +1 -0
- package/primitives/index.d.ts +3 -2
- package/primitives/index.js +6 -1
- package/primitives/index.parts.d.ts +2 -1
- package/primitives/index.parts.js +2 -1
- package/primitives/multimodal-input.d.ts +2 -2
- package/primitives/multimodal-input.d.ts.map +1 -1
- package/primitives/timeline-item-group.d.ts.map +1 -1
- package/primitives/timeline-item-group.js +1 -1
- package/primitives/timeline-item-group.js.map +1 -1
- package/primitives/timeline-item.js +1 -1
- package/primitives/timeline-item.js.map +1 -1
- package/realtime/support-provider.js +4 -0
- package/realtime/support-provider.js.map +1 -1
- package/realtime-events.d.ts +127 -3
- package/realtime-events.d.ts.map +1 -1
- package/registries.d.ts +1 -1
- package/registries.d.ts.map +1 -1
- package/schemas.d.ts +305 -7
- package/schemas.d.ts.map +1 -1
- package/schemas2.d.ts +29 -4
- package/schemas2.d.ts.map +1 -1
- package/schemas3.d.ts +1 -1
- package/specification-extension.d.ts +1 -1
- package/specification-extension.d.ts.map +1 -1
- package/standard-schema.d.ts +83 -21
- package/standard-schema.d.ts.map +1 -1
- package/support/components/button.d.ts +1 -1
- package/support/components/conversation-timeline.d.ts +5 -0
- package/support/components/conversation-timeline.d.ts.map +1 -1
- package/support/components/conversation-timeline.js +22 -2
- package/support/components/conversation-timeline.js.map +1 -1
- package/support/text/index.d.ts +1 -1
- package/support/text/index.d.ts.map +1 -1
- package/support/text/index.js.map +1 -1
- package/to-json-schema.d.ts +96 -0
- package/to-json-schema.d.ts.map +1 -0
- package/util.d.ts +6 -2
- package/util.d.ts.map +1 -1
- package/utils/use-render-element.d.ts.map +1 -1
- package/utils/use-render-element.js +18 -3
- package/utils/use-render-element.js.map +1 -1
- package/versions.d.ts +2 -2
- package/versions.d.ts.map +1 -1
- package/zod-extensions.d.ts +1 -1
- package/zod-extensions.d.ts.map +1 -1
package/schemas.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { BaseSchema } from "./json-schema.js";
|
|
1
2
|
import { StandardSchemaV1 } from "./standard-schema.js";
|
|
2
|
-
import {
|
|
3
|
+
import { ProcessParams, ToJSONSchemaContext } from "./to-json-schema.js";
|
|
4
|
+
import { AnyFunc, Class, EnumLike, IsAny, JWTAlgorithm, Literal, LoosePartial, MakeReadonly, MaybeAsync, MimeTypes, NoUndefined, Prettify, PrimitiveSet, PropValues, TupleItems } from "./util.js";
|
|
3
5
|
import { version } from "./versions.js";
|
|
4
6
|
import { $ZodCheck, $ZodCheckDef, $ZodCheckInternals, $ZodCheckStringFormatDef, $ZodCheckStringFormatInternals } from "./checks.js";
|
|
5
|
-
import { $ZodErrorMap, $ZodIssue, $ZodIssueBase, $ZodIssueInvalidKey, $ZodIssueInvalidType, $ZodIssueInvalidUnion, $ZodIssueInvalidValue, $ZodIssueUnrecognizedKeys, $ZodRawIssue } from "./errors.js";
|
|
7
|
+
import { $ZodErrorMap, $ZodIssue, $ZodIssueBase, $ZodIssueInvalidElement, $ZodIssueInvalidKey, $ZodIssueInvalidType, $ZodIssueInvalidUnion, $ZodIssueInvalidValue, $ZodIssueTooBig, $ZodIssueTooSmall, $ZodIssueUnrecognizedKeys, $ZodRawIssue } from "./errors.js";
|
|
6
8
|
import { $constructor, input, output } from "./core.js";
|
|
7
9
|
|
|
8
|
-
//#region ../../node_modules/zod/v4/core/schemas.d.cts
|
|
10
|
+
//#region ../../node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/schemas.d.cts
|
|
9
11
|
interface ParseContext<T$1 extends $ZodIssueBase = never> {
|
|
10
12
|
/** Customize error messages. */
|
|
11
13
|
readonly error?: $ZodErrorMap<T$1>;
|
|
@@ -71,6 +73,8 @@ interface _$ZodTypeInternals {
|
|
|
71
73
|
bag: Record<string, unknown>;
|
|
72
74
|
/** @internal The set of issues this schema might throw during type checking. */
|
|
73
75
|
isst: $ZodIssueBase;
|
|
76
|
+
/** @internal Subject to change, not a public API. */
|
|
77
|
+
processJSONSchema?: ((ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void) | undefined;
|
|
74
78
|
/** An optional method used to override `toJSONSchema` logic. */
|
|
75
79
|
toJSONSchema?: () => unknown;
|
|
76
80
|
/** @internal The parent of this schema. Only set during certain clone operations. */
|
|
@@ -91,6 +95,7 @@ interface $ZodType<O = unknown, I = unknown, Internals extends $ZodTypeInternals
|
|
|
91
95
|
_zod: Internals;
|
|
92
96
|
"~standard": $ZodStandardSchema<this>;
|
|
93
97
|
}
|
|
98
|
+
interface _$ZodType<T$1 extends $ZodTypeInternals = $ZodTypeInternals> extends $ZodType<T$1["output"], T$1["input"], T$1> {}
|
|
94
99
|
declare const $ZodType: $constructor<$ZodType>;
|
|
95
100
|
interface $ZodStringDef extends $ZodTypeDef {
|
|
96
101
|
type: "string";
|
|
@@ -111,6 +116,8 @@ interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
|
|
|
111
116
|
contentEncoding: string;
|
|
112
117
|
}>;
|
|
113
118
|
}
|
|
119
|
+
interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {}
|
|
120
|
+
declare const $ZodString: $constructor<$ZodString>;
|
|
114
121
|
interface $ZodStringFormatDef<Format extends string = string> extends $ZodStringDef, $ZodCheckStringFormatDef<Format> {}
|
|
115
122
|
interface $ZodStringFormatInternals<Format extends string = string> extends $ZodStringInternals<string>, $ZodCheckStringFormatInternals {
|
|
116
123
|
def: $ZodStringFormatDef<Format>;
|
|
@@ -302,6 +309,10 @@ interface $ZodNumberInternals<Input = unknown> extends $ZodTypeInternals<number,
|
|
|
302
309
|
pattern: RegExp;
|
|
303
310
|
}>;
|
|
304
311
|
}
|
|
312
|
+
interface $ZodNumber<Input = unknown> extends $ZodType {
|
|
313
|
+
_zod: $ZodNumberInternals<Input>;
|
|
314
|
+
}
|
|
315
|
+
declare const $ZodNumber: $constructor<$ZodNumber>;
|
|
305
316
|
interface $ZodBooleanDef extends $ZodTypeDef {
|
|
306
317
|
type: "boolean";
|
|
307
318
|
coerce?: boolean;
|
|
@@ -312,6 +323,53 @@ interface $ZodBooleanInternals<T$1 = unknown> extends $ZodTypeInternals<boolean,
|
|
|
312
323
|
def: $ZodBooleanDef;
|
|
313
324
|
isst: $ZodIssueInvalidType;
|
|
314
325
|
}
|
|
326
|
+
interface $ZodBoolean<T$1 = unknown> extends $ZodType {
|
|
327
|
+
_zod: $ZodBooleanInternals<T$1>;
|
|
328
|
+
}
|
|
329
|
+
declare const $ZodBoolean: $constructor<$ZodBoolean>;
|
|
330
|
+
interface $ZodBigIntDef extends $ZodTypeDef {
|
|
331
|
+
type: "bigint";
|
|
332
|
+
coerce?: boolean;
|
|
333
|
+
}
|
|
334
|
+
interface $ZodBigIntInternals<T$1 = unknown> extends $ZodTypeInternals<bigint, T$1> {
|
|
335
|
+
pattern: RegExp;
|
|
336
|
+
/** @internal Internal API, use with caution */
|
|
337
|
+
def: $ZodBigIntDef;
|
|
338
|
+
isst: $ZodIssueInvalidType;
|
|
339
|
+
bag: LoosePartial<{
|
|
340
|
+
minimum: bigint;
|
|
341
|
+
maximum: bigint;
|
|
342
|
+
format: string;
|
|
343
|
+
}>;
|
|
344
|
+
}
|
|
345
|
+
interface $ZodBigInt<T$1 = unknown> extends $ZodType {
|
|
346
|
+
_zod: $ZodBigIntInternals<T$1>;
|
|
347
|
+
}
|
|
348
|
+
declare const $ZodBigInt: $constructor<$ZodBigInt>;
|
|
349
|
+
interface $ZodSymbolDef extends $ZodTypeDef {
|
|
350
|
+
type: "symbol";
|
|
351
|
+
}
|
|
352
|
+
interface $ZodSymbolInternals extends $ZodTypeInternals<symbol, symbol> {
|
|
353
|
+
def: $ZodSymbolDef;
|
|
354
|
+
isst: $ZodIssueInvalidType;
|
|
355
|
+
}
|
|
356
|
+
interface $ZodSymbol extends $ZodType {
|
|
357
|
+
_zod: $ZodSymbolInternals;
|
|
358
|
+
}
|
|
359
|
+
declare const $ZodSymbol: $constructor<$ZodSymbol>;
|
|
360
|
+
interface $ZodUndefinedDef extends $ZodTypeDef {
|
|
361
|
+
type: "undefined";
|
|
362
|
+
}
|
|
363
|
+
interface $ZodUndefinedInternals extends $ZodTypeInternals<undefined, undefined> {
|
|
364
|
+
pattern: RegExp;
|
|
365
|
+
def: $ZodUndefinedDef;
|
|
366
|
+
values: PrimitiveSet;
|
|
367
|
+
isst: $ZodIssueInvalidType;
|
|
368
|
+
}
|
|
369
|
+
interface $ZodUndefined extends $ZodType {
|
|
370
|
+
_zod: $ZodUndefinedInternals;
|
|
371
|
+
}
|
|
372
|
+
declare const $ZodUndefined: $constructor<$ZodUndefined>;
|
|
315
373
|
interface $ZodNullDef extends $ZodTypeDef {
|
|
316
374
|
type: "null";
|
|
317
375
|
}
|
|
@@ -321,6 +379,21 @@ interface $ZodNullInternals extends $ZodTypeInternals<null, null> {
|
|
|
321
379
|
values: PrimitiveSet;
|
|
322
380
|
isst: $ZodIssueInvalidType;
|
|
323
381
|
}
|
|
382
|
+
interface $ZodNull extends $ZodType {
|
|
383
|
+
_zod: $ZodNullInternals;
|
|
384
|
+
}
|
|
385
|
+
declare const $ZodNull: $constructor<$ZodNull>;
|
|
386
|
+
interface $ZodAnyDef extends $ZodTypeDef {
|
|
387
|
+
type: "any";
|
|
388
|
+
}
|
|
389
|
+
interface $ZodAnyInternals extends $ZodTypeInternals<any, any> {
|
|
390
|
+
def: $ZodAnyDef;
|
|
391
|
+
isst: never;
|
|
392
|
+
}
|
|
393
|
+
interface $ZodAny extends $ZodType {
|
|
394
|
+
_zod: $ZodAnyInternals;
|
|
395
|
+
}
|
|
396
|
+
declare const $ZodAny: $constructor<$ZodAny>;
|
|
324
397
|
interface $ZodUnknownDef extends $ZodTypeDef {
|
|
325
398
|
type: "unknown";
|
|
326
399
|
}
|
|
@@ -328,6 +401,49 @@ interface $ZodUnknownInternals extends $ZodTypeInternals<unknown, unknown> {
|
|
|
328
401
|
def: $ZodUnknownDef;
|
|
329
402
|
isst: never;
|
|
330
403
|
}
|
|
404
|
+
interface $ZodUnknown extends $ZodType {
|
|
405
|
+
_zod: $ZodUnknownInternals;
|
|
406
|
+
}
|
|
407
|
+
declare const $ZodUnknown: $constructor<$ZodUnknown>;
|
|
408
|
+
interface $ZodNeverDef extends $ZodTypeDef {
|
|
409
|
+
type: "never";
|
|
410
|
+
}
|
|
411
|
+
interface $ZodNeverInternals extends $ZodTypeInternals<never, never> {
|
|
412
|
+
def: $ZodNeverDef;
|
|
413
|
+
isst: $ZodIssueInvalidType;
|
|
414
|
+
}
|
|
415
|
+
interface $ZodNever extends $ZodType {
|
|
416
|
+
_zod: $ZodNeverInternals;
|
|
417
|
+
}
|
|
418
|
+
declare const $ZodNever: $constructor<$ZodNever>;
|
|
419
|
+
interface $ZodVoidDef extends $ZodTypeDef {
|
|
420
|
+
type: "void";
|
|
421
|
+
}
|
|
422
|
+
interface $ZodVoidInternals extends $ZodTypeInternals<void, void> {
|
|
423
|
+
def: $ZodVoidDef;
|
|
424
|
+
isst: $ZodIssueInvalidType;
|
|
425
|
+
}
|
|
426
|
+
interface $ZodVoid extends $ZodType {
|
|
427
|
+
_zod: $ZodVoidInternals;
|
|
428
|
+
}
|
|
429
|
+
declare const $ZodVoid: $constructor<$ZodVoid>;
|
|
430
|
+
interface $ZodDateDef extends $ZodTypeDef {
|
|
431
|
+
type: "date";
|
|
432
|
+
coerce?: boolean;
|
|
433
|
+
}
|
|
434
|
+
interface $ZodDateInternals<T$1 = unknown> extends $ZodTypeInternals<Date, T$1> {
|
|
435
|
+
def: $ZodDateDef;
|
|
436
|
+
isst: $ZodIssueInvalidType;
|
|
437
|
+
bag: LoosePartial<{
|
|
438
|
+
minimum: Date;
|
|
439
|
+
maximum: Date;
|
|
440
|
+
format: string;
|
|
441
|
+
}>;
|
|
442
|
+
}
|
|
443
|
+
interface $ZodDate<T$1 = unknown> extends $ZodType {
|
|
444
|
+
_zod: $ZodDateInternals<T$1>;
|
|
445
|
+
}
|
|
446
|
+
declare const $ZodDate: $constructor<$ZodDate>;
|
|
331
447
|
interface $ZodArrayDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
332
448
|
type: "array";
|
|
333
449
|
element: T$1;
|
|
@@ -397,15 +513,14 @@ out Shape extends $ZodShape = $ZodShape, out Config extends $ZodObjectConfig = $
|
|
|
397
513
|
}
|
|
398
514
|
type $ZodLooseShape = Record<string, any>;
|
|
399
515
|
interface $ZodObject< /** @ts-ignore Cast variance */
|
|
400
|
-
out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {
|
|
401
|
-
"~standard": $ZodStandardSchema<this>;
|
|
402
|
-
}
|
|
516
|
+
out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {}
|
|
403
517
|
declare const $ZodObject: $constructor<$ZodObject>;
|
|
404
518
|
type $InferUnionOutput<T$1 extends SomeType> = T$1 extends any ? output<T$1> : never;
|
|
405
519
|
type $InferUnionInput<T$1 extends SomeType> = T$1 extends any ? input<T$1> : never;
|
|
406
520
|
interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
|
|
407
521
|
type: "union";
|
|
408
522
|
options: Options;
|
|
523
|
+
inclusive?: boolean;
|
|
409
524
|
}
|
|
410
525
|
type IsOptionalIn<T$1 extends SomeType> = T$1 extends OptionalInSchema ? true : false;
|
|
411
526
|
type IsOptionalOut<T$1 extends SomeType> = T$1 extends OptionalOutSchema ? true : false;
|
|
@@ -440,11 +555,34 @@ interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $
|
|
|
440
555
|
_zod: $ZodIntersectionInternals<A, B>;
|
|
441
556
|
}
|
|
442
557
|
declare const $ZodIntersection: $constructor<$ZodIntersection>;
|
|
558
|
+
interface $ZodTupleDef<T$1 extends TupleItems = readonly $ZodType[], Rest$1 extends SomeType | null = $ZodType | null> extends $ZodTypeDef {
|
|
559
|
+
type: "tuple";
|
|
560
|
+
items: T$1;
|
|
561
|
+
rest: Rest$1;
|
|
562
|
+
}
|
|
563
|
+
type $InferTupleInputType<T$1 extends TupleItems, Rest$1 extends SomeType | null> = [...TupleInputTypeWithOptionals<T$1>, ...(Rest$1 extends SomeType ? input<Rest$1>[] : [])];
|
|
564
|
+
type TupleInputTypeNoOptionals<T$1 extends TupleItems> = { [k in keyof T$1]: input<T$1[k]> };
|
|
565
|
+
type TupleInputTypeWithOptionals<T$1 extends TupleItems> = T$1 extends readonly [...infer Prefix extends SomeType[], infer Tail extends SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...TupleInputTypeWithOptionals<Prefix>, input<Tail>?] : TupleInputTypeNoOptionals<T$1> : [];
|
|
566
|
+
type $InferTupleOutputType<T$1 extends TupleItems, Rest$1 extends SomeType | null> = [...TupleOutputTypeWithOptionals<T$1>, ...(Rest$1 extends SomeType ? output<Rest$1>[] : [])];
|
|
567
|
+
type TupleOutputTypeNoOptionals<T$1 extends TupleItems> = { [k in keyof T$1]: output<T$1[k]> };
|
|
568
|
+
type TupleOutputTypeWithOptionals<T$1 extends TupleItems> = T$1 extends readonly [...infer Prefix extends SomeType[], infer Tail extends SomeType] ? Tail["_zod"]["optout"] extends "optional" ? [...TupleOutputTypeWithOptionals<Prefix>, output<Tail>?] : TupleOutputTypeNoOptionals<T$1> : [];
|
|
569
|
+
interface $ZodTupleInternals<T$1 extends TupleItems = readonly $ZodType[], Rest$1 extends SomeType | null = $ZodType | null> extends _$ZodTypeInternals {
|
|
570
|
+
def: $ZodTupleDef<T$1, Rest$1>;
|
|
571
|
+
isst: $ZodIssueInvalidType | $ZodIssueTooBig<unknown[]> | $ZodIssueTooSmall<unknown[]>;
|
|
572
|
+
output: $InferTupleOutputType<T$1, Rest$1>;
|
|
573
|
+
input: $InferTupleInputType<T$1, Rest$1>;
|
|
574
|
+
}
|
|
575
|
+
interface $ZodTuple<T$1 extends TupleItems = readonly $ZodType[], Rest$1 extends SomeType | null = $ZodType | null> extends $ZodType {
|
|
576
|
+
_zod: $ZodTupleInternals<T$1, Rest$1>;
|
|
577
|
+
}
|
|
578
|
+
declare const $ZodTuple: $constructor<$ZodTuple>;
|
|
443
579
|
type $ZodRecordKey = $ZodType<string | number | symbol, string | number | symbol>;
|
|
444
580
|
interface $ZodRecordDef<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
445
581
|
type: "record";
|
|
446
582
|
keyType: Key;
|
|
447
583
|
valueType: Value;
|
|
584
|
+
/** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */
|
|
585
|
+
mode?: "strict" | "loose";
|
|
448
586
|
}
|
|
449
587
|
type $InferZodRecordOutput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<output<Key>, output<Value>>> : Record<output<Key>, output<Value>>;
|
|
450
588
|
type $InferZodRecordInput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<input<Key>, input<Value>>> : Record<input<Key>, input<Value>>;
|
|
@@ -461,6 +599,35 @@ interface $ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends So
|
|
|
461
599
|
_zod: $ZodRecordInternals<Key, Value>;
|
|
462
600
|
}
|
|
463
601
|
declare const $ZodRecord: $constructor<$ZodRecord>;
|
|
602
|
+
interface $ZodMapDef<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
603
|
+
type: "map";
|
|
604
|
+
keyType: Key;
|
|
605
|
+
valueType: Value;
|
|
606
|
+
}
|
|
607
|
+
interface $ZodMapInternals<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeInternals<Map<output<Key>, output<Value>>, Map<input<Key>, input<Value>>> {
|
|
608
|
+
def: $ZodMapDef<Key, Value>;
|
|
609
|
+
isst: $ZodIssueInvalidType | $ZodIssueInvalidKey | $ZodIssueInvalidElement<unknown>;
|
|
610
|
+
optin?: "optional" | undefined;
|
|
611
|
+
optout?: "optional" | undefined;
|
|
612
|
+
}
|
|
613
|
+
interface $ZodMap<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodType {
|
|
614
|
+
_zod: $ZodMapInternals<Key, Value>;
|
|
615
|
+
}
|
|
616
|
+
declare const $ZodMap: $constructor<$ZodMap>;
|
|
617
|
+
interface $ZodSetDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
618
|
+
type: "set";
|
|
619
|
+
valueType: T$1;
|
|
620
|
+
}
|
|
621
|
+
interface $ZodSetInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<Set<output<T$1>>, Set<input<T$1>>> {
|
|
622
|
+
def: $ZodSetDef<T$1>;
|
|
623
|
+
isst: $ZodIssueInvalidType;
|
|
624
|
+
optin?: "optional" | undefined;
|
|
625
|
+
optout?: "optional" | undefined;
|
|
626
|
+
}
|
|
627
|
+
interface $ZodSet<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
628
|
+
_zod: $ZodSetInternals<T$1>;
|
|
629
|
+
}
|
|
630
|
+
declare const $ZodSet: $constructor<$ZodSet>;
|
|
464
631
|
type $InferEnumOutput<T$1 extends EnumLike> = T$1[keyof T$1] & {};
|
|
465
632
|
type $InferEnumInput<T$1 extends EnumLike> = T$1[keyof T$1] & {};
|
|
466
633
|
interface $ZodEnumDef<T$1 extends EnumLike = EnumLike> extends $ZodTypeDef {
|
|
@@ -494,6 +661,30 @@ interface $ZodLiteral<T$1 extends Literal = Literal> extends $ZodType {
|
|
|
494
661
|
_zod: $ZodLiteralInternals<T$1>;
|
|
495
662
|
}
|
|
496
663
|
declare const $ZodLiteral: $constructor<$ZodLiteral>;
|
|
664
|
+
type _File = typeof globalThis extends {
|
|
665
|
+
File: infer F extends new (...args: any[]) => any;
|
|
666
|
+
} ? InstanceType<F> : {};
|
|
667
|
+
/** Do not reference this directly. */
|
|
668
|
+
interface File extends _File {
|
|
669
|
+
readonly type: string;
|
|
670
|
+
readonly size: number;
|
|
671
|
+
}
|
|
672
|
+
interface $ZodFileDef extends $ZodTypeDef {
|
|
673
|
+
type: "file";
|
|
674
|
+
}
|
|
675
|
+
interface $ZodFileInternals extends $ZodTypeInternals<File, File> {
|
|
676
|
+
def: $ZodFileDef;
|
|
677
|
+
isst: $ZodIssueInvalidType;
|
|
678
|
+
bag: LoosePartial<{
|
|
679
|
+
minimum: number;
|
|
680
|
+
maximum: number;
|
|
681
|
+
mime: MimeTypes[];
|
|
682
|
+
}>;
|
|
683
|
+
}
|
|
684
|
+
interface $ZodFile extends $ZodType {
|
|
685
|
+
_zod: $ZodFileInternals;
|
|
686
|
+
}
|
|
687
|
+
declare const $ZodFile: $constructor<$ZodFile>;
|
|
497
688
|
interface $ZodTransformDef extends $ZodTypeDef {
|
|
498
689
|
type: "transform";
|
|
499
690
|
transform: (input: unknown, payload: ParsePayload<unknown>) => MaybeAsync<unknown>;
|
|
@@ -587,6 +778,20 @@ interface $ZodNonOptional<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
|
587
778
|
_zod: $ZodNonOptionalInternals<T$1>;
|
|
588
779
|
}
|
|
589
780
|
declare const $ZodNonOptional: $constructor<$ZodNonOptional>;
|
|
781
|
+
interface $ZodSuccessDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
782
|
+
type: "success";
|
|
783
|
+
innerType: T$1;
|
|
784
|
+
}
|
|
785
|
+
interface $ZodSuccessInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<boolean, input<T$1>> {
|
|
786
|
+
def: $ZodSuccessDef<T$1>;
|
|
787
|
+
isst: never;
|
|
788
|
+
optin: T$1["_zod"]["optin"];
|
|
789
|
+
optout: "optional" | undefined;
|
|
790
|
+
}
|
|
791
|
+
interface $ZodSuccess<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
792
|
+
_zod: $ZodSuccessInternals<T$1>;
|
|
793
|
+
}
|
|
794
|
+
declare const $ZodSuccess: $constructor<$ZodSuccess>;
|
|
590
795
|
interface $ZodCatchCtx extends ParsePayload {
|
|
591
796
|
/** @deprecated Use `ctx.issues` */
|
|
592
797
|
error: {
|
|
@@ -611,6 +816,17 @@ interface $ZodCatch<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
|
611
816
|
_zod: $ZodCatchInternals<T$1>;
|
|
612
817
|
}
|
|
613
818
|
declare const $ZodCatch: $constructor<$ZodCatch>;
|
|
819
|
+
interface $ZodNaNDef extends $ZodTypeDef {
|
|
820
|
+
type: "nan";
|
|
821
|
+
}
|
|
822
|
+
interface $ZodNaNInternals extends $ZodTypeInternals<number, number> {
|
|
823
|
+
def: $ZodNaNDef;
|
|
824
|
+
isst: $ZodIssueInvalidType;
|
|
825
|
+
}
|
|
826
|
+
interface $ZodNaN extends $ZodType {
|
|
827
|
+
_zod: $ZodNaNInternals;
|
|
828
|
+
}
|
|
829
|
+
declare const $ZodNaN: $constructor<$ZodNaN>;
|
|
614
830
|
interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
615
831
|
type: "pipe";
|
|
616
832
|
in: A;
|
|
@@ -648,6 +864,87 @@ interface $ZodReadonly<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
|
648
864
|
_zod: $ZodReadonlyInternals<T$1>;
|
|
649
865
|
}
|
|
650
866
|
declare const $ZodReadonly: $constructor<$ZodReadonly>;
|
|
867
|
+
interface $ZodTemplateLiteralDef extends $ZodTypeDef {
|
|
868
|
+
type: "template_literal";
|
|
869
|
+
parts: $ZodTemplateLiteralPart[];
|
|
870
|
+
format?: string | undefined;
|
|
871
|
+
}
|
|
872
|
+
interface $ZodTemplateLiteralInternals<Template extends string = string> extends $ZodTypeInternals<Template, Template> {
|
|
873
|
+
pattern: RegExp;
|
|
874
|
+
def: $ZodTemplateLiteralDef;
|
|
875
|
+
isst: $ZodIssueInvalidType;
|
|
876
|
+
}
|
|
877
|
+
interface $ZodTemplateLiteral<Template extends string = string> extends $ZodType {
|
|
878
|
+
_zod: $ZodTemplateLiteralInternals<Template>;
|
|
879
|
+
}
|
|
880
|
+
type LiteralPart = Exclude<Literal, symbol>;
|
|
881
|
+
interface SchemaPartInternals extends $ZodTypeInternals<LiteralPart, LiteralPart> {
|
|
882
|
+
pattern: RegExp;
|
|
883
|
+
}
|
|
884
|
+
interface SchemaPart extends $ZodType {
|
|
885
|
+
_zod: SchemaPartInternals;
|
|
886
|
+
}
|
|
887
|
+
type $ZodTemplateLiteralPart = LiteralPart | SchemaPart;
|
|
888
|
+
declare const $ZodTemplateLiteral: $constructor<$ZodTemplateLiteral>;
|
|
889
|
+
type $ZodFunctionArgs = $ZodType<unknown[], unknown[]>;
|
|
890
|
+
type $ZodFunctionIn = $ZodFunctionArgs;
|
|
891
|
+
type $ZodFunctionOut = $ZodType;
|
|
892
|
+
type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => input<Returns>;
|
|
893
|
+
type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => MaybeAsync<input<Returns>>;
|
|
894
|
+
type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => output<Returns>;
|
|
895
|
+
type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => MaybeAsync<output<Returns>>;
|
|
896
|
+
interface $ZodFunctionDef<In extends $ZodFunctionIn = $ZodFunctionIn, Out extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodTypeDef {
|
|
897
|
+
type: "function";
|
|
898
|
+
input: In;
|
|
899
|
+
output: Out;
|
|
900
|
+
}
|
|
901
|
+
interface $ZodFunctionInternals<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> extends $ZodTypeInternals<$InferOuterFunctionType<Args, Returns>, $InferInnerFunctionType<Args, Returns>> {
|
|
902
|
+
def: $ZodFunctionDef<Args, Returns>;
|
|
903
|
+
isst: $ZodIssueInvalidType;
|
|
904
|
+
}
|
|
905
|
+
interface $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodType<any, any, $ZodFunctionInternals<Args, Returns>> {
|
|
906
|
+
/** @deprecated */
|
|
907
|
+
_def: $ZodFunctionDef<Args, Returns>;
|
|
908
|
+
_input: $InferInnerFunctionType<Args, Returns>;
|
|
909
|
+
_output: $InferOuterFunctionType<Args, Returns>;
|
|
910
|
+
implement<F$1 extends $InferInnerFunctionType<Args, Returns>>(func: F$1): (...args: Parameters<this["_output"]>) => ReturnType<F$1> extends ReturnType<this["_output"]> ? ReturnType<F$1> : ReturnType<this["_output"]>;
|
|
911
|
+
implementAsync<F$1 extends $InferInnerFunctionTypeAsync<Args, Returns>>(func: F$1): F$1 extends $InferOuterFunctionTypeAsync<Args, Returns> ? F$1 : $InferOuterFunctionTypeAsync<Args, Returns>;
|
|
912
|
+
input<const Items extends TupleItems, const Rest$1 extends $ZodFunctionOut = $ZodFunctionOut>(args: Items, rest?: Rest$1): $ZodFunction<$ZodTuple<Items, Rest$1>, Returns>;
|
|
913
|
+
input<NewArgs extends $ZodFunctionIn>(args: NewArgs): $ZodFunction<NewArgs, Returns>;
|
|
914
|
+
input(...args: any[]): $ZodFunction<any, Returns>;
|
|
915
|
+
output<NewReturns extends $ZodType>(output: NewReturns): $ZodFunction<Args, NewReturns>;
|
|
916
|
+
}
|
|
917
|
+
declare const $ZodFunction: $constructor<$ZodFunction>;
|
|
918
|
+
interface $ZodPromiseDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
919
|
+
type: "promise";
|
|
920
|
+
innerType: T$1;
|
|
921
|
+
}
|
|
922
|
+
interface $ZodPromiseInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<Promise<output<T$1>>, MaybeAsync<input<T$1>>> {
|
|
923
|
+
def: $ZodPromiseDef<T$1>;
|
|
924
|
+
isst: never;
|
|
925
|
+
}
|
|
926
|
+
interface $ZodPromise<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
927
|
+
_zod: $ZodPromiseInternals<T$1>;
|
|
928
|
+
}
|
|
929
|
+
declare const $ZodPromise: $constructor<$ZodPromise>;
|
|
930
|
+
interface $ZodLazyDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
931
|
+
type: "lazy";
|
|
932
|
+
getter: () => T$1;
|
|
933
|
+
}
|
|
934
|
+
interface $ZodLazyInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1>, input<T$1>> {
|
|
935
|
+
def: $ZodLazyDef<T$1>;
|
|
936
|
+
isst: never;
|
|
937
|
+
/** Auto-cached way to retrieve the inner schema */
|
|
938
|
+
innerType: T$1;
|
|
939
|
+
pattern: T$1["_zod"]["pattern"];
|
|
940
|
+
propValues: T$1["_zod"]["propValues"];
|
|
941
|
+
optin: T$1["_zod"]["optin"];
|
|
942
|
+
optout: T$1["_zod"]["optout"];
|
|
943
|
+
}
|
|
944
|
+
interface $ZodLazy<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
945
|
+
_zod: $ZodLazyInternals<T$1>;
|
|
946
|
+
}
|
|
947
|
+
declare const $ZodLazy: $constructor<$ZodLazy>;
|
|
651
948
|
interface $ZodCustomDef<O = unknown> extends $ZodTypeDef, $ZodCheckDef {
|
|
652
949
|
type: "custom";
|
|
653
950
|
check: "custom";
|
|
@@ -668,6 +965,7 @@ interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
|
|
|
668
965
|
_zod: $ZodCustomInternals<O, I>;
|
|
669
966
|
}
|
|
670
967
|
declare const $ZodCustom: $constructor<$ZodCustom>;
|
|
968
|
+
type $ZodTypes = $ZodString | $ZodNumber | $ZodBigInt | $ZodBoolean | $ZodDate | $ZodSymbol | $ZodUndefined | $ZodNullable | $ZodNull | $ZodAny | $ZodUnknown | $ZodNever | $ZodVoid | $ZodArray | $ZodObject | $ZodUnion | $ZodIntersection | $ZodTuple | $ZodRecord | $ZodMap | $ZodSet | $ZodLiteral | $ZodEnum | $ZodFunction | $ZodPromise | $ZodLazy | $ZodOptional | $ZodDefault | $ZodPrefault | $ZodTemplateLiteral | $ZodCustom | $ZodTransform | $ZodNonOptional | $ZodReadonly | $ZodNaN | $ZodPipe | $ZodSuccess | $ZodCatch | $ZodFile;
|
|
671
969
|
//#endregion
|
|
672
|
-
export { $ZodArray, $ZodArrayInternals, $ZodBase64, $ZodBase64URL, $ZodBooleanInternals, $ZodCIDRv4, $ZodCIDRv6, $ZodCUID, $ZodCUID2, $ZodCatch, $ZodCatchCtx, $ZodCatchInternals, $ZodCustom, $ZodDefault, $ZodDefaultInternals, $ZodE164, $ZodEmail, $ZodEmailInternals, $ZodEmoji, $ZodEnum, $ZodEnumInternals, $ZodGUID, $ZodIPv4, $ZodIPv6, $ZodISODate, $ZodISODateTime, $ZodISODuration, $ZodISOTime, $ZodIntersection, $ZodIntersectionInternals, $ZodJWT, $ZodKSUID, $ZodLiteral, $ZodLiteralInternals, $ZodLooseShape, $ZodNanoID, $ZodNonOptional, $ZodNonOptionalInternals, $ZodNullInternals, $ZodNullable, $ZodNullableInternals, $ZodNumberInternals, $ZodObject, $ZodObjectConfig, $ZodObjectInternals, $ZodOptional, $ZodOptionalInternals, $ZodPipe, $ZodPipeInternals, $ZodPrefault, $ZodPrefaultInternals, $ZodReadonly, $ZodReadonlyInternals, $ZodRecord, $ZodRecordInternals, $ZodRecordKey, $ZodShape, $ZodStringFormat, $ZodStringFormatInternals, $ZodStringInternals, $ZodTransform, $ZodTransformInternals, $ZodType, $ZodTypeInternals, $ZodULID, $ZodULIDInternals, $ZodURL, $ZodURLInternals, $ZodUUID, $ZodUnion, $ZodUnionInternals, $ZodUnknownInternals, $ZodXID, $catchall, $loose, $strict, $strip, CheckFn, ParseContext, ParsePayload, SomeType };
|
|
970
|
+
export { $ZodArray, $ZodArrayInternals, $ZodBase64, $ZodBase64URL, $ZodBooleanInternals, $ZodCIDRv4, $ZodCIDRv6, $ZodCUID, $ZodCUID2, $ZodCatch, $ZodCatchCtx, $ZodCatchInternals, $ZodCustom, $ZodDefault, $ZodDefaultInternals, $ZodE164, $ZodEmail, $ZodEmailInternals, $ZodEmoji, $ZodEnum, $ZodEnumInternals, $ZodGUID, $ZodIPv4, $ZodIPv6, $ZodISODate, $ZodISODateTime, $ZodISODuration, $ZodISOTime, $ZodIntersection, $ZodIntersectionInternals, $ZodJWT, $ZodKSUID, $ZodLiteral, $ZodLiteralInternals, $ZodLooseShape, $ZodNanoID, $ZodNonOptional, $ZodNonOptionalInternals, $ZodNullInternals, $ZodNullable, $ZodNullableInternals, $ZodNumberInternals, $ZodObject, $ZodObjectConfig, $ZodObjectInternals, $ZodOptional, $ZodOptionalInternals, $ZodPipe, $ZodPipeInternals, $ZodPrefault, $ZodPrefaultInternals, $ZodReadonly, $ZodReadonlyInternals, $ZodRecord, $ZodRecordInternals, $ZodRecordKey, $ZodShape, $ZodStringFormat, $ZodStringFormatInternals, $ZodStringInternals, $ZodTransform, $ZodTransformInternals, $ZodType, $ZodTypeInternals, $ZodTypes, $ZodULID, $ZodULIDInternals, $ZodURL, $ZodURLInternals, $ZodUUID, $ZodUnion, $ZodUnionInternals, $ZodUnknownInternals, $ZodXID, $catchall, $loose, $strict, $strip, CheckFn, ParseContext, ParsePayload, SomeType };
|
|
673
971
|
//# sourceMappingURL=schemas.d.ts.map
|