@cossistant/core 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/api.d.ts +71 -0
  2. package/api.d.ts.map +1 -0
  3. package/checks.d.ts +189 -0
  4. package/checks.d.ts.map +1 -0
  5. package/client.d.ts +16 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js +1 -1
  8. package/coerce.d.ts +9 -0
  9. package/coerce.d.ts.map +1 -0
  10. package/contact.d.ts +31 -0
  11. package/contact.d.ts.map +1 -0
  12. package/conversation.d.ts +436 -0
  13. package/conversation.d.ts.map +1 -0
  14. package/core.d.ts +35 -0
  15. package/core.d.ts.map +1 -0
  16. package/errors.d.ts +121 -0
  17. package/errors.d.ts.map +1 -0
  18. package/errors2.d.ts +24 -0
  19. package/errors2.d.ts.map +1 -0
  20. package/index2.d.ts +4 -0
  21. package/index3.d.ts +1 -0
  22. package/metadata.d.ts +1 -0
  23. package/openapi-generator.d.ts +1 -0
  24. package/openapi-generator2.d.ts +1 -0
  25. package/openapi-generator3.d.ts +1 -0
  26. package/openapi30.d.ts +125 -0
  27. package/openapi30.d.ts.map +1 -0
  28. package/openapi31.d.ts +131 -0
  29. package/openapi31.d.ts.map +1 -0
  30. package/package.json +1 -1
  31. package/packages/types/src/enums.js.map +1 -0
  32. package/parse.d.ts +17 -0
  33. package/parse.d.ts.map +1 -0
  34. package/realtime-events.d.ts +358 -0
  35. package/realtime-events.d.ts.map +1 -0
  36. package/registries.d.ts +32 -0
  37. package/registries.d.ts.map +1 -0
  38. package/rest-client.d.ts +3 -1
  39. package/rest-client.d.ts.map +1 -1
  40. package/rest-client.js +1 -1
  41. package/rest-client.js.map +1 -1
  42. package/schemas.d.ts +673 -0
  43. package/schemas.d.ts.map +1 -0
  44. package/schemas2.d.ts +320 -0
  45. package/schemas2.d.ts.map +1 -0
  46. package/schemas3.d.ts +98 -0
  47. package/schemas3.d.ts.map +1 -0
  48. package/specification-extension.d.ts +9 -0
  49. package/specification-extension.d.ts.map +1 -0
  50. package/standard-schema.d.ts +59 -0
  51. package/standard-schema.d.ts.map +1 -0
  52. package/store/conversations-store.d.ts +1 -0
  53. package/store/conversations-store.d.ts.map +1 -1
  54. package/store/seen-store.d.ts +2 -0
  55. package/store/seen-store.d.ts.map +1 -1
  56. package/store/timeline-items-store.d.ts +1 -0
  57. package/store/timeline-items-store.d.ts.map +1 -1
  58. package/store/typing-store.d.ts +1 -0
  59. package/store/typing-store.d.ts.map +1 -1
  60. package/timeline-item.d.ts +274 -0
  61. package/timeline-item.d.ts.map +1 -0
  62. package/util.d.ts +41 -0
  63. package/util.d.ts.map +1 -0
  64. package/versions.d.ts +9 -0
  65. package/versions.d.ts.map +1 -0
  66. package/zod-extensions.d.ts +39 -0
  67. package/zod-extensions.d.ts.map +1 -0
  68. package/types/src/enums.js.map +0 -1
  69. /package/{types → packages/types}/src/enums.js +0 -0
