@inploi/plugin-chatbot 7.0.1 → 7.0.3
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/cdn/index.js +3 -3
- package/cdn/style.css +1 -1
- package/dist/chatbot-body-23ad6c41.cjs +1 -0
- package/dist/chatbot-body-b0e15a28.js +4036 -0
- package/dist/chatbot.api.d.ts +120 -153
- package/dist/chatbot.utils.d.ts +40 -51
- package/dist/components/chat-input/chat-input.phone-number.d.ts +1 -0
- package/dist/components/chat-input/chat-input.text.d.ts +1 -1
- package/dist/i18n.d.ts +6 -0
- package/dist/index-5220abff.cjs +5 -0
- package/dist/{index-df69f83a.js → index-94ac185f.js} +937 -880
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/dist/rpc.d.ts +80 -102
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/chatbot-body-1964a1ed.js +0 -3979
- package/dist/chatbot-body-6eb29db1.cjs +0 -1
- package/dist/index-0b742038.cjs +0 -5
package/dist/chatbot.utils.d.ts
CHANGED
|
@@ -4,61 +4,63 @@ import { FlowStateData, FlowSubmission, KeyToSubmissionMap } from './chatbot.sta
|
|
|
4
4
|
export type DistributivePick<T, K extends keyof T> = T extends unknown ? Pick<T, K> : never;
|
|
5
5
|
export declare const kbToReadableSize: (kb: number) => string;
|
|
6
6
|
export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
7
|
+
type: "text";
|
|
8
|
+
id: string;
|
|
7
9
|
data: {
|
|
8
10
|
text: string;
|
|
9
11
|
};
|
|
10
|
-
type: "text";
|
|
11
|
-
id: string;
|
|
12
12
|
isHead?: boolean | undefined;
|
|
13
13
|
nextId?: string | undefined;
|
|
14
14
|
} | {
|
|
15
|
+
type: "end-flow";
|
|
16
|
+
id: string;
|
|
15
17
|
data: {
|
|
16
18
|
systemMessage: string;
|
|
17
19
|
};
|
|
18
|
-
type: "end-flow";
|
|
19
|
-
id: string;
|
|
20
20
|
isHead?: boolean | undefined;
|
|
21
21
|
nextId?: string | undefined;
|
|
22
22
|
} | {
|
|
23
|
+
type: "integration-application-submit";
|
|
24
|
+
id: string;
|
|
23
25
|
data: {
|
|
24
26
|
integrationId: string;
|
|
25
27
|
skipConfirmation: boolean;
|
|
26
28
|
submitLabel: string;
|
|
27
|
-
submitKeys:
|
|
29
|
+
submitKeys: "all" | string[];
|
|
28
30
|
key?: string | undefined;
|
|
29
31
|
};
|
|
30
|
-
type: "integration-application-submit";
|
|
31
|
-
id: string;
|
|
32
32
|
isHead?: boolean | undefined;
|
|
33
33
|
nextId?: string | undefined;
|
|
34
34
|
} | {
|
|
35
|
+
type: "integration-workflow-get";
|
|
36
|
+
id: string;
|
|
35
37
|
data: {
|
|
36
38
|
integrationId: string;
|
|
37
39
|
};
|
|
38
|
-
type: "integration-workflow-get";
|
|
39
|
-
id: string;
|
|
40
40
|
isHead?: boolean | undefined;
|
|
41
41
|
nextId?: string | undefined;
|
|
42
42
|
} | {
|
|
43
|
+
type: "link";
|
|
44
|
+
id: string;
|
|
43
45
|
data: {
|
|
44
46
|
href: string;
|
|
45
47
|
cta: string;
|
|
46
48
|
};
|
|
47
|
-
type: "link";
|
|
48
|
-
id: string;
|
|
49
49
|
isHead?: boolean | undefined;
|
|
50
50
|
nextId?: string | undefined;
|
|
51
51
|
} | {
|
|
52
|
+
type: "image";
|
|
53
|
+
id: string;
|
|
52
54
|
data: {
|
|
53
55
|
url: string;
|
|
54
56
|
width: number;
|
|
55
57
|
height: number;
|
|
56
58
|
};
|
|
57
|
-
type: "image";
|
|
58
|
-
id: string;
|
|
59
59
|
isHead?: boolean | undefined;
|
|
60
60
|
nextId?: string | undefined;
|
|
61
61
|
} | {
|
|
62
|
+
type: "question-boolean";
|
|
63
|
+
id: string;
|
|
62
64
|
data: {
|
|
63
65
|
key: string;
|
|
64
66
|
question: string;
|
|
@@ -66,25 +68,25 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
66
68
|
falseLabel: string;
|
|
67
69
|
optional: boolean;
|
|
68
70
|
};
|
|
69
|
-
type: "question-boolean";
|
|
70
|
-
id: string;
|
|
71
71
|
isHead?: boolean | undefined;
|
|
72
72
|
nextId?: string | undefined;
|
|
73
73
|
} | {
|
|
74
|
+
type: "question-text";
|
|
75
|
+
id: string;
|
|
74
76
|
data: {
|
|
75
77
|
key: string;
|
|
76
78
|
question: string;
|
|
77
79
|
optional: boolean;
|
|
78
|
-
format: "text" | "url" | "email" | "phone";
|
|
80
|
+
format: "date" | "text" | "url" | "email" | "phone";
|
|
79
81
|
placeholder?: string | undefined;
|
|
80
82
|
maxChars?: number | undefined;
|
|
81
83
|
minChars?: number | undefined;
|
|
82
84
|
};
|
|
83
|
-
type: "question-text";
|
|
84
|
-
id: string;
|
|
85
85
|
isHead?: boolean | undefined;
|
|
86
86
|
nextId?: string | undefined;
|
|
87
87
|
} | {
|
|
88
|
+
type: "question-number";
|
|
89
|
+
id: string;
|
|
88
90
|
data: {
|
|
89
91
|
key: string;
|
|
90
92
|
question: string;
|
|
@@ -94,11 +96,11 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
94
96
|
min?: number | undefined;
|
|
95
97
|
max?: number | undefined;
|
|
96
98
|
};
|
|
97
|
-
type: "question-number";
|
|
98
|
-
id: string;
|
|
99
99
|
isHead?: boolean | undefined;
|
|
100
100
|
nextId?: string | undefined;
|
|
101
101
|
} | {
|
|
102
|
+
type: "question-phone";
|
|
103
|
+
id: string;
|
|
102
104
|
data: {
|
|
103
105
|
key: string;
|
|
104
106
|
question: string;
|
|
@@ -107,11 +109,11 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
107
109
|
minChars: number;
|
|
108
110
|
defaultCountryCode: string;
|
|
109
111
|
};
|
|
110
|
-
type: "question-phone";
|
|
111
|
-
id: string;
|
|
112
112
|
isHead?: boolean | undefined;
|
|
113
113
|
nextId?: string | undefined;
|
|
114
114
|
} | {
|
|
115
|
+
type: "question-enum";
|
|
116
|
+
id: string;
|
|
115
117
|
data: {
|
|
116
118
|
options: {
|
|
117
119
|
value: string;
|
|
@@ -122,11 +124,11 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
122
124
|
maxSelected: number;
|
|
123
125
|
minSelected: number;
|
|
124
126
|
};
|
|
125
|
-
type: "question-enum";
|
|
126
|
-
id: string;
|
|
127
127
|
isHead?: boolean | undefined;
|
|
128
128
|
nextId?: string | undefined;
|
|
129
129
|
} | {
|
|
130
|
+
type: "question-file";
|
|
131
|
+
id: string;
|
|
130
132
|
data: {
|
|
131
133
|
key: string;
|
|
132
134
|
question: string;
|
|
@@ -135,11 +137,11 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
135
137
|
multiple?: boolean | undefined;
|
|
136
138
|
maxSizeKb?: number | undefined;
|
|
137
139
|
};
|
|
138
|
-
type: "question-file";
|
|
139
|
-
id: string;
|
|
140
140
|
isHead?: boolean | undefined;
|
|
141
141
|
nextId?: string | undefined;
|
|
142
142
|
} | {
|
|
143
|
+
type: "question-address";
|
|
144
|
+
id: string;
|
|
143
145
|
data: {
|
|
144
146
|
keys: {
|
|
145
147
|
line1: string | null;
|
|
@@ -155,23 +157,12 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
155
157
|
optional: boolean;
|
|
156
158
|
placeholder?: string | undefined;
|
|
157
159
|
};
|
|
158
|
-
type: "question-address";
|
|
159
|
-
id: string;
|
|
160
160
|
isHead?: boolean | undefined;
|
|
161
161
|
nextId?: string | undefined;
|
|
162
162
|
} | {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
167
|
-
} | {
|
|
168
|
-
combinator: "and" | "or";
|
|
169
|
-
conditions: {
|
|
170
|
-
compareKey: string;
|
|
171
|
-
compareValue: string;
|
|
172
|
-
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
173
|
-
}[];
|
|
174
|
-
}) & ({
|
|
163
|
+
type: "if-block";
|
|
164
|
+
id: string;
|
|
165
|
+
data: {
|
|
175
166
|
compareKey: string;
|
|
176
167
|
compareValue: string;
|
|
177
168
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
@@ -182,49 +173,47 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
182
173
|
compareValue: string;
|
|
183
174
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
184
175
|
}[];
|
|
185
|
-
}
|
|
186
|
-
type: "if-block";
|
|
187
|
-
id: string;
|
|
176
|
+
};
|
|
188
177
|
isHead?: boolean | undefined;
|
|
189
178
|
nextId?: string | undefined;
|
|
190
179
|
branchId?: string | undefined;
|
|
191
180
|
} | {
|
|
181
|
+
type: "jump";
|
|
182
|
+
id: string;
|
|
192
183
|
data: {
|
|
193
184
|
targetId: string;
|
|
194
185
|
};
|
|
195
|
-
type: "jump";
|
|
196
|
-
id: string;
|
|
197
186
|
isHead?: boolean | undefined;
|
|
198
187
|
nextId?: string | undefined;
|
|
199
188
|
} | {
|
|
189
|
+
type: "add-submission";
|
|
190
|
+
id: string;
|
|
200
191
|
data: {
|
|
201
192
|
value: string;
|
|
202
193
|
key: string;
|
|
203
194
|
};
|
|
204
|
-
type: "add-submission";
|
|
205
|
-
id: string;
|
|
206
195
|
isHead?: boolean | undefined;
|
|
207
196
|
nextId?: string | undefined;
|
|
208
197
|
} | {
|
|
198
|
+
type: "identify";
|
|
199
|
+
id: string;
|
|
209
200
|
data: {
|
|
210
201
|
key: string;
|
|
202
|
+
email?: string | undefined;
|
|
211
203
|
firstName?: string | undefined;
|
|
212
204
|
lastName?: string | undefined;
|
|
213
205
|
phoneNumber?: string | undefined;
|
|
214
|
-
email?: string | undefined;
|
|
215
206
|
customTraits?: {
|
|
216
207
|
value: string;
|
|
217
208
|
key: string;
|
|
218
209
|
}[] | undefined;
|
|
219
210
|
};
|
|
220
|
-
type: "identify";
|
|
221
|
-
id: string;
|
|
222
211
|
isHead?: boolean | undefined;
|
|
223
212
|
nextId?: string | undefined;
|
|
224
213
|
} | {
|
|
225
|
-
data: {};
|
|
226
214
|
type: "feedback";
|
|
227
215
|
id: string;
|
|
216
|
+
data: {};
|
|
228
217
|
isHead?: boolean | undefined;
|
|
229
218
|
nextId?: string | undefined;
|
|
230
219
|
};
|
package/dist/i18n.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare const TranslationProvider: (props: {
|
|
|
50
50
|
readonly one: "Please only upload one file";
|
|
51
51
|
readonly other: "Please only upload up to {{count}} files";
|
|
52
52
|
};
|
|
53
|
+
readonly validation_date: "Please enter a valid date (YYYY-MM-DD)";
|
|
53
54
|
readonly validation_email: "That doesn’t look like a valid email address";
|
|
54
55
|
readonly validation_url: "That doesn’t look like a valid URL";
|
|
55
56
|
readonly validation_multiple_choice_min: {
|
|
@@ -114,6 +115,7 @@ export declare const TranslationProvider: (props: {
|
|
|
114
115
|
readonly one: "Please only upload one file";
|
|
115
116
|
readonly other: "Please only upload up to {{count}} files";
|
|
116
117
|
};
|
|
118
|
+
readonly validation_date: "Please enter a valid date (YYYY-MM-DD)";
|
|
117
119
|
readonly validation_email: "That doesn’t look like a valid email address";
|
|
118
120
|
readonly validation_url: "That doesn’t look like a valid URL";
|
|
119
121
|
readonly validation_multiple_choice_min: {
|
|
@@ -175,6 +177,7 @@ export declare const TranslationProvider: (props: {
|
|
|
175
177
|
readonly one: "Please only upload one file";
|
|
176
178
|
readonly other: "Please only upload up to {{count}} files";
|
|
177
179
|
};
|
|
180
|
+
readonly validation_date: "Please enter a valid date (YYYY-MM-DD)";
|
|
178
181
|
readonly validation_email: "That doesn’t look like a valid email address";
|
|
179
182
|
readonly validation_url: "That doesn’t look like a valid URL";
|
|
180
183
|
readonly validation_multiple_choice_min: {
|
|
@@ -239,6 +242,7 @@ export declare const TranslationProvider: (props: {
|
|
|
239
242
|
readonly one: "Please only upload one file";
|
|
240
243
|
readonly other: "Please only upload up to {{count}} files";
|
|
241
244
|
};
|
|
245
|
+
readonly validation_date: "Please enter a valid date (YYYY-MM-DD)";
|
|
242
246
|
readonly validation_email: "That doesn’t look like a valid email address";
|
|
243
247
|
readonly validation_url: "That doesn’t look like a valid URL";
|
|
244
248
|
readonly validation_multiple_choice_min: {
|
|
@@ -300,6 +304,7 @@ export declare const TranslationProvider: (props: {
|
|
|
300
304
|
readonly one: "Please only upload one file";
|
|
301
305
|
readonly other: "Please only upload up to {{count}} files";
|
|
302
306
|
};
|
|
307
|
+
readonly validation_date: "Please enter a valid date (YYYY-MM-DD)";
|
|
303
308
|
readonly validation_email: "That doesn’t look like a valid email address";
|
|
304
309
|
readonly validation_url: "That doesn’t look like a valid URL";
|
|
305
310
|
readonly validation_multiple_choice_min: {
|
|
@@ -362,6 +367,7 @@ export declare const TranslationProvider: (props: {
|
|
|
362
367
|
readonly one: "Please only upload one file";
|
|
363
368
|
readonly other: "Please only upload up to {{count}} files";
|
|
364
369
|
};
|
|
370
|
+
readonly validation_date: "Please enter a valid date (YYYY-MM-DD)";
|
|
365
371
|
readonly validation_email: "That doesn’t look like a valid email address";
|
|
366
372
|
readonly validation_url: "That doesn’t look like a valid URL";
|
|
367
373
|
readonly validation_multiple_choice_min: {
|