@cossistant/core 0.0.31 → 0.0.33

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.
@@ -10,8 +10,8 @@ declare const conversationSchema: z.ZodObject<{
10
10
  visitorId: z.ZodString;
11
11
  websiteId: z.ZodString;
12
12
  status: z.ZodDefault<z.ZodEnum<{
13
- resolved: "resolved";
14
13
  open: "open";
14
+ resolved: "resolved";
15
15
  spam: "spam";
16
16
  }>>;
17
17
  visitorRating: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -30,6 +30,7 @@ declare const conversationSchema: z.ZodObject<{
30
30
  message: "message";
31
31
  event: "event";
32
32
  identification: "identification";
33
+ tool: "tool";
33
34
  }>;
34
35
  text: z.ZodNullable<z.ZodString>;
35
36
  tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -55,6 +56,19 @@ declare const conversationSchema: z.ZodObject<{
55
56
  }>>;
56
57
  progressMessage: z.ZodOptional<z.ZodString>;
57
58
  knowledgeId: z.ZodOptional<z.ZodString>;
59
+ toolTimeline: z.ZodOptional<z.ZodObject<{
60
+ logType: z.ZodEnum<{
61
+ customer_facing: "customer_facing";
62
+ log: "log";
63
+ decision: "decision";
64
+ }>;
65
+ triggerMessageId: z.ZodString;
66
+ workflowRunId: z.ZodString;
67
+ triggerVisibility: z.ZodOptional<z.ZodEnum<{
68
+ public: "public";
69
+ private: "private";
70
+ }>>;
71
+ }, z.core.$strip>>;
58
72
  }, z.core.$strip>>;
59
73
  }, z.core.$loose>>;
60
74
  }, z.core.$strip>, z.ZodObject<{
@@ -69,6 +83,29 @@ declare const conversationSchema: z.ZodObject<{
69
83
  result: "result";
70
84
  }>;
71
85
  errorText: z.ZodOptional<z.ZodString>;
86
+ callProviderMetadata: z.ZodOptional<z.ZodObject<{
87
+ cossistant: z.ZodOptional<z.ZodObject<{
88
+ visibility: z.ZodOptional<z.ZodEnum<{
89
+ public: "public";
90
+ private: "private";
91
+ }>>;
92
+ progressMessage: z.ZodOptional<z.ZodString>;
93
+ knowledgeId: z.ZodOptional<z.ZodString>;
94
+ toolTimeline: z.ZodOptional<z.ZodObject<{
95
+ logType: z.ZodEnum<{
96
+ customer_facing: "customer_facing";
97
+ log: "log";
98
+ decision: "decision";
99
+ }>;
100
+ triggerMessageId: z.ZodString;
101
+ workflowRunId: z.ZodString;
102
+ triggerVisibility: z.ZodOptional<z.ZodEnum<{
103
+ public: "public";
104
+ private: "private";
105
+ }>>;
106
+ }, z.core.$strip>>;
107
+ }, z.core.$strip>>;
108
+ }, z.core.$loose>>;
72
109
  providerMetadata: z.ZodOptional<z.ZodObject<{
73
110
  cossistant: z.ZodOptional<z.ZodObject<{
74
111
  visibility: z.ZodOptional<z.ZodEnum<{
@@ -77,6 +114,19 @@ declare const conversationSchema: z.ZodObject<{
77
114
  }>>;
78
115
  progressMessage: z.ZodOptional<z.ZodString>;
79
116
  knowledgeId: z.ZodOptional<z.ZodString>;
117
+ toolTimeline: z.ZodOptional<z.ZodObject<{
118
+ logType: z.ZodEnum<{
119
+ customer_facing: "customer_facing";
120
+ log: "log";
121
+ decision: "decision";
122
+ }>;
123
+ triggerMessageId: z.ZodString;
124
+ workflowRunId: z.ZodString;
125
+ triggerVisibility: z.ZodOptional<z.ZodEnum<{
126
+ public: "public";
127
+ private: "private";
128
+ }>>;
129
+ }, z.core.$strip>>;
80
130
  }, z.core.$strip>>;
81
131
  }, z.core.$loose>>;
82
132
  }, z.core.$strip>, z.ZodObject<{
@@ -92,6 +142,19 @@ declare const conversationSchema: z.ZodObject<{
92
142
  }>>;
93
143
  progressMessage: z.ZodOptional<z.ZodString>;
94
144
  knowledgeId: z.ZodOptional<z.ZodString>;
145
+ toolTimeline: z.ZodOptional<z.ZodObject<{
146
+ logType: z.ZodEnum<{
147
+ customer_facing: "customer_facing";
148
+ log: "log";
149
+ decision: "decision";
150
+ }>;
151
+ triggerMessageId: z.ZodString;
152
+ workflowRunId: z.ZodString;
153
+ triggerVisibility: z.ZodOptional<z.ZodEnum<{
154
+ public: "public";
155
+ private: "private";
156
+ }>>;
157
+ }, z.core.$strip>>;
95
158
  }, z.core.$strip>>;
96
159
  }, z.core.$loose>>;
