@cossistant/types 0.0.26 → 0.0.29

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 (47) hide show
  1. package/api/ai-agent.d.ts +283 -0
  2. package/api/ai-agent.d.ts.map +1 -0
  3. package/api/ai-agent.js +416 -0
  4. package/api/ai-agent.js.map +1 -0
  5. package/api/contact.d.ts.map +1 -1
  6. package/api/conversation.d.ts +3 -0
  7. package/api/conversation.d.ts.map +1 -1
  8. package/api/index.d.ts +4 -1
  9. package/api/index.js +4 -1
  10. package/api/knowledge.d.ts +500 -0
  11. package/api/knowledge.d.ts.map +1 -0
  12. package/api/knowledge.js +446 -0
  13. package/api/knowledge.js.map +1 -0
  14. package/api/link-source.d.ts +262 -0
  15. package/api/link-source.d.ts.map +1 -0
  16. package/api/link-source.js +453 -0
  17. package/api/link-source.js.map +1 -0
  18. package/api/upload.d.ts +2 -2
  19. package/api/upload.d.ts.map +1 -1
  20. package/api/upload.js +2 -2
  21. package/api/upload.js.map +1 -1
  22. package/api/website.d.ts +4 -4
  23. package/api/website.d.ts.map +1 -1
  24. package/api/website.js +3 -3
  25. package/api/website.js.map +1 -1
  26. package/enums.d.ts +3 -0
  27. package/enums.d.ts.map +1 -1
  28. package/enums.js +4 -1
  29. package/enums.js.map +1 -1
  30. package/index.d.ts +4 -1
  31. package/index.d.ts.map +1 -1
  32. package/index.js +4 -1
  33. package/package.json +17 -1
  34. package/realtime-events.d.ts +163 -0
  35. package/realtime-events.d.ts.map +1 -1
  36. package/realtime-events.js +121 -1
  37. package/realtime-events.js.map +1 -1
  38. package/schemas.d.ts +1 -0
  39. package/schemas.d.ts.map +1 -1
  40. package/schemas.js +1 -0
  41. package/schemas.js.map +1 -1
  42. package/trpc/conversation.d.ts +24 -0
  43. package/trpc/conversation.d.ts.map +1 -1
  44. package/trpc/conversation.js +12 -0
  45. package/trpc/conversation.js.map +1 -1
  46. package/trpc/visitor.d.ts +6 -0
  47. package/trpc/visitor.d.ts.map +1 -1
