@cossistant/core 0.0.25 → 0.0.26

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 (64) hide show
  1. package/_virtual/rolldown_runtime.js +1 -10
  2. package/client.d.ts +1 -1
  3. package/client.js +1 -1
  4. package/contact.d.ts +19 -22
  5. package/contact.d.ts.map +1 -1
  6. package/conversation.d.ts +311 -315
  7. package/conversation.d.ts.map +1 -1
  8. package/package.json +4 -2
  9. package/realtime-events.d.ts +320 -322
  10. package/realtime-events.d.ts.map +1 -1
  11. package/schemas.d.ts +100 -670
  12. package/schemas.d.ts.map +1 -1
  13. package/store/create-store.d.ts.map +1 -1
  14. package/store/seen-store.d.ts +1 -1
  15. package/store/timeline-items-store.js +1 -1
  16. package/timeline-item.d.ts +189 -193
  17. package/timeline-item.d.ts.map +1 -1
  18. package/types/src/api/timeline-item.js +120 -0
  19. package/types/src/api/timeline-item.js.map +1 -0
  20. package/types/src/enums.js.map +1 -0
  21. package/api.d.ts +0 -71
  22. package/api.d.ts.map +0 -1
  23. package/checks.d.ts +0 -189
  24. package/checks.d.ts.map +0 -1
  25. package/coerce.d.ts +0 -9
  26. package/coerce.d.ts.map +0 -1
  27. package/core.d.ts +0 -35
  28. package/core.d.ts.map +0 -1
  29. package/errors.d.ts +0 -121
  30. package/errors.d.ts.map +0 -1
  31. package/errors2.d.ts +0 -24
  32. package/errors2.d.ts.map +0 -1
  33. package/index2.d.ts +0 -4
  34. package/index3.d.ts +0 -1
  35. package/metadata.d.ts +0 -1
  36. package/openapi-generator.d.ts +0 -1
  37. package/openapi-generator2.d.ts +0 -1
  38. package/openapi-generator3.d.ts +0 -1
  39. package/openapi30.d.ts +0 -125
  40. package/openapi30.d.ts.map +0 -1
  41. package/openapi31.d.ts +0 -131
  42. package/openapi31.d.ts.map +0 -1
  43. package/packages/types/src/api/timeline-item.js +0 -122
  44. package/packages/types/src/api/timeline-item.js.map +0 -1
  45. package/packages/types/src/enums.js.map +0 -1
  46. package/parse.d.ts +0 -17
  47. package/parse.d.ts.map +0 -1
  48. package/registries.d.ts +0 -32
  49. package/registries.d.ts.map +0 -1
  50. package/schemas2.d.ts +0 -320
  51. package/schemas2.d.ts.map +0 -1
  52. package/schemas3.d.ts +0 -105
  53. package/schemas3.d.ts.map +0 -1
  54. package/specification-extension.d.ts +0 -9
  55. package/specification-extension.d.ts.map +0 -1
  56. package/standard-schema.d.ts +0 -59
  57. package/standard-schema.d.ts.map +0 -1
  58. package/util.d.ts +0 -41
  59. package/util.d.ts.map +0 -1
  60. package/versions.d.ts +0 -9
  61. package/versions.d.ts.map +0 -1
  62. package/zod-extensions.d.ts +0 -39
  63. package/zod-extensions.d.ts.map +0 -1
  64. /package/{packages/types → types}/src/enums.js +0 -0
@@ -1,6 +1,4 @@
1
- import { $strip } from "./schemas.js";
2
- import { output } from "./core.js";
3
- import { ZodArray, ZodBoolean, ZodDefault, ZodEmail, ZodEnum, ZodLiteral, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodRecord, ZodString, ZodULID, ZodURL, ZodUnion, ZodUnknown } from "./schemas2.js";
1
+ import { z } from "zod";
4
2
 
5
3
  //#region ../types/src/realtime-events.d.ts
6
4
 
