@noodleseed/one 0.176.0 → 0.178.0

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 (73) hide show
  1. package/dist/commands/solutions-activity.d.ts.map +1 -1
  2. package/dist/commands/solutions-activity.js +9 -35
  3. package/dist/commands/solutions-activity.js.map +1 -1
  4. package/dist/commands/solutions-conversations.d.ts +6 -0
  5. package/dist/commands/solutions-conversations.d.ts.map +1 -0
  6. package/dist/commands/solutions-conversations.js +191 -0
  7. package/dist/commands/solutions-conversations.js.map +1 -0
  8. package/dist/commands/solutions-history.d.ts +9 -0
  9. package/dist/commands/solutions-history.d.ts.map +1 -0
  10. package/dist/commands/solutions-history.js +166 -0
  11. package/dist/commands/solutions-history.js.map +1 -0
  12. package/dist/commands/solutions-ops.d.ts.map +1 -1
  13. package/dist/commands/solutions-ops.js +6 -0
  14. package/dist/commands/solutions-ops.js.map +1 -1
  15. package/dist/commands/whatsapp-ops.d.ts.map +1 -1
  16. package/dist/commands/whatsapp-ops.js +0 -7
  17. package/dist/commands/whatsapp-ops.js.map +1 -1
  18. package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +1 -1
  19. package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.js +14 -0
  20. package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
  21. package/node_modules/@noodle-borg/assistant-gateway/dist/public-surface.d.ts +6 -0
  22. package/node_modules/@noodle-borg/assistant-gateway/dist/public-surface.js +5 -2
  23. package/node_modules/@noodle-borg/assistant-gateway/package.json +1 -1
  24. package/node_modules/@noodle-borg/authoring/dist/assistant.d.ts +18 -0
  25. package/node_modules/@noodle-borg/authoring/dist/assistant.js +14 -1
  26. package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-channels.js +0 -3
  27. package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-solution-conversations.js +142 -0
  28. package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-solution-history.js +82 -0
  29. package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-solutions.js +5 -42
  30. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +8 -0
  31. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js +7 -0
  32. package/node_modules/@noodle-borg/service/dist/application-activity.js +76 -21
  33. package/node_modules/@noodle-borg/service/dist/application-history-settings.js +108 -0
  34. package/node_modules/@noodle-borg/service/dist/assistant-composition.js +11 -2
  35. package/node_modules/@noodle-borg/service/dist/channels/composition.js +10 -1
  36. package/node_modules/@noodle-borg/service/dist/channels/provider.js +40 -4
  37. package/node_modules/@noodle-borg/service/dist/channels/runtime.js +31 -5
  38. package/node_modules/@noodle-borg/service/dist/conversation-history/capture.js +63 -7
  39. package/node_modules/@noodle-borg/service/dist/conversation-history/contracts.js +13 -0
  40. package/node_modules/@noodle-borg/service/dist/conversation-history/customer.js +118 -0
  41. package/node_modules/@noodle-borg/service/dist/conversation-history/operator.js +293 -0
  42. package/node_modules/@noodle-borg/service/dist/routes/assistant-conversations.js +52 -0
  43. package/node_modules/@noodle-borg/service/dist/routes/assistant-dispatch.js +6 -0
  44. package/node_modules/@noodle-borg/service/dist/routes/assistant-elevation.js +3 -0
  45. package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-stream.js +2 -1
  46. package/node_modules/@noodle-borg/service/dist/routes/assistant-interactions.js +6 -11
  47. package/node_modules/@noodle-borg/service/dist/routes/assistant-public-session.js +6 -0
  48. package/node_modules/@noodle-borg/service/dist/routes/assistant-route-http.js +16 -0
  49. package/node_modules/@noodle-borg/service/dist/routes/assistant.js +5 -17
  50. package/node_modules/@noodle-borg/service/dist/routes/business-information-activity.js +6 -5
  51. package/node_modules/@noodle-borg/service/dist/routes/business-information-conversations.js +90 -0
  52. package/node_modules/@noodle-borg/service/dist/routes/business-information-dispatch.js +7 -2
  53. package/node_modules/@noodle-borg/service/dist/routes/business-information-paths.js +20 -2
  54. package/node_modules/@noodle-borg/service/dist/routes/business-information.js +4 -0
  55. package/node_modules/@noodle-borg/service/dist/routes/whatsapp.js +0 -10
  56. package/node_modules/@noodle-borg/service/dist/service-history-projections.js +52 -0
  57. package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js +32 -0
  58. package/node_modules/@noodle-borg/service/dist/service.js +6 -9
  59. package/node_modules/@noodle-borg/service/package.json +1 -1
  60. package/node_modules/@noodle-borg/wire-contracts/dist/application-activity.d.ts +0 -28
  61. package/node_modules/@noodle-borg/wire-contracts/dist/application-activity.js +0 -18
  62. package/node_modules/@noodle-borg/wire-contracts/dist/application-history-settings.d.ts +190 -0
  63. package/node_modules/@noodle-borg/wire-contracts/dist/application-history-settings.js +92 -0
  64. package/node_modules/@noodle-borg/wire-contracts/dist/assistant.d.ts +3 -0
  65. package/node_modules/@noodle-borg/wire-contracts/dist/assistant.js +6 -0
  66. package/node_modules/@noodle-borg/wire-contracts/dist/conversation-history.d.ts +523 -0
  67. package/node_modules/@noodle-borg/wire-contracts/dist/conversation-history.js +192 -0
  68. package/node_modules/@noodle-borg/wire-contracts/dist/index.d.ts +2 -0
  69. package/node_modules/@noodle-borg/wire-contracts/dist/index.js +2 -0
  70. package/node_modules/@noodle-borg/wire-contracts/dist/whatsapp.d.ts +2 -2
  71. package/node_modules/@noodleseed/assistant/README.md +19 -0
  72. package/node_modules/@noodleseed/assistant/package.json +1 -1
  73. package/package.json +2 -2
