@voiceflow/dtos-interact 1.47.0 → 1.48.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.
- package/build/cjs/trace/any.dto.d.ts +80 -14
- package/build/cjs/trace/any.dto.d.ts.map +1 -1
- package/build/cjs/trace/live-agent-handoff.dto.d.ts +80 -14
- package/build/cjs/trace/live-agent-handoff.dto.d.ts.map +1 -1
- package/build/cjs/trace/live-agent-handoff.dto.js +31 -13
- package/build/cjs/trace/live-agent-handoff.dto.js.map +1 -1
- package/build/esm/trace/any.dto.d.ts +80 -14
- package/build/esm/trace/any.dto.d.ts.map +1 -1
- package/build/esm/trace/live-agent-handoff.dto.d.ts +80 -14
- package/build/esm/trace/live-agent-handoff.dto.d.ts.map +1 -1
- package/build/esm/trace/live-agent-handoff.dto.js +31 -13
- package/build/esm/trace/live-agent-handoff.dto.js.map +1 -1
- package/package.json +2 -2
|
@@ -3059,15 +3059,7 @@ export declare const AnyTraceDTO: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3059
3059
|
time: z.ZodOptional<z.ZodNumber>;
|
|
3060
3060
|
} & {
|
|
3061
3061
|
type: z.ZodLiteral<"live-agent-handoff">;
|
|
3062
|
-
payload: z.ZodObject<{
|
|
3063
|
-
event: z.ZodNativeEnum<{
|
|
3064
|
-
readonly CHAT_STARTED: "chat_started";
|
|
3065
|
-
readonly CHAT_ENDED: "chat_ended";
|
|
3066
|
-
readonly PARTICIPANT_JOINED: "participant_joined";
|
|
3067
|
-
readonly MESSAGE_RECEIVED: "message_received";
|
|
3068
|
-
readonly CHAT_DISMISSED: "chat_dismissed";
|
|
3069
|
-
readonly EVENT: "event";
|
|
3070
|
-
}>;
|
|
3062
|
+
payload: z.ZodUnion<[z.ZodObject<{
|
|
3071
3063
|
conversationID: z.ZodString;
|
|
3072
3064
|
message: z.ZodString;
|
|
3073
3065
|
translationKey: z.ZodOptional<z.ZodString>;
|
|
@@ -3082,9 +3074,14 @@ export declare const AnyTraceDTO: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3082
3074
|
name: string;
|
|
3083
3075
|
imageUrl?: string | undefined;
|
|
3084
3076
|
}>>;
|
|
3077
|
+
} & {
|
|
3078
|
+
event: z.ZodUnion<[z.ZodLiteral<"chat_ended">, z.ZodLiteral<"chat_dismissed">]>;
|
|
3079
|
+
downloadMessage: z.ZodOptional<z.ZodString>;
|
|
3080
|
+
continueMessage: z.ZodOptional<z.ZodString>;
|
|
3081
|
+
newConversationMessage: z.ZodOptional<z.ZodString>;
|
|
3085
3082
|
}, "strip", z.ZodTypeAny, {
|
|
3086
3083
|
message: string;
|
|
3087
|
-
event: "
|
|
3084
|
+
event: "chat_ended" | "chat_dismissed";
|
|
3088
3085
|
conversationID: string;
|
|
3089
3086
|
agent?: {
|
|
3090
3087
|
name: string;
|
|
@@ -3092,9 +3089,12 @@ export declare const AnyTraceDTO: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3092
3089
|
} | undefined;
|
|
3093
3090
|
translationKey?: string | undefined;
|
|
3094
3091
|
translationParams?: Record<string, string> | undefined;
|
|
3092
|
+
downloadMessage?: string | undefined;
|
|
3093
|
+
continueMessage?: string | undefined;
|
|
3094
|
+
newConversationMessage?: string | undefined;
|
|
3095
3095
|
}, {
|
|
3096
3096
|
message: string;
|
|
3097
|
-
event: "
|
|
3097
|
+
event: "chat_ended" | "chat_dismissed";
|
|
3098
3098
|
conversationID: string;
|
|
3099
3099
|
agent?: {
|
|
3100
3100
|
name: string;
|
|
@@ -3102,12 +3102,65 @@ export declare const AnyTraceDTO: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3102
3102
|
} | undefined;
|
|
3103
3103
|
translationKey?: string | undefined;
|
|
3104
3104
|
translationParams?: Record<string, string> | undefined;
|
|
3105
|
-
|
|
3105
|
+
downloadMessage?: string | undefined;
|
|
3106
|
+
continueMessage?: string | undefined;
|
|
3107
|
+
newConversationMessage?: string | undefined;
|
|
3108
|
+
}>, z.ZodObject<{
|
|
3109
|
+
conversationID: z.ZodString;
|
|
3110
|
+
message: z.ZodString;
|
|
3111
|
+
translationKey: z.ZodOptional<z.ZodString>;
|
|
3112
|
+
translationParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3113
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
3114
|
+
name: z.ZodString;
|
|
3115
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
3116
|
+
}, "strip", z.ZodTypeAny, {
|
|
3117
|
+
name: string;
|
|
3118
|
+
imageUrl?: string | undefined;
|
|
3119
|
+
}, {
|
|
3120
|
+
name: string;
|
|
3121
|
+
imageUrl?: string | undefined;
|
|
3122
|
+
}>>;
|
|
3123
|
+
} & {
|
|
3124
|
+
event: z.ZodUnion<[z.ZodLiteral<"chat_started">, z.ZodLiteral<"participant_joined">, z.ZodLiteral<"message_received">, z.ZodLiteral<"event">]>;
|
|
3125
|
+
}, "strip", z.ZodTypeAny, {
|
|
3126
|
+
message: string;
|
|
3127
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
3128
|
+
conversationID: string;
|
|
3129
|
+
agent?: {
|
|
3130
|
+
name: string;
|
|
3131
|
+
imageUrl?: string | undefined;
|
|
3132
|
+
} | undefined;
|
|
3133
|
+
translationKey?: string | undefined;
|
|
3134
|
+
translationParams?: Record<string, string> | undefined;
|
|
3135
|
+
}, {
|
|
3136
|
+
message: string;
|
|
3137
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
3138
|
+
conversationID: string;
|
|
3139
|
+
agent?: {
|
|
3140
|
+
name: string;
|
|
3141
|
+
imageUrl?: string | undefined;
|
|
3142
|
+
} | undefined;
|
|
3143
|
+
translationKey?: string | undefined;
|
|
3144
|
+
translationParams?: Record<string, string> | undefined;
|
|
3145
|
+
}>]>;
|
|
3106
3146
|
}, "strip", z.ZodTypeAny, {
|
|
3107
3147
|
type: "live-agent-handoff";
|
|
3108
3148
|
payload: {
|
|
3109
3149
|
message: string;
|
|
3110
|
-
event: "
|
|
3150
|
+
event: "chat_ended" | "chat_dismissed";
|
|
3151
|
+
conversationID: string;
|
|
3152
|
+
agent?: {
|
|
3153
|
+
name: string;
|
|
3154
|
+
imageUrl?: string | undefined;
|
|
3155
|
+
} | undefined;
|
|
3156
|
+
translationKey?: string | undefined;
|
|
3157
|
+
translationParams?: Record<string, string> | undefined;
|
|
3158
|
+
downloadMessage?: string | undefined;
|
|
3159
|
+
continueMessage?: string | undefined;
|
|
3160
|
+
newConversationMessage?: string | undefined;
|
|
3161
|
+
} | {
|
|
3162
|
+
message: string;
|
|
3163
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
3111
3164
|
conversationID: string;
|
|
3112
3165
|
agent?: {
|
|
3113
3166
|
name: string;
|
|
@@ -3130,7 +3183,20 @@ export declare const AnyTraceDTO: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3130
3183
|
type: "live-agent-handoff";
|
|
3131
3184
|
payload: {
|
|
3132
3185
|
message: string;
|
|
3133
|
-
event: "
|
|
3186
|
+
event: "chat_ended" | "chat_dismissed";
|
|
3187
|
+
conversationID: string;
|
|
3188
|
+
agent?: {
|
|
3189
|
+
name: string;
|
|
3190
|
+
imageUrl?: string | undefined;
|
|
3191
|
+
} | undefined;
|
|
3192
|
+
translationKey?: string | undefined;
|
|
3193
|
+
translationParams?: Record<string, string> | undefined;
|
|
3194
|
+
downloadMessage?: string | undefined;
|
|
3195
|
+
continueMessage?: string | undefined;
|
|
3196
|
+
newConversationMessage?: string | undefined;
|
|
3197
|
+
} | {
|
|
3198
|
+
message: string;
|
|
3199
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
3134
3200
|
conversationID: string;
|
|
3135
3201
|
agent?: {
|
|
3136
3202
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"any.dto.d.ts","sourceRoot":"","sources":["../../../src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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyBtB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -45,15 +45,7 @@ export declare const LiveAgentHandoffTraceDTO: z.ZodObject<{
|
|
|
45
45
|
time: z.ZodOptional<z.ZodNumber>;
|
|
46
46
|
} & {
|
|
47
47
|
type: z.ZodLiteral<"live-agent-handoff">;
|
|
48
|
-
payload: z.ZodObject<{
|
|
49
|
-
event: z.ZodNativeEnum<{
|
|
50
|
-
readonly CHAT_STARTED: "chat_started";
|
|
51
|
-
readonly CHAT_ENDED: "chat_ended";
|
|
52
|
-
readonly PARTICIPANT_JOINED: "participant_joined";
|
|
53
|
-
readonly MESSAGE_RECEIVED: "message_received";
|
|
54
|
-
readonly CHAT_DISMISSED: "chat_dismissed";
|
|
55
|
-
readonly EVENT: "event";
|
|
56
|
-
}>;
|
|
48
|
+
payload: z.ZodUnion<[z.ZodObject<{
|
|
57
49
|
conversationID: z.ZodString;
|
|
58
50
|
message: z.ZodString;
|
|
59
51
|
translationKey: z.ZodOptional<z.ZodString>;
|
|
@@ -68,9 +60,14 @@ export declare const LiveAgentHandoffTraceDTO: z.ZodObject<{
|
|
|
68
60
|
name: string;
|
|
69
61
|
imageUrl?: string | undefined;
|
|
70
62
|
}>>;
|
|
63
|
+
} & {
|
|
64
|
+
event: z.ZodUnion<[z.ZodLiteral<"chat_ended">, z.ZodLiteral<"chat_dismissed">]>;
|
|
65
|
+
downloadMessage: z.ZodOptional<z.ZodString>;
|
|
66
|
+
continueMessage: z.ZodOptional<z.ZodString>;
|
|
67
|
+
newConversationMessage: z.ZodOptional<z.ZodString>;
|
|
71
68
|
}, "strip", z.ZodTypeAny, {
|
|
72
69
|
message: string;
|
|
73
|
-
event: "
|
|
70
|
+
event: "chat_ended" | "chat_dismissed";
|
|
74
71
|
conversationID: string;
|
|
75
72
|
agent?: {
|
|
76
73
|
name: string;
|
|
@@ -78,9 +75,12 @@ export declare const LiveAgentHandoffTraceDTO: z.ZodObject<{
|
|
|
78
75
|
} | undefined;
|
|
79
76
|
translationKey?: string | undefined;
|
|
80
77
|
translationParams?: Record<string, string> | undefined;
|
|
78
|
+
downloadMessage?: string | undefined;
|
|
79
|
+
continueMessage?: string | undefined;
|
|
80
|
+
newConversationMessage?: string | undefined;
|
|
81
81
|
}, {
|
|
82
82
|
message: string;
|
|
83
|
-
event: "
|
|
83
|
+
event: "chat_ended" | "chat_dismissed";
|
|
84
84
|
conversationID: string;
|
|
85
85
|
agent?: {
|
|
86
86
|
name: string;
|
|
@@ -88,12 +88,65 @@ export declare const LiveAgentHandoffTraceDTO: z.ZodObject<{
|
|
|
88
88
|
} | undefined;
|
|
89
89
|
translationKey?: string | undefined;
|
|
90
90
|
translationParams?: Record<string, string> | undefined;
|
|
91
|
-
|
|
91
|
+
downloadMessage?: string | undefined;
|
|
92
|
+
continueMessage?: string | undefined;
|
|
93
|
+
newConversationMessage?: string | undefined;
|
|
94
|
+
}>, z.ZodObject<{
|
|
95
|
+
conversationID: z.ZodString;
|
|
96
|
+
message: z.ZodString;
|
|
97
|
+
translationKey: z.ZodOptional<z.ZodString>;
|
|
98
|
+
translationParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
99
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
name: z.ZodString;
|
|
101
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
name: string;
|
|
104
|
+
imageUrl?: string | undefined;
|
|
105
|
+
}, {
|
|
106
|
+
name: string;
|
|
107
|
+
imageUrl?: string | undefined;
|
|
108
|
+
}>>;
|
|
109
|
+
} & {
|
|
110
|
+
event: z.ZodUnion<[z.ZodLiteral<"chat_started">, z.ZodLiteral<"participant_joined">, z.ZodLiteral<"message_received">, z.ZodLiteral<"event">]>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
message: string;
|
|
113
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
114
|
+
conversationID: string;
|
|
115
|
+
agent?: {
|
|
116
|
+
name: string;
|
|
117
|
+
imageUrl?: string | undefined;
|
|
118
|
+
} | undefined;
|
|
119
|
+
translationKey?: string | undefined;
|
|
120
|
+
translationParams?: Record<string, string> | undefined;
|
|
121
|
+
}, {
|
|
122
|
+
message: string;
|
|
123
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
124
|
+
conversationID: string;
|
|
125
|
+
agent?: {
|
|
126
|
+
name: string;
|
|
127
|
+
imageUrl?: string | undefined;
|
|
128
|
+
} | undefined;
|
|
129
|
+
translationKey?: string | undefined;
|
|
130
|
+
translationParams?: Record<string, string> | undefined;
|
|
131
|
+
}>]>;
|
|
92
132
|
}, "strip", z.ZodTypeAny, {
|
|
93
133
|
type: "live-agent-handoff";
|
|
94
134
|
payload: {
|
|
95
135
|
message: string;
|
|
96
|
-
event: "
|
|
136
|
+
event: "chat_ended" | "chat_dismissed";
|
|
137
|
+
conversationID: string;
|
|
138
|
+
agent?: {
|
|
139
|
+
name: string;
|
|
140
|
+
imageUrl?: string | undefined;
|
|
141
|
+
} | undefined;
|
|
142
|
+
translationKey?: string | undefined;
|
|
143
|
+
translationParams?: Record<string, string> | undefined;
|
|
144
|
+
downloadMessage?: string | undefined;
|
|
145
|
+
continueMessage?: string | undefined;
|
|
146
|
+
newConversationMessage?: string | undefined;
|
|
147
|
+
} | {
|
|
148
|
+
message: string;
|
|
149
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
97
150
|
conversationID: string;
|
|
98
151
|
agent?: {
|
|
99
152
|
name: string;
|
|
@@ -116,7 +169,20 @@ export declare const LiveAgentHandoffTraceDTO: z.ZodObject<{
|
|
|
116
169
|
type: "live-agent-handoff";
|
|
117
170
|
payload: {
|
|
118
171
|
message: string;
|
|
119
|
-
event: "
|
|
172
|
+
event: "chat_ended" | "chat_dismissed";
|
|
173
|
+
conversationID: string;
|
|
174
|
+
agent?: {
|
|
175
|
+
name: string;
|
|
176
|
+
imageUrl?: string | undefined;
|
|
177
|
+
} | undefined;
|
|
178
|
+
translationKey?: string | undefined;
|
|
179
|
+
translationParams?: Record<string, string> | undefined;
|
|
180
|
+
downloadMessage?: string | undefined;
|
|
181
|
+
continueMessage?: string | undefined;
|
|
182
|
+
newConversationMessage?: string | undefined;
|
|
183
|
+
} | {
|
|
184
|
+
message: string;
|
|
185
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
120
186
|
conversationID: string;
|
|
121
187
|
agent?: {
|
|
122
188
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-agent-handoff.dto.d.ts","sourceRoot":"","sources":["../../../src/trace/live-agent-handoff.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAK9C,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC/E,eAAO,MAAM,yBAAyB;;;;;;;CAO5B,CAAC;
|
|
1
|
+
{"version":3,"file":"live-agent-handoff.dto.d.ts","sourceRoot":"","sources":["../../../src/trace/live-agent-handoff.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAK9C,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC/E,eAAO,MAAM,yBAAyB;;;;;;;CAO5B,CAAC;AAmCX,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC7E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGnC,CAAC"}
|
|
@@ -12,20 +12,38 @@ exports.LiveAgentHandoffEventType = {
|
|
|
12
12
|
CHAT_DISMISSED: 'chat_dismissed',
|
|
13
13
|
EVENT: 'event',
|
|
14
14
|
};
|
|
15
|
+
// Base payload structure shared by all event types
|
|
16
|
+
const BaseLiveAgentHandoffPayload = zod_1.z.object({
|
|
17
|
+
conversationID: zod_1.z.string().min(1),
|
|
18
|
+
message: zod_1.z.string(),
|
|
19
|
+
translationKey: zod_1.z.string().optional(),
|
|
20
|
+
translationParams: zod_1.z.record(zod_1.z.string()).optional(),
|
|
21
|
+
agent: zod_1.z
|
|
22
|
+
.object({
|
|
23
|
+
name: zod_1.z.string().min(1),
|
|
24
|
+
imageUrl: zod_1.z.string().url().optional(),
|
|
25
|
+
})
|
|
26
|
+
.optional(),
|
|
27
|
+
});
|
|
28
|
+
const ChatEndedPayload = BaseLiveAgentHandoffPayload.extend({
|
|
29
|
+
event: zod_1.z.union([
|
|
30
|
+
zod_1.z.literal(exports.LiveAgentHandoffEventType.CHAT_ENDED),
|
|
31
|
+
zod_1.z.literal(exports.LiveAgentHandoffEventType.CHAT_DISMISSED),
|
|
32
|
+
]),
|
|
33
|
+
downloadMessage: zod_1.z.string().optional(),
|
|
34
|
+
continueMessage: zod_1.z.string().optional(),
|
|
35
|
+
newConversationMessage: zod_1.z.string().optional(),
|
|
36
|
+
});
|
|
37
|
+
const OtherLiveAgentHandoffPayload = BaseLiveAgentHandoffPayload.extend({
|
|
38
|
+
event: zod_1.z.union([
|
|
39
|
+
zod_1.z.literal(exports.LiveAgentHandoffEventType.CHAT_STARTED),
|
|
40
|
+
zod_1.z.literal(exports.LiveAgentHandoffEventType.PARTICIPANT_JOINED),
|
|
41
|
+
zod_1.z.literal(exports.LiveAgentHandoffEventType.MESSAGE_RECEIVED),
|
|
42
|
+
zod_1.z.literal(exports.LiveAgentHandoffEventType.EVENT),
|
|
43
|
+
]),
|
|
44
|
+
});
|
|
15
45
|
exports.LiveAgentHandoffTraceDTO = utils_dto_1.BaseTraceDTO.extend({
|
|
16
46
|
type: zod_1.z.literal(trace_type_enum_1.TraceType.LIVE_AGENT_HANDOFF),
|
|
17
|
-
payload: zod_1.z.
|
|
18
|
-
event: zod_1.z.nativeEnum(exports.LiveAgentHandoffEventType),
|
|
19
|
-
conversationID: zod_1.z.string().min(1),
|
|
20
|
-
message: zod_1.z.string(),
|
|
21
|
-
translationKey: zod_1.z.string().optional(),
|
|
22
|
-
translationParams: zod_1.z.record(zod_1.z.string()).optional(),
|
|
23
|
-
agent: zod_1.z
|
|
24
|
-
.object({
|
|
25
|
-
name: zod_1.z.string().min(1),
|
|
26
|
-
imageUrl: zod_1.z.string().url().optional(),
|
|
27
|
-
})
|
|
28
|
-
.optional(),
|
|
29
|
-
}),
|
|
47
|
+
payload: zod_1.z.union([ChatEndedPayload, OtherLiveAgentHandoffPayload]),
|
|
30
48
|
});
|
|
31
49
|
//# sourceMappingURL=live-agent-handoff.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-agent-handoff.dto.js","sourceRoot":"","sources":["../../../src/trace/live-agent-handoff.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAIxB,uDAA8C;AAC9C,2CAA2C;AAG9B,QAAA,yBAAyB,GAAG;IACvC,YAAY,EAAE,cAAc;IAC5B,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,oBAAoB;IACxC,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;IAChC,KAAK,EAAE,OAAO;CACN,CAAC;
|
|
1
|
+
{"version":3,"file":"live-agent-handoff.dto.js","sourceRoot":"","sources":["../../../src/trace/live-agent-handoff.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAIxB,uDAA8C;AAC9C,2CAA2C;AAG9B,QAAA,yBAAyB,GAAG;IACvC,YAAY,EAAE,cAAc;IAC5B,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,oBAAoB;IACxC,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;IAChC,KAAK,EAAE,OAAO;CACN,CAAC;AAEX,mDAAmD;AACnD,MAAM,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,iBAAiB,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAClD,KAAK,EAAE,OAAC;SACL,MAAM,CAAC;QACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;KACtC,CAAC;SACD,QAAQ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payload: z.ZodObject<{
|
|
3063
|
-
event: z.ZodNativeEnum<{
|
|
3064
|
-
readonly CHAT_STARTED: "chat_started";
|
|
3065
|
-
readonly CHAT_ENDED: "chat_ended";
|
|
3066
|
-
readonly PARTICIPANT_JOINED: "participant_joined";
|
|
3067
|
-
readonly MESSAGE_RECEIVED: "message_received";
|
|
3068
|
-
readonly CHAT_DISMISSED: "chat_dismissed";
|
|
3069
|
-
readonly EVENT: "event";
|
|
3070
|
-
}>;
|
|
3062
|
+
payload: z.ZodUnion<[z.ZodObject<{
|
|
3071
3063
|
conversationID: z.ZodString;
|
|
3072
3064
|
message: z.ZodString;
|
|
3073
3065
|
translationKey: z.ZodOptional<z.ZodString>;
|
|
@@ -3082,9 +3074,14 @@ export declare const AnyTraceDTO: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3082
3074
|
name: string;
|
|
3083
3075
|
imageUrl?: string | undefined;
|
|
3084
3076
|
}>>;
|
|
3077
|
+
} & {
|
|
3078
|
+
event: z.ZodUnion<[z.ZodLiteral<"chat_ended">, z.ZodLiteral<"chat_dismissed">]>;
|
|
3079
|
+
downloadMessage: z.ZodOptional<z.ZodString>;
|
|
3080
|
+
continueMessage: z.ZodOptional<z.ZodString>;
|
|
3081
|
+
newConversationMessage: z.ZodOptional<z.ZodString>;
|
|
3085
3082
|
}, "strip", z.ZodTypeAny, {
|
|
3086
3083
|
message: string;
|
|
3087
|
-
event: "
|
|
3084
|
+
event: "chat_ended" | "chat_dismissed";
|
|
3088
3085
|
conversationID: string;
|
|
3089
3086
|
agent?: {
|
|
3090
3087
|
name: string;
|
|
@@ -3092,9 +3089,12 @@ export declare const AnyTraceDTO: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3092
3089
|
} | undefined;
|
|
3093
3090
|
translationKey?: string | undefined;
|
|
3094
3091
|
translationParams?: Record<string, string> | undefined;
|
|
3092
|
+
downloadMessage?: string | undefined;
|
|
3093
|
+
continueMessage?: string | undefined;
|
|
3094
|
+
newConversationMessage?: string | undefined;
|
|
3095
3095
|
}, {
|
|
3096
3096
|
message: string;
|
|
3097
|
-
event: "
|
|
3097
|
+
event: "chat_ended" | "chat_dismissed";
|
|
3098
3098
|
conversationID: string;
|
|
3099
3099
|
agent?: {
|
|
3100
3100
|
name: string;
|
|
@@ -3102,12 +3102,65 @@ export declare const AnyTraceDTO: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3102
3102
|
} | undefined;
|
|
3103
3103
|
translationKey?: string | undefined;
|
|
3104
3104
|
translationParams?: Record<string, string> | undefined;
|
|
3105
|
-
|
|
3105
|
+
downloadMessage?: string | undefined;
|
|
3106
|
+
continueMessage?: string | undefined;
|
|
3107
|
+
newConversationMessage?: string | undefined;
|
|
3108
|
+
}>, z.ZodObject<{
|
|
3109
|
+
conversationID: z.ZodString;
|
|
3110
|
+
message: z.ZodString;
|
|
3111
|
+
translationKey: z.ZodOptional<z.ZodString>;
|
|
3112
|
+
translationParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3113
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
3114
|
+
name: z.ZodString;
|
|
3115
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
3116
|
+
}, "strip", z.ZodTypeAny, {
|
|
3117
|
+
name: string;
|
|
3118
|
+
imageUrl?: string | undefined;
|
|
3119
|
+
}, {
|
|
3120
|
+
name: string;
|
|
3121
|
+
imageUrl?: string | undefined;
|
|
3122
|
+
}>>;
|
|
3123
|
+
} & {
|
|
3124
|
+
event: z.ZodUnion<[z.ZodLiteral<"chat_started">, z.ZodLiteral<"participant_joined">, z.ZodLiteral<"message_received">, z.ZodLiteral<"event">]>;
|
|
3125
|
+
}, "strip", z.ZodTypeAny, {
|
|
3126
|
+
message: string;
|
|
3127
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
3128
|
+
conversationID: string;
|
|
3129
|
+
agent?: {
|
|
3130
|
+
name: string;
|
|
3131
|
+
imageUrl?: string | undefined;
|
|
3132
|
+
} | undefined;
|
|
3133
|
+
translationKey?: string | undefined;
|
|
3134
|
+
translationParams?: Record<string, string> | undefined;
|
|
3135
|
+
}, {
|
|
3136
|
+
message: string;
|
|
3137
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
3138
|
+
conversationID: string;
|
|
3139
|
+
agent?: {
|
|
3140
|
+
name: string;
|
|
3141
|
+
imageUrl?: string | undefined;
|
|
3142
|
+
} | undefined;
|
|
3143
|
+
translationKey?: string | undefined;
|
|
3144
|
+
translationParams?: Record<string, string> | undefined;
|
|
3145
|
+
}>]>;
|
|
3106
3146
|
}, "strip", z.ZodTypeAny, {
|
|
3107
3147
|
type: "live-agent-handoff";
|
|
3108
3148
|
payload: {
|
|
3109
3149
|
message: string;
|
|
3110
|
-
event: "
|
|
3150
|
+
event: "chat_ended" | "chat_dismissed";
|
|
3151
|
+
conversationID: string;
|
|
3152
|
+
agent?: {
|
|
3153
|
+
name: string;
|
|
3154
|
+
imageUrl?: string | undefined;
|
|
3155
|
+
} | undefined;
|
|
3156
|
+
translationKey?: string | undefined;
|
|
3157
|
+
translationParams?: Record<string, string> | undefined;
|
|
3158
|
+
downloadMessage?: string | undefined;
|
|
3159
|
+
continueMessage?: string | undefined;
|
|
3160
|
+
newConversationMessage?: string | undefined;
|
|
3161
|
+
} | {
|
|
3162
|
+
message: string;
|
|
3163
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
3111
3164
|
conversationID: string;
|
|
3112
3165
|
agent?: {
|
|
3113
3166
|
name: string;
|
|
@@ -3130,7 +3183,20 @@ export declare const AnyTraceDTO: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3130
3183
|
type: "live-agent-handoff";
|
|
3131
3184
|
payload: {
|
|
3132
3185
|
message: string;
|
|
3133
|
-
event: "
|
|
3186
|
+
event: "chat_ended" | "chat_dismissed";
|
|
3187
|
+
conversationID: string;
|
|
3188
|
+
agent?: {
|
|
3189
|
+
name: string;
|
|
3190
|
+
imageUrl?: string | undefined;
|
|
3191
|
+
} | undefined;
|
|
3192
|
+
translationKey?: string | undefined;
|
|
3193
|
+
translationParams?: Record<string, string> | undefined;
|
|
3194
|
+
downloadMessage?: string | undefined;
|
|
3195
|
+
continueMessage?: string | undefined;
|
|
3196
|
+
newConversationMessage?: string | undefined;
|
|
3197
|
+
} | {
|
|
3198
|
+
message: string;
|
|
3199
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
3134
3200
|
conversationID: string;
|
|
3135
3201
|
agent?: {
|
|
3136
3202
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"any.dto.d.ts","sourceRoot":"","sources":["../../../src/trace/any.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2BxB,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"any.dto.d.ts","sourceRoot":"","sources":["../../../src/trace/any.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2BxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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: "chat_started";
|
|
51
|
-
readonly CHAT_ENDED: "chat_ended";
|
|
52
|
-
readonly PARTICIPANT_JOINED: "participant_joined";
|
|
53
|
-
readonly MESSAGE_RECEIVED: "message_received";
|
|
54
|
-
readonly CHAT_DISMISSED: "chat_dismissed";
|
|
55
|
-
readonly EVENT: "event";
|
|
56
|
-
}>;
|
|
48
|
+
payload: z.ZodUnion<[z.ZodObject<{
|
|
57
49
|
conversationID: z.ZodString;
|
|
58
50
|
message: z.ZodString;
|
|
59
51
|
translationKey: z.ZodOptional<z.ZodString>;
|
|
@@ -68,9 +60,14 @@ export declare const LiveAgentHandoffTraceDTO: z.ZodObject<{
|
|
|
68
60
|
name: string;
|
|
69
61
|
imageUrl?: string | undefined;
|
|
70
62
|
}>>;
|
|
63
|
+
} & {
|
|
64
|
+
event: z.ZodUnion<[z.ZodLiteral<"chat_ended">, z.ZodLiteral<"chat_dismissed">]>;
|
|
65
|
+
downloadMessage: z.ZodOptional<z.ZodString>;
|
|
66
|
+
continueMessage: z.ZodOptional<z.ZodString>;
|
|
67
|
+
newConversationMessage: z.ZodOptional<z.ZodString>;
|
|
71
68
|
}, "strip", z.ZodTypeAny, {
|
|
72
69
|
message: string;
|
|
73
|
-
event: "
|
|
70
|
+
event: "chat_ended" | "chat_dismissed";
|
|
74
71
|
conversationID: string;
|
|
75
72
|
agent?: {
|
|
76
73
|
name: string;
|
|
@@ -78,9 +75,12 @@ export declare const LiveAgentHandoffTraceDTO: z.ZodObject<{
|
|
|
78
75
|
} | undefined;
|
|
79
76
|
translationKey?: string | undefined;
|
|
80
77
|
translationParams?: Record<string, string> | undefined;
|
|
78
|
+
downloadMessage?: string | undefined;
|
|
79
|
+
continueMessage?: string | undefined;
|
|
80
|
+
newConversationMessage?: string | undefined;
|
|
81
81
|
}, {
|
|
82
82
|
message: string;
|
|
83
|
-
event: "
|
|
83
|
+
event: "chat_ended" | "chat_dismissed";
|
|
84
84
|
conversationID: string;
|
|
85
85
|
agent?: {
|
|
86
86
|
name: string;
|
|
@@ -88,12 +88,65 @@ export declare const LiveAgentHandoffTraceDTO: z.ZodObject<{
|
|
|
88
88
|
} | undefined;
|
|
89
89
|
translationKey?: string | undefined;
|
|
90
90
|
translationParams?: Record<string, string> | undefined;
|
|
91
|
-
|
|
91
|
+
downloadMessage?: string | undefined;
|
|
92
|
+
continueMessage?: string | undefined;
|
|
93
|
+
newConversationMessage?: string | undefined;
|
|
94
|
+
}>, z.ZodObject<{
|
|
95
|
+
conversationID: z.ZodString;
|
|
96
|
+
message: z.ZodString;
|
|
97
|
+
translationKey: z.ZodOptional<z.ZodString>;
|
|
98
|
+
translationParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
99
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
name: z.ZodString;
|
|
101
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
name: string;
|
|
104
|
+
imageUrl?: string | undefined;
|
|
105
|
+
}, {
|
|
106
|
+
name: string;
|
|
107
|
+
imageUrl?: string | undefined;
|
|
108
|
+
}>>;
|
|
109
|
+
} & {
|
|
110
|
+
event: z.ZodUnion<[z.ZodLiteral<"chat_started">, z.ZodLiteral<"participant_joined">, z.ZodLiteral<"message_received">, z.ZodLiteral<"event">]>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
message: string;
|
|
113
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
114
|
+
conversationID: string;
|
|
115
|
+
agent?: {
|
|
116
|
+
name: string;
|
|
117
|
+
imageUrl?: string | undefined;
|
|
118
|
+
} | undefined;
|
|
119
|
+
translationKey?: string | undefined;
|
|
120
|
+
translationParams?: Record<string, string> | undefined;
|
|
121
|
+
}, {
|
|
122
|
+
message: string;
|
|
123
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
124
|
+
conversationID: string;
|
|
125
|
+
agent?: {
|
|
126
|
+
name: string;
|
|
127
|
+
imageUrl?: string | undefined;
|
|
128
|
+
} | undefined;
|
|
129
|
+
translationKey?: string | undefined;
|
|
130
|
+
translationParams?: Record<string, string> | undefined;
|
|
131
|
+
}>]>;
|
|
92
132
|
}, "strip", z.ZodTypeAny, {
|
|
93
133
|
type: "live-agent-handoff";
|
|
94
134
|
payload: {
|
|
95
135
|
message: string;
|
|
96
|
-
event: "
|
|
136
|
+
event: "chat_ended" | "chat_dismissed";
|
|
137
|
+
conversationID: string;
|
|
138
|
+
agent?: {
|
|
139
|
+
name: string;
|
|
140
|
+
imageUrl?: string | undefined;
|
|
141
|
+
} | undefined;
|
|
142
|
+
translationKey?: string | undefined;
|
|
143
|
+
translationParams?: Record<string, string> | undefined;
|
|
144
|
+
downloadMessage?: string | undefined;
|
|
145
|
+
continueMessage?: string | undefined;
|
|
146
|
+
newConversationMessage?: string | undefined;
|
|
147
|
+
} | {
|
|
148
|
+
message: string;
|
|
149
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
97
150
|
conversationID: string;
|
|
98
151
|
agent?: {
|
|
99
152
|
name: string;
|
|
@@ -116,7 +169,20 @@ export declare const LiveAgentHandoffTraceDTO: z.ZodObject<{
|
|
|
116
169
|
type: "live-agent-handoff";
|
|
117
170
|
payload: {
|
|
118
171
|
message: string;
|
|
119
|
-
event: "
|
|
172
|
+
event: "chat_ended" | "chat_dismissed";
|
|
173
|
+
conversationID: string;
|
|
174
|
+
agent?: {
|
|
175
|
+
name: string;
|
|
176
|
+
imageUrl?: string | undefined;
|
|
177
|
+
} | undefined;
|
|
178
|
+
translationKey?: string | undefined;
|
|
179
|
+
translationParams?: Record<string, string> | undefined;
|
|
180
|
+
downloadMessage?: string | undefined;
|
|
181
|
+
continueMessage?: string | undefined;
|
|
182
|
+
newConversationMessage?: string | undefined;
|
|
183
|
+
} | {
|
|
184
|
+
message: string;
|
|
185
|
+
event: "event" | "chat_started" | "participant_joined" | "message_received";
|
|
120
186
|
conversationID: string;
|
|
121
187
|
agent?: {
|
|
122
188
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-agent-handoff.dto.d.ts","sourceRoot":"","sources":["../../../src/trace/live-agent-handoff.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAK9C,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC/E,eAAO,MAAM,yBAAyB;;;;;;;CAO5B,CAAC;
|
|
1
|
+
{"version":3,"file":"live-agent-handoff.dto.d.ts","sourceRoot":"","sources":["../../../src/trace/live-agent-handoff.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAK9C,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC/E,eAAO,MAAM,yBAAyB;;;;;;;CAO5B,CAAC;AAmCX,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC7E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGnC,CAAC"}
|
|
@@ -9,20 +9,38 @@ export const LiveAgentHandoffEventType = {
|
|
|
9
9
|
CHAT_DISMISSED: 'chat_dismissed',
|
|
10
10
|
EVENT: 'event',
|
|
11
11
|
};
|
|
12
|
+
// Base payload structure shared by all event types
|
|
13
|
+
const BaseLiveAgentHandoffPayload = z.object({
|
|
14
|
+
conversationID: z.string().min(1),
|
|
15
|
+
message: z.string(),
|
|
16
|
+
translationKey: z.string().optional(),
|
|
17
|
+
translationParams: z.record(z.string()).optional(),
|
|
18
|
+
agent: z
|
|
19
|
+
.object({
|
|
20
|
+
name: z.string().min(1),
|
|
21
|
+
imageUrl: z.string().url().optional(),
|
|
22
|
+
})
|
|
23
|
+
.optional(),
|
|
24
|
+
});
|
|
25
|
+
const ChatEndedPayload = BaseLiveAgentHandoffPayload.extend({
|
|
26
|
+
event: z.union([
|
|
27
|
+
z.literal(LiveAgentHandoffEventType.CHAT_ENDED),
|
|
28
|
+
z.literal(LiveAgentHandoffEventType.CHAT_DISMISSED),
|
|
29
|
+
]),
|
|
30
|
+
downloadMessage: z.string().optional(),
|
|
31
|
+
continueMessage: z.string().optional(),
|
|
32
|
+
newConversationMessage: z.string().optional(),
|
|
33
|
+
});
|
|
34
|
+
const OtherLiveAgentHandoffPayload = BaseLiveAgentHandoffPayload.extend({
|
|
35
|
+
event: z.union([
|
|
36
|
+
z.literal(LiveAgentHandoffEventType.CHAT_STARTED),
|
|
37
|
+
z.literal(LiveAgentHandoffEventType.PARTICIPANT_JOINED),
|
|
38
|
+
z.literal(LiveAgentHandoffEventType.MESSAGE_RECEIVED),
|
|
39
|
+
z.literal(LiveAgentHandoffEventType.EVENT),
|
|
40
|
+
]),
|
|
41
|
+
});
|
|
12
42
|
export const LiveAgentHandoffTraceDTO = BaseTraceDTO.extend({
|
|
13
43
|
type: z.literal(TraceType.LIVE_AGENT_HANDOFF),
|
|
14
|
-
payload: z.
|
|
15
|
-
event: z.nativeEnum(LiveAgentHandoffEventType),
|
|
16
|
-
conversationID: z.string().min(1),
|
|
17
|
-
message: z.string(),
|
|
18
|
-
translationKey: z.string().optional(),
|
|
19
|
-
translationParams: z.record(z.string()).optional(),
|
|
20
|
-
agent: z
|
|
21
|
-
.object({
|
|
22
|
-
name: z.string().min(1),
|
|
23
|
-
imageUrl: z.string().url().optional(),
|
|
24
|
-
})
|
|
25
|
-
.optional(),
|
|
26
|
-
}),
|
|
44
|
+
payload: z.union([ChatEndedPayload, OtherLiveAgentHandoffPayload]),
|
|
27
45
|
});
|
|
28
46
|
//# sourceMappingURL=live-agent-handoff.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-agent-handoff.dto.js","sourceRoot":"","sources":["../../../src/trace/live-agent-handoff.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,YAAY,EAAE,cAAc;IAC5B,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,oBAAoB;IACxC,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;IAChC,KAAK,EAAE,OAAO;CACN,CAAC;
|
|
1
|
+
{"version":3,"file":"live-agent-handoff.dto.js","sourceRoot":"","sources":["../../../src/trace/live-agent-handoff.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,YAAY,EAAE,cAAc;IAC5B,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,oBAAoB;IACxC,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;IAChC,KAAK,EAAE,OAAO;CACN,CAAC;AAEX,mDAAmD;AACnD,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CA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,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,kBAAkB,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,gBAAgB,EAAE,4BAA4B,CAAC,CAAC;CACnE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/dtos-interact",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.48.0",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"types": "./build/cjs/main.d.ts",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "f35d5bb9232722738562126c318cf6a78d9799b6"
|
|
47
47
|
}
|