97
160
  }, z.core.$strip>, z.ZodObject<{
@@ -108,6 +171,19 @@ declare const conversationSchema: z.ZodObject<{
108
171
  }>>;
109
172
  progressMessage: z.ZodOptional<z.ZodString>;
110
173
  knowledgeId: z.ZodOptional<z.ZodString>;
174
+ toolTimeline: z.ZodOptional<z.ZodObject<{
175
+ logType: z.ZodEnum<{
176
+ customer_facing: "customer_facing";
177
+ log: "log";
178
+ decision: "decision";
179
+ }>;
180
+ triggerMessageId: z.ZodString;
181
+ workflowRunId: z.ZodString;
182
+ triggerVisibility: z.ZodOptional<z.ZodEnum<{
183
+ public: "public";
184
+ private: "private";
185
+ }>>;
186
+ }, z.core.$strip>>;
111
187
  }, z.core.$strip>>;
112
188
  }, z.core.$loose>>;
113
189
  }, z.core.$strip>, z.ZodObject<{
@@ -129,6 +205,7 @@ declare const conversationSchema: z.ZodObject<{
129
205
  }, z.core.$strip>, z.ZodObject<{
130
206
  type: z.ZodLiteral<"event">;
131
207
  eventType: z.ZodEnum<{
208
+ resolved: "resolved";
132
209
  assigned: "assigned";
133
210
  unassigned: "unassigned";
134
211
  participant_requested: "participant_requested";
@@ -138,7 +215,6 @@ declare const conversationSchema: z.ZodObject<{
138
215
  priority_changed: "priority_changed";
139
216
  tag_added: "tag_added";
140
217
  tag_removed: "tag_removed";
141
- resolved: "resolved";
142
218
  reopened: "reopened";
143
219
  visitor_blocked: "visitor_blocked";
144
220
  visitor_unblocked: "visitor_unblocked";
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","names":[],"sources":["../../../../types/src/schemas.ts"],"sourcesContent":[],"mappings":";;;;cAkBa,oBAAkB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqBnB,YAAA,GAAe,CAAA,CAAE,aAAa;cAE7B,wBAAsB,CAAA,CAAA;;;;;;;;EAvBJ,SAAA,aAAA;EAAA,SAAA,eAAA,YAAA,CAAA;AAqB/B,CAAA,eAAY,CAAA;AAEC,KAYD,gBAAA,GAAmB,CAAA,CAAE,KAF/B,CAAA,OAE4C,sBAF5C,CAAA"}
1
+ {"version":3,"file":"schemas.d.ts","names":[],"sources":["../../../../types/src/schemas.ts"],"sourcesContent":[],"mappings":";;;;cAkBa,oBAAkB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA,CAAA,eAAA,CAAA,aAAA,CAAA;MAAA,IAAA,cAAA,CAAA,UAAA,CAAA;MAqBnB,MAAA,WAAY,CAAA;QAEX,KAAA,EAAA,OAUX;;;;;;;;;;;;KAZU,YAAA,GAAe,CAAA,CAAE,aAAa;cAE7B,wBAAsB,CAAA,CAAA;;EAAA,cAAA,aAAA;EAAA,MAAA,eAAA,YAAA,CAAA;EAYvB,SAAA,eAAgB,YAAkB,CAAA;;;;;;;KAAlC,gBAAA,GAAmB,CAAA,CAAE,aAAa"}
@@ -0,0 +1,16 @@
1
+ //#region ../types/src/tool-timeline-policy.ts
2
+ const TOOL_TIMELINE_LOG_TYPE = {
3
+ CUSTOMER_FACING: "customer_facing",
4
+ LOG: "log",
5
+ DECISION: "decision"
6
+ };
7
+ const TOOL_TIMELINE_CONVERSATION_ALLOWLIST = [
8
+ "searchKnowledgeBase",
9
+ "updateConversationTitle",
10
+ "updateSentiment"
11
+ ];
12
+ const CONVERSATION_VISIBLE_TOOLS = new Set(TOOL_TIMELINE_CONVERSATION_ALLOWLIST);
13
+
14
+ //#endregion
15
+ export { TOOL_TIMELINE_LOG_TYPE };
16
+ //# sourceMappingURL=tool-timeline-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-timeline-policy.js","names":[],"sources":["../../../../types/src/tool-timeline-policy.ts"],"sourcesContent":["export const TOOL_TIMELINE_LOG_TYPE = {\n\tCUSTOMER_FACING: \"customer_facing\",\n\tLOG: \"log\",\n\tDECISION: \"decision\",\n} as const;\n\nexport type ToolTimelineLogType =\n\t(typeof TOOL_TIMELINE_LOG_TYPE)[keyof typeof TOOL_TIMELINE_LOG_TYPE];\n\nexport const TOOL_TIMELINE_CONVERSATION_ALLOWLIST = [\n\t\"searchKnowledgeBase\",\n\t\"updateConversationTitle\",\n\t\"updateSentiment\",\n] as const;\n\nconst CONVERSATION_VISIBLE_TOOLS = new Set<string>(\n\tTOOL_TIMELINE_CONVERSATION_ALLOWLIST\n);\n\nexport function isConversationVisibleTool(toolName: string): boolean {\n\treturn CONVERSATION_VISIBLE_TOOLS.has(toolName);\n}\n\nexport function getToolLogType(toolName: string): ToolTimelineLogType {\n\tif (toolName === \"aiDecision\") {\n\t\treturn TOOL_TIMELINE_LOG_TYPE.DECISION;\n\t}\n\n\tif (isConversationVisibleTool(toolName)) {\n\t\treturn TOOL_TIMELINE_LOG_TYPE.CUSTOMER_FACING;\n\t}\n\n\treturn TOOL_TIMELINE_LOG_TYPE.LOG;\n}\n"],"mappings":";AAAA,MAAa,yBAAyB;CACrC,iBAAiB;CACjB,KAAK;CACL,UAAU;CACV;AAKD,MAAa,uCAAuC;CACnD;CACA;CACA;CACA;AAED,MAAM,6BAA6B,IAAI,IACtC,qCACA"}
package/utils.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","names":[],"sources":["../src/utils.ts"],"sourcesContent":[],"mappings":";cAGa,YAAU;AAAV,iBAEG,WAAA,CAFoC,IAAA,EAAA,MAAA,CAAA,EAAA,OAAA;AAEpC,cAOH,sBAPc,EAAA,GAAA,GAAA,MAAA;AAOd,cAKA,iBAFZ,EAAA,GAAA,GAAA,MAAA"}
1
+ {"version":3,"file":"utils.d.ts","names":[],"sources":["../src/utils.ts"],"sourcesContent":[],"mappings":";cAGa,YAAU;AAAV,iBAEG,WAAA,CAFO,IAA6B,EAAA,MAAA,CAAA,EAAA,OAAA;AAEpC,cAOH,sBAPc,EAAA,GAAA,GAAA,MAAA;AAOd,cAKA,iBAFZ,EAAA,GAAA,GAAA,MAAA"}