@@ -0,0 +1,92 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * One installation history setting (ADR 0241 decision 6): an Activity duration and a conversation
4
+ * duration (which may be Off) under the plan cap, plus per-channel recording switches, sharing one
5
+ * revision. Server output is strict; the `*ClientResponseSchema` variants tolerate additive fields.
6
+ */
7
+ const DaysSchema = z.number().int().min(1).max(365);
8
+ const RevisionSchema = z.string().regex(/^[a-f0-9]{64}$/);
9
+ const CountSchema = z.number().int().nonnegative();
10
+ export const HistorySourcesSchema = z.strictObject({
11
+ websiteVisitors: z.boolean(),
12
+ signedInCustomers: z.boolean(),
13
+ whatsapp: z.boolean(),
14
+ });
15
+ /** A surface the application declared `history: false` on, named by its authoring constructor. */
16
+ export const ApplicationHistoryDisabledSurfaceSchema = z.enum([
17
+ 'publicWebsite',
18
+ 'authenticatedWebsite',
19
+ 'publicMessaging',
20
+ ]);
21
+ export const ApplicationHistorySettingsSchema = z.strictObject({
22
+ revision: RevisionSchema,
23
+ canEdit: z.boolean(),
24
+ activity: z.strictObject({
25
+ retentionDays: DaysSchema,
26
+ maximumDays: DaysSchema,
27
+ defaultDays: DaysSchema,
28
+ }),
29
+ /** `not_enabled`: never opted in, so nothing is recorded; `off`: an Owner/Admin turned it off. */
30
+ conversations: z.strictObject({
31
+ state: z.enum(['not_enabled', 'off', 'on']),
32
+ retentionDays: DaysSchema.optional(),
33
+ sources: HistorySourcesSchema,
34
+ /**
35
+ * Surfaces whose chats are never kept, whatever this setting says, because the application
36
+ * declared `history: false` in server.ts (ADR 0241 decision 11). Absent when none do.
37
+ */
38
+ disabledByApplication: z.array(ApplicationHistoryDisabledSurfaceSchema).min(1).optional(),
39
+ }),
40
+ });
41
+ export const ApplicationHistorySettingsResponseSchema = z.strictObject({
42
+ ok: z.literal(true),
43
+ data: ApplicationHistorySettingsSchema,
44
+ });
45
+ /** Omitted fields keep their value; `dryRun` reports the effect without saving. */
46
+ export const ApplicationHistorySettingsSaveRequestSchema = z
47
+ .strictObject({
48
+ expectedRevision: RevisionSchema,
49
+ activityDays: DaysSchema.optional(),
50
+ conversations: z
51
+ .union([z.strictObject({ retentionDays: DaysSchema }), z.literal('off')])
52
+ .optional(),
53
+ sources: HistorySourcesSchema.partial().optional(),
54
+ dryRun: z.boolean().optional(),
55
+ })
56
+ .refine((value) => value.activityDays !== undefined ||
57
+ value.conversations !== undefined ||
58
+ value.sources !== undefined, { message: 'Change at least one history setting.' });
59
+ /** Existing conversation history older than the proposed conversation window. */
60
+ const HistoryImpactSchema = z.strictObject({ conversations: CountSchema, items: CountSchema });
61
+ export const ApplicationHistorySettingsSaveResponseSchema = z.strictObject({
62
+ ok: z.literal(true),
63
+ data: z.strictObject({
64
+ dryRun: z.boolean(),
65
+ /** Whether the change shortens or turns off conversation history, which needs confirmation. */
66
+ shortensConversations: z.boolean(),
67
+ impact: HistoryImpactSchema,
68
+ /** The saved setting, or the unchanged current one for a dry run. */
69
+ settings: ApplicationHistorySettingsSchema,
70
+ }),
71
+ });
72
+ const ClientSettingsSchema = z.object({
73
+ ...ApplicationHistorySettingsSchema.shape,
74
+ activity: z.object(ApplicationHistorySettingsSchema.shape.activity.shape),
75
+ conversations: z.object({
76
+ ...ApplicationHistorySettingsSchema.shape.conversations.shape,
77
+ sources: z.object(HistorySourcesSchema.shape),
78
+ }),
79
+ });
80
+ export const ApplicationHistorySettingsClientResponseSchema = z.object({
81
+ ok: z.literal(true),
82
+ data: ClientSettingsSchema,
83
+ });
84
+ export const ApplicationHistorySettingsSaveClientResponseSchema = z.object({
85
+ ok: z.literal(true),
86
+ data: z.object({
87
+ ...ApplicationHistorySettingsSaveResponseSchema.shape.data.shape,
88
+ impact: z.object(HistoryImpactSchema.shape),
89
+ settings: ClientSettingsSchema,
90
+ }),
91
+ });
92
+ //# sourceMappingURL=application-history-settings.js.map
@@ -31,6 +31,9 @@ export declare const assistantSessionResponseSchema: z.ZodObject<{
31
31
  tool: z.ZodString;
32
32
  }, z.core.$strip>>;
