@botpress/runtime 1.3.4 → 1.3.6
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/dist/definition.js +123 -52
- package/dist/definition.js.map +3 -3
- package/dist/internal.js +119 -48
- package/dist/internal.js.map +3 -3
- package/dist/library.js +105 -34
- package/dist/library.js.map +2 -2
- package/dist/runtime/autonomous.d.ts.map +1 -1
- package/dist/runtime/chat/chat.d.ts +161 -3
- package/dist/runtime/chat/chat.d.ts.map +1 -1
- package/dist/runtime/chat/components.d.ts +487 -0
- package/dist/runtime/chat/components.d.ts.map +1 -0
- package/dist/runtime/handlers/conversation.d.ts.map +1 -1
- package/dist/runtime.js +164 -100
- package/dist/runtime.js.map +3 -3
- package/dist/telemetry/spans/index.d.ts +6 -0
- package/dist/telemetry/spans/index.d.ts.map +1 -1
- package/dist/ui.js +6 -0
- package/dist/ui.js.map +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autonomous.d.ts","sourceRoot":"","sources":["../../src/runtime/autonomous.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EAEL,KAAK,IAAI,IAAI,QAAQ,EACrB,KAAK,aAAa,EAClB,KAAK,OAAO,IAAI,WAAW,EAC5B,MAAM,MAAM,CAAC;AACd,OAAO,EACL,SAAS,IAAI,aAAa,EAC1B,IAAI,IAAI,QAAQ,EAChB,MAAM,IAAI,OAAO,EACjB,WAAW,IAAI,YAAY,EAC3B,cAAc,IAAI,eAAe,EACjC,QAAQ,IAAI,SAAS,EACrB,gBAAgB,IAAI,iBAAiB,EAItC,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,KAAK,UAAU,IAAI,cAAc,EAAE,MAAM,MAAM,CAAC;AAC3E,OAAO,EAAE,cAAc,IAAI,UAAU,EAAE,MA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C,MAAM,EAAE,WAAW,CAAC,CAAC;QACjD,KAAK,CAAC,EAAE,aAAa,CAAC,KAAK,GAAG,KAAK,EAAE,EAAE,WAAW,CAAC,CAAC;QACpD,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;QAC5B,4DAA4D;QAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IAEF,KAAY,SAAS,GAAG,CACtB,KAAK,EAAE,UAAU,CAAC,KAAK,KACpB,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAEvC,KAAY,cAAc,GAAG;QAC3B,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC;QACxB,YAAY,CAAC,EAAE,WAAW,CAAC;QAC3B,YAAY,EAAE,KAAK,GAAG,KAAK,EAAE,CAAC;KAC/B,CAAC;CAmhBH"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Chat,
|
|
1
|
+
import { Chat, RenderedComponent } from "llmz";
|
|
2
2
|
import { TranscriptItem } from "./transcript";
|
|
3
3
|
import { AnyIncomingEvent, AnyIncomingMessage } from "@botpress/sdk/dist/bot";
|
|
4
4
|
import { BotContext } from "../context/context";
|
|
@@ -10,13 +10,171 @@ type Msg = {
|
|
|
10
10
|
export declare class BotpressChat extends Chat {
|
|
11
11
|
private _transcript;
|
|
12
12
|
private client;
|
|
13
|
-
private cognitive;
|
|
14
13
|
private conversation;
|
|
15
14
|
private botId;
|
|
16
15
|
private logger;
|
|
17
16
|
private citations;
|
|
18
17
|
constructor(context: BotContext);
|
|
19
|
-
getComponents(): Promise<
|
|
18
|
+
getComponents(): Promise<(import("llmz").Component<{
|
|
19
|
+
type: "default";
|
|
20
|
+
name: string;
|
|
21
|
+
aliases: string[];
|
|
22
|
+
description: string;
|
|
23
|
+
examples: {
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
code: string;
|
|
27
|
+
}[];
|
|
28
|
+
default: {
|
|
29
|
+
props: import("@bpinternal/zui").ZodObject<{}, "strip", {}, {}>;
|
|
30
|
+
children: never[];
|
|
31
|
+
};
|
|
32
|
+
}> | import("llmz").Component<{
|
|
33
|
+
type: "leaf";
|
|
34
|
+
name: string;
|
|
35
|
+
description: string;
|
|
36
|
+
aliases: never[];
|
|
37
|
+
examples: {
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
code: string;
|
|
41
|
+
}[];
|
|
42
|
+
leaf: {
|
|
43
|
+
props: import("@bpinternal/zui").ZodObject<{
|
|
44
|
+
url: import("@bpinternal/zui").ZodString;
|
|
45
|
+
alt: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
46
|
+
}, "strip", {
|
|
47
|
+
url: string;
|
|
48
|
+
alt?: string | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
url: string;
|
|
51
|
+
alt?: string | undefined;
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
54
|
+
}> | import("llmz").Component<{
|
|
55
|
+
type: "leaf";
|
|
56
|
+
name: string;
|
|
57
|
+
description: string;
|
|
58
|
+
aliases: never[];
|
|
59
|
+
examples: {
|
|
60
|
+
name: string;
|
|
61
|
+
description: string;
|
|
62
|
+
code: string;
|
|
63
|
+
}[];
|
|
64
|
+
leaf: {
|
|
65
|
+
props: import("@bpinternal/zui").ZodObject<{
|
|
66
|
+
url: import("@bpinternal/zui").ZodString;
|
|
67
|
+
name: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
68
|
+
}, "strip", {
|
|
69
|
+
url: string;
|
|
70
|
+
name?: string | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
url: string;
|
|
73
|
+
name?: string | undefined;
|
|
74
|
+
}>;
|
|
75
|
+
};
|
|
76
|
+
}> | import("llmz").Component<{
|
|
77
|
+
type: "leaf";
|
|
78
|
+
name: string;
|
|
79
|
+
description: string;
|
|
80
|
+
aliases: never[];
|
|
81
|
+
examples: {
|
|
82
|
+
name: string;
|
|
83
|
+
description: string;
|
|
84
|
+
code: string;
|
|
85
|
+
}[];
|
|
86
|
+
leaf: {
|
|
87
|
+
props: import("@bpinternal/zui").ZodObject<{
|
|
88
|
+
url: import("@bpinternal/zui").ZodString;
|
|
89
|
+
title: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
90
|
+
}, "strip", {
|
|
91
|
+
url: string;
|
|
92
|
+
title?: string | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
url: string;
|
|
95
|
+
title?: string | undefined;
|
|
96
|
+
}>;
|
|
97
|
+
};
|
|
98
|
+
}> | import("llmz").Component<{
|
|
99
|
+
type: "container";
|
|
100
|
+
name: string;
|
|
101
|
+
description: string;
|
|
102
|
+
aliases: never[];
|
|
103
|
+
examples: {
|
|
104
|
+
name: string;
|
|
105
|
+
description: string;
|
|
106
|
+
code: string;
|
|
107
|
+
}[];
|
|
108
|
+
container: {
|
|
109
|
+
props: import("@bpinternal/zui").ZodObject<{
|
|
110
|
+
title: import("@bpinternal/zui").ZodString;
|
|
111
|
+
subtitle: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
112
|
+
}, "strip", {
|
|
113
|
+
title: string;
|
|
114
|
+
subtitle?: string | undefined;
|
|
115
|
+
}, {
|
|
116
|
+
title: string;
|
|
117
|
+
subtitle?: string | undefined;
|
|
118
|
+
}>;
|
|
119
|
+
children: ({
|
|
120
|
+
description: string;
|
|
121
|
+
component: {
|
|
122
|
+
type: "leaf";
|
|
123
|
+
name: string;
|
|
124
|
+
description: string;
|
|
125
|
+
aliases: never[];
|
|
126
|
+
examples: {
|
|
127
|
+
name: string;
|
|
128
|
+
description: string;
|
|
129
|
+
code: string;
|
|
130
|
+
}[];
|
|
131
|
+
leaf: {
|
|
132
|
+
props: import("@bpinternal/zui").ZodObject<{
|
|
133
|
+
url: import("@bpinternal/zui").ZodString;
|
|
134
|
+
alt: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
135
|
+
}, "strip", {
|
|
136
|
+
url: string;
|
|
137
|
+
alt?: string | undefined;
|
|
138
|
+
}, {
|
|
139
|
+
url: string;
|
|
140
|
+
alt?: string | undefined;
|
|
141
|
+
}>;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
} | {
|
|
145
|
+
description: string;
|
|
146
|
+
component: {
|
|
147
|
+
type: "leaf";
|
|
148
|
+
description: string;
|
|
149
|
+
name: string;
|
|
150
|
+
aliases: string[];
|
|
151
|
+
examples: {
|
|
152
|
+
name: string;
|
|
153
|
+
description: string;
|
|
154
|
+
code: string;
|
|
155
|
+
}[];
|
|
156
|
+
leaf: {
|
|
157
|
+
props: import("@bpinternal/zui").ZodObject<{
|
|
158
|
+
action: import("@bpinternal/zui").ZodDefault<import("@bpinternal/zui").ZodEnum<["say", "url", "postback"]>>;
|
|
159
|
+
label: import("@bpinternal/zui").ZodString;
|
|
160
|
+
value: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
161
|
+
url: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
162
|
+
}, "strip", {
|
|
163
|
+
label: string;
|
|
164
|
+
action: "say" | "url" | "postback";
|
|
165
|
+
value?: string | undefined;
|
|
166
|
+
url?: string | undefined;
|
|
167
|
+
}, {
|
|
168
|
+
label: string;
|
|
169
|
+
value?: string | undefined;
|
|
170
|
+
action?: "say" | "url" | "postback" | undefined;
|
|
171
|
+
url?: string | undefined;
|
|
172
|
+
}>;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
})[];
|
|
176
|
+
};
|
|
177
|
+
}>)[]>;
|
|
20
178
|
clearTranscript(): Promise<void>;
|
|
21
179
|
prependToTranscript(items: TranscriptItem[]): Promise<void>;
|
|
22
180
|
fetchTranscript(): Promise<TranscriptItem[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/runtime/chat/chat.ts"],"names":[],"mappings":"
|
|
1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B;IAuDjB,cAAc;IAkCd,WAAW,CAAC,OAAO,EAAE,GAAG;IAwCxB,MAAM,CAAC,OAAO,EAAE,iBAAiB;IA0DvC;;;;OAIG;IACG,6BAA6B,CACjC,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,GAC/B,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;IA+B7B,QAAQ,CACZ,KAAK,EACD,gBAAgB,CAAC,GAAG,CAAC,GACrB;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,GAAG,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IAiB7D,UAAU,CAAC,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC;CAuClD"}
|
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import { Message } from "@botpress/client";
|
|
2
|
+
import { z } from "@botpress/sdk";
|
|
3
|
+
export declare const DefaultMessageTypes: {
|
|
4
|
+
text: import("@bpinternal/zui").ZodObject<{
|
|
5
|
+
text: import("@bpinternal/zui").ZodString;
|
|
6
|
+
}, "strip", {
|
|
7
|
+
text: string;
|
|
8
|
+
}, {
|
|
9
|
+
text: string;
|
|
10
|
+
}>;
|
|
11
|
+
audio: import("@bpinternal/zui").ZodObject<{
|
|
12
|
+
audioUrl: import("@bpinternal/zui").ZodString;
|
|
13
|
+
}, "strip", {
|
|
14
|
+
audioUrl: string;
|
|
15
|
+
}, {
|
|
16
|
+
audioUrl: string;
|
|
17
|
+
}>;
|
|
18
|
+
card: import("@bpinternal/zui").ZodObject<{
|
|
19
|
+
title: import("@bpinternal/zui").ZodString;
|
|
20
|
+
subtitle: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
21
|
+
imageUrl: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
22
|
+
actions: import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
|
|
23
|
+
action: import("@bpinternal/zui").ZodEnum<["postback", "url", "say"]>;
|
|
24
|
+
label: import("@bpinternal/zui").ZodString;
|
|
25
|
+
value: import("@bpinternal/zui").ZodString;
|
|
26
|
+
}, "strip", {
|
|
27
|
+
value: string;
|
|
28
|
+
action: "url" | "postback" | "say";
|
|
29
|
+
label: string;
|
|
30
|
+
}, {
|
|
31
|
+
value: string;
|
|
32
|
+
action: "url" | "postback" | "say";
|
|
33
|
+
label: string;
|
|
34
|
+
}>, "many">;
|
|
35
|
+
}, "strip", {
|
|
36
|
+
actions: {
|
|
37
|
+
value: string;
|
|
38
|
+
action: "url" | "postback" | "say";
|
|
39
|
+
label: string;
|
|
40
|
+
}[];
|
|
41
|
+
title: string;
|
|
42
|
+
subtitle?: string | undefined;
|
|
43
|
+
imageUrl?: string | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
actions: {
|
|
46
|
+
value: string;
|
|
47
|
+
action: "url" | "postback" | "say";
|
|
48
|
+
label: string;
|
|
49
|
+
}[];
|
|
50
|
+
title: string;
|
|
51
|
+
subtitle?: string | undefined;
|
|
52
|
+
imageUrl?: string | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
image: import("@bpinternal/zui").ZodObject<{
|
|
55
|
+
imageUrl: import("@bpinternal/zui").ZodString;
|
|
56
|
+
}, "strip", {
|
|
57
|
+
imageUrl: string;
|
|
58
|
+
}, {
|
|
59
|
+
imageUrl: string;
|
|
60
|
+
}>;
|
|
61
|
+
carousel: import("@bpinternal/zui").ZodObject<{
|
|
62
|
+
items: import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
|
|
63
|
+
title: import("@bpinternal/zui").ZodString;
|
|
64
|
+
subtitle: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
65
|
+
imageUrl: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
66
|
+
actions: import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
|
|
67
|
+
action: import("@bpinternal/zui").ZodEnum<["postback", "url", "say"]>;
|
|
68
|
+
label: import("@bpinternal/zui").ZodString;
|
|
69
|
+
value: import("@bpinternal/zui").ZodString;
|
|
70
|
+
}, "strip", {
|
|
71
|
+
value: string;
|
|
72
|
+
action: "url" | "postback" | "say";
|
|
73
|
+
label: string;
|
|
74
|
+
}, {
|
|
75
|
+
value: string;
|
|
76
|
+
action: "url" | "postback" | "say";
|
|
77
|
+
label: string;
|
|
78
|
+
}>, "many">;
|
|
79
|
+
}, "strip", {
|
|
80
|
+
actions: {
|
|
81
|
+
value: string;
|
|
82
|
+
action: "url" | "postback" | "say";
|
|
83
|
+
label: string;
|
|
84
|
+
}[];
|
|
85
|
+
title: string;
|
|
86
|
+
subtitle?: string | undefined;
|
|
87
|
+
imageUrl?: string | undefined;
|
|
88
|
+
}, {
|
|
89
|
+
actions: {
|
|
90
|
+
value: string;
|
|
91
|
+
action: "url" | "postback" | "say";
|
|
92
|
+
label: string;
|
|
93
|
+
}[];
|
|
94
|
+
title: string;
|
|
95
|
+
subtitle?: string | undefined;
|
|
96
|
+
imageUrl?: string | undefined;
|
|
97
|
+
}>, "many">;
|
|
98
|
+
}, "strip", {
|
|
99
|
+
items: {
|
|
100
|
+
actions: {
|
|
101
|
+
value: string;
|
|
102
|
+
action: "url" | "postback" | "say";
|
|
103
|
+
label: string;
|
|
104
|
+
}[];
|
|
105
|
+
title: string;
|
|
106
|
+
subtitle?: string | undefined;
|
|
107
|
+
imageUrl?: string | undefined;
|
|
108
|
+
}[];
|
|
109
|
+
}, {
|
|
110
|
+
items: {
|
|
111
|
+
actions: {
|
|
112
|
+
value: string;
|
|
113
|
+
action: "url" | "postback" | "say";
|
|
114
|
+
label: string;
|
|
115
|
+
}[];
|
|
116
|
+
title: string;
|
|
117
|
+
subtitle?: string | undefined;
|
|
118
|
+
imageUrl?: string | undefined;
|
|
119
|
+
}[];
|
|
120
|
+
}>;
|
|
121
|
+
choice: import("@bpinternal/zui").ZodObject<{
|
|
122
|
+
text: import("@bpinternal/zui").ZodString;
|
|
123
|
+
options: import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
|
|
124
|
+
label: import("@bpinternal/zui").ZodString;
|
|
125
|
+
value: import("@bpinternal/zui").ZodString;
|
|
126
|
+
}, "strip", {
|
|
127
|
+
value: string;
|
|
128
|
+
label: string;
|
|
129
|
+
}, {
|
|
130
|
+
value: string;
|
|
131
|
+
label: string;
|
|
132
|
+
}>, "many">;
|
|
133
|
+
}, "strip", {
|
|
134
|
+
options: {
|
|
135
|
+
value: string;
|
|
136
|
+
label: string;
|
|
137
|
+
}[];
|
|
138
|
+
text: string;
|
|
139
|
+
}, {
|
|
140
|
+
options: {
|
|
141
|
+
value: string;
|
|
142
|
+
label: string;
|
|
143
|
+
}[];
|
|
144
|
+
text: string;
|
|
145
|
+
}>;
|
|
146
|
+
dropdown: import("@bpinternal/zui").ZodObject<{
|
|
147
|
+
text: import("@bpinternal/zui").ZodString;
|
|
148
|
+
options: import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
|
|
149
|
+
label: import("@bpinternal/zui").ZodString;
|
|
150
|
+
value: import("@bpinternal/zui").ZodString;
|
|
151
|
+
}, "strip", {
|
|
152
|
+
value: string;
|
|
153
|
+
label: string;
|
|
154
|
+
}, {
|
|
155
|
+
value: string;
|
|
156
|
+
label: string;
|
|
157
|
+
}>, "many">;
|
|
158
|
+
}, "strip", {
|
|
159
|
+
options: {
|
|
160
|
+
value: string;
|
|
161
|
+
label: string;
|
|
162
|
+
}[];
|
|
163
|
+
text: string;
|
|
164
|
+
}, {
|
|
165
|
+
options: {
|
|
166
|
+
value: string;
|
|
167
|
+
label: string;
|
|
168
|
+
}[];
|
|
169
|
+
text: string;
|
|
170
|
+
}>;
|
|
171
|
+
file: import("@bpinternal/zui").ZodObject<{
|
|
172
|
+
fileUrl: import("@bpinternal/zui").ZodString;
|
|
173
|
+
title: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
174
|
+
}, "strip", {
|
|
175
|
+
fileUrl: string;
|
|
176
|
+
title?: string | undefined;
|
|
177
|
+
}, {
|
|
178
|
+
fileUrl: string;
|
|
179
|
+
title?: string | undefined;
|
|
180
|
+
}>;
|
|
181
|
+
location: import("@bpinternal/zui").ZodObject<{
|
|
182
|
+
latitude: import("@bpinternal/zui").ZodNumber;
|
|
183
|
+
longitude: import("@bpinternal/zui").ZodNumber;
|
|
184
|
+
address: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
185
|
+
title: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
186
|
+
}, "strip", {
|
|
187
|
+
latitude: number;
|
|
188
|
+
longitude: number;
|
|
189
|
+
title?: string | undefined;
|
|
190
|
+
address?: string | undefined;
|
|
191
|
+
}, {
|
|
192
|
+
latitude: number;
|
|
193
|
+
longitude: number;
|
|
194
|
+
title?: string | undefined;
|
|
195
|
+
address?: string | undefined;
|
|
196
|
+
}>;
|
|
197
|
+
video: import("@bpinternal/zui").ZodObject<{
|
|
198
|
+
videoUrl: import("@bpinternal/zui").ZodString;
|
|
199
|
+
}, "strip", {
|
|
200
|
+
videoUrl: string;
|
|
201
|
+
}, {
|
|
202
|
+
videoUrl: string;
|
|
203
|
+
}>;
|
|
204
|
+
bloc: import("@bpinternal/zui").ZodObject<{
|
|
205
|
+
items: import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodUnion<[import("@bpinternal/zui").ZodObject<{
|
|
206
|
+
type: import("@bpinternal/zui").ZodLiteral<"text">;
|
|
207
|
+
payload: import("@bpinternal/zui").ZodObject<{
|
|
208
|
+
text: import("@bpinternal/zui").ZodString;
|
|
209
|
+
}, "strip", {
|
|
210
|
+
text: string;
|
|
211
|
+
}, {
|
|
212
|
+
text: string;
|
|
213
|
+
}>;
|
|
214
|
+
}, "strip", {
|
|
215
|
+
type: "text";
|
|
216
|
+
payload: {
|
|
217
|
+
text: string;
|
|
218
|
+
};
|
|
219
|
+
}, {
|
|
220
|
+
type: "text";
|
|
221
|
+
payload: {
|
|
222
|
+
text: string;
|
|
223
|
+
};
|
|
224
|
+
}>, import("@bpinternal/zui").ZodObject<{
|
|
225
|
+
type: import("@bpinternal/zui").ZodLiteral<"markdown">;
|
|
226
|
+
payload: import("@bpinternal/zui").ZodObject<{
|
|
227
|
+
markdown: import("@bpinternal/zui").ZodString;
|
|
228
|
+
}, "strip", {
|
|
229
|
+
markdown: string;
|
|
230
|
+
}, {
|
|
231
|
+
markdown: string;
|
|
232
|
+
}>;
|
|
233
|
+
}, "strip", {
|
|
234
|
+
type: "markdown";
|
|
235
|
+
payload: {
|
|
236
|
+
markdown: string;
|
|
237
|
+
};
|
|
238
|
+
}, {
|
|
239
|
+
type: "markdown";
|
|
240
|
+
payload: {
|
|
241
|
+
markdown: string;
|
|
242
|
+
};
|
|
243
|
+
}>, import("@bpinternal/zui").ZodObject<{
|
|
244
|
+
type: import("@bpinternal/zui").ZodLiteral<"image">;
|
|
245
|
+
payload: import("@bpinternal/zui").ZodObject<{
|
|
246
|
+
imageUrl: import("@bpinternal/zui").ZodString;
|
|
247
|
+
}, "strip", {
|
|
248
|
+
imageUrl: string;
|
|
249
|
+
}, {
|
|
250
|
+
imageUrl: string;
|
|
251
|
+
}>;
|
|
252
|
+
}, "strip", {
|
|
253
|
+
type: "image";
|
|
254
|
+
payload: {
|
|
255
|
+
imageUrl: string;
|
|
256
|
+
};
|
|
257
|
+
}, {
|
|
258
|
+
type: "image";
|
|
259
|
+
payload: {
|
|
260
|
+
imageUrl: string;
|
|
261
|
+
};
|
|
262
|
+
}>, import("@bpinternal/zui").ZodObject<{
|
|
263
|
+
type: import("@bpinternal/zui").ZodLiteral<"audio">;
|
|
264
|
+
payload: import("@bpinternal/zui").ZodObject<{
|
|
265
|
+
audioUrl: import("@bpinternal/zui").ZodString;
|
|
266
|
+
}, "strip", {
|
|
267
|
+
audioUrl: string;
|
|
268
|
+
}, {
|
|
269
|
+
audioUrl: string;
|
|
270
|
+
}>;
|
|
271
|
+
}, "strip", {
|
|
272
|
+
type: "audio";
|
|
273
|
+
payload: {
|
|
274
|
+
audioUrl: string;
|
|
275
|
+
};
|
|
276
|
+
}, {
|
|
277
|
+
type: "audio";
|
|
278
|
+
payload: {
|
|
279
|
+
audioUrl: string;
|
|
280
|
+
};
|
|
281
|
+
}>, import("@bpinternal/zui").ZodObject<{
|
|
282
|
+
type: import("@bpinternal/zui").ZodLiteral<"video">;
|
|
283
|
+
payload: import("@bpinternal/zui").ZodObject<{
|
|
284
|
+
videoUrl: import("@bpinternal/zui").ZodString;
|
|
285
|
+
}, "strip", {
|
|
286
|
+
videoUrl: string;
|
|
287
|
+
}, {
|
|
288
|
+
videoUrl: string;
|
|
289
|
+
}>;
|
|
290
|
+
}, "strip", {
|
|
291
|
+
type: "video";
|
|
292
|
+
payload: {
|
|
293
|
+
videoUrl: string;
|
|
294
|
+
};
|
|
295
|
+
}, {
|
|
296
|
+
type: "video";
|
|
297
|
+
payload: {
|
|
298
|
+
videoUrl: string;
|
|
299
|
+
};
|
|
300
|
+
}>, import("@bpinternal/zui").ZodObject<{
|
|
301
|
+
type: import("@bpinternal/zui").ZodLiteral<"file">;
|
|
302
|
+
payload: import("@bpinternal/zui").ZodObject<{
|
|
303
|
+
fileUrl: import("@bpinternal/zui").ZodString;
|
|
304
|
+
title: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
305
|
+
}, "strip", {
|
|
306
|
+
fileUrl: string;
|
|
307
|
+
title?: string | undefined;
|
|
308
|
+
}, {
|
|
309
|
+
fileUrl: string;
|
|
310
|
+
title?: string | undefined;
|
|
311
|
+
}>;
|
|
312
|
+
}, "strip", {
|
|
313
|
+
type: "file";
|
|
314
|
+
payload: {
|
|
315
|
+
fileUrl: string;
|
|
316
|
+
title?: string | undefined;
|
|
317
|
+
};
|
|
318
|
+
}, {
|
|
319
|
+
type: "file";
|
|
320
|
+
payload: {
|
|
321
|
+
fileUrl: string;
|
|
322
|
+
title?: string | undefined;
|
|
323
|
+
};
|
|
324
|
+
}>, import("@bpinternal/zui").ZodObject<{
|
|
325
|
+
type: import("@bpinternal/zui").ZodLiteral<"location">;
|
|
326
|
+
payload: import("@bpinternal/zui").ZodObject<{
|
|
327
|
+
latitude: import("@bpinternal/zui").ZodNumber;
|
|
328
|
+
longitude: import("@bpinternal/zui").ZodNumber;
|
|
329
|
+
address: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
330
|
+
title: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
331
|
+
}, "strip", {
|
|
332
|
+
latitude: number;
|
|
333
|
+
longitude: number;
|
|
334
|
+
title?: string | undefined;
|
|
335
|
+
address?: string | undefined;
|
|
336
|
+
}, {
|
|
337
|
+
latitude: number;
|
|
338
|
+
longitude: number;
|
|
339
|
+
title?: string | undefined;
|
|
340
|
+
address?: string | undefined;
|
|
341
|
+
}>;
|
|
342
|
+
}, "strip", {
|
|
343
|
+
type: "location";
|
|
344
|
+
payload: {
|
|
345
|
+
latitude: number;
|
|
346
|
+
longitude: number;
|
|
347
|
+
title?: string | undefined;
|
|
348
|
+
address?: string | undefined;
|
|
349
|
+
};
|
|
350
|
+
}, {
|
|
351
|
+
type: "location";
|
|
352
|
+
payload: {
|
|
353
|
+
latitude: number;
|
|
354
|
+
longitude: number;
|
|
355
|
+
title?: string | undefined;
|
|
356
|
+
address?: string | undefined;
|
|
357
|
+
};
|
|
358
|
+
}>]>, "many">;
|
|
359
|
+
}, "strip", {
|
|
360
|
+
items: ({
|
|
361
|
+
type: "text";
|
|
362
|
+
payload: {
|
|
363
|
+
text: string;
|
|
364
|
+
};
|
|
365
|
+
} | {
|
|
366
|
+
type: "markdown";
|
|
367
|
+
payload: {
|
|
368
|
+
markdown: string;
|
|
369
|
+
};
|
|
370
|
+
} | {
|
|
371
|
+
type: "image";
|
|
372
|
+
payload: {
|
|
373
|
+
imageUrl: string;
|
|
374
|
+
};
|
|
375
|
+
} | {
|
|
376
|
+
type: "audio";
|
|
377
|
+
payload: {
|
|
378
|
+
audioUrl: string;
|
|
379
|
+
};
|
|
380
|
+
} | {
|
|
381
|
+
type: "video";
|
|
382
|
+
payload: {
|
|
383
|
+
videoUrl: string;
|
|
384
|
+
};
|
|
385
|
+
} | {
|
|
386
|
+
type: "file";
|
|
387
|
+
payload: {
|
|
388
|
+
fileUrl: string;
|
|
389
|
+
title?: string | undefined;
|
|
390
|
+
};
|
|
391
|
+
} | {
|
|
392
|
+
type: "location";
|
|
393
|
+
payload: {
|
|
394
|
+
latitude: number;
|
|
395
|
+
longitude: number;
|
|
396
|
+
title?: string | undefined;
|
|
397
|
+
address?: string | undefined;
|
|
398
|
+
};
|
|
399
|
+
})[];
|
|
400
|
+
}, {
|
|
401
|
+
items: ({
|
|
402
|
+
type: "text";
|
|
403
|
+
payload: {
|
|
404
|
+
text: string;
|
|
405
|
+
};
|
|
406
|
+
} | {
|
|
407
|
+
type: "markdown";
|
|
408
|
+
payload: {
|
|
409
|
+
markdown: string;
|
|
410
|
+
};
|
|
411
|
+
} | {
|
|
412
|
+
type: "image";
|
|
413
|
+
payload: {
|
|
414
|
+
imageUrl: string;
|
|
415
|
+
};
|
|
416
|
+
} | {
|
|
417
|
+
type: "audio";
|
|
418
|
+
payload: {
|
|
419
|
+
audioUrl: string;
|
|
420
|
+
};
|
|
421
|
+
} | {
|
|
422
|
+
type: "video";
|
|
423
|
+
payload: {
|
|
424
|
+
videoUrl: string;
|
|
425
|
+
};
|
|
426
|
+
} | {
|
|
427
|
+
type: "file";
|
|
428
|
+
payload: {
|
|
429
|
+
fileUrl: string;
|
|
430
|
+
title?: string | undefined;
|
|
431
|
+
};
|
|
432
|
+
} | {
|
|
433
|
+
type: "location";
|
|
434
|
+
payload: {
|
|
435
|
+
latitude: number;
|
|
436
|
+
longitude: number;
|
|
437
|
+
title?: string | undefined;
|
|
438
|
+
address?: string | undefined;
|
|
439
|
+
};
|
|
440
|
+
})[];
|
|
441
|
+
}>;
|
|
442
|
+
};
|
|
443
|
+
type SpecificMessage<T> = Omit<Message, "type" | "payload"> & T;
|
|
444
|
+
type DefaultMessages<T extends keyof typeof DefaultMessageTypes> = SpecificMessage<{
|
|
445
|
+
type: T;
|
|
446
|
+
payload: z.infer<(typeof DefaultMessageTypes)[T]>;
|
|
447
|
+
}>;
|
|
448
|
+
export declare namespace Messages {
|
|
449
|
+
namespace User {
|
|
450
|
+
type Any = Text | Image | Audio | Video | File | Location | Blocs;
|
|
451
|
+
type Text = DefaultMessages<"text">;
|
|
452
|
+
type Image = DefaultMessages<"image">;
|
|
453
|
+
type Audio = DefaultMessages<"audio">;
|
|
454
|
+
type Video = DefaultMessages<"video">;
|
|
455
|
+
type File = DefaultMessages<"file">;
|
|
456
|
+
type Location = DefaultMessages<"location">;
|
|
457
|
+
type Blocs = SpecificMessage<{
|
|
458
|
+
type: "blocs";
|
|
459
|
+
payload: {
|
|
460
|
+
blocs: Bloc[];
|
|
461
|
+
};
|
|
462
|
+
}>;
|
|
463
|
+
type Bloc = Text | Image | Audio | Video | File | Location;
|
|
464
|
+
}
|
|
465
|
+
namespace Bot {
|
|
466
|
+
type Any = Text | Image | Audio | Video | File | Location | Blocs;
|
|
467
|
+
type Text = DefaultMessages<"text">;
|
|
468
|
+
type Image = DefaultMessages<"image">;
|
|
469
|
+
type Audio = DefaultMessages<"audio">;
|
|
470
|
+
type Video = DefaultMessages<"video">;
|
|
471
|
+
type File = DefaultMessages<"file">;
|
|
472
|
+
type Location = DefaultMessages<"location">;
|
|
473
|
+
type Bloc = Text | Image | Audio | Video | File | Location;
|
|
474
|
+
type Blocs = SpecificMessage<{
|
|
475
|
+
type: "blocs";
|
|
476
|
+
payload: {
|
|
477
|
+
blocs: Bloc[];
|
|
478
|
+
};
|
|
479
|
+
}>;
|
|
480
|
+
type Card = DefaultMessages<"card">;
|
|
481
|
+
type Carousel = DefaultMessages<"carousel">;
|
|
482
|
+
type Choice = DefaultMessages<"choice">;
|
|
483
|
+
type Dropdown = DefaultMessages<"dropdown">;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
export {};
|
|
487
|
+
//# sourceMappingURL=components.d.ts.map
|