@cossistant/core 0.0.28 → 0.0.30

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 (54) hide show
  1. package/_virtual/rolldown_runtime.js +27 -12
  2. package/ai-sdk-utils.d.ts +141 -0
  3. package/ai-sdk-utils.d.ts.map +1 -0
  4. package/ai-sdk-utils.js +255 -0
  5. package/ai-sdk-utils.js.map +1 -0
  6. package/client.d.ts +17 -7
  7. package/client.d.ts.map +1 -1
  8. package/client.js +34 -3
  9. package/client.js.map +1 -1
  10. package/index.d.ts +3 -1
  11. package/index.js +3 -1
  12. package/package.json +1 -1
  13. package/privacy-filter.d.ts +112 -0
  14. package/privacy-filter.d.ts.map +1 -0
  15. package/privacy-filter.js +170 -0
  16. package/privacy-filter.js.map +1 -0
  17. package/rest-client.d.ts +4 -4
  18. package/rest-client.d.ts.map +1 -1
  19. package/rest-client.js +4 -4
  20. package/rest-client.js.map +1 -1
  21. package/store/conversations-store.d.ts +1 -1
  22. package/store/seen-store.d.ts +2 -2
  23. package/store/timeline-items-store.d.ts +5 -5
  24. package/store/timeline-items-store.d.ts.map +1 -1
  25. package/store/timeline-items-store.js +1 -1
  26. package/store/timeline-items-store.js.map +1 -1
  27. package/store/typing-store.d.ts +1 -1
  28. package/store/typing-store.d.ts.map +1 -1
  29. package/store/typing-store.js +12 -19
  30. package/store/typing-store.js.map +1 -1
  31. package/types/src/api/contact.d.ts.map +1 -0
  32. package/{conversation.d.ts → types/src/api/conversation.d.ts} +458 -78
  33. package/types/src/api/conversation.d.ts.map +1 -0
  34. package/types/src/api/timeline-item.d.ts +602 -0
  35. package/types/src/api/timeline-item.d.ts.map +1 -0
  36. package/types/src/api/timeline-item.js +67 -19
  37. package/types/src/api/timeline-item.js.map +1 -1
  38. package/types/src/api/upload.d.ts.map +1 -0
  39. package/types/src/enums.js +4 -1
  40. package/types/src/enums.js.map +1 -1
  41. package/types/src/realtime-events.d.ts +1000 -0
  42. package/types/src/realtime-events.d.ts.map +1 -0
  43. package/{schemas.d.ts → types/src/schemas.d.ts} +92 -16
  44. package/types/src/schemas.d.ts.map +1 -0
  45. package/contact.d.ts.map +0 -1
  46. package/conversation.d.ts.map +0 -1
  47. package/realtime-events.d.ts +0 -478
  48. package/realtime-events.d.ts.map +0 -1
  49. package/schemas.d.ts.map +0 -1
  50. package/timeline-item.d.ts +0 -298
  51. package/timeline-item.d.ts.map +0 -1
  52. package/upload.d.ts.map +0 -1
  53. /package/{contact.d.ts → types/src/api/contact.d.ts} +0 -0
  54. /package/{upload.d.ts → types/src/api/upload.d.ts} +0 -0
