@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.
- package/api.d.ts +71 -0
- package/api.d.ts.map +1 -0
- package/checks.d.ts +189 -0
- package/checks.d.ts.map +1 -0
- package/client.d.ts +16 -2
- package/client.d.ts.map +1 -1
- package/client.js +1 -1
- package/coerce.d.ts +9 -0
- package/coerce.d.ts.map +1 -0
- package/contact.d.ts +31 -0
- package/contact.d.ts.map +1 -0
- package/conversation.d.ts +436 -0
- package/conversation.d.ts.map +1 -0
- package/core.d.ts +35 -0
- package/core.d.ts.map +1 -0
- package/errors.d.ts +121 -0
- package/errors.d.ts.map +1 -0
- package/errors2.d.ts +24 -0
- package/errors2.d.ts.map +1 -0
- package/index2.d.ts +4 -0
- package/index3.d.ts +1 -0
- package/metadata.d.ts +1 -0
- package/openapi-generator.d.ts +1 -0
- package/openapi-generator2.d.ts +1 -0
- package/openapi-generator3.d.ts +1 -0
- package/openapi30.d.ts +125 -0
- package/openapi30.d.ts.map +1 -0
- package/openapi31.d.ts +131 -0
- package/openapi31.d.ts.map +1 -0
- package/package.json +1 -1
- package/packages/types/src/enums.js.map +1 -0
- package/parse.d.ts +17 -0
- package/parse.d.ts.map +1 -0
- package/realtime-events.d.ts +358 -0
- package/realtime-events.d.ts.map +1 -0
- package/registries.d.ts +32 -0
- package/registries.d.ts.map +1 -0
- package/rest-client.d.ts +3 -1
- package/rest-client.d.ts.map +1 -1
- package/rest-client.js +1 -1
- package/rest-client.js.map +1 -1
- package/schemas.d.ts +673 -0
- package/schemas.d.ts.map +1 -0
- package/schemas2.d.ts +320 -0
- package/schemas2.d.ts.map +1 -0
- package/schemas3.d.ts +98 -0
- package/schemas3.d.ts.map +1 -0
- package/specification-extension.d.ts +9 -0
- package/specification-extension.d.ts.map +1 -0
- package/standard-schema.d.ts +59 -0
- package/standard-schema.d.ts.map +1 -0
- package/store/conversations-store.d.ts +1 -0
- package/store/conversations-store.d.ts.map +1 -1
- package/store/seen-store.d.ts +2 -0
- package/store/seen-store.d.ts.map +1 -1
- package/store/timeline-items-store.d.ts +1 -0
- package/store/timeline-items-store.d.ts.map +1 -1
- package/store/typing-store.d.ts +1 -0
- package/store/typing-store.d.ts.map +1 -1
- package/timeline-item.d.ts +274 -0
- package/timeline-item.d.ts.map +1 -0
- package/util.d.ts +41 -0
- package/util.d.ts.map +1 -0
- package/versions.d.ts +9 -0
- package/versions.d.ts.map +1 -0
- package/zod-extensions.d.ts +39 -0
- package/zod-extensions.d.ts.map +1 -0
- package/types/src/enums.js.map +0 -1
- /package/{types → packages/types}/src/enums.js +0 -0
|
@@ -0,0 +1,274 @@
|
|
|
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/timeline-item.d.ts
|
|
8
|
+
|
|
9
|
+
declare const timelineItemSchema: ZodObject<{
|
|
10
|
+
id: ZodOptional<ZodString>;
|
|
11
|
+
conversationId: ZodString;
|
|
12
|
+
organizationId: ZodString;
|
|
13
|
+
visibility: ZodEnum<{
|
|
14
|
+
public: "public";
|
|
15
|
+
private: "private";
|
|
16
|
+
}>;
|
|
17
|
+
type: ZodEnum<{
|
|
18
|
+
message: "message";
|
|
19
|
+
event: "event";
|
|
20
|
+
identification: "identification";
|
|
21
|
+
}>;
|
|
22
|
+
text: ZodNullable<ZodString>;
|
|
23
|
+
tool: ZodOptional<ZodNullable<ZodString>>;
|
|
24
|
+
parts: ZodArray<ZodUnion<readonly [ZodObject<{
|
|
25
|
+
type: ZodLiteral<"text">;
|
|
26
|
+
text: ZodString;
|
|
27
|
+
}, $strip>, ZodObject<{
|
|
28
|
+
type: ZodLiteral<"event">;
|
|
29
|
+
eventType: ZodEnum<{
|
|
30
|
+
resolved: "resolved";
|
|
31
|
+
assigned: "assigned";
|
|
32
|
+
unassigned: "unassigned";
|
|
33
|
+
participant_requested: "participant_requested";
|
|
34
|
+
participant_joined: "participant_joined";
|
|
35
|
+
participant_left: "participant_left";
|
|
36
|
+
status_changed: "status_changed";
|
|
37
|
+
priority_changed: "priority_changed";
|
|
38
|
+
tag_added: "tag_added";
|
|
39
|
+
tag_removed: "tag_removed";
|
|
40
|
+
reopened: "reopened";
|
|
41
|
+
visitor_blocked: "visitor_blocked";
|
|
42
|
+
visitor_unblocked: "visitor_unblocked";
|
|
43
|
+
visitor_identified: "visitor_identified";
|
|
44
|
+
}>;
|
|
45
|
+
actorUserId: ZodNullable<ZodString>;
|
|
46
|
+
actorAiAgentId: ZodNullable<ZodString>;
|
|
47
|
+
targetUserId: ZodNullable<ZodString>;
|
|
48
|
+
targetAiAgentId: ZodNullable<ZodString>;
|
|
49
|
+
message: ZodOptional<ZodNullable<ZodString>>;
|
|
50
|
+
}, $strip>, ZodObject<{
|
|
51
|
+
type: ZodLiteral<"image">;
|
|
52
|
+
url: ZodString;
|
|
53
|
+
mediaType: ZodString;
|
|
54
|
+
fileName: ZodOptional<ZodString>;
|
|
55
|
+
size: ZodOptional<ZodNumber>;
|
|
56
|
+
width: ZodOptional<ZodNumber>;
|
|
57
|
+
height: ZodOptional<ZodNumber>;
|
|
58
|
+
}, $strip>, ZodObject<{
|
|
59
|
+
type: ZodLiteral<"file">;
|
|
60
|
+
url: ZodString;
|
|
61
|
+
mediaType: ZodString;
|
|
62
|
+
fileName: ZodOptional<ZodString>;
|
|
63
|
+
size: ZodOptional<ZodNumber>;
|
|
64
|
+
}, $strip>]>>;
|
|
65
|
+
userId: ZodNullable<ZodString>;
|
|
66
|
+
aiAgentId: ZodNullable<ZodString>;
|
|
67
|
+
visitorId: ZodNullable<ZodString>;
|
|
68
|
+
createdAt: ZodString;
|
|
69
|
+
deletedAt: ZodOptional<ZodNullable<ZodString>>;
|
|
70
|
+
}, $strip>;
|
|
71
|
+
type timelineItemSchema = output<typeof timelineItemSchema>;
|
|
72
|
+
type TimelineItem = output<typeof timelineItemSchema>;
|
|
73
|
+
declare const getConversationTimelineItemsRequestSchema: ZodObject<{
|
|
74
|
+
limit: ZodDefault<ZodCoercedNumber<unknown>>;
|
|
75
|
+
cursor: ZodOptional<ZodNullable<ZodString>>;
|
|
76
|
+
}, $strip>;
|
|
77
|
+
type GetConversationTimelineItemsRequest = output<typeof getConversationTimelineItemsRequestSchema>;
|
|
78
|
+
declare const getConversationTimelineItemsResponseSchema: ZodObject<{
|
|
79
|
+
items: ZodArray<ZodObject<{
|
|
80
|
+
id: ZodOptional<ZodString>;
|
|
81
|
+
conversationId: ZodString;
|
|
82
|
+
organizationId: ZodString;
|
|
83
|
+
visibility: ZodEnum<{
|
|
84
|
+
public: "public";
|
|
85
|
+
private: "private";
|
|
86
|
+
}>;
|
|
87
|
+
type: ZodEnum<{
|
|
88
|
+
message: "message";
|
|
89
|
+
event: "event";
|
|
90
|
+
identification: "identification";
|
|
91
|
+
}>;
|
|
92
|
+
text: ZodNullable<ZodString>;
|
|
93
|
+
tool: ZodOptional<ZodNullable<ZodString>>;
|
|
94
|
+
parts: ZodArray<ZodUnion<readonly [ZodObject<{
|
|
95
|
+
type: ZodLiteral<"text">;
|
|
96
|
+
text: ZodString;
|
|
97
|
+
}, $strip>, ZodObject<{
|
|
98
|
+
type: ZodLiteral<"event">;
|
|
99
|
+
eventType: ZodEnum<{
|
|
100
|
+
resolved: "resolved";
|
|
101
|
+
assigned: "assigned";
|
|
102
|
+
unassigned: "unassigned";
|
|
103
|
+
participant_requested: "participant_requested";
|
|
104
|
+
participant_joined: "participant_joined";
|
|
105
|
+
participant_left: "participant_left";
|
|
106
|
+
status_changed: "status_changed";
|
|
107
|
+
priority_changed: "priority_changed";
|
|
108
|
+
tag_added: "tag_added";
|
|
109
|
+
tag_removed: "tag_removed";
|
|
110
|
+
reopened: "reopened";
|
|
111
|
+
visitor_blocked: "visitor_blocked";
|
|
112
|
+
visitor_unblocked: "visitor_unblocked";
|
|
113
|
+
visitor_identified: "visitor_identified";
|
|
114
|
+
}>;
|
|
115
|
+
actorUserId: ZodNullable<ZodString>;
|
|
116
|
+
actorAiAgentId: ZodNullable<ZodString>;
|
|
117
|
+
targetUserId: ZodNullable<ZodString>;
|
|
118
|
+
targetAiAgentId: ZodNullable<ZodString>;
|
|
119
|
+
message: ZodOptional<ZodNullable<ZodString>>;
|
|
120
|
+
}, $strip>, ZodObject<{
|
|
121
|
+
type: ZodLiteral<"image">;
|
|
122
|
+
url: ZodString;
|
|
123
|
+
mediaType: ZodString;
|
|
124
|
+
fileName: ZodOptional<ZodString>;
|
|
125
|
+
size: ZodOptional<ZodNumber>;
|
|
126
|
+
width: ZodOptional<ZodNumber>;
|
|
127
|
+
height: ZodOptional<ZodNumber>;
|
|
128
|
+
}, $strip>, ZodObject<{
|
|
129
|
+
type: ZodLiteral<"file">;
|
|
130
|
+
url: ZodString;
|
|
131
|
+
mediaType: ZodString;
|
|
132
|
+
fileName: ZodOptional<ZodString>;
|
|
133
|
+
size: ZodOptional<ZodNumber>;
|
|
134
|
+
}, $strip>]>>;
|
|
135
|
+
userId: ZodNullable<ZodString>;
|
|
136
|
+
aiAgentId: ZodNullable<ZodString>;
|
|
137
|
+
visitorId: ZodNullable<ZodString>;
|
|
138
|
+
createdAt: ZodString;
|
|
139
|
+
deletedAt: ZodOptional<ZodNullable<ZodString>>;
|
|
140
|
+
}, $strip>>;
|
|
141
|
+
nextCursor: ZodNullable<ZodString>;
|
|
142
|
+
hasNextPage: ZodBoolean;
|
|
143
|
+
}, $strip>;
|
|
144
|
+
type GetConversationTimelineItemsResponse = output<typeof getConversationTimelineItemsResponseSchema>;
|
|
145
|
+
declare const sendTimelineItemRequestSchema: ZodObject<{
|
|
146
|
+
conversationId: ZodString;
|
|
147
|
+
item: ZodObject<{
|
|
148
|
+
id: ZodOptional<ZodString>;
|
|
149
|
+
type: ZodDefault<ZodEnum<{
|
|
150
|
+
message: "message";
|
|
151
|
+
event: "event";
|
|
152
|
+
}>>;
|
|
153
|
+
text: ZodString;
|
|
154
|
+
parts: ZodOptional<ZodArray<ZodUnion<readonly [ZodObject<{
|
|
155
|
+
type: ZodLiteral<"text">;
|
|
156
|
+
text: ZodString;
|
|
157
|
+
}, $strip>, ZodObject<{
|
|
158
|
+
type: ZodLiteral<"event">;
|
|
159
|
+
eventType: ZodEnum<{
|
|
160
|
+
resolved: "resolved";
|
|
161
|
+
assigned: "assigned";
|
|
162
|
+
unassigned: "unassigned";
|
|
163
|
+
participant_requested: "participant_requested";
|
|
164
|
+
participant_joined: "participant_joined";
|
|
165
|
+
participant_left: "participant_left";
|
|
166
|
+
status_changed: "status_changed";
|
|
167
|
+
priority_changed: "priority_changed";
|
|
168
|
+
tag_added: "tag_added";
|
|
169
|
+
tag_removed: "tag_removed";
|
|
170
|
+
reopened: "reopened";
|
|
171
|
+
visitor_blocked: "visitor_blocked";
|
|
172
|
+
visitor_unblocked: "visitor_unblocked";
|
|
173
|
+
visitor_identified: "visitor_identified";
|
|
174
|
+
}>;
|
|
175
|
+
actorUserId: ZodNullable<ZodString>;
|
|
176
|
+
actorAiAgentId: ZodNullable<ZodString>;
|
|
177
|
+
targetUserId: ZodNullable<ZodString>;
|
|
178
|
+
targetAiAgentId: ZodNullable<ZodString>;
|
|
179
|
+
message: ZodOptional<ZodNullable<ZodString>>;
|
|
180
|
+
}, $strip>, ZodObject<{
|
|
181
|
+
type: ZodLiteral<"image">;
|
|
182
|
+
url: ZodString;
|
|
183
|
+
mediaType: ZodString;
|
|
184
|
+
fileName: ZodOptional<ZodString>;
|
|
185
|
+
size: ZodOptional<ZodNumber>;
|
|
186
|
+
width: ZodOptional<ZodNumber>;
|
|
187
|
+
height: ZodOptional<ZodNumber>;
|
|
188
|
+
}, $strip>, ZodObject<{
|
|
189
|
+
type: ZodLiteral<"file">;
|
|
190
|
+
url: ZodString;
|
|
191
|
+
mediaType: ZodString;
|
|
192
|
+
fileName: ZodOptional<ZodString>;
|
|
193
|
+
size: ZodOptional<ZodNumber>;
|
|
194
|
+
}, $strip>]>>>;
|
|
195
|
+
visibility: ZodDefault<ZodEnum<{
|
|
196
|
+
public: "public";
|
|
197
|
+
private: "private";
|
|
198
|
+
}>>;
|
|
199
|
+
tool: ZodOptional<ZodNullable<ZodString>>;
|
|
200
|
+
userId: ZodOptional<ZodNullable<ZodString>>;
|
|
201
|
+
aiAgentId: ZodOptional<ZodNullable<ZodString>>;
|
|
202
|
+
visitorId: ZodOptional<ZodNullable<ZodString>>;
|
|
203
|
+
createdAt: ZodOptional<ZodString>;
|
|
204
|
+
}, $strip>;
|
|
205
|
+
}, $strip>;
|
|
206
|
+
type SendTimelineItemRequest = output<typeof sendTimelineItemRequestSchema>;
|
|
207
|
+
declare const sendTimelineItemResponseSchema: ZodObject<{
|
|
208
|
+
item: ZodObject<{
|
|
209
|
+
id: ZodOptional<ZodString>;
|
|
210
|
+
conversationId: ZodString;
|
|
211
|
+
organizationId: ZodString;
|
|
212
|
+
visibility: ZodEnum<{
|
|
213
|
+
public: "public";
|
|
214
|
+
private: "private";
|
|
215
|
+
}>;
|
|
216
|
+
type: ZodEnum<{
|
|
217
|
+
message: "message";
|
|
218
|
+
event: "event";
|
|
219
|
+
identification: "identification";
|
|
220
|
+
}>;
|
|
221
|
+
text: ZodNullable<ZodString>;
|
|
222
|
+
tool: ZodOptional<ZodNullable<ZodString>>;
|
|
223
|
+
parts: ZodArray<ZodUnion<readonly [ZodObject<{
|
|
224
|
+
type: ZodLiteral<"text">;
|
|
225
|
+
text: ZodString;
|
|
226
|
+
}, $strip>, ZodObject<{
|
|
227
|
+
type: ZodLiteral<"event">;
|
|
228
|
+
eventType: ZodEnum<{
|
|
229
|
+
resolved: "resolved";
|
|
230
|
+
assigned: "assigned";
|
|
231
|
+
unassigned: "unassigned";
|
|
232
|
+
participant_requested: "participant_requested";
|
|
233
|
+
participant_joined: "participant_joined";
|
|
234
|
+
participant_left: "participant_left";
|
|
235
|
+
status_changed: "status_changed";
|
|
236
|
+
priority_changed: "priority_changed";
|
|
237
|
+
tag_added: "tag_added";
|
|
238
|
+
tag_removed: "tag_removed";
|
|
239
|
+
reopened: "reopened";
|
|
240
|
+
visitor_blocked: "visitor_blocked";
|
|
241
|
+
visitor_unblocked: "visitor_unblocked";
|
|
242
|
+
visitor_identified: "visitor_identified";
|
|
243
|
+
}>;
|
|
244
|
+
actorUserId: ZodNullable<ZodString>;
|
|
245
|
+
actorAiAgentId: ZodNullable<ZodString>;
|
|
246
|
+
targetUserId: ZodNullable<ZodString>;
|
|
247
|
+
targetAiAgentId: ZodNullable<ZodString>;
|
|
248
|
+
message: ZodOptional<ZodNullable<ZodString>>;
|
|
249
|
+
}, $strip>, ZodObject<{
|
|
250
|
+
type: ZodLiteral<"image">;
|
|
251
|
+
url: ZodString;
|
|
252
|
+
mediaType: ZodString;
|
|
253
|
+
fileName: ZodOptional<ZodString>;
|
|
254
|
+
size: ZodOptional<ZodNumber>;
|
|
255
|
+
width: ZodOptional<ZodNumber>;
|
|
256
|
+
height: ZodOptional<ZodNumber>;
|
|
257
|
+
}, $strip>, ZodObject<{
|
|
258
|
+
type: ZodLiteral<"file">;
|
|
259
|
+
url: ZodString;
|
|
260
|
+
mediaType: ZodString;
|
|
261
|
+
fileName: ZodOptional<ZodString>;
|
|
262
|
+
size: ZodOptional<ZodNumber>;
|
|
263
|
+
}, $strip>]>>;
|
|
264
|
+
userId: ZodNullable<ZodString>;
|
|
265
|
+
aiAgentId: ZodNullable<ZodString>;
|
|
266
|
+
visitorId: ZodNullable<ZodString>;
|
|
267
|
+
createdAt: ZodString;
|
|
268
|
+
deletedAt: ZodOptional<ZodNullable<ZodString>>;
|
|
269
|
+
}, $strip>;
|
|
270
|
+
}, $strip>;
|
|
271
|
+
type SendTimelineItemResponse = output<typeof sendTimelineItemResponseSchema>;
|
|
272
|
+
//#endregion
|
|
273
|
+
export { GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, SendTimelineItemRequest, SendTimelineItemResponse, TimelineItem };
|
|
274
|
+
//# sourceMappingURL=timeline-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-item.d.ts","names":[],"sources":["../../types/src/api/timeline-item.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAgMY,cA9EC,kBA8ED,EA9EmB,SA8EgB,CAAA;EAIlC,EAAA,aAAA,UAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA9BD,kBAAA,GAAqB,cAAe;KAEpC,YAAA,GAAe,cAAe;cAS7B,2CAAyC;;;;AAmBC,KAJ3C,mCAAA,GAAsC,MAIK,CAAA,OAH/C,yCAG+C,CAAA;AAAA,cAA1C,0CAA0C,EAAA,SAAA,CAAA;EAiB3C,KAAA,UAAA,UAAA,CAAA;IAKC,EAAA,aAAA,UAkDV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAvDS,oCAAA,GAAuC,cAC3C;cAIK,+BAA6B;;;;;MAAA,OAAA,EAAA,SAAA;MAAA,KAAA,EAAA,OAAA;IAoD9B,CAAA,CAAA,CAAA;IAIC,IAAA,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAJD,uBAAA,GAA0B,cAC9B;cAGK,gCAA8B;;;;;;;;;;;;;;IAAA,IAAA,aAAA,UAAA,CAAA;IAAA,IAAA,aAAA,YAAA,UAAA,CAAA,CAAA;IAU/B,KAAA,UAAA,SAAwB,CAAA,SAC5B,UAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KADI,wBAAA,GAA2B,cAC/B"}
|
package/util.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region ../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/util.d.cts
|
|
2
|
+
|
|
3
|
+
type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
|
|
4
|
+
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
5
|
+
type Omit<T, K$1 extends keyof T> = Pick<T, Exclude<keyof T, K$1>>;
|
|
6
|
+
type MakePartial<T, K$1 extends keyof T> = Omit<T, K$1> & InexactPartial<Pick<T, K$1>>;
|
|
7
|
+
type NoUndefined<T> = T extends undefined ? never : T;
|
|
8
|
+
type LoosePartial<T extends object> = InexactPartial<T> & {
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
type Mask<Keys extends PropertyKey> = { [K in Keys]?: true };
|
|
12
|
+
type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined };
|
|
13
|
+
type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
|
|
14
|
+
readonly [Symbol.toStringTag]: string;
|
|
15
|
+
} | Date | Error | Generator | Promise<unknown> | RegExp;
|
|
16
|
+
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>;
|
|
17
|
+
type SomeObject = Record<PropertyKey, any>;
|
|
18
|
+
type Identity<T> = T;
|
|
19
|
+
type Flatten<T> = Identity<{ [k in keyof T]: T[k] }>;
|
|
20
|
+
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
21
|
+
type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : { [K in keyof A as K extends keyof B ? never : K]: A[K] } & { [K in keyof B]: B[K] }>;
|
|
22
|
+
type AnyFunc = (...args: any[]) => any;
|
|
23
|
+
type MaybeAsync<T> = T | Promise<T>;
|
|
24
|
+
type EnumValue = string | number;
|
|
25
|
+
type EnumLike = Readonly<Record<string, EnumValue>>;
|
|
26
|
+
type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k }>;
|
|
27
|
+
type Literal = string | number | bigint | boolean | null | undefined;
|
|
28
|
+
type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
29
|
+
type HasLength = {
|
|
30
|
+
length: number;
|
|
31
|
+
};
|
|
32
|
+
type Numeric = number | bigint | Date;
|
|
33
|
+
type PropValues = Record<string, Set<Primitive>>;
|
|
34
|
+
type PrimitiveSet = Set<Primitive>;
|
|
35
|
+
type EmptyToNever<T> = keyof T extends never ? never : T;
|
|
36
|
+
declare abstract class Class {
|
|
37
|
+
constructor(..._args: any[]);
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { AnyFunc, Class, EmptyToNever, EnumLike, Extend, Flatten, HasLength, IsAny, JWTAlgorithm, Literal, LoosePartial, MakePartial, MakeReadonly, Mask, MaybeAsync, NoUndefined, Numeric, Prettify, Primitive, PrimitiveSet, PropValues, ToEnum };
|
|
41
|
+
//# sourceMappingURL=util.d.ts.map
|
package/util.d.ts.map
ADDED
|
@@ -0,0 +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":"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"}
|
package/versions.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.d.ts","names":["version"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/versions.d.cts"],"sourcesContent":["export declare const version: {\n readonly major: 4;\n readonly minor: 1;\n readonly patch: number;\n};\n"],"x_google_ignoreList":[0],"mappings":";cAAqBA;EAAAA,SAAAA,KAIpB,EAAA,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ParameterObject, SchemaObject } from "./openapi30.js";
|
|
2
|
+
import { ParameterObject as ParameterObject$1, SchemaObject as SchemaObject$1 } from "./openapi31.js";
|
|
3
|
+
import { $ZodType, $ZodTypeInternals } from "./schemas.js";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.bun/@asteasolutions+zod-to-openapi@8.1.0+5954958163efbb2a/node_modules/@asteasolutions/zod-to-openapi/dist/zod-extensions.d.ts
|
|
6
|
+
type ExampleValue<T> = T extends Date ? string : T;
|
|
7
|
+
type ParameterObject$2 = ParameterObject | ParameterObject$1;
|
|
8
|
+
type SchemaObject$2 = SchemaObject | SchemaObject$1;
|
|
9
|
+
type UnionPreferredType = 'oneOf' | 'anyOf';
|
|
10
|
+
type ZodOpenAPIMetadata<T = any, E = ExampleValue<T>> = Omit<SchemaObject$2, 'example' | 'examples' | 'default'> & {
|
|
11
|
+
param?: Partial<ParameterObject$2> & {
|
|
12
|
+
example?: E;
|
|
13
|
+
};
|
|
14
|
+
example?: E;
|
|
15
|
+
examples?: E[];
|
|
16
|
+
default?: T;
|
|
17
|
+
_internal?: never;
|
|
18
|
+
};
|
|
19
|
+
interface OpenApiOptions {
|
|
20
|
+
unionPreferredType?: UnionPreferredType;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* Since this commit https://github.com/colinhacks/zod/commit/6707ebb14c885b1c577ce64a240475e26e3ff182
|
|
25
|
+
* zod started preserving metadata from functions. Since the ZodObject type contains some function types
|
|
26
|
+
* that also have generics this leads to a too deep type instantiation. We only use this type internally
|
|
27
|
+
* so I've opted to type the _internal metadata in the registry as any. However the Metadata.getInternalMetadata
|
|
28
|
+
* method has an explicit return type of ZodOpenAPIInternalMetadata.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
declare module 'zod' {
|
|
32
|
+
interface ZodType<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals<Output, Input> = $ZodTypeInternals<Output, Input>> extends $ZodType<Output, Input, Internals> {
|
|
33
|
+
openapi(metadata: Partial<ZodOpenAPIMetadata<Input>>, options?: OpenApiOptions): this;
|
|
34
|
+
openapi(refId: string, metadata?: Partial<ZodOpenAPIMetadata<Input>>, options?: OpenApiOptions): this;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { ZodOpenAPIMetadata };
|
|
39
|
+
//# sourceMappingURL=zod-extensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod-extensions.d.ts","names":["ParameterObject","ParameterObject30","SchemaObject","SchemaObject30","ParameterObject31","SchemaObject31","ZodObject","z","core","ExampleValue","T","Date","UnionPreferredType","ZodOpenAPIMetadata","E","Omit","Partial","OpenApiOptions","InternalUserOnlyZodOpenAPIInternalMetadata","ZodOpenApiFullMetadataForRegistry","ZodOpenAPIInternalMetadata","ZodOpenApiFullMetadata","_0","Output","Input","Internals","$ZodTypeInternals","$ZodType","sideEffect","extendZodWithOpenApi"],"sources":["../../../node_modules/.bun/@asteasolutions+zod-to-openapi@8.1.0+5954958163efbb2a/node_modules/@asteasolutions/zod-to-openapi/dist/zod-extensions.d.ts"],"sourcesContent":["import { ParameterObject as ParameterObject30, SchemaObject as SchemaObject30 } from 'openapi3-ts/oas30';\nimport { ParameterObject as ParameterObject31, SchemaObject as SchemaObject31 } from 'openapi3-ts/oas31';\nimport type { ZodObject } from 'zod';\nimport { z } from 'zod';\nimport type { core } from 'zod';\ntype ExampleValue<T> = T extends Date ? string : T;\ntype ParameterObject = ParameterObject30 | ParameterObject31;\ntype SchemaObject = SchemaObject30 | SchemaObject31;\nexport type UnionPreferredType = 'oneOf' | 'anyOf';\nexport type ZodOpenAPIMetadata<T = any, E = ExampleValue<T>> = Omit<SchemaObject, 'example' | 'examples' | 'default'> & {\n param?: Partial<ParameterObject> & {\n example?: E;\n };\n example?: E;\n examples?: E[];\n default?: T;\n _internal?: never;\n};\ninterface OpenApiOptions {\n unionPreferredType?: UnionPreferredType;\n}\n/**\n *\n * Since this commit https://github.com/colinhacks/zod/commit/6707ebb14c885b1c577ce64a240475e26e3ff182\n * zod started preserving metadata from functions. Since the ZodObject type contains some function types\n * that also have generics this leads to a too deep type instantiation. We only use this type internally\n * so I've opted to type the _internal metadata in the registry as any. However the Metadata.getInternalMetadata\n * method has an explicit return type of ZodOpenAPIInternalMetadata.\n */\ninterface InternalUserOnlyZodOpenAPIInternalMetadata extends OpenApiOptions {\n refId?: string;\n extendedFrom?: {\n refId: string;\n schema: any;\n };\n}\n/**\n *\n * The metadata that is received from the registry should be obtained using the Metadata methods that have an\n * explicit return type of ZodOpenApiFullMetadata or ZodOpenAPIInternalMetadata.\n *\n * @deprecated Do not use for anything other than the registry. See the comment above for more details.\n */\nexport interface ZodOpenApiFullMetadataForRegistry<T = any> extends Omit<ZodOpenAPIMetadata<T>, '_internal'> {\n _internal?: InternalUserOnlyZodOpenAPIInternalMetadata;\n [k: string]: unknown;\n}\nexport interface ZodOpenAPIInternalMetadata extends InternalUserOnlyZodOpenAPIInternalMetadata {\n extendedFrom?: {\n refId: string;\n schema: ZodObject;\n };\n}\nexport interface ZodOpenApiFullMetadata<T = any> extends ZodOpenApiFullMetadataForRegistry<T> {\n _internal?: ZodOpenAPIInternalMetadata;\n}\ndeclare module 'zod' {\n interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {\n openapi(metadata: Partial<ZodOpenAPIMetadata<Input>>, options?: OpenApiOptions): this;\n openapi(refId: string, metadata?: Partial<ZodOpenAPIMetadata<Input>>, options?: OpenApiOptions): this;\n }\n}\nexport declare function extendZodWithOpenApi(zod: typeof z): void;\nexport {};\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAIgC,KAC3BS,YAAAA,CAAAA,CAAY,CAAA,GAAMC,CAAN,SAAgBC,IAAhB,GAAA,MAAA,GAAgCD,CAAhC;KACZV,iBAAAA,GAAkBC,eADAS,GACoBN,iBADpBM;KAElBR,cAAAA,GAAeC,YAFaQ,GAEIN,cAFJM;AAAgBD,KAGrCE,kBAAAA,GAHqCF,OAAAA,GAAAA,OAAAA;AAAC,KAItCG,kBAJsC,CAAA,IAAA,GAAA,EAAA,IAINJ,YAJM,CAIOC,CAJP,CAAA,CAAA,GAIaK,IAJb,CAIkBb,cAJlB,EAAA,SAAA,GAAA,UAAA,GAAA,SAAA,CAAA,GAAA;EAC7CF,KAAAA,CAAAA,EAIOgB,OAJPhB,CAIeA,iBAJA,CAAA,GAAGC;IAClBC,OAAAA,CAAAA,EAIaY,CAJbZ;EACOU,CAAAA;EACAC,OAAAA,CAAAA,EAIEC,CAJFD;EAA6CH,QAAAA,CAAAA,EAK1CI,CAL0CJ,EAAAA;EAAbD,OAAAA,CAAAA,EAM9BC,CAN8BD;EAAwBP,SAAAA,CAAAA,EAAAA,KAAAA;CAALa;UASrDE,cAAAA,CARUjB;EAARgB,kBAAAA,CAAAA,EASaJ,kBATbI;;;;;;AAOV;AAsCD;;;;;qFAEsFR,kBAAuBe,QAAQC,SAAShB,kBAAuBe,QAAQC,gBAAgBhB,SAAce,QAAQC,OAAOC;sBACjLT,QAAQH,mBAAmBW,mBAAmBP;sCAC9BD,QAAQH,mBAAmBW,mBAAmBP"}
|
package/types/src/enums.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
File without changes
|