@cossistant/types 0.1.0 → 0.1.2
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.
- package/analytics.d.ts +31 -0
- package/analytics.d.ts.map +1 -0
- package/analytics.js +41 -0
- package/analytics.js.map +1 -0
- package/api/ai-agent-capabilities.d.ts +16 -19
- package/api/ai-agent-capabilities.d.ts.map +1 -1
- package/api/ai-agent-capabilities.js +215 -286
- package/api/ai-agent-capabilities.js.map +1 -1
- package/api/ai-agent-defaults.d.ts +6 -0
- package/api/ai-agent-defaults.d.ts.map +1 -0
- package/api/ai-agent-defaults.js +33 -0
- package/api/ai-agent-defaults.js.map +1 -0
- package/api/ai-agent.d.ts +314 -207
- package/api/ai-agent.d.ts.map +1 -1
- package/api/ai-agent.js +175 -111
- package/api/ai-agent.js.map +1 -1
- package/api/conversation.d.ts +79 -56
- package/api/conversation.d.ts.map +1 -1
- package/api/conversation.js +7 -2
- package/api/conversation.js.map +1 -1
- package/api/feedback.d.ts +5 -0
- package/api/feedback.d.ts.map +1 -1
- package/api/feedback.js +2 -0
- package/api/feedback.js.map +1 -1
- package/api/index.d.ts +7 -6
- package/api/index.js +7 -6
- package/api/link-source.d.ts +4 -4
- package/api/link-source.d.ts.map +1 -1
- package/api/link-source.js +1 -1
- package/api/link-source.js.map +1 -1
- package/api/timeline-item.d.ts +79 -67
- package/api/timeline-item.d.ts.map +1 -1
- package/api/timeline-item.js +3 -1
- package/api/timeline-item.js.map +1 -1
- package/api/user.d.ts +1 -1
- package/api/user.d.ts.map +1 -1
- package/api/user.js +2 -2
- package/api/user.js.map +1 -1
- package/api/visitor.d.ts +225 -1
- package/api/visitor.d.ts.map +1 -1
- package/api/visitor.js +142 -1
- package/api/visitor.js.map +1 -1
- package/api/website.d.ts +16 -7
- package/api/website.d.ts.map +1 -1
- package/api/website.js +16 -2
- package/api/website.js.map +1 -1
- package/enums.d.ts +2 -0
- package/enums.d.ts.map +1 -1
- package/enums.js +3 -1
- package/enums.js.map +1 -1
- package/index.d.ts +10 -8
- package/index.d.ts.map +1 -1
- package/index.js +10 -8
- package/package.json +1 -1
- package/realtime-events.d.ts +106 -36
- package/realtime-events.d.ts.map +1 -1
- package/realtime-events.js +6 -2
- package/realtime-events.js.map +1 -1
- package/schemas.d.ts +13 -11
- package/schemas.d.ts.map +1 -1
- package/tool-timeline-policy.d.ts +19 -2
- package/tool-timeline-policy.d.ts.map +1 -1
- package/tool-timeline-policy.js +29 -6
- package/tool-timeline-policy.js.map +1 -1
- package/trpc/conversation-hard-limit.d.ts +30 -0
- package/trpc/conversation-hard-limit.d.ts.map +1 -0
- package/trpc/conversation-hard-limit.js +43 -0
- package/trpc/conversation-hard-limit.js.map +1 -0
- package/trpc/conversation.d.ts +84 -44
- package/trpc/conversation.d.ts.map +1 -1
- package/trpc/conversation.js +6 -0
- package/trpc/conversation.js.map +1 -1
- package/trpc/visitor.d.ts +73 -15
- package/trpc/visitor.d.ts.map +1 -1
- package/trpc/visitor.js +15 -8
- package/trpc/visitor.js.map +1 -1
package/trpc/visitor.d.ts
CHANGED
|
@@ -26,6 +26,10 @@ declare const blockVisitorResponseSchema: z.ZodObject<{
|
|
|
26
26
|
sentimentConfidence: z.ZodNullable<z.ZodNumber>;
|
|
27
27
|
channel: z.ZodString;
|
|
28
28
|
title: z.ZodNullable<z.ZodString>;
|
|
29
|
+
titleSource: z.ZodNullable<z.ZodEnum<{
|
|
30
|
+
ai: "ai";
|
|
31
|
+
user: "user";
|
|
32
|
+
}>>;
|
|
29
33
|
resolutionTime: z.ZodNullable<z.ZodNumber>;
|
|
30
34
|
visitorRating: z.ZodNullable<z.ZodNumber>;
|
|
31
35
|
visitorRatingAt: z.ZodNullable<z.ZodString>;
|
|
@@ -73,6 +77,54 @@ declare const blockVisitorResponseSchema: z.ZodObject<{
|
|
|
73
77
|
blockedAt: z.ZodNullable<z.ZodString>;
|
|
74
78
|
blockedByUserId: z.ZodNullable<z.ZodString>;
|
|
75
79
|
isBlocked: z.ZodBoolean;
|
|
80
|
+
attribution: z.ZodNullable<z.ZodObject<{
|
|
81
|
+
version: z.ZodLiteral<1>;
|
|
82
|
+
firstTouch: z.ZodObject<{
|
|
83
|
+
channel: z.ZodEnum<{
|
|
84
|
+
email: "email";
|
|
85
|
+
direct: "direct";
|
|
86
|
+
paid: "paid";
|
|
87
|
+
organic_search: "organic_search";
|
|
88
|
+
social: "social";
|
|
89
|
+
referral: "referral";
|
|
90
|
+
}>;
|
|
91
|
+
isDirect: z.ZodBoolean;
|
|
92
|
+
referrer: z.ZodObject<{
|
|
93
|
+
url: z.ZodNullable<z.ZodString>;
|
|
94
|
+
domain: z.ZodNullable<z.ZodString>;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
landing: z.ZodObject<{
|
|
97
|
+
url: z.ZodNullable<z.ZodString>;
|
|
98
|
+
path: z.ZodNullable<z.ZodString>;
|
|
99
|
+
title: z.ZodNullable<z.ZodString>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
utm: z.ZodObject<{
|
|
102
|
+
source: z.ZodNullable<z.ZodString>;
|
|
103
|
+
medium: z.ZodNullable<z.ZodString>;
|
|
104
|
+
campaign: z.ZodNullable<z.ZodString>;
|
|
105
|
+
content: z.ZodNullable<z.ZodString>;
|
|
106
|
+
term: z.ZodNullable<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
clickIds: z.ZodObject<{
|
|
109
|
+
gclid: z.ZodNullable<z.ZodString>;
|
|
110
|
+
gbraid: z.ZodNullable<z.ZodString>;
|
|
111
|
+
wbraid: z.ZodNullable<z.ZodString>;
|
|
112
|
+
fbclid: z.ZodNullable<z.ZodString>;
|
|
113
|
+
msclkid: z.ZodNullable<z.ZodString>;
|
|
114
|
+
ttclid: z.ZodNullable<z.ZodString>;
|
|
115
|
+
li_fat_id: z.ZodNullable<z.ZodString>;
|
|
116
|
+
twclid: z.ZodNullable<z.ZodString>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
capturedAt: z.ZodString;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
currentPage: z.ZodNullable<z.ZodObject<{
|
|
122
|
+
url: z.ZodNullable<z.ZodString>;
|
|
123
|
+
path: z.ZodNullable<z.ZodString>;
|
|
124
|
+
title: z.ZodNullable<z.ZodString>;
|
|
125
|
+
referrerUrl: z.ZodNullable<z.ZodString>;
|
|
126
|
+
updatedAt: z.ZodString;
|
|
127
|
+
}, z.core.$strip>>;
|
|
76
128
|
contact: z.ZodNullable<z.ZodObject<{
|
|
77
129
|
id: z.ZodULID;
|
|
78
130
|
externalId: z.ZodNullable<z.ZodString>;
|
|
@@ -107,31 +159,37 @@ declare const visitorPresenceEntrySchema: z.ZodObject<{
|
|
|
107
159
|
longitude: z.ZodNullable<z.ZodNumber>;
|
|
108
160
|
contactId: z.ZodNullable<z.ZodULID>;
|
|
109
161
|
}, z.core.$strip>;
|
|
110
|
-
declare const
|
|
111
|
-
|
|
162
|
+
declare const visitorPresenceProfileSchema: z.ZodObject<{
|
|
163
|
+
id: z.ZodULID;
|
|
164
|
+
lastSeenAt: z.ZodNullable<z.ZodString>;
|
|
165
|
+
city: z.ZodNullable<z.ZodString>;
|
|
166
|
+
region: z.ZodNullable<z.ZodString>;
|
|
167
|
+
country: z.ZodNullable<z.ZodString>;
|
|
168
|
+
latitude: z.ZodNullable<z.ZodNumber>;
|
|
169
|
+
longitude: z.ZodNullable<z.ZodNumber>;
|
|
170
|
+
contactId: z.ZodNullable<z.ZodULID>;
|
|
171
|
+
contactName: z.ZodNullable<z.ZodString>;
|
|
172
|
+
contactEmail: z.ZodNullable<z.ZodString>;
|
|
173
|
+
contactImage: z.ZodNullable<z.ZodString>;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
declare const listVisitorPresenceProfilesResponseSchema: z.ZodObject<{
|
|
176
|
+
profilesByVisitorId: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
112
177
|
id: z.ZodULID;
|
|
113
|
-
status: z.ZodEnum<{
|
|
114
|
-
online: "online";
|
|
115
|
-
away: "away";
|
|
116
|
-
}>;
|
|
117
178
|
lastSeenAt: z.ZodNullable<z.ZodString>;
|
|
118
|
-
name: z.ZodNullable<z.ZodString>;
|
|
119
|
-
email: z.ZodNullable<z.ZodString>;
|
|
120
|
-
image: z.ZodNullable<z.ZodString>;
|
|
121
179
|
city: z.ZodNullable<z.ZodString>;
|
|
122
180
|
region: z.ZodNullable<z.ZodString>;
|
|
123
181
|
country: z.ZodNullable<z.ZodString>;
|
|
124
182
|
latitude: z.ZodNullable<z.ZodNumber>;
|
|
125
183
|
longitude: z.ZodNullable<z.ZodNumber>;
|
|
126
184
|
contactId: z.ZodNullable<z.ZodULID>;
|
|
185
|
+
contactName: z.ZodNullable<z.ZodString>;
|
|
186
|
+
contactEmail: z.ZodNullable<z.ZodString>;
|
|
187
|
+
contactImage: z.ZodNullable<z.ZodString>;
|
|
127
188
|
}, z.core.$strip>>;
|
|
128
|
-
totals: z.ZodObject<{
|
|
129
|
-
online: z.ZodNumber;
|
|
130
|
-
away: z.ZodNumber;
|
|
131
|
-
}, z.core.$strip>;
|
|
132
189
|
}, z.core.$strip>;
|
|
133
190
|
type VisitorPresenceEntry = z.infer<typeof visitorPresenceEntrySchema>;
|
|
134
|
-
type
|
|
191
|
+
type VisitorPresenceProfile = z.infer<typeof visitorPresenceProfileSchema>;
|
|
192
|
+
type ListVisitorPresenceProfilesResponse = z.infer<typeof listVisitorPresenceProfilesResponseSchema>;
|
|
135
193
|
//#endregion
|
|
136
|
-
export { BlockVisitorResponse,
|
|
194
|
+
export { BlockVisitorResponse, ListVisitorPresenceProfilesResponse, VisitorPresenceEntry, VisitorPresenceProfile, blockVisitorResponseSchema, listVisitorPresenceProfilesResponseSchema, visitorPresenceEntrySchema, visitorPresenceProfileSchema };
|
|
137
195
|
//# sourceMappingURL=visitor.d.ts.map
|
package/trpc/visitor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitor.d.ts","names":[],"sources":["../../src/trpc/visitor.ts"],"sourcesContent":[],"mappings":";;;cAIa,4BAA0B,CAAA,CAAA;;IAA1B,EAAA,aAAA
|
|
1
|
+
{"version":3,"file":"visitor.d.ts","names":[],"sources":["../../src/trpc/visitor.ts"],"sourcesContent":[],"mappings":";;;cAIa,4BAA0B,CAAA,CAAA;;IAA1B,EAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKD,oBAAA,GAAuB,CAAA,CAAE,aAAa;cAErC,4BAA0B,CAAA,CAAA;;;;;;;;;;;;;;;;;cAe1B,8BAA4B,CAAA,CAAA;;;;;;;;;;;;;cAc5B,2CAAyC,CAAA,CAAA;;;;;;;;;;;;;;;KAI1C,oBAAA,GAAuB,CAAA,CAAE,aAAa;KACtC,sBAAA,GAAyB,CAAA,CAAE,aAC/B;KAEI,mCAAA,GAAsC,CAAA,CAAE,aAC5C"}
|
package/trpc/visitor.js
CHANGED
|
@@ -10,7 +10,7 @@ const blockVisitorResponseSchema = z.object({
|
|
|
10
10
|
const visitorPresenceEntrySchema = z.object({
|
|
11
11
|
id: z.ulid(),
|
|
12
12
|
status: z.enum(["online", "away"]),
|
|
13
|
-
lastSeenAt: z.string().datetime().nullable(),
|
|
13
|
+
lastSeenAt: z.string().datetime({ offset: true }).nullable(),
|
|
14
14
|
name: z.string().nullable(),
|
|
15
15
|
email: z.string().nullable(),
|
|
16
16
|
image: z.string().nullable(),
|
|
@@ -21,14 +21,21 @@ const visitorPresenceEntrySchema = z.object({
|
|
|
21
21
|
longitude: z.number().nullable(),
|
|
22
22
|
contactId: z.ulid().nullable()
|
|
23
23
|
});
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
const visitorPresenceProfileSchema = z.object({
|
|
25
|
+
id: z.ulid(),
|
|
26
|
+
lastSeenAt: z.string().datetime({ offset: true }).nullable(),
|
|
27
|
+
city: z.string().nullable(),
|
|
28
|
+
region: z.string().nullable(),
|
|
29
|
+
country: z.string().nullable(),
|
|
30
|
+
latitude: z.number().nullable(),
|
|
31
|
+
longitude: z.number().nullable(),
|
|
32
|
+
contactId: z.ulid().nullable(),
|
|
33
|
+
contactName: z.string().nullable(),
|
|
34
|
+
contactEmail: z.string().nullable(),
|
|
35
|
+
contactImage: z.string().nullable()
|
|
30
36
|
});
|
|
37
|
+
const listVisitorPresenceProfilesResponseSchema = z.object({ profilesByVisitorId: z.record(z.string(), visitorPresenceProfileSchema) });
|
|
31
38
|
|
|
32
39
|
//#endregion
|
|
33
|
-
export { blockVisitorResponseSchema,
|
|
40
|
+
export { blockVisitorResponseSchema, listVisitorPresenceProfilesResponseSchema, visitorPresenceEntrySchema, visitorPresenceProfileSchema };
|
|
34
41
|
//# sourceMappingURL=visitor.js.map
|
package/trpc/visitor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitor.js","names":[],"sources":["../../src/trpc/visitor.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { visitorResponseSchema } from \"../api/visitor\";\nimport { conversationRecordSchema } from \"./conversation\";\n\nexport const blockVisitorResponseSchema = z.object({\n\tconversation: conversationRecordSchema,\n\tvisitor: visitorResponseSchema,\n});\n\nexport type BlockVisitorResponse = z.infer<typeof blockVisitorResponseSchema>;\n\nexport const visitorPresenceEntrySchema = z.object({\n\tid: z.ulid(),\n\tstatus: z.enum([\"online\", \"away\"]),\n\tlastSeenAt: z.string().datetime().nullable(),\n\tname: z.string().nullable(),\n\temail: z.string().nullable(),\n\timage: z.string().nullable(),\n\tcity: z.string().nullable(),\n\tregion: z.string().nullable(),\n\tcountry: z.string().nullable(),\n\tlatitude: z.number().nullable(),\n\tlongitude: z.number().nullable(),\n\tcontactId: z.ulid().nullable(),\n});\n\nexport const
|
|
1
|
+
{"version":3,"file":"visitor.js","names":[],"sources":["../../src/trpc/visitor.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { visitorResponseSchema } from \"../api/visitor\";\nimport { conversationRecordSchema } from \"./conversation\";\n\nexport const blockVisitorResponseSchema = z.object({\n\tconversation: conversationRecordSchema,\n\tvisitor: visitorResponseSchema,\n});\n\nexport type BlockVisitorResponse = z.infer<typeof blockVisitorResponseSchema>;\n\nexport const visitorPresenceEntrySchema = z.object({\n\tid: z.ulid(),\n\tstatus: z.enum([\"online\", \"away\"]),\n\tlastSeenAt: z.string().datetime({ offset: true }).nullable(),\n\tname: z.string().nullable(),\n\temail: z.string().nullable(),\n\timage: z.string().nullable(),\n\tcity: z.string().nullable(),\n\tregion: z.string().nullable(),\n\tcountry: z.string().nullable(),\n\tlatitude: z.number().nullable(),\n\tlongitude: z.number().nullable(),\n\tcontactId: z.ulid().nullable(),\n});\n\nexport const visitorPresenceProfileSchema = z.object({\n\tid: z.ulid(),\n\tlastSeenAt: z.string().datetime({ offset: true }).nullable(),\n\tcity: z.string().nullable(),\n\tregion: z.string().nullable(),\n\tcountry: z.string().nullable(),\n\tlatitude: z.number().nullable(),\n\tlongitude: z.number().nullable(),\n\tcontactId: z.ulid().nullable(),\n\tcontactName: z.string().nullable(),\n\tcontactEmail: z.string().nullable(),\n\tcontactImage: z.string().nullable(),\n});\n\nexport const listVisitorPresenceProfilesResponseSchema = z.object({\n\tprofilesByVisitorId: z.record(z.string(), visitorPresenceProfileSchema),\n});\n\nexport type VisitorPresenceEntry = z.infer<typeof visitorPresenceEntrySchema>;\nexport type VisitorPresenceProfile = z.infer<\n\ttypeof visitorPresenceProfileSchema\n>;\nexport type ListVisitorPresenceProfilesResponse = z.infer<\n\ttypeof listVisitorPresenceProfilesResponseSchema\n>;\n"],"mappings":";;;;;AAIA,MAAa,6BAA6B,EAAE,OA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