@@ -1,298 +0,0 @@
1
- import { z } from "@hono/zod-openapi";
2
-
3
- //#region ../types/src/api/timeline-item.d.ts
4
-
5
- declare const timelineItemSchema: z.ZodObject<{
6
- id: z.ZodOptional<z.ZodString>;
7
- conversationId: z.ZodString;
8
- organizationId: z.ZodString;
9
- visibility: z.ZodEnum<{
10
- public: "public";
11
- private: "private";
12
- }>;
13
- type: z.ZodEnum<{
14
- message: "message";
15
- event: "event";
16
- identification: "identification";
17
- }>;
18
- text: z.ZodNullable<z.ZodString>;
19
- tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
- parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
21
- type: z.ZodLiteral<"text">;
22
- text: z.ZodString;
23
- }, z.core.$strip>, z.ZodObject<{
24
- type: z.ZodLiteral<"event">;
25
- eventType: z.ZodEnum<{
26
- assigned: "assigned";
27
- unassigned: "unassigned";
28
- participant_requested: "participant_requested";
29
- participant_joined: "participant_joined";
30
- participant_left: "participant_left";
31
- status_changed: "status_changed";
32
- priority_changed: "priority_changed";
33
- tag_added: "tag_added";
34
- tag_removed: "tag_removed";
35
- resolved: "resolved";
36
- reopened: "reopened";
37
- visitor_blocked: "visitor_blocked";
38
- visitor_unblocked: "visitor_unblocked";
39
- visitor_identified: "visitor_identified";
40
- }>;
41
- actorUserId: z.ZodNullable<z.ZodString>;
42
- actorAiAgentId: z.ZodNullable<z.ZodString>;
43
- targetUserId: z.ZodNullable<z.ZodString>;
44
- targetAiAgentId: z.ZodNullable<z.ZodString>;
45
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
- }, z.core.$strip>, z.ZodObject<{
47
- type: z.ZodLiteral<"image">;
48
- url: z.ZodString;
49
- mediaType: z.ZodString;
50
- fileName: z.ZodOptional<z.ZodString>;
51
- size: z.ZodOptional<z.ZodNumber>;
52
- width: z.ZodOptional<z.ZodNumber>;
53
- height: z.ZodOptional<z.ZodNumber>;
54
- }, z.core.$strip>, z.ZodObject<{
55
- type: z.ZodLiteral<"file">;
56
- url: z.ZodString;
57
- mediaType: z.ZodString;
58
- fileName: z.ZodOptional<z.ZodString>;
59
- size: z.ZodOptional<z.ZodNumber>;
60
- }, z.core.$strip>, z.ZodObject<{
61
- type: z.ZodLiteral<"metadata">;
62
- source: z.ZodEnum<{
63
- email: "email";
64
- widget: "widget";
65
- api: "api";
66
- }>;
67
- }, z.core.$strip>]>>;
68
- userId: z.ZodNullable<z.ZodString>;
69
- aiAgentId: z.ZodNullable<z.ZodString>;
70
- visitorId: z.ZodNullable<z.ZodString>;
71
- createdAt: z.ZodString;
72
- deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
73
- }, z.core.$strip>;
74
- type timelineItemSchema = z.infer<typeof timelineItemSchema>;
75
- type TimelineItem = z.infer<typeof timelineItemSchema>;
76
- declare const getConversationTimelineItemsRequestSchema: z.ZodObject<{
77
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
78
- cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
- }, z.core.$strip>;
80
- type GetConversationTimelineItemsRequest = z.infer<typeof getConversationTimelineItemsRequestSchema>;
81
- declare const getConversationTimelineItemsResponseSchema: z.ZodObject<{
82
- items: z.ZodArray<z.ZodObject<{
83
- id: z.ZodOptional<z.ZodString>;
84
- conversationId: z.ZodString;
85
- organizationId: z.ZodString;
86
- visibility: z.ZodEnum<{
87
- public: "public";
88
- private: "private";
89
- }>;
90
- type: z.ZodEnum<{
91
- message: "message";
92
- event: "event";
93
- identification: "identification";
94
- }>;
95
- text: z.ZodNullable<z.ZodString>;
96
- tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
97
- parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
98
- type: z.ZodLiteral<"text">;
99
- text: z.ZodString;
100
- }, z.core.$strip>, z.ZodObject<{
101
- type: z.ZodLiteral<"event">;
102
- eventType: z.ZodEnum<{
103
- assigned: "assigned";
104
- unassigned: "unassigned";
105
- participant_requested: "participant_requested";
106
- participant_joined: "participant_joined";
107
- participant_left: "participant_left";
108
- status_changed: "status_changed";
109
- priority_changed: "priority_changed";
110
- tag_added: "tag_added";
111
- tag_removed: "tag_removed";
112
- resolved: "resolved";
113
- reopened: "reopened";
114
- visitor_blocked: "visitor_blocked";
115
- visitor_unblocked: "visitor_unblocked";
116
- visitor_identified: "visitor_identified";
117
- }>;
118
- actorUserId: z.ZodNullable<z.ZodString>;
119
- actorAiAgentId: z.ZodNullable<z.ZodString>;
120
- targetUserId: z.ZodNullable<z.ZodString>;
121
- targetAiAgentId: z.ZodNullable<z.ZodString>;
122
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
- }, z.core.$strip>, z.ZodObject<{
124
- type: z.ZodLiteral<"image">;
125
- url: z.ZodString;
126
- mediaType: z.ZodString;
127
- fileName: z.ZodOptional<z.ZodString>;
128
- size: z.ZodOptional<z.ZodNumber>;
129
- width: z.ZodOptional<z.ZodNumber>;
130
- height: z.ZodOptional<z.ZodNumber>;
131
- }, z.core.$strip>, z.ZodObject<{
132
- type: z.ZodLiteral<"file">;
133
- url: z.ZodString;
134
- mediaType: z.ZodString;
135
- fileName: z.ZodOptional<z.ZodString>;
136
- size: z.ZodOptional<z.ZodNumber>;
137
- }, z.core.$strip>, z.ZodObject<{
138
- type: z.ZodLiteral<"metadata">;
139
- source: z.ZodEnum<{
140
- email: "email";
141
- widget: "widget";
142
- api: "api";
143
- }>;
144
- }, z.core.$strip>]>>;
145
- userId: z.ZodNullable<z.ZodString>;
146
- aiAgentId: z.ZodNullable<z.ZodString>;
147
- visitorId: z.ZodNullable<z.ZodString>;
148
- createdAt: z.ZodString;
149
- deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
150
- }, z.core.$strip>>;
151
- nextCursor: z.ZodNullable<z.ZodString>;
152
- hasNextPage: z.ZodBoolean;
153
- }, z.core.$strip>;
154
- type GetConversationTimelineItemsResponse = z.infer<typeof getConversationTimelineItemsResponseSchema>;
155
- declare const sendTimelineItemRequestSchema: z.ZodObject<{
156
- conversationId: z.ZodString;
157
- item: z.ZodObject<{
158
- id: z.ZodOptional<z.ZodString>;
159
- type: z.ZodDefault<z.ZodEnum<{
160
- message: "message";
161
- event: "event";
162
- }>>;
163
- text: z.ZodString;
164
- parts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
165
- type: z.ZodLiteral<"text">;
166
- text: z.ZodString;
167
- }, z.core.$strip>, z.ZodObject<{
168
- type: z.ZodLiteral<"event">;
169
- eventType: z.ZodEnum<{
170
- assigned: "assigned";
171
- unassigned: "unassigned";
172
- participant_requested: "participant_requested";
173
- participant_joined: "participant_joined";
174
- participant_left: "participant_left";
175
- status_changed: "status_changed";
176
- priority_changed: "priority_changed";
177
- tag_added: "tag_added";
178
- tag_removed: "tag_removed";
179
- resolved: "resolved";
180
- reopened: "reopened";
181
- visitor_blocked: "visitor_blocked";
182
- visitor_unblocked: "visitor_unblocked";
183
- visitor_identified: "visitor_identified";
184
- }>;
185
- actorUserId: z.ZodNullable<z.ZodString>;
186
- actorAiAgentId: z.ZodNullable<z.ZodString>;
187
- targetUserId: z.ZodNullable<z.ZodString>;
188
- targetAiAgentId: z.ZodNullable<z.ZodString>;
189
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
190
- }, z.core.$strip>, z.ZodObject<{
191
- type: z.ZodLiteral<"image">;
192
- url: z.ZodString;
193
- mediaType: z.ZodString;
194
- fileName: z.ZodOptional<z.ZodString>;
195
- size: z.ZodOptional<z.ZodNumber>;
196
- width: z.ZodOptional<z.ZodNumber>;
197
- height: z.ZodOptional<z.ZodNumber>;
198
- }, z.core.$strip>, z.ZodObject<{
199
- type: z.ZodLiteral<"file">;
200
- url: z.ZodString;
201
- mediaType: z.ZodString;
202
- fileName: z.ZodOptional<z.ZodString>;
203
- size: z.ZodOptional<z.ZodNumber>;
204
- }, z.core.$strip>, z.ZodObject<{
205
- type: z.ZodLiteral<"metadata">;
206
- source: z.ZodEnum<{
207
- email: "email";
208
- widget: "widget";
209
- api: "api";
210
- }>;
211
- }, z.core.$strip>]>>>;
212
- visibility: z.ZodDefault<z.ZodEnum<{
213
- public: "public";
214
- private: "private";
215
- }>>;
216
- tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
217
- userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
218
- aiAgentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
219
- visitorId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
220
- createdAt: z.ZodOptional<z.ZodString>;
221
- }, z.core.$strip>;
222
- }, z.core.$strip>;
223
- type SendTimelineItemRequest = z.infer<typeof sendTimelineItemRequestSchema>;
224
- declare const sendTimelineItemResponseSchema: z.ZodObject<{
225
- item: z.ZodObject<{
226
- id: z.ZodOptional<z.ZodString>;
227
- conversationId: z.ZodString;
228
- organizationId: z.ZodString;
229
- visibility: z.ZodEnum<{
230
- public: "public";
231
- private: "private";
232
- }>;
233
- type: z.ZodEnum<{
234
- message: "message";
235
- event: "event";
236
- identification: "identification";
237
- }>;
238
- text: z.ZodNullable<z.ZodString>;
239
- tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
240
- parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
241
- type: z.ZodLiteral<"text">;
242
- text: z.ZodString;
243
- }, z.core.$strip>, z.ZodObject<{
244
- type: z.ZodLiteral<"event">;
245
- eventType: z.ZodEnum<{
246
- assigned: "assigned";
247
- unassigned: "unassigned";
248
- participant_requested: "participant_requested";
249
- participant_joined: "participant_joined";
250
- participant_left: "participant_left";
251
- status_changed: "status_changed";
252
- priority_changed: "priority_changed";
253
- tag_added: "tag_added";
254
- tag_removed: "tag_removed";
255
- resolved: "resolved";
256
- reopened: "reopened";
257
- visitor_blocked: "visitor_blocked";
258
- visitor_unblocked: "visitor_unblocked";
259
- visitor_identified: "visitor_identified";
260
- }>;
261
- actorUserId: z.ZodNullable<z.ZodString>;
262
- actorAiAgentId: z.ZodNullable<z.ZodString>;
263
- targetUserId: z.ZodNullable<z.ZodString>;
264
- targetAiAgentId: z.ZodNullable<z.ZodString>;
265
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
266
- }, z.core.$strip>, z.ZodObject<{
267
- type: z.ZodLiteral<"image">;
268
- url: z.ZodString;
269
- mediaType: z.ZodString;
270
- fileName: z.ZodOptional<z.ZodString>;
271
- size: z.ZodOptional<z.ZodNumber>;
272
- width: z.ZodOptional<z.ZodNumber>;
273
- height: z.ZodOptional<z.ZodNumber>;
274
- }, z.core.$strip>, z.ZodObject<{
275
- type: z.ZodLiteral<"file">;
276
- url: z.ZodString;
277
- mediaType: z.ZodString;
278
- fileName: z.ZodOptional<z.ZodString>;
279
- size: z.ZodOptional<z.ZodNumber>;
280
- }, z.core.$strip>, z.ZodObject<{
281
- type: z.ZodLiteral<"metadata">;
282
- source: z.ZodEnum<{
283
- email: "email";
284
- widget: "widget";
285
- api: "api";
286
- }>;
287
- }, z.core.$strip>]>>;
288
- userId: z.ZodNullable<z.ZodString>;
289
- aiAgentId: z.ZodNullable<z.ZodString>;
290
- visitorId: z.ZodNullable<z.ZodString>;
291
- createdAt: z.ZodString;
292
- deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
- }, z.core.$strip>;
294
- }, z.core.$strip>;
295
- type SendTimelineItemResponse = z.infer<typeof sendTimelineItemResponseSchema>;
296
- //#endregion
297
- export { GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, SendTimelineItemRequest, SendTimelineItemResponse, TimelineItem };
298
- //# sourceMappingURL=timeline-item.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timeline-item.d.ts","names":[],"sources":["../../types/src/api/timeline-item.ts"],"sourcesContent":[],"mappings":";;;;cA4Ha,oBAAkB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFwB,CAAA,eAAA,CAAA,CAAA,CAAA,CAAA;EAAA,MAAA,eAAA,YAAA,CAAA;EAiB3C,SAAA,eAAA,YAAA,CAAA;EAKC,SAAA,eAAA,YAkDV,CAAA;;;;KAvGS,kBAAA,GAAqB,CAAA,CAAE,aAAa;KAEpC,YAAA,GAAe,CAAA,CAAE,aAAa;cAU7B,2CAAyC,CAAA,CAAA;;;;KAe1C,mCAAA,GAAsC,CAAA,CAAE,aAC5C;cAGK,4CAA0C,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsBb,IAAA,cAAA,CAAA,UAAA,CAAA;MAAA,MAAA,WAAA,CAAA;QAoD9B,KAAA,EAAA,OAAuB;QAItB,MAAA,EAAA,QAAA;;;;;;;;;;;;;KA7DD,oCAAA,GAAuC,CAAA,CAAE,aAC7C;cAIK,+BAA6B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwDC,MAAA,EAAA,QAAA;MAAA,OAAA,EAAA,SAAA;IAU/B,CAAA,CAAA,CAAA;;;;;;;;KAdA,uBAAA,GAA0B,CAAA,CAAE,aAChC;cAGK,gCAA8B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAU/B,wBAAA,GAA2B,CAAA,CAAE,aACjC"}
package/upload.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"upload.d.ts","names":[],"sources":["../../types/src/api/upload.ts"],"sourcesContent":[],"mappings":";;;;AAkMY,cAvEC,8BAwEL,EAxEmC,CAAA,CAAA,SAwEnC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAxCI,wBAAA,GAA2B,CAAA,CAAE,aACjC;cAGK,iCAA+B,CAAA,CAAA;;;;;;;;KAmChC,yBAAA,GAA4B,CAAA,CAAE,aAClC"}
File without changes
File without changes