@@ -0,0 +1,283 @@
1
+ import { z } from "@hono/zod-openapi";
2
+
3
+ //#region src/api/ai-agent.d.ts
4
+
5
+ /**
6
+ * Available AI models from OpenRouter
7
+ */
8
+ declare const AI_MODELS: readonly [{
9
+ readonly value: "moonshotai/kimi-k2-0905";
10
+ readonly label: "Kimi K2";
11
+ readonly provider: "Moonshot AI";
12
+ readonly icon: "agent";
13
+ readonly freeOnly: true;
14
+ }, {
15
+ readonly value: "openai/gpt-5.2-chat";
16
+ readonly label: "GPT-5.2";
17
+ readonly provider: "OpenAI";
18
+ readonly icon: "star";
19
+ readonly requiresPaid: true;
20
+ }, {
21
+ readonly value: "openai/gpt-5.1-chat";
22
+ readonly label: "GPT-5.1";
23
+ readonly provider: "OpenAI";
24
+ readonly icon: "star";
25
+ readonly requiresPaid: true;
26
+ }, {
27
+ readonly value: "openai/gpt-5-mini";
28
+ readonly label: "GPT-5 Mini";
29
+ readonly provider: "OpenAI";
30
+ readonly icon: "star";
31
+ readonly requiresPaid: true;
32
+ }, {
33
+ readonly value: "google/gemini-3-flash-preview";
34
+ readonly label: "Gemini 3 Flash";
35
+ readonly provider: "Google";
36
+ readonly icon: "dashboard";
37
+ readonly requiresPaid: true;
38
+ }];
39
+ type AIModel = (typeof AI_MODELS)[number]["value"];
40
+ type AIModelConfig = (typeof AI_MODELS)[number];
41
+ /**
42
+ * Available AI agent goals/intents
43
+ */
44
+ declare const AI_AGENT_GOALS: readonly [{
45
+ readonly value: "sales";
46
+ readonly label: "Increase sales conversions";
47
+ }, {
48
+ readonly value: "support";
49
+ readonly label: "Provide customer support";
50
+ }, {
51
+ readonly value: "product_qa";
52
+ readonly label: "Answer product questions";
53
+ }, {
54
+ readonly value: "lead_qualification";
55
+ readonly label: "Qualify leads";
56
+ }, {
57
+ readonly value: "scheduling";
58
+ readonly label: "Schedule appointments";
59
+ }, {
60
+ readonly value: "feedback";
61
+ readonly label: "Collect customer feedback";
62
+ }];
63
+ type AIAgentGoal = (typeof AI_AGENT_GOALS)[number]["value"];
64
+ /**
65
+ * AI Agent response schema
66
+ */
67
+ declare const aiAgentResponseSchema: z.ZodObject<{
68
+ id: z.ZodULID;
69
+ name: z.ZodString;
70
+ description: z.ZodNullable<z.ZodString>;
71
+ basePrompt: z.ZodString;
72
+ model: z.ZodString;
73
+ temperature: z.ZodNullable<z.ZodNumber>;
74
+ maxOutputTokens: z.ZodNullable<z.ZodNumber>;
75
+ isActive: z.ZodBoolean;
76
+ lastUsedAt: z.ZodNullable<z.ZodString>;
77
+ usageCount: z.ZodNumber;
78
+ goals: z.ZodNullable<z.ZodArray<z.ZodString>>;
79
+ createdAt: z.ZodString;
80
+ updatedAt: z.ZodString;
81
+ onboardingCompletedAt: z.ZodNullable<z.ZodString>;
82
+ }, z.core.$strip>;
83
+ /**
84
+ * Create AI Agent request schema
85
+ */
86
+ declare const createAiAgentRequestSchema: z.ZodObject<{
87
+ websiteSlug: z.ZodString;
88
+ name: z.ZodString;
89
+ description: z.ZodOptional<z.ZodString>;
90
+ basePrompt: z.ZodString;
91
+ model: z.ZodString;
92
+ temperature: z.ZodOptional<z.ZodNumber>;
93
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
94
+ goals: z.ZodOptional<z.ZodArray<z.ZodString>>;
95
+ }, z.core.$strip>;
96
+ /**
97
+ * Update AI Agent request schema
98
+ */
99
+ declare const updateAiAgentRequestSchema: z.ZodObject<{
100
+ websiteSlug: z.ZodString;
101
+ aiAgentId: z.ZodULID;
102
+ name: z.ZodString;
103
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
+ basePrompt: z.ZodString;
105
+ model: z.ZodString;
106
+ temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
107
+ maxOutputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
108
+ goals: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
109
+ onboardingCompletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
+ }, z.core.$strip>;
111
+ /**
112
+ * Toggle AI Agent active status request schema
113
+ */
114
+ declare const toggleAiAgentActiveRequestSchema: z.ZodObject<{
115
+ websiteSlug: z.ZodString;
116
+ aiAgentId: z.ZodULID;
117
+ isActive: z.ZodBoolean;
118
+ }, z.core.$strip>;
119
+ /**
120
+ * Delete AI Agent request schema
121
+ */
122
+ declare const deleteAiAgentRequestSchema: z.ZodObject<{
123
+ websiteSlug: z.ZodString;
124
+ aiAgentId: z.ZodULID;
125
+ }, z.core.$strip>;
126
+ /**
127
+ * Get AI Agent request schema
128
+ */
129
+ declare const getAiAgentRequestSchema: z.ZodObject<{
130
+ websiteSlug: z.ZodString;
131
+ }, z.core.$strip>;
132
+ /**
133
+ * Generate Base Prompt request schema
134
+ * Used to scrape a website and generate a tailored base prompt for the AI agent
135
+ */
136
+ declare const generateBasePromptRequestSchema: z.ZodObject<{
137
+ websiteSlug: z.ZodString;
138
+ sourceUrl: z.ZodOptional<z.ZodString>;
139
+ agentName: z.ZodString;
140
+ goals: z.ZodArray<z.ZodString>;
141
+ manualDescription: z.ZodOptional<z.ZodString>;
142
+ }, z.core.$strip>;
143
+ /**
144
+ * Generate Base Prompt response schema
145
+ */
146
+ declare const generateBasePromptResponseSchema: z.ZodObject<{
147
+ basePrompt: z.ZodString;
148
+ isGenerated: z.ZodBoolean;
149
+ companyName: z.ZodNullable<z.ZodString>;
150
+ websiteDescription: z.ZodNullable<z.ZodString>;
151
+ logo: z.ZodNullable<z.ZodString>;
152
+ favicon: z.ZodNullable<z.ZodString>;
153
+ discoveredLinksCount: z.ZodNumber;
154
+ }, z.core.$strip>;
155
+ type AiAgentResponse = z.infer<typeof aiAgentResponseSchema>;
156
+ type CreateAiAgentRequest = z.infer<typeof createAiAgentRequestSchema>;
157
+ type UpdateAiAgentRequest = z.infer<typeof updateAiAgentRequestSchema>;
158
+ type ToggleAiAgentActiveRequest = z.infer<typeof toggleAiAgentActiveRequestSchema>;
159
+ type DeleteAiAgentRequest = z.infer<typeof deleteAiAgentRequestSchema>;
160
+ type GetAiAgentRequest = z.infer<typeof getAiAgentRequestSchema>;
161
+ type GenerateBasePromptRequest = z.infer<typeof generateBasePromptRequestSchema>;
162
+ type GenerateBasePromptResponse = z.infer<typeof generateBasePromptResponseSchema>;
163
+ /**
164
+ * AI Agent Behavior Settings Schema
165
+ *
166
+ * Controls how the AI agent behaves in conversations.
167
+ */
168
+ declare const aiAgentBehaviorSettingsSchema: z.ZodObject<{
169
+ responseMode: z.ZodEnum<{
170
+ manual: "manual";
171
+ always: "always";
172
+ when_no_human: "when_no_human";
173
+ on_mention: "on_mention";
174
+ }>;
175
+ responseDelayMs: z.ZodNumber;
176
+ pauseOnHumanReply: z.ZodBoolean;
177
+ pauseDurationMinutes: z.ZodNullable<z.ZodNumber>;
178
+ canResolve: z.ZodBoolean;
179
+ canMarkSpam: z.ZodBoolean;
180
+ canAssign: z.ZodBoolean;
181
+ canSetPriority: z.ZodBoolean;
182
+ canCategorize: z.ZodBoolean;
183
+ canEscalate: z.ZodBoolean;
184
+ defaultEscalationUserId: z.ZodNullable<z.ZodString>;
185
+ autoAssignOnEscalation: z.ZodBoolean;
186
+ autoAnalyzeSentiment: z.ZodBoolean;
187
+ autoGenerateTitle: z.ZodBoolean;
188
+ autoCategorize: z.ZodBoolean;
189
+ }, z.core.$strip>;
190
+ type AiAgentBehaviorSettings = z.infer<typeof aiAgentBehaviorSettingsSchema>;
191
+ /**
192
+ * Get Behavior Settings request schema
193
+ */
194
+ declare const getBehaviorSettingsRequestSchema: z.ZodObject<{
195
+ websiteSlug: z.ZodString;
196
+ }, z.core.$strip>;
197
+ /**
198
+ * Get Behavior Settings response schema
199
+ */
200
+ declare const getBehaviorSettingsResponseSchema: z.ZodObject<{
201
+ responseMode: z.ZodEnum<{
202
+ manual: "manual";
203
+ always: "always";
204
+ when_no_human: "when_no_human";
205
+ on_mention: "on_mention";
206
+ }>;
207
+ responseDelayMs: z.ZodNumber;
208
+ pauseOnHumanReply: z.ZodBoolean;
209
+ pauseDurationMinutes: z.ZodNullable<z.ZodNumber>;
210
+ canResolve: z.ZodBoolean;
211
+ canMarkSpam: z.ZodBoolean;
212
+ canAssign: z.ZodBoolean;
213
+ canSetPriority: z.ZodBoolean;
214
+ canCategorize: z.ZodBoolean;
215
+ canEscalate: z.ZodBoolean;
216
+ defaultEscalationUserId: z.ZodNullable<z.ZodString>;
217
+ autoAssignOnEscalation: z.ZodBoolean;
218
+ autoAnalyzeSentiment: z.ZodBoolean;
219
+ autoGenerateTitle: z.ZodBoolean;
220
+ autoCategorize: z.ZodBoolean;
221
+ aiAgentId: z.ZodULID;
222
+ }, z.core.$strip>;
223
+ /**
224
+ * Update Behavior Settings request schema
225
+ */
226
+ declare const updateBehaviorSettingsRequestSchema: z.ZodObject<{
227
+ websiteSlug: z.ZodString;
228
+ aiAgentId: z.ZodULID;
229
+ settings: z.ZodObject<{
230
+ responseMode: z.ZodOptional<z.ZodEnum<{
231
+ manual: "manual";
232
+ always: "always";
233
+ when_no_human: "when_no_human";
234
+ on_mention: "on_mention";
235
+ }>>;
236
+ responseDelayMs: z.ZodOptional<z.ZodNumber>;
237
+ pauseOnHumanReply: z.ZodOptional<z.ZodBoolean>;
238
+ pauseDurationMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
239
+ canResolve: z.ZodOptional<z.ZodBoolean>;
240
+ canMarkSpam: z.ZodOptional<z.ZodBoolean>;
241
+ canAssign: z.ZodOptional<z.ZodBoolean>;
242
+ canSetPriority: z.ZodOptional<z.ZodBoolean>;
243
+ canCategorize: z.ZodOptional<z.ZodBoolean>;
244
+ canEscalate: z.ZodOptional<z.ZodBoolean>;
245
+ defaultEscalationUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
246
+ autoAssignOnEscalation: z.ZodOptional<z.ZodBoolean>;
247
+ autoAnalyzeSentiment: z.ZodOptional<z.ZodBoolean>;
248
+ autoGenerateTitle: z.ZodOptional<z.ZodBoolean>;
249
+ autoCategorize: z.ZodOptional<z.ZodBoolean>;
250
+ }, z.core.$strip>;
251
+ }, z.core.$strip>;
252
+ /**
253
+ * Update Behavior Settings response schema
254
+ */
255
+ declare const updateBehaviorSettingsResponseSchema: z.ZodObject<{
256
+ responseMode: z.ZodEnum<{
257
+ manual: "manual";
258
+ always: "always";
259
+ when_no_human: "when_no_human";
260
+ on_mention: "on_mention";
261
+ }>;
262
+ responseDelayMs: z.ZodNumber;
263
+ pauseOnHumanReply: z.ZodBoolean;
264
+ pauseDurationMinutes: z.ZodNullable<z.ZodNumber>;
265
+ canResolve: z.ZodBoolean;
266
+ canMarkSpam: z.ZodBoolean;
267
+ canAssign: z.ZodBoolean;
268
+ canSetPriority: z.ZodBoolean;
269
+ canCategorize: z.ZodBoolean;
270
+ canEscalate: z.ZodBoolean;
271
+ defaultEscalationUserId: z.ZodNullable<z.ZodString>;
272
+ autoAssignOnEscalation: z.ZodBoolean;
273
+ autoAnalyzeSentiment: z.ZodBoolean;
274
+ autoGenerateTitle: z.ZodBoolean;
275
+ autoCategorize: z.ZodBoolean;
276
+ }, z.core.$strip>;
277
+ type GetBehaviorSettingsRequest = z.infer<typeof getBehaviorSettingsRequestSchema>;
278
+ type GetBehaviorSettingsResponse = z.infer<typeof getBehaviorSettingsResponseSchema>;
279
+ type UpdateBehaviorSettingsRequest = z.infer<typeof updateBehaviorSettingsRequestSchema>;
280
+ type UpdateBehaviorSettingsResponse = z.infer<typeof updateBehaviorSettingsResponseSchema>;
281
+ //#endregion
282
+ export { AIAgentGoal, AIModel, AIModelConfig, AI_AGENT_GOALS, AI_MODELS, AiAgentBehaviorSettings, AiAgentResponse, CreateAiAgentRequest, DeleteAiAgentRequest, GenerateBasePromptRequest, GenerateBasePromptResponse, GetAiAgentRequest, GetBehaviorSettingsRequest, GetBehaviorSettingsResponse, ToggleAiAgentActiveRequest, UpdateAiAgentRequest, UpdateBehaviorSettingsRequest, UpdateBehaviorSettingsResponse, aiAgentBehaviorSettingsSchema, aiAgentResponseSchema, createAiAgentRequestSchema, deleteAiAgentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, toggleAiAgentActiveRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema };
283
+ //# sourceMappingURL=ai-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-agent.d.ts","names":[],"sources":["../../src/api/ai-agent.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;AAsCY,cAtCC,SAsCiB,EAAA,SAAS,CAAA;EAC3B,SAAA,KAAA,EAAa,yBAAoB;EAKhC,SAAA,KAAA,EAAA,SAOH;EAEE,SAAA,QAAW,EAAA,aAAW;EAKrB,SAAA,IAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;EAAqB,SAAA,QAAA,EAAA,QAAA;EAAA,SAAA,IAAA,EAAA,WAAA;EAkErB,SAAA,YAAA,EAAA,IAAA;;KAtFD,OAAA,WAAkB;KAClB,aAAA,WAAwB;;;;cAKvB;;;;;;;;EAgF0B,SAAA,KAAA,EAAA,0BAAA;CAAA,EAAA;EAqE1B,SAAA,KAAA,EAAA,oBA6EV;;;;;;;;;KAzNS,WAAA,WAAsB;;;;cAKrB,uBAAqB,CAAA,CAAA;;;;;;;;;;EAuIK,UAAA,aAAA;EAAA,KAAA,eAAA,WAAA,YAAA,CAAA,CAAA;EAkF1B,SAAA,aAAA;;;;;;;AAsBA,cA7KA,0BA0LV,EA1LoC,CAAA,CAAA,SA0LpC,CAAA;;;;EAboC,UAAA,aAAA;EAAA,KAAA,aAAA;EAkB1B,WAAA,eASV,YAAA,CAAA;;;CATiC,eAAA,CAAA;;AAepC;;cAzIa,4BAA0B,CAAA,CAAA;;;;;;;;EAyIK,eAAA,eAAA,cAAA,YAAA,CAAA,CAAA;EAAA,KAAA,eAAA,cAAA,WAAA,YAAA,CAAA,CAAA,CAAA;E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