@@ -9,134 +7,134 @@ import { ZodArray, ZodBoolean, ZodDefault, ZodEmail, ZodEnum, ZodLiteral, ZodNul
9
7
  * All WebSocket and Redis Pub/Sub events are defined here
10
8
  */
11
9
  declare const realtimeSchema: {
12
- readonly userConnected: ZodObject<{
13
- websiteId: ZodString;
14
- organizationId: ZodString;
15
- visitorId: ZodNullable<ZodString>;
16
- userId: ZodNullable<ZodString>;
17
- connectionId: ZodString;
18
- }, $strip>;
19
- readonly userDisconnected: ZodObject<{
20
- websiteId: ZodString;
21
- organizationId: ZodString;
22
- visitorId: ZodNullable<ZodString>;
23
- userId: ZodNullable<ZodString>;
24
- connectionId: ZodString;
25
- }, $strip>;
26
- readonly visitorConnected: ZodObject<{
27
- websiteId: ZodString;
28
- organizationId: ZodString;
29
- userId: ZodNullable<ZodString>;
30
- visitorId: ZodString;
31
- connectionId: ZodString;
32
- }, $strip>;
33
- readonly visitorDisconnected: ZodObject<{
34
- websiteId: ZodString;
35
- organizationId: ZodString;
36
- userId: ZodNullable<ZodString>;
37
- visitorId: ZodString;
38
- connectionId: ZodString;
39
- }, $strip>;
40
- readonly userPresenceUpdate: ZodObject<{
41
- websiteId: ZodString;
42
- organizationId: ZodString;
43
- visitorId: ZodNullable<ZodString>;
44
- userId: ZodString;
45
- status: ZodEnum<{
10
+ readonly userConnected: z.ZodObject<{
11
+ websiteId: z.ZodString;
12
+ organizationId: z.ZodString;
13
+ visitorId: z.ZodNullable<z.ZodString>;
14
+ userId: z.ZodNullable<z.ZodString>;
15
+ connectionId: z.ZodString;
16
+ }, z.core.$strip>;
17
+ readonly userDisconnected: z.ZodObject<{
18
+ websiteId: z.ZodString;
19
+ organizationId: z.ZodString;
20
+ visitorId: z.ZodNullable<z.ZodString>;
21
+ userId: z.ZodNullable<z.ZodString>;
22
+ connectionId: z.ZodString;
23
+ }, z.core.$strip>;
24
+ readonly visitorConnected: z.ZodObject<{
25
+ websiteId: z.ZodString;
26
+ organizationId: z.ZodString;
27
+ userId: z.ZodNullable<z.ZodString>;
28
+ visitorId: z.ZodString;
29
+ connectionId: z.ZodString;
30
+ }, z.core.$strip>;
31
+ readonly visitorDisconnected: z.ZodObject<{
32
+ websiteId: z.ZodString;
33
+ organizationId: z.ZodString;
34
+ userId: z.ZodNullable<z.ZodString>;
35
+ visitorId: z.ZodString;
36
+ connectionId: z.ZodString;
37
+ }, z.core.$strip>;
38
+ readonly userPresenceUpdate: z.ZodObject<{
39
+ websiteId: z.ZodString;
40
+ organizationId: z.ZodString;
41
+ visitorId: z.ZodNullable<z.ZodString>;
42
+ userId: z.ZodString;
43
+ status: z.ZodEnum<{
46
44
  online: "online";
47
45
  away: "away";
48
46
  offline: "offline";
49
47
  }>;
50
- lastSeen: ZodString;
51
- }, $strip>;
52
- readonly conversationSeen: ZodObject<{
53
- websiteId: ZodString;
54
- organizationId: ZodString;
55
- visitorId: ZodNullable<ZodString>;
56
- userId: ZodNullable<ZodString>;
57
- conversationId: ZodString;
58
- aiAgentId: ZodNullable<ZodString>;
59
- lastSeenAt: ZodString;
60
- }, $strip>;
61
- readonly conversationTyping: ZodObject<{
62
- websiteId: ZodString;
63
- organizationId: ZodString;
64
- visitorId: ZodNullable<ZodString>;
65
- userId: ZodNullable<ZodString>;
66
- conversationId: ZodString;
67
- aiAgentId: ZodNullable<ZodString>;
68
- isTyping: ZodBoolean;
69
- visitorPreview: ZodOptional<ZodNullable<ZodString>>;
70
- }, $strip>;
71
- readonly timelineItemCreated: ZodObject<{
72
- websiteId: ZodString;
73
- organizationId: ZodString;
74
- visitorId: ZodNullable<ZodString>;
75
- userId: ZodNullable<ZodString>;
76
- conversationId: ZodString;
77
- item: ZodObject<{
78
- id: ZodString;
79
- conversationId: ZodString;
80
- organizationId: ZodString;
81
- visibility: ZodEnum<{
48
+ lastSeen: z.ZodString;
49
+ }, z.core.$strip>;
50
+ readonly conversationSeen: z.ZodObject<{
51
+ websiteId: z.ZodString;
52
+ organizationId: z.ZodString;
53
+ visitorId: z.ZodNullable<z.ZodString>;
54
+ userId: z.ZodNullable<z.ZodString>;
55
+ conversationId: z.ZodString;
56
+ aiAgentId: z.ZodNullable<z.ZodString>;
57
+ lastSeenAt: z.ZodString;
58
+ }, z.core.$strip>;
59
+ readonly conversationTyping: z.ZodObject<{
60
+ websiteId: z.ZodString;
61
+ organizationId: z.ZodString;
62
+ visitorId: z.ZodNullable<z.ZodString>;
63
+ userId: z.ZodNullable<z.ZodString>;
64
+ conversationId: z.ZodString;
65
+ aiAgentId: z.ZodNullable<z.ZodString>;
66
+ isTyping: z.ZodBoolean;
67
+ visitorPreview: z.ZodOptional<z.ZodNullable<z.ZodString>>;
68
+ }, z.core.$strip>;
69
+ readonly timelineItemCreated: z.ZodObject<{
70
+ websiteId: z.ZodString;
71
+ organizationId: z.ZodString;
72
+ visitorId: z.ZodNullable<z.ZodString>;
73
+ userId: z.ZodNullable<z.ZodString>;
74
+ conversationId: z.ZodString;
75
+ item: z.ZodObject<{
76
+ id: z.ZodString;
77
+ conversationId: z.ZodString;
78
+ organizationId: z.ZodString;
79
+ visibility: z.ZodEnum<{
82
80
  public: "public";
83
81
  private: "private";
84
82
  }>;
85
- type: ZodEnum<{
83
+ type: z.ZodEnum<{
86
84
  message: "message";
87
85
  event: "event";
88
86
  identification: "identification";
89
87
  }>;
90
- text: ZodNullable<ZodString>;
91
- parts: ZodArray<ZodUnknown>;
92
- userId: ZodNullable<ZodString>;
93
- visitorId: ZodNullable<ZodString>;
94
- aiAgentId: ZodNullable<ZodString>;
95
- createdAt: ZodString;
96
- deletedAt: ZodNullable<ZodString>;
97
- tool: ZodOptional<ZodNullable<ZodString>>;
98
- }, $strip>;
99
- }, $strip>;
100
- readonly conversationCreated: ZodObject<{
101
- websiteId: ZodString;
102
- organizationId: ZodString;
103
- visitorId: ZodNullable<ZodString>;
104
- userId: ZodNullable<ZodString>;
105
- conversationId: ZodString;
106
- conversation: ZodObject<{
107
- id: ZodString;
108
- title: ZodOptional<ZodString>;
109
- createdAt: ZodString;
110
- updatedAt: ZodString;
111
- visitorId: ZodString;
112
- websiteId: ZodString;
113
- status: ZodDefault<ZodEnum<{
88
+ text: z.ZodNullable<z.ZodString>;
89
+ parts: z.ZodArray<z.ZodUnknown>;
90
+ userId: z.ZodNullable<z.ZodString>;
91
+ visitorId: z.ZodNullable<z.ZodString>;
92
+ aiAgentId: z.ZodNullable<z.ZodString>;
93
+ createdAt: z.ZodString;
94
+ deletedAt: z.ZodNullable<z.ZodString>;
95
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
+ }, z.core.$strip>;
97
+ }, z.core.$strip>;
98
+ readonly conversationCreated: z.ZodObject<{
99
+ websiteId: z.ZodString;
100
+ organizationId: z.ZodString;
101
+ visitorId: z.ZodNullable<z.ZodString>;
102
+ userId: z.ZodNullable<z.ZodString>;
103
+ conversationId: z.ZodString;
104
+ conversation: z.ZodObject<{
105
+ id: z.ZodString;
106
+ title: z.ZodOptional<z.ZodString>;
107
+ createdAt: z.ZodString;
108
+ updatedAt: z.ZodString;
109
+ visitorId: z.ZodString;
110
+ websiteId: z.ZodString;
111
+ status: z.ZodDefault<z.ZodEnum<{
114
112
  resolved: "resolved";
115
113
  open: "open";
116
114
  spam: "spam";
117
115
  }>>;
118
- deletedAt: ZodDefault<ZodNullable<ZodString>>;
119
- lastTimelineItem: ZodOptional<ZodObject<{
120
- id: ZodOptional<ZodString>;
121
- conversationId: ZodString;
122
- organizationId: ZodString;
123
- visibility: ZodEnum<{
116
+ deletedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
117
+ lastTimelineItem: z.ZodOptional<z.ZodObject<{
118
+ id: z.ZodOptional<z.ZodString>;
119
+ conversationId: z.ZodString;
120
+ organizationId: z.ZodString;
121
+ visibility: z.ZodEnum<{
124
122
  public: "public";
125
123
  private: "private";
126
124
  }>;
127
- type: ZodEnum<{
125
+ type: z.ZodEnum<{
128
126
  message: "message";
129
127
  event: "event";
130
128
  identification: "identification";
131
129
  }>;
132
- text: ZodNullable<ZodString>;
133
- tool: ZodOptional<ZodNullable<ZodString>>;
134
- parts: ZodArray<ZodUnion<readonly [ZodObject<{
135
- type: ZodLiteral<"text">;
136
- text: ZodString;
137
- }, $strip>, ZodObject<{
138
- type: ZodLiteral<"event">;
139
- eventType: ZodEnum<{
130
+ text: z.ZodNullable<z.ZodString>;
131
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
+ parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
133
+ type: z.ZodLiteral<"text">;
134
+ text: z.ZodString;
135
+ }, z.core.$strip>, z.ZodObject<{
136
+ type: z.ZodLiteral<"event">;
137
+ eventType: z.ZodEnum<{
140
138
  assigned: "assigned";
141
139
  unassigned: "unassigned";
142
140
  participant_requested: "participant_requested";
@@ -152,104 +150,104 @@ declare const realtimeSchema: {
152
150
  visitor_unblocked: "visitor_unblocked";
153
151
  visitor_identified: "visitor_identified";
154
152
  }>;
155
- actorUserId: ZodNullable<ZodString>;
156
- actorAiAgentId: ZodNullable<ZodString>;
157
- targetUserId: ZodNullable<ZodString>;
158
- targetAiAgentId: ZodNullable<ZodString>;
159
- message: ZodOptional<ZodNullable<ZodString>>;
160
- }, $strip>, ZodObject<{
161
- type: ZodLiteral<"image">;
162
- url: ZodString;
163
- mediaType: ZodString;
164
- fileName: ZodOptional<ZodString>;
165
- size: ZodOptional<ZodNumber>;
166
- width: ZodOptional<ZodNumber>;
167
- height: ZodOptional<ZodNumber>;
168
- }, $strip>, ZodObject<{
169
- type: ZodLiteral<"file">;
170
- url: ZodString;
171
- mediaType: ZodString;
172
- fileName: ZodOptional<ZodString>;
173
- size: ZodOptional<ZodNumber>;
174
- }, $strip>, ZodObject<{
175
- type: ZodLiteral<"metadata">;
176
- source: ZodEnum<{
153
+ actorUserId: z.ZodNullable<z.ZodString>;
154
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
155
+ targetUserId: z.ZodNullable<z.ZodString>;
156
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
157
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
158
+ }, z.core.$strip>, z.ZodObject<{
159
+ type: z.ZodLiteral<"image">;
160
+ url: z.ZodString;
161
+ mediaType: z.ZodString;
162
+ fileName: z.ZodOptional<z.ZodString>;
163
+ size: z.ZodOptional<z.ZodNumber>;
164
+ width: z.ZodOptional<z.ZodNumber>;
165
+ height: z.ZodOptional<z.ZodNumber>;
166
+ }, z.core.$strip>, z.ZodObject<{
167
+ type: z.ZodLiteral<"file">;
168
+ url: z.ZodString;
169
+ mediaType: z.ZodString;
170
+ fileName: z.ZodOptional<z.ZodString>;
171
+ size: z.ZodOptional<z.ZodNumber>;
172
+ }, z.core.$strip>, z.ZodObject<{
173
+ type: z.ZodLiteral<"metadata">;
174
+ source: z.ZodEnum<{
177
175
  email: "email";
178
176
  widget: "widget";
179
177
  api: "api";
180
178
  }>;
181
- }, $strip>]>>;
182
- userId: ZodNullable<ZodString>;
183
- aiAgentId: ZodNullable<ZodString>;
184
- visitorId: ZodNullable<ZodString>;
185
- createdAt: ZodString;
186
- deletedAt: ZodOptional<ZodNullable<ZodString>>;
187
- }, $strip>>;
188
- }, $strip>;
189
- header: ZodObject<{
190
- id: ZodString;
191
- status: ZodEnum<{
179
+ }, z.core.$strip>]>>;
180
+ userId: z.ZodNullable<z.ZodString>;
181
+ aiAgentId: z.ZodNullable<z.ZodString>;
182
+ visitorId: z.ZodNullable<z.ZodString>;
183
+ createdAt: z.ZodString;
184
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
185
+ }, z.core.$strip>>;
186
+ }, z.core.$strip>;
187
+ header: z.ZodObject<{
188
+ id: z.ZodString;
189
+ status: z.ZodEnum<{
192
190
  resolved: "resolved";
193
191
  open: "open";
194
192
  spam: "spam";
195
193
  }>;
196
- priority: ZodEnum<{
194
+ priority: z.ZodEnum<{
197
195
  low: "low";
198
196
  normal: "normal";
199
197
  high: "high";
200
198
  urgent: "urgent";
201
199
  }>;
202
- organizationId: ZodString;
203
- visitorId: ZodString;
204
- visitor: ZodObject<{
205
- id: ZodULID;
206
- lastSeenAt: ZodNullable<ZodString>;
207
- blockedAt: ZodNullable<ZodString>;
208
- blockedByUserId: ZodNullable<ZodString>;
209
- isBlocked: ZodBoolean;
210
- contact: ZodNullable<ZodObject<{
211
- id: ZodULID;
212
- name: ZodNullable<ZodString>;
213
- email: ZodNullable<ZodString>;
214
- image: ZodNullable<ZodString>;
215
- metadataHash: ZodOptional<ZodString>;
216
- }, $strip>>;
217
- }, $strip>;
218
- websiteId: ZodString;
219
- channel: ZodString;
220
- title: ZodNullable<ZodString>;
221
- resolutionTime: ZodNullable<ZodNumber>;
222
- startedAt: ZodNullable<ZodString>;
223
- firstResponseAt: ZodNullable<ZodString>;
224
- resolvedAt: ZodNullable<ZodString>;
225
- resolvedByUserId: ZodNullable<ZodString>;
226
- resolvedByAiAgentId: ZodNullable<ZodString>;
227
- createdAt: ZodString;
228
- updatedAt: ZodString;
229
- deletedAt: ZodNullable<ZodString>;
230
- lastMessageAt: ZodNullable<ZodString>;
231
- lastSeenAt: ZodNullable<ZodString>;
232
- lastMessageTimelineItem: ZodNullable<ZodObject<{
233
- id: ZodOptional<ZodString>;
234
- conversationId: ZodString;
235
- organizationId: ZodString;
236
- visibility: ZodEnum<{
200
+ organizationId: z.ZodString;
201
+ visitorId: z.ZodString;
202
+ visitor: z.ZodObject<{
203
+ id: z.ZodULID;
204
+ lastSeenAt: z.ZodNullable<z.ZodString>;
205
+ blockedAt: z.ZodNullable<z.ZodString>;
206
+ blockedByUserId: z.ZodNullable<z.ZodString>;
207
+ isBlocked: z.ZodBoolean;
208
+ contact: z.ZodNullable<z.ZodObject<{
209
+ id: z.ZodULID;
210
+ name: z.ZodNullable<z.ZodString>;
211
+ email: z.ZodNullable<z.ZodString>;
212
+ image: z.ZodNullable<z.ZodString>;
213
+ metadataHash: z.ZodOptional<z.ZodString>;
214
+ }, z.core.$strip>>;
215
+ }, z.core.$strip>;
216
+ websiteId: z.ZodString;
217
+ channel: z.ZodString;
218
+ title: z.ZodNullable<z.ZodString>;
219
+ resolutionTime: z.ZodNullable<z.ZodNumber>;
220
+ startedAt: z.ZodNullable<z.ZodString>;
221
+ firstResponseAt: z.ZodNullable<z.ZodString>;
222
+ resolvedAt: z.ZodNullable<z.ZodString>;
223
+ resolvedByUserId: z.ZodNullable<z.ZodString>;
224
+ resolvedByAiAgentId: z.ZodNullable<z.ZodString>;
225
+ createdAt: z.ZodString;
226
+ updatedAt: z.ZodString;
227
+ deletedAt: z.ZodNullable<z.ZodString>;
228
+ lastMessageAt: z.ZodNullable<z.ZodString>;
229
+ lastSeenAt: z.ZodNullable<z.ZodString>;
230
+ lastMessageTimelineItem: z.ZodNullable<z.ZodObject<{
231
+ id: z.ZodOptional<z.ZodString>;
232
+ conversationId: z.ZodString;
233
+ organizationId: z.ZodString;
234
+ visibility: z.ZodEnum<{
237
235
  public: "public";
238
236
  private: "private";
239
237
  }>;
240
- type: ZodEnum<{
238
+ type: z.ZodEnum<{
241
239
  message: "message";
242
240
  event: "event";
243
241
  identification: "identification";
244
242
  }>;
245
- text: ZodNullable<ZodString>;
246
- tool: ZodOptional<ZodNullable<ZodString>>;
247
- parts: ZodArray<ZodUnion<readonly [ZodObject<{
248
- type: ZodLiteral<"text">;
249
- text: ZodString;
250
- }, $strip>, ZodObject<{
251
- type: ZodLiteral<"event">;
252
- eventType: ZodEnum<{
243
+ text: z.ZodNullable<z.ZodString>;
244
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
+ parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
246
+ type: z.ZodLiteral<"text">;
247
+ text: z.ZodString;
248
+ }, z.core.$strip>, z.ZodObject<{
249
+ type: z.ZodLiteral<"event">;
250
+ eventType: z.ZodEnum<{
253
251
  assigned: "assigned";
254
252
  unassigned: "unassigned";
255
253
  participant_requested: "participant_requested";
@@ -265,60 +263,60 @@ declare const realtimeSchema: {
265
263
  visitor_unblocked: "visitor_unblocked";
266
264
  visitor_identified: "visitor_identified";
267
265
  }>;
268
- actorUserId: ZodNullable<ZodString>;
269
- actorAiAgentId: ZodNullable<ZodString>;
270
- targetUserId: ZodNullable<ZodString>;
271
- targetAiAgentId: ZodNullable<ZodString>;
272
- message: ZodOptional<ZodNullable<ZodString>>;
273
- }, $strip>, ZodObject<{
274
- type: ZodLiteral<"image">;
275
- url: ZodString;
276
- mediaType: ZodString;
277
- fileName: ZodOptional<ZodString>;
278
- size: ZodOptional<ZodNumber>;
279
- width: ZodOptional<ZodNumber>;
280
- height: ZodOptional<ZodNumber>;
281
- }, $strip>, ZodObject<{
282
- type: ZodLiteral<"file">;
283
- url: ZodString;
284
- mediaType: ZodString;
285
- fileName: ZodOptional<ZodString>;
286
- size: ZodOptional<ZodNumber>;
287
- }, $strip>, ZodObject<{
288
- type: ZodLiteral<"metadata">;
289
- source: ZodEnum<{
266
+ actorUserId: z.ZodNullable<z.ZodString>;
267
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
268
+ targetUserId: z.ZodNullable<z.ZodString>;
269
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
270
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
271
+ }, z.core.$strip>, z.ZodObject<{
272
+ type: z.ZodLiteral<"image">;
273
+ url: z.ZodString;
274
+ mediaType: z.ZodString;
275
+ fileName: z.ZodOptional<z.ZodString>;
276
+ size: z.ZodOptional<z.ZodNumber>;
277
+ width: z.ZodOptional<z.ZodNumber>;
278
+ height: z.ZodOptional<z.ZodNumber>;
279
+ }, z.core.$strip>, z.ZodObject<{
280
+ type: z.ZodLiteral<"file">;
281
+ url: z.ZodString;
282
+ mediaType: z.ZodString;
283
+ fileName: z.ZodOptional<z.ZodString>;
284
+ size: z.ZodOptional<z.ZodNumber>;
285
+ }, z.core.$strip>, z.ZodObject<{
286
+ type: z.ZodLiteral<"metadata">;
287
+ source: z.ZodEnum<{
290
288
  email: "email";
291
289
  widget: "widget";
292
290
  api: "api";
293
291
  }>;
294
- }, $strip>]>>;
295
- userId: ZodNullable<ZodString>;
296
- aiAgentId: ZodNullable<ZodString>;
297
- visitorId: ZodNullable<ZodString>;
298
- createdAt: ZodString;
299
- deletedAt: ZodOptional<ZodNullable<ZodString>>;
300
- }, $strip>>;
301
- lastTimelineItem: ZodNullable<ZodObject<{
302
- id: ZodOptional<ZodString>;
303
- conversationId: ZodString;
304
- organizationId: ZodString;
305
- visibility: ZodEnum<{
292
+ }, z.core.$strip>]>>;
293
+ userId: z.ZodNullable<z.ZodString>;
294
+ aiAgentId: z.ZodNullable<z.ZodString>;
295
+ visitorId: z.ZodNullable<z.ZodString>;
296
+ createdAt: z.ZodString;
297
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
298
+ }, z.core.$strip>>;
299
+ lastTimelineItem: z.ZodNullable<z.ZodObject<{
300
+ id: z.ZodOptional<z.ZodString>;
301
+ conversationId: z.ZodString;
302
+ organizationId: z.ZodString;
303
+ visibility: z.ZodEnum<{
306
304
  public: "public";
307
305
  private: "private";
308
306
  }>;
309
- type: ZodEnum<{
307
+ type: z.ZodEnum<{
310
308
  message: "message";
311
309
  event: "event";
312
310
  identification: "identification";
313
311
  }>;
314
- text: ZodNullable<ZodString>;
315
- tool: ZodOptional<ZodNullable<ZodString>>;
316
- parts: ZodArray<ZodUnion<readonly [ZodObject<{
317
- type: ZodLiteral<"text">;
318
- text: ZodString;
319
- }, $strip>, ZodObject<{
320
- type: ZodLiteral<"event">;
321
- eventType: ZodEnum<{
312
+ text: z.ZodNullable<z.ZodString>;
313
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
314
+ parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
315
+ type: z.ZodLiteral<"text">;
316
+ text: z.ZodString;
317
+ }, z.core.$strip>, z.ZodObject<{
318
+ type: z.ZodLiteral<"event">;
319
+ eventType: z.ZodEnum<{
322
320
  assigned: "assigned";
323
321
  unassigned: "unassigned";
324
322
  participant_requested: "participant_requested";
@@ -334,104 +332,104 @@ declare const realtimeSchema: {
334
332
  visitor_unblocked: "visitor_unblocked";
335
333
  visitor_identified: "visitor_identified";
336
334
  }>;
337
- actorUserId: ZodNullable<ZodString>;
338
- actorAiAgentId: ZodNullable<ZodString>;
339
- targetUserId: ZodNullable<ZodString>;
340
- targetAiAgentId: ZodNullable<ZodString>;
341
- message: ZodOptional<ZodNullable<ZodString>>;
342
- }, $strip>, ZodObject<{
343
- type: ZodLiteral<"image">;
344
- url: ZodString;
345
- mediaType: ZodString;
346
- fileName: ZodOptional<ZodString>;
347
- size: ZodOptional<ZodNumber>;
348
- width: ZodOptional<ZodNumber>;
349
- height: ZodOptional<ZodNumber>;
350
- }, $strip>, ZodObject<{
351
- type: ZodLiteral<"file">;
352
- url: ZodString;
353
- mediaType: ZodString;
354
- fileName: ZodOptional<ZodString>;
355
- size: ZodOptional<ZodNumber>;
356
- }, $strip>, ZodObject<{
357
- type: ZodLiteral<"metadata">;
358
- source: ZodEnum<{
335
+ actorUserId: z.ZodNullable<z.ZodString>;
336
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
337
+ targetUserId: z.ZodNullable<z.ZodString>;
338
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
339
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
340
+ }, z.core.$strip>, z.ZodObject<{
341
+ type: z.ZodLiteral<"image">;
342
+ url: z.ZodString;
343
+ mediaType: z.ZodString;
344
+ fileName: z.ZodOptional<z.ZodString>;
345
+ size: z.ZodOptional<z.ZodNumber>;
346
+ width: z.ZodOptional<z.ZodNumber>;
347
+ height: z.ZodOptional<z.ZodNumber>;
348
+ }, z.core.$strip>, z.ZodObject<{
349
+ type: z.ZodLiteral<"file">;
350
+ url: z.ZodString;
351
+ mediaType: z.ZodString;
352
+ fileName: z.ZodOptional<z.ZodString>;
353
+ size: z.ZodOptional<z.ZodNumber>;
354
+ }, z.core.$strip>, z.ZodObject<{
355
+ type: z.ZodLiteral<"metadata">;
356
+ source: z.ZodEnum<{
359
357
  email: "email";
360
358
  widget: "widget";
361
359
  api: "api";
362
360
  }>;
363
- }, $strip>]>>;
364
- userId: ZodNullable<ZodString>;
365
- aiAgentId: ZodNullable<ZodString>;
366
- visitorId: ZodNullable<ZodString>;
367
- createdAt: ZodString;
368
- deletedAt: ZodOptional<ZodNullable<ZodString>>;
369
- }, $strip>>;
370
- viewIds: ZodArray<ZodString>;
371
- seenData: ZodArray<ZodObject<{
372
- id: ZodString;
373
- conversationId: ZodString;
374
- userId: ZodNullable<ZodString>;
375
- visitorId: ZodNullable<ZodString>;
376
- aiAgentId: ZodNullable<ZodString>;
377
- lastSeenAt: ZodString;
378
- createdAt: ZodString;
379
- updatedAt: ZodString;
380
- deletedAt: ZodNullable<ZodString>;
381
- }, $strip>>;
382
- }, $strip>;
383
- }, $strip>;
384
- readonly visitorIdentified: ZodObject<{
385
- websiteId: ZodString;
386
- organizationId: ZodString;
387
- userId: ZodNullable<ZodString>;
388
- visitorId: ZodString;
389
- visitor: ZodObject<{
390
- id: ZodULID;
391
- browser: ZodNullable<ZodString>;
392
- browserVersion: ZodNullable<ZodString>;
393
- os: ZodNullable<ZodString>;
394
- osVersion: ZodNullable<ZodString>;
395
- device: ZodNullable<ZodString>;
396
- deviceType: ZodNullable<ZodString>;
397
- ip: ZodNullable<ZodString>;
398
- city: ZodNullable<ZodString>;
399
- region: ZodNullable<ZodString>;
400
- country: ZodNullable<ZodString>;
401
- countryCode: ZodNullable<ZodString>;
402
- latitude: ZodNullable<ZodNumber>;
403
- longitude: ZodNullable<ZodNumber>;
404
- language: ZodNullable<ZodString>;
405
- timezone: ZodNullable<ZodString>;
406
- screenResolution: ZodNullable<ZodString>;
407
- viewport: ZodNullable<ZodString>;
408
- createdAt: ZodString;
409
- updatedAt: ZodString;
410
- lastSeenAt: ZodNullable<ZodString>;
411
- websiteId: ZodULID;
412
- organizationId: ZodULID;
413
- blockedAt: ZodNullable<ZodString>;
414
- blockedByUserId: ZodNullable<ZodString>;
415
- isBlocked: ZodBoolean;
416
- contact: ZodNullable<ZodObject<{
417
- id: ZodULID;
418
- externalId: ZodNullable<ZodString>;
419
- name: ZodNullable<ZodString>;
420
- email: ZodNullable<ZodEmail>;
421
- image: ZodNullable<ZodURL>;
422
- metadata: ZodNullable<ZodRecord<ZodString, ZodUnion<[ZodUnion<[ZodUnion<[ZodString, ZodNumber]>, ZodBoolean]>, ZodNull]>>>;
423
- contactOrganizationId: ZodNullable<ZodULID>;
424
- websiteId: ZodULID;
425
- organizationId: ZodULID;
426
- userId: ZodNullable<ZodULID>;
427
- createdAt: ZodString;
428
- updatedAt: ZodString;
429
- }, $strip>>;
430
- }, $strip>;
431
- }, $strip>;
361
+ }, z.core.$strip>]>>;
362
+ userId: z.ZodNullable<z.ZodString>;
363
+ aiAgentId: z.ZodNullable<z.ZodString>;
364
+ visitorId: z.ZodNullable<z.ZodString>;
365
+ createdAt: z.ZodString;
366
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
367
+ }, z.core.$strip>>;
368
+ viewIds: z.ZodArray<z.ZodString>;
369
+ seenData: z.ZodArray<z.ZodObject<{
370
+ id: z.ZodString;
371
+ conversationId: z.ZodString;
372
+ userId: z.ZodNullable<z.ZodString>;
373
+ visitorId: z.ZodNullable<z.ZodString>;
374
+ aiAgentId: z.ZodNullable<z.ZodString>;
375
+ lastSeenAt: z.ZodString;
376
+ createdAt: z.ZodString;
377
+ updatedAt: z.ZodString;
378
+ deletedAt: z.ZodNullable<z.ZodString>;
379
+ }, z.core.$strip>>;
380
+ }, z.core.$strip>;
381
+ }, z.core.$strip>;
382
+ readonly visitorIdentified: z.ZodObject<{
383
+ websiteId: z.ZodString;
384
+ organizationId: z.ZodString;
385
+ userId: z.ZodNullable<z.ZodString>;
386
+ visitorId: z.ZodString;
387
+ visitor: z.ZodObject<{
388
+ id: z.ZodULID;
389
+ browser: z.ZodNullable<z.ZodString>;
390
+ browserVersion: z.ZodNullable<z.ZodString>;
391
+ os: z.ZodNullable<z.ZodString>;
392
+ osVersion: z.ZodNullable<z.ZodString>;
393
+ device: z.ZodNullable<z.ZodString>;
394
+ deviceType: z.ZodNullable<z.ZodString>;
395
+ ip: z.ZodNullable<z.ZodString>;
396
+ city: z.ZodNullable<z.ZodString>;
397
+ region: z.ZodNullable<z.ZodString>;
398
+ country: z.ZodNullable<z.ZodString>;
399
+ countryCode: z.ZodNullable<z.ZodString>;
400
+ latitude: z.ZodNullable<z.ZodNumber>;
401
+ longitude: z.ZodNullable<z.ZodNumber>;
402
+ language: z.ZodNullable<z.ZodString>;
403
+ timezone: z.ZodNullable<z.ZodString>;
404
+ screenResolution: z.ZodNullable<z.ZodString>;
405
+ viewport: z.ZodNullable<z.ZodString>;
406
+ createdAt: z.ZodString;
407
+ updatedAt: z.ZodString;
408
+ lastSeenAt: z.ZodNullable<z.ZodString>;
409
+ websiteId: z.ZodULID;
410
+ organizationId: z.ZodULID;
411
+ blockedAt: z.ZodNullable<z.ZodString>;
412
+ blockedByUserId: z.ZodNullable<z.ZodString>;
413
+ isBlocked: z.ZodBoolean;
414
+ contact: z.ZodNullable<z.ZodObject<{
415
+ id: z.ZodULID;
416
+ externalId: z.ZodNullable<z.ZodString>;
417
+ name: z.ZodNullable<z.ZodString>;
418
+ email: z.ZodNullable<z.ZodEmail>;
419
+ image: z.ZodNullable<z.ZodURL>;
420
+ metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodBoolean]>, z.ZodNull]>>>;
421
+ contactOrganizationId: z.ZodNullable<z.ZodULID>;
422
+ websiteId: z.ZodULID;
423
+ organizationId: z.ZodULID;
424
+ userId: z.ZodNullable<z.ZodULID>;
425
+ createdAt: z.ZodString;
426
+ updatedAt: z.ZodString;
427
+ }, z.core.$strip>>;
428
+ }, z.core.$strip>;
429
+ }, z.core.$strip>;
432
430
  };
433
431
  type RealtimeEventType = keyof typeof realtimeSchema;
434
- type RealtimeEventPayload<T extends RealtimeEventType> = output<(typeof realtimeSchema)[T]>;
432
+ type RealtimeEventPayload<T extends RealtimeEventType> = z.infer<(typeof realtimeSchema)[T]>;
435
433
  type RealtimeEvent<T extends RealtimeEventType> = {
436
434
  type: T;
437
435
  payload: RealtimeEventPayload<T>;