@cossistant/core 0.0.20 → 0.0.23
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/_virtual/rolldown_runtime.js +4 -1
- package/api.d.ts.map +1 -1
- package/conversation.d.ts +35 -0
- package/conversation.d.ts.map +1 -1
- package/core.d.ts.map +1 -1
- package/package.json +1 -1
- package/packages/types/src/api/timeline-item.js +122 -0
- package/packages/types/src/api/timeline-item.js.map +1 -0
- package/packages/types/src/enums.js +17 -1
- package/packages/types/src/enums.js.map +1 -1
- package/realtime-events.d.ts +83 -0
- package/realtime-events.d.ts.map +1 -1
- package/schemas3.d.ts +7 -0
- package/schemas3.d.ts.map +1 -1
- package/store/support-store.js +15 -3
- package/store/support-store.js.map +1 -1
- package/store/timeline-items-store.d.ts.map +1 -1
- package/store/timeline-items-store.js +3 -1
- package/store/timeline-items-store.js.map +1 -1
- package/timeline-item.d.ts +28 -0
- package/timeline-item.d.ts.map +1 -1
- package/util.d.ts.map +1 -1
|
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJS = (cb, mod) => function() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
8
11
|
var __export = (all) => {
|
|
9
12
|
let target = {};
|
|
10
13
|
for (var name in all) __defProp(target, name, {
|
|
@@ -30,4 +33,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
33
|
}) : target, mod));
|
|
31
34
|
|
|
32
35
|
//#endregion
|
|
33
|
-
export { __export, __reExport };
|
|
36
|
+
export { __commonJS, __export, __reExport, __toESM };
|
package/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","names":["checks","core","errors","schemas","util","Params","T","IssueTypes","OmitKeys","$ZodType","$ZodCheck","$ZodIssueBase","Omit","$ZodErrorMap","EmptyToNever","Partial","Flatten","TypeParams","AlsoOmit","Exclude","NonNullable","CheckParams","StringFormatParams","$ZodStringFormat","CheckStringFormatParams","CheckTypeParams","$ZodStringParams","$ZodString","_string","SchemaClass","_coercedString","$ZodStringFormatParams","$ZodCheckStringFormatParams","$ZodCheckStringFormat","$ZodEmailParams","$ZodEmail","$ZodCheckEmailParams","_email","$ZodGUIDParams","$ZodGUID","$ZodCheckGUIDParams","_guid","$ZodUUIDParams","$ZodUUID","$ZodCheckUUIDParams","_uuid","$ZodUUIDv4Params","$ZodCheckUUIDv4Params","_uuidv4","$ZodUUIDv6Params","$ZodCheckUUIDv6Params","_uuidv6","$ZodUUIDv7Params","$ZodCheckUUIDv7Params","_uuidv7","$ZodURLParams","$ZodURL","$ZodCheckURLParams","_url","$ZodEmojiParams","$ZodEmoji","$ZodCheckEmojiParams","_emoji","$ZodNanoIDParams","$ZodNanoID","$ZodCheckNanoIDParams","_nanoid","$ZodCUIDParams","$ZodCUID","$ZodCheckCUIDParams","_cuid","$ZodCUID2Params","$ZodCUID2","$ZodCheckCUID2Params","_cuid2","$ZodULIDParams","$ZodULID","$ZodCheckULIDParams","_ulid","$ZodXIDParams","$ZodXID","$ZodCheckXIDParams","_xid","$ZodKSUIDParams","$ZodKSUID","$ZodCheckKSUIDParams","_ksuid","$ZodIPv4Params","$ZodIPv4","$ZodCheckIPv4Params","_ipv4","$ZodIPv6Params","$ZodIPv6","$ZodCheckIPv6Params","_ipv6","$ZodCIDRv4Params","$ZodCIDRv4","$ZodCheckCIDRv4Params","_cidrv4","$ZodCIDRv6Params","$ZodCIDRv6","$ZodCheckCIDRv6Params","_cidrv6","$ZodBase64Params","$ZodBase64","$ZodCheckBase64Params","_base64","$ZodBase64URLParams","$ZodBase64URL","$ZodCheckBase64URLParams","_base64url","$ZodE164Params","$ZodE164","$ZodCheckE164Params","_e164","$ZodJWTParams","$ZodJWT","$ZodCheckJWTParams","_jwt","TimePrecision","$ZodISODateTimeParams","$ZodISODateTime","$ZodCheckISODateTimeParams","_isoDateTime","$ZodISODateParams","$ZodISODate","$ZodCheckISODateParams","_isoDate","$ZodISOTimeParams","$ZodISOTime","$ZodCheckISOTimeParams","_isoTime","$ZodISODurationParams","$ZodISODuration","$ZodCheckISODurationParams","_isoDuration","$ZodNumberParams","$ZodNumber","$ZodNumberFormatParams","$ZodNumberFormat","$ZodCheckNumberFormatParams","$ZodCheckNumberFormat","_number","_coercedNumber","_int","_float32","_float64","_int32","_uint32","$ZodBooleanParams","$ZodBoolean","_boolean","_coercedBoolean","$ZodBigIntParams","$ZodBigInt","$ZodBigIntFormatParams","$ZodBigIntFormat","$ZodCheckBigIntFormatParams","$ZodCheckBigIntFormat","_bigint","_coercedBigint","_int64","_uint64","$ZodSymbolParams","$ZodSymbol","_symbol","$ZodUndefinedParams","$ZodUndefined","_undefined","$ZodNullParams","$ZodNull","_null","$ZodAnyParams","$ZodAny","_any","$ZodUnknownParams","$ZodUnknown","_unknown","$ZodNeverParams","$ZodNever","_never","$ZodVoidParams","$ZodVoid","_void","$ZodDateParams","$ZodDate","_date","_coercedDate","$ZodNaNParams","$ZodNaN","_nan","$ZodCheckLessThanParams","$ZodCheckLessThan","_lt","Numeric","_lte","_max","$ZodCheckGreaterThanParams","$ZodCheckGreaterThan","_gt","_gte","_min","_positive","_negative","_nonpositive","_nonnegative","$ZodCheckMultipleOfParams","$ZodCheckMultipleOf","_multipleOf","$ZodCheckMaxSizeParams","$ZodCheckMaxSize","_maxSize","HasSize","$ZodCheckMinSizeParams","$ZodCheckMinSize","_minSize","$ZodCheckSizeEqualsParams","$ZodCheckSizeEquals","_size","$ZodCheckMaxLengthParams","$ZodCheckMaxLength","_maxLength","HasLength","$ZodCheckMinLengthParams","$ZodCheckMinLength","_minLength","$ZodCheckLengthEqualsParams","$ZodCheckLengthEquals","_length","$ZodCheckRegexParams","$ZodCheckRegex","_regex","RegExp","$ZodCheckLowerCaseParams","$ZodCheckLowerCase","_lowercase","$ZodCheckUpperCaseParams","$ZodCheckUpperCase","_uppercase","$ZodCheckIncludesParams","$ZodCheckIncludes","_includes","$ZodCheckStartsWithParams","$ZodCheckStartsWith","_startsWith","$ZodCheckEndsWithParams","$ZodCheckEndsWith","_endsWith","$ZodCheckPropertyParams","$ZodCheckProperty","_property","K","output","$ZodCheckMimeTypeParams","$ZodCheckMimeType","_mime","MimeTypes","_overwrite","$ZodCheckOverwrite","_normalize","_trim","_toLowerCase","_toUpperCase","$ZodArrayParams","$ZodArray","_array","$ZodObjectParams","$ZodObject","$ZodUnionParams","$ZodUnion","_union","$ZodTypeDiscriminableInternals","PropValues","$ZodTypeInternals","$ZodTypeDiscriminable","$ZodDiscriminatedUnionParams","$ZodDiscriminatedUnion","_discriminatedUnion","Types","Disc","$ZodIntersectionParams","$ZodIntersection","_intersection","U","$ZodTupleParams","$ZodTuple","_tuple","Rest","$ZodRecordParams","$ZodRecord","_record","Key","Value","$ZodRecordKey","$ZodMapParams","$ZodMap","_map","$ZodSetParams","$ZodSet","_set","$ZodEnumParams","$ZodEnum","_enum","ToEnum","EnumLike","_nativeEnum","$ZodLiteralParams","$ZodLiteral","_literal","Literal","Array","$ZodFileParams","$ZodFile","_file","$ZodTransformParams","$ZodTransform","_transform","I","O","ParsePayload","Awaited","$ZodOptionalParams","$ZodOptional","_optional","$ZodNullableParams","$ZodNullable","_nullable","$ZodDefaultParams","$ZodDefault","_default","NoUndefined","$ZodNonOptionalParams","$ZodNonOptional","_nonoptional","$ZodSuccessParams","$ZodSuccess","_success","$ZodCatchParams","$ZodCatch","_catch","$ZodCatchCtx","$ZodPipeParams","$ZodPipe","_pipe","A","B","$ZodReadonlyParams","$ZodReadonly","_readonly","$ZodTemplateLiteralParams","$ZodTemplateLiteral","_templateLiteral","Parts","$ZodTemplateLiteralPart","$PartsToTemplateLiteral","$ZodLazyParams","$ZodLazy","_lazy","$ZodPromiseParams","$ZodPromise","_promise","$ZodCustomParams","$ZodCustom","_custom","_refine","$ZodSuperRefineIssue","$ZodIssue","RawIssue","MakePartial","Record","$RefinementCtx","_superRefine","Promise","_check","CheckFn","$ZodStringBoolParams","_stringbool","$ZodCodec","_stringFormat","Format","$ZodCustomStringFormat","MaybeAsync"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/api.d.cts"],"sourcesContent":["import * as checks from \"./checks.cjs\";\nimport type * as core from \"./core.cjs\";\nimport type * as errors from \"./errors.cjs\";\nimport * as schemas from \"./schemas.cjs\";\nimport * as util from \"./util.cjs\";\nexport type Params<T extends schemas.$ZodType | checks.$ZodCheck, IssueTypes extends errors.$ZodIssueBase, OmitKeys extends keyof T[\"_zod\"][\"def\"] = never> = util.Flatten<Partial<util.EmptyToNever<Omit<T[\"_zod\"][\"def\"], OmitKeys> & ([IssueTypes] extends [never] ? {} : {\n error?: string | errors.$ZodErrorMap<IssueTypes> | undefined;\n /** @deprecated This parameter is deprecated. Use `error` instead. */\n message?: string | undefined;\n})>>>;\nexport type TypeParams<T extends schemas.$ZodType = schemas.$ZodType & {\n _isst: never;\n}, AlsoOmit extends Exclude<keyof T[\"_zod\"][\"def\"], \"type\" | \"checks\" | \"error\"> = never> = Params<T, NonNullable<T[\"_zod\"][\"isst\"]>, \"type\" | \"checks\" | \"error\" | AlsoOmit>;\nexport type CheckParams<T extends checks.$ZodCheck = checks.$ZodCheck, // & { _issc: never },\nAlsoOmit extends Exclude<keyof T[\"_zod\"][\"def\"], \"check\" | \"error\"> = never> = Params<T, NonNullable<T[\"_zod\"][\"issc\"]>, \"check\" | \"error\" | AlsoOmit>;\nexport type StringFormatParams<T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat, AlsoOmit extends Exclude<keyof T[\"_zod\"][\"def\"], \"type\" | \"coerce\" | \"checks\" | \"error\" | \"check\" | \"format\"> = never> = Params<T, NonNullable<T[\"_zod\"][\"isst\"] | T[\"_zod\"][\"issc\"]>, \"type\" | \"coerce\" | \"checks\" | \"error\" | \"check\" | \"format\" | AlsoOmit>;\nexport type CheckStringFormatParams<T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat, AlsoOmit extends Exclude<keyof T[\"_zod\"][\"def\"], \"type\" | \"coerce\" | \"checks\" | \"error\" | \"check\" | \"format\"> = never> = Params<T, NonNullable<T[\"_zod\"][\"issc\"]>, \"type\" | \"coerce\" | \"checks\" | \"error\" | \"check\" | \"format\" | AlsoOmit>;\nexport type CheckTypeParams<T extends schemas.$ZodType & checks.$ZodCheck = schemas.$ZodType & checks.$ZodCheck, AlsoOmit extends Exclude<keyof T[\"_zod\"][\"def\"], \"type\" | \"checks\" | \"error\" | \"check\"> = never> = Params<T, NonNullable<T[\"_zod\"][\"isst\"] | T[\"_zod\"][\"issc\"]>, \"type\" | \"checks\" | \"error\" | \"check\" | AlsoOmit>;\nexport type $ZodStringParams = TypeParams<schemas.$ZodString<string>, \"coerce\">;\nexport declare function _string<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;\nexport declare function _coercedString<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;\nexport type $ZodStringFormatParams = CheckTypeParams<schemas.$ZodStringFormat, \"format\" | \"coerce\" | \"when\" | \"pattern\">;\nexport type $ZodCheckStringFormatParams = CheckParams<checks.$ZodCheckStringFormat, \"format\">;\nexport type $ZodEmailParams = StringFormatParams<schemas.$ZodEmail, \"when\">;\nexport type $ZodCheckEmailParams = CheckStringFormatParams<schemas.$ZodEmail, \"when\">;\nexport declare function _email<T extends schemas.$ZodEmail>(Class: util.SchemaClass<T>, params?: string | $ZodEmailParams | $ZodCheckEmailParams): T;\nexport type $ZodGUIDParams = StringFormatParams<schemas.$ZodGUID, \"pattern\" | \"when\">;\nexport type $ZodCheckGUIDParams = CheckStringFormatParams<schemas.$ZodGUID, \"pattern\" | \"when\">;\nexport declare function _guid<T extends schemas.$ZodGUID>(Class: util.SchemaClass<T>, params?: string | $ZodGUIDParams | $ZodCheckGUIDParams): T;\nexport type $ZodUUIDParams = StringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport type $ZodCheckUUIDParams = CheckStringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport declare function _uuid<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDParams | $ZodCheckUUIDParams): T;\nexport type $ZodUUIDv4Params = StringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport type $ZodCheckUUIDv4Params = CheckStringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport declare function _uuidv4<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv4Params | $ZodCheckUUIDv4Params): T;\nexport type $ZodUUIDv6Params = StringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport type $ZodCheckUUIDv6Params = CheckStringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport declare function _uuidv6<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv6Params | $ZodCheckUUIDv6Params): T;\nexport type $ZodUUIDv7Params = StringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport type $ZodCheckUUIDv7Params = CheckStringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport declare function _uuidv7<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv7Params | $ZodCheckUUIDv7Params): T;\nexport type $ZodURLParams = StringFormatParams<schemas.$ZodURL, \"when\">;\nexport type $ZodCheckURLParams = CheckStringFormatParams<schemas.$ZodURL, \"when\">;\nexport declare function _url<T extends schemas.$ZodURL>(Class: util.SchemaClass<T>, params?: string | $ZodURLParams | $ZodCheckURLParams): T;\nexport type $ZodEmojiParams = StringFormatParams<schemas.$ZodEmoji, \"when\">;\nexport type $ZodCheckEmojiParams = CheckStringFormatParams<schemas.$ZodEmoji, \"when\">;\nexport declare function _emoji<T extends schemas.$ZodEmoji>(Class: util.SchemaClass<T>, params?: string | $ZodEmojiParams | $ZodCheckEmojiParams): T;\nexport type $ZodNanoIDParams = StringFormatParams<schemas.$ZodNanoID, \"when\">;\nexport type $ZodCheckNanoIDParams = CheckStringFormatParams<schemas.$ZodNanoID, \"when\">;\nexport declare function _nanoid<T extends schemas.$ZodNanoID>(Class: util.SchemaClass<T>, params?: string | $ZodNanoIDParams | $ZodCheckNanoIDParams): T;\nexport type $ZodCUIDParams = StringFormatParams<schemas.$ZodCUID, \"when\">;\nexport type $ZodCheckCUIDParams = CheckStringFormatParams<schemas.$ZodCUID, \"when\">;\nexport declare function _cuid<T extends schemas.$ZodCUID>(Class: util.SchemaClass<T>, params?: string | $ZodCUIDParams | $ZodCheckCUIDParams): T;\nexport type $ZodCUID2Params = StringFormatParams<schemas.$ZodCUID2, \"when\">;\nexport type $ZodCheckCUID2Params = CheckStringFormatParams<schemas.$ZodCUID2, \"when\">;\nexport declare function _cuid2<T extends schemas.$ZodCUID2>(Class: util.SchemaClass<T>, params?: string | $ZodCUID2Params | $ZodCheckCUID2Params): T;\nexport type $ZodULIDParams = StringFormatParams<schemas.$ZodULID, \"when\">;\nexport type $ZodCheckULIDParams = CheckStringFormatParams<schemas.$ZodULID, \"when\">;\nexport declare function _ulid<T extends schemas.$ZodULID>(Class: util.SchemaClass<T>, params?: string | $ZodULIDParams | $ZodCheckULIDParams): T;\nexport type $ZodXIDParams = StringFormatParams<schemas.$ZodXID, \"when\">;\nexport type $ZodCheckXIDParams = CheckStringFormatParams<schemas.$ZodXID, \"when\">;\nexport declare function _xid<T extends schemas.$ZodXID>(Class: util.SchemaClass<T>, params?: string | $ZodXIDParams | $ZodCheckXIDParams): T;\nexport type $ZodKSUIDParams = StringFormatParams<schemas.$ZodKSUID, \"when\">;\nexport type $ZodCheckKSUIDParams = CheckStringFormatParams<schemas.$ZodKSUID, \"when\">;\nexport declare function _ksuid<T extends schemas.$ZodKSUID>(Class: util.SchemaClass<T>, params?: string | $ZodKSUIDParams | $ZodCheckKSUIDParams): T;\nexport type $ZodIPv4Params = StringFormatParams<schemas.$ZodIPv4, \"pattern\" | \"when\" | \"version\">;\nexport type $ZodCheckIPv4Params = CheckStringFormatParams<schemas.$ZodIPv4, \"pattern\" | \"when\" | \"version\">;\nexport declare function _ipv4<T extends schemas.$ZodIPv4>(Class: util.SchemaClass<T>, params?: string | $ZodIPv4Params | $ZodCheckIPv4Params): T;\nexport type $ZodIPv6Params = StringFormatParams<schemas.$ZodIPv6, \"pattern\" | \"when\" | \"version\">;\nexport type $ZodCheckIPv6Params = CheckStringFormatParams<schemas.$ZodIPv6, \"pattern\" | \"when\" | \"version\">;\nexport declare function _ipv6<T extends schemas.$ZodIPv6>(Class: util.SchemaClass<T>, params?: string | $ZodIPv6Params | $ZodCheckIPv6Params): T;\nexport type $ZodCIDRv4Params = StringFormatParams<schemas.$ZodCIDRv4, \"pattern\" | \"when\">;\nexport type $ZodCheckCIDRv4Params = CheckStringFormatParams<schemas.$ZodCIDRv4, \"pattern\" | \"when\">;\nexport declare function _cidrv4<T extends schemas.$ZodCIDRv4>(Class: util.SchemaClass<T>, params?: string | $ZodCIDRv4Params | $ZodCheckCIDRv4Params): T;\nexport type $ZodCIDRv6Params = StringFormatParams<schemas.$ZodCIDRv6, \"pattern\" | \"when\">;\nexport type $ZodCheckCIDRv6Params = CheckStringFormatParams<schemas.$ZodCIDRv6, \"pattern\" | \"when\">;\nexport declare function _cidrv6<T extends schemas.$ZodCIDRv6>(Class: util.SchemaClass<T>, params?: string | $ZodCIDRv6Params | $ZodCheckCIDRv6Params): T;\nexport type $ZodBase64Params = StringFormatParams<schemas.$ZodBase64, \"pattern\" | \"when\">;\nexport type $ZodCheckBase64Params = CheckStringFormatParams<schemas.$ZodBase64, \"pattern\" | \"when\">;\nexport declare function _base64<T extends schemas.$ZodBase64>(Class: util.SchemaClass<T>, params?: string | $ZodBase64Params | $ZodCheckBase64Params): T;\nexport type $ZodBase64URLParams = StringFormatParams<schemas.$ZodBase64URL, \"pattern\" | \"when\">;\nexport type $ZodCheckBase64URLParams = CheckStringFormatParams<schemas.$ZodBase64URL, \"pattern\" | \"when\">;\nexport declare function _base64url<T extends schemas.$ZodBase64URL>(Class: util.SchemaClass<T>, params?: string | $ZodBase64URLParams | $ZodCheckBase64URLParams): T;\nexport type $ZodE164Params = StringFormatParams<schemas.$ZodE164, \"when\">;\nexport type $ZodCheckE164Params = CheckStringFormatParams<schemas.$ZodE164, \"when\">;\nexport declare function _e164<T extends schemas.$ZodE164>(Class: util.SchemaClass<T>, params?: string | $ZodE164Params | $ZodCheckE164Params): T;\nexport type $ZodJWTParams = StringFormatParams<schemas.$ZodJWT, \"pattern\" | \"when\">;\nexport type $ZodCheckJWTParams = CheckStringFormatParams<schemas.$ZodJWT, \"pattern\" | \"when\">;\nexport declare function _jwt<T extends schemas.$ZodJWT>(Class: util.SchemaClass<T>, params?: string | $ZodJWTParams | $ZodCheckJWTParams): T;\nexport declare const TimePrecision: {\n readonly Any: null;\n readonly Minute: -1;\n readonly Second: 0;\n readonly Millisecond: 3;\n readonly Microsecond: 6;\n};\nexport type $ZodISODateTimeParams = StringFormatParams<schemas.$ZodISODateTime, \"pattern\" | \"when\">;\nexport type $ZodCheckISODateTimeParams = CheckStringFormatParams<schemas.$ZodISODateTime, \"pattern\" | \"when\">;\nexport declare function _isoDateTime<T extends schemas.$ZodISODateTime>(Class: util.SchemaClass<T>, params?: string | $ZodISODateTimeParams | $ZodCheckISODateTimeParams): T;\nexport type $ZodISODateParams = StringFormatParams<schemas.$ZodISODate, \"pattern\" | \"when\">;\nexport type $ZodCheckISODateParams = CheckStringFormatParams<schemas.$ZodISODate, \"pattern\" | \"when\">;\nexport declare function _isoDate<T extends schemas.$ZodISODate>(Class: util.SchemaClass<T>, params?: string | $ZodISODateParams | $ZodCheckISODateParams): T;\nexport type $ZodISOTimeParams = StringFormatParams<schemas.$ZodISOTime, \"pattern\" | \"when\">;\nexport type $ZodCheckISOTimeParams = CheckStringFormatParams<schemas.$ZodISOTime, \"pattern\" | \"when\">;\nexport declare function _isoTime<T extends schemas.$ZodISOTime>(Class: util.SchemaClass<T>, params?: string | $ZodISOTimeParams | $ZodCheckISOTimeParams): T;\nexport type $ZodISODurationParams = StringFormatParams<schemas.$ZodISODuration, \"when\">;\nexport type $ZodCheckISODurationParams = CheckStringFormatParams<schemas.$ZodISODuration, \"when\">;\nexport declare function _isoDuration<T extends schemas.$ZodISODuration>(Class: util.SchemaClass<T>, params?: string | $ZodISODurationParams | $ZodCheckISODurationParams): T;\nexport type $ZodNumberParams = TypeParams<schemas.$ZodNumber<number>, \"coerce\">;\nexport type $ZodNumberFormatParams = CheckTypeParams<schemas.$ZodNumberFormat, \"format\" | \"coerce\">;\nexport type $ZodCheckNumberFormatParams = CheckParams<checks.$ZodCheckNumberFormat, \"format\" | \"when\">;\nexport declare function _number<T extends schemas.$ZodNumber>(Class: util.SchemaClass<T>, params?: string | $ZodNumberParams): T;\nexport declare function _coercedNumber<T extends schemas.$ZodNumber>(Class: util.SchemaClass<T>, params?: string | $ZodNumberParams): T;\nexport declare function _int<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;\nexport declare function _float32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;\nexport declare function _float64<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;\nexport declare function _int32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;\nexport declare function _uint32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;\nexport type $ZodBooleanParams = TypeParams<schemas.$ZodBoolean<boolean>, \"coerce\">;\nexport declare function _boolean<T extends schemas.$ZodBoolean>(Class: util.SchemaClass<T>, params?: string | $ZodBooleanParams): T;\nexport declare function _coercedBoolean<T extends schemas.$ZodBoolean>(Class: util.SchemaClass<T>, params?: string | $ZodBooleanParams): T;\nexport type $ZodBigIntParams = TypeParams<schemas.$ZodBigInt<bigint>>;\nexport type $ZodBigIntFormatParams = CheckTypeParams<schemas.$ZodBigIntFormat, \"format\" | \"coerce\">;\nexport type $ZodCheckBigIntFormatParams = CheckParams<checks.$ZodCheckBigIntFormat, \"format\" | \"when\">;\nexport declare function _bigint<T extends schemas.$ZodBigInt>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntParams): T;\nexport declare function _coercedBigint<T extends schemas.$ZodBigInt>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntParams): T;\nexport declare function _int64<T extends schemas.$ZodBigIntFormat>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;\nexport declare function _uint64<T extends schemas.$ZodBigIntFormat>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;\nexport type $ZodSymbolParams = TypeParams<schemas.$ZodSymbol>;\nexport declare function _symbol<T extends schemas.$ZodSymbol>(Class: util.SchemaClass<T>, params?: string | $ZodSymbolParams): T;\nexport type $ZodUndefinedParams = TypeParams<schemas.$ZodUndefined>;\nexport declare function _undefined<T extends schemas.$ZodUndefined>(Class: util.SchemaClass<T>, params?: string | $ZodUndefinedParams): T;\nexport type $ZodNullParams = TypeParams<schemas.$ZodNull>;\nexport declare function _null<T extends schemas.$ZodNull>(Class: util.SchemaClass<T>, params?: string | $ZodNullParams): T;\nexport type $ZodAnyParams = TypeParams<schemas.$ZodAny>;\nexport declare function _any<T extends schemas.$ZodAny>(Class: util.SchemaClass<T>): T;\nexport type $ZodUnknownParams = TypeParams<schemas.$ZodUnknown>;\nexport declare function _unknown<T extends schemas.$ZodUnknown>(Class: util.SchemaClass<T>): T;\nexport type $ZodNeverParams = TypeParams<schemas.$ZodNever>;\nexport declare function _never<T extends schemas.$ZodNever>(Class: util.SchemaClass<T>, params?: string | $ZodNeverParams): T;\nexport type $ZodVoidParams = TypeParams<schemas.$ZodVoid>;\nexport declare function _void<T extends schemas.$ZodVoid>(Class: util.SchemaClass<T>, params?: string | $ZodVoidParams): T;\nexport type $ZodDateParams = TypeParams<schemas.$ZodDate, \"coerce\">;\nexport declare function _date<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T;\nexport declare function _coercedDate<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T;\nexport type $ZodNaNParams = TypeParams<schemas.$ZodNaN>;\nexport declare function _nan<T extends schemas.$ZodNaN>(Class: util.SchemaClass<T>, params?: string | $ZodNaNParams): T;\nexport type $ZodCheckLessThanParams = CheckParams<checks.$ZodCheckLessThan, \"inclusive\" | \"value\" | \"when\">;\nexport declare function _lt(value: util.Numeric, params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan<util.Numeric>;\nexport declare function _lte(value: util.Numeric, params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan<util.Numeric>;\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\nexport type $ZodCheckGreaterThanParams = CheckParams<checks.$ZodCheckGreaterThan, \"inclusive\" | \"value\" | \"when\">;\nexport declare function _gt(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;\nexport declare function _gte(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\nexport declare function _positive(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;\nexport declare function _negative(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan;\nexport declare function _nonpositive(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan;\nexport declare function _nonnegative(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;\nexport type $ZodCheckMultipleOfParams = CheckParams<checks.$ZodCheckMultipleOf, \"value\" | \"when\">;\nexport declare function _multipleOf(value: number | bigint, params?: string | $ZodCheckMultipleOfParams): checks.$ZodCheckMultipleOf;\nexport type $ZodCheckMaxSizeParams = CheckParams<checks.$ZodCheckMaxSize, \"maximum\" | \"when\">;\nexport declare function _maxSize(maximum: number, params?: string | $ZodCheckMaxSizeParams): checks.$ZodCheckMaxSize<util.HasSize>;\nexport type $ZodCheckMinSizeParams = CheckParams<checks.$ZodCheckMinSize, \"minimum\" | \"when\">;\nexport declare function _minSize(minimum: number, params?: string | $ZodCheckMinSizeParams): checks.$ZodCheckMinSize<util.HasSize>;\nexport type $ZodCheckSizeEqualsParams = CheckParams<checks.$ZodCheckSizeEquals, \"size\" | \"when\">;\nexport declare function _size(size: number, params?: string | $ZodCheckSizeEqualsParams): checks.$ZodCheckSizeEquals<util.HasSize>;\nexport type $ZodCheckMaxLengthParams = CheckParams<checks.$ZodCheckMaxLength, \"maximum\" | \"when\">;\nexport declare function _maxLength(maximum: number, params?: string | $ZodCheckMaxLengthParams): checks.$ZodCheckMaxLength<util.HasLength>;\nexport type $ZodCheckMinLengthParams = CheckParams<checks.$ZodCheckMinLength, \"minimum\" | \"when\">;\nexport declare function _minLength(minimum: number, params?: string | $ZodCheckMinLengthParams): checks.$ZodCheckMinLength<util.HasLength>;\nexport type $ZodCheckLengthEqualsParams = CheckParams<checks.$ZodCheckLengthEquals, \"length\" | \"when\">;\nexport declare function _length(length: number, params?: string | $ZodCheckLengthEqualsParams): checks.$ZodCheckLengthEquals<util.HasLength>;\nexport type $ZodCheckRegexParams = CheckParams<checks.$ZodCheckRegex, \"format\" | \"pattern\" | \"when\">;\nexport declare function _regex(pattern: RegExp, params?: string | $ZodCheckRegexParams): checks.$ZodCheckRegex;\nexport type $ZodCheckLowerCaseParams = CheckParams<checks.$ZodCheckLowerCase, \"format\" | \"when\">;\nexport declare function _lowercase(params?: string | $ZodCheckLowerCaseParams): checks.$ZodCheckLowerCase;\nexport type $ZodCheckUpperCaseParams = CheckParams<checks.$ZodCheckUpperCase, \"format\" | \"when\">;\nexport declare function _uppercase(params?: string | $ZodCheckUpperCaseParams): checks.$ZodCheckUpperCase;\nexport type $ZodCheckIncludesParams = CheckParams<checks.$ZodCheckIncludes, \"includes\" | \"format\" | \"when\" | \"pattern\">;\nexport declare function _includes(includes: string, params?: string | $ZodCheckIncludesParams): checks.$ZodCheckIncludes;\nexport type $ZodCheckStartsWithParams = CheckParams<checks.$ZodCheckStartsWith, \"prefix\" | \"format\" | \"when\" | \"pattern\">;\nexport declare function _startsWith(prefix: string, params?: string | $ZodCheckStartsWithParams): checks.$ZodCheckStartsWith;\nexport type $ZodCheckEndsWithParams = CheckParams<checks.$ZodCheckEndsWith, \"suffix\" | \"format\" | \"pattern\" | \"when\">;\nexport declare function _endsWith(suffix: string, params?: string | $ZodCheckEndsWithParams): checks.$ZodCheckEndsWith;\nexport type $ZodCheckPropertyParams = CheckParams<checks.$ZodCheckProperty, \"property\" | \"schema\" | \"when\">;\nexport declare function _property<K extends string, T extends schemas.$ZodType>(property: K, schema: T, params?: string | $ZodCheckPropertyParams): checks.$ZodCheckProperty<{\n [k in K]: core.output<T>;\n}>;\nexport type $ZodCheckMimeTypeParams = CheckParams<checks.$ZodCheckMimeType, \"mime\" | \"when\">;\nexport declare function _mime(types: util.MimeTypes[], params?: string | $ZodCheckMimeTypeParams): checks.$ZodCheckMimeType;\nexport declare function _overwrite<T>(tx: (input: T) => T): checks.$ZodCheckOverwrite<T>;\nexport declare function _normalize(form?: \"NFC\" | \"NFD\" | \"NFKC\" | \"NFKD\" | (string & {})): checks.$ZodCheckOverwrite<string>;\nexport declare function _trim(): checks.$ZodCheckOverwrite<string>;\nexport declare function _toLowerCase(): checks.$ZodCheckOverwrite<string>;\nexport declare function _toUpperCase(): checks.$ZodCheckOverwrite<string>;\nexport type $ZodArrayParams = TypeParams<schemas.$ZodArray, \"element\">;\nexport declare function _array<T extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodArray>, element: T, params?: string | $ZodArrayParams): schemas.$ZodArray<T>;\nexport type $ZodObjectParams = TypeParams<schemas.$ZodObject, \"shape\" | \"catchall\">;\nexport type $ZodUnionParams = TypeParams<schemas.$ZodUnion, \"options\">;\nexport declare function _union<const T extends readonly schemas.$ZodObject[]>(Class: util.SchemaClass<schemas.$ZodUnion>, options: T, params?: string | $ZodUnionParams): schemas.$ZodUnion<T>;\nexport interface $ZodTypeDiscriminableInternals extends schemas.$ZodTypeInternals {\n propValues: util.PropValues;\n}\nexport interface $ZodTypeDiscriminable extends schemas.$ZodType {\n _zod: $ZodTypeDiscriminableInternals;\n}\nexport type $ZodDiscriminatedUnionParams = TypeParams<schemas.$ZodDiscriminatedUnion, \"options\" | \"discriminator\">;\nexport declare function _discriminatedUnion<Types extends [$ZodTypeDiscriminable, ...$ZodTypeDiscriminable[]], Disc extends string>(Class: util.SchemaClass<schemas.$ZodDiscriminatedUnion>, discriminator: Disc, options: Types, params?: string | $ZodDiscriminatedUnionParams): schemas.$ZodDiscriminatedUnion<Types, Disc>;\nexport type $ZodIntersectionParams = TypeParams<schemas.$ZodIntersection, \"left\" | \"right\">;\nexport declare function _intersection<T extends schemas.$ZodObject, U extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodIntersection>, left: T, right: U): schemas.$ZodIntersection<T, U>;\nexport type $ZodTupleParams = TypeParams<schemas.$ZodTuple, \"items\" | \"rest\">;\nexport declare function _tuple<T extends readonly [schemas.$ZodType, ...schemas.$ZodType[]]>(Class: util.SchemaClass<schemas.$ZodTuple>, items: T, params?: string | $ZodTupleParams): schemas.$ZodTuple<T, null>;\nexport declare function _tuple<T extends readonly [schemas.$ZodType, ...schemas.$ZodType[]], Rest extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodTuple>, items: T, rest: Rest, params?: string | $ZodTupleParams): schemas.$ZodTuple<T, Rest>;\nexport type $ZodRecordParams = TypeParams<schemas.$ZodRecord, \"keyType\" | \"valueType\">;\nexport declare function _record<Key extends schemas.$ZodRecordKey, Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodRecord>, keyType: Key, valueType: Value, params?: string | $ZodRecordParams): schemas.$ZodRecord<Key, Value>;\nexport type $ZodMapParams = TypeParams<schemas.$ZodMap, \"keyType\" | \"valueType\">;\nexport declare function _map<Key extends schemas.$ZodObject, Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodMap>, keyType: Key, valueType: Value, params?: string | $ZodMapParams): schemas.$ZodMap<Key, Value>;\nexport type $ZodSetParams = TypeParams<schemas.$ZodSet, \"valueType\">;\nexport declare function _set<Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodSet>, valueType: Value, params?: string | $ZodSetParams): schemas.$ZodSet<Value>;\nexport type $ZodEnumParams = TypeParams<schemas.$ZodEnum, \"entries\">;\nexport declare function _enum<const T extends string[]>(Class: util.SchemaClass<schemas.$ZodEnum>, values: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<util.ToEnum<T[number]>>;\nexport declare function _enum<T extends util.EnumLike>(Class: util.SchemaClass<schemas.$ZodEnum>, entries: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<T>;\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport declare function _nativeEnum<T extends util.EnumLike>(Class: util.SchemaClass<schemas.$ZodEnum>, entries: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<T>;\nexport type $ZodLiteralParams = TypeParams<schemas.$ZodLiteral, \"values\">;\nexport declare function _literal<const T extends Array<util.Literal>>(Class: util.SchemaClass<schemas.$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): schemas.$ZodLiteral<T[number]>;\nexport declare function _literal<const T extends util.Literal>(Class: util.SchemaClass<schemas.$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): schemas.$ZodLiteral<T>;\nexport type $ZodFileParams = TypeParams<schemas.$ZodFile>;\nexport declare function _file(Class: util.SchemaClass<schemas.$ZodFile>, params?: string | $ZodFileParams): schemas.$ZodFile;\nexport type $ZodTransformParams = TypeParams<schemas.$ZodTransform, \"transform\">;\nexport declare function _transform<I = unknown, O = I>(Class: util.SchemaClass<schemas.$ZodTransform>, fn: (input: I, ctx?: schemas.ParsePayload) => O): schemas.$ZodTransform<Awaited<O>, I>;\nexport type $ZodOptionalParams = TypeParams<schemas.$ZodOptional, \"innerType\">;\nexport declare function _optional<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodOptional>, innerType: T): schemas.$ZodOptional<T>;\nexport type $ZodNullableParams = TypeParams<schemas.$ZodNullable, \"innerType\">;\nexport declare function _nullable<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodNullable>, innerType: T): schemas.$ZodNullable<T>;\nexport type $ZodDefaultParams = TypeParams<schemas.$ZodDefault, \"innerType\" | \"defaultValue\">;\nexport declare function _default<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodDefault>, innerType: T, defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)): schemas.$ZodDefault<T>;\nexport type $ZodNonOptionalParams = TypeParams<schemas.$ZodNonOptional, \"innerType\">;\nexport declare function _nonoptional<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodNonOptional>, innerType: T, params?: string | $ZodNonOptionalParams): schemas.$ZodNonOptional<T>;\nexport type $ZodSuccessParams = TypeParams<schemas.$ZodSuccess, \"innerType\">;\nexport declare function _success<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodSuccess>, innerType: T): schemas.$ZodSuccess<T>;\nexport type $ZodCatchParams = TypeParams<schemas.$ZodCatch, \"innerType\" | \"catchValue\">;\nexport declare function _catch<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodCatch>, innerType: T, catchValue: core.output<T> | ((ctx: schemas.$ZodCatchCtx) => core.output<T>)): schemas.$ZodCatch<T>;\nexport type $ZodPipeParams = TypeParams<schemas.$ZodPipe, \"in\" | \"out\">;\nexport declare function _pipe<const A extends schemas.$ZodType, B extends schemas.$ZodType<unknown, core.output<A>> = schemas.$ZodType<unknown, core.output<A>>>(Class: util.SchemaClass<schemas.$ZodPipe>, in_: A, out: B | schemas.$ZodType<unknown, core.output<A>>): schemas.$ZodPipe<A, B>;\nexport type $ZodReadonlyParams = TypeParams<schemas.$ZodReadonly, \"innerType\">;\nexport declare function _readonly<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodReadonly>, innerType: T): schemas.$ZodReadonly<T>;\nexport type $ZodTemplateLiteralParams = TypeParams<schemas.$ZodTemplateLiteral, \"parts\">;\nexport declare function _templateLiteral<const Parts extends schemas.$ZodTemplateLiteralPart[]>(Class: util.SchemaClass<schemas.$ZodTemplateLiteral>, parts: Parts, params?: string | $ZodTemplateLiteralParams): schemas.$ZodTemplateLiteral<schemas.$PartsToTemplateLiteral<Parts>>;\nexport type $ZodLazyParams = TypeParams<schemas.$ZodLazy, \"getter\">;\nexport declare function _lazy<T extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodLazy>, getter: () => T): schemas.$ZodLazy<T>;\nexport type $ZodPromiseParams = TypeParams<schemas.$ZodPromise, \"innerType\">;\nexport declare function _promise<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodPromise>, innerType: T): schemas.$ZodPromise<T>;\nexport type $ZodCustomParams = CheckTypeParams<schemas.$ZodCustom, \"fn\">;\nexport declare function _custom<O = unknown, I = O>(Class: util.SchemaClass<schemas.$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): schemas.$ZodCustom<O, I>;\nexport declare function _refine<O = unknown, I = O>(Class: util.SchemaClass<schemas.$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): schemas.$ZodCustom<O, I>;\nexport type $ZodSuperRefineIssue<T extends errors.$ZodIssueBase = errors.$ZodIssue> = T extends any ? RawIssue<T> : never;\ntype RawIssue<T extends errors.$ZodIssueBase> = T extends any ? util.Flatten<util.MakePartial<T, \"message\" | \"path\"> & {\n /** The schema or check that originated this issue. */\n readonly inst?: schemas.$ZodType | checks.$ZodCheck;\n /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */\n readonly continue?: boolean | undefined;\n} & Record<string, unknown>> : never;\nexport interface $RefinementCtx<T = unknown> extends schemas.ParsePayload<T> {\n addIssue(arg: string | $ZodSuperRefineIssue): void;\n}\nexport declare function _superRefine<T>(fn: (arg: T, payload: $RefinementCtx<T>) => void | Promise<void>): checks.$ZodCheck<T>;\nexport declare function _check<O = unknown>(fn: schemas.CheckFn<O>, params?: string | $ZodCustomParams): checks.$ZodCheck<O>;\nexport interface $ZodStringBoolParams extends TypeParams {\n truthy?: string[];\n falsy?: string[];\n /**\n * Options: `\"sensitive\"`, `\"insensitive\"`\n *\n * @default `\"insensitive\"`\n */\n case?: \"sensitive\" | \"insensitive\" | undefined;\n}\nexport declare function _stringbool(Classes: {\n Codec?: typeof schemas.$ZodCodec;\n Boolean?: typeof schemas.$ZodBoolean;\n String?: typeof schemas.$ZodString;\n}, _params?: string | $ZodStringBoolParams): schemas.$ZodCodec<schemas.$ZodString, schemas.$ZodBoolean>;\nexport declare function _stringFormat<Format extends string>(Class: typeof schemas.$ZodCustomStringFormat, format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | $ZodStringFormatParams): schemas.$ZodCustomStringFormat<Format>;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;KAKYK,iBAAiBF,WAAmBH,8BAAqCE,sCAA6CI,4BAA4BF,QAAaW,QAAQX,aAAkBQ,KAAKN,kBAAkBE,cAAcD;EAA9NF,KAAAA,CAAAA,EAAAA,MAAM,GACGH,YADHM,CACuBD,UADvB,CAAA,GAAA,SAAA;EAAWJ;EAAmBH,OAAAA,CAAAA,EAAAA,MAAAA,GA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file":"api.d.ts","names":["checks","core","errors","schemas","util","Params","T","IssueTypes","OmitKeys","$ZodType","$ZodCheck","$ZodIssueBase","Omit","$ZodErrorMap","EmptyToNever","Partial","Flatten","TypeParams","AlsoOmit","Exclude","NonNullable","CheckParams","StringFormatParams","$ZodStringFormat","CheckStringFormatParams","CheckTypeParams","$ZodStringParams","$ZodString","_string","SchemaClass","_coercedString","$ZodStringFormatParams","$ZodCheckStringFormatParams","$ZodCheckStringFormat","$ZodEmailParams","$ZodEmail","$ZodCheckEmailParams","_email","$ZodGUIDParams","$ZodGUID","$ZodCheckGUIDParams","_guid","$ZodUUIDParams","$ZodUUID","$ZodCheckUUIDParams","_uuid","$ZodUUIDv4Params","$ZodCheckUUIDv4Params","_uuidv4","$ZodUUIDv6Params","$ZodCheckUUIDv6Params","_uuidv6","$ZodUUIDv7Params","$ZodCheckUUIDv7Params","_uuidv7","$ZodURLParams","$ZodURL","$ZodCheckURLParams","_url","$ZodEmojiParams","$ZodEmoji","$ZodCheckEmojiParams","_emoji","$ZodNanoIDParams","$ZodNanoID","$ZodCheckNanoIDParams","_nanoid","$ZodCUIDParams","$ZodCUID","$ZodCheckCUIDParams","_cuid","$ZodCUID2Params","$ZodCUID2","$ZodCheckCUID2Params","_cuid2","$ZodULIDParams","$ZodULID","$ZodCheckULIDParams","_ulid","$ZodXIDParams","$ZodXID","$ZodCheckXIDParams","_xid","$ZodKSUIDParams","$ZodKSUID","$ZodCheckKSUIDParams","_ksuid","$ZodIPv4Params","$ZodIPv4","$ZodCheckIPv4Params","_ipv4","$ZodIPv6Params","$ZodIPv6","$ZodCheckIPv6Params","_ipv6","$ZodCIDRv4Params","$ZodCIDRv4","$ZodCheckCIDRv4Params","_cidrv4","$ZodCIDRv6Params","$ZodCIDRv6","$ZodCheckCIDRv6Params","_cidrv6","$ZodBase64Params","$ZodBase64","$ZodCheckBase64Params","_base64","$ZodBase64URLParams","$ZodBase64URL","$ZodCheckBase64URLParams","_base64url","$ZodE164Params","$ZodE164","$ZodCheckE164Params","_e164","$ZodJWTParams","$ZodJWT","$ZodCheckJWTParams","_jwt","TimePrecision","$ZodISODateTimeParams","$ZodISODateTime","$ZodCheckISODateTimeParams","_isoDateTime","$ZodISODateParams","$ZodISODate","$ZodCheckISODateParams","_isoDate","$ZodISOTimeParams","$ZodISOTime","$ZodCheckISOTimeParams","_isoTime","$ZodISODurationParams","$ZodISODuration","$ZodCheckISODurationParams","_isoDuration","$ZodNumberParams","$ZodNumber","$ZodNumberFormatParams","$ZodNumberFormat","$ZodCheckNumberFormatParams","$ZodCheckNumberFormat","_number","_coercedNumber","_int","_float32","_float64","_int32","_uint32","$ZodBooleanParams","$ZodBoolean","_boolean","_coercedBoolean","$ZodBigIntParams","$ZodBigInt","$ZodBigIntFormatParams","$ZodBigIntFormat","$ZodCheckBigIntFormatParams","$ZodCheckBigIntFormat","_bigint","_coercedBigint","_int64","_uint64","$ZodSymbolParams","$ZodSymbol","_symbol","$ZodUndefinedParams","$ZodUndefined","_undefined","$ZodNullParams","$ZodNull","_null","$ZodAnyParams","$ZodAny","_any","$ZodUnknownParams","$ZodUnknown","_unknown","$ZodNeverParams","$ZodNever","_never","$ZodVoidParams","$ZodVoid","_void","$ZodDateParams","$ZodDate","_date","_coercedDate","$ZodNaNParams","$ZodNaN","_nan","$ZodCheckLessThanParams","$ZodCheckLessThan","_lt","Numeric","_lte","_max","$ZodCheckGreaterThanParams","$ZodCheckGreaterThan","_gt","_gte","_min","_positive","_negative","_nonpositive","_nonnegative","$ZodCheckMultipleOfParams","$ZodCheckMultipleOf","_multipleOf","$ZodCheckMaxSizeParams","$ZodCheckMaxSize","_maxSize","HasSize","$ZodCheckMinSizeParams","$ZodCheckMinSize","_minSize","$ZodCheckSizeEqualsParams","$ZodCheckSizeEquals","_size","$ZodCheckMaxLengthParams","$ZodCheckMaxLength","_maxLength","HasLength","$ZodCheckMinLengthParams","$ZodCheckMinLength","_minLength","$ZodCheckLengthEqualsParams","$ZodCheckLengthEquals","_length","$ZodCheckRegexParams","$ZodCheckRegex","_regex","RegExp","$ZodCheckLowerCaseParams","$ZodCheckLowerCase","_lowercase","$ZodCheckUpperCaseParams","$ZodCheckUpperCase","_uppercase","$ZodCheckIncludesParams","$ZodCheckIncludes","_includes","$ZodCheckStartsWithParams","$ZodCheckStartsWith","_startsWith","$ZodCheckEndsWithParams","$ZodCheckEndsWith","_endsWith","$ZodCheckPropertyParams","$ZodCheckProperty","_property","K","output","$ZodCheckMimeTypeParams","$ZodCheckMimeType","_mime","MimeTypes","_overwrite","$ZodCheckOverwrite","_normalize","_trim","_toLowerCase","_toUpperCase","$ZodArrayParams","$ZodArray","_array","$ZodObjectParams","$ZodObject","$ZodUnionParams","$ZodUnion","_union","$ZodTypeDiscriminableInternals","PropValues","$ZodTypeInternals","$ZodTypeDiscriminable","$ZodDiscriminatedUnionParams","$ZodDiscriminatedUnion","_discriminatedUnion","Types","Disc","$ZodIntersectionParams","$ZodIntersection","_intersection","U","$ZodTupleParams","$ZodTuple","_tuple","Rest","$ZodRecordParams","$ZodRecord","_record","Key","Value","$ZodRecordKey","$ZodMapParams","$ZodMap","_map","$ZodSetParams","$ZodSet","_set","$ZodEnumParams","$ZodEnum","_enum","ToEnum","EnumLike","_nativeEnum","$ZodLiteralParams","$ZodLiteral","_literal","Literal","Array","$ZodFileParams","$ZodFile","_file","$ZodTransformParams","$ZodTransform","_transform","I","O","ParsePayload","Awaited","$ZodOptionalParams","$ZodOptional","_optional","$ZodNullableParams","$ZodNullable","_nullable","$ZodDefaultParams","$ZodDefault","_default","NoUndefined","$ZodNonOptionalParams","$ZodNonOptional","_nonoptional","$ZodSuccessParams","$ZodSuccess","_success","$ZodCatchParams","$ZodCatch","_catch","$ZodCatchCtx","$ZodPipeParams","$ZodPipe","_pipe","A","B","$ZodReadonlyParams","$ZodReadonly","_readonly","$ZodTemplateLiteralParams","$ZodTemplateLiteral","_templateLiteral","Parts","$ZodTemplateLiteralPart","$PartsToTemplateLiteral","$ZodLazyParams","$ZodLazy","_lazy","$ZodPromiseParams","$ZodPromise","_promise","$ZodCustomParams","$ZodCustom","_custom","_refine","$ZodSuperRefineIssue","$ZodIssue","RawIssue","MakePartial","Record","$RefinementCtx","_superRefine","Promise","_check","CheckFn","$ZodStringBoolParams","_stringbool","$ZodCodec","_stringFormat","Format","$ZodCustomStringFormat","MaybeAsync"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/api.d.cts"],"sourcesContent":["import * as checks from \"./checks.cjs\";\nimport type * as core from \"./core.cjs\";\nimport type * as errors from \"./errors.cjs\";\nimport * as schemas from \"./schemas.cjs\";\nimport * as util from \"./util.cjs\";\nexport type Params<T extends schemas.$ZodType | checks.$ZodCheck, IssueTypes extends errors.$ZodIssueBase, OmitKeys extends keyof T[\"_zod\"][\"def\"] = never> = util.Flatten<Partial<util.EmptyToNever<Omit<T[\"_zod\"][\"def\"], OmitKeys> & ([IssueTypes] extends [never] ? {} : {\n error?: string | errors.$ZodErrorMap<IssueTypes> | undefined;\n /** @deprecated This parameter is deprecated. Use `error` instead. */\n message?: string | undefined;\n})>>>;\nexport type TypeParams<T extends schemas.$ZodType = schemas.$ZodType & {\n _isst: never;\n}, AlsoOmit extends Exclude<keyof T[\"_zod\"][\"def\"], \"type\" | \"checks\" | \"error\"> = never> = Params<T, NonNullable<T[\"_zod\"][\"isst\"]>, \"type\" | \"checks\" | \"error\" | AlsoOmit>;\nexport type CheckParams<T extends checks.$ZodCheck = checks.$ZodCheck, // & { _issc: never },\nAlsoOmit extends Exclude<keyof T[\"_zod\"][\"def\"], \"check\" | \"error\"> = never> = Params<T, NonNullable<T[\"_zod\"][\"issc\"]>, \"check\" | \"error\" | AlsoOmit>;\nexport type StringFormatParams<T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat, AlsoOmit extends Exclude<keyof T[\"_zod\"][\"def\"], \"type\" | \"coerce\" | \"checks\" | \"error\" | \"check\" | \"format\"> = never> = Params<T, NonNullable<T[\"_zod\"][\"isst\"] | T[\"_zod\"][\"issc\"]>, \"type\" | \"coerce\" | \"checks\" | \"error\" | \"check\" | \"format\" | AlsoOmit>;\nexport type CheckStringFormatParams<T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat, AlsoOmit extends Exclude<keyof T[\"_zod\"][\"def\"], \"type\" | \"coerce\" | \"checks\" | \"error\" | \"check\" | \"format\"> = never> = Params<T, NonNullable<T[\"_zod\"][\"issc\"]>, \"type\" | \"coerce\" | \"checks\" | \"error\" | \"check\" | \"format\" | AlsoOmit>;\nexport type CheckTypeParams<T extends schemas.$ZodType & checks.$ZodCheck = schemas.$ZodType & checks.$ZodCheck, AlsoOmit extends Exclude<keyof T[\"_zod\"][\"def\"], \"type\" | \"checks\" | \"error\" | \"check\"> = never> = Params<T, NonNullable<T[\"_zod\"][\"isst\"] | T[\"_zod\"][\"issc\"]>, \"type\" | \"checks\" | \"error\" | \"check\" | AlsoOmit>;\nexport type $ZodStringParams = TypeParams<schemas.$ZodString<string>, \"coerce\">;\nexport declare function _string<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;\nexport declare function _coercedString<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;\nexport type $ZodStringFormatParams = CheckTypeParams<schemas.$ZodStringFormat, \"format\" | \"coerce\" | \"when\" | \"pattern\">;\nexport type $ZodCheckStringFormatParams = CheckParams<checks.$ZodCheckStringFormat, \"format\">;\nexport type $ZodEmailParams = StringFormatParams<schemas.$ZodEmail, \"when\">;\nexport type $ZodCheckEmailParams = CheckStringFormatParams<schemas.$ZodEmail, \"when\">;\nexport declare function _email<T extends schemas.$ZodEmail>(Class: util.SchemaClass<T>, params?: string | $ZodEmailParams | $ZodCheckEmailParams): T;\nexport type $ZodGUIDParams = StringFormatParams<schemas.$ZodGUID, \"pattern\" | \"when\">;\nexport type $ZodCheckGUIDParams = CheckStringFormatParams<schemas.$ZodGUID, \"pattern\" | \"when\">;\nexport declare function _guid<T extends schemas.$ZodGUID>(Class: util.SchemaClass<T>, params?: string | $ZodGUIDParams | $ZodCheckGUIDParams): T;\nexport type $ZodUUIDParams = StringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport type $ZodCheckUUIDParams = CheckStringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport declare function _uuid<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDParams | $ZodCheckUUIDParams): T;\nexport type $ZodUUIDv4Params = StringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport type $ZodCheckUUIDv4Params = CheckStringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport declare function _uuidv4<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv4Params | $ZodCheckUUIDv4Params): T;\nexport type $ZodUUIDv6Params = StringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport type $ZodCheckUUIDv6Params = CheckStringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport declare function _uuidv6<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv6Params | $ZodCheckUUIDv6Params): T;\nexport type $ZodUUIDv7Params = StringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport type $ZodCheckUUIDv7Params = CheckStringFormatParams<schemas.$ZodUUID, \"pattern\" | \"when\">;\nexport declare function _uuidv7<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv7Params | $ZodCheckUUIDv7Params): T;\nexport type $ZodURLParams = StringFormatParams<schemas.$ZodURL, \"when\">;\nexport type $ZodCheckURLParams = CheckStringFormatParams<schemas.$ZodURL, \"when\">;\nexport declare function _url<T extends schemas.$ZodURL>(Class: util.SchemaClass<T>, params?: string | $ZodURLParams | $ZodCheckURLParams): T;\nexport type $ZodEmojiParams = StringFormatParams<schemas.$ZodEmoji, \"when\">;\nexport type $ZodCheckEmojiParams = CheckStringFormatParams<schemas.$ZodEmoji, \"when\">;\nexport declare function _emoji<T extends schemas.$ZodEmoji>(Class: util.SchemaClass<T>, params?: string | $ZodEmojiParams | $ZodCheckEmojiParams): T;\nexport type $ZodNanoIDParams = StringFormatParams<schemas.$ZodNanoID, \"when\">;\nexport type $ZodCheckNanoIDParams = CheckStringFormatParams<schemas.$ZodNanoID, \"when\">;\nexport declare function _nanoid<T extends schemas.$ZodNanoID>(Class: util.SchemaClass<T>, params?: string | $ZodNanoIDParams | $ZodCheckNanoIDParams): T;\nexport type $ZodCUIDParams = StringFormatParams<schemas.$ZodCUID, \"when\">;\nexport type $ZodCheckCUIDParams = CheckStringFormatParams<schemas.$ZodCUID, \"when\">;\nexport declare function _cuid<T extends schemas.$ZodCUID>(Class: util.SchemaClass<T>, params?: string | $ZodCUIDParams | $ZodCheckCUIDParams): T;\nexport type $ZodCUID2Params = StringFormatParams<schemas.$ZodCUID2, \"when\">;\nexport type $ZodCheckCUID2Params = CheckStringFormatParams<schemas.$ZodCUID2, \"when\">;\nexport declare function _cuid2<T extends schemas.$ZodCUID2>(Class: util.SchemaClass<T>, params?: string | $ZodCUID2Params | $ZodCheckCUID2Params): T;\nexport type $ZodULIDParams = StringFormatParams<schemas.$ZodULID, \"when\">;\nexport type $ZodCheckULIDParams = CheckStringFormatParams<schemas.$ZodULID, \"when\">;\nexport declare function _ulid<T extends schemas.$ZodULID>(Class: util.SchemaClass<T>, params?: string | $ZodULIDParams | $ZodCheckULIDParams): T;\nexport type $ZodXIDParams = StringFormatParams<schemas.$ZodXID, \"when\">;\nexport type $ZodCheckXIDParams = CheckStringFormatParams<schemas.$ZodXID, \"when\">;\nexport declare function _xid<T extends schemas.$ZodXID>(Class: util.SchemaClass<T>, params?: string | $ZodXIDParams | $ZodCheckXIDParams): T;\nexport type $ZodKSUIDParams = StringFormatParams<schemas.$ZodKSUID, \"when\">;\nexport type $ZodCheckKSUIDParams = CheckStringFormatParams<schemas.$ZodKSUID, \"when\">;\nexport declare function _ksuid<T extends schemas.$ZodKSUID>(Class: util.SchemaClass<T>, params?: string | $ZodKSUIDParams | $ZodCheckKSUIDParams): T;\nexport type $ZodIPv4Params = StringFormatParams<schemas.$ZodIPv4, \"pattern\" | \"when\" | \"version\">;\nexport type $ZodCheckIPv4Params = CheckStringFormatParams<schemas.$ZodIPv4, \"pattern\" | \"when\" | \"version\">;\nexport declare function _ipv4<T extends schemas.$ZodIPv4>(Class: util.SchemaClass<T>, params?: string | $ZodIPv4Params | $ZodCheckIPv4Params): T;\nexport type $ZodIPv6Params = StringFormatParams<schemas.$ZodIPv6, \"pattern\" | \"when\" | \"version\">;\nexport type $ZodCheckIPv6Params = CheckStringFormatParams<schemas.$ZodIPv6, \"pattern\" | \"when\" | \"version\">;\nexport declare function _ipv6<T extends schemas.$ZodIPv6>(Class: util.SchemaClass<T>, params?: string | $ZodIPv6Params | $ZodCheckIPv6Params): T;\nexport type $ZodCIDRv4Params = StringFormatParams<schemas.$ZodCIDRv4, \"pattern\" | \"when\">;\nexport type $ZodCheckCIDRv4Params = CheckStringFormatParams<schemas.$ZodCIDRv4, \"pattern\" | \"when\">;\nexport declare function _cidrv4<T extends schemas.$ZodCIDRv4>(Class: util.SchemaClass<T>, params?: string | $ZodCIDRv4Params | $ZodCheckCIDRv4Params): T;\nexport type $ZodCIDRv6Params = StringFormatParams<schemas.$ZodCIDRv6, \"pattern\" | \"when\">;\nexport type $ZodCheckCIDRv6Params = CheckStringFormatParams<schemas.$ZodCIDRv6, \"pattern\" | \"when\">;\nexport declare function _cidrv6<T extends schemas.$ZodCIDRv6>(Class: util.SchemaClass<T>, params?: string | $ZodCIDRv6Params | $ZodCheckCIDRv6Params): T;\nexport type $ZodBase64Params = StringFormatParams<schemas.$ZodBase64, \"pattern\" | \"when\">;\nexport type $ZodCheckBase64Params = CheckStringFormatParams<schemas.$ZodBase64, \"pattern\" | \"when\">;\nexport declare function _base64<T extends schemas.$ZodBase64>(Class: util.SchemaClass<T>, params?: string | $ZodBase64Params | $ZodCheckBase64Params): T;\nexport type $ZodBase64URLParams = StringFormatParams<schemas.$ZodBase64URL, \"pattern\" | \"when\">;\nexport type $ZodCheckBase64URLParams = CheckStringFormatParams<schemas.$ZodBase64URL, \"pattern\" | \"when\">;\nexport declare function _base64url<T extends schemas.$ZodBase64URL>(Class: util.SchemaClass<T>, params?: string | $ZodBase64URLParams | $ZodCheckBase64URLParams): T;\nexport type $ZodE164Params = StringFormatParams<schemas.$ZodE164, \"when\">;\nexport type $ZodCheckE164Params = CheckStringFormatParams<schemas.$ZodE164, \"when\">;\nexport declare function _e164<T extends schemas.$ZodE164>(Class: util.SchemaClass<T>, params?: string | $ZodE164Params | $ZodCheckE164Params): T;\nexport type $ZodJWTParams = StringFormatParams<schemas.$ZodJWT, \"pattern\" | \"when\">;\nexport type $ZodCheckJWTParams = CheckStringFormatParams<schemas.$ZodJWT, \"pattern\" | \"when\">;\nexport declare function _jwt<T extends schemas.$ZodJWT>(Class: util.SchemaClass<T>, params?: string | $ZodJWTParams | $ZodCheckJWTParams): T;\nexport declare const TimePrecision: {\n readonly Any: null;\n readonly Minute: -1;\n readonly Second: 0;\n readonly Millisecond: 3;\n readonly Microsecond: 6;\n};\nexport type $ZodISODateTimeParams = StringFormatParams<schemas.$ZodISODateTime, \"pattern\" | \"when\">;\nexport type $ZodCheckISODateTimeParams = CheckStringFormatParams<schemas.$ZodISODateTime, \"pattern\" | \"when\">;\nexport declare function _isoDateTime<T extends schemas.$ZodISODateTime>(Class: util.SchemaClass<T>, params?: string | $ZodISODateTimeParams | $ZodCheckISODateTimeParams): T;\nexport type $ZodISODateParams = StringFormatParams<schemas.$ZodISODate, \"pattern\" | \"when\">;\nexport type $ZodCheckISODateParams = CheckStringFormatParams<schemas.$ZodISODate, \"pattern\" | \"when\">;\nexport declare function _isoDate<T extends schemas.$ZodISODate>(Class: util.SchemaClass<T>, params?: string | $ZodISODateParams | $ZodCheckISODateParams): T;\nexport type $ZodISOTimeParams = StringFormatParams<schemas.$ZodISOTime, \"pattern\" | \"when\">;\nexport type $ZodCheckISOTimeParams = CheckStringFormatParams<schemas.$ZodISOTime, \"pattern\" | \"when\">;\nexport declare function _isoTime<T extends schemas.$ZodISOTime>(Class: util.SchemaClass<T>, params?: string | $ZodISOTimeParams | $ZodCheckISOTimeParams): T;\nexport type $ZodISODurationParams = StringFormatParams<schemas.$ZodISODuration, \"when\">;\nexport type $ZodCheckISODurationParams = CheckStringFormatParams<schemas.$ZodISODuration, \"when\">;\nexport declare function _isoDuration<T extends schemas.$ZodISODuration>(Class: util.SchemaClass<T>, params?: string | $ZodISODurationParams | $ZodCheckISODurationParams): T;\nexport type $ZodNumberParams = TypeParams<schemas.$ZodNumber<number>, \"coerce\">;\nexport type $ZodNumberFormatParams = CheckTypeParams<schemas.$ZodNumberFormat, \"format\" | \"coerce\">;\nexport type $ZodCheckNumberFormatParams = CheckParams<checks.$ZodCheckNumberFormat, \"format\" | \"when\">;\nexport declare function _number<T extends schemas.$ZodNumber>(Class: util.SchemaClass<T>, params?: string | $ZodNumberParams): T;\nexport declare function _coercedNumber<T extends schemas.$ZodNumber>(Class: util.SchemaClass<T>, params?: string | $ZodNumberParams): T;\nexport declare function _int<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;\nexport declare function _float32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;\nexport declare function _float64<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;\nexport declare function _int32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;\nexport declare function _uint32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;\nexport type $ZodBooleanParams = TypeParams<schemas.$ZodBoolean<boolean>, \"coerce\">;\nexport declare function _boolean<T extends schemas.$ZodBoolean>(Class: util.SchemaClass<T>, params?: string | $ZodBooleanParams): T;\nexport declare function _coercedBoolean<T extends schemas.$ZodBoolean>(Class: util.SchemaClass<T>, params?: string | $ZodBooleanParams): T;\nexport type $ZodBigIntParams = TypeParams<schemas.$ZodBigInt<bigint>>;\nexport type $ZodBigIntFormatParams = CheckTypeParams<schemas.$ZodBigIntFormat, \"format\" | \"coerce\">;\nexport type $ZodCheckBigIntFormatParams = CheckParams<checks.$ZodCheckBigIntFormat, \"format\" | \"when\">;\nexport declare function _bigint<T extends schemas.$ZodBigInt>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntParams): T;\nexport declare function _coercedBigint<T extends schemas.$ZodBigInt>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntParams): T;\nexport declare function _int64<T extends schemas.$ZodBigIntFormat>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;\nexport declare function _uint64<T extends schemas.$ZodBigIntFormat>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;\nexport type $ZodSymbolParams = TypeParams<schemas.$ZodSymbol>;\nexport declare function _symbol<T extends schemas.$ZodSymbol>(Class: util.SchemaClass<T>, params?: string | $ZodSymbolParams): T;\nexport type $ZodUndefinedParams = TypeParams<schemas.$ZodUndefined>;\nexport declare function _undefined<T extends schemas.$ZodUndefined>(Class: util.SchemaClass<T>, params?: string | $ZodUndefinedParams): T;\nexport type $ZodNullParams = TypeParams<schemas.$ZodNull>;\nexport declare function _null<T extends schemas.$ZodNull>(Class: util.SchemaClass<T>, params?: string | $ZodNullParams): T;\nexport type $ZodAnyParams = TypeParams<schemas.$ZodAny>;\nexport declare function _any<T extends schemas.$ZodAny>(Class: util.SchemaClass<T>): T;\nexport type $ZodUnknownParams = TypeParams<schemas.$ZodUnknown>;\nexport declare function _unknown<T extends schemas.$ZodUnknown>(Class: util.SchemaClass<T>): T;\nexport type $ZodNeverParams = TypeParams<schemas.$ZodNever>;\nexport declare function _never<T extends schemas.$ZodNever>(Class: util.SchemaClass<T>, params?: string | $ZodNeverParams): T;\nexport type $ZodVoidParams = TypeParams<schemas.$ZodVoid>;\nexport declare function _void<T extends schemas.$ZodVoid>(Class: util.SchemaClass<T>, params?: string | $ZodVoidParams): T;\nexport type $ZodDateParams = TypeParams<schemas.$ZodDate, \"coerce\">;\nexport declare function _date<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T;\nexport declare function _coercedDate<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T;\nexport type $ZodNaNParams = TypeParams<schemas.$ZodNaN>;\nexport declare function _nan<T extends schemas.$ZodNaN>(Class: util.SchemaClass<T>, params?: string | $ZodNaNParams): T;\nexport type $ZodCheckLessThanParams = CheckParams<checks.$ZodCheckLessThan, \"inclusive\" | \"value\" | \"when\">;\nexport declare function _lt(value: util.Numeric, params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan<util.Numeric>;\nexport declare function _lte(value: util.Numeric, params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan<util.Numeric>;\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\nexport type $ZodCheckGreaterThanParams = CheckParams<checks.$ZodCheckGreaterThan, \"inclusive\" | \"value\" | \"when\">;\nexport declare function _gt(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;\nexport declare function _gte(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\nexport declare function _positive(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;\nexport declare function _negative(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan;\nexport declare function _nonpositive(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan;\nexport declare function _nonnegative(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;\nexport type $ZodCheckMultipleOfParams = CheckParams<checks.$ZodCheckMultipleOf, \"value\" | \"when\">;\nexport declare function _multipleOf(value: number | bigint, params?: string | $ZodCheckMultipleOfParams): checks.$ZodCheckMultipleOf;\nexport type $ZodCheckMaxSizeParams = CheckParams<checks.$ZodCheckMaxSize, \"maximum\" | \"when\">;\nexport declare function _maxSize(maximum: number, params?: string | $ZodCheckMaxSizeParams): checks.$ZodCheckMaxSize<util.HasSize>;\nexport type $ZodCheckMinSizeParams = CheckParams<checks.$ZodCheckMinSize, \"minimum\" | \"when\">;\nexport declare function _minSize(minimum: number, params?: string | $ZodCheckMinSizeParams): checks.$ZodCheckMinSize<util.HasSize>;\nexport type $ZodCheckSizeEqualsParams = CheckParams<checks.$ZodCheckSizeEquals, \"size\" | \"when\">;\nexport declare function _size(size: number, params?: string | $ZodCheckSizeEqualsParams): checks.$ZodCheckSizeEquals<util.HasSize>;\nexport type $ZodCheckMaxLengthParams = CheckParams<checks.$ZodCheckMaxLength, \"maximum\" | \"when\">;\nexport declare function _maxLength(maximum: number, params?: string | $ZodCheckMaxLengthParams): checks.$ZodCheckMaxLength<util.HasLength>;\nexport type $ZodCheckMinLengthParams = CheckParams<checks.$ZodCheckMinLength, \"minimum\" | \"when\">;\nexport declare function _minLength(minimum: number, params?: string | $ZodCheckMinLengthParams): checks.$ZodCheckMinLength<util.HasLength>;\nexport type $ZodCheckLengthEqualsParams = CheckParams<checks.$ZodCheckLengthEquals, \"length\" | \"when\">;\nexport declare function _length(length: number, params?: string | $ZodCheckLengthEqualsParams): checks.$ZodCheckLengthEquals<util.HasLength>;\nexport type $ZodCheckRegexParams = CheckParams<checks.$ZodCheckRegex, \"format\" | \"pattern\" | \"when\">;\nexport declare function _regex(pattern: RegExp, params?: string | $ZodCheckRegexParams): checks.$ZodCheckRegex;\nexport type $ZodCheckLowerCaseParams = CheckParams<checks.$ZodCheckLowerCase, \"format\" | \"when\">;\nexport declare function _lowercase(params?: string | $ZodCheckLowerCaseParams): checks.$ZodCheckLowerCase;\nexport type $ZodCheckUpperCaseParams = CheckParams<checks.$ZodCheckUpperCase, \"format\" | \"when\">;\nexport declare function _uppercase(params?: string | $ZodCheckUpperCaseParams): checks.$ZodCheckUpperCase;\nexport type $ZodCheckIncludesParams = CheckParams<checks.$ZodCheckIncludes, \"includes\" | \"format\" | \"when\" | \"pattern\">;\nexport declare function _includes(includes: string, params?: string | $ZodCheckIncludesParams): checks.$ZodCheckIncludes;\nexport type $ZodCheckStartsWithParams = CheckParams<checks.$ZodCheckStartsWith, \"prefix\" | \"format\" | \"when\" | \"pattern\">;\nexport declare function _startsWith(prefix: string, params?: string | $ZodCheckStartsWithParams): checks.$ZodCheckStartsWith;\nexport type $ZodCheckEndsWithParams = CheckParams<checks.$ZodCheckEndsWith, \"suffix\" | \"format\" | \"pattern\" | \"when\">;\nexport declare function _endsWith(suffix: string, params?: string | $ZodCheckEndsWithParams): checks.$ZodCheckEndsWith;\nexport type $ZodCheckPropertyParams = CheckParams<checks.$ZodCheckProperty, \"property\" | \"schema\" | \"when\">;\nexport declare function _property<K extends string, T extends schemas.$ZodType>(property: K, schema: T, params?: string | $ZodCheckPropertyParams): checks.$ZodCheckProperty<{\n [k in K]: core.output<T>;\n}>;\nexport type $ZodCheckMimeTypeParams = CheckParams<checks.$ZodCheckMimeType, \"mime\" | \"when\">;\nexport declare function _mime(types: util.MimeTypes[], params?: string | $ZodCheckMimeTypeParams): checks.$ZodCheckMimeType;\nexport declare function _overwrite<T>(tx: (input: T) => T): checks.$ZodCheckOverwrite<T>;\nexport declare function _normalize(form?: \"NFC\" | \"NFD\" | \"NFKC\" | \"NFKD\" | (string & {})): checks.$ZodCheckOverwrite<string>;\nexport declare function _trim(): checks.$ZodCheckOverwrite<string>;\nexport declare function _toLowerCase(): checks.$ZodCheckOverwrite<string>;\nexport declare function _toUpperCase(): checks.$ZodCheckOverwrite<string>;\nexport type $ZodArrayParams = TypeParams<schemas.$ZodArray, \"element\">;\nexport declare function _array<T extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodArray>, element: T, params?: string | $ZodArrayParams): schemas.$ZodArray<T>;\nexport type $ZodObjectParams = TypeParams<schemas.$ZodObject, \"shape\" | \"catchall\">;\nexport type $ZodUnionParams = TypeParams<schemas.$ZodUnion, \"options\">;\nexport declare function _union<const T extends readonly schemas.$ZodObject[]>(Class: util.SchemaClass<schemas.$ZodUnion>, options: T, params?: string | $ZodUnionParams): schemas.$ZodUnion<T>;\nexport interface $ZodTypeDiscriminableInternals extends schemas.$ZodTypeInternals {\n propValues: util.PropValues;\n}\nexport interface $ZodTypeDiscriminable extends schemas.$ZodType {\n _zod: $ZodTypeDiscriminableInternals;\n}\nexport type $ZodDiscriminatedUnionParams = TypeParams<schemas.$ZodDiscriminatedUnion, \"options\" | \"discriminator\">;\nexport declare function _discriminatedUnion<Types extends [$ZodTypeDiscriminable, ...$ZodTypeDiscriminable[]], Disc extends string>(Class: util.SchemaClass<schemas.$ZodDiscriminatedUnion>, discriminator: Disc, options: Types, params?: string | $ZodDiscriminatedUnionParams): schemas.$ZodDiscriminatedUnion<Types, Disc>;\nexport type $ZodIntersectionParams = TypeParams<schemas.$ZodIntersection, \"left\" | \"right\">;\nexport declare function _intersection<T extends schemas.$ZodObject, U extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodIntersection>, left: T, right: U): schemas.$ZodIntersection<T, U>;\nexport type $ZodTupleParams = TypeParams<schemas.$ZodTuple, \"items\" | \"rest\">;\nexport declare function _tuple<T extends readonly [schemas.$ZodType, ...schemas.$ZodType[]]>(Class: util.SchemaClass<schemas.$ZodTuple>, items: T, params?: string | $ZodTupleParams): schemas.$ZodTuple<T, null>;\nexport declare function _tuple<T extends readonly [schemas.$ZodType, ...schemas.$ZodType[]], Rest extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodTuple>, items: T, rest: Rest, params?: string | $ZodTupleParams): schemas.$ZodTuple<T, Rest>;\nexport type $ZodRecordParams = TypeParams<schemas.$ZodRecord, \"keyType\" | \"valueType\">;\nexport declare function _record<Key extends schemas.$ZodRecordKey, Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodRecord>, keyType: Key, valueType: Value, params?: string | $ZodRecordParams): schemas.$ZodRecord<Key, Value>;\nexport type $ZodMapParams = TypeParams<schemas.$ZodMap, \"keyType\" | \"valueType\">;\nexport declare function _map<Key extends schemas.$ZodObject, Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodMap>, keyType: Key, valueType: Value, params?: string | $ZodMapParams): schemas.$ZodMap<Key, Value>;\nexport type $ZodSetParams = TypeParams<schemas.$ZodSet, \"valueType\">;\nexport declare function _set<Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodSet>, valueType: Value, params?: string | $ZodSetParams): schemas.$ZodSet<Value>;\nexport type $ZodEnumParams = TypeParams<schemas.$ZodEnum, \"entries\">;\nexport declare function _enum<const T extends string[]>(Class: util.SchemaClass<schemas.$ZodEnum>, values: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<util.ToEnum<T[number]>>;\nexport declare function _enum<T extends util.EnumLike>(Class: util.SchemaClass<schemas.$ZodEnum>, entries: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<T>;\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport declare function _nativeEnum<T extends util.EnumLike>(Class: util.SchemaClass<schemas.$ZodEnum>, entries: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<T>;\nexport type $ZodLiteralParams = TypeParams<schemas.$ZodLiteral, \"values\">;\nexport declare function _literal<const T extends Array<util.Literal>>(Class: util.SchemaClass<schemas.$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): schemas.$ZodLiteral<T[number]>;\nexport declare function _literal<const T extends util.Literal>(Class: util.SchemaClass<schemas.$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): schemas.$ZodLiteral<T>;\nexport type $ZodFileParams = TypeParams<schemas.$ZodFile>;\nexport declare function _file(Class: util.SchemaClass<schemas.$ZodFile>, params?: string | $ZodFileParams): schemas.$ZodFile;\nexport type $ZodTransformParams = TypeParams<schemas.$ZodTransform, \"transform\">;\nexport declare function _transform<I = unknown, O = I>(Class: util.SchemaClass<schemas.$ZodTransform>, fn: (input: I, ctx?: schemas.ParsePayload) => O): schemas.$ZodTransform<Awaited<O>, I>;\nexport type $ZodOptionalParams = TypeParams<schemas.$ZodOptional, \"innerType\">;\nexport declare function _optional<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodOptional>, innerType: T): schemas.$ZodOptional<T>;\nexport type $ZodNullableParams = TypeParams<schemas.$ZodNullable, \"innerType\">;\nexport declare function _nullable<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodNullable>, innerType: T): schemas.$ZodNullable<T>;\nexport type $ZodDefaultParams = TypeParams<schemas.$ZodDefault, \"innerType\" | \"defaultValue\">;\nexport declare function _default<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodDefault>, innerType: T, defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)): schemas.$ZodDefault<T>;\nexport type $ZodNonOptionalParams = TypeParams<schemas.$ZodNonOptional, \"innerType\">;\nexport declare function _nonoptional<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodNonOptional>, innerType: T, params?: string | $ZodNonOptionalParams): schemas.$ZodNonOptional<T>;\nexport type $ZodSuccessParams = TypeParams<schemas.$ZodSuccess, \"innerType\">;\nexport declare function _success<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodSuccess>, innerType: T): schemas.$ZodSuccess<T>;\nexport type $ZodCatchParams = TypeParams<schemas.$ZodCatch, \"innerType\" | \"catchValue\">;\nexport declare function _catch<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodCatch>, innerType: T, catchValue: core.output<T> | ((ctx: schemas.$ZodCatchCtx) => core.output<T>)): schemas.$ZodCatch<T>;\nexport type $ZodPipeParams = TypeParams<schemas.$ZodPipe, \"in\" | \"out\">;\nexport declare function _pipe<const A extends schemas.$ZodType, B extends schemas.$ZodType<unknown, core.output<A>> = schemas.$ZodType<unknown, core.output<A>>>(Class: util.SchemaClass<schemas.$ZodPipe>, in_: A, out: B | schemas.$ZodType<unknown, core.output<A>>): schemas.$ZodPipe<A, B>;\nexport type $ZodReadonlyParams = TypeParams<schemas.$ZodReadonly, \"innerType\">;\nexport declare function _readonly<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodReadonly>, innerType: T): schemas.$ZodReadonly<T>;\nexport type $ZodTemplateLiteralParams = TypeParams<schemas.$ZodTemplateLiteral, \"parts\">;\nexport declare function _templateLiteral<const Parts extends schemas.$ZodTemplateLiteralPart[]>(Class: util.SchemaClass<schemas.$ZodTemplateLiteral>, parts: Parts, params?: string | $ZodTemplateLiteralParams): schemas.$ZodTemplateLiteral<schemas.$PartsToTemplateLiteral<Parts>>;\nexport type $ZodLazyParams = TypeParams<schemas.$ZodLazy, \"getter\">;\nexport declare function _lazy<T extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodLazy>, getter: () => T): schemas.$ZodLazy<T>;\nexport type $ZodPromiseParams = TypeParams<schemas.$ZodPromise, \"innerType\">;\nexport declare function _promise<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodPromise>, innerType: T): schemas.$ZodPromise<T>;\nexport type $ZodCustomParams = CheckTypeParams<schemas.$ZodCustom, \"fn\">;\nexport declare function _custom<O = unknown, I = O>(Class: util.SchemaClass<schemas.$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): schemas.$ZodCustom<O, I>;\nexport declare function _refine<O = unknown, I = O>(Class: util.SchemaClass<schemas.$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): schemas.$ZodCustom<O, I>;\nexport type $ZodSuperRefineIssue<T extends errors.$ZodIssueBase = errors.$ZodIssue> = T extends any ? RawIssue<T> : never;\ntype RawIssue<T extends errors.$ZodIssueBase> = T extends any ? util.Flatten<util.MakePartial<T, \"message\" | \"path\"> & {\n /** The schema or check that originated this issue. */\n readonly inst?: schemas.$ZodType | checks.$ZodCheck;\n /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */\n readonly continue?: boolean | undefined;\n} & Record<string, unknown>> : never;\nexport interface $RefinementCtx<T = unknown> extends schemas.ParsePayload<T> {\n addIssue(arg: string | $ZodSuperRefineIssue): void;\n}\nexport declare function _superRefine<T>(fn: (arg: T, payload: $RefinementCtx<T>) => void | Promise<void>): checks.$ZodCheck<T>;\nexport declare function _check<O = unknown>(fn: schemas.CheckFn<O>, params?: string | $ZodCustomParams): checks.$ZodCheck<O>;\nexport interface $ZodStringBoolParams extends TypeParams {\n truthy?: string[];\n falsy?: string[];\n /**\n * Options: `\"sensitive\"`, `\"insensitive\"`\n *\n * @default `\"insensitive\"`\n */\n case?: \"sensitive\" | \"insensitive\" | undefined;\n}\nexport declare function _stringbool(Classes: {\n Codec?: typeof schemas.$ZodCodec;\n Boolean?: typeof schemas.$ZodBoolean;\n String?: typeof schemas.$ZodString;\n}, _params?: string | $ZodStringBoolParams): schemas.$ZodCodec<schemas.$ZodString, schemas.$ZodBoolean>;\nexport declare function _stringFormat<Format extends string>(Class: typeof schemas.$ZodCustomStringFormat, format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | $ZodStringFormatParams): schemas.$ZodCustomStringFormat<Format>;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;KAKYK,iBAAiBF,WAAmBH,8BAAqCE,sCAA6CI,4BAA4BF,QAAaW,QAAQX,aAAkBQ,KAAKN,kBAAkBE,cAAcD;EAA9NF,KAAAA,CAAAA,EAAAA,MAAM,GACGH,YADHM,CACuBD,UADvB,CAAA,GAAA,SAAA;EAAWJ;EAAmBH,OAAAA,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA;CAAqCE,CAAAA,CAAAA,CAAA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: ZodObject<{
|
|
|
63
63
|
mediaType: ZodString;
|
|
64
64
|
fileName: ZodOptional<ZodString>;
|
|
65
65
|
size: ZodOptional<ZodNumber>;
|
|
66
|
+
}, $strip>, ZodObject<{
|
|
67
|
+
type: ZodLiteral<"metadata">;
|
|
68
|
+
source: ZodEnum<{
|
|
69
|
+
email: "email";
|
|
70
|
+
widget: "widget";
|
|
71
|
+
api: "api";
|
|
72
|
+
}>;
|
|
66
73
|
}, $strip>]>>;
|
|
67
74
|
userId: ZodNullable<ZodString>;
|
|
68
75
|
aiAgentId: ZodNullable<ZodString>;
|
|
@@ -129,6 +136,13 @@ declare const createConversationResponseSchema: ZodObject<{
|
|
|
129
136
|
mediaType: ZodString;
|
|
130
137
|
fileName: ZodOptional<ZodString>;
|
|
131
138
|
size: ZodOptional<ZodNumber>;
|
|
139
|
+
}, $strip>, ZodObject<{
|
|
140
|
+
type: ZodLiteral<"metadata">;
|
|
141
|
+
source: ZodEnum<{
|
|
142
|
+
email: "email";
|
|
143
|
+
widget: "widget";
|
|
144
|
+
api: "api";
|
|
145
|
+
}>;
|
|
132
146
|
}, $strip>]>>;
|
|
133
147
|
userId: ZodNullable<ZodString>;
|
|
134
148
|
aiAgentId: ZodNullable<ZodString>;
|
|
@@ -204,6 +218,13 @@ declare const createConversationResponseSchema: ZodObject<{
|
|
|
204
218
|
mediaType: ZodString;
|
|
205
219
|
fileName: ZodOptional<ZodString>;
|
|
206
220
|
size: ZodOptional<ZodNumber>;
|
|
221
|
+
}, $strip>, ZodObject<{
|
|
222
|
+
type: ZodLiteral<"metadata">;
|
|
223
|
+
source: ZodEnum<{
|
|
224
|
+
email: "email";
|
|
225
|
+
widget: "widget";
|
|
226
|
+
api: "api";
|
|
227
|
+
}>;
|
|
207
228
|
}, $strip>]>>;
|
|
208
229
|
userId: ZodNullable<ZodString>;
|
|
209
230
|
aiAgentId: ZodNullable<ZodString>;
|
|
@@ -301,6 +322,13 @@ declare const listConversationsResponseSchema: ZodObject<{
|
|
|
301
322
|
mediaType: ZodString;
|
|
302
323
|
fileName: ZodOptional<ZodString>;
|
|
303
324
|
size: ZodOptional<ZodNumber>;
|
|
325
|
+
}, $strip>, ZodObject<{
|
|
326
|
+
type: ZodLiteral<"metadata">;
|
|
327
|
+
source: ZodEnum<{
|
|
328
|
+
email: "email";
|
|
329
|
+
widget: "widget";
|
|
330
|
+
api: "api";
|
|
331
|
+
}>;
|
|
304
332
|
}, $strip>]>>;
|
|
305
333
|
userId: ZodNullable<ZodString>;
|
|
306
334
|
aiAgentId: ZodNullable<ZodString>;
|
|
@@ -391,6 +419,13 @@ declare const getConversationResponseSchema: ZodObject<{
|
|
|
391
419
|
mediaType: ZodString;
|
|
392
420
|
fileName: ZodOptional<ZodString>;
|
|
393
421
|
size: ZodOptional<ZodNumber>;
|
|
422
|
+
}, $strip>, ZodObject<{
|
|
423
|
+
type: ZodLiteral<"metadata">;
|
|
424
|
+
source: ZodEnum<{
|
|
425
|
+
email: "email";
|
|
426
|
+
widget: "widget";
|
|
427
|
+
api: "api";
|
|
428
|
+
}>;
|
|
394
429
|
}, $strip>]>>;
|
|
395
430
|
userId: ZodNullable<ZodString>;
|
|
396
431
|
aiAgentId: ZodNullable<ZodString>;
|
package/conversation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../types/src/api/conversation.ts"],"sourcesContent":[],"mappings":";;;;;;;cAIa,iCAA+B;;;;;;IAA/B,cAAA,WAAA
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../types/src/api/conversation.ts"],"sourcesContent":[],"mappings":";;;;;;;cAIa,iCAA+B;;;;;;IAA/B,cAAA,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsBD,6BAAA,GAAgC,cACpC;cAGK,kCAAgC;;;;;;;;;;MA1BD,OAAA,EAAA,SAAA;MAAA,KAA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IAAA,SAAA,aAAA,UAAA,CAAA;IAQ9B,SAAA,aAAuB,UAC3B,CAAA;IAGK,UAAA,WAAA;;;;EAAiC,CAAA,QAAA,CAAA,CAAA;CAAA,QAAA,CAAA;AAYlC,KA4GA,+BAAA,GAAkC,MA3GtC,CAAA,OA4GA,qCA7G6C,CAAA"}
|
package/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","names":["errors","schemas","Class","ZodTrait","$constructor","T","D","NEVER","$brand","$ZodBranded","Brand","SomeType","output","Record","$ZodAsyncError","Error","$ZodEncodeError","input","infer","$ZodConfig","$ZodErrorMap","globalConfig","config","Partial"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/core.d.cts"],"sourcesContent":["import type * as errors from \"./errors.cjs\";\nimport type * as schemas from \"./schemas.cjs\";\nimport type { Class } from \"./util.cjs\";\ntype ZodTrait = {\n _zod: {\n def: any;\n [k: string]: any;\n };\n};\nexport interface $constructor<T extends ZodTrait, D = T[\"_zod\"][\"def\"]> {\n new (def: D): T;\n init(inst: T, def: D): asserts inst is T;\n}\n/** A special constant with type `never` */\nexport declare const NEVER: never;\nexport declare function $constructor<T extends ZodTrait, D = T[\"_zod\"][\"def\"]>(name: string, initializer: (inst: T, def: D) => void, params?: {\n Parent?: typeof Class;\n}): $constructor<T, D>;\nexport declare const $brand: unique symbol;\nexport type $brand<T extends string | number | symbol = string | number | symbol> = {\n [$brand]: {\n [k in T]: true;\n };\n};\nexport type $ZodBranded<T extends schemas.SomeType, Brand extends string | number | symbol> = T & Record<\"_zod\", Record<\"output\", output<T> & $brand<Brand>>>;\nexport declare class $ZodAsyncError extends Error {\n constructor();\n}\nexport declare class $ZodEncodeError extends Error {\n constructor(name: string);\n}\nexport type input<T> = T extends {\n _zod: {\n input: any;\n };\n} ? T[\"_zod\"][\"input\"] : unknown;\nexport type output<T> = T extends {\n _zod: {\n output: any;\n };\n} ? T[\"_zod\"][\"output\"] : unknown;\nexport type { output as infer };\nexport interface $ZodConfig {\n /** Custom error map. Overrides `config().localeError`. */\n customError?: errors.$ZodErrorMap | undefined;\n /** Localized error map. Lowest priority. */\n localeError?: errors.$ZodErrorMap | undefined;\n /** Disable JIT schema compilation. Useful in environments that disallow `eval`. */\n jitless?: boolean | undefined;\n}\nexport declare const globalConfig: $ZodConfig;\nexport declare function config(newConfig?: Partial<$ZodConfig>): $ZodConfig;\n"],"x_google_ignoreList":[0],"mappings":";;;;KAGKG,QAAAA;EAAAA,IAAAA,EAAAA;IAMYC,GAAAA,EAAAA,GAAAA;IAAuBD,CAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EAAAA,GAAAA;EAAcE,CAAAA;CACxCC;AAAID,UADDD,YACCC,CAAAA,UADsBF,QACtBE,EAAAA,IADoCA,CACpCA,CAAAA,MAAAA,CAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA;EACHA,KAAAA,GAAAA,EADDC,CACCD,CAAAA,EADGA,CACHA;EAAQC,IAAAA,CAAAA,IAAAA,EAARD,CAAQC,EAAAA,GAAAA,EAAAA,CAAAA,CAAAA,EAAAA,QAAAA,IAAAA,IAAoBD,CAApBC;;AAIwBH,iBAAvBC,YAAuBD,CAAAA,UAAAA,QAAAA,EAAAA,IAAcE,CAAdF,CAAAA,MAAAA,CAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,IAAAA,EAAAA,MAAAA,EAAAA,WAAAA,EAAAA,CAAAA,IAAAA,EAAkEE,CAAlEF,EAAAA,GAAAA,EAA0EG,CAA1EH,EAAAA,GAAAA,IAAAA,EAAAA,MAAkEE,CAAlEF,EAAAA;EAAcE,MAAAA,CAAAA,EAAAA,OACzCH,KADyCG;CAAoDA,CAAAA,EAE7GD,YAF6GC,CAEhGA,CAFgGA,EAE7FC,CAF6FD,CAAAA;AAAQC,cAGpGE,MAHoGF,EAAAA,OAAAA,MAAAA;AACrGJ,KAGRM,MAHQN,CAAAA,UAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,CAAAA,GAAAA;EACHG,CAGZG,MAAAA,CAHYH,EAAAA,QAIHA,CAJMC,GAAAA,IAAAA,EAAhBF;CAAY;AACKI,KAMTC,WAN8B,CAAA,UAMRR,QANQ,EAAA,cAAA,MAAA,GAAA,MAAA,GAAA,MAAA,CAAA,GAMoDI,CANpD,GAMwDQ,MANxD,CAAA,MAAA,EAMuEA,MANvE,CAAA,QAAA,EAMwFD,MANxF,CAM+FP,CAN/F,CAAA,GAMoGG,MANpG,CAM2GE,KAN3G,CAAA,CAAA,CAAA;AAM2GA,KAOzIO,KAPyIP,CAAAA,CAAAA,CAAAA,GAO9HL,CAP8HK,SAAAA;EAAPF,IAAAA,EAAAA;IAA7BK,KAAAA,EAAAA,GAAAA;EAAfA,CAAAA;CAAM,GAWpGR,CAXoG,CAAA,MAAA,CAAA,CAAA,OAAA,CAAA,GAAA,OAAA;AAO5FY,KAKAL,MALK,
|
|
1
|
+
{"version":3,"file":"core.d.ts","names":["errors","schemas","Class","ZodTrait","$constructor","T","D","NEVER","$brand","$ZodBranded","Brand","SomeType","output","Record","$ZodAsyncError","Error","$ZodEncodeError","input","infer","$ZodConfig","$ZodErrorMap","globalConfig","config","Partial"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/core.d.cts"],"sourcesContent":["import type * as errors from \"./errors.cjs\";\nimport type * as schemas from \"./schemas.cjs\";\nimport type { Class } from \"./util.cjs\";\ntype ZodTrait = {\n _zod: {\n def: any;\n [k: string]: any;\n };\n};\nexport interface $constructor<T extends ZodTrait, D = T[\"_zod\"][\"def\"]> {\n new (def: D): T;\n init(inst: T, def: D): asserts inst is T;\n}\n/** A special constant with type `never` */\nexport declare const NEVER: never;\nexport declare function $constructor<T extends ZodTrait, D = T[\"_zod\"][\"def\"]>(name: string, initializer: (inst: T, def: D) => void, params?: {\n Parent?: typeof Class;\n}): $constructor<T, D>;\nexport declare const $brand: unique symbol;\nexport type $brand<T extends string | number | symbol = string | number | symbol> = {\n [$brand]: {\n [k in T]: true;\n };\n};\nexport type $ZodBranded<T extends schemas.SomeType, Brand extends string | number | symbol> = T & Record<\"_zod\", Record<\"output\", output<T> & $brand<Brand>>>;\nexport declare class $ZodAsyncError extends Error {\n constructor();\n}\nexport declare class $ZodEncodeError extends Error {\n constructor(name: string);\n}\nexport type input<T> = T extends {\n _zod: {\n input: any;\n };\n} ? T[\"_zod\"][\"input\"] : unknown;\nexport type output<T> = T extends {\n _zod: {\n output: any;\n };\n} ? T[\"_zod\"][\"output\"] : unknown;\nexport type { output as infer };\nexport interface $ZodConfig {\n /** Custom error map. Overrides `config().localeError`. */\n customError?: errors.$ZodErrorMap | undefined;\n /** Localized error map. Lowest priority. */\n localeError?: errors.$ZodErrorMap | undefined;\n /** Disable JIT schema compilation. Useful in environments that disallow `eval`. */\n jitless?: boolean | undefined;\n}\nexport declare const globalConfig: $ZodConfig;\nexport declare function config(newConfig?: Partial<$ZodConfig>): $ZodConfig;\n"],"x_google_ignoreList":[0],"mappings":";;;;KAGKG,QAAAA;EAAAA,IAAAA,EAAAA;IAMYC,GAAAA,EAAAA,GAAAA;IAAuBD,CAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EAAAA,GAAAA;EAAcE,CAAAA;CACxCC;AAAID,UADDD,YACCC,CAAAA,UADsBF,QACtBE,EAAAA,IADoCA,CACpCA,CAAAA,MAAAA,CAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA;EACHA,KAAAA,GAAAA,EADDC,CACCD,CAAAA,EADGA,CACHA;EAAQC,IAAAA,CAAAA,IAAAA,EAARD,CAAQC,EAAAA,GAAAA,EAAAA,CAAAA,CAAAA,EAAAA,QAAAA,IAAAA,IAAoBD,CAApBC;;AAIwBH,iBAAvBC,YAAuBD,CAAAA,UAAAA,QAAAA,EAAAA,IAAcE,CAAdF,CAAAA,MAAAA,CAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,IAAAA,EAAAA,MAAAA,EAAAA,WAAAA,EAAAA,CAAAA,IAAAA,EAAkEE,CAAlEF,EAAAA,GAAAA,EAA0EG,CAA1EH,EAAAA,GAAAA,IAAAA,EAAAA,MAAkEE,CAAlEF,EAAAA;EAAcE,MAAAA,CAAAA,EAAAA,OACzCH,KADyCG;CAAoDA,CAAAA,EAE7GD,YAF6GC,CAEhGA,CAFgGA,EAE7FC,CAF6FD,CAAAA;AAAQC,cAGpGE,MAHoGF,EAAAA,OAAAA,MAAAA;AACrGJ,KAGRM,MAHQN,CAAAA,UAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,CAAAA,GAAAA;EACHG,CAGZG,MAAAA,CAHYH,EAAAA,QAIHA,CAJMC,GAAAA,IAAAA,EAAhBF;CAAY;AACKI,KAMTC,WAN8B,CAAA,UAMRR,QANQ,EAAA,cAAA,MAAA,GAAA,MAAA,GAAA,MAAA,CAAA,GAMoDI,CANpD,GAMwDQ,MANxD,CAAA,MAAA,EAMuEA,MANvE,CAAA,QAAA,EAMwFD,MANxF,CAM+FP,CAN/F,CAAA,GAMoGG,MANpG,CAM2GE,KAN3G,CAAA,CAAA,CAAA;AAM2GA,KAOzIO,KAPyIP,CAAAA,CAAAA,CAAAA,GAO9HL,CAP8HK,SAAAA;EAAPF,IAAAA,EAAAA;IAA7BK,KAAAA,EAAAA,GAAAA;EAAfA,CAAAA;CAAM,GAWpGR,CAXoG,CAAA,MAAA,CAAA,CAAA,OAAA,CAAA,GAAA,OAAA;AAO5FY,KAKAL,MALK,CAAAP,CAAAA,CAAAA,GAKOA,CALP,SAIZ;EACOO,IAAAA,EAAAA;;;IAIRP"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { ConversationEventType, ConversationTimelineType, TimelineItemVisibility } from "../enums.js";
|
|
2
|
+
import { _enum, array, boolean, literal, number, object, string, union } from "../../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/classic/schemas.js";
|
|
3
|
+
import { number as number$1 } from "../../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/classic/coerce.js";
|
|
4
|
+
import "../../../../node_modules/.bun/@hono_zod-openapi@1.1.4_5f6303fa86c4ce5a/node_modules/@hono/zod-openapi/dist/index.js";
|
|
5
|
+
|
|
6
|
+
//#region ../types/src/api/timeline-item.ts
|
|
7
|
+
const timelinePartImageSchema = object({
|
|
8
|
+
type: literal("image").openapi({ description: "Type of timeline part - always 'image' for image parts" }),
|
|
9
|
+
url: string().openapi({ description: "URL of the image" }),
|
|
10
|
+
mediaType: string().openapi({ description: "MIME type of the image" }),
|
|
11
|
+
fileName: string().optional().openapi({ description: "Original filename of the image" }),
|
|
12
|
+
size: number().optional().openapi({ description: "Size of the image in bytes" }),
|
|
13
|
+
width: number().optional().openapi({ description: "Width of the image in pixels" }),
|
|
14
|
+
height: number().optional().openapi({ description: "Height of the image in pixels" })
|
|
15
|
+
});
|
|
16
|
+
const timelinePartTextSchema = object({
|
|
17
|
+
type: literal("text").openapi({ description: "Type of timeline part - always 'text' for text parts" }),
|
|
18
|
+
text: string().openapi({ description: "The text content of this timeline part" })
|
|
19
|
+
});
|
|
20
|
+
const timelineFileSchema = object({
|
|
21
|
+
type: literal("file").openapi({ description: "Type of timeline part - always 'file' for file parts" }),
|
|
22
|
+
url: string().openapi({ description: "URL of the file" }),
|
|
23
|
+
mediaType: string().openapi({ description: "MIME type of the file" }),
|
|
24
|
+
fileName: string().optional().openapi({ description: "Original filename of the file" }),
|
|
25
|
+
size: number().optional().openapi({ description: "Size of the file in bytes" })
|
|
26
|
+
});
|
|
27
|
+
const timelinePartEventSchema = object({
|
|
28
|
+
type: literal("event").openapi({ description: "Type of timeline part - always 'event' for event parts" }),
|
|
29
|
+
eventType: _enum([
|
|
30
|
+
ConversationEventType.ASSIGNED,
|
|
31
|
+
ConversationEventType.UNASSIGNED,
|
|
32
|
+
ConversationEventType.PARTICIPANT_REQUESTED,
|
|
33
|
+
ConversationEventType.PARTICIPANT_JOINED,
|
|
34
|
+
ConversationEventType.PARTICIPANT_LEFT,
|
|
35
|
+
ConversationEventType.STATUS_CHANGED,
|
|
36
|
+
ConversationEventType.PRIORITY_CHANGED,
|
|
37
|
+
ConversationEventType.TAG_ADDED,
|
|
38
|
+
ConversationEventType.TAG_REMOVED,
|
|
39
|
+
ConversationEventType.RESOLVED,
|
|
40
|
+
ConversationEventType.REOPENED,
|
|
41
|
+
ConversationEventType.VISITOR_BLOCKED,
|
|
42
|
+
ConversationEventType.VISITOR_UNBLOCKED,
|
|
43
|
+
ConversationEventType.VISITOR_IDENTIFIED
|
|
44
|
+
]).openapi({ description: "Type of event that occurred" }),
|
|
45
|
+
actorUserId: string().nullable().openapi({ description: "User that triggered the event, if applicable" }),
|
|
46
|
+
actorAiAgentId: string().nullable().openapi({ description: "AI agent that triggered the event, if applicable" }),
|
|
47
|
+
targetUserId: string().nullable().openapi({ description: "User targeted by the event, if applicable" }),
|
|
48
|
+
targetAiAgentId: string().nullable().openapi({ description: "AI agent targeted by the event, if applicable" }),
|
|
49
|
+
message: string().nullable().optional().openapi({ description: "Optional human readable message attached to the event" })
|
|
50
|
+
});
|
|
51
|
+
const timelinePartMetadataSchema = object({
|
|
52
|
+
type: literal("metadata").openapi({ description: "Type of timeline part - always 'metadata' for metadata parts" }),
|
|
53
|
+
source: _enum([
|
|
54
|
+
"email",
|
|
55
|
+
"widget",
|
|
56
|
+
"api"
|
|
57
|
+
]).openapi({ description: "Source channel through which the message was created" })
|
|
58
|
+
});
|
|
59
|
+
const timelineItemPartsSchema = array(union([
|
|
60
|
+
timelinePartTextSchema,
|
|
61
|
+
timelinePartEventSchema,
|
|
62
|
+
timelinePartImageSchema,
|
|
63
|
+
timelineFileSchema,
|
|
64
|
+
timelinePartMetadataSchema
|
|
65
|
+
])).openapi({ description: "Array of timeline parts that make up the timeline item content" });
|
|
66
|
+
const timelineItemSchema = object({
|
|
67
|
+
id: string().optional().openapi({ description: "Unique identifier for the timeline item" }),
|
|
68
|
+
conversationId: string().openapi({ description: "ID of the conversation this timeline item belongs to" }),
|
|
69
|
+
organizationId: string().openapi({ description: "ID of the organization this timeline item belongs to" }),
|
|
70
|
+
visibility: _enum([TimelineItemVisibility.PUBLIC, TimelineItemVisibility.PRIVATE]).openapi({ description: "Visibility level of the timeline item" }),
|
|
71
|
+
type: _enum([
|
|
72
|
+
ConversationTimelineType.MESSAGE,
|
|
73
|
+
ConversationTimelineType.EVENT,
|
|
74
|
+
ConversationTimelineType.IDENTIFICATION
|
|
75
|
+
]).openapi({ description: "Type of timeline item - message, event, or interactive identification tool" }),
|
|
76
|
+
text: string().nullable().openapi({ description: "Main text content of the timeline item" }),
|
|
77
|
+
tool: string().nullable().optional().openapi({ description: "Optional tool identifier associated with this timeline item" }),
|
|
78
|
+
parts: timelineItemPartsSchema,
|
|
79
|
+
userId: string().nullable().openapi({ description: "ID of the user who created this timeline item, if applicable" }),
|
|
80
|
+
aiAgentId: string().nullable().openapi({ description: "ID of the AI agent that created this timeline item, if applicable" }),
|
|
81
|
+
visitorId: string().nullable().openapi({ description: "ID of the visitor who created this timeline item, if applicable" }),
|
|
82
|
+
createdAt: string().openapi({ description: "ISO 8601 timestamp when the timeline item was created" }),
|
|
83
|
+
deletedAt: string().nullable().optional().openapi({ description: "ISO 8601 timestamp when the timeline item was deleted, if applicable" })
|
|
84
|
+
});
|
|
85
|
+
const getConversationTimelineItemsRequestSchema = object({
|
|
86
|
+
limit: number$1().min(1).max(100).default(50).openapi({
|
|
87
|
+
description: "Number of timeline items to fetch per page",
|
|
88
|
+
default: 50
|
|
89
|
+
}),
|
|
90
|
+
cursor: string().nullable().optional().openapi({ description: "Cursor for pagination (timestamp_id format from previous response)" })
|
|
91
|
+
}).openapi({ description: "Query parameters for fetching conversation timeline items" });
|
|
92
|
+
const getConversationTimelineItemsResponseSchema = object({
|
|
93
|
+
items: array(timelineItemSchema).openapi({ description: "Array of timeline items in chronological order" }),
|
|
94
|
+
nextCursor: string().nullable().openapi({ description: "Cursor for the next page, null if no more items are available" }),
|
|
95
|
+
hasNextPage: boolean().openapi({ description: "Whether there are more items available to fetch" })
|
|
96
|
+
}).openapi({ description: "Response containing paginated timeline items" });
|
|
97
|
+
const sendTimelineItemRequestSchema = object({
|
|
98
|
+
conversationId: string().openapi({ description: "ID of the conversation to send the timeline item to" }),
|
|
99
|
+
item: object({
|
|
100
|
+
id: string().optional().openapi({ description: "Optional client-generated ID for the timeline item" }),
|
|
101
|
+
type: _enum([ConversationTimelineType.MESSAGE, ConversationTimelineType.EVENT]).default(ConversationTimelineType.MESSAGE).openapi({
|
|
102
|
+
description: "Type of timeline item - defaults to MESSAGE",
|
|
103
|
+
default: ConversationTimelineType.MESSAGE
|
|
104
|
+
}),
|
|
105
|
+
text: string().openapi({ description: "Main text content of the timeline item" }),
|
|
106
|
+
parts: timelineItemPartsSchema.optional(),
|
|
107
|
+
visibility: _enum([TimelineItemVisibility.PUBLIC, TimelineItemVisibility.PRIVATE]).default(TimelineItemVisibility.PUBLIC).openapi({
|
|
108
|
+
description: "Visibility level of the timeline item",
|
|
109
|
+
default: TimelineItemVisibility.PUBLIC
|
|
110
|
+
}),
|
|
111
|
+
tool: string().nullable().optional().openapi({ description: "Optional tool identifier when sending non-message timeline items" }),
|
|
112
|
+
userId: string().nullable().optional().openapi({ description: "ID of the user creating this timeline item" }),
|
|
113
|
+
aiAgentId: string().nullable().optional().openapi({ description: "ID of the AI agent creating this timeline item" }),
|
|
114
|
+
visitorId: string().nullable().optional().openapi({ description: "ID of the visitor creating this timeline item" }),
|
|
115
|
+
createdAt: string().optional().openapi({ description: "Optional timestamp for the timeline item" })
|
|
116
|
+
})
|
|
117
|
+
}).openapi({ description: "Request body for sending a timeline item to a conversation" });
|
|
118
|
+
const sendTimelineItemResponseSchema = object({ item: timelineItemSchema.openapi({ description: "The created timeline item" }) }).openapi({ description: "Response containing the created timeline item" });
|
|
119
|
+
|
|
120
|
+
//#endregion
|
|
121
|
+
export { timelineItemPartsSchema };
|
|
122
|
+
//# sourceMappingURL=timeline-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-item.js","names":["z.object","z.literal","z.string","z.number","z\n\t\t.enum","z.enum","z\n\t.array","z.union","z\n\t.object","z.coerce.number","z.array","z.boolean","z\n\t\t\t\t.enum"],"sources":["../../../../../../types/src/api/timeline-item.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\nimport {\n\tConversationEventType,\n\tConversationTimelineType,\n\tTimelineItemVisibility,\n} from \"../enums\";\n\nconst timelinePartImageSchema = z.object({\n\ttype: z.literal(\"image\").openapi({\n\t\tdescription: \"Type of timeline part - always 'image' for image parts\",\n\t}),\n\turl: z.string().openapi({\n\t\tdescription: \"URL of the image\",\n\t}),\n\tmediaType: z.string().openapi({\n\t\tdescription: \"MIME type of the image\",\n\t}),\n\tfileName: z.string().optional().openapi({\n\t\tdescription: \"Original filename of the image\",\n\t}),\n\tsize: z.number().optional().openapi({\n\t\tdescription: \"Size of the image in bytes\",\n\t}),\n\twidth: z.number().optional().openapi({\n\t\tdescription: \"Width of the image in pixels\",\n\t}),\n\theight: z.number().optional().openapi({\n\t\tdescription: \"Height of the image in pixels\",\n\t}),\n});\n\nconst timelinePartTextSchema = z.object({\n\ttype: z.literal(\"text\").openapi({\n\t\tdescription: \"Type of timeline part - always 'text' for text parts\",\n\t}),\n\ttext: z.string().openapi({\n\t\tdescription: \"The text content of this timeline part\",\n\t}),\n});\n\nconst timelineFileSchema = z.object({\n\ttype: z.literal(\"file\").openapi({\n\t\tdescription: \"Type of timeline part - always 'file' for file parts\",\n\t}),\n\turl: z.string().openapi({\n\t\tdescription: \"URL of the file\",\n\t}),\n\tmediaType: z.string().openapi({\n\t\tdescription: \"MIME type of the file\",\n\t}),\n\tfileName: z.string().optional().openapi({\n\t\tdescription: \"Original filename of the file\",\n\t}),\n\tsize: z.number().optional().openapi({\n\t\tdescription: \"Size of the file in bytes\",\n\t}),\n});\n\nconst timelinePartEventSchema = z.object({\n\ttype: z.literal(\"event\").openapi({\n\t\tdescription: \"Type of timeline part - always 'event' for event parts\",\n\t}),\n\teventType: z\n\t\t.enum([\n\t\t\tConversationEventType.ASSIGNED,\n\t\t\tConversationEventType.UNASSIGNED,\n\t\t\tConversationEventType.PARTICIPANT_REQUESTED,\n\t\t\tConversationEventType.PARTICIPANT_JOINED,\n\t\t\tConversationEventType.PARTICIPANT_LEFT,\n\t\t\tConversationEventType.STATUS_CHANGED,\n\t\t\tConversationEventType.PRIORITY_CHANGED,\n\t\t\tConversationEventType.TAG_ADDED,\n\t\t\tConversationEventType.TAG_REMOVED,\n\t\t\tConversationEventType.RESOLVED,\n\t\t\tConversationEventType.REOPENED,\n\t\t\tConversationEventType.VISITOR_BLOCKED,\n\t\t\tConversationEventType.VISITOR_UNBLOCKED,\n\t\t\tConversationEventType.VISITOR_IDENTIFIED,\n\t\t])\n\t\t.openapi({\n\t\t\tdescription: \"Type of event that occurred\",\n\t\t}),\n\tactorUserId: z.string().nullable().openapi({\n\t\tdescription: \"User that triggered the event, if applicable\",\n\t}),\n\tactorAiAgentId: z.string().nullable().openapi({\n\t\tdescription: \"AI agent that triggered the event, if applicable\",\n\t}),\n\ttargetUserId: z.string().nullable().openapi({\n\t\tdescription: \"User targeted by the event, if applicable\",\n\t}),\n\ttargetAiAgentId: z.string().nullable().openapi({\n\t\tdescription: \"AI agent targeted by the event, if applicable\",\n\t}),\n\tmessage: z.string().nullable().optional().openapi({\n\t\tdescription: \"Optional human readable message attached to the event\",\n\t}),\n});\n\nconst timelinePartMetadataSchema = z.object({\n\ttype: z.literal(\"metadata\").openapi({\n\t\tdescription: \"Type of timeline part - always 'metadata' for metadata parts\",\n\t}),\n\tsource: z.enum([\"email\", \"widget\", \"api\"]).openapi({\n\t\tdescription: \"Source channel through which the message was created\",\n\t}),\n});\n\nexport const timelineItemPartsSchema = z\n\t.array(\n\t\tz.union([\n\t\t\ttimelinePartTextSchema,\n\t\t\ttimelinePartEventSchema,\n\t\t\ttimelinePartImageSchema,\n\t\t\ttimelineFileSchema,\n\t\t\ttimelinePartMetadataSchema,\n\t\t])\n\t)\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Array of timeline parts that make up the timeline item content\",\n\t});\n\nexport const timelineItemSchema = z.object({\n\tid: z.string().optional().openapi({\n\t\tdescription: \"Unique identifier for the timeline item\",\n\t}),\n\tconversationId: z.string().openapi({\n\t\tdescription: \"ID of the conversation this timeline item belongs to\",\n\t}),\n\torganizationId: z.string().openapi({\n\t\tdescription: \"ID of the organization this timeline item belongs to\",\n\t}),\n\tvisibility: z\n\t\t.enum([TimelineItemVisibility.PUBLIC, TimelineItemVisibility.PRIVATE])\n\t\t.openapi({\n\t\t\tdescription: \"Visibility level of the timeline item\",\n\t\t}),\n\ttype: z\n\t\t.enum([\n\t\t\tConversationTimelineType.MESSAGE,\n\t\t\tConversationTimelineType.EVENT,\n\t\t\tConversationTimelineType.IDENTIFICATION,\n\t\t])\n\t\t.openapi({\n\t\t\tdescription:\n\t\t\t\t\"Type of timeline item - message, event, or interactive identification tool\",\n\t\t}),\n\ttext: z.string().nullable().openapi({\n\t\tdescription: \"Main text content of the timeline item\",\n\t}),\n\ttool: z.string().nullable().optional().openapi({\n\t\tdescription: \"Optional tool identifier associated with this timeline item\",\n\t}),\n\tparts: timelineItemPartsSchema,\n\tuserId: z.string().nullable().openapi({\n\t\tdescription: \"ID of the user who created this timeline item, if applicable\",\n\t}),\n\taiAgentId: z.string().nullable().openapi({\n\t\tdescription:\n\t\t\t\"ID of the AI agent that created this timeline item, if applicable\",\n\t}),\n\tvisitorId: z.string().nullable().openapi({\n\t\tdescription:\n\t\t\t\"ID of the visitor who created this timeline item, if applicable\",\n\t}),\n\tcreatedAt: z.string().openapi({\n\t\tdescription: \"ISO 8601 timestamp when the timeline item was created\",\n\t}),\n\tdeletedAt: z.string().nullable().optional().openapi({\n\t\tdescription:\n\t\t\t\"ISO 8601 timestamp when the timeline item was deleted, if applicable\",\n\t}),\n});\n\nexport type timelineItemSchema = z.infer<typeof timelineItemSchema>;\n\nexport type TimelineItem = z.infer<typeof timelineItemSchema>;\nexport type TimelineItemParts = z.infer<typeof timelineItemPartsSchema>;\n\nexport type TimelinePartText = z.infer<typeof timelinePartTextSchema>;\nexport type TimelinePartImage = z.infer<typeof timelinePartImageSchema>;\nexport type TimelinePartFile = z.infer<typeof timelineFileSchema>;\nexport type TimelinePartEvent = z.infer<typeof timelinePartEventSchema>;\nexport type TimelinePartMetadata = z.infer<typeof timelinePartMetadataSchema>;\n\n// REST API Schemas\nexport const getConversationTimelineItemsRequestSchema = z\n\t.object({\n\t\tlimit: z.coerce.number().min(1).max(100).default(50).openapi({\n\t\t\tdescription: \"Number of timeline items to fetch per page\",\n\t\t\tdefault: 50,\n\t\t}),\n\t\tcursor: z.string().nullable().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Cursor for pagination (timestamp_id format from previous response)\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Query parameters for fetching conversation timeline items\",\n\t});\n\nexport type GetConversationTimelineItemsRequest = z.infer<\n\ttypeof getConversationTimelineItemsRequestSchema\n>;\n\nexport const getConversationTimelineItemsResponseSchema = z\n\t.object({\n\t\titems: z.array(timelineItemSchema).openapi({\n\t\t\tdescription: \"Array of timeline items in chronological order\",\n\t\t}),\n\t\tnextCursor: z.string().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Cursor for the next page, null if no more items are available\",\n\t\t}),\n\t\thasNextPage: z.boolean().openapi({\n\t\t\tdescription: \"Whether there are more items available to fetch\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response containing paginated timeline items\",\n\t});\n\nexport type GetConversationTimelineItemsResponse = z.infer<\n\ttypeof getConversationTimelineItemsResponseSchema\n>;\n\n// Send Timeline Item (Message) Schemas\nexport const sendTimelineItemRequestSchema = z\n\t.object({\n\t\tconversationId: z.string().openapi({\n\t\t\tdescription: \"ID of the conversation to send the timeline item to\",\n\t\t}),\n\t\titem: z.object({\n\t\t\tid: z.string().optional().openapi({\n\t\t\t\tdescription: \"Optional client-generated ID for the timeline item\",\n\t\t\t}),\n\t\t\ttype: z\n\t\t\t\t.enum([\n\t\t\t\t\tConversationTimelineType.MESSAGE,\n\t\t\t\t\tConversationTimelineType.EVENT,\n\t\t\t\t])\n\t\t\t\t.default(ConversationTimelineType.MESSAGE)\n\t\t\t\t.openapi({\n\t\t\t\t\tdescription: \"Type of timeline item - defaults to MESSAGE\",\n\t\t\t\t\tdefault: ConversationTimelineType.MESSAGE,\n\t\t\t\t}),\n\t\t\ttext: z.string().openapi({\n\t\t\t\tdescription: \"Main text content of the timeline item\",\n\t\t\t}),\n\t\t\tparts: timelineItemPartsSchema.optional(),\n\t\t\tvisibility: z\n\t\t\t\t.enum([TimelineItemVisibility.PUBLIC, TimelineItemVisibility.PRIVATE])\n\t\t\t\t.default(TimelineItemVisibility.PUBLIC)\n\t\t\t\t.openapi({\n\t\t\t\t\tdescription: \"Visibility level of the timeline item\",\n\t\t\t\t\tdefault: TimelineItemVisibility.PUBLIC,\n\t\t\t\t}),\n\t\t\ttool: z.string().nullable().optional().openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Optional tool identifier when sending non-message timeline items\",\n\t\t\t}),\n\t\t\tuserId: z.string().nullable().optional().openapi({\n\t\t\t\tdescription: \"ID of the user creating this timeline item\",\n\t\t\t}),\n\t\t\taiAgentId: z.string().nullable().optional().openapi({\n\t\t\t\tdescription: \"ID of the AI agent creating this timeline item\",\n\t\t\t}),\n\t\t\tvisitorId: z.string().nullable().optional().openapi({\n\t\t\t\tdescription: \"ID of the visitor creating this timeline item\",\n\t\t\t}),\n\t\t\tcreatedAt: z.string().optional().openapi({\n\t\t\t\tdescription: \"Optional timestamp for the timeline item\",\n\t\t\t}),\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request body for sending a timeline item to a conversation\",\n\t});\n\nexport type SendTimelineItemRequest = z.infer<\n\ttypeof sendTimelineItemRequestSchema\n>;\n\nexport const sendTimelineItemResponseSchema = z\n\t.object({\n\t\titem: timelineItemSchema.openapi({\n\t\t\tdescription: \"The created timeline item\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response containing the created timeline item\",\n\t});\n\nexport type SendTimelineItemResponse = z.infer<\n\ttypeof sendTimelineItemResponseSchema\n>;\n"],"mappings":";;;;;;AAQA,MAAM,0BAA0BA,OAAS;CACxC,MAAMC,QAAU,QAAQ,CAAC,QAAQ,EAChC,aAAa,0DACb,CAAC;CACF,KAAKC,QAAU,CAAC,QAAQ,EACvB,aAAa,oBACb,CAAC;CACF,WAAWA,QAAU,CAAC,QAAQ,EAC7B,aAAa,0BACb,CAAC;CACF,UAAUA,QAAU,CAAC,UAAU,CAAC,QAAQ,EACvC,aAAa,kCACb,CAAC;CACF,MAAMC,QAAU,CAAC,UAAU,CAAC,QAAQ,EACnC,aAAa,8BACb,CAAC;CACF,OAAOA,QAAU,CAAC,UAAU,CAAC,QAAQ,EACpC,aAAa,gCACb,CAAC;CACF,QAAQA,QAAU,CAAC,UAAU,CAAC,QAAQ,EACrC,aAAa,iCACb,CAAC;CACF,CAAC;AAEF,MAAM,yBAAyBH,OAAS;CACvC,MAAMC,QAAU,OAAO,CAAC,QAAQ,EAC/B,aAAa,wDACb,CAAC;CACF,MAAMC,QAAU,CAAC,QAAQ,EACxB,aAAa,0CACb,CAAC;CACF,CAAC;AAEF,MAAM,qBAAqBF,OAAS;CACnC,MAAMC,QAAU,OAAO,CAAC,QAAQ,EAC/B,aAAa,wDACb,CAAC;CACF,KAAKC,QAAU,CAAC,QAAQ,EACvB,aAAa,mBACb,CAAC;CACF,WAAWA,QAAU,CAAC,QAAQ,EAC7B,aAAa,yBACb,CAAC;CACF,UAAUA,QAAU,CAAC,UAAU,CAAC,QAAQ,EACvC,aAAa,iCACb,CAAC;CACF,MAAMC,QAAU,C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T: "event",
|
|
19
19
|
IDENTIFICATION: "identification"
|
|
20
20
|
};
|
|
21
|
+
const ConversationEventType = {
|
|
22
|
+
ASSIGNED: "assigned",
|
|
23
|
+
UNASSIGNED: "unassigned",
|
|
24
|
+
PARTICIPANT_REQUESTED: "participant_requested",
|
|
25
|
+
PARTICIPANT_JOINED: "participant_joined",
|
|
26
|
+
PARTICIPANT_LEFT: "participant_left",
|
|
27
|
+
STATUS_CHANGED: "status_changed",
|
|
28
|
+
PRIORITY_CHANGED: "priority_changed",
|
|
29
|
+
TAG_ADDED: "tag_added",
|
|
30
|
+
TAG_REMOVED: "tag_removed",
|
|
31
|
+
RESOLVED: "resolved",
|
|
32
|
+
REOPENED: "reopened",
|
|
33
|
+
VISITOR_BLOCKED: "visitor_blocked",
|
|
34
|
+
VISITOR_UNBLOCKED: "visitor_unblocked",
|
|
35
|
+
VISITOR_IDENTIFIED: "visitor_identified"
|
|
36
|
+
};
|
|
21
37
|
|
|
22
38
|
//#endregion
|
|
23
|
-
export { ConversationStatus, ConversationTimelineType, SenderType, TimelineItemVisibility };
|
|
39
|
+
export { ConversationEventType, ConversationStatus, ConversationTimelineType, SenderType, TimelineItemVisibility };
|
|
24
40
|
//# sourceMappingURL=enums.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","names":[],"sources":["../../../../../types/src/enums.ts"],"sourcesContent":["export const SenderType = {\n\tVISITOR: \"visitor\",\n\tTEAM_MEMBER: \"team_member\",\n\tAI: \"ai\",\n} as const;\n\nexport type SenderType = (typeof SenderType)[keyof typeof SenderType];\n\nexport const ConversationStatus = {\n\tOPEN: \"open\",\n\tRESOLVED: \"resolved\",\n\tSPAM: \"spam\",\n} as const;\n\nexport type ConversationStatus =\n\t(typeof ConversationStatus)[keyof typeof ConversationStatus];\n\nexport const ConversationPriority = {\n\tLOW: \"low\",\n\tNORMAL: \"normal\",\n\tHIGH: \"high\",\n\tURGENT: \"urgent\",\n} as const;\n\nexport const TimelineItemVisibility = {\n\tPUBLIC: \"public\",\n\tPRIVATE: \"private\",\n} as const;\n\nexport const ConversationTimelineType = {\n\tMESSAGE: \"message\",\n\tEVENT: \"event\",\n\tIDENTIFICATION: \"identification\",\n} as const;\n\nexport type ConversationTimelineType =\n\t(typeof ConversationTimelineType)[keyof typeof ConversationTimelineType];\n\nexport const ConversationEventType = {\n\tASSIGNED: \"assigned\",\n\tUNASSIGNED: \"unassigned\",\n\tPARTICIPANT_REQUESTED: \"participant_requested\",\n\tPARTICIPANT_JOINED: \"participant_joined\",\n\tPARTICIPANT_LEFT: \"participant_left\",\n\tSTATUS_CHANGED: \"status_changed\",\n\tPRIORITY_CHANGED: \"priority_changed\",\n\tTAG_ADDED: \"tag_added\",\n\tTAG_REMOVED: \"tag_removed\",\n\tRESOLVED: \"resolved\",\n\tREOPENED: \"reopened\",\n\tVISITOR_BLOCKED: \"visitor_blocked\",\n\tVISITOR_UNBLOCKED: \"visitor_unblocked\",\n\tVISITOR_IDENTIFIED: \"visitor_identified\",\n} as const;\n\nexport const ConversationParticipationStatus = {\n\tREQUESTED: \"requested\",\n\tACTIVE: \"active\",\n\tLEFT: \"left\",\n\tDECLINED: \"declined\",\n} as const;\n\nexport const ConversationSentiment = {\n\tPOSITIVE: \"positive\",\n\tNEGATIVE: \"negative\",\n\tNEUTRAL: \"neutral\",\n} as const;\n\nexport type ConversationSentiment =\n\t(typeof ConversationSentiment)[keyof typeof ConversationSentiment];\n\nexport type ConversationParticipationStatus =\n\t(typeof ConversationParticipationStatus)[keyof typeof ConversationParticipationStatus];\n\nexport type ConversationEventType =\n\t(typeof ConversationEventType)[keyof typeof ConversationEventType];\n\nexport type TimelineItemVisibility =\n\t(typeof TimelineItemVisibility)[keyof typeof TimelineItemVisibility];\n\nexport type ConversationPriority =\n\t(typeof ConversationPriority)[keyof typeof ConversationPriority];\n\nexport const WebsiteInstallationTarget = {\n\tNEXTJS: \"nextjs\",\n\tREACT: \"react\",\n} as const;\n\nexport const WebsiteStatus = {\n\tACTIVE: \"active\",\n\tINACTIVE: \"inactive\",\n} as const;\n\nexport type WebsiteStatus = (typeof WebsiteStatus)[keyof typeof WebsiteStatus];\n\nexport type WebsiteInstallationTarget =\n\t(typeof WebsiteInstallationTarget)[keyof typeof WebsiteInstallationTarget];\n\nexport const APIKeyType = {\n\tPRIVATE: \"private\",\n\tPUBLIC: \"public\",\n} as const;\n\nexport type APIKeyType = (typeof APIKeyType)[keyof typeof APIKeyType];\n"],"mappings":";AAAA,MAAa,aAAa;CACzB,SAAS;CACT,aAAa;CACb,IAAI;CACJ;AAID,MAAa,qBAAqB;CACjC,MAAM;CACN,UAAU;CACV,MAAM;CACN;AAYD,MAAa,yBAAyB;CACrC,QAAQ;CACR,SAAS;CACT;AAED,MAAa,2BAA2B;CACvC,SAAS;CACT,OAAO;CACP,gBAAgB;CAChB"}
|
|
1
|
+
{"version":3,"file":"enums.js","names":[],"sources":["../../../../../types/src/enums.ts"],"sourcesContent":["export const SenderType = {\n\tVISITOR: \"visitor\",\n\tTEAM_MEMBER: \"team_member\",\n\tAI: \"ai\",\n} as const;\n\nexport type SenderType = (typeof SenderType)[keyof typeof SenderType];\n\nexport const ConversationStatus = {\n\tOPEN: \"open\",\n\tRESOLVED: \"resolved\",\n\tSPAM: \"spam\",\n} as const;\n\nexport type ConversationStatus =\n\t(typeof ConversationStatus)[keyof typeof ConversationStatus];\n\nexport const ConversationPriority = {\n\tLOW: \"low\",\n\tNORMAL: \"normal\",\n\tHIGH: \"high\",\n\tURGENT: \"urgent\",\n} as const;\n\nexport const TimelineItemVisibility = {\n\tPUBLIC: \"public\",\n\tPRIVATE: \"private\",\n} as const;\n\nexport const ConversationTimelineType = {\n\tMESSAGE: \"message\",\n\tEVENT: \"event\",\n\tIDENTIFICATION: \"identification\",\n} as const;\n\nexport type ConversationTimelineType =\n\t(typeof ConversationTimelineType)[keyof typeof ConversationTimelineType];\n\nexport const ConversationEventType = {\n\tASSIGNED: \"assigned\",\n\tUNASSIGNED: \"unassigned\",\n\tPARTICIPANT_REQUESTED: \"participant_requested\",\n\tPARTICIPANT_JOINED: \"participant_joined\",\n\tPARTICIPANT_LEFT: \"participant_left\",\n\tSTATUS_CHANGED: \"status_changed\",\n\tPRIORITY_CHANGED: \"priority_changed\",\n\tTAG_ADDED: \"tag_added\",\n\tTAG_REMOVED: \"tag_removed\",\n\tRESOLVED: \"resolved\",\n\tREOPENED: \"reopened\",\n\tVISITOR_BLOCKED: \"visitor_blocked\",\n\tVISITOR_UNBLOCKED: \"visitor_unblocked\",\n\tVISITOR_IDENTIFIED: \"visitor_identified\",\n} as const;\n\nexport const ConversationParticipationStatus = {\n\tREQUESTED: \"requested\",\n\tACTIVE: \"active\",\n\tLEFT: \"left\",\n\tDECLINED: \"declined\",\n} as const;\n\nexport const ConversationSentiment = {\n\tPOSITIVE: \"positive\",\n\tNEGATIVE: \"negative\",\n\tNEUTRAL: \"neutral\",\n} as const;\n\nexport type ConversationSentiment =\n\t(typeof ConversationSentiment)[keyof typeof ConversationSentiment];\n\nexport type ConversationParticipationStatus =\n\t(typeof ConversationParticipationStatus)[keyof typeof ConversationParticipationStatus];\n\nexport type ConversationEventType =\n\t(typeof ConversationEventType)[keyof typeof ConversationEventType];\n\nexport type TimelineItemVisibility =\n\t(typeof TimelineItemVisibility)[keyof typeof TimelineItemVisibility];\n\nexport type ConversationPriority =\n\t(typeof ConversationPriority)[keyof typeof ConversationPriority];\n\nexport const WebsiteInstallationTarget = {\n\tNEXTJS: \"nextjs\",\n\tREACT: \"react\",\n} as const;\n\nexport const WebsiteStatus = {\n\tACTIVE: \"active\",\n\tINACTIVE: \"inactive\",\n} as const;\n\nexport type WebsiteStatus = (typeof WebsiteStatus)[keyof typeof WebsiteStatus];\n\nexport type WebsiteInstallationTarget =\n\t(typeof WebsiteInstallationTarget)[keyof typeof WebsiteInstallationTarget];\n\nexport const APIKeyType = {\n\tPRIVATE: \"private\",\n\tPUBLIC: \"public\",\n} as const;\n\nexport type APIKeyType = (typeof APIKeyType)[keyof typeof APIKeyType];\n"],"mappings":";AAAA,MAAa,aAAa;CACzB,SAAS;CACT,aAAa;CACb,IAAI;CACJ;AAID,MAAa,qBAAqB;CACjC,MAAM;CACN,UAAU;CACV,MAAM;CACN;AAYD,MAAa,yBAAyB;CACrC,QAAQ;CACR,SAAS;CACT;AAED,MAAa,2BAA2B;CACvC,SAAS;CACT,OAAO;CACP,gBAAgB;CAChB;AAKD,MAAa,wBAAwB;CACpC,UAAU;CACV,YAAY;CACZ,uBAAuB;CACvB,oBAAoB;CACpB,kBAAkB;CAClB,gBAAgB;CAChB,kBAAkB;CAClB,WAAW;CACX,aAAa;CACb,UAAU;CACV,UAAU;CACV,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CACpB"}
|
package/realtime-events.d.ts
CHANGED
|
@@ -171,6 +171,13 @@ declare const realtimeSchema: {
|
|
|
171
171
|
mediaType: ZodString;
|
|
172
172
|
fileName: ZodOptional<ZodString>;
|
|
173
173
|
size: ZodOptional<ZodNumber>;
|
|
174
|
+
}, $strip>, ZodObject<{
|
|
175
|
+
type: ZodLiteral<"metadata">;
|
|
176
|
+
source: ZodEnum<{
|
|
177
|
+
email: "email";
|
|
178
|
+
widget: "widget";
|
|
179
|
+
api: "api";
|
|
180
|
+
}>;
|
|
174
181
|
}, $strip>]>>;
|
|
175
182
|
userId: ZodNullable<ZodString>;
|
|
176
183
|
aiAgentId: ZodNullable<ZodString>;
|
|
@@ -222,6 +229,75 @@ declare const realtimeSchema: {
|
|
|
222
229
|
deletedAt: ZodNullable<ZodString>;
|
|
223
230
|
lastMessageAt: ZodNullable<ZodString>;
|
|
224
231
|
lastSeenAt: ZodNullable<ZodString>;
|
|
232
|
+
lastMessageTimelineItem: ZodNullable<ZodObject<{
|
|
233
|
+
id: ZodOptional<ZodString>;
|
|
234
|
+
conversationId: ZodString;
|
|
235
|
+
organizationId: ZodString;
|
|
236
|
+
visibility: ZodEnum<{
|
|
237
|
+
public: "public";
|
|
238
|
+
private: "private";
|
|
239
|
+
}>;
|
|
240
|
+
type: ZodEnum<{
|
|
241
|
+
message: "message";
|
|
242
|
+
event: "event";
|
|
243
|
+
identification: "identification";
|
|
244
|
+
}>;
|
|
245
|
+
text: ZodNullable<ZodString>;
|
|
246
|
+
tool: ZodOptional<ZodNullable<ZodString>>;
|
|
247
|
+
parts: ZodArray<ZodUnion<readonly [ZodObject<{
|
|
248
|
+
type: ZodLiteral<"text">;
|
|
249
|
+
text: ZodString;
|
|
250
|
+
}, $strip>, ZodObject<{
|
|
251
|
+
type: ZodLiteral<"event">;
|
|
252
|
+
eventType: ZodEnum<{
|
|
253
|
+
resolved: "resolved";
|
|
254
|
+
assigned: "assigned";
|
|
255
|
+
unassigned: "unassigned";
|
|
256
|
+
participant_requested: "participant_requested";
|
|
257
|
+
participant_joined: "participant_joined";
|
|
258
|
+
participant_left: "participant_left";
|
|
259
|
+
status_changed: "status_changed";
|
|
260
|
+
priority_changed: "priority_changed";
|
|
261
|
+
tag_added: "tag_added";
|
|
262
|
+
tag_removed: "tag_removed";
|
|
263
|
+
reopened: "reopened";
|
|
264
|
+
visitor_blocked: "visitor_blocked";
|
|
265
|
+
visitor_unblocked: "visitor_unblocked";
|
|
266
|
+
visitor_identified: "visitor_identified";
|
|
267
|
+
}>;
|
|
268
|
+
actorUserId: ZodNullable<ZodString>;
|
|
269
|
+
actorAiAgentId: ZodNullable<ZodString>;
|
|
270
|
+
targetUserId: ZodNullable<ZodString>;
|
|
271
|
+
targetAiAgentId: ZodNullable<ZodString>;
|
|
272
|
+
message: ZodOptional<ZodNullable<ZodString>>;
|
|
273
|
+
}, $strip>, ZodObject<{
|
|
274
|
+
type: ZodLiteral<"image">;
|
|
275
|
+
url: ZodString;
|
|
276
|
+
mediaType: ZodString;
|
|
277
|
+
fileName: ZodOptional<ZodString>;
|
|
278
|
+
size: ZodOptional<ZodNumber>;
|
|
279
|
+
width: ZodOptional<ZodNumber>;
|
|
280
|
+
height: ZodOptional<ZodNumber>;
|
|
281
|
+
}, $strip>, ZodObject<{
|
|
282
|
+
type: ZodLiteral<"file">;
|
|
283
|
+
url: ZodString;
|
|
284
|
+
mediaType: ZodString;
|
|
285
|
+
fileName: ZodOptional<ZodString>;
|
|
286
|
+
size: ZodOptional<ZodNumber>;
|
|
287
|
+
}, $strip>, ZodObject<{
|
|
288
|
+
type: ZodLiteral<"metadata">;
|
|
289
|
+
source: ZodEnum<{
|
|
290
|
+
email: "email";
|
|
291
|
+
widget: "widget";
|
|
292
|
+
api: "api";
|
|
293
|
+
}>;
|
|
294
|
+
}, $strip>]>>;
|
|
295
|
+
userId: ZodNullable<ZodString>;
|
|
296
|
+
aiAgentId: ZodNullable<ZodString>;
|
|
297
|
+
visitorId: ZodNullable<ZodString>;
|
|
298
|
+
createdAt: ZodString;
|
|
299
|
+
deletedAt: ZodOptional<ZodNullable<ZodString>>;
|
|
300
|
+
}, $strip>>;
|
|
225
301
|
lastTimelineItem: ZodNullable<ZodObject<{
|
|
226
302
|
id: ZodOptional<ZodString>;
|
|
227
303
|
conversationId: ZodString;
|
|
@@ -277,6 +353,13 @@ declare const realtimeSchema: {
|
|
|
277
353
|
mediaType: ZodString;
|
|
278
354
|
fileName: ZodOptional<ZodString>;
|
|
279
355
|
size: ZodOptional<ZodNumber>;
|
|
356
|
+
}, $strip>, ZodObject<{
|
|
357
|
+
type: ZodLiteral<"metadata">;
|
|
358
|
+
source: ZodEnum<{
|
|
359
|
+
email: "email";
|
|
360
|
+
widget: "widget";
|
|
361
|
+
api: "api";
|
|
362
|
+
}>;
|
|
280
363
|
}, $strip>]>>;
|
|
281
364
|
userId: ZodNullable<ZodString>;
|
|
282
365
|
aiAgentId: ZodNullable<ZodString>;
|
package/realtime-events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realtime-events.d.ts","names":[],"sources":["../../types/src/realtime-events.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAiBa
|
|
1
|
+
{"version":3,"file":"realtime-events.d.ts","names":[],"sources":["../../types/src/realtime-events.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAiBa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmED,iBAAA,gBAAiC;KAEjC,+BAA+B,qBAAqB,eACvD,gBAAgB;KAGb,wBAAwB;QAC7B;WACG,qBAAqB"}
|
package/schemas3.d.ts
CHANGED
|
@@ -72,6 +72,13 @@ declare const conversationSchema: ZodObject<{
|
|
|
72
72
|
mediaType: ZodString;
|
|
73
73
|
fileName: ZodOptional<ZodString>;
|
|
74
74
|
size: ZodOptional<ZodNumber>;
|
|
75
|
+
}, $strip>, ZodObject<{
|
|
76
|
+
type: ZodLiteral<"metadata">;
|
|
77
|
+
source: ZodEnum<{
|
|
78
|
+
email: "email";
|
|
79
|
+
widget: "widget";
|
|
80
|
+
api: "api";
|
|
81
|
+
}>;
|
|
75
82
|
}, $strip>]>>;
|
|
76
83
|
userId: ZodNullable<ZodString>;
|
|
77
84
|
aiAgentId: ZodNullable<ZodString>;
|
package/schemas3.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas3.d.ts","names":[],"sources":["../../types/src/schemas.ts"],"sourcesContent":[],"mappings":";;;;;;cAkBa,oBAAkB
|
|
1
|
+
{"version":3,"file":"schemas3.d.ts","names":[],"sources":["../../types/src/schemas.ts"],"sourcesContent":[],"mappings":";;;;;;cAkBa,oBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA,SAAA,aAAA,UAAA,CAAA;IAAA,SAAA,aAAA,UAAA,CAAA;IAkBnB,SAAA,WAAY;IAEX,SAAA,aAUX,YAAA,UAAA,CAAA,CAAA;;;KAZU,YAAA,GAAe,cAAe;cAE7B,wBAAsB;;;;;;;;;;;AAAA,KAYvB,gBAAA,GAAmB,MAZI,CAAA,OAYW,sBAZX,CAAA"}
|
package/store/support-store.js
CHANGED
|
@@ -105,13 +105,25 @@ function createSupportStore(options = {}) {
|
|
|
105
105
|
goBack() {
|
|
106
106
|
commit((current) => {
|
|
107
107
|
const { previousPages } = current.navigation;
|
|
108
|
-
if (previousPages.length === 0) return
|
|
109
|
-
|
|
108
|
+
if (previousPages.length === 0) return {
|
|
109
|
+
navigation: {
|
|
110
|
+
previousPages: [],
|
|
111
|
+
current: { page: "HOME" }
|
|
112
|
+
},
|
|
113
|
+
config: current.config
|
|
114
|
+
};
|
|
110
115
|
const previous = previousPages.at(-1);
|
|
111
116
|
if (!previous) return current;
|
|
117
|
+
if (previous.page === current.navigation.current.page) return {
|
|
118
|
+
navigation: {
|
|
119
|
+
previousPages: [],
|
|
120
|
+
current: { page: "HOME" }
|
|
121
|
+
},
|
|
122
|
+
config: current.config
|
|
123
|
+
};
|
|
112
124
|
return {
|
|
113
125
|
navigation: {
|
|
114
|
-
previousPages:
|
|
126
|
+
previousPages: previousPages.slice(0, -1),
|
|
115
127
|
current: previous
|
|
116
128
|
},
|
|
117
129
|
config: current.config
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support-store.js","names":["data: PersistedState<Routes>"],"sources":["../../src/store/support-store.ts"],"sourcesContent":["import { createStore, type Store } from \"./create-store\";\n\n/**\n * Built-in routes with their parameter types.\n */\nexport type DefaultRoutes = {\n\tHOME: undefined;\n\tARTICLES: undefined;\n\tCONVERSATION: { conversationId: string; initialMessage?: string };\n\tCONVERSATION_HISTORY: undefined;\n};\n\n/**\n * Extensible route registry via module augmentation.\n *\n * @example\n * declare module '@cossistant/core' {\n * interface RouteRegistry {\n * SETTINGS: { tab: string };\n * }\n * }\n */\nexport interface RouteRegistry extends DefaultRoutes {}\n\n// Build discriminated union from route registry\nexport type NavigationState<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n> = {\n\t[K in keyof Routes]: Routes[K] extends undefined\n\t\t? { page: K; params?: undefined }\n\t\t: { page: K; params: Routes[K] };\n}[keyof Routes];\n\n// Extract page names as string union\nexport type SupportPage<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n> = keyof Routes & string;\n\n// Keep backward compatibility\nexport type SUPPORT_PAGES = SupportPage;\n\n// Typed navigation\nexport type SupportNavigation<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n> = {\n\tpreviousPages: NavigationState<Routes>[];\n\tcurrent: NavigationState<Routes>;\n};\n\nexport type SupportConfig = {\n\tsize: \"normal\" | \"larger\";\n\tisOpen: boolean;\n\tcontent: {\n\t\thome?: {\n\t\t\theader?: string;\n\t\t\tsubheader?: string;\n\t\t\tctaLabel?: string;\n\t\t};\n\t};\n};\n\nexport type SupportStoreState<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n> = {\n\tnavigation: SupportNavigation<Routes>;\n\tconfig: SupportConfig;\n};\n\nexport type SupportStoreActions<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n> = {\n\tnavigate(state: NavigationState<Routes>): void;\n\treplace(state: NavigationState<Routes>): void;\n\tgoBack(): void;\n\topen(): void;\n\tclose(): void;\n\ttoggle(): void;\n\tupdateConfig(config: Partial<SupportConfig>): void;\n\treset(): void;\n};\n\nexport type SupportStoreStorage = {\n\tgetItem(key: string): string | null;\n\tsetItem(key: string, value: string): void;\n\tremoveItem(key: string): void;\n};\n\nexport type SupportStoreOptions = {\n\tstorage?: SupportStoreStorage;\n\tstorageKey?: string;\n};\n\nexport type SupportStore<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n> = Store<SupportStoreState<Routes>> & SupportStoreActions<Routes>;\n\nconst STORAGE_KEY = \"cossistant-support-store\";\n\ntype PersistedConfig = Pick<SupportConfig, \"size\" | \"isOpen\">;\n\ntype PersistedState<Routes extends Record<string, unknown> = RouteRegistry> = {\n\tnavigation?: SupportNavigation<Routes>;\n\tconfig?: PersistedConfig;\n};\n\nfunction createDefaultNavigation<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n>(): SupportNavigation<Routes> {\n\treturn {\n\t\tcurrent: { page: \"HOME\" } as NavigationState<Routes>,\n\t\tpreviousPages: [],\n\t};\n}\n\nfunction createDefaultConfig(): SupportConfig {\n\treturn {\n\t\tsize: \"normal\",\n\t\tcontent: {},\n\t\tisOpen: false,\n\t};\n}\n\nfunction createDefaultState<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n>(): SupportStoreState<Routes> {\n\treturn {\n\t\tnavigation: createDefaultNavigation<Routes>(),\n\t\tconfig: createDefaultConfig(),\n\t};\n}\n\nfunction cloneNavigationState<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n>(state: NavigationState<Routes>): NavigationState<Routes> {\n\t// Type-safe cloning with params if they exist\n\tif (\"params\" in state && state.params !== undefined) {\n\t\treturn {\n\t\t\t...state,\n\t\t\tparams: { ...state.params },\n\t\t} as NavigationState<Routes>;\n\t}\n\treturn { ...state } as NavigationState<Routes>;\n}\n\nfunction parsePersistedState<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n>(\n\tpersisted: PersistedState<Routes> | null | undefined,\n\tfallback: SupportStoreState<Routes>\n): SupportStoreState<Routes> {\n\tif (!persisted) {\n\t\treturn fallback;\n\t}\n\n\tconst persistedNavigation = persisted.navigation;\n\tconst navigation: SupportNavigation<Routes> = {\n\t\tcurrent: persistedNavigation?.current\n\t\t\t? cloneNavigationState<Routes>(persistedNavigation.current)\n\t\t\t: cloneNavigationState<Routes>(fallback.navigation.current),\n\t\tpreviousPages: (\n\t\t\tpersistedNavigation?.previousPages ?? fallback.navigation.previousPages\n\t\t).map((page) => cloneNavigationState<Routes>(page)),\n\t};\n\n\tconst config: SupportConfig = {\n\t\t...fallback.config,\n\t\t...persisted.config,\n\t};\n\n\treturn {\n\t\tnavigation,\n\t\tconfig,\n\t};\n}\n\nfunction getInitialState<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n>(options: SupportStoreOptions): SupportStoreState<Routes> {\n\tconst fallback = createDefaultState<Routes>();\n\tconst storage = options.storage;\n\tif (!storage) {\n\t\treturn fallback;\n\t}\n\n\ttry {\n\t\tconst raw = storage.getItem(options.storageKey ?? STORAGE_KEY);\n\t\tif (!raw) {\n\t\t\treturn fallback;\n\t\t}\n\n\t\tconst parsed = JSON.parse(raw) as PersistedState<Routes>;\n\t\treturn parsePersistedState<Routes>(parsed, fallback);\n\t} catch (error) {\n\t\tconsole.warn(\"[SupportStore] Failed to read persisted state\", error);\n\t\treturn fallback;\n\t}\n}\n\nfunction persistState<Routes extends Record<string, unknown> = RouteRegistry>(\n\tstate: SupportStoreState<Routes>,\n\toptions: SupportStoreOptions\n): void {\n\tconst storage = options.storage;\n\tif (!storage) {\n\t\treturn;\n\t}\n\n\tconst data: PersistedState<Routes> = {\n\t\tnavigation: {\n\t\t\tcurrent: state.navigation.current,\n\t\t\tpreviousPages: [...state.navigation.previousPages],\n\t\t},\n\t\tconfig: {\n\t\t\tsize: state.config.size,\n\t\t\tisOpen: state.config.isOpen,\n\t\t},\n\t};\n\n\ttry {\n\t\tstorage.setItem(options.storageKey ?? STORAGE_KEY, JSON.stringify(data));\n\t} catch (error) {\n\t\tconsole.warn(\"[SupportStore] Failed to persist state\", error);\n\t}\n}\n\nexport function createSupportStore<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n>(options: SupportStoreOptions = {}): SupportStore<Routes> {\n\tconst initialState = getInitialState<Routes>(options);\n\tconst store = createStore<SupportStoreState<Routes>>(initialState);\n\n\tconst commit = (\n\t\tupdater: (state: SupportStoreState<Routes>) => SupportStoreState<Routes>\n\t) => {\n\t\tconst previous = store.getState();\n\t\tstore.setState(updater);\n\t\tconst next = store.getState();\n\t\tif (next !== previous) {\n\t\t\tpersistState(next, options);\n\t\t}\n\t};\n\n\treturn {\n\t\t...store,\n\t\tnavigate(state) {\n\t\t\tcommit((current) => ({\n\t\t\t\tnavigation: {\n\t\t\t\t\tpreviousPages: [\n\t\t\t\t\t\t...current.navigation.previousPages,\n\t\t\t\t\t\tcurrent.navigation.current,\n\t\t\t\t\t],\n\t\t\t\t\tcurrent: state,\n\t\t\t\t},\n\t\t\t\tconfig: current.config,\n\t\t\t}));\n\t\t},\n\t\treplace(state) {\n\t\t\tcommit((current) => ({\n\t\t\t\tnavigation: {\n\t\t\t\t\t...current.navigation,\n\t\t\t\t\tcurrent: state,\n\t\t\t\t},\n\t\t\t\tconfig: current.config,\n\t\t\t}));\n\t\t},\n\t\tgoBack() {\n\t\t\tcommit((current) => {\n\t\t\t\tconst { previousPages } = current.navigation;\n\t\t\t\tif (previousPages.length === 0) {\n\t\t\t\t\treturn current;\n\t\t\t\t}\n\n\t\t\t\tconst nextPrevious = previousPages.slice(0, -1);\n\t\t\t\tconst previous = previousPages.at(-1);\n\n\t\t\t\tif (!previous) {\n\t\t\t\t\treturn current;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tnavigation: {\n\t\t\t\t\t\tpreviousPages: nextPrevious,\n\t\t\t\t\t\tcurrent: previous,\n\t\t\t\t\t},\n\t\t\t\t\tconfig: current.config,\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\t\topen() {\n\t\t\tcommit((current) => ({\n\t\t\t\tnavigation: current.navigation,\n\t\t\t\tconfig: { ...current.config, isOpen: true },\n\t\t\t}));\n\t\t},\n\t\tclose() {\n\t\t\tcommit((current) => ({\n\t\t\t\tnavigation: current.navigation,\n\t\t\t\tconfig: { ...current.config, isOpen: false },\n\t\t\t}));\n\t\t},\n\t\ttoggle() {\n\t\t\tcommit((current) => ({\n\t\t\t\tnavigation: current.navigation,\n\t\t\t\tconfig: { ...current.config, isOpen: !current.config.isOpen },\n\t\t\t}));\n\t\t},\n\t\tupdateConfig(config) {\n\t\t\tcommit((current) => ({\n\t\t\t\tnavigation: current.navigation,\n\t\t\t\tconfig: { ...current.config, ...config },\n\t\t\t}));\n\t\t},\n\t\treset() {\n\t\t\tcommit(() => createDefaultState<Routes>());\n\t\t},\n\t};\n}\n"],"mappings":";;;AAgGA,MAAM,cAAc;AASpB,SAAS,0BAEsB;AAC9B,QAAO;EACN,SAAS,EAAE,MAAM,QAAQ;EACzB,eAAe,EAAE;EACjB;;AAGF,SAAS,sBAAqC;AAC7C,QAAO;EACN,MAAM;EACN,SAAS,EAAE;EACX,QAAQ;EACR;;AAGF,SAAS,qBAEsB;AAC9B,QAAO;EACN,YAAY,yBAAiC;EAC7C,QAAQ,qBAAqB;EAC7B;;AAGF,SAAS,qBAEP,OAAyD;AAE1D,KAAI,YAAY,SAAS,MAAM,WAAW,OACzC,QAAO;EACN,GAAG;EACH,QAAQ,EAAE,GAAG,MAAM,QAAQ;EAC3B;AAEF,QAAO,EAAE,GAAG,OAAO;;AAGpB,SAAS,oBAGR,WACA,UAC4B;AAC5B,KAAI,CAAC,UACJ,QAAO;CAGR,MAAM,sBAAsB,UAAU;AAetC,QAAO;EACN,YAf6C;GAC7C,SAAS,qBAAqB,UAC3B,qBAA6B,oBAAoB,QAAQ,GACzD,qBAA6B,SAAS,WAAW,QAAQ;GAC5D,gBACC,qBAAqB,iBAAiB,SAAS,WAAW,eACzD,KAAK,SAAS,qBAA6B,KAAK,CAAC;GACnD;EASA,QAP6B;GAC7B,GAAG,SAAS;GACZ,GAAG,UAAU;GACb;EAKA;;AAGF,SAAS,gBAEP,SAAyD;CAC1D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AAE,kBAAkB,QAAQ;AAClC,QAAI,cAAc,WAAW,EAC5B,QAAO;IAGR,MAAM,eAAe,cAAc,MAAM,GAAG,GAAG;IAC/C,MAAM,WAAW,cAAc,GAAG,GAAG;AAErC,QAAI,CAAC,SACJ,QAAO;AAGR,WAAO;KACN,YAAY;MACX,eAAe;MACf,SAAS;MACT;KACD,QAAQ,QAAQ;KAChB;KACA;;EAEH,OAAO;AACN,WAAQ,aAAa;IACpB,YAAY,QAAQ;IACpB,QAAQ;KAAE,GAAG,QAAQ;KAAQ,QAAQ;KAAM;IAC3C,EAAE;;EAEJ,QAAQ;AACP,WAAQ,aAAa;IACpB,YAAY,QAAQ;IACpB,QAAQ;KAAE,GAAG,QAAQ;KAAQ,QAAQ;KAAO;IAC5C,EAAE;;EAEJ,SAAS;AACR,WAAQ,aAAa;IACpB,YAAY,QAAQ;IACpB,QAAQ;KAAE,GAAG,QAAQ;KAAQ,QAAQ,CAAC,QAAQ,OAAO;KAAQ;IAC7D,EAAE;;EAEJ,aAAa,QAAQ;AACpB,WAAQ,aAAa;IACpB,YAAY,QAAQ;IACpB,QAAQ;KAAE,GAAG,QAAQ;KAAQ,GAAG;KAAQ;IACxC,EAAE;;EAEJ,QAAQ;AACP,gBAAa,oBAA4B,CAAC;;EAE3C"}
|
|
1
|
+
{"version":3,"file":"support-store.js","names":["data: PersistedState<Routes>"],"sources":["../../src/store/support-store.ts"],"sourcesContent":["import { createStore, type Store } from \"./create-store\";\n\n/**\n * Built-in routes with their parameter types.\n */\nexport type DefaultRoutes = {\n\tHOME: undefined;\n\tARTICLES: undefined;\n\tCONVERSATION: { conversationId: string; initialMessage?: string };\n\tCONVERSATION_HISTORY: undefined;\n};\n\n/**\n * Extensible route registry via module augmentation.\n *\n * @example\n * declare module '@cossistant/core' {\n * interface RouteRegistry {\n * SETTINGS: { tab: string };\n * }\n * }\n */\nexport interface RouteRegistry extends DefaultRoutes {}\n\n// Build discriminated union from route registry\nexport type NavigationState<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n> = {\n\t[K in keyof Routes]: Routes[K] extends undefined\n\t\t? { page: K; params?: undefined }\n\t\t: { page: K; params: Routes[K] };\n}[keyof Routes];\n\n// Extract page names as string union\nexport type SupportPage<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n> = keyof Routes & string;\n\n// Keep backward compatibility\nexport type SUPPORT_PAGES = SupportPage;\n\n// Typed navigation\nexport type SupportNavigation<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n> = {\n\tpreviousPages: NavigationState<Routes>[];\n\tcurrent: NavigationState<Routes>;\n};\n\nexport type SupportConfig = {\n\tsize: \"normal\" | \"larger\";\n\tisOpen: boolean;\n\tcontent: {\n\t\thome?: {\n\t\t\theader?: string;\n\t\t\tsubheader?: string;\n\t\t\tctaLabel?: string;\n\t\t};\n\t};\n};\n\nexport type SupportStoreState<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n> = {\n\tnavigation: SupportNavigation<Routes>;\n\tconfig: SupportConfig;\n};\n\nexport type SupportStoreActions<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n> = {\n\tnavigate(state: NavigationState<Routes>): void;\n\treplace(state: NavigationState<Routes>): void;\n\tgoBack(): void;\n\topen(): void;\n\tclose(): void;\n\ttoggle(): void;\n\tupdateConfig(config: Partial<SupportConfig>): void;\n\treset(): void;\n};\n\nexport type SupportStoreStorage = {\n\tgetItem(key: string): string | null;\n\tsetItem(key: string, value: string): void;\n\tremoveItem(key: string): void;\n};\n\nexport type SupportStoreOptions = {\n\tstorage?: SupportStoreStorage;\n\tstorageKey?: string;\n};\n\nexport type SupportStore<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n> = Store<SupportStoreState<Routes>> & SupportStoreActions<Routes>;\n\nconst STORAGE_KEY = \"cossistant-support-store\";\n\ntype PersistedConfig = Pick<SupportConfig, \"size\" | \"isOpen\">;\n\ntype PersistedState<Routes extends Record<string, unknown> = RouteRegistry> = {\n\tnavigation?: SupportNavigation<Routes>;\n\tconfig?: PersistedConfig;\n};\n\nfunction createDefaultNavigation<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n>(): SupportNavigation<Routes> {\n\treturn {\n\t\tcurrent: { page: \"HOME\" } as NavigationState<Routes>,\n\t\tpreviousPages: [],\n\t};\n}\n\nfunction createDefaultConfig(): SupportConfig {\n\treturn {\n\t\tsize: \"normal\",\n\t\tcontent: {},\n\t\tisOpen: false,\n\t};\n}\n\nfunction createDefaultState<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n>(): SupportStoreState<Routes> {\n\treturn {\n\t\tnavigation: createDefaultNavigation<Routes>(),\n\t\tconfig: createDefaultConfig(),\n\t};\n}\n\nfunction cloneNavigationState<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n>(state: NavigationState<Routes>): NavigationState<Routes> {\n\t// Type-safe cloning with params if they exist\n\tif (\"params\" in state && state.params !== undefined) {\n\t\treturn {\n\t\t\t...state,\n\t\t\tparams: { ...state.params },\n\t\t} as NavigationState<Routes>;\n\t}\n\treturn { ...state } as NavigationState<Routes>;\n}\n\nfunction parsePersistedState<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n>(\n\tpersisted: PersistedState<Routes> | null | undefined,\n\tfallback: SupportStoreState<Routes>\n): SupportStoreState<Routes> {\n\tif (!persisted) {\n\t\treturn fallback;\n\t}\n\n\tconst persistedNavigation = persisted.navigation;\n\tconst navigation: SupportNavigation<Routes> = {\n\t\tcurrent: persistedNavigation?.current\n\t\t\t? cloneNavigationState<Routes>(persistedNavigation.current)\n\t\t\t: cloneNavigationState<Routes>(fallback.navigation.current),\n\t\tpreviousPages: (\n\t\t\tpersistedNavigation?.previousPages ?? fallback.navigation.previousPages\n\t\t).map((page) => cloneNavigationState<Routes>(page)),\n\t};\n\n\tconst config: SupportConfig = {\n\t\t...fallback.config,\n\t\t...persisted.config,\n\t};\n\n\treturn {\n\t\tnavigation,\n\t\tconfig,\n\t};\n}\n\nfunction getInitialState<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n>(options: SupportStoreOptions): SupportStoreState<Routes> {\n\tconst fallback = createDefaultState<Routes>();\n\tconst storage = options.storage;\n\tif (!storage) {\n\t\treturn fallback;\n\t}\n\n\ttry {\n\t\tconst raw = storage.getItem(options.storageKey ?? STORAGE_KEY);\n\t\tif (!raw) {\n\t\t\treturn fallback;\n\t\t}\n\n\t\tconst parsed = JSON.parse(raw) as PersistedState<Routes>;\n\t\treturn parsePersistedState<Routes>(parsed, fallback);\n\t} catch (error) {\n\t\tconsole.warn(\"[SupportStore] Failed to read persisted state\", error);\n\t\treturn fallback;\n\t}\n}\n\nfunction persistState<Routes extends Record<string, unknown> = RouteRegistry>(\n\tstate: SupportStoreState<Routes>,\n\toptions: SupportStoreOptions\n): void {\n\tconst storage = options.storage;\n\tif (!storage) {\n\t\treturn;\n\t}\n\n\tconst data: PersistedState<Routes> = {\n\t\tnavigation: {\n\t\t\tcurrent: state.navigation.current,\n\t\t\tpreviousPages: [...state.navigation.previousPages],\n\t\t},\n\t\tconfig: {\n\t\t\tsize: state.config.size,\n\t\t\tisOpen: state.config.isOpen,\n\t\t},\n\t};\n\n\ttry {\n\t\tstorage.setItem(options.storageKey ?? STORAGE_KEY, JSON.stringify(data));\n\t} catch (error) {\n\t\tconsole.warn(\"[SupportStore] Failed to persist state\", error);\n\t}\n}\n\nexport function createSupportStore<\n\tRoutes extends Record<string, unknown> = RouteRegistry,\n>(options: SupportStoreOptions = {}): SupportStore<Routes> {\n\tconst initialState = getInitialState<Routes>(options);\n\tconst store = createStore<SupportStoreState<Routes>>(initialState);\n\n\tconst commit = (\n\t\tupdater: (state: SupportStoreState<Routes>) => SupportStoreState<Routes>\n\t) => {\n\t\tconst previous = store.getState();\n\t\tstore.setState(updater);\n\t\tconst next = store.getState();\n\t\tif (next !== previous) {\n\t\t\tpersistState(next, options);\n\t\t}\n\t};\n\n\treturn {\n\t\t...store,\n\t\tnavigate(state) {\n\t\t\tcommit((current) => ({\n\t\t\t\tnavigation: {\n\t\t\t\t\tpreviousPages: [\n\t\t\t\t\t\t...current.navigation.previousPages,\n\t\t\t\t\t\tcurrent.navigation.current,\n\t\t\t\t\t],\n\t\t\t\t\tcurrent: state,\n\t\t\t\t},\n\t\t\t\tconfig: current.config,\n\t\t\t}));\n\t\t},\n\t\treplace(state) {\n\t\t\tcommit((current) => ({\n\t\t\t\tnavigation: {\n\t\t\t\t\t...current.navigation,\n\t\t\t\t\tcurrent: state,\n\t\t\t\t},\n\t\t\t\tconfig: current.config,\n\t\t\t}));\n\t\t},\n\t\tgoBack() {\n\t\t\tcommit((current) => {\n\t\t\t\tconst { previousPages } = current.navigation;\n\n\t\t\t\tif (previousPages.length === 0) {\n\t\t\t\t\t// No history, go to HOME\n\t\t\t\t\treturn {\n\t\t\t\t\t\tnavigation: {\n\t\t\t\t\t\t\tpreviousPages: [],\n\t\t\t\t\t\t\tcurrent: { page: \"HOME\" } as NavigationState<Routes>,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tconfig: current.config,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst previous = previousPages.at(-1);\n\n\t\t\t\tif (!previous) {\n\t\t\t\t\treturn current;\n\t\t\t\t}\n\n\t\t\t\t// Safeguard: If the previous page is the same as the current page,\n\t\t\t\t// navigate to HOME instead to avoid getting stuck\n\t\t\t\tif (previous.page === current.navigation.current.page) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tnavigation: {\n\t\t\t\t\t\t\tpreviousPages: [],\n\t\t\t\t\t\t\tcurrent: { page: \"HOME\" } as NavigationState<Routes>,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tconfig: current.config,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst nextPrevious = previousPages.slice(0, -1);\n\t\t\t\treturn {\n\t\t\t\t\tnavigation: {\n\t\t\t\t\t\tpreviousPages: nextPrevious,\n\t\t\t\t\t\tcurrent: previous,\n\t\t\t\t\t},\n\t\t\t\t\tconfig: current.config,\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\t\topen() {\n\t\t\tcommit((current) => ({\n\t\t\t\tnavigation: current.navigation,\n\t\t\t\tconfig: { ...current.config, isOpen: true },\n\t\t\t}));\n\t\t},\n\t\tclose() {\n\t\t\tcommit((current) => ({\n\t\t\t\tnavigation: current.navigation,\n\t\t\t\tconfig: { ...current.config, isOpen: false },\n\t\t\t}));\n\t\t},\n\t\ttoggle() {\n\t\t\tcommit((current) => ({\n\t\t\t\tnavigation: current.navigation,\n\t\t\t\tconfig: { ...current.config, isOpen: !current.config.isOpen },\n\t\t\t}));\n\t\t},\n\t\tupdateConfig(config) {\n\t\t\tcommit((current) => ({\n\t\t\t\tnavigation: current.navigation,\n\t\t\t\tconfig: { ...current.config, ...config },\n\t\t\t}));\n\t\t},\n\t\treset() {\n\t\t\tcommit(() => createDefaultState<Routes>());\n\t\t},\n\t};\n}\n"],"mappings":";;;AAgGA,MAAM,cAAc;AASpB,SAAS,0BAEsB;AAC9B,QAAO;EACN,SAAS,EAAE,MAAM,QAAQ;EACzB,eAAe,EAAE;EACjB;;AAGF,SAAS,sBAAqC;AAC7C,QAAO;EACN,MAAM;EACN,SAAS,EAAE;EACX,QAAQ;EACR;;AAGF,SAAS,qBAEsB;AAC9B,QAAO;EACN,YAAY,yBAAiC;EAC7C,QAAQ,qBAAqB;EAC7B;;AAGF,SAAS,qBAEP,OAAyD;AAE1D,KAAI,YAAY,SAAS,MAAM,WAAW,OACzC,QAAO;EACN,GAAG;EACH,QAAQ,EAAE,GAAG,MAAM,QAAQ;EAC3B;AAEF,QAAO,EAAE,GAAG,OAAO;;AAGpB,SAAS,oBAGR,WACA,UAC4B;AAC5B,KAAI,CAAC,UACJ,QAAO;CAGR,MAAM,sBAAsB,UAAU;AAetC,QAAO;EACN,YAf6C;GAC7C,SAAS,qBAAqB,UAC3B,qBAA6B,oBAAoB,QAAQ,GACzD,qBAA6B,SAAS,WAAW,QAAQ;GAC5D,gBACC,qBAAqB,iBAAiB,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names":[],"sources":["../../src/store/timeline-items-store.ts"],"sourcesContent":[],"mappings":";;;;;KAOK,wBAAA,GAA2B;KAEpB,8BAAA;EAFP,KAAA,EAGG,YAHH,EAAA;EAEO,WAAA,EAAA,OAAA;EAMA,UAAA,CAAA,EAAA,MAAA;
|
|
1
|
+
{"version":3,"file":"timeline-items-store.d.ts","names":[],"sources":["../../src/store/timeline-items-store.ts"],"sourcesContent":[],"mappings":";;;;;KAOK,wBAAA,GAA2B;KAEpB,8BAAA;EAFP,KAAA,EAGG,YAHH,EAAA;EAEO,WAAA,EAAA,OAAA;EAMA,UAAA,CAAA,EAAA,MAAA;AAiMZ,CAAA;AAAuC,KAjM3B,kBAAA,GAiM2B;EAAN,aAAA,EAhMjB,MAgMiB,CAAA,MAAA,EAhMF,8BAgME,CAAA;CAGzB;AAEkB,KALd,kBAAA,GAAqB,KAKP,CALa,kBAKb,CAAA,GAAA;EACS,UAAA,CAAA,cAAA,EAAA,MAAA,EAAA,IAAA,EAH3B,8BAG2B,CAAA,EAAA,IAAA;EAA2B,kBAAA,CAAA,IAAA,EADpC,YACoC,CAAA,EAAA,IAAA;EAKtD,0BAAA,CAAA,KAAA,EAL2B,wBAK3B,CAAA,EALsD,YAKtD;EAAY,kBAAA,CAAA,cAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,IAAA;EAKJ,oBAAA,CAAA,cAAwB,EAAA,MACzB,EAAA,YAAA,EACZ,MAAA,EAAA,IAAA,EAPK,YAOa,CAAA,EAAA,IAAA;EA2CL,iBAAA,CAAA,cAA4B,EAAA,MAAA,CAAA,EAAA,IAAA;CAC9B;AAAN,iBA9CQ,wBAAA,CA8CR,YAAA,CAAA,EA7CO,kBA6CP,CAAA,EA5CL,kBA4CK;AAEL,iBAHa,4BAAA,CAGb,KAAA,EAFK,KAEL,CAFW,kBAEX,CAAA,EAAA,cAAA,EAAA,MAAA,CAAA,EAAA,8BAAA,GAAA,SAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createStore } from "./create-store.js";
|
|
2
|
+
import { timelineItemPartsSchema } from "../packages/types/src/api/timeline-item.js";
|
|
2
3
|
|
|
3
4
|
//#region src/store/timeline-items-store.ts
|
|
4
5
|
const INITIAL_STATE = { conversations: {} };
|
|
@@ -84,6 +85,7 @@ function finalizeTimelineItem(state, conversationId, optimisticId, item) {
|
|
|
84
85
|
}
|
|
85
86
|
function normalizeRealtimeTimelineItem(event) {
|
|
86
87
|
const raw = event.payload.item;
|
|
88
|
+
const parsedParts = timelineItemPartsSchema.parse(raw.parts);
|
|
87
89
|
return {
|
|
88
90
|
id: raw.id,
|
|
89
91
|
conversationId: raw.conversationId,
|
|
@@ -91,7 +93,7 @@ function normalizeRealtimeTimelineItem(event) {
|
|
|
91
93
|
visibility: raw.visibility,
|
|
92
94
|
type: raw.type,
|
|
93
95
|
text: raw.text ?? null,
|
|
94
|
-
parts:
|
|
96
|
+
parts: parsedParts,
|
|
95
97
|
tool: raw.tool ?? null,
|
|
96
98
|
userId: raw.userId,
|
|
97
99
|
visitorId: raw.visitorId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-items-store.js","names":["INITIAL_STATE: TimelineItemsState","nextConversation: ConversationTimelineItemsState"],"sources":["../../src/store/timeline-items-store.ts"],"sourcesContent":["import type { RealtimeEvent } from \"@cossistant/types\";\nimport type {\n\tTimelineItem,\n\tTimelineItemParts,\n} from \"@cossistant/types/api/timeline-item\";\nimport { createStore, type Store } from \"./create-store\";\n\ntype TimelineItemCreatedEvent = RealtimeEvent<\"timelineItemCreated\">;\n\nexport type ConversationTimelineItemsState = {\n\titems: TimelineItem[];\n\thasNextPage: boolean;\n\tnextCursor?: string;\n};\n\nexport type TimelineItemsState = {\n\tconversations: Record<string, ConversationTimelineItemsState>;\n};\n\nconst INITIAL_STATE: TimelineItemsState = {\n\tconversations: {},\n};\n\nfunction sortTimelineItems(items: TimelineItem[]): TimelineItem[] {\n\treturn [...items].sort((a, b) => a.createdAt.localeCompare(b.createdAt));\n}\n\nfunction isSameTimelineItem(a: TimelineItem, b: TimelineItem): boolean {\n\treturn (\n\t\ta.id === b.id &&\n\t\ta.text === b.text &&\n\t\tnew Date(a.createdAt).getTime() === new Date(b.createdAt).getTime()\n\t);\n}\n\nfunction mergeTimelineItems(\n\texisting: TimelineItem[],\n\tincoming: TimelineItem[]\n): TimelineItem[] {\n\tif (incoming.length === 0) {\n\t\treturn existing;\n\t}\n\n\tconst byId = new Map<string, TimelineItem>();\n\tfor (const item of existing) {\n\t\tif (item.id) {\n\t\t\tbyId.set(item.id, item);\n\t\t}\n\t}\n\n\tlet changed = false;\n\tfor (const item of incoming) {\n\t\tif (!item.id) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst previous = byId.get(item.id);\n\t\tif (!(previous && isSameTimelineItem(previous, item))) {\n\t\t\tchanged = true;\n\t\t}\n\t\tbyId.set(item.id, item);\n\t}\n\n\tif (!changed && byId.size === existing.length) {\n\t\tlet orderStable = true;\n\t\tfor (const item of existing) {\n\t\t\tif (item.id && byId.get(item.id) !== item) {\n\t\t\t\torderStable = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (orderStable) {\n\t\t\treturn existing;\n\t\t}\n\t}\n\n\treturn sortTimelineItems(Array.from(byId.values()));\n}\n\nfunction applyPage(\n\tstate: TimelineItemsState,\n\tconversationId: string,\n\tpage: Pick<\n\t\tConversationTimelineItemsState,\n\t\t\"items\" | \"hasNextPage\" | \"nextCursor\"\n\t>\n): TimelineItemsState {\n\tconst existing = state.conversations[conversationId];\n\tconst mergedItems = mergeTimelineItems(existing?.items ?? [], page.items);\n\n\tif (\n\t\texisting &&\n\t\texisting.items === mergedItems &&\n\t\texisting.hasNextPage === page.hasNextPage &&\n\t\texisting.nextCursor === page.nextCursor\n\t) {\n\t\treturn state;\n\t}\n\n\treturn {\n\t\t...state,\n\t\tconversations: {\n\t\t\t...state.conversations,\n\t\t\t[conversationId]: {\n\t\t\t\titems: mergedItems,\n\t\t\t\thasNextPage: page.hasNextPage,\n\t\t\t\tnextCursor: page.nextCursor,\n\t\t\t},\n\t\t},\n\t};\n}\n\nfunction applyTimelineItem(\n\tstate: TimelineItemsState,\n\titem: TimelineItem\n): TimelineItemsState {\n\tconst existing = state.conversations[item.conversationId];\n\tconst mergedItems = mergeTimelineItems(existing?.items ?? [], [item]);\n\n\tif (existing && existing.items === mergedItems) {\n\t\treturn state;\n\t}\n\n\treturn {\n\t\t...state,\n\t\tconversations: {\n\t\t\t...state.conversations,\n\t\t\t[item.conversationId]: {\n\t\t\t\titems: mergedItems,\n\t\t\t\thasNextPage: existing?.hasNextPage ?? false,\n\t\t\t\tnextCursor: existing?.nextCursor,\n\t\t\t},\n\t\t},\n\t};\n}\n\nfunction removeTimelineItem(\n\tstate: TimelineItemsState,\n\tconversationId: string,\n\titemId: string\n): TimelineItemsState {\n\tconst existing = state.conversations[conversationId];\n\tif (!existing) {\n\t\treturn state;\n\t}\n\n\tconst index = existing.items.findIndex((item) => item.id === itemId);\n\tif (index === -1) {\n\t\treturn state;\n\t}\n\n\tconst nextItems = existing.items\n\t\t.slice(0, index)\n\t\t.concat(existing.items.slice(index + 1));\n\n\tconst nextConversation: ConversationTimelineItemsState = {\n\t\t...existing,\n\t\titems: nextItems,\n\t};\n\n\treturn {\n\t\t...state,\n\t\tconversations: {\n\t\t\t...state.conversations,\n\t\t\t[conversationId]: nextConversation,\n\t\t},\n\t};\n}\n\nfunction finalizeTimelineItem(\n\tstate: TimelineItemsState,\n\tconversationId: string,\n\toptimisticId: string,\n\titem: TimelineItem\n): TimelineItemsState {\n\tconst withoutOptimistic = removeTimelineItem(\n\t\tstate,\n\t\tconversationId,\n\t\toptimisticId\n\t);\n\treturn applyTimelineItem(withoutOptimistic, item);\n}\n\n// Normalize timeline item created event\nfunction normalizeRealtimeTimelineItem(\n\tevent: TimelineItemCreatedEvent\n): TimelineItem {\n\tconst raw = event.payload.item;\n\treturn {\n\t\tid: raw.id,\n\t\tconversationId: raw.conversationId,\n\t\torganizationId: raw.organizationId,\n\t\tvisibility: raw.visibility,\n\t\ttype: raw.type,\n\t\ttext: raw.text ?? null,\n\t\tparts: raw.parts as TimelineItemParts,\n\t\ttool: raw.tool ?? null,\n\t\tuserId: raw.userId,\n\t\tvisitorId: raw.visitorId,\n\t\taiAgentId: raw.aiAgentId,\n\t\tcreatedAt: raw.createdAt,\n\t\tdeletedAt: raw.deletedAt ?? null,\n\t};\n}\n\nexport type TimelineItemsStore = Store<TimelineItemsState> & {\n\tingestPage(\n\t\tconversationId: string,\n\t\tpage: ConversationTimelineItemsState\n\t): void;\n\tingestTimelineItem(item: TimelineItem): void;\n\tingestRealtimeTimelineItem(event: TimelineItemCreatedEvent): TimelineItem;\n\tremoveTimelineItem(conversationId: string, itemId: string): void;\n\tfinalizeTimelineItem(\n\t\tconversationId: string,\n\t\toptimisticId: string,\n\t\titem: TimelineItem\n\t): void;\n\tclearConversation(conversationId: string): void;\n};\n\nexport function createTimelineItemsStore(\n\tinitialState: TimelineItemsState = INITIAL_STATE\n): TimelineItemsStore {\n\tconst store = createStore<TimelineItemsState>(initialState);\n\n\treturn {\n\t\t...store,\n\t\tingestPage(conversationId, page) {\n\t\t\tstore.setState((state) => applyPage(state, conversationId, page));\n\t\t},\n\t\tingestTimelineItem(item) {\n\t\t\tstore.setState((state) => applyTimelineItem(state, item));\n\t\t},\n\t\tingestRealtimeTimelineItem(event) {\n\t\t\tconst item = normalizeRealtimeTimelineItem(event);\n\t\t\tstore.setState((state) => applyTimelineItem(state, item));\n\t\t\treturn item;\n\t\t},\n\t\tremoveTimelineItem(conversationId, itemId) {\n\t\t\tstore.setState((state) =>\n\t\t\t\tremoveTimelineItem(state, conversationId, itemId)\n\t\t\t);\n\t\t},\n\t\tfinalizeTimelineItem(conversationId, optimisticId, item) {\n\t\t\tstore.setState((state) =>\n\t\t\t\tfinalizeTimelineItem(state, conversationId, optimisticId, item)\n\t\t\t);\n\t\t},\n\t\tclearConversation(conversationId) {\n\t\t\tstore.setState((state) => {\n\t\t\t\tif (!state.conversations[conversationId]) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\tconst { [conversationId]: _removed, ...rest } = state.conversations;\n\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\tconversations: rest,\n\t\t\t\t} satisfies TimelineItemsState;\n\t\t\t});\n\t\t},\n\t};\n}\n\nexport function getConversationTimelineItems(\n\tstore: Store<TimelineItemsState>,\n\tconversationId: string\n): ConversationTimelineItemsState | undefined {\n\treturn store.getState().conversations[conversationId];\n}\n"],"mappings":";;;AAmBA,MAAMA,gBAAoC,EACzC,eAAe,EAAE,EACjB;AAED,SAAS,kBAAkB,OAAuC;AACjE,QAAO,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,UAAU,cAAc,EAAE,UAAU,CAAC;;AAGzE,SAAS,mBAAmB,GAAiB,GAA0B;AACtE,QACC,EAAE,OAAO,EAAE,MACX,EAAE,SAAS,EAAE,QACb,IAAI,KAAK,EAAE,UAAU,CAAC,SAAS,KAAK,IAAI,KAAK,EAAE,UAAU,CAAC,SAAS;;AAIrE,SAAS,mBACR,UACA,UACiB;AACjB,KAAI,SAAS,WAAW,EACvB,QAAO;CAGR,MAAM,uBAAO,IAAI,KAA2B;AAC5C,MAAK,MAAM,QAAQ,SAClB,KAAI,KAAK,GACR,MAAK,IAAI,KAAK,IAAI,KAAK;CAIzB,IAAI,UAAU;AACd,MAAK,MAAM,QAAQ,UAAU;AAC5B,MAAI,CAAC,KAAK,GACT;EAED,MAAM,WAAW,KAAK,IAAI,KAAK,GAAG;AAClC,MAAI,EAAE,YAAY,mBAAmB,UAAU,KAAK,EACnD,WAAU;AAEX,OAAK,IAAI,KAAK,IAAI,KAAK;;AAGxB,KAAI,CAAC,WAAW,KAAK,SAAS,SAAS,QAAQ;EAC9C,IAAI,cAAc;AAClB,OAAK,MAAM,QAAQ,SAClB,KAAI,KAAK,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
|
1
|
+
{"version":3,"file":"timeline-items-store.js","names":["INITIAL_STATE: TimelineItemsState","nextConversation: ConversationTimelineItemsState"],"sources":["../../src/store/timeline-items-store.ts"],"sourcesContent":["import type { RealtimeEvent } from \"@cossistant/types\";\nimport {\n\ttype TimelineItem,\n\ttimelineItemPartsSchema,\n} from \"@cossistant/types/api/timeline-item\";\nimport { createStore, type Store } from \"./create-store\";\n\ntype TimelineItemCreatedEvent = RealtimeEvent<\"timelineItemCreated\">;\n\nexport type ConversationTimelineItemsState = {\n\titems: TimelineItem[];\n\thasNextPage: boolean;\n\tnextCursor?: string;\n};\n\nexport type TimelineItemsState = {\n\tconversations: Record<string, ConversationTimelineItemsState>;\n};\n\nconst INITIAL_STATE: TimelineItemsState = {\n\tconversations: {},\n};\n\nfunction sortTimelineItems(items: TimelineItem[]): TimelineItem[] {\n\treturn [...items].sort((a, b) => a.createdAt.localeCompare(b.createdAt));\n}\n\nfunction isSameTimelineItem(a: TimelineItem, b: TimelineItem): boolean {\n\treturn (\n\t\ta.id === b.id &&\n\t\ta.text === b.text &&\n\t\tnew Date(a.createdAt).getTime() === new Date(b.createdAt).getTime()\n\t);\n}\n\nfunction mergeTimelineItems(\n\texisting: TimelineItem[],\n\tincoming: TimelineItem[]\n): TimelineItem[] {\n\tif (incoming.length === 0) {\n\t\treturn existing;\n\t}\n\n\tconst byId = new Map<string, TimelineItem>();\n\tfor (const item of existing) {\n\t\tif (item.id) {\n\t\t\tbyId.set(item.id, item);\n\t\t}\n\t}\n\n\tlet changed = false;\n\tfor (const item of incoming) {\n\t\tif (!item.id) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst previous = byId.get(item.id);\n\t\tif (!(previous && isSameTimelineItem(previous, item))) {\n\t\t\tchanged = true;\n\t\t}\n\t\tbyId.set(item.id, item);\n\t}\n\n\tif (!changed && byId.size === existing.length) {\n\t\tlet orderStable = true;\n\t\tfor (const item of existing) {\n\t\t\tif (item.id && byId.get(item.id) !== item) {\n\t\t\t\torderStable = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (orderStable) {\n\t\t\treturn existing;\n\t\t}\n\t}\n\n\treturn sortTimelineItems(Array.from(byId.values()));\n}\n\nfunction applyPage(\n\tstate: TimelineItemsState,\n\tconversationId: string,\n\tpage: Pick<\n\t\tConversationTimelineItemsState,\n\t\t\"items\" | \"hasNextPage\" | \"nextCursor\"\n\t>\n): TimelineItemsState {\n\tconst existing = state.conversations[conversationId];\n\tconst mergedItems = mergeTimelineItems(existing?.items ?? [], page.items);\n\n\tif (\n\t\texisting &&\n\t\texisting.items === mergedItems &&\n\t\texisting.hasNextPage === page.hasNextPage &&\n\t\texisting.nextCursor === page.nextCursor\n\t) {\n\t\treturn state;\n\t}\n\n\treturn {\n\t\t...state,\n\t\tconversations: {\n\t\t\t...state.conversations,\n\t\t\t[conversationId]: {\n\t\t\t\titems: mergedItems,\n\t\t\t\thasNextPage: page.hasNextPage,\n\t\t\t\tnextCursor: page.nextCursor,\n\t\t\t},\n\t\t},\n\t};\n}\n\nfunction applyTimelineItem(\n\tstate: TimelineItemsState,\n\titem: TimelineItem\n): TimelineItemsState {\n\tconst existing = state.conversations[item.conversationId];\n\tconst mergedItems = mergeTimelineItems(existing?.items ?? [], [item]);\n\n\tif (existing && existing.items === mergedItems) {\n\t\treturn state;\n\t}\n\n\treturn {\n\t\t...state,\n\t\tconversations: {\n\t\t\t...state.conversations,\n\t\t\t[item.conversationId]: {\n\t\t\t\titems: mergedItems,\n\t\t\t\thasNextPage: existing?.hasNextPage ?? false,\n\t\t\t\tnextCursor: existing?.nextCursor,\n\t\t\t},\n\t\t},\n\t};\n}\n\nfunction removeTimelineItem(\n\tstate: TimelineItemsState,\n\tconversationId: string,\n\titemId: string\n): TimelineItemsState {\n\tconst existing = state.conversations[conversationId];\n\tif (!existing) {\n\t\treturn state;\n\t}\n\n\tconst index = existing.items.findIndex((item) => item.id === itemId);\n\tif (index === -1) {\n\t\treturn state;\n\t}\n\n\tconst nextItems = existing.items\n\t\t.slice(0, index)\n\t\t.concat(existing.items.slice(index + 1));\n\n\tconst nextConversation: ConversationTimelineItemsState = {\n\t\t...existing,\n\t\titems: nextItems,\n\t};\n\n\treturn {\n\t\t...state,\n\t\tconversations: {\n\t\t\t...state.conversations,\n\t\t\t[conversationId]: nextConversation,\n\t\t},\n\t};\n}\n\nfunction finalizeTimelineItem(\n\tstate: TimelineItemsState,\n\tconversationId: string,\n\toptimisticId: string,\n\titem: TimelineItem\n): TimelineItemsState {\n\tconst withoutOptimistic = removeTimelineItem(\n\t\tstate,\n\t\tconversationId,\n\t\toptimisticId\n\t);\n\treturn applyTimelineItem(withoutOptimistic, item);\n}\n\n// Normalize timeline item created event\nfunction normalizeRealtimeTimelineItem(\n\tevent: TimelineItemCreatedEvent\n): TimelineItem {\n\tconst raw = event.payload.item;\n\n\tconst parsedParts = timelineItemPartsSchema.parse(raw.parts);\n\n\treturn {\n\t\tid: raw.id,\n\t\tconversationId: raw.conversationId,\n\t\torganizationId: raw.organizationId,\n\t\tvisibility: raw.visibility,\n\t\ttype: raw.type,\n\t\ttext: raw.text ?? null,\n\t\tparts: parsedParts,\n\t\ttool: raw.tool ?? null,\n\t\tuserId: raw.userId,\n\t\tvisitorId: raw.visitorId,\n\t\taiAgentId: raw.aiAgentId,\n\t\tcreatedAt: raw.createdAt,\n\t\tdeletedAt: raw.deletedAt ?? null,\n\t};\n}\n\nexport type TimelineItemsStore = Store<TimelineItemsState> & {\n\tingestPage(\n\t\tconversationId: string,\n\t\tpage: ConversationTimelineItemsState\n\t): void;\n\tingestTimelineItem(item: TimelineItem): void;\n\tingestRealtimeTimelineItem(event: TimelineItemCreatedEvent): TimelineItem;\n\tremoveTimelineItem(conversationId: string, itemId: string): void;\n\tfinalizeTimelineItem(\n\t\tconversationId: string,\n\t\toptimisticId: string,\n\t\titem: TimelineItem\n\t): void;\n\tclearConversation(conversationId: string): void;\n};\n\nexport function createTimelineItemsStore(\n\tinitialState: TimelineItemsState = INITIAL_STATE\n): TimelineItemsStore {\n\tconst store = createStore<TimelineItemsState>(initialState);\n\n\treturn {\n\t\t...store,\n\t\tingestPage(conversationId, page) {\n\t\t\tstore.setState((state) => applyPage(state, conversationId, page));\n\t\t},\n\t\tingestTimelineItem(item) {\n\t\t\tstore.setState((state) => applyTimelineItem(state, item));\n\t\t},\n\t\tingestRealtimeTimelineItem(event) {\n\t\t\tconst item = normalizeRealtimeTimelineItem(event);\n\t\t\tstore.setState((state) => applyTimelineItem(state, item));\n\t\t\treturn item;\n\t\t},\n\t\tremoveTimelineItem(conversationId, itemId) {\n\t\t\tstore.setState((state) =>\n\t\t\t\tremoveTimelineItem(state, conversationId, itemId)\n\t\t\t);\n\t\t},\n\t\tfinalizeTimelineItem(conversationId, optimisticId, item) {\n\t\t\tstore.setState((state) =>\n\t\t\t\tfinalizeTimelineItem(state, conversationId, optimisticId, item)\n\t\t\t);\n\t\t},\n\t\tclearConversation(conversationId) {\n\t\t\tstore.setState((state) => {\n\t\t\t\tif (!state.conversations[conversationId]) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\tconst { [conversationId]: _removed, ...rest } = state.conversations;\n\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\tconversations: rest,\n\t\t\t\t} satisfies TimelineItemsState;\n\t\t\t});\n\t\t},\n\t};\n}\n\nexport function getConversationTimelineItems(\n\tstore: Store<TimelineItemsState>,\n\tconversationId: string\n): ConversationTimelineItemsState | undefined {\n\treturn store.getState().conversations[conversationId];\n}\n"],"mappings":";;;;AAmBA,MAAMA,gBAAoC,EACzC,eAAe,EAAE,EACjB;AAED,SAAS,kBAAkB,OAAuC;AACjE,QAAO,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,UAAU,cAAc,EAAE,UAAU,CAAC;;AAGzE,SAAS,mBAAmB,GAAiB,GAA0B;AACtE,QACC,EAAE,OAAO,EAAE,MACX,EAAE,SAAS,EAAE,QACb,IAAI,KAAK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AAU,UAAU,kBAAkB,OAAO,KAAK,CAAC;;EAE1D,2BAA2B,OAAO;GACjC,MAAM,OAAO,8BAA8B,MAAM;AACjD,SAAM,UAAU,UAAU,kBAAkB,OAAO,KAAK,CAAC;AACzD,UAAO;;EAER,mBAAmB,gBAAgB,QAAQ;AAC1C,SAAM,UAAU,UACf,mBAAmB,OAAO,gBAAgB,OAAO,CACjD;;EAEF,qBAAqB,gBAAgB,cAAc,MAAM;AACxD,SAAM,UAAU,UACf,qBAAqB,OAAO,gBAAgB,cAAc,KAAK,CAC/D;;EAEF,kBAAkB,gBAAgB;AACjC,SAAM,UAAU,UAAU;AACzB,QAAI,CAAC,MAAM,cAAc,gBACxB,QAAO;IAGR,MAAM,GAAG,iBAAiB,SAAU,GAAG,SAAS,MAAM;AAEtD,WAAO;KACN,GAAG;KACH,eAAe;KACf;KACA;;EAEH;;AAGF,SAAgB,6BACf,OACA,gBAC6C;AAC7C,QAAO,MAAM,UAAU,CAAC,cAAc"}
|
package/timeline-item.d.ts
CHANGED
|
@@ -61,6 +61,13 @@ declare const timelineItemSchema: ZodObject<{
|
|
|
61
61
|
mediaType: ZodString;
|
|
62
62
|
fileName: ZodOptional<ZodString>;
|
|
63
63
|
size: ZodOptional<ZodNumber>;
|
|
64
|
+
}, $strip>, ZodObject<{
|
|
65
|
+
type: ZodLiteral<"metadata">;
|
|
66
|
+
source: ZodEnum<{
|
|
67
|
+
email: "email";
|
|
68
|
+
widget: "widget";
|
|
69
|
+
api: "api";
|
|
70
|
+
}>;
|
|
64
71
|
}, $strip>]>>;
|
|
65
72
|
userId: ZodNullable<ZodString>;
|
|
66
73
|
aiAgentId: ZodNullable<ZodString>;
|
|
@@ -131,6 +138,13 @@ declare const getConversationTimelineItemsResponseSchema: ZodObject<{
|
|
|
131
138
|
mediaType: ZodString;
|
|
132
139
|
fileName: ZodOptional<ZodString>;
|
|
133
140
|
size: ZodOptional<ZodNumber>;
|
|
141
|
+
}, $strip>, ZodObject<{
|
|
142
|
+
type: ZodLiteral<"metadata">;
|
|
143
|
+
source: ZodEnum<{
|
|
144
|
+
email: "email";
|
|
145
|
+
widget: "widget";
|
|
146
|
+
api: "api";
|
|
147
|
+
}>;
|
|
134
148
|
}, $strip>]>>;
|
|
135
149
|
userId: ZodNullable<ZodString>;
|
|
136
150
|
aiAgentId: ZodNullable<ZodString>;
|
|
@@ -191,6 +205,13 @@ declare const sendTimelineItemRequestSchema: ZodObject<{
|
|
|
191
205
|
mediaType: ZodString;
|
|
192
206
|
fileName: ZodOptional<ZodString>;
|
|
193
207
|
size: ZodOptional<ZodNumber>;
|
|
208
|
+
}, $strip>, ZodObject<{
|
|
209
|
+
type: ZodLiteral<"metadata">;
|
|
210
|
+
source: ZodEnum<{
|
|
211
|
+
email: "email";
|
|
212
|
+
widget: "widget";
|
|
213
|
+
api: "api";
|
|
214
|
+
}>;
|
|
194
215
|
}, $strip>]>>>;
|
|
195
216
|
visibility: ZodDefault<ZodEnum<{
|
|
196
217
|
public: "public";
|
|
@@ -260,6 +281,13 @@ declare const sendTimelineItemResponseSchema: ZodObject<{
|
|
|
260
281
|
mediaType: ZodString;
|
|
261
282
|
fileName: ZodOptional<ZodString>;
|
|
262
283
|
size: ZodOptional<ZodNumber>;
|
|
284
|
+
}, $strip>, ZodObject<{
|
|
285
|
+
type: ZodLiteral<"metadata">;
|
|
286
|
+
source: ZodEnum<{
|
|
287
|
+
email: "email";
|
|
288
|
+
widget: "widget";
|
|
289
|
+
api: "api";
|
|
290
|
+
}>;
|
|
263
291
|
}, $strip>]>>;
|
|
264
292
|
userId: ZodNullable<ZodString>;
|
|
265
293
|
aiAgentId: ZodNullable<ZodString>;
|
package/timeline-item.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-item.d.ts","names":[],"sources":["../../types/src/api/timeline-item.ts"],"sourcesContent":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"timeline-item.d.ts","names":[],"sources":["../../types/src/api/timeline-item.ts"],"sourcesContent":[],"mappings":";;;;;;;;cA4Ha,oBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFwB,SAAA,WAAA;EAAA,SAAA,aAAA,YAAA,UAAA,CAAA,CAAA;AAiBvD,CAAA,QAAY,CAAA;AAKC,KArDD,kBAAA,GAAqB,MAuG9B,CAAA,OAvG6C,kBAuG7C,CAAA;KArGS,YAAA,GAAe,cAAe;cAU7B,2CAAyC;;;;KAe1C,mCAAA,GAAsC,cAC1C;cAGK,4CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAsBb,GAAA,EAAA,KAAA;MAAA,CAAA,CAAA;IAoD9B,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA;IAIC,MAAA,aAAA,UAQV,CAAA;;;;;;;;;KArES,oCAAA,GAAuC,cAC3C;cAIK,+BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwDC,MAAA,aAAA,YAAA,UAAA,CAAA,CAAA;IAAA,SAAA,aAAA,YAAA,UAAA,CAAA,CAAA;IAU/B,SAAA,aAAwB,YAC5B,UAAA,CAAA,CAAA;;;;KAfI,uBAAA,GAA0B,cAC9B;cAGK,gCAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAU/B,wBAAA,GAA2B,cAC/B"}
|
package/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","names":["checks","$ZodConfig","errors","schemas","JSONType","JWTAlgorithm","HashAlgorithm","HashEncoding","HashFormat","IPVersion","MimeTypes","ParsedTypes","AssertEqual","V","T","U","AssertNotEqual","AssertExtends","IsAny","Omit","K","Exclude","Pick","OmitKeys","MakePartial","InexactPartial","MakeRequired","Required","Exactly","X","Record","NoUndefined","Whatever","LoosePartial","Mask","Keys","PropertyKey","Writeable","P","EmptyObject","BuiltIn","Symbol","toStringTag","Date","Error","Generator","Promise","RegExp","MakeReadonly","Map","ReadonlyMap","Set","ReadonlySet","Head","Tail","Array","ReadonlyArray","Readonly","SomeObject","Identity","Flatten","k","Mapped","Prettify","NoNeverKeys","NoNever","Extend","A","B","TupleItems","SomeType","AnyFunc","IsProp","MaybeAsync","KeyOf","OmitIndexSignature","ExtractIndexSignature","SchemaClass","EnumValue","EnumLike","ToEnum","KeysEnum","KeysArray","Literal","LiteralArray","Primitive","PrimitiveArray","HasSize","HasLength","Numeric","SafeParseResult","SafeParseSuccess","SafeParseError","$ZodError","PropValues","PrimitiveSet","assertEqual","assertNotEqual","assertIs","assertNever","assert","getEnumValues","joinValues","jsonStringifyReplacer","cached","nullish","cleanRegex","floatSafeRemainder","defineLazy","objectClone","assignProp","mergeDefs","cloneDef","$ZodType","getElementAtPath","promiseAllObject","Awaited","randomString","esc","captureStackTrace","Function","isObject","allowsEval","isPlainObject","shallowClone","numKeys","getParsedType","propertyKeyTypes","primitiveTypes","escapeRegex","clone","EmptyToNever","Normalize","normalizeParams","createTransparentProxy","stringifyPrimitive","optionalKeys","$ZodShape","CleanKey","ToCleanMap","$ZodLooseShape","FromCleanMap","NUMBER_FORMAT_RANGES","$ZodNumberFormats","BIGINT_FORMAT_RANGES","$ZodBigIntFormats","pick","$ZodObject","omit","extend","safeExtend","merge","partial","$ZodOptional","required","$ZodNonOptional","Constructor","Def","aborted","ParsePayload","prefixIssues","$ZodRawIssue","unwrapMessage","finalizeIssue","ParseContextInternal","$ZodIssue","getSizableOrigin","getLengthableOrigin","issue","cleanEnum","base64ToUint8Array","Uint8Array","InstanceType","uint8ArrayToBase64","base64urlToUint8Array","uint8ArrayToBase64url","hexToUint8Array","uint8ArrayToHex","Class"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/util.d.cts"],"sourcesContent":["import type * as checks from \"./checks.cjs\";\nimport type { $ZodConfig } from \"./core.cjs\";\nimport type * as errors from \"./errors.cjs\";\nimport type * as schemas from \"./schemas.cjs\";\nexport type JSONType = string | number | boolean | null | JSONType[] | {\n [key: string]: JSONType;\n};\nexport type JWTAlgorithm = \"HS256\" | \"HS384\" | \"HS512\" | \"RS256\" | \"RS384\" | \"RS512\" | \"ES256\" | \"ES384\" | \"ES512\" | \"PS256\" | \"PS384\" | \"PS512\" | \"EdDSA\" | (string & {});\nexport type HashAlgorithm = \"md5\" | \"sha1\" | \"sha256\" | \"sha384\" | \"sha512\";\nexport type HashEncoding = \"hex\" | \"base64\" | \"base64url\";\nexport type HashFormat = `${HashAlgorithm}_${HashEncoding}`;\nexport type IPVersion = \"v4\" | \"v6\";\nexport type MimeTypes = \"application/json\" | \"application/xml\" | \"application/x-www-form-urlencoded\" | \"application/javascript\" | \"application/pdf\" | \"application/zip\" | \"application/vnd.ms-excel\" | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\" | \"application/msword\" | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" | \"application/vnd.ms-powerpoint\" | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\" | \"application/octet-stream\" | \"application/graphql\" | \"text/html\" | \"text/plain\" | \"text/css\" | \"text/javascript\" | \"text/csv\" | \"image/png\" | \"image/jpeg\" | \"image/gif\" | \"image/svg+xml\" | \"image/webp\" | \"audio/mpeg\" | \"audio/ogg\" | \"audio/wav\" | \"audio/webm\" | \"video/mp4\" | \"video/webm\" | \"video/ogg\" | \"font/woff\" | \"font/woff2\" | \"font/ttf\" | \"font/otf\" | \"multipart/form-data\" | (string & {});\nexport type ParsedTypes = \"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"file\" | \"date\" | \"array\" | \"map\" | \"set\" | \"nan\" | \"null\" | \"promise\";\nexport type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;\nexport type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? false : true;\nexport type AssertExtends<T, U> = T extends U ? T : never;\nexport type IsAny<T> = 0 extends 1 & T ? true : false;\nexport type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\nexport type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;\nexport type MakePartial<T, K extends keyof T> = Omit<T, K> & InexactPartial<Pick<T, K>>;\nexport type MakeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;\nexport type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;\nexport type NoUndefined<T> = T extends undefined ? never : T;\nexport type Whatever = {} | undefined | null;\nexport type LoosePartial<T extends object> = InexactPartial<T> & {\n [k: string]: unknown;\n};\nexport type Mask<Keys extends PropertyKey> = {\n [K in Keys]?: true;\n};\nexport type Writeable<T> = {\n -readonly [P in keyof T]: T[P];\n} & {};\nexport type InexactPartial<T> = {\n [P in keyof T]?: T[P] | undefined;\n};\nexport type EmptyObject = Record<string, never>;\nexport type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {\n readonly [Symbol.toStringTag]: string;\n} | Date | Error | Generator | Promise<unknown> | RegExp;\nexport 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>;\nexport type SomeObject = Record<PropertyKey, any>;\nexport type Identity<T> = T;\nexport type Flatten<T> = Identity<{\n [k in keyof T]: T[k];\n}>;\nexport type Mapped<T> = {\n [k in keyof T]: T[k];\n};\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\nexport type NoNeverKeys<T> = {\n [k in keyof T]: [T[k]] extends [never] ? never : k;\n}[keyof T];\nexport type NoNever<T> = Identity<{\n [k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never;\n}>;\nexport type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : {\n [K in keyof A as K extends keyof B ? never : K]: A[K];\n} & {\n [K in keyof B]: B[K];\n}>;\nexport type TupleItems = ReadonlyArray<schemas.SomeType>;\nexport type AnyFunc = (...args: any[]) => any;\nexport type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;\nexport type MaybeAsync<T> = T | Promise<T>;\nexport type KeyOf<T> = keyof OmitIndexSignature<T>;\nexport type OmitIndexSignature<T> = {\n [K in keyof T as string extends K ? never : K extends string ? K : never]: T[K];\n};\nexport type ExtractIndexSignature<T> = {\n [K in keyof T as string extends K ? K : K extends string ? never : K]: T[K];\n};\nexport type Keys<T extends object> = keyof OmitIndexSignature<T>;\nexport type SchemaClass<T extends schemas.SomeType> = {\n new (def: T[\"_zod\"][\"def\"]): T;\n};\nexport type EnumValue = string | number;\nexport type EnumLike = Readonly<Record<string, EnumValue>>;\nexport type ToEnum<T extends EnumValue> = Flatten<{\n [k in T]: k;\n}>;\nexport type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;\nexport type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;\nexport type Literal = string | number | bigint | boolean | null | undefined;\nexport type LiteralArray = Array<Literal>;\nexport type Primitive = string | number | symbol | bigint | boolean | null | undefined;\nexport type PrimitiveArray = Array<Primitive>;\nexport type HasSize = {\n size: number;\n};\nexport type HasLength = {\n length: number;\n};\nexport type Numeric = number | bigint | Date;\nexport type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;\nexport type SafeParseSuccess<T> = {\n success: true;\n data: T;\n error?: never;\n};\nexport type SafeParseError<T> = {\n success: false;\n data?: never;\n error: errors.$ZodError<T>;\n};\nexport type PropValues = Record<string, Set<Primitive>>;\nexport type PrimitiveSet = Set<Primitive>;\nexport declare function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B>;\nexport declare function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B>;\nexport declare function assertIs<T>(_arg: T): void;\nexport declare function assertNever(_x: never): never;\nexport declare function assert<T>(_: any): asserts _ is T;\nexport declare function getEnumValues(entries: EnumLike): EnumValue[];\nexport declare function joinValues<T extends Primitive[]>(array: T, separator?: string): string;\nexport declare function jsonStringifyReplacer(_: string, value: any): any;\nexport declare function cached<T>(getter: () => T): {\n value: T;\n};\nexport declare function nullish(input: any): boolean;\nexport declare function cleanRegex(source: string): string;\nexport declare function floatSafeRemainder(val: number, step: number): number;\nexport declare function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void;\nexport declare function objectClone(obj: object): any;\nexport declare function assignProp<T extends object, K extends PropertyKey>(target: T, prop: K, value: K extends keyof T ? T[K] : any): void;\nexport declare function mergeDefs(...defs: Record<string, any>[]): any;\nexport declare function cloneDef(schema: schemas.$ZodType): any;\nexport declare function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any;\nexport declare function promiseAllObject<T extends object>(promisesObj: T): Promise<{\n [k in keyof T]: Awaited<T[k]>;\n}>;\nexport declare function randomString(length?: number): string;\nexport declare function esc(str: string): string;\nexport declare const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void;\nexport declare function isObject(data: any): data is Record<PropertyKey, unknown>;\nexport declare const allowsEval: {\n value: boolean;\n};\nexport declare function isPlainObject(o: any): o is Record<PropertyKey, unknown>;\nexport declare function shallowClone(o: any): any;\nexport declare function numKeys(data: any): number;\nexport declare const getParsedType: (data: any) => ParsedTypes;\nexport declare const propertyKeyTypes: Set<string>;\nexport declare const primitiveTypes: Set<string>;\nexport declare function escapeRegex(str: string): string;\nexport declare function clone<T extends schemas.$ZodType>(inst: T, def?: T[\"_zod\"][\"def\"], params?: {\n parent: boolean;\n}): T;\nexport type EmptyToNever<T> = keyof T extends never ? never : T;\nexport type Normalize<T> = T extends undefined ? never : T extends Record<any, any> ? Flatten<{\n [k in keyof Omit<T, \"error\" | \"message\">]: T[k];\n} & (\"error\" extends keyof T ? {\n error?: Exclude<T[\"error\"], string>;\n} : unknown)> : never;\nexport declare function normalizeParams<T>(_params: T): Normalize<T>;\nexport declare function createTransparentProxy<T extends object>(getter: () => T): T;\nexport declare function stringifyPrimitive(value: any): string;\nexport declare function optionalKeys(shape: schemas.$ZodShape): string[];\nexport type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;\nexport type ToCleanMap<T extends schemas.$ZodLooseShape> = {\n [k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k;\n};\nexport type FromCleanMap<T extends schemas.$ZodLooseShape> = {\n [k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k;\n};\nexport declare const NUMBER_FORMAT_RANGES: Record<checks.$ZodNumberFormats, [number, number]>;\nexport declare const BIGINT_FORMAT_RANGES: Record<checks.$ZodBigIntFormats, [bigint, bigint]>;\nexport declare function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>): any;\nexport declare function omit(schema: schemas.$ZodObject, mask: object): any;\nexport declare function extend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;\nexport declare function safeExtend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;\nexport declare function merge(a: schemas.$ZodObject, b: schemas.$ZodObject): any;\nexport declare function partial(Class: SchemaClass<schemas.$ZodOptional> | null, schema: schemas.$ZodObject, mask: object | undefined): any;\nexport declare function required(Class: SchemaClass<schemas.$ZodNonOptional>, schema: schemas.$ZodObject, mask: object | undefined): any;\nexport type Constructor<T, Def extends any[] = any[]> = new (...args: Def) => T;\nexport declare function aborted(x: schemas.ParsePayload, startIndex?: number): boolean;\nexport declare function prefixIssues(path: PropertyKey, issues: errors.$ZodRawIssue[]): errors.$ZodRawIssue[];\nexport declare function unwrapMessage(message: string | {\n message: string;\n} | undefined | null): string | undefined;\nexport declare function finalizeIssue(iss: errors.$ZodRawIssue, ctx: schemas.ParseContextInternal | undefined, config: $ZodConfig): errors.$ZodIssue;\nexport declare function getSizableOrigin(input: any): \"set\" | \"map\" | \"file\" | \"unknown\";\nexport declare function getLengthableOrigin(input: any): \"array\" | \"string\" | \"unknown\";\nexport declare function issue(_iss: string, input: any, inst: any): errors.$ZodRawIssue;\nexport declare function issue(_iss: errors.$ZodRawIssue): errors.$ZodRawIssue;\nexport declare function cleanEnum(obj: Record<string, EnumValue>): EnumValue[];\nexport declare function base64ToUint8Array(base64: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToBase64(bytes: Uint8Array): string;\nexport declare function base64urlToUint8Array(base64url: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToBase64url(bytes: Uint8Array): string;\nexport declare function hexToUint8Array(hex: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToHex(bytes: Uint8Array): string;\nexport declare abstract class Class {\n constructor(..._args: any[]);\n}\n"],"x_google_ignoreList":[0],"mappings":";;AAkBkEoB,KAXtDf,YAAAA,GAWsDe,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,CAAAA,MAAAA,GAAAA,CAAAA,CAAAA,CAAAA;AAEkBA,KAHxEF,KAGwEE,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,SAAAA,CAAAA,GAH/CN,CAG+CM,GAAAA,IAAAA,GAAAA,KAAAA;AAARE,KAFhEH,IAEgEG,CAAAA,CAAAA,EAAAA,YAAAA,MAFxCR,CAEwCQ,CAAAA,GAFnCA,IAEmCA,CAF9BR,CAE8BQ,EAF3BD,OAE2BC,CAAAA,MAFbR,CAEaQ,EAFVF,GAEUE,CAAAA,CAAAA;AAAD,KAA/DE,WAA+D,CAAA,CAAA,EAAA,YAAA,MAAhCV,C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Config","errors","schemas","JSONType","JWTAlgorithm","HashAlgorithm","HashEncoding","HashFormat","IPVersion","MimeTypes","ParsedTypes","AssertEqual","V","T","U","AssertNotEqual","AssertExtends","IsAny","Omit","K","Exclude","Pick","OmitKeys","MakePartial","InexactPartial","MakeRequired","Required","Exactly","X","Record","NoUndefined","Whatever","LoosePartial","Mask","Keys","PropertyKey","Writeable","P","EmptyObject","BuiltIn","Symbol","toStringTag","Date","Error","Generator","Promise","RegExp","MakeReadonly","Map","ReadonlyMap","Set","ReadonlySet","Head","Tail","Array","ReadonlyArray","Readonly","SomeObject","Identity","Flatten","k","Mapped","Prettify","NoNeverKeys","NoNever","Extend","A","B","TupleItems","SomeType","AnyFunc","IsProp","MaybeAsync","KeyOf","OmitIndexSignature","ExtractIndexSignature","SchemaClass","EnumValue","EnumLike","ToEnum","KeysEnum","KeysArray","Literal","LiteralArray","Primitive","PrimitiveArray","HasSize","HasLength","Numeric","SafeParseResult","SafeParseSuccess","SafeParseError","$ZodError","PropValues","PrimitiveSet","assertEqual","assertNotEqual","assertIs","assertNever","assert","getEnumValues","joinValues","jsonStringifyReplacer","cached","nullish","cleanRegex","floatSafeRemainder","defineLazy","objectClone","assignProp","mergeDefs","cloneDef","$ZodType","getElementAtPath","promiseAllObject","Awaited","randomString","esc","captureStackTrace","Function","isObject","allowsEval","isPlainObject","shallowClone","numKeys","getParsedType","propertyKeyTypes","primitiveTypes","escapeRegex","clone","EmptyToNever","Normalize","normalizeParams","createTransparentProxy","stringifyPrimitive","optionalKeys","$ZodShape","CleanKey","ToCleanMap","$ZodLooseShape","FromCleanMap","NUMBER_FORMAT_RANGES","$ZodNumberFormats","BIGINT_FORMAT_RANGES","$ZodBigIntFormats","pick","$ZodObject","omit","extend","safeExtend","merge","partial","$ZodOptional","required","$ZodNonOptional","Constructor","Def","aborted","ParsePayload","prefixIssues","$ZodRawIssue","unwrapMessage","finalizeIssue","ParseContextInternal","$ZodIssue","getSizableOrigin","getLengthableOrigin","issue","cleanEnum","base64ToUint8Array","Uint8Array","InstanceType","uint8ArrayToBase64","base64urlToUint8Array","uint8ArrayToBase64url","hexToUint8Array","uint8ArrayToHex","Class"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/util.d.cts"],"sourcesContent":["import type * as checks from \"./checks.cjs\";\nimport type { $ZodConfig } from \"./core.cjs\";\nimport type * as errors from \"./errors.cjs\";\nimport type * as schemas from \"./schemas.cjs\";\nexport type JSONType = string | number | boolean | null | JSONType[] | {\n [key: string]: JSONType;\n};\nexport type JWTAlgorithm = \"HS256\" | \"HS384\" | \"HS512\" | \"RS256\" | \"RS384\" | \"RS512\" | \"ES256\" | \"ES384\" | \"ES512\" | \"PS256\" | \"PS384\" | \"PS512\" | \"EdDSA\" | (string & {});\nexport type HashAlgorithm = \"md5\" | \"sha1\" | \"sha256\" | \"sha384\" | \"sha512\";\nexport type HashEncoding = \"hex\" | \"base64\" | \"base64url\";\nexport type HashFormat = `${HashAlgorithm}_${HashEncoding}`;\nexport type IPVersion = \"v4\" | \"v6\";\nexport type MimeTypes = \"application/json\" | \"application/xml\" | \"application/x-www-form-urlencoded\" | \"application/javascript\" | \"application/pdf\" | \"application/zip\" | \"application/vnd.ms-excel\" | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\" | \"application/msword\" | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" | \"application/vnd.ms-powerpoint\" | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\" | \"application/octet-stream\" | \"application/graphql\" | \"text/html\" | \"text/plain\" | \"text/css\" | \"text/javascript\" | \"text/csv\" | \"image/png\" | \"image/jpeg\" | \"image/gif\" | \"image/svg+xml\" | \"image/webp\" | \"audio/mpeg\" | \"audio/ogg\" | \"audio/wav\" | \"audio/webm\" | \"video/mp4\" | \"video/webm\" | \"video/ogg\" | \"font/woff\" | \"font/woff2\" | \"font/ttf\" | \"font/otf\" | \"multipart/form-data\" | (string & {});\nexport type ParsedTypes = \"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"file\" | \"date\" | \"array\" | \"map\" | \"set\" | \"nan\" | \"null\" | \"promise\";\nexport type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;\nexport type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? false : true;\nexport type AssertExtends<T, U> = T extends U ? T : never;\nexport type IsAny<T> = 0 extends 1 & T ? true : false;\nexport type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\nexport type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;\nexport type MakePartial<T, K extends keyof T> = Omit<T, K> & InexactPartial<Pick<T, K>>;\nexport type MakeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;\nexport type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;\nexport type NoUndefined<T> = T extends undefined ? never : T;\nexport type Whatever = {} | undefined | null;\nexport type LoosePartial<T extends object> = InexactPartial<T> & {\n [k: string]: unknown;\n};\nexport type Mask<Keys extends PropertyKey> = {\n [K in Keys]?: true;\n};\nexport type Writeable<T> = {\n -readonly [P in keyof T]: T[P];\n} & {};\nexport type InexactPartial<T> = {\n [P in keyof T]?: T[P] | undefined;\n};\nexport type EmptyObject = Record<string, never>;\nexport type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {\n readonly [Symbol.toStringTag]: string;\n} | Date | Error | Generator | Promise<unknown> | RegExp;\nexport 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>;\nexport type SomeObject = Record<PropertyKey, any>;\nexport type Identity<T> = T;\nexport type Flatten<T> = Identity<{\n [k in keyof T]: T[k];\n}>;\nexport type Mapped<T> = {\n [k in keyof T]: T[k];\n};\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\nexport type NoNeverKeys<T> = {\n [k in keyof T]: [T[k]] extends [never] ? never : k;\n}[keyof T];\nexport type NoNever<T> = Identity<{\n [k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never;\n}>;\nexport type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : {\n [K in keyof A as K extends keyof B ? never : K]: A[K];\n} & {\n [K in keyof B]: B[K];\n}>;\nexport type TupleItems = ReadonlyArray<schemas.SomeType>;\nexport type AnyFunc = (...args: any[]) => any;\nexport type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;\nexport type MaybeAsync<T> = T | Promise<T>;\nexport type KeyOf<T> = keyof OmitIndexSignature<T>;\nexport type OmitIndexSignature<T> = {\n [K in keyof T as string extends K ? never : K extends string ? K : never]: T[K];\n};\nexport type ExtractIndexSignature<T> = {\n [K in keyof T as string extends K ? K : K extends string ? never : K]: T[K];\n};\nexport type Keys<T extends object> = keyof OmitIndexSignature<T>;\nexport type SchemaClass<T extends schemas.SomeType> = {\n new (def: T[\"_zod\"][\"def\"]): T;\n};\nexport type EnumValue = string | number;\nexport type EnumLike = Readonly<Record<string, EnumValue>>;\nexport type ToEnum<T extends EnumValue> = Flatten<{\n [k in T]: k;\n}>;\nexport type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;\nexport type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;\nexport type Literal = string | number | bigint | boolean | null | undefined;\nexport type LiteralArray = Array<Literal>;\nexport type Primitive = string | number | symbol | bigint | boolean | null | undefined;\nexport type PrimitiveArray = Array<Primitive>;\nexport type HasSize = {\n size: number;\n};\nexport type HasLength = {\n length: number;\n};\nexport type Numeric = number | bigint | Date;\nexport type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;\nexport type SafeParseSuccess<T> = {\n success: true;\n data: T;\n error?: never;\n};\nexport type SafeParseError<T> = {\n success: false;\n data?: never;\n error: errors.$ZodError<T>;\n};\nexport type PropValues = Record<string, Set<Primitive>>;\nexport type PrimitiveSet = Set<Primitive>;\nexport declare function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B>;\nexport declare function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B>;\nexport declare function assertIs<T>(_arg: T): void;\nexport declare function assertNever(_x: never): never;\nexport declare function assert<T>(_: any): asserts _ is T;\nexport declare function getEnumValues(entries: EnumLike): EnumValue[];\nexport declare function joinValues<T extends Primitive[]>(array: T, separator?: string): string;\nexport declare function jsonStringifyReplacer(_: string, value: any): any;\nexport declare function cached<T>(getter: () => T): {\n value: T;\n};\nexport declare function nullish(input: any): boolean;\nexport declare function cleanRegex(source: string): string;\nexport declare function floatSafeRemainder(val: number, step: number): number;\nexport declare function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void;\nexport declare function objectClone(obj: object): any;\nexport declare function assignProp<T extends object, K extends PropertyKey>(target: T, prop: K, value: K extends keyof T ? T[K] : any): void;\nexport declare function mergeDefs(...defs: Record<string, any>[]): any;\nexport declare function cloneDef(schema: schemas.$ZodType): any;\nexport declare function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any;\nexport declare function promiseAllObject<T extends object>(promisesObj: T): Promise<{\n [k in keyof T]: Awaited<T[k]>;\n}>;\nexport declare function randomString(length?: number): string;\nexport declare function esc(str: string): string;\nexport declare const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void;\nexport declare function isObject(data: any): data is Record<PropertyKey, unknown>;\nexport declare const allowsEval: {\n value: boolean;\n};\nexport declare function isPlainObject(o: any): o is Record<PropertyKey, unknown>;\nexport declare function shallowClone(o: any): any;\nexport declare function numKeys(data: any): number;\nexport declare const getParsedType: (data: any) => ParsedTypes;\nexport declare const propertyKeyTypes: Set<string>;\nexport declare const primitiveTypes: Set<string>;\nexport declare function escapeRegex(str: string): string;\nexport declare function clone<T extends schemas.$ZodType>(inst: T, def?: T[\"_zod\"][\"def\"], params?: {\n parent: boolean;\n}): T;\nexport type EmptyToNever<T> = keyof T extends never ? never : T;\nexport type Normalize<T> = T extends undefined ? never : T extends Record<any, any> ? Flatten<{\n [k in keyof Omit<T, \"error\" | \"message\">]: T[k];\n} & (\"error\" extends keyof T ? {\n error?: Exclude<T[\"error\"], string>;\n} : unknown)> : never;\nexport declare function normalizeParams<T>(_params: T): Normalize<T>;\nexport declare function createTransparentProxy<T extends object>(getter: () => T): T;\nexport declare function stringifyPrimitive(value: any): string;\nexport declare function optionalKeys(shape: schemas.$ZodShape): string[];\nexport type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;\nexport type ToCleanMap<T extends schemas.$ZodLooseShape> = {\n [k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k;\n};\nexport type FromCleanMap<T extends schemas.$ZodLooseShape> = {\n [k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k;\n};\nexport declare const NUMBER_FORMAT_RANGES: Record<checks.$ZodNumberFormats, [number, number]>;\nexport declare const BIGINT_FORMAT_RANGES: Record<checks.$ZodBigIntFormats, [bigint, bigint]>;\nexport declare function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>): any;\nexport declare function omit(schema: schemas.$ZodObject, mask: object): any;\nexport declare function extend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;\nexport declare function safeExtend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;\nexport declare function merge(a: schemas.$ZodObject, b: schemas.$ZodObject): any;\nexport declare function partial(Class: SchemaClass<schemas.$ZodOptional> | null, schema: schemas.$ZodObject, mask: object | undefined): any;\nexport declare function required(Class: SchemaClass<schemas.$ZodNonOptional>, schema: schemas.$ZodObject, mask: object | undefined): any;\nexport type Constructor<T, Def extends any[] = any[]> = new (...args: Def) => T;\nexport declare function aborted(x: schemas.ParsePayload, startIndex?: number): boolean;\nexport declare function prefixIssues(path: PropertyKey, issues: errors.$ZodRawIssue[]): errors.$ZodRawIssue[];\nexport declare function unwrapMessage(message: string | {\n message: string;\n} | undefined | null): string | undefined;\nexport declare function finalizeIssue(iss: errors.$ZodRawIssue, ctx: schemas.ParseContextInternal | undefined, config: $ZodConfig): errors.$ZodIssue;\nexport declare function getSizableOrigin(input: any): \"set\" | \"map\" | \"file\" | \"unknown\";\nexport declare function getLengthableOrigin(input: any): \"array\" | \"string\" | \"unknown\";\nexport declare function issue(_iss: string, input: any, inst: any): errors.$ZodRawIssue;\nexport declare function issue(_iss: errors.$ZodRawIssue): errors.$ZodRawIssue;\nexport declare function cleanEnum(obj: Record<string, EnumValue>): EnumValue[];\nexport declare function base64ToUint8Array(base64: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToBase64(bytes: Uint8Array): string;\nexport declare function base64urlToUint8Array(base64url: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToBase64url(bytes: Uint8Array): string;\nexport declare function hexToUint8Array(hex: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToHex(bytes: Uint8Array): string;\nexport declare abstract class Class {\n constructor(..._args: any[]);\n}\n"],"x_google_ignoreList":[0],"mappings":";;AAkBkEoB,KAXtDf,YAAAA,GAWsDe,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,CAAAA,MAAAA,GAAAA,CAAAA,CAAAA,CAAAA;AAEkBA,KAHxEF,KAGwEE,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,SAAAA,CAAAA,GAH/CN,CAG+CM,GAAAA,IAAAA,GAAAA,KAAAA;AAARE,KAFhEH,IAEgEG,CAAAA,CAAAA,EAAAA,YAAAA,MAFxCR,CAEwCQ,C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