@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,32 +1,28 @@
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";
1
+ import { z } from "@hono/zod-openapi";
6
2
 
7
3
  //#region ../types/src/api/timeline-item.d.ts
8
4
 
9
- declare const timelineItemSchema: ZodObject<{
10
- id: ZodOptional<ZodString>;
11
- conversationId: ZodString;
12
- organizationId: ZodString;
13
- visibility: ZodEnum<{
5
+ declare const timelineItemSchema: z.ZodObject<{
6
+ id: z.ZodOptional<z.ZodString>;
7
+ conversationId: z.ZodString;
8
+ organizationId: z.ZodString;
9
+ visibility: z.ZodEnum<{
14
10
  public: "public";
15
11
  private: "private";
16
12
  }>;
17
- type: ZodEnum<{
13
+ type: z.ZodEnum<{
18
14
  message: "message";
19
15
  event: "event";
20
16
  identification: "identification";
21
17
  }>;
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<{
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<{
30
26
  assigned: "assigned";
31
27
  unassigned: "unassigned";
32
28
  participant_requested: "participant_requested";
@@ -42,68 +38,68 @@ declare const timelineItemSchema: ZodObject<{
42
38
  visitor_unblocked: "visitor_unblocked";
43
39
  visitor_identified: "visitor_identified";
44
40
  }>;
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>, ZodObject<{
65
- type: ZodLiteral<"metadata">;
66
- source: ZodEnum<{
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<{
67
63
  email: "email";
68
64
  widget: "widget";
69
65
  api: "api";
70
66
  }>;
71
- }, $strip>]>>;
72
- userId: ZodNullable<ZodString>;
73
- aiAgentId: ZodNullable<ZodString>;
74
- visitorId: ZodNullable<ZodString>;
75
- createdAt: ZodString;
76
- deletedAt: ZodOptional<ZodNullable<ZodString>>;
77
- }, $strip>;
78
- type timelineItemSchema = output<typeof timelineItemSchema>;
79
- type TimelineItem = output<typeof timelineItemSchema>;
80
- declare const getConversationTimelineItemsRequestSchema: ZodObject<{
81
- limit: ZodDefault<ZodCoercedNumber<unknown>>;
82
- cursor: ZodOptional<ZodNullable<ZodString>>;
83
- }, $strip>;
84
- type GetConversationTimelineItemsRequest = output<typeof getConversationTimelineItemsRequestSchema>;
85
- declare const getConversationTimelineItemsResponseSchema: ZodObject<{
86
- items: ZodArray<ZodObject<{
87
- id: ZodOptional<ZodString>;
88
- conversationId: ZodString;
89
- organizationId: ZodString;
90
- visibility: ZodEnum<{
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<{
91
87
  public: "public";
92
88
  private: "private";
93
89
  }>;
94
- type: ZodEnum<{
90
+ type: z.ZodEnum<{
95
91
  message: "message";
96
92
  event: "event";
97
93
  identification: "identification";
98
94
  }>;
99
- text: ZodNullable<ZodString>;
100
- tool: ZodOptional<ZodNullable<ZodString>>;
101
- parts: ZodArray<ZodUnion<readonly [ZodObject<{
102
- type: ZodLiteral<"text">;
103
- text: ZodString;
104
- }, $strip>, ZodObject<{
105
- type: ZodLiteral<"event">;
106
- eventType: ZodEnum<{
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<{
107
103
  assigned: "assigned";
108
104
  unassigned: "unassigned";
109
105
  participant_requested: "participant_requested";
@@ -119,58 +115,58 @@ declare const getConversationTimelineItemsResponseSchema: ZodObject<{
119
115
  visitor_unblocked: "visitor_unblocked";
120
116
  visitor_identified: "visitor_identified";
121
117
  }>;
122
- actorUserId: ZodNullable<ZodString>;
123
- actorAiAgentId: ZodNullable<ZodString>;
124
- targetUserId: ZodNullable<ZodString>;
125
- targetAiAgentId: ZodNullable<ZodString>;
126
- message: ZodOptional<ZodNullable<ZodString>>;
127
- }, $strip>, ZodObject<{
128
- type: ZodLiteral<"image">;
129
- url: ZodString;
130
- mediaType: ZodString;
131
- fileName: ZodOptional<ZodString>;
132
- size: ZodOptional<ZodNumber>;
133
- width: ZodOptional<ZodNumber>;
134
- height: ZodOptional<ZodNumber>;
135
- }, $strip>, ZodObject<{
136
- type: ZodLiteral<"file">;
137
- url: ZodString;
138
- mediaType: ZodString;
139
- fileName: ZodOptional<ZodString>;
140
- size: ZodOptional<ZodNumber>;
141
- }, $strip>, ZodObject<{
142
- type: ZodLiteral<"metadata">;
143
- source: ZodEnum<{
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<{
144
140
  email: "email";
145
141
  widget: "widget";
146
142
  api: "api";
147
143
  }>;
148
- }, $strip>]>>;
149
- userId: ZodNullable<ZodString>;
150
- aiAgentId: ZodNullable<ZodString>;
151
- visitorId: ZodNullable<ZodString>;
152
- createdAt: ZodString;
153
- deletedAt: ZodOptional<ZodNullable<ZodString>>;
154
- }, $strip>>;
155
- nextCursor: ZodNullable<ZodString>;
156
- hasNextPage: ZodBoolean;
157
- }, $strip>;
158
- type GetConversationTimelineItemsResponse = output<typeof getConversationTimelineItemsResponseSchema>;
159
- declare const sendTimelineItemRequestSchema: ZodObject<{
160
- conversationId: ZodString;
161
- item: ZodObject<{
162
- id: ZodOptional<ZodString>;
163
- type: ZodDefault<ZodEnum<{
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<{
164
160
  message: "message";
165
161
  event: "event";
166
162
  }>>;
167
- text: ZodString;
168
- parts: ZodOptional<ZodArray<ZodUnion<readonly [ZodObject<{
169
- type: ZodLiteral<"text">;
170
- text: ZodString;
171
- }, $strip>, ZodObject<{
172
- type: ZodLiteral<"event">;
173
- eventType: ZodEnum<{
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<{
174
170
  assigned: "assigned";
175
171
  unassigned: "unassigned";
176
172
  participant_requested: "participant_requested";
@@ -186,67 +182,67 @@ declare const sendTimelineItemRequestSchema: ZodObject<{
186
182
  visitor_unblocked: "visitor_unblocked";
187
183
  visitor_identified: "visitor_identified";
188
184
  }>;
189
- actorUserId: ZodNullable<ZodString>;
190
- actorAiAgentId: ZodNullable<ZodString>;
191
- targetUserId: ZodNullable<ZodString>;
192
- targetAiAgentId: ZodNullable<ZodString>;
193
- message: ZodOptional<ZodNullable<ZodString>>;
194
- }, $strip>, ZodObject<{
195
- type: ZodLiteral<"image">;
196
- url: ZodString;
197
- mediaType: ZodString;
198
- fileName: ZodOptional<ZodString>;
199
- size: ZodOptional<ZodNumber>;
200
- width: ZodOptional<ZodNumber>;
201
- height: ZodOptional<ZodNumber>;
202
- }, $strip>, ZodObject<{
203
- type: ZodLiteral<"file">;
204
- url: ZodString;
205
- mediaType: ZodString;
206
- fileName: ZodOptional<ZodString>;
207
- size: ZodOptional<ZodNumber>;
208
- }, $strip>, ZodObject<{
209
- type: ZodLiteral<"metadata">;
210
- source: ZodEnum<{
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<{
211
207
  email: "email";
212
208
  widget: "widget";
213
209
  api: "api";
214
210
  }>;
215
- }, $strip>]>>>;
216
- visibility: ZodDefault<ZodEnum<{
211
+ }, z.core.$strip>]>>>;
212
+ visibility: z.ZodDefault<z.ZodEnum<{
217
213
  public: "public";
218
214
  private: "private";
219
215
  }>>;
220
- tool: ZodOptional<ZodNullable<ZodString>>;
221
- userId: ZodOptional<ZodNullable<ZodString>>;
222
- aiAgentId: ZodOptional<ZodNullable<ZodString>>;
223
- visitorId: ZodOptional<ZodNullable<ZodString>>;
224
- createdAt: ZodOptional<ZodString>;
225
- }, $strip>;
226
- }, $strip>;
227
- type SendTimelineItemRequest = output<typeof sendTimelineItemRequestSchema>;
228
- declare const sendTimelineItemResponseSchema: ZodObject<{
229
- item: ZodObject<{
230
- id: ZodOptional<ZodString>;
231
- conversationId: ZodString;
232
- organizationId: ZodString;
233
- visibility: ZodEnum<{
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<{
234
230
  public: "public";
235
231
  private: "private";
236
232
  }>;
237
- type: ZodEnum<{
233
+ type: z.ZodEnum<{
238
234
  message: "message";
239
235
  event: "event";
240
236
  identification: "identification";
241
237
  }>;
242
- text: ZodNullable<ZodString>;
243
- tool: ZodOptional<ZodNullable<ZodString>>;
244
- parts: ZodArray<ZodUnion<readonly [ZodObject<{
245
- type: ZodLiteral<"text">;
246
- text: ZodString;
247
- }, $strip>, ZodObject<{
248
- type: ZodLiteral<"event">;
249
- eventType: ZodEnum<{
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<{
250
246
  assigned: "assigned";
251
247
  unassigned: "unassigned";
252
248
  participant_requested: "participant_requested";
@@ -262,41 +258,41 @@ declare const sendTimelineItemResponseSchema: ZodObject<{
262
258
  visitor_unblocked: "visitor_unblocked";
263
259
  visitor_identified: "visitor_identified";
264
260
  }>;
265
- actorUserId: ZodNullable<ZodString>;
266
- actorAiAgentId: ZodNullable<ZodString>;
267
- targetUserId: ZodNullable<ZodString>;
268
- targetAiAgentId: ZodNullable<ZodString>;
269
- message: ZodOptional<ZodNullable<ZodString>>;
270
- }, $strip>, ZodObject<{
271
- type: ZodLiteral<"image">;
272
- url: ZodString;
273
- mediaType: ZodString;
274
- fileName: ZodOptional<ZodString>;
275
- size: ZodOptional<ZodNumber>;
276
- width: ZodOptional<ZodNumber>;
277
- height: ZodOptional<ZodNumber>;
278
- }, $strip>, ZodObject<{
279
- type: ZodLiteral<"file">;
280
- url: ZodString;
281
- mediaType: ZodString;
282
- fileName: ZodOptional<ZodString>;
283
- size: ZodOptional<ZodNumber>;
284
- }, $strip>, ZodObject<{
285
- type: ZodLiteral<"metadata">;
286
- source: ZodEnum<{
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<{
287
283
  email: "email";
288
284
  widget: "widget";
289
285
  api: "api";
290
286
  }>;
291
- }, $strip>]>>;
292
- userId: ZodNullable<ZodString>;
293
- aiAgentId: ZodNullable<ZodString>;
294
- visitorId: ZodNullable<ZodString>;
295
- createdAt: ZodString;
296
- deletedAt: ZodOptional<ZodNullable<ZodString>>;
297
- }, $strip>;
298
- }, $strip>;
299
- type SendTimelineItemResponse = output<typeof sendTimelineItemResponseSchema>;
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>;
300
296
  //#endregion
301
297
  export { GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, SendTimelineItemRequest, SendTimelineItemResponse, TimelineItem };
302
298
  //# sourceMappingURL=timeline-item.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeline-item.d.ts","names":[],"sources":["../../types/src/api/timeline-item.ts"],"sourcesContent":[],"mappings":";;;;;;;;cA4Ha,oBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFwB,SAAA,WAAA;EAAA,SAAA,aAAA,YAAA,UAAA,CAAA,CAAA;AAiBvD,CAAA,QAAY,CAAA;AAKC,KArDD,kBAAA,GAAqB,MAuG9B,CAAA,OAvG6C,kBAuG7C,CAAA;KArGS,YAAA,GAAe,cAAe;cAU7B,2CAAyC;;;;KAe1C,mCAAA,GAAsC,cAC1C;cAGK,4CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAsBb,GAAA,EAAA,KAAA;MAAA,CAAA,CAAA;IAoD9B,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA;IAIC,MAAA,aAAA,UAQV,CAAA;;;;;;;;;KArES,oCAAA,GAAuC,cAC3C;cAIK,+BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAA;;;;;;;;KAdA,uBAAA,GAA0B,CAAA,CAAE,aAChC;cAGK,gCAA8B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAU/B,wBAAA,GAA2B,CAAA,CAAE,aACjC"}
@@ -0,0 +1,120 @@
1
+ import { ConversationEventType, ConversationTimelineType, TimelineItemVisibility } from "../enums.js";
2
+ import { z } from "@hono/zod-openapi";
3
+
4
+ //#region ../types/src/api/timeline-item.ts
5
+ const timelinePartImageSchema = z.object({
6
+ type: z.literal("image").openapi({ description: "Type of timeline part - always 'image' for image parts" }),
7
+ url: z.string().openapi({ description: "URL of the image" }),
8
+ mediaType: z.string().openapi({ description: "MIME type of the image" }),
9
+ fileName: z.string().optional().openapi({ description: "Original filename of the image" }),
10
+ size: z.number().optional().openapi({ description: "Size of the image in bytes" }),
11
+ width: z.number().optional().openapi({ description: "Width of the image in pixels" }),
12
+ height: z.number().optional().openapi({ description: "Height of the image in pixels" })
13
+ });
14
+ const timelinePartTextSchema = z.object({
15
+ type: z.literal("text").openapi({ description: "Type of timeline part - always 'text' for text parts" }),
16
+ text: z.string().openapi({ description: "The text content of this timeline part" })
17
+ });
18
+ const timelineFileSchema = z.object({
19
+ type: z.literal("file").openapi({ description: "Type of timeline part - always 'file' for file parts" }),
20
+ url: z.string().openapi({ description: "URL of the file" }),
21
+ mediaType: z.string().openapi({ description: "MIME type of the file" }),
22
+ fileName: z.string().optional().openapi({ description: "Original filename of the file" }),
23
+ size: z.number().optional().openapi({ description: "Size of the file in bytes" })
24
+ });
25
+ const timelinePartEventSchema = z.object({
26
+ type: z.literal("event").openapi({ description: "Type of timeline part - always 'event' for event parts" }),
27
+ eventType: z.enum([
28
+ ConversationEventType.ASSIGNED,
29
+ ConversationEventType.UNASSIGNED,
30
+ ConversationEventType.PARTICIPANT_REQUESTED,
31
+ ConversationEventType.PARTICIPANT_JOINED,
32
+ ConversationEventType.PARTICIPANT_LEFT,
33
+ ConversationEventType.STATUS_CHANGED,
34
+ ConversationEventType.PRIORITY_CHANGED,
35
+ ConversationEventType.TAG_ADDED,
36
+ ConversationEventType.TAG_REMOVED,
37
+ ConversationEventType.RESOLVED,
38
+ ConversationEventType.REOPENED,
39
+ ConversationEventType.VISITOR_BLOCKED,
40
+ ConversationEventType.VISITOR_UNBLOCKED,
41
+ ConversationEventType.VISITOR_IDENTIFIED
42
+ ]).openapi({ description: "Type of event that occurred" }),
43
+ actorUserId: z.string().nullable().openapi({ description: "User that triggered the event, if applicable" }),
44
+ actorAiAgentId: z.string().nullable().openapi({ description: "AI agent that triggered the event, if applicable" }),
45
+ targetUserId: z.string().nullable().openapi({ description: "User targeted by the event, if applicable" }),
46
+ targetAiAgentId: z.string().nullable().openapi({ description: "AI agent targeted by the event, if applicable" }),
47
+ message: z.string().nullable().optional().openapi({ description: "Optional human readable message attached to the event" })
48
+ });
49
+ const timelinePartMetadataSchema = z.object({
50
+ type: z.literal("metadata").openapi({ description: "Type of timeline part - always 'metadata' for metadata parts" }),
51
+ source: z.enum([
52
+ "email",
53
+ "widget",
54
+ "api"
55
+ ]).openapi({ description: "Source channel through which the message was created" })
56
+ });
57
+ const timelineItemPartsSchema = z.array(z.union([
58
+ timelinePartTextSchema,
59
+ timelinePartEventSchema,
60
+ timelinePartImageSchema,
61
+ timelineFileSchema,
62
+ timelinePartMetadataSchema
63
+ ])).openapi({ description: "Array of timeline parts that make up the timeline item content" });
64
+ const timelineItemSchema = z.object({
65
+ id: z.string().optional().openapi({ description: "Unique identifier for the timeline item" }),
66
+ conversationId: z.string().openapi({ description: "ID of the conversation this timeline item belongs to" }),
67
+ organizationId: z.string().openapi({ description: "ID of the organization this timeline item belongs to" }),
68
+ visibility: z.enum([TimelineItemVisibility.PUBLIC, TimelineItemVisibility.PRIVATE]).openapi({ description: "Visibility level of the timeline item" }),
69
+ type: z.enum([
70
+ ConversationTimelineType.MESSAGE,
71
+ ConversationTimelineType.EVENT,
72
+ ConversationTimelineType.IDENTIFICATION
73
+ ]).openapi({ description: "Type of timeline item - message, event, or interactive identification tool" }),
74
+ text: z.string().nullable().openapi({ description: "Main text content of the timeline item" }),
75
+ tool: z.string().nullable().optional().openapi({ description: "Optional tool identifier associated with this timeline item" }),
76
+ parts: timelineItemPartsSchema,
77
+ userId: z.string().nullable().openapi({ description: "ID of the user who created this timeline item, if applicable" }),
78
+ aiAgentId: z.string().nullable().openapi({ description: "ID of the AI agent that created this timeline item, if applicable" }),
79
+ visitorId: z.string().nullable().openapi({ description: "ID of the visitor who created this timeline item, if applicable" }),
80
+ createdAt: z.string().openapi({ description: "ISO 8601 timestamp when the timeline item was created" }),
81
+ deletedAt: z.string().nullable().optional().openapi({ description: "ISO 8601 timestamp when the timeline item was deleted, if applicable" })
82
+ });
83
+ const getConversationTimelineItemsRequestSchema = z.object({
84
+ limit: z.coerce.number().min(1).max(100).default(50).openapi({
85
+ description: "Number of timeline items to fetch per page",
86
+ default: 50
87
+ }),
88
+ cursor: z.string().nullable().optional().openapi({ description: "Cursor for pagination (timestamp_id format from previous response)" })
89
+ }).openapi({ description: "Query parameters for fetching conversation timeline items" });
90
+ const getConversationTimelineItemsResponseSchema = z.object({
91
+ items: z.array(timelineItemSchema).openapi({ description: "Array of timeline items in chronological order" }),
92
+ nextCursor: z.string().nullable().openapi({ description: "Cursor for the next page, null if no more items are available" }),
93
+ hasNextPage: z.boolean().openapi({ description: "Whether there are more items available to fetch" })
94
+ }).openapi({ description: "Response containing paginated timeline items" });
95
+ const sendTimelineItemRequestSchema = z.object({
96
+ conversationId: z.string().openapi({ description: "ID of the conversation to send the timeline item to" }),
97
+ item: z.object({
98
+ id: z.string().optional().openapi({ description: "Optional client-generated ID for the timeline item" }),
99
+ type: z.enum([ConversationTimelineType.MESSAGE, ConversationTimelineType.EVENT]).default(ConversationTimelineType.MESSAGE).openapi({
100
+ description: "Type of timeline item - defaults to MESSAGE",
101
+ default: ConversationTimelineType.MESSAGE
102
+ }),
103
+ text: z.string().openapi({ description: "Main text content of the timeline item" }),
104
+ parts: timelineItemPartsSchema.optional(),
105
+ visibility: z.enum([TimelineItemVisibility.PUBLIC, TimelineItemVisibility.PRIVATE]).default(TimelineItemVisibility.PUBLIC).openapi({
106
+ description: "Visibility level of the timeline item",
107
+ default: TimelineItemVisibility.PUBLIC
108
+ }),
109
+ tool: z.string().nullable().optional().openapi({ description: "Optional tool identifier when sending non-message timeline items" }),
110
+ userId: z.string().nullable().optional().openapi({ description: "ID of the user creating this timeline item" }),
111
+ aiAgentId: z.string().nullable().optional().openapi({ description: "ID of the AI agent creating this timeline item" }),
112
+ visitorId: z.string().nullable().optional().openapi({ description: "ID of the visitor creating this timeline item" }),
113
+ createdAt: z.string().optional().openapi({ description: "Optional timestamp for the timeline item" })
114
+ })
115
+ }).openapi({ description: "Request body for sending a timeline item to a conversation" });
116
+ const sendTimelineItemResponseSchema = z.object({ item: timelineItemSchema.openapi({ description: "The created timeline item" }) }).openapi({ description: "Response containing the created timeline item" });
117
+
118
+ //#endregion
119
+ export { timelineItemPartsSchema };
120
+ //# sourceMappingURL=timeline-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-item.js","names":[],"sources":["../../../../../types/src/api/timeline-item.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\nimport {\n\tConversationEventType,\n\tConversationTimelineType,\n\tTimelineItemVisibility,\n} from \"../enums\";\n\nconst timelinePartImageSchema = z.object({\n\ttype: z.literal(\"image\").openapi({\n\t\tdescription: \"Type of timeline part - always 'image' for image parts\",\n\t}),\n\turl: z.string().openapi({\n\t\tdescription: \"URL of the image\",\n\t}),\n\tmediaType: z.string().openapi({\n\t\tdescription: \"MIME type of the image\",\n\t}),\n\tfileName: z.string().optional().openapi({\n\t\tdescription: \"Original filename of the image\",\n\t}),\n\tsize: z.number().optional().openapi({\n\t\tdescription: \"Size of the image in bytes\",\n\t}),\n\twidth: z.number().optional().openapi({\n\t\tdescription: \"Width of the image in pixels\",\n\t}),\n\theight: z.number().optional().openapi({\n\t\tdescription: \"Height of the image in pixels\",\n\t}),\n});\n\nconst timelinePartTextSchema = z.object({\n\ttype: z.literal(\"text\").openapi({\n\t\tdescription: \"Type of timeline part - always 'text' for text parts\",\n\t}),\n\ttext: z.string().openapi({\n\t\tdescription: \"The text content of this timeline part\",\n\t}),\n});\n\nconst timelineFileSchema = z.object({\n\ttype: z.literal(\"file\").openapi({\n\t\tdescription: \"Type of timeline part - always 'file' for file parts\",\n\t}),\n\turl: z.string().openapi({\n\t\tdescription: \"URL of the file\",\n\t}),\n\tmediaType: z.string().openapi({\n\t\tdescription: \"MIME type of the file\",\n\t}),\n\tfileName: z.string().optional().openapi({\n\t\tdescription: \"Original filename of the file\",\n\t}),\n\tsize: z.number().optional().openapi({\n\t\tdescription: \"Size of the file in bytes\",\n\t}),\n});\n\nconst timelinePartEventSchema = z.object({\n\ttype: z.literal(\"event\").openapi({\n\t\tdescription: \"Type of timeline part - always 'event' for event parts\",\n\t}),\n\teventType: z\n\t\t.enum([\n\t\t\tConversationEventType.ASSIGNED,\n\t\t\tConversationEventType.UNASSIGNED,\n\t\t\tConversationEventType.PARTICIPANT_REQUESTED,\n\t\t\tConversationEventType.PARTICIPANT_JOINED,\n\t\t\tConversationEventType.PARTICIPANT_LEFT,\n\t\t\tConversationEventType.STATUS_CHANGED,\n\t\t\tConversationEventType.PRIORITY_CHANGED,\n\t\t\tConversationEventType.TAG_ADDED,\n\t\t\tConversationEventType.TAG_REMOVED,\n\t\t\tConversationEventType.RESOLVED,\n\t\t\tConversationEventType.REOPENED,\n\t\t\tConversationEventType.VISITOR_BLOCKED,\n\t\t\tConversationEventType.VISITOR_UNBLOCKED,\n\t\t\tConversationEventType.VISITOR_IDENTIFIED,\n\t\t])\n\t\t.openapi({\n\t\t\tdescription: \"Type of event that occurred\",\n\t\t}),\n\tactorUserId: z.string().nullable().openapi({\n\t\tdescription: \"User that triggered the event, if applicable\",\n\t}),\n\tactorAiAgentId: z.string().nullable().openapi({\n\t\tdescription: \"AI agent that triggered the event, if applicable\",\n\t}),\n\ttargetUserId: z.string().nullable().openapi({\n\t\tdescription: \"User targeted by the event, if applicable\",\n\t}),\n\ttargetAiAgentId: z.string().nullable().openapi({\n\t\tdescription: \"AI agent targeted by the event, if applicable\",\n\t}),\n\tmessage: z.string().nullable().optional().openapi({\n\t\tdescription: \"Optional human readable message attached to the event\",\n\t}),\n});\n\nconst timelinePartMetadataSchema = z.object({\n\ttype: z.literal(\"metadata\").openapi({\n\t\tdescription: \"Type of timeline part - always 'metadata' for metadata parts\",\n\t}),\n\tsource: z.enum([\"email\", \"widget\", \"api\"]).openapi({\n\t\tdescription: \"Source channel through which the message was created\",\n\t}),\n});\n\nexport const timelineItemPartsSchema = z\n\t.array(\n\t\tz.union([\n\t\t\ttimelinePartTextSchema,\n\t\t\ttimelinePartEventSchema,\n\t\t\ttimelinePartImageSchema,\n\t\t\ttimelineFileSchema,\n\t\t\ttimelinePartMetadataSchema,\n\t\t])\n\t)\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Array of timeline parts that make up the timeline item content\",\n\t});\n\nexport const timelineItemSchema = z.object({\n\tid: z.string().optional().openapi({\n\t\tdescription: \"Unique identifier for the timeline item\",\n\t}),\n\tconversationId: z.string().openapi({\n\t\tdescription: \"ID of the conversation this timeline item belongs to\",\n\t}),\n\torganizationId: z.string().openapi({\n\t\tdescription: \"ID of the organization this timeline item belongs to\",\n\t}),\n\tvisibility: z\n\t\t.enum([TimelineItemVisibility.PUBLIC, TimelineItemVisibility.PRIVATE])\n\t\t.openapi({\n\t\t\tdescription: \"Visibility level of the timeline item\",\n\t\t}),\n\ttype: z\n\t\t.enum([\n\t\t\tConversationTimelineType.MESSAGE,\n\t\t\tConversationTimelineType.EVENT,\n\t\t\tConversationTimelineType.IDENTIFICATION,\n\t\t])\n\t\t.openapi({\n\t\t\tdescription:\n\t\t\t\t\"Type of timeline item - message, event, or interactive identification tool\",\n\t\t}),\n\ttext: z.string().nullable().openapi({\n\t\tdescription: \"Main text content of the timeline item\",\n\t}),\n\ttool: z.string().nullable().optional().openapi({\n\t\tdescription: \"Optional tool identifier associated with this timeline item\",\n\t}),\n\tparts: timelineItemPartsSchema,\n\tuserId: z.string().nullable().openapi({\n\t\tdescription: \"ID of the user who created this timeline item, if applicable\",\n\t}),\n\taiAgentId: z.string().nullable().openapi({\n\t\tdescription:\n\t\t\t\"ID of the AI agent that created this timeline item, if applicable\",\n\t}),\n\tvisitorId: z.string().nullable().openapi({\n\t\tdescription:\n\t\t\t\"ID of the visitor who created this timeline item, if applicable\",\n\t}),\n\tcreatedAt: z.string().openapi({\n\t\tdescription: \"ISO 8601 timestamp when the timeline item was created\",\n\t}),\n\tdeletedAt: z.string().nullable().optional().openapi({\n\t\tdescription:\n\t\t\t\"ISO 8601 timestamp when the timeline item was deleted, if applicable\",\n\t}),\n});\n\nexport type timelineItemSchema = z.infer<typeof timelineItemSchema>;\n\nexport type TimelineItem = z.infer<typeof timelineItemSchema>;\nexport type TimelineItemParts = z.infer<typeof timelineItemPartsSchema>;\n\nexport type TimelinePartText = z.infer<typeof timelinePartTextSchema>;\nexport type TimelinePartImage = z.infer<typeof timelinePartImageSchema>;\nexport type TimelinePartFile = z.infer<typeof timelineFileSchema>;\nexport type TimelinePartEvent = z.infer<typeof timelinePartEventSchema>;\nexport type TimelinePartMetadata = z.infer<typeof timelinePartMetadataSchema>;\n\n// REST API Schemas\nexport const getConversationTimelineItemsRequestSchema = z\n\t.object({\n\t\tlimit: z.coerce.number().min(1).max(100).default(50).openapi({\n\t\t\tdescription: \"Number of timeline items to fetch per page\",\n\t\t\tdefault: 50,\n\t\t}),\n\t\tcursor: z.string().nullable().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Cursor for pagination (timestamp_id format from previous response)\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Query parameters for fetching conversation timeline items\",\n\t});\n\nexport type GetConversationTimelineItemsRequest = z.infer<\n\ttypeof getConversationTimelineItemsRequestSchema\n>;\n\nexport const getConversationTimelineItemsResponseSchema = z\n\t.object({\n\t\titems: z.array(timelineItemSchema).openapi({\n\t\t\tdescription: \"Array of timeline items in chronological order\",\n\t\t}),\n\t\tnextCursor: z.string().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Cursor for the next page, null if no more items are available\",\n\t\t}),\n\t\thasNextPage: z.boolean().openapi({\n\t\t\tdescription: \"Whether there are more items available to fetch\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response containing paginated timeline items\",\n\t});\n\nexport type GetConversationTimelineItemsResponse = z.infer<\n\ttypeof getConversationTimelineItemsResponseSchema\n>;\n\n// Send Timeline Item (Message) Schemas\nexport const sendTimelineItemRequestSchema = z\n\t.object({\n\t\tconversationId: z.string().openapi({\n\t\t\tdescription: \"ID of the conversation to send the timeline item to\",\n\t\t}),\n\t\titem: z.object({\n\t\t\tid: z.string().optional().openapi({\n\t\t\t\tdescription: \"Optional client-generated ID for the timeline item\",\n\t\t\t}),\n\t\t\ttype: z\n\t\t\t\t.enum([\n\t\t\t\t\tConversationTimelineType.MESSAGE,\n\t\t\t\t\tConversationTimelineType.EVENT,\n\t\t\t\t])\n\t\t\t\t.default(ConversationTimelineType.MESSAGE)\n\t\t\t\t.openapi({\n\t\t\t\t\tdescription: \"Type of timeline item - defaults to MESSAGE\",\n\t\t\t\t\tdefault: ConversationTimelineType.MESSAGE,\n\t\t\t\t}),\n\t\t\ttext: z.string().openapi({\n\t\t\t\tdescription: \"Main text content of the timeline item\",\n\t\t\t}),\n\t\t\tparts: timelineItemPartsSchema.optional(),\n\t\t\tvisibility: z\n\t\t\t\t.enum([TimelineItemVisibility.PUBLIC, TimelineItemVisibility.PRIVATE])\n\t\t\t\t.default(TimelineItemVisibility.PUBLIC)\n\t\t\t\t.openapi({\n\t\t\t\t\tdescription: \"Visibility level of the timeline item\",\n\t\t\t\t\tdefault: TimelineItemVisibility.PUBLIC,\n\t\t\t\t}),\n\t\t\ttool: z.string().nullable().optional().openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Optional tool identifier when sending non-message timeline items\",\n\t\t\t}),\n\t\t\tuserId: z.string().nullable().optional().openapi({\n\t\t\t\tdescription: \"ID of the user creating this timeline item\",\n\t\t\t}),\n\t\t\taiAgentId: z.string().nullable().optional().openapi({\n\t\t\t\tdescription: \"ID of the AI agent creating this timeline item\",\n\t\t\t}),\n\t\t\tvisitorId: z.string().nullable().optional().openapi({\n\t\t\t\tdescription: \"ID of the visitor creating this timeline item\",\n\t\t\t}),\n\t\t\tcreatedAt: z.string().optional().openapi({\n\t\t\t\tdescription: \"Optional timestamp for the timeline item\",\n\t\t\t}),\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request body for sending a timeline item to a conversation\",\n\t});\n\nexport type SendTimelineItemRequest = z.infer<\n\ttypeof sendTimelineItemRequestSchema\n>;\n\nexport const sendTimelineItemResponseSchema = z\n\t.object({\n\t\titem: timelineItemSchema.openapi({\n\t\t\tdescription: \"The created timeline item\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response containing the created timeline item\",\n\t});\n\nexport type SendTimelineItemResponse = z.infer<\n\ttypeof sendTimelineItemResponseSchema\n>;\n"],"mappings":";;;;AAQA,MAAM,0BAA0B,EAAE,OAAO;CACxC,MAAM,EAAE,QAAQ,QAAQ,CAAC,QAAQ,EAChC,aAAa,0DACb,CAAC;CACF,KAAK,EAAE,QAAQ,CAAC,QAAQ,EACvB,aAAa,oBACb,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAC7B,aAAa,0BACb,CAAC;CACF,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EACvC,aAAa,kCACb,CAAC;CACF,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EACnC,aAAa,8BACb,CAAC;CACF,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EACpC,aAAa,gCACb,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,aAAa,0CACb,CAAC;EACF,OAAO,wBAAwB,UAAU;EACzC,YAAY,EACV,KAAK,CAAC,uBAAuB,QAAQ,uBAAuB,QAAQ,CAAC,CACrE,QAAQ,uBAAuB,OAAO,CACtC,QAAQ;GACR,aAAa;GACb,SAAS,uBAAuB;GAChC,CAAC;EACH,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EAC9C,aACC,oEACD,CAAC;EACF,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EAChD,aAAa,8CACb,CAAC;EACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EACnD,aAAa,kDACb,CAAC;EACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EACnD,aAAa,iDACb,CAAC;EACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EACxC,aAAa,4CACb,CAAC;EACF,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,8DACb,CAAC;AAMH,MAAa,iCAAiC,EAC5C,OAAO,EACP,MAAM,mBAAmB,QAAQ,EAChC,aAAa,6BACb,CAAC,EACF,CAAC,CACD,QAAQ,EACR,aAAa,iDACb,CAAC"}
@@ -0,0 +1 @@
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;AAKD,MAAa,wBAAwB;CACpC,UAAU;CACV,YAAY;CACZ,uBAAuB;CACvB,oBAAoB;CACpB,kBAAkB;CAClB,gBAAgB;CAChB,kBAAkB;CAClB,WAAW;CACX,aAAa;CACb,UAAU;CACV,UAAU;CACV,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CACpB"}