33
33
  continuedAfterAuthentication: z.ZodOptional<z.ZodLiteral<true>>;
34
+ history: z.ZodOptional<z.ZodObject<{
35
+ retentionDays: z.ZodNumber;
36
+ }, z.core.$strip>>;
34
37
  }, z.core.$strip>;
35
38
  export type AssistantSessionResponse = z.infer<typeof assistantSessionResponseSchema>;
36
39
  /** MCP-Apps-shaped, author-selected renderer summary included on one assistant turn. */
@@ -61,6 +61,12 @@ export const assistantSessionResponseSchema = z.object({
61
61
  resume: z.object({ tool: z.string().min(1) }).optional(),
62
62
  /** Additive elevation marker; the client renders one bounded continuation status. */
63
63
  continuedAfterAuthentication: z.literal(true).optional(),
64
+ /**
65
+ * Additive retention notice (ADR 0241 decision 17): present only when this caller's conversation
66
+ * is recorded. Top level, never inside `configuration`, whose strict browser schema would make an
67
+ * older widget drop its whole appearance; older widgets ignore unknown top-level keys.
68
+ */
69
+ history: z.object({ retentionDays: z.number().int().min(1).max(365) }).optional(),
64
70
  });
65
71
  const recoverableViewSchema = z
66
72
  .object({
@@ -0,0 +1,523 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Staff projection of durable conversation history (ADR 0241). Server output is strict; the tolerant
4
+ * `*ClientResponseSchema` variants let older clients ignore additive fields.
5
+ */
6
+ export declare const ConversationIdSchema: z.ZodString;
7
+ export declare const ConversationChannelSchema: z.ZodEnum<{
8
+ whatsapp: "whatsapp";
9
+ website: "website";
10
+ }>;
11
+ /** Staff review state; a failed tool outcome sets `needs_attention` automatically. */
12
+ export declare const ConversationReviewStatusSchema: z.ZodEnum<{
13
+ new: "new";
14
+ needs_attention: "needs_attention";
15
+ reviewed: "reviewed";
16
+ }>;
17
+ export type ConversationReviewStatus = z.infer<typeof ConversationReviewStatusSchema>;
18
+ export declare const ConversationSummarySchema: z.ZodObject<{
19
+ id: z.ZodString;
20
+ channel: z.ZodEnum<{
21
+ whatsapp: "whatsapp";
22
+ website: "website";
23
+ }>;
24
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
25
+ kind: z.ZodLiteral<"anonymous">;
26
+ }, z.core.$strict>, z.ZodObject<{
27
+ kind: z.ZodLiteral<"customer">;
28
+ ref: z.ZodString;
29
+ }, z.core.$strict>, z.ZodObject<{
30
+ kind: z.ZodLiteral<"participant">;
31
+ ref: z.ZodString;
32
+ }, z.core.$strict>], "kind">;
33
+ startedAt: z.ZodISODateTime;
34
+ lastMessageAt: z.ZodISODateTime;
35
+ itemCount: z.ZodNumber;
36
+ reviewStatus: z.ZodEnum<{
37
+ new: "new";
38
+ needs_attention: "needs_attention";
39
+ reviewed: "reviewed";
40
+ }>;
41
+ }, z.core.$strict>;
42
+ export declare const ConversationItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
43
+ kind: z.ZodLiteral<"message">;
44
+ role: z.ZodEnum<{
45
+ assistant: "assistant";
46
+ user: "user";
47
+ }>;
48
+ text: z.ZodString;
49
+ at: z.ZodISODateTime;
50
+ }, z.core.$strict>, z.ZodObject<{
51
+ kind: z.ZodLiteral<"outcome">;
52
+ interactionId: z.ZodString;
53
+ tool: z.ZodString;
54
+ status: z.ZodEnum<{
55
+ failed: "failed";
56
+ succeeded: "succeeded";
57
+ declined: "declined";
58
+ cancelled: "cancelled";
59
+ }>;
60
+ at: z.ZodISODateTime;
61
+ }, z.core.$strict>], "kind">;
62
+ export declare const ConversationDetailSchema: z.ZodObject<{
63
+ expiresAt: z.ZodISODateTime;
64
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
65
+ kind: z.ZodLiteral<"message">;
66
+ role: z.ZodEnum<{
67
+ assistant: "assistant";
68
+ user: "user";
69
+ }>;
70
+ text: z.ZodString;
71
+ at: z.ZodISODateTime;
72
+ }, z.core.$strict>, z.ZodObject<{
73
+ kind: z.ZodLiteral<"outcome">;
74
+ interactionId: z.ZodString;
75
+ tool: z.ZodString;
76
+ status: z.ZodEnum<{
77
+ failed: "failed";
78
+ succeeded: "succeeded";
79
+ declined: "declined";
80
+ cancelled: "cancelled";
81
+ }>;
82
+ at: z.ZodISODateTime;
83
+ }, z.core.$strict>], "kind">>;
84
+ id: z.ZodString;
85
+ channel: z.ZodEnum<{
86
+ whatsapp: "whatsapp";
87
+ website: "website";
88
+ }>;
89
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
90
+ kind: z.ZodLiteral<"anonymous">;
91
+ }, z.core.$strict>, z.ZodObject<{
92
+ kind: z.ZodLiteral<"customer">;
93
+ ref: z.ZodString;
94
+ }, z.core.$strict>, z.ZodObject<{
95
+ kind: z.ZodLiteral<"participant">;
96
+ ref: z.ZodString;
97
+ }, z.core.$strict>], "kind">;
98
+ startedAt: z.ZodISODateTime;
99
+ lastMessageAt: z.ZodISODateTime;
100
+ itemCount: z.ZodNumber;
101
+ reviewStatus: z.ZodEnum<{
102
+ new: "new";
103
+ needs_attention: "needs_attention";
104
+ reviewed: "reviewed";
105
+ }>;
106
+ }, z.core.$strict>;
107
+ /** A private staff note: never sent to the customer, never exported, removed with its conversation. */
108
+ export declare const ConversationNoteSchema: z.ZodObject<{
109
+ author: z.ZodString;
110
+ text: z.ZodString;
111
+ at: z.ZodISODateTime;
112
+ }, z.core.$strict>;
113
+ /** Show adds the private notes that export leaves out. */
114
+ export declare const ConversationShowSchema: z.ZodObject<{
115
+ notes: z.ZodArray<z.ZodObject<{
116
+ author: z.ZodString;
117
+ text: z.ZodString;
118
+ at: z.ZodISODateTime;
119
+ }, z.core.$strict>>;
120
+ expiresAt: z.ZodISODateTime;
121
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
122
+ kind: z.ZodLiteral<"message">;
123
+ role: z.ZodEnum<{
124
+ assistant: "assistant";
125
+ user: "user";
126
+ }>;
127
+ text: z.ZodString;
128
+ at: z.ZodISODateTime;
129
+ }, z.core.$strict>, z.ZodObject<{
130
+ kind: z.ZodLiteral<"outcome">;
131
+ interactionId: z.ZodString;
132
+ tool: z.ZodString;
133
+ status: z.ZodEnum<{
134
+ failed: "failed";
135
+ succeeded: "succeeded";
136
+ declined: "declined";
137
+ cancelled: "cancelled";
138
+ }>;
139
+ at: z.ZodISODateTime;
140
+ }, z.core.$strict>], "kind">>;
141
+ id: z.ZodString;
142
+ channel: z.ZodEnum<{
143
+ whatsapp: "whatsapp";
144
+ website: "website";
145
+ }>;
146
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
147
+ kind: z.ZodLiteral<"anonymous">;
148
+ }, z.core.$strict>, z.ZodObject<{
149
+ kind: z.ZodLiteral<"customer">;
150
+ ref: z.ZodString;
151
+ }, z.core.$strict>, z.ZodObject<{
152
+ kind: z.ZodLiteral<"participant">;
153
+ ref: z.ZodString;
154
+ }, z.core.$strict>], "kind">;
155
+ startedAt: z.ZodISODateTime;
156
+ lastMessageAt: z.ZodISODateTime;
157
+ itemCount: z.ZodNumber;
158
+ reviewStatus: z.ZodEnum<{
159
+ new: "new";
160
+ needs_attention: "needs_attention";
161
+ reviewed: "reviewed";
162
+ }>;
163
+ }, z.core.$strict>;
164
+ export declare const ConversationListResponseSchema: z.ZodObject<{
165
+ ok: z.ZodLiteral<true>;
166
+ data: z.ZodObject<{
167
+ conversations: z.ZodArray<z.ZodObject<{
168
+ id: z.ZodString;
169
+ channel: z.ZodEnum<{
170
+ whatsapp: "whatsapp";
171
+ website: "website";
172
+ }>;
173
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
174
+ kind: z.ZodLiteral<"anonymous">;
175
+ }, z.core.$strict>, z.ZodObject<{
176
+ kind: z.ZodLiteral<"customer">;
177
+ ref: z.ZodString;
178
+ }, z.core.$strict>, z.ZodObject<{
179
+ kind: z.ZodLiteral<"participant">;
180
+ ref: z.ZodString;
181
+ }, z.core.$strict>], "kind">;
182
+ startedAt: z.ZodISODateTime;
183
+ lastMessageAt: z.ZodISODateTime;
184
+ itemCount: z.ZodNumber;
185
+ reviewStatus: z.ZodEnum<{
186
+ new: "new";
187
+ needs_attention: "needs_attention";
188
+ reviewed: "reviewed";
189
+ }>;
190
+ }, z.core.$strict>>;
191
+ nextCursor: z.ZodOptional<z.ZodString>;
192
+ }, z.core.$strict>;
193
+ }, z.core.$strict>;
194
+ /** Show and review both answer with the conversation as staff now see it. */
195
+ export declare const ConversationShowResponseSchema: z.ZodObject<{
196
+ ok: z.ZodLiteral<true>;
197
+ data: z.ZodObject<{
198
+ conversation: z.ZodObject<{
199
+ notes: z.ZodArray<z.ZodObject<{
200
+ author: z.ZodString;
201
+ text: z.ZodString;
202
+ at: z.ZodISODateTime;
203
+ }, z.core.$strict>>;
204
+ expiresAt: z.ZodISODateTime;
205
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
206
+ kind: z.ZodLiteral<"message">;
207
+ role: z.ZodEnum<{
208
+ assistant: "assistant";
209
+ user: "user";
210
+ }>;
211
+ text: z.ZodString;
212
+ at: z.ZodISODateTime;
213
+ }, z.core.$strict>, z.ZodObject<{
214
+ kind: z.ZodLiteral<"outcome">;
215
+ interactionId: z.ZodString;
216
+ tool: z.ZodString;
217
+ status: z.ZodEnum<{
218
+ failed: "failed";
219
+ succeeded: "succeeded";
220
+ declined: "declined";
221
+ cancelled: "cancelled";
222
+ }>;
223
+ at: z.ZodISODateTime;
224
+ }, z.core.$strict>], "kind">>;
225
+ id: z.ZodString;
226
+ channel: z.ZodEnum<{
227
+ whatsapp: "whatsapp";
228
+ website: "website";
229
+ }>;
230
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
231
+ kind: z.ZodLiteral<"anonymous">;
232
+ }, z.core.$strict>, z.ZodObject<{
233
+ kind: z.ZodLiteral<"customer">;
234
+ ref: z.ZodString;
235
+ }, z.core.$strict>, z.ZodObject<{
236
+ kind: z.ZodLiteral<"participant">;
237
+ ref: z.ZodString;
238
+ }, z.core.$strict>], "kind">;
239
+ startedAt: z.ZodISODateTime;
240
+ lastMessageAt: z.ZodISODateTime;
241
+ itemCount: z.ZodNumber;
242
+ reviewStatus: z.ZodEnum<{
243
+ new: "new";
244
+ needs_attention: "needs_attention";
245
+ reviewed: "reviewed";
246
+ }>;
247
+ }, z.core.$strict>;
248
+ }, z.core.$strict>;
249
+ }, z.core.$strict>;
250
+ /** Review status needs `records:status`, a note `records:note`; at least one is required. */
251
+ export declare const ConversationReviewRequestSchema: z.ZodObject<{
252
+ reviewStatus: z.ZodOptional<z.ZodEnum<{
253
+ new: "new";
254
+ needs_attention: "needs_attention";
255
+ reviewed: "reviewed";
256
+ }>>;
257
+ note: z.ZodOptional<z.ZodString>;
258
+ }, z.core.$strict>;
259
+ export type ConversationReviewRequest = z.infer<typeof ConversationReviewRequestSchema>;
260
+ export declare const ConversationExportResponseSchema: z.ZodObject<{
261
+ ok: z.ZodLiteral<true>;
262
+ data: z.ZodObject<{
263
+ conversations: z.ZodArray<z.ZodObject<{
264
+ expiresAt: z.ZodISODateTime;
265
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
266
+ kind: z.ZodLiteral<"message">;
267
+ role: z.ZodEnum<{
268
+ assistant: "assistant";
269
+ user: "user";
270
+ }>;
271
+ text: z.ZodString;
272
+ at: z.ZodISODateTime;
273
+ }, z.core.$strict>, z.ZodObject<{
274
+ kind: z.ZodLiteral<"outcome">;
275
+ interactionId: z.ZodString;
276
+ tool: z.ZodString;
277
+ status: z.ZodEnum<{
278
+ failed: "failed";
279
+ succeeded: "succeeded";
280
+ declined: "declined";
281
+ cancelled: "cancelled";
282
+ }>;
283
+ at: z.ZodISODateTime;
284
+ }, z.core.$strict>], "kind">>;
285
+ id: z.ZodString;
286
+ channel: z.ZodEnum<{
287
+ whatsapp: "whatsapp";
288
+ website: "website";
289
+ }>;
290
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
291
+ kind: z.ZodLiteral<"anonymous">;
292
+ }, z.core.$strict>, z.ZodObject<{
293
+ kind: z.ZodLiteral<"customer">;
294
+ ref: z.ZodString;
295
+ }, z.core.$strict>, z.ZodObject<{
296
+ kind: z.ZodLiteral<"participant">;
297
+ ref: z.ZodString;
298
+ }, z.core.$strict>], "kind">;
299
+ startedAt: z.ZodISODateTime;
300
+ lastMessageAt: z.ZodISODateTime;
301
+ itemCount: z.ZodNumber;
302
+ reviewStatus: z.ZodEnum<{
303
+ new: "new";
304
+ needs_attention: "needs_attention";
305
+ reviewed: "reviewed";
306
+ }>;
307
+ }, z.core.$strict>>;
308
+ nextCursor: z.ZodOptional<z.ZodString>;
309
+ }, z.core.$strict>;
310
+ }, z.core.$strict>;
311
+ export declare const ConversationForgetRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
312
+ conversationId: z.ZodString;
313
+ }, z.core.$strict>, z.ZodObject<{
314
+ subject: z.ZodObject<{
315
+ kind: z.ZodEnum<{
316
+ customer: "customer";
317
+ participant: "participant";
318
+ }>;
319
+ ref: z.ZodString;
320
+ }, z.core.$strict>;
321
+ }, z.core.$strict>]>;
322
+ export type ConversationForgetRequest = z.infer<typeof ConversationForgetRequestSchema>;
323
+ export declare const ConversationForgetResponseSchema: z.ZodObject<{
324
+ ok: z.ZodLiteral<true>;
325
+ data: z.ZodObject<{
326
+ forgotten: z.ZodObject<{
327
+ conversations: z.ZodNumber;
328
+ items: z.ZodNumber;
329
+ }, z.core.$strict>;
330
+ }, z.core.$strict>;
331
+ }, z.core.$strict>;
332
+ export declare const ConversationListClientResponseSchema: z.ZodObject<{
333
+ ok: z.ZodLiteral<true>;
334
+ data: z.ZodObject<{
335
+ conversations: z.ZodArray<z.ZodObject<{
336
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
337
+ kind: z.ZodLiteral<"anonymous">;
338
+ }, z.core.$strip>, z.ZodObject<{
339
+ kind: z.ZodLiteral<"customer">;
340
+ ref: z.ZodString;
341
+ }, z.core.$strip>, z.ZodObject<{
342
+ kind: z.ZodLiteral<"participant">;
343
+ ref: z.ZodString;
344
+ }, z.core.$strip>], "kind">;
345
+ id: z.ZodString;
346
+ channel: z.ZodEnum<{
347
+ whatsapp: "whatsapp";
348
+ website: "website";
349
+ }>;
350
+ startedAt: z.ZodISODateTime;
351
+ lastMessageAt: z.ZodISODateTime;
352
+ itemCount: z.ZodNumber;
353
+ reviewStatus: z.ZodEnum<{
354
+ new: "new";
355
+ needs_attention: "needs_attention";
356
+ reviewed: "reviewed";
357
+ }>;
358
+ }, z.core.$strip>>;
359
+ nextCursor: z.ZodOptional<z.ZodString>;
360
+ }, z.core.$strip>;
361
+ }, z.core.$strip>;
362
+ export declare const ConversationShowClientResponseSchema: z.ZodObject<{
363
+ ok: z.ZodLiteral<true>;
364
+ data: z.ZodObject<{
365
+ conversation: z.ZodObject<{
366
+ notes: z.ZodArray<z.ZodObject<{
367
+ author: z.ZodString;
368
+ text: z.ZodString;
369
+ at: z.ZodISODateTime;
370
+ }, z.core.$strip>>;
371
+ expiresAt: z.ZodISODateTime;
372
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
373
+ kind: z.ZodLiteral<"message">;
374
+ role: z.ZodEnum<{
375
+ assistant: "assistant";
376
+ user: "user";
377
+ }>;
378
+ text: z.ZodString;
379
+ at: z.ZodISODateTime;
380
+ }, z.core.$strip>, z.ZodObject<{
381
+ kind: z.ZodLiteral<"outcome">;
382
+ interactionId: z.ZodString;
383
+ tool: z.ZodString;
384
+ status: z.ZodEnum<{
385
+ failed: "failed";
386
+ succeeded: "succeeded";
387
+ declined: "declined";
388
+ cancelled: "cancelled";
389
+ }>;
390
+ at: z.ZodISODateTime;
391
+ }, z.core.$strip>], "kind">>;
392
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
393
+ kind: z.ZodLiteral<"anonymous">;
394
+ }, z.core.$strip>, z.ZodObject<{
395
+ kind: z.ZodLiteral<"customer">;
396
+ ref: z.ZodString;
397
+ }, z.core.$strip>, z.ZodObject<{
398
+ kind: z.ZodLiteral<"participant">;
399
+ ref: z.ZodString;
400
+ }, z.core.$strip>], "kind">;
401
+ id: z.ZodString;
402
+ channel: z.ZodEnum<{
403
+ whatsapp: "whatsapp";
404
+ website: "website";
405
+ }>;
406
+ startedAt: z.ZodISODateTime;
407
+ lastMessageAt: z.ZodISODateTime;
408
+ itemCount: z.ZodNumber;
409
+ reviewStatus: z.ZodEnum<{
410
+ new: "new";
411
+ needs_attention: "needs_attention";
412
+ reviewed: "reviewed";
413
+ }>;
414
+ }, z.core.$strip>;
415
+ }, z.core.$strip>;
416
+ }, z.core.$strip>;
417
+ export declare const ConversationExportClientResponseSchema: z.ZodObject<{
418
+ ok: z.ZodLiteral<true>;
419
+ data: z.ZodObject<{
420
+ conversations: z.ZodArray<z.ZodObject<{
421
+ expiresAt: z.ZodISODateTime;
422
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
423
+ kind: z.ZodLiteral<"message">;
424
+ role: z.ZodEnum<{
425
+ assistant: "assistant";
426
+ user: "user";
427
+ }>;
428
+ text: z.ZodString;
429
+ at: z.ZodISODateTime;
430
+ }, z.core.$strip>, z.ZodObject<{
431
+ kind: z.ZodLiteral<"outcome">;
432
+ interactionId: z.ZodString;
433
+ tool: z.ZodString;
434
+ status: z.ZodEnum<{
435
+ failed: "failed";
436
+ succeeded: "succeeded";
437
+ declined: "declined";
438
+ cancelled: "cancelled";
439
+ }>;
440
+ at: z.ZodISODateTime;
441
+ }, z.core.$strip>], "kind">>;
442
+ subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
443
+ kind: z.ZodLiteral<"anonymous">;
444
+ }, z.core.$strip>, z.ZodObject<{
445
+ kind: z.ZodLiteral<"customer">;
446
+ ref: z.ZodString;
447
+ }, z.core.$strip>, z.ZodObject<{
448
+ kind: z.ZodLiteral<"participant">;
449
+ ref: z.ZodString;
450
+ }, z.core.$strip>], "kind">;
451
+ id: z.ZodString;
452
+ channel: z.ZodEnum<{
453
+ whatsapp: "whatsapp";
454
+ website: "website";
455
+ }>;
456
+ startedAt: z.ZodISODateTime;
457
+ lastMessageAt: z.ZodISODateTime;
458
+ itemCount: z.ZodNumber;
459
+ reviewStatus: z.ZodEnum<{
460
+ new: "new";
461
+ needs_attention: "needs_attention";
462
+ reviewed: "reviewed";
463
+ }>;
464
+ }, z.core.$strip>>;
465
+ nextCursor: z.ZodOptional<z.ZodString>;
466
+ }, z.core.$strip>;
467
+ }, z.core.$strip>;
468
+ export declare const ConversationForgetClientResponseSchema: z.ZodObject<{
469
+ ok: z.ZodLiteral<true>;
470
+ data: z.ZodObject<{
471
+ forgotten: z.ZodObject<{
472
+ conversations: z.ZodNumber;
473
+ items: z.ZodNumber;
474
+ }, z.core.$strip>;
475
+ }, z.core.$strip>;
476
+ }, z.core.$strip>;
477
+ export declare const ASSISTANT_CONVERSATION_PAGE_MAXIMUM = 50;
478
+ export declare const ASSISTANT_CONVERSATION_PREVIEW_MAXIMUM = 120;
479
+ export declare const AssistantConversationListRequestSchema: z.ZodObject<{
480
+ user: z.ZodObject<{
481
+ id: z.ZodString;
482
+ }, z.core.$strict>;
483
+ limit: z.ZodOptional<z.ZodNumber>;
484
+ cursor: z.ZodOptional<z.ZodString>;
485
+ }, z.core.$strict>;
486
+ export declare const AssistantConversationForgetUserRequestSchema: z.ZodObject<{
487
+ user: z.ZodObject<{
488
+ id: z.ZodString;
489
+ }, z.core.$strict>;
490
+ }, z.core.$strict>;
491
+ export declare const AssistantConversationListResponseSchema: z.ZodObject<{
492
+ ok: z.ZodLiteral<true>;
493
+ data: z.ZodObject<{
494
+ conversations: z.ZodArray<z.ZodObject<{
495
+ id: z.ZodString;
496
+ channel: z.ZodEnum<{
497
+ whatsapp: "whatsapp";
498
+ website: "website";
499
+ }>;
500
+ startedAt: z.ZodISODateTime;
501
+ lastMessageAt: z.ZodISODateTime;
502
+ preview: z.ZodOptional<z.ZodString>;
503
+ }, z.core.$strict>>;
504
+ nextCursor: z.ZodOptional<z.ZodString>;
505
+ }, z.core.$strict>;
506
+ }, z.core.$strict>;
507
+ export declare const AssistantConversationListClientResponseSchema: z.ZodObject<{
508
+ ok: z.ZodLiteral<true>;
509
+ data: z.ZodObject<{
510
+ conversations: z.ZodArray<z.ZodObject<{
511
+ id: z.ZodString;
512
+ channel: z.ZodEnum<{
513
+ whatsapp: "whatsapp";
514
+ website: "website";
515
+ }>;
516
+ startedAt: z.ZodISODateTime;
517
+ lastMessageAt: z.ZodISODateTime;
518
+ preview: z.ZodOptional<z.ZodString>;
519
+ }, z.core.$strip>>;
520
+ nextCursor: z.ZodOptional<z.ZodString>;
521
+ }, z.core.$strip>;
522
+ }, z.core.$strip>;
523
+ //# sourceMappingURL=conversation-history.d.ts.map