@@ -0,0 +1,436 @@
1
+ import { $strip } from "./schemas.js";
2
+ import { output } from "./core.js";
3
+ import { ZodArray, ZodBoolean, ZodDefault, ZodEnum, ZodLiteral, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodString, ZodUnion } from "./schemas2.js";
4
+ import { ZodCoercedNumber } from "./coerce.js";
5
+ import "./index3.js";
6
+
7
+ //#region ../types/src/api/conversation.d.ts
8
+ declare const createConversationRequestSchema: ZodObject<{
9
+ visitorId: ZodOptional<ZodString>;
10
+ conversationId: ZodOptional<ZodString>;
11
+ defaultTimelineItems: ZodArray<ZodObject<{
12
+ id: ZodOptional<ZodString>;
13
+ conversationId: ZodString;
14
+ organizationId: ZodString;
15
+ visibility: ZodEnum<{
16
+ public: "public";
17
+ private: "private";
18
+ }>;
19
+ type: ZodEnum<{
20
+ message: "message";
21
+ event: "event";
22
+ identification: "identification";
23
+ }>;
24
+ text: ZodNullable<ZodString>;
25
+ tool: ZodOptional<ZodNullable<ZodString>>;
26
+ parts: ZodArray<ZodUnion<readonly [ZodObject<{
27
+ type: ZodLiteral<"text">;
28
+ text: ZodString;
29
+ }, $strip>, ZodObject<{
30
+ type: ZodLiteral<"event">;
31
+ eventType: ZodEnum<{
32
+ resolved: "resolved";
33
+ assigned: "assigned";
34
+ unassigned: "unassigned";
35
+ participant_requested: "participant_requested";
36
+ participant_joined: "participant_joined";
37
+ participant_left: "participant_left";
38
+ status_changed: "status_changed";
39
+ priority_changed: "priority_changed";
40
+ tag_added: "tag_added";
41
+ tag_removed: "tag_removed";
42
+ reopened: "reopened";
43
+ visitor_blocked: "visitor_blocked";
44
+ visitor_unblocked: "visitor_unblocked";
45
+ visitor_identified: "visitor_identified";
46
+ }>;
47
+ actorUserId: ZodNullable<ZodString>;
48
+ actorAiAgentId: ZodNullable<ZodString>;
49
+ targetUserId: ZodNullable<ZodString>;
50
+ targetAiAgentId: ZodNullable<ZodString>;
51
+ message: ZodOptional<ZodNullable<ZodString>>;
52
+ }, $strip>, ZodObject<{
53
+ type: ZodLiteral<"image">;
54
+ url: ZodString;
55
+ mediaType: ZodString;
56
+ fileName: ZodOptional<ZodString>;
57
+ size: ZodOptional<ZodNumber>;
58
+ width: ZodOptional<ZodNumber>;
59
+ height: ZodOptional<ZodNumber>;
60
+ }, $strip>, ZodObject<{
61
+ type: ZodLiteral<"file">;
62
+ url: ZodString;
63
+ mediaType: ZodString;
64
+ fileName: ZodOptional<ZodString>;
65
+ size: ZodOptional<ZodNumber>;
66
+ }, $strip>]>>;
67
+ userId: ZodNullable<ZodString>;
68
+ aiAgentId: ZodNullable<ZodString>;
69
+ visitorId: ZodNullable<ZodString>;
70
+ createdAt: ZodString;
71
+ deletedAt: ZodOptional<ZodNullable<ZodString>>;
72
+ }, $strip>>;
73
+ channel: ZodDefault<ZodString>;
74
+ }, $strip>;
75
+ type CreateConversationRequestBody = output<typeof createConversationRequestSchema>;
76
+ declare const createConversationResponseSchema: ZodObject<{
77
+ initialTimelineItems: ZodArray<ZodObject<{
78
+ id: ZodOptional<ZodString>;
79
+ conversationId: ZodString;
80
+ organizationId: ZodString;
81
+ visibility: ZodEnum<{
82
+ public: "public";
83
+ private: "private";
84
+ }>;
85
+ type: ZodEnum<{
86
+ message: "message";
87
+ event: "event";
88
+ identification: "identification";
89
+ }>;
90
+ text: ZodNullable<ZodString>;
91
+ tool: ZodOptional<ZodNullable<ZodString>>;
92
+ parts: ZodArray<ZodUnion<readonly [ZodObject<{
93
+ type: ZodLiteral<"text">;
94
+ text: ZodString;
95
+ }, $strip>, ZodObject<{
96
+ type: ZodLiteral<"event">;
97
+ eventType: ZodEnum<{
98
+ resolved: "resolved";
99
+ assigned: "assigned";
100
+ unassigned: "unassigned";
101
+ participant_requested: "participant_requested";
102
+ participant_joined: "participant_joined";
103
+ participant_left: "participant_left";
104
+ status_changed: "status_changed";
105
+ priority_changed: "priority_changed";
106
+ tag_added: "tag_added";
107
+ tag_removed: "tag_removed";
108
+ reopened: "reopened";
109
+ visitor_blocked: "visitor_blocked";
110
+ visitor_unblocked: "visitor_unblocked";
111
+ visitor_identified: "visitor_identified";
112
+ }>;
113
+ actorUserId: ZodNullable<ZodString>;
114
+ actorAiAgentId: ZodNullable<ZodString>;
115
+ targetUserId: ZodNullable<ZodString>;
116
+ targetAiAgentId: ZodNullable<ZodString>;
117
+ message: ZodOptional<ZodNullable<ZodString>>;
118
+ }, $strip>, ZodObject<{
119
+ type: ZodLiteral<"image">;
120
+ url: ZodString;
121
+ mediaType: ZodString;
122
+ fileName: ZodOptional<ZodString>;
123
+ size: ZodOptional<ZodNumber>;
124
+ width: ZodOptional<ZodNumber>;
125
+ height: ZodOptional<ZodNumber>;
126
+ }, $strip>, ZodObject<{
127
+ type: ZodLiteral<"file">;
128
+ url: ZodString;
129
+ mediaType: ZodString;
130
+ fileName: ZodOptional<ZodString>;
131
+ size: ZodOptional<ZodNumber>;
132
+ }, $strip>]>>;
133
+ userId: ZodNullable<ZodString>;
134
+ aiAgentId: ZodNullable<ZodString>;
135
+ visitorId: ZodNullable<ZodString>;
136
+ createdAt: ZodString;
137
+ deletedAt: ZodOptional<ZodNullable<ZodString>>;
138
+ }, $strip>>;
139
+ conversation: ZodObject<{
140
+ id: ZodString;
141
+ title: ZodOptional<ZodString>;
142
+ createdAt: ZodString;
143
+ updatedAt: ZodString;
144
+ visitorId: ZodString;
145
+ websiteId: ZodString;
146
+ status: ZodDefault<ZodEnum<{
147
+ open: "open";
148
+ resolved: "resolved";
149
+ spam: "spam";
150
+ }>>;
151
+ deletedAt: ZodDefault<ZodNullable<ZodString>>;
152
+ lastTimelineItem: ZodOptional<ZodObject<{
153
+ id: ZodOptional<ZodString>;
154
+ conversationId: ZodString;
155
+ organizationId: ZodString;
156
+ visibility: ZodEnum<{
157
+ public: "public";
158
+ private: "private";
159
+ }>;
160
+ type: ZodEnum<{
161
+ message: "message";
162
+ event: "event";
163
+ identification: "identification";
164
+ }>;
165
+ text: ZodNullable<ZodString>;
166
+ tool: ZodOptional<ZodNullable<ZodString>>;
167
+ parts: ZodArray<ZodUnion<readonly [ZodObject<{
168
+ type: ZodLiteral<"text">;
169
+ text: ZodString;
170
+ }, $strip>, ZodObject<{
171
+ type: ZodLiteral<"event">;
172
+ eventType: ZodEnum<{
173
+ resolved: "resolved";
174
+ assigned: "assigned";
175
+ unassigned: "unassigned";
176
+ participant_requested: "participant_requested";
177
+ participant_joined: "participant_joined";
178
+ participant_left: "participant_left";
179
+ status_changed: "status_changed";
180
+ priority_changed: "priority_changed";
181
+ tag_added: "tag_added";
182
+ tag_removed: "tag_removed";
183
+ reopened: "reopened";
184
+ visitor_blocked: "visitor_blocked";
185
+ visitor_unblocked: "visitor_unblocked";
186
+ visitor_identified: "visitor_identified";
187
+ }>;
188
+ actorUserId: ZodNullable<ZodString>;
189
+ actorAiAgentId: ZodNullable<ZodString>;
190
+ targetUserId: ZodNullable<ZodString>;
191
+ targetAiAgentId: ZodNullable<ZodString>;
192
+ message: ZodOptional<ZodNullable<ZodString>>;
193
+ }, $strip>, ZodObject<{
194
+ type: ZodLiteral<"image">;
195
+ url: ZodString;
196
+ mediaType: ZodString;
197
+ fileName: ZodOptional<ZodString>;
198
+ size: ZodOptional<ZodNumber>;
199
+ width: ZodOptional<ZodNumber>;
200
+ height: ZodOptional<ZodNumber>;
201
+ }, $strip>, ZodObject<{
202
+ type: ZodLiteral<"file">;
203
+ url: ZodString;
204
+ mediaType: ZodString;
205
+ fileName: ZodOptional<ZodString>;
206
+ size: ZodOptional<ZodNumber>;
207
+ }, $strip>]>>;
208
+ userId: ZodNullable<ZodString>;
209
+ aiAgentId: ZodNullable<ZodString>;
210
+ visitorId: ZodNullable<ZodString>;
211
+ createdAt: ZodString;
212
+ deletedAt: ZodOptional<ZodNullable<ZodString>>;
213
+ }, $strip>>;
214
+ }, $strip>;
215
+ }, $strip>;
216
+ type CreateConversationResponseBody = output<typeof createConversationResponseSchema>;
217
+ declare const listConversationsRequestSchema: ZodObject<{
218
+ visitorId: ZodOptional<ZodString>;
219
+ page: ZodDefault<ZodCoercedNumber<unknown>>;
220
+ limit: ZodDefault<ZodCoercedNumber<unknown>>;
221
+ status: ZodOptional<ZodEnum<{
222
+ open: "open";
223
+ closed: "closed";
224
+ }>>;
225
+ orderBy: ZodDefault<ZodEnum<{
226
+ createdAt: "createdAt";
227
+ updatedAt: "updatedAt";
228
+ }>>;
229
+ order: ZodDefault<ZodEnum<{
230
+ asc: "asc";
231
+ desc: "desc";
232
+ }>>;
233
+ }, $strip>;
234
+ type ListConversationsRequest = output<typeof listConversationsRequestSchema>;
235
+ declare const listConversationsResponseSchema: ZodObject<{
236
+ conversations: ZodArray<ZodObject<{
237
+ id: ZodString;
238
+ title: ZodOptional<ZodString>;
239
+ createdAt: ZodString;
240
+ updatedAt: ZodString;
241
+ visitorId: ZodString;
242
+ websiteId: ZodString;
243
+ status: ZodDefault<ZodEnum<{
244
+ open: "open";
245
+ resolved: "resolved";
246
+ spam: "spam";
247
+ }>>;
248
+ deletedAt: ZodDefault<ZodNullable<ZodString>>;
249
+ lastTimelineItem: ZodOptional<ZodObject<{
250
+ id: ZodOptional<ZodString>;
251
+ conversationId: ZodString;
252
+ organizationId: ZodString;
253
+ visibility: ZodEnum<{
254
+ public: "public";
255
+ private: "private";
256
+ }>;
257
+ type: ZodEnum<{
258
+ message: "message";
259
+ event: "event";
260
+ identification: "identification";
261
+ }>;
262
+ text: ZodNullable<ZodString>;
263
+ tool: ZodOptional<ZodNullable<ZodString>>;
264
+ parts: ZodArray<ZodUnion<readonly [ZodObject<{
265
+ type: ZodLiteral<"text">;
266
+ text: ZodString;
267
+ }, $strip>, ZodObject<{
268
+ type: ZodLiteral<"event">;
269
+ eventType: ZodEnum<{
270
+ resolved: "resolved";
271
+ assigned: "assigned";
272
+ unassigned: "unassigned";
273
+ participant_requested: "participant_requested";
274
+ participant_joined: "participant_joined";
275
+ participant_left: "participant_left";
276
+ status_changed: "status_changed";
277
+ priority_changed: "priority_changed";
278
+ tag_added: "tag_added";
279
+ tag_removed: "tag_removed";
280
+ reopened: "reopened";
281
+ visitor_blocked: "visitor_blocked";
282
+ visitor_unblocked: "visitor_unblocked";
283
+ visitor_identified: "visitor_identified";
284
+ }>;
285
+ actorUserId: ZodNullable<ZodString>;
286
+ actorAiAgentId: ZodNullable<ZodString>;
287
+ targetUserId: ZodNullable<ZodString>;
288
+ targetAiAgentId: ZodNullable<ZodString>;
289
+ message: ZodOptional<ZodNullable<ZodString>>;
290
+ }, $strip>, ZodObject<{
291
+ type: ZodLiteral<"image">;
292
+ url: ZodString;
293
+ mediaType: ZodString;
294
+ fileName: ZodOptional<ZodString>;
295
+ size: ZodOptional<ZodNumber>;
296
+ width: ZodOptional<ZodNumber>;
297
+ height: ZodOptional<ZodNumber>;
298
+ }, $strip>, ZodObject<{
299
+ type: ZodLiteral<"file">;
300
+ url: ZodString;
301
+ mediaType: ZodString;
302
+ fileName: ZodOptional<ZodString>;
303
+ size: ZodOptional<ZodNumber>;
304
+ }, $strip>]>>;
305
+ userId: ZodNullable<ZodString>;
306
+ aiAgentId: ZodNullable<ZodString>;
307
+ visitorId: ZodNullable<ZodString>;
308
+ createdAt: ZodString;
309
+ deletedAt: ZodOptional<ZodNullable<ZodString>>;
310
+ }, $strip>>;
311
+ }, $strip>>;
312
+ pagination: ZodObject<{
313
+ page: ZodNumber;
314
+ limit: ZodNumber;
315
+ total: ZodNumber;
316
+ totalPages: ZodNumber;
317
+ hasMore: ZodBoolean;
318
+ }, $strip>;
319
+ }, $strip>;
320
+ type ListConversationsResponse = output<typeof listConversationsResponseSchema>;
321
+ declare const getConversationRequestSchema: ZodObject<{
322
+ conversationId: ZodString;
323
+ }, $strip>;
324
+ type GetConversationRequest = output<typeof getConversationRequestSchema>;
325
+ declare const getConversationResponseSchema: ZodObject<{
326
+ conversation: ZodObject<{
327
+ id: ZodString;
328
+ title: ZodOptional<ZodString>;
329
+ createdAt: ZodString;
330
+ updatedAt: ZodString;
331
+ visitorId: ZodString;
332
+ websiteId: ZodString;
333
+ status: ZodDefault<ZodEnum<{
334
+ open: "open";
335
+ resolved: "resolved";
336
+ spam: "spam";
337
+ }>>;
338
+ deletedAt: ZodDefault<ZodNullable<ZodString>>;
339
+ lastTimelineItem: ZodOptional<ZodObject<{
340
+ id: ZodOptional<ZodString>;
341
+ conversationId: ZodString;
342
+ organizationId: ZodString;
343
+ visibility: ZodEnum<{
344
+ public: "public";
345
+ private: "private";
346
+ }>;
347
+ type: ZodEnum<{
348
+ message: "message";
349
+ event: "event";
350
+ identification: "identification";
351
+ }>;
352
+ text: ZodNullable<ZodString>;
353
+ tool: ZodOptional<ZodNullable<ZodString>>;
354
+ parts: ZodArray<ZodUnion<readonly [ZodObject<{
355
+ type: ZodLiteral<"text">;
356
+ text: ZodString;
357
+ }, $strip>, ZodObject<{
358
+ type: ZodLiteral<"event">;
359
+ eventType: ZodEnum<{
360
+ resolved: "resolved";
361
+ assigned: "assigned";
362
+ unassigned: "unassigned";
363
+ participant_requested: "participant_requested";
364
+ participant_joined: "participant_joined";
365
+ participant_left: "participant_left";
366
+ status_changed: "status_changed";
367
+ priority_changed: "priority_changed";
368
+ tag_added: "tag_added";
369
+ tag_removed: "tag_removed";
370
+ reopened: "reopened";
371
+ visitor_blocked: "visitor_blocked";
372
+ visitor_unblocked: "visitor_unblocked";
373
+ visitor_identified: "visitor_identified";
374
+ }>;
375
+ actorUserId: ZodNullable<ZodString>;
376
+ actorAiAgentId: ZodNullable<ZodString>;
377
+ targetUserId: ZodNullable<ZodString>;
378
+ targetAiAgentId: ZodNullable<ZodString>;
379
+ message: ZodOptional<ZodNullable<ZodString>>;
380
+ }, $strip>, ZodObject<{
381
+ type: ZodLiteral<"image">;
382
+ url: ZodString;
383
+ mediaType: ZodString;
384
+ fileName: ZodOptional<ZodString>;
385
+ size: ZodOptional<ZodNumber>;
386
+ width: ZodOptional<ZodNumber>;
387
+ height: ZodOptional<ZodNumber>;
388
+ }, $strip>, ZodObject<{
389
+ type: ZodLiteral<"file">;
390
+ url: ZodString;
391
+ mediaType: ZodString;
392
+ fileName: ZodOptional<ZodString>;
393
+ size: ZodOptional<ZodNumber>;
394
+ }, $strip>]>>;
395
+ userId: ZodNullable<ZodString>;
396
+ aiAgentId: ZodNullable<ZodString>;
397
+ visitorId: ZodNullable<ZodString>;
398
+ createdAt: ZodString;
399
+ deletedAt: ZodOptional<ZodNullable<ZodString>>;
400
+ }, $strip>>;
401
+ }, $strip>;
402
+ }, $strip>;
403
+ type GetConversationResponse = output<typeof getConversationResponseSchema>;
404
+ declare const markConversationSeenRequestSchema: ZodObject<{
405
+ visitorId: ZodOptional<ZodString>;
406
+ }, $strip>;
407
+ type MarkConversationSeenRequestBody = output<typeof markConversationSeenRequestSchema>;
408
+ declare const markConversationSeenResponseSchema: ZodObject<{
409
+ conversationId: ZodString;
410
+ lastSeenAt: ZodString;
411
+ }, $strip>;
412
+ type MarkConversationSeenResponseBody = output<typeof markConversationSeenResponseSchema>;
413
+ declare const setConversationTypingResponseSchema: ZodObject<{
414
+ conversationId: ZodString;
415
+ isTyping: ZodBoolean;
416
+ visitorPreview: ZodNullable<ZodString>;
417
+ sentAt: ZodString;
418
+ }, $strip>;
419
+ type SetConversationTypingResponseBody = output<typeof setConversationTypingResponseSchema>;
420
+ declare const getConversationSeenDataResponseSchema: ZodObject<{
421
+ seenData: ZodArray<ZodObject<{
422
+ id: ZodString;
423
+ conversationId: ZodString;
424
+ userId: ZodNullable<ZodString>;
425
+ visitorId: ZodNullable<ZodString>;
426
+ aiAgentId: ZodNullable<ZodString>;
427
+ lastSeenAt: ZodString;
428
+ createdAt: ZodString;
429
+ updatedAt: ZodString;
430
+ deletedAt: ZodNullable<ZodString>;
431
+ }, $strip>>;
432
+ }, $strip>;
433
+ type GetConversationSeenDataResponse = output<typeof getConversationSeenDataResponseSchema>;
434
+ //#endregion
435
+ export { CreateConversationRequestBody, CreateConversationResponseBody, GetConversationRequest, GetConversationResponse, GetConversationSeenDataResponse, ListConversationsRequest, ListConversationsResponse, MarkConversationSeenRequestBody, MarkConversationSeenResponseBody, SetConversationTypingResponseBody };
436
+ //# sourceMappingURL=conversation.d.ts.map
@@ -0,0 +1 @@
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;;;;;;;;;;;;;IA1BD,CAAA,CAAA;IAAA,IAAA,aAAA,UAAA,CAAA;IAsBhC,IAAA,aAAA,YAA6B,UACjC,CAAA,CAAA;IAGK,KAAA,UAAA,SAAA,CAAA,SAOV,UAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAES,8BAAA,GAAiC,cACrC;cAGK,gCAA8B;;;;;;;;;;;;;;;;;KA6B/B,wBAAA,GAA2B,cAC/B;cAGK,iCAA+B;;;;;;;IA9CC,SAAA,WAAA;IAAA,MAAA,YAAA,QAAA,CAAA;MASjC,IAAA,EAAA,MAAA;MAIC,QAAA,EAAA,UAAA;;;;;;;;;;;;;;QAA8B,KAAA,EAAA,OAAA;QAAA,cAAA,EAAA,gBAAA;MA6B/B,CAAA,CAAA;MAIC,IAAA,aAAA,UAaV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAES,yBAAA,GAA4B,cAChC;cAGK,8BAA4B;;;KAU7B,sBAAA,GAAyB,cAC7B;cAGK,+BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAjCE,IAAA,aAAA,YAAA,UAAA,CAAA,CAAA;MAAA,KAAA,UAAA,SAAA,CAAA,SAAA,UAAA,CAAA;QAehC,IAAA,YAAyB,CAAA,MAAA,CAAA;QAIxB,IAAA,WAAA;;;QAA4B,SAAA,SAAA,CAAA;UAAA,QAAA,EAAA,UAAA;UAU7B,QAAA,EAAsB,UAAA;UAIrB,UAAA,EAAA,YAMV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAES,uBAAA,GAA0B,cAC9B;cAGK,mCAAiC;;;KAYlC,+BAAA,GAAkC,cACtC;cAGK,oCAAkC;;;;KAcnC,gCAAA,GAAmC,cACvC;cA0BK,qCAAmC;;;;;;KAoBpC,iCAAA,GAAoC,cACxC;cAGK,uCAAqC;;;;;;;;;;;;;KAuCtC,+BAAA,GAAkC,cACtC"}
package/core.d.ts ADDED
@@ -0,0 +1,35 @@
1
+ import { Class } from "./util.js";
2
+ import { SomeType } from "./schemas.js";
3
+
4
+ //#region ../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/core.d.cts
5
+ type ZodTrait = {
6
+ _zod: {
7
+ def: any;
8
+ [k: string]: any;
9
+ };
10
+ };
11
+ interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
12
+ new (def: D): T;
13
+ init(inst: T, def: D): asserts inst is T;
14
+ }
15
+ declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void, params?: {
16
+ Parent?: typeof Class;
17
+ }): $constructor<T, D>;
18
+ declare const $brand: unique symbol;
19
+ type $brand<T extends string | number | symbol = string | number | symbol> = {
20
+ [$brand]: { [k in T]: true };
21
+ };
22
+ type $ZodBranded<T extends SomeType, Brand extends string | number | symbol> = T & Record<"_zod", Record<"output", output<T> & $brand<Brand>>>;
23
+ type input<T> = T extends {
24
+ _zod: {
25
+ input: any;
26
+ };
27
+ } ? T["_zod"]["input"] : unknown;
28
+ type output<T> = T extends {
29
+ _zod: {
30
+ output: any;
31
+ };
32
+ } ? T["_zod"]["output"] : unknown;
33
+ //#endregion
34
+ export { $ZodBranded, $constructor, input, output };
35
+ //# sourceMappingURL=core.d.ts.map
package/core.d.ts.map ADDED
@@ -0,0 +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,CAA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from "./checks.js";
4
+ import { $constructor } from "./core.js";
5
+
6
+ //#region ../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/errors.d.cts
7
+ interface $ZodIssueBase {
8
+ readonly code?: string;
9
+ readonly input?: unknown;
10
+ readonly path: PropertyKey[];
11
+ readonly message: string;
12
+ }
13
+ interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {
14
+ readonly code: "invalid_type";
15
+ readonly expected: $ZodType["_zod"]["def"]["type"];
16
+ readonly input?: Input;
17
+ }
18
+ interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {
19
+ readonly code: "too_big";
20
+ readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
21
+ readonly maximum: number | bigint;
22
+ readonly inclusive?: boolean;
23
+ readonly exact?: boolean;
24
+ readonly input?: Input;
25
+ }
26
+ interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {
27
+ readonly code: "too_small";
28
+ readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
29
+ readonly minimum: number | bigint;
30
+ /** True if the allowable range includes the minimum */
31
+ readonly inclusive?: boolean;
32
+ /** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */
33
+ readonly exact?: boolean;
34
+ readonly input?: Input;
35
+ }
36
+ interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {
37
+ readonly code: "invalid_format";
38
+ readonly format: $ZodStringFormats | (string & {});
39
+ readonly pattern?: string;
40
+ readonly input?: string;
41
+ }
42
+ interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {
43
+ readonly code: "not_multiple_of";
44
+ readonly divisor: number;
45
+ readonly input?: Input;
46
+ }
47
+ interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {
48
+ readonly code: "unrecognized_keys";
49
+ readonly keys: string[];
50
+ readonly input?: Record<string, unknown>;
51
+ }
52
+ interface $ZodIssueInvalidUnion extends $ZodIssueBase {
53
+ readonly code: "invalid_union";
54
+ readonly errors: $ZodIssue[][];
55
+ readonly input?: unknown;
56
+ readonly discriminator?: string | undefined;
57
+ }
58
+ interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {
59
+ readonly code: "invalid_key";
60
+ readonly origin: "map" | "record";
61
+ readonly issues: $ZodIssue[];
62
+ readonly input?: Input;
63
+ }
64
+ interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {
65
+ readonly code: "invalid_element";
66
+ readonly origin: "map" | "set";
67
+ readonly key: unknown;
68
+ readonly issues: $ZodIssue[];
69
+ readonly input?: Input;
70
+ }
71
+ interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {
72
+ readonly code: "invalid_value";
73
+ readonly values: Primitive[];
74
+ readonly input?: Input;
75
+ }
76
+ interface $ZodIssueCustom extends $ZodIssueBase {
77
+ readonly code: "custom";
78
+ readonly params?: Record<string, any> | undefined;
79
+ readonly input?: unknown;
80
+ }
81
+ type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
82
+ type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
83
+ type RawIssue<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
84
+ /** The input data */
85
+ readonly input: unknown;
86
+ /** The schema or check that originated this issue. */
87
+ readonly inst?: $ZodType | $ZodCheck;
88
+ /** If `true`, Zod will continue executing checks/refinements after this issue. */
89
+ readonly continue?: boolean | undefined;
90
+ } & Record<string, unknown>> : never;
91
+ type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T>;
92
+ interface $ZodErrorMap<T extends $ZodIssueBase = $ZodIssue> {
93
+ (issue: $ZodRawIssue<T>): {
94
+ message: string;
95
+ } | string | undefined | null;
96
+ }
97
+ interface $ZodError<T = unknown> extends Error {
98
+ type: T;
99
+ issues: $ZodIssue[];
100
+ _zod: {
101
+ output: T;
102
+ def: $ZodIssue[];
103
+ };
104
+ stack?: string;
105
+ name: string;
106
+ }
107
+ declare const $ZodError: $constructor<$ZodError>;
108
+ type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;
109
+ type _FlattenedError<T, U = string> = {
110
+ formErrors: U[];
111
+ fieldErrors: { [P in keyof T]?: U[] };
112
+ };
113
+ type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? { [K in keyof T]?: $ZodFormattedError<T[K], U> } : T extends any[] ? {
114
+ [k: number]: $ZodFormattedError<T[number], U>;
115
+ } : T extends object ? Flatten<{ [K in keyof T]?: $ZodFormattedError<T[K], U> }> : any;
116
+ type $ZodFormattedError<T, U = string> = {
117
+ _errors: U[];
118
+ } & Flatten<_ZodFormattedError<T, U>>;
119
+ //#endregion
120
+ export { $ZodError, $ZodErrorMap, $ZodFlattenedError, $ZodFormattedError, $ZodIssue, $ZodIssueBase, $ZodIssueInvalidKey, $ZodIssueInvalidStringFormat, $ZodIssueInvalidType, $ZodIssueInvalidUnion, $ZodIssueInvalidValue, $ZodIssueNotMultipleOf, $ZodIssueTooBig, $ZodIssueTooSmall, $ZodIssueUnrecognizedKeys, $ZodRawIssue };
121
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","names":["$ZodCheck","$ZodStringFormats","$constructor","$ZodType","StandardSchemaV1","util","$ZodIssueBase","PropertyKey","$ZodIssueInvalidType","Input","$ZodIssueTooBig","$ZodIssueTooSmall","$ZodIssueInvalidStringFormat","$ZodIssueNotMultipleOf","$ZodIssueUnrecognizedKeys","Record","$ZodIssueInvalidUnion","$ZodIssue","$ZodIssueInvalidKey","$ZodIssueInvalidElement","$ZodIssueInvalidValue","Primitive","$ZodIssueCustom","$ZodIssueStringCommonFormats","Exclude","$ZodIssueStringInvalidRegex","$ZodIssueStringInvalidJWT","$ZodIssueStringStartsWith","$ZodIssueStringEndsWith","$ZodIssueStringIncludes","$ZodStringFormatIssues","$ZodIssueCode","$ZodInternalIssue","T","RawIssue","MakePartial","Flatten","$ZodRawIssue","$ZodErrorMap","$ZodError","Error","$ZodRealError","$ZodFlattenedError","U","_FlattenedError","flattenError","_ZodFormattedError","K","$ZodFormattedError","formatError","$ZodErrorTree","Array","treeifyError","toDotPath","PathSegment","prettifyError","FailureResult"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/errors.d.cts"],"sourcesContent":["import type { $ZodCheck, $ZodStringFormats } from \"./checks.cjs\";\nimport { $constructor } from \"./core.cjs\";\nimport type { $ZodType } from \"./schemas.cjs\";\nimport type { StandardSchemaV1 } from \"./standard-schema.cjs\";\nimport * as util from \"./util.cjs\";\nexport interface $ZodIssueBase {\n readonly code?: string;\n readonly input?: unknown;\n readonly path: PropertyKey[];\n readonly message: string;\n}\nexport interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {\n readonly code: \"invalid_type\";\n readonly expected: $ZodType[\"_zod\"][\"def\"][\"type\"];\n readonly input?: Input;\n}\nexport interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {\n readonly code: \"too_big\";\n readonly origin: \"number\" | \"int\" | \"bigint\" | \"date\" | \"string\" | \"array\" | \"set\" | \"file\" | (string & {});\n readonly maximum: number | bigint;\n readonly inclusive?: boolean;\n readonly exact?: boolean;\n readonly input?: Input;\n}\nexport interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {\n readonly code: \"too_small\";\n readonly origin: \"number\" | \"int\" | \"bigint\" | \"date\" | \"string\" | \"array\" | \"set\" | \"file\" | (string & {});\n readonly minimum: number | bigint;\n /** True if the allowable range includes the minimum */\n readonly inclusive?: boolean;\n /** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */\n readonly exact?: boolean;\n readonly input?: Input;\n}\nexport interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {\n readonly code: \"invalid_format\";\n readonly format: $ZodStringFormats | (string & {});\n readonly pattern?: string;\n readonly input?: string;\n}\nexport interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {\n readonly code: \"not_multiple_of\";\n readonly divisor: number;\n readonly input?: Input;\n}\nexport interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {\n readonly code: \"unrecognized_keys\";\n readonly keys: string[];\n readonly input?: Record<string, unknown>;\n}\nexport interface $ZodIssueInvalidUnion extends $ZodIssueBase {\n readonly code: \"invalid_union\";\n readonly errors: $ZodIssue[][];\n readonly input?: unknown;\n readonly discriminator?: string | undefined;\n}\nexport interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {\n readonly code: \"invalid_key\";\n readonly origin: \"map\" | \"record\";\n readonly issues: $ZodIssue[];\n readonly input?: Input;\n}\nexport interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {\n readonly code: \"invalid_element\";\n readonly origin: \"map\" | \"set\";\n readonly key: unknown;\n readonly issues: $ZodIssue[];\n readonly input?: Input;\n}\nexport interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {\n readonly code: \"invalid_value\";\n readonly values: util.Primitive[];\n readonly input?: Input;\n}\nexport interface $ZodIssueCustom extends $ZodIssueBase {\n readonly code: \"custom\";\n readonly params?: Record<string, any> | undefined;\n readonly input?: unknown;\n}\nexport interface $ZodIssueStringCommonFormats extends $ZodIssueInvalidStringFormat {\n format: Exclude<$ZodStringFormats, \"regex\" | \"jwt\" | \"starts_with\" | \"ends_with\" | \"includes\">;\n}\nexport interface $ZodIssueStringInvalidRegex extends $ZodIssueInvalidStringFormat {\n format: \"regex\";\n pattern: string;\n}\nexport interface $ZodIssueStringInvalidJWT extends $ZodIssueInvalidStringFormat {\n format: \"jwt\";\n algorithm?: string;\n}\nexport interface $ZodIssueStringStartsWith extends $ZodIssueInvalidStringFormat {\n format: \"starts_with\";\n prefix: string;\n}\nexport interface $ZodIssueStringEndsWith extends $ZodIssueInvalidStringFormat {\n format: \"ends_with\";\n suffix: string;\n}\nexport interface $ZodIssueStringIncludes extends $ZodIssueInvalidStringFormat {\n format: \"includes\";\n includes: string;\n}\nexport type $ZodStringFormatIssues = $ZodIssueStringCommonFormats | $ZodIssueStringInvalidRegex | $ZodIssueStringInvalidJWT | $ZodIssueStringStartsWith | $ZodIssueStringEndsWith | $ZodIssueStringIncludes;\nexport type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;\nexport type $ZodIssueCode = $ZodIssue[\"code\"];\nexport type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;\ntype RawIssue<T extends $ZodIssueBase> = T extends any ? util.Flatten<util.MakePartial<T, \"message\" | \"path\"> & {\n /** The input data */\n readonly input: unknown;\n /** The schema or check that originated this issue. */\n readonly inst?: $ZodType | $ZodCheck;\n /** If `true`, Zod will continue executing checks/refinements after this issue. */\n readonly continue?: boolean | undefined;\n} & Record<string, unknown>> : never;\nexport type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T>;\nexport interface $ZodErrorMap<T extends $ZodIssueBase = $ZodIssue> {\n (issue: $ZodRawIssue<T>): {\n message: string;\n } | string | undefined | null;\n}\nexport interface $ZodError<T = unknown> extends Error {\n type: T;\n issues: $ZodIssue[];\n _zod: {\n output: T;\n def: $ZodIssue[];\n };\n stack?: string;\n name: string;\n}\nexport declare const $ZodError: $constructor<$ZodError>;\ninterface $ZodRealError<T = any> extends $ZodError<T> {\n}\nexport declare const $ZodRealError: $constructor<$ZodRealError>;\nexport type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;\ntype _FlattenedError<T, U = string> = {\n formErrors: U[];\n fieldErrors: {\n [P in keyof T]?: U[];\n };\n};\nexport declare function flattenError<T>(error: $ZodError<T>): _FlattenedError<T>;\nexport declare function flattenError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): _FlattenedError<T, U>;\ntype _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? {\n [K in keyof T]?: $ZodFormattedError<T[K], U>;\n} : T extends any[] ? {\n [k: number]: $ZodFormattedError<T[number], U>;\n} : T extends object ? util.Flatten<{\n [K in keyof T]?: $ZodFormattedError<T[K], U>;\n}> : any;\nexport type $ZodFormattedError<T, U = string> = {\n _errors: U[];\n} & util.Flatten<_ZodFormattedError<T, U>>;\nexport declare function formatError<T>(error: $ZodError<T>): $ZodFormattedError<T>;\nexport declare function formatError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;\nexport type $ZodErrorTree<T, U = string> = T extends util.Primitive ? {\n errors: U[];\n} : T extends [any, ...any[]] ? {\n errors: U[];\n items?: {\n [K in keyof T]?: $ZodErrorTree<T[K], U>;\n };\n} : T extends any[] ? {\n errors: U[];\n items?: Array<$ZodErrorTree<T[number], U>>;\n} : T extends object ? {\n errors: U[];\n properties?: {\n [K in keyof T]?: $ZodErrorTree<T[K], U>;\n };\n} : {\n errors: U[];\n};\nexport declare function treeifyError<T>(error: $ZodError<T>): $ZodErrorTree<T>;\nexport declare function treeifyError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodErrorTree<T, U>;\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport declare function toDotPath(_path: readonly (string | number | symbol | StandardSchemaV1.PathSegment)[]): string;\nexport declare function prettifyError(error: StandardSchemaV1.FailureResult): string;\nexport {};\n"],"x_google_ignoreList":[0],"mappings":";;;;;;UAKiBM,aAAAA;EAAAA,SAAAA,IAAAA,CAAAA,EAAa,MAAA;EAMbE,SAAAA,KAAAA,CAAAA,EAAAA,OAAoB;EAEdL,SAAAA,IAAAA,EALJI,WAKIJ,EAAAA;EACFM,SAAAA,OAAAA,EAAAA,MAAAA;;AAHuD,UAA3DD,oBAA2D,CAAA,QAAA,OAAA,CAAA,SAAbF,aAAa,CAAA;EAK3DI,SAAAA,IAAAA,EAAAA,cAAeD;EAQfE,SAAAA,QAAAA,EAXMR,QAWWM,CAAAA,MAAAA,CAAAA,CAAAA,KAQbA,CAAAA,CAAAA,MARuCH,CAAAA;EAU3CM,SAAAA,KAAAA,CAAAA,EApBIH,KAoBJG;AAMjB;AAKiBE,UA7BAJ,eA6ByB,CAAA,QAAA,OAGrBK,CAAAA,SAhCqCT,aA6BM,CAAA;EAK/CU,SAAAA,IAAAA,EAAAA,SAAqB;EAMrBE,SAAAA,MAAAA,EAAAA,QAAmB,GAAA,KAAAT,GAAAA,QAAA,GAAA,MAAA,GAAA,QAAA,GAAA,OAAA,GAAA,KAAA,GAAA,MAAA,GAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA;EAGfQ,SAAAA,OAAAA,EAAAA,MAAAA,GAAAA,MAAAA;EACAR,SAAAA,SAAAA,CAAAA,EAAAA,OAAAA;EAJyCH,SAAAA,KAAAA,CAAAA,EAAAA,OAAAA;EAAa,SAAA,KAAA,CAAA,EAlCtDG,KAkCsD;AAM3E;AAIqBQ,UA1CJN,iBA0CIM,CAAAA,QAAAA,OAAAA,CAAAA,SA1CuCX,aA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,+BAA+BC;QACtCP;UACEhB;;YAEIgB;SACHhB;;;;;cAKQsB,WAAWrC,aAAaqC;KAIjCG,oCAAoCE,gBAAgBX,GAAGU;KAC9DC;cACWD;6BAEIV,KAAKU;;KAKpBG,oCAAoCb,0CACzBA,KAAKe,mBAAmBf,EAAEc,IAAIJ,OAC1CV;eACae,mBAAmBf,WAAWU;IAC3CV,mBAAmB5B,sBACP4B,KAAKe,mBAAmBf,EAAEc,IAAIJ;KAElCK;WACCL;IACTtC,QAAayC,mBAAmBb,GAAGU"}
package/errors2.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ import { $ZodError, $ZodErrorMap, $ZodFlattenedError, $ZodFormattedError, $ZodIssue } from "./errors.js";
2
+ import { $constructor } from "./core.js";
3
+
4
+ //#region ../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/classic/errors.d.cts
5
+
6
+ /** An Error-like class used to store Zod validation issues. */
7
+ interface ZodError<T = unknown> extends $ZodError<T> {
8
+ /** @deprecated Use the `z.treeifyError(err)` function instead. */
9
+ format(): $ZodFormattedError<T>;
10
+ format<U>(mapper: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;
11
+ /** @deprecated Use the `z.treeifyError(err)` function instead. */
12
+ flatten(): $ZodFlattenedError<T>;
13
+ flatten<U>(mapper: (issue: $ZodIssue) => U): $ZodFlattenedError<T, U>;
14
+ /** @deprecated Push directly to `.issues` instead. */
15
+ addIssue(issue: $ZodIssue): void;
16
+ /** @deprecated Push directly to `.issues` instead. */
17
+ addIssues(issues: $ZodIssue[]): void;
18
+ /** @deprecated Check `err.issues.length === 0` instead. */
19
+ isEmpty: boolean;
20
+ }
21
+ declare const ZodError: $constructor<ZodError>;
22
+ //#endregion
23
+ export { ZodError };
24
+ //# sourceMappingURL=errors2.d.ts.map