@cossistant/core 0.0.25 → 0.0.28

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