@inploi/plugin-chatbot 3.12.2 → 3.12.4
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 +24 -24
- package/dist/{chatbot-body-f057a7a7.js → chatbot-body-716ca8d6.js} +34 -23
- package/dist/{chatbot-body-4233f566.cjs → chatbot-body-b22b5a7f.cjs} +34 -23
- package/dist/chatbot.api.d.ts +45 -0
- package/dist/chatbot.utils.d.ts +3 -0
- package/dist/{index-ea4e17ba.cjs → index-14d43f7c.cjs} +1 -1
- package/dist/{index-831d1492.js → index-34a0c678.js} +1 -1
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _, g as getHeadOrThrow, i as invariant, A as AbortedError, N, a as getFlowSubmissionsPayload, h as hasProp, k as kbToReadableSize, o as o$1, c as clsx, b as a$2, d as _$1, y, F, s as store, p, e as parse, f as picklist, j as h, l as k, m as isSubmissionOfType, C as Cn, n as parseAsync, V as ValiError, q as object, t as transform, r as maxLength, u as minLength, v as record, w as boolean, x as string, z as email, B as url, D as regex, T, E as m, G as AnimatePresence, H as ERROR_MESSAGES } from "./index-
|
|
1
|
+
import { _, g as getHeadOrThrow, i as invariant, A as AbortedError, N, a as getFlowSubmissionsPayload, h as hasProp, k as kbToReadableSize, o as o$1, c as clsx, b as a$2, d as _$1, y, F, s as store, p, e as parse, f as picklist, j as h, l as k, m as isSubmissionOfType, C as Cn, n as parseAsync, V as ValiError, q as object, t as transform, r as maxLength, u as minLength, v as record, w as boolean, x as string, z as email, B as url, D as regex, T, E as m, G as AnimatePresence, H as ERROR_MESSAGES } from "./index-34a0c678.js";
|
|
2
2
|
import "@inploi/sdk";
|
|
3
3
|
const followNodes = ({
|
|
4
4
|
node,
|
|
@@ -194,17 +194,19 @@ async function interpretSubmitNode({
|
|
|
194
194
|
context,
|
|
195
195
|
analytics
|
|
196
196
|
}) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
197
|
+
if (node.data.askForConfirmation !== false) {
|
|
198
|
+
await chat.userInput({
|
|
199
|
+
type: "submit",
|
|
200
|
+
key: void 0,
|
|
201
|
+
config: {
|
|
202
|
+
label: node.data.submitLabel
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
204
206
|
await chat.sendMessage({
|
|
205
207
|
type: "system",
|
|
206
208
|
variant: "info",
|
|
207
|
-
text: "Submitting
|
|
209
|
+
text: "Submitting…"
|
|
208
210
|
});
|
|
209
211
|
const {
|
|
210
212
|
anonymous_id,
|
|
@@ -228,7 +230,7 @@ async function interpretSubmitNode({
|
|
|
228
230
|
await chat.sendMessage({
|
|
229
231
|
type: "text",
|
|
230
232
|
author: "bot",
|
|
231
|
-
text: "Almost there! Please
|
|
233
|
+
text: "Almost there! Please complete your submission here:"
|
|
232
234
|
});
|
|
233
235
|
const href = new URL(response2.ats_data.redirect_url);
|
|
234
236
|
if (anonymous_id && !href.searchParams.has("anonymous_id")) {
|
|
@@ -237,7 +239,7 @@ async function interpretSubmitNode({
|
|
|
237
239
|
await chat.sendMessage({
|
|
238
240
|
type: "link",
|
|
239
241
|
href: href.toString(),
|
|
240
|
-
text: "
|
|
242
|
+
text: "Complete submission"
|
|
241
243
|
});
|
|
242
244
|
next(node.nextId);
|
|
243
245
|
}).with({
|
|
@@ -246,7 +248,7 @@ async function interpretSubmitNode({
|
|
|
246
248
|
await chat.sendMessage({
|
|
247
249
|
type: "system",
|
|
248
250
|
variant: "success",
|
|
249
|
-
text: "
|
|
251
|
+
text: "Submission completed!"
|
|
250
252
|
});
|
|
251
253
|
next(node.nextId);
|
|
252
254
|
}).otherwise(async (response2) => {
|
|
@@ -254,7 +256,7 @@ async function interpretSubmitNode({
|
|
|
254
256
|
await chat.sendMessage({
|
|
255
257
|
type: "system",
|
|
256
258
|
variant: "error",
|
|
257
|
-
text: "Failed to submit
|
|
259
|
+
text: "Failed to submit"
|
|
258
260
|
});
|
|
259
261
|
next(node.id);
|
|
260
262
|
});
|
|
@@ -324,7 +326,8 @@ async function interpretQuestionTextNode({
|
|
|
324
326
|
config: {
|
|
325
327
|
optional: node.data.optional,
|
|
326
328
|
placeholder: node.data.placeholder,
|
|
327
|
-
format: node.data.format
|
|
329
|
+
format: node.data.format,
|
|
330
|
+
maxChars: node.data.maxChars
|
|
328
331
|
}
|
|
329
332
|
});
|
|
330
333
|
if (reply.value === null) {
|
|
@@ -1064,6 +1067,11 @@ const validateExtensions = ({
|
|
|
1064
1067
|
const normalisedExtensions = allowedExtensions.map((ext) => ext.toLowerCase());
|
|
1065
1068
|
return files.every((file) => normalisedExtensions.includes(getFileExtension(file.name).toLowerCase()));
|
|
1066
1069
|
};
|
|
1070
|
+
const trimFileName = (fileName, maxLength2) => {
|
|
1071
|
+
const extension = getFileExtension(fileName);
|
|
1072
|
+
const trimmedName = fileName.replace(new RegExp(`${extension}$`), "").slice(0, maxLength2);
|
|
1073
|
+
return `${trimmedName}${extension}`;
|
|
1074
|
+
};
|
|
1067
1075
|
const ChatInputFile = ({
|
|
1068
1076
|
input,
|
|
1069
1077
|
onSubmitSuccess,
|
|
@@ -1184,7 +1192,7 @@ const ChatInputFile = ({
|
|
|
1184
1192
|
const filesToUpload = await Promise.allSettled(files2.map(async (file) => {
|
|
1185
1193
|
const data = await toBase64(file);
|
|
1186
1194
|
return {
|
|
1187
|
-
name: file.name,
|
|
1195
|
+
name: trimFileName(file.name, 42),
|
|
1188
1196
|
data,
|
|
1189
1197
|
sizeKb: file.size / 1e3
|
|
1190
1198
|
};
|
|
@@ -2849,14 +2857,17 @@ const inputFormatToProps = {
|
|
|
2849
2857
|
}
|
|
2850
2858
|
};
|
|
2851
2859
|
const isTextSubmission = isSubmissionOfType("text");
|
|
2852
|
-
const getResolver = (config) =>
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
+
const getResolver = (config) => {
|
|
2861
|
+
const maxLengthError = `Please enter no more than ${config.maxChars} characters`;
|
|
2862
|
+
return i(object({
|
|
2863
|
+
text: {
|
|
2864
|
+
email: string(errors.email, [email(errors.email), maxLength(config.maxChars ?? Infinity, maxLengthError)]),
|
|
2865
|
+
phone: transform(PhoneSchema, (value) => value.replace(/[^0-9]/g, ""), [maxLength(config.maxChars ?? Infinity, maxLengthError)]),
|
|
2866
|
+
text: string([minLength(1, errors.empty), maxLength(config.maxChars ?? Infinity, maxLengthError)]),
|
|
2867
|
+
url: string([url(errors.url), maxLength(config.maxChars ?? Infinity, maxLengthError)])
|
|
2868
|
+
}[config.format]
|
|
2869
|
+
}));
|
|
2870
|
+
};
|
|
2860
2871
|
const ChatInputText = ({
|
|
2861
2872
|
input,
|
|
2862
2873
|
onSubmitSuccess,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-14d43f7c.cjs");
|
|
4
4
|
require("@inploi/sdk");
|
|
5
5
|
const followNodes = ({
|
|
6
6
|
node,
|
|
@@ -196,17 +196,19 @@ async function interpretSubmitNode({
|
|
|
196
196
|
context,
|
|
197
197
|
analytics
|
|
198
198
|
}) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
199
|
+
if (node.data.askForConfirmation !== false) {
|
|
200
|
+
await chat.userInput({
|
|
201
|
+
type: "submit",
|
|
202
|
+
key: void 0,
|
|
203
|
+
config: {
|
|
204
|
+
label: node.data.submitLabel
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
206
208
|
await chat.sendMessage({
|
|
207
209
|
type: "system",
|
|
208
210
|
variant: "info",
|
|
209
|
-
text: "Submitting
|
|
211
|
+
text: "Submitting…"
|
|
210
212
|
});
|
|
211
213
|
const {
|
|
212
214
|
anonymous_id,
|
|
@@ -230,7 +232,7 @@ async function interpretSubmitNode({
|
|
|
230
232
|
await chat.sendMessage({
|
|
231
233
|
type: "text",
|
|
232
234
|
author: "bot",
|
|
233
|
-
text: "Almost there! Please
|
|
235
|
+
text: "Almost there! Please complete your submission here:"
|
|
234
236
|
});
|
|
235
237
|
const href = new URL(response2.ats_data.redirect_url);
|
|
236
238
|
if (anonymous_id && !href.searchParams.has("anonymous_id")) {
|
|
@@ -239,7 +241,7 @@ async function interpretSubmitNode({
|
|
|
239
241
|
await chat.sendMessage({
|
|
240
242
|
type: "link",
|
|
241
243
|
href: href.toString(),
|
|
242
|
-
text: "
|
|
244
|
+
text: "Complete submission"
|
|
243
245
|
});
|
|
244
246
|
next(node.nextId);
|
|
245
247
|
}).with({
|
|
@@ -248,7 +250,7 @@ async function interpretSubmitNode({
|
|
|
248
250
|
await chat.sendMessage({
|
|
249
251
|
type: "system",
|
|
250
252
|
variant: "success",
|
|
251
|
-
text: "
|
|
253
|
+
text: "Submission completed!"
|
|
252
254
|
});
|
|
253
255
|
next(node.nextId);
|
|
254
256
|
}).otherwise(async (response2) => {
|
|
@@ -256,7 +258,7 @@ async function interpretSubmitNode({
|
|
|
256
258
|
await chat.sendMessage({
|
|
257
259
|
type: "system",
|
|
258
260
|
variant: "error",
|
|
259
|
-
text: "Failed to submit
|
|
261
|
+
text: "Failed to submit"
|
|
260
262
|
});
|
|
261
263
|
next(node.id);
|
|
262
264
|
});
|
|
@@ -326,7 +328,8 @@ async function interpretQuestionTextNode({
|
|
|
326
328
|
config: {
|
|
327
329
|
optional: node.data.optional,
|
|
328
330
|
placeholder: node.data.placeholder,
|
|
329
|
-
format: node.data.format
|
|
331
|
+
format: node.data.format,
|
|
332
|
+
maxChars: node.data.maxChars
|
|
330
333
|
}
|
|
331
334
|
});
|
|
332
335
|
if (reply.value === null) {
|
|
@@ -1066,6 +1069,11 @@ const validateExtensions = ({
|
|
|
1066
1069
|
const normalisedExtensions = allowedExtensions.map((ext) => ext.toLowerCase());
|
|
1067
1070
|
return files.every((file) => normalisedExtensions.includes(getFileExtension(file.name).toLowerCase()));
|
|
1068
1071
|
};
|
|
1072
|
+
const trimFileName = (fileName, maxLength) => {
|
|
1073
|
+
const extension = getFileExtension(fileName);
|
|
1074
|
+
const trimmedName = fileName.replace(new RegExp(`${extension}$`), "").slice(0, maxLength);
|
|
1075
|
+
return `${trimmedName}${extension}`;
|
|
1076
|
+
};
|
|
1069
1077
|
const ChatInputFile = ({
|
|
1070
1078
|
input,
|
|
1071
1079
|
onSubmitSuccess,
|
|
@@ -1186,7 +1194,7 @@ const ChatInputFile = ({
|
|
|
1186
1194
|
const filesToUpload = await Promise.allSettled(files2.map(async (file) => {
|
|
1187
1195
|
const data = await toBase64(file);
|
|
1188
1196
|
return {
|
|
1189
|
-
name: file.name,
|
|
1197
|
+
name: trimFileName(file.name, 42),
|
|
1190
1198
|
data,
|
|
1191
1199
|
sizeKb: file.size / 1e3
|
|
1192
1200
|
};
|
|
@@ -2851,14 +2859,17 @@ const inputFormatToProps = {
|
|
|
2851
2859
|
}
|
|
2852
2860
|
};
|
|
2853
2861
|
const isTextSubmission = index.isSubmissionOfType("text");
|
|
2854
|
-
const getResolver = (config) =>
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
+
const getResolver = (config) => {
|
|
2863
|
+
const maxLengthError = `Please enter no more than ${config.maxChars} characters`;
|
|
2864
|
+
return i(index.object({
|
|
2865
|
+
text: {
|
|
2866
|
+
email: index.string(errors.email, [index.email(errors.email), index.maxLength(config.maxChars ?? Infinity, maxLengthError)]),
|
|
2867
|
+
phone: index.transform(PhoneSchema, (value) => value.replace(/[^0-9]/g, ""), [index.maxLength(config.maxChars ?? Infinity, maxLengthError)]),
|
|
2868
|
+
text: index.string([index.minLength(1, errors.empty), index.maxLength(config.maxChars ?? Infinity, maxLengthError)]),
|
|
2869
|
+
url: index.string([index.url(errors.url), index.maxLength(config.maxChars ?? Infinity, maxLengthError)])
|
|
2870
|
+
}[config.format]
|
|
2871
|
+
}));
|
|
2872
|
+
};
|
|
2862
2873
|
const ChatInputText = ({
|
|
2863
2874
|
input,
|
|
2864
2875
|
onSubmitSuccess,
|
package/dist/chatbot.api.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
|
|
|
35
35
|
id: string;
|
|
36
36
|
data: {
|
|
37
37
|
integrationId: string;
|
|
38
|
+
askForConfirmation: boolean;
|
|
39
|
+
submitLabel: string;
|
|
38
40
|
};
|
|
39
41
|
type: "integration-application-submit";
|
|
40
42
|
isHead?: boolean | undefined;
|
|
@@ -87,6 +89,7 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
|
|
|
87
89
|
optional: boolean;
|
|
88
90
|
format: "text" | "url" | "email" | "phone";
|
|
89
91
|
placeholder?: string | undefined;
|
|
92
|
+
maxChars?: number | undefined;
|
|
90
93
|
};
|
|
91
94
|
type: "question-text";
|
|
92
95
|
isHead?: boolean | undefined;
|
|
@@ -191,6 +194,8 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
|
|
|
191
194
|
id: string;
|
|
192
195
|
data: {
|
|
193
196
|
integrationId: string;
|
|
197
|
+
askForConfirmation: boolean;
|
|
198
|
+
submitLabel: string;
|
|
194
199
|
};
|
|
195
200
|
type: "integration-application-submit";
|
|
196
201
|
isHead?: boolean | undefined;
|
|
@@ -243,6 +248,7 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
|
|
|
243
248
|
optional: boolean;
|
|
244
249
|
format: "text" | "url" | "email" | "phone";
|
|
245
250
|
placeholder?: string | undefined;
|
|
251
|
+
maxChars?: number | undefined;
|
|
246
252
|
};
|
|
247
253
|
type: "question-text";
|
|
248
254
|
isHead?: boolean | undefined;
|
|
@@ -351,6 +357,8 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
|
|
|
351
357
|
id: string;
|
|
352
358
|
data: {
|
|
353
359
|
integrationId: string;
|
|
360
|
+
askForConfirmation: boolean;
|
|
361
|
+
submitLabel: string;
|
|
354
362
|
};
|
|
355
363
|
type: "integration-application-submit";
|
|
356
364
|
isHead?: boolean | undefined;
|
|
@@ -403,6 +411,7 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
|
|
|
403
411
|
optional: boolean;
|
|
404
412
|
format: "text" | "url" | "email" | "phone";
|
|
405
413
|
placeholder?: string | undefined;
|
|
414
|
+
maxChars?: number | undefined;
|
|
406
415
|
};
|
|
407
416
|
type: "question-text";
|
|
408
417
|
isHead?: boolean | undefined;
|
|
@@ -513,6 +522,8 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
513
522
|
id: string;
|
|
514
523
|
data: {
|
|
515
524
|
integrationId: string;
|
|
525
|
+
askForConfirmation: boolean;
|
|
526
|
+
submitLabel: string;
|
|
516
527
|
};
|
|
517
528
|
type: "integration-application-submit";
|
|
518
529
|
isHead?: boolean | undefined;
|
|
@@ -565,6 +576,7 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
565
576
|
optional: boolean;
|
|
566
577
|
format: "text" | "url" | "email" | "phone";
|
|
567
578
|
placeholder?: string | undefined;
|
|
579
|
+
maxChars?: number | undefined;
|
|
568
580
|
};
|
|
569
581
|
type: "question-text";
|
|
570
582
|
isHead?: boolean | undefined;
|
|
@@ -669,6 +681,8 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
669
681
|
id: string;
|
|
670
682
|
data: {
|
|
671
683
|
integrationId: string;
|
|
684
|
+
askForConfirmation: boolean;
|
|
685
|
+
submitLabel: string;
|
|
672
686
|
};
|
|
673
687
|
type: "integration-application-submit";
|
|
674
688
|
isHead?: boolean | undefined;
|
|
@@ -721,6 +735,7 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
721
735
|
optional: boolean;
|
|
722
736
|
format: "text" | "url" | "email" | "phone";
|
|
723
737
|
placeholder?: string | undefined;
|
|
738
|
+
maxChars?: number | undefined;
|
|
724
739
|
};
|
|
725
740
|
type: "question-text";
|
|
726
741
|
isHead?: boolean | undefined;
|
|
@@ -829,6 +844,8 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
829
844
|
id: string;
|
|
830
845
|
data: {
|
|
831
846
|
integrationId: string;
|
|
847
|
+
askForConfirmation: boolean;
|
|
848
|
+
submitLabel: string;
|
|
832
849
|
};
|
|
833
850
|
type: "integration-application-submit";
|
|
834
851
|
isHead?: boolean | undefined;
|
|
@@ -881,6 +898,7 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
881
898
|
optional: boolean;
|
|
882
899
|
format: "text" | "url" | "email" | "phone";
|
|
883
900
|
placeholder?: string | undefined;
|
|
901
|
+
maxChars?: number | undefined;
|
|
884
902
|
};
|
|
885
903
|
type: "question-text";
|
|
886
904
|
isHead?: boolean | undefined;
|
|
@@ -991,6 +1009,8 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
991
1009
|
id: string;
|
|
992
1010
|
data: {
|
|
993
1011
|
integrationId: string;
|
|
1012
|
+
askForConfirmation: boolean;
|
|
1013
|
+
submitLabel: string;
|
|
994
1014
|
};
|
|
995
1015
|
type: "integration-application-submit";
|
|
996
1016
|
isHead?: boolean | undefined;
|
|
@@ -1043,6 +1063,7 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1043
1063
|
optional: boolean;
|
|
1044
1064
|
format: "text" | "url" | "email" | "phone";
|
|
1045
1065
|
placeholder?: string | undefined;
|
|
1066
|
+
maxChars?: number | undefined;
|
|
1046
1067
|
};
|
|
1047
1068
|
type: "question-text";
|
|
1048
1069
|
isHead?: boolean | undefined;
|
|
@@ -1159,6 +1180,8 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1159
1180
|
id: string;
|
|
1160
1181
|
data: {
|
|
1161
1182
|
integrationId: string;
|
|
1183
|
+
askForConfirmation: boolean;
|
|
1184
|
+
submitLabel: string;
|
|
1162
1185
|
};
|
|
1163
1186
|
type: "integration-application-submit";
|
|
1164
1187
|
isHead?: boolean | undefined;
|
|
@@ -1211,6 +1234,7 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1211
1234
|
optional: boolean;
|
|
1212
1235
|
format: "text" | "url" | "email" | "phone";
|
|
1213
1236
|
placeholder?: string | undefined;
|
|
1237
|
+
maxChars?: number | undefined;
|
|
1214
1238
|
};
|
|
1215
1239
|
type: "question-text";
|
|
1216
1240
|
isHead?: boolean | undefined;
|
|
@@ -1315,6 +1339,8 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1315
1339
|
id: string;
|
|
1316
1340
|
data: {
|
|
1317
1341
|
integrationId: string;
|
|
1342
|
+
askForConfirmation: boolean;
|
|
1343
|
+
submitLabel: string;
|
|
1318
1344
|
};
|
|
1319
1345
|
type: "integration-application-submit";
|
|
1320
1346
|
isHead?: boolean | undefined;
|
|
@@ -1367,6 +1393,7 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1367
1393
|
optional: boolean;
|
|
1368
1394
|
format: "text" | "url" | "email" | "phone";
|
|
1369
1395
|
placeholder?: string | undefined;
|
|
1396
|
+
maxChars?: number | undefined;
|
|
1370
1397
|
};
|
|
1371
1398
|
type: "question-text";
|
|
1372
1399
|
isHead?: boolean | undefined;
|
|
@@ -1475,6 +1502,8 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1475
1502
|
id: string;
|
|
1476
1503
|
data: {
|
|
1477
1504
|
integrationId: string;
|
|
1505
|
+
askForConfirmation: boolean;
|
|
1506
|
+
submitLabel: string;
|
|
1478
1507
|
};
|
|
1479
1508
|
type: "integration-application-submit";
|
|
1480
1509
|
isHead?: boolean | undefined;
|
|
@@ -1527,6 +1556,7 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1527
1556
|
optional: boolean;
|
|
1528
1557
|
format: "text" | "url" | "email" | "phone";
|
|
1529
1558
|
placeholder?: string | undefined;
|
|
1559
|
+
maxChars?: number | undefined;
|
|
1530
1560
|
};
|
|
1531
1561
|
type: "question-text";
|
|
1532
1562
|
isHead?: boolean | undefined;
|
|
@@ -1644,6 +1674,8 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1644
1674
|
id: string;
|
|
1645
1675
|
data: {
|
|
1646
1676
|
integrationId: string;
|
|
1677
|
+
askForConfirmation: boolean;
|
|
1678
|
+
submitLabel: string;
|
|
1647
1679
|
};
|
|
1648
1680
|
type: "integration-application-submit";
|
|
1649
1681
|
isHead?: boolean | undefined;
|
|
@@ -1696,6 +1728,7 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1696
1728
|
optional: boolean;
|
|
1697
1729
|
format: "text" | "url" | "email" | "phone";
|
|
1698
1730
|
placeholder?: string | undefined;
|
|
1731
|
+
maxChars?: number | undefined;
|
|
1699
1732
|
};
|
|
1700
1733
|
type: "question-text";
|
|
1701
1734
|
isHead?: boolean | undefined;
|
|
@@ -1814,6 +1847,8 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
|
|
|
1814
1847
|
id: string;
|
|
1815
1848
|
data: {
|
|
1816
1849
|
integrationId: string;
|
|
1850
|
+
askForConfirmation: boolean;
|
|
1851
|
+
submitLabel: string;
|
|
1817
1852
|
};
|
|
1818
1853
|
type: "integration-application-submit";
|
|
1819
1854
|
isHead?: boolean | undefined;
|
|
@@ -1866,6 +1901,7 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
|
|
|
1866
1901
|
optional: boolean;
|
|
1867
1902
|
format: "text" | "url" | "email" | "phone";
|
|
1868
1903
|
placeholder?: string | undefined;
|
|
1904
|
+
maxChars?: number | undefined;
|
|
1869
1905
|
};
|
|
1870
1906
|
type: "question-text";
|
|
1871
1907
|
isHead?: boolean | undefined;
|
|
@@ -1970,6 +2006,8 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
|
|
|
1970
2006
|
id: string;
|
|
1971
2007
|
data: {
|
|
1972
2008
|
integrationId: string;
|
|
2009
|
+
askForConfirmation: boolean;
|
|
2010
|
+
submitLabel: string;
|
|
1973
2011
|
};
|
|
1974
2012
|
type: "integration-application-submit";
|
|
1975
2013
|
isHead?: boolean | undefined;
|
|
@@ -2022,6 +2060,7 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
|
|
|
2022
2060
|
optional: boolean;
|
|
2023
2061
|
format: "text" | "url" | "email" | "phone";
|
|
2024
2062
|
placeholder?: string | undefined;
|
|
2063
|
+
maxChars?: number | undefined;
|
|
2025
2064
|
};
|
|
2026
2065
|
type: "question-text";
|
|
2027
2066
|
isHead?: boolean | undefined;
|
|
@@ -2130,6 +2169,8 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
|
|
|
2130
2169
|
id: string;
|
|
2131
2170
|
data: {
|
|
2132
2171
|
integrationId: string;
|
|
2172
|
+
askForConfirmation: boolean;
|
|
2173
|
+
submitLabel: string;
|
|
2133
2174
|
};
|
|
2134
2175
|
type: "integration-application-submit";
|
|
2135
2176
|
isHead?: boolean | undefined;
|
|
@@ -2182,6 +2223,7 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
|
|
|
2182
2223
|
optional: boolean;
|
|
2183
2224
|
format: "text" | "url" | "email" | "phone";
|
|
2184
2225
|
placeholder?: string | undefined;
|
|
2226
|
+
maxChars?: number | undefined;
|
|
2185
2227
|
};
|
|
2186
2228
|
type: "question-text";
|
|
2187
2229
|
isHead?: boolean | undefined;
|
|
@@ -2297,6 +2339,8 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
|
|
|
2297
2339
|
id: string;
|
|
2298
2340
|
data: {
|
|
2299
2341
|
integrationId: string;
|
|
2342
|
+
askForConfirmation: boolean;
|
|
2343
|
+
submitLabel: string;
|
|
2300
2344
|
};
|
|
2301
2345
|
type: "integration-application-submit";
|
|
2302
2346
|
isHead?: boolean | undefined;
|
|
@@ -2349,6 +2393,7 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
|
|
|
2349
2393
|
optional: boolean;
|
|
2350
2394
|
format: "text" | "url" | "email" | "phone";
|
|
2351
2395
|
placeholder?: string | undefined;
|
|
2396
|
+
maxChars?: number | undefined;
|
|
2352
2397
|
};
|
|
2353
2398
|
type: "question-text";
|
|
2354
2399
|
isHead?: boolean | undefined;
|
package/dist/chatbot.utils.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
22
22
|
id: string;
|
|
23
23
|
data: {
|
|
24
24
|
integrationId: string;
|
|
25
|
+
askForConfirmation: boolean;
|
|
26
|
+
submitLabel: string;
|
|
25
27
|
};
|
|
26
28
|
type: "integration-application-submit";
|
|
27
29
|
isHead?: boolean | undefined;
|
|
@@ -74,6 +76,7 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
74
76
|
optional: boolean;
|
|
75
77
|
format: "text" | "url" | "email" | "phone";
|
|
76
78
|
placeholder?: string | undefined;
|
|
79
|
+
maxChars?: number | undefined;
|
|
77
80
|
};
|
|
78
81
|
type: "question-text";
|
|
79
82
|
isHead?: boolean | undefined;
|
|
@@ -9100,7 +9100,7 @@ const StatusBar = ({
|
|
|
9100
9100
|
})
|
|
9101
9101
|
});
|
|
9102
9102
|
};
|
|
9103
|
-
const ChatbotBody = M(() => Promise.resolve().then(() => require("./chatbot-body-
|
|
9103
|
+
const ChatbotBody = M(() => Promise.resolve().then(() => require("./chatbot-body-b22b5a7f.cjs")).then((module2) => module2.ChatbotBody));
|
|
9104
9104
|
const MotionProvider = ({
|
|
9105
9105
|
children
|
|
9106
9106
|
}) => {
|
|
@@ -9099,7 +9099,7 @@ const StatusBar = ({
|
|
|
9099
9099
|
})
|
|
9100
9100
|
});
|
|
9101
9101
|
};
|
|
9102
|
-
const ChatbotBody = M(() => import("./chatbot-body-
|
|
9102
|
+
const ChatbotBody = M(() => import("./chatbot-body-716ca8d6.js").then((module) => module.ChatbotBody));
|
|
9103
9103
|
const MotionProvider = ({
|
|
9104
9104
|
children
|
|
9105
9105
|
}) => {
|
package/dist/plugin-chatbot.cjs
CHANGED
package/dist/plugin-chatbot.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inploi/plugin-chatbot",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/plugin-chatbot.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"vite": "^4.4.5",
|
|
66
66
|
"vite-plugin-dts": "^3.7.0",
|
|
67
67
|
"vite-tsconfig-paths": "^4.2.1",
|
|
68
|
-
"@inploi/core": "1.11.
|
|
68
|
+
"@inploi/core": "1.11.9",
|
|
69
69
|
"@inploi/design-tokens": "0.2.1",
|
|
70
70
|
"@inploi/sdk": "1.12.2",
|
|
71
71
|
"eslint-config-custom": "0.1.0",
|