@inploi/plugin-chatbot 3.18.0 → 3.19.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.
@@ -1,4 +1,4 @@
1
- import { i as isString$1, g as getHeadOrThrow, a as invariant, A as AbortedError, N, k as kbToReadableSize, b as getFlowSubmissionsPayload, _, h, c as _$1, p, F, o as o$1, d as clsx, y, s as store, e as a$2, f as debounce$1, j as k, l as parse, m as picklist, n as isSubmissionOfType, C as Cn, q as parseAsync, V as ValiError, r as object, t as transform, u as maxLength, v as minLength, w as record, x as boolean, z as number, B as minValue, D as maxValue, E as custom, G as string, H as email, I as url, J as regex, K as cva, L as ERROR_MESSAGES } from "./index-a0ca0101.js";
1
+ import { i as isString$1, g as getHeadOrThrow, a as invariant, A as AbortedError, N, k as kbToReadableSize, b as getFlowSubmissionsPayload, _, h, c as _$1, p, F, o as o$1, d as clsx, y, s as store, e as a$2, f as debounce$1, j as k, l as parse, m as picklist, n as isSubmissionOfType, C as Cn, q as parseAsync, V as ValiError, r as object, t as transform, u as maxLength, v as minLength, w as record, x as boolean, z as number, B as minValue, D as maxValue, E as custom, G as string, H as email, I as url, J as regex, K as cva, L as ERROR_MESSAGES } from "./index-18edb2f5.js";
2
2
  import "@inploi/sdk";
3
3
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
@@ -855,6 +855,19 @@ async function interpretSubmitNode({
855
855
  text: "Submission completed!"
856
856
  });
857
857
  next(node.nextId);
858
+ }).with({
859
+ sucess: false,
860
+ ats_data: {
861
+ message: _.string
862
+ }
863
+ }, async (response2) => {
864
+ logger.error(response2.ats_data);
865
+ await chat.sendMessage({
866
+ type: "system",
867
+ variant: "error",
868
+ text: response2.ats_data.message
869
+ });
870
+ await submit(false);
858
871
  }).otherwise(async (response2) => {
859
872
  logger.error(response2);
860
873
  await chat.sendMessage({
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-8c1e1b09.cjs");
3
+ const index = require("./index-89588fad.cjs");
4
4
  require("@inploi/sdk");
5
5
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
6
6
  function getDefaultExportFromCjs(x) {
@@ -857,6 +857,19 @@ async function interpretSubmitNode({
857
857
  text: "Submission completed!"
858
858
  });
859
859
  next(node.nextId);
860
+ }).with({
861
+ sucess: false,
862
+ ats_data: {
863
+ message: index._.string
864
+ }
865
+ }, async (response2) => {
866
+ logger.error(response2.ats_data);
867
+ await chat.sendMessage({
868
+ type: "system",
869
+ variant: "error",
870
+ text: response2.ats_data.message
871
+ });
872
+ await submit(false);
860
873
  }).otherwise(async (response2) => {
861
874
  logger.error(response2);
862
875
  await chat.sendMessage({
@@ -47,7 +47,6 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
47
47
  nextId?: string | undefined;
48
48
  } | {
49
49
  data: {
50
- ats: "cornerstone";
51
50
  integrationId: string;
52
51
  };
53
52
  type: "integration-workflow-get";
@@ -209,7 +208,6 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
209
208
  nextId?: string | undefined;
210
209
  } | {
211
210
  data: {
212
- ats: "cornerstone";
213
211
  integrationId: string;
214
212
  };
215
213
  type: "integration-workflow-get";
@@ -376,7 +374,6 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
376
374
  nextId?: string | undefined;
377
375
  } | {
378
376
  data: {
379
- ats: "cornerstone";
380
377
  integrationId: string;
381
378
  };
382
379
  type: "integration-workflow-get";
@@ -545,7 +542,6 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
545
542
  nextId?: string | undefined;
546
543
  } | {
547
544
  data: {
548
- ats: "cornerstone";
549
545
  integrationId: string;
550
546
  };
551
547
  type: "integration-workflow-get";
@@ -707,7 +703,6 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
707
703
  nextId?: string | undefined;
708
704
  } | {
709
705
  data: {
710
- ats: "cornerstone";
711
706
  integrationId: string;
712
707
  };
713
708
  type: "integration-workflow-get";
@@ -874,7 +869,6 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
874
869
  nextId?: string | undefined;
875
870
  } | {
876
871
  data: {
877
- ats: "cornerstone";
878
872
  integrationId: string;
879
873
  };
880
874
  type: "integration-workflow-get";
@@ -1043,7 +1037,6 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
1043
1037
  nextId?: string | undefined;
1044
1038
  } | {
1045
1039
  data: {
1046
- ats: "cornerstone";
1047
1040
  integrationId: string;
1048
1041
  };
1049
1042
  type: "integration-workflow-get";
@@ -1218,7 +1211,6 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
1218
1211
  nextId?: string | undefined;
1219
1212
  } | {
1220
1213
  data: {
1221
- ats: "cornerstone";
1222
1214
  integrationId: string;
1223
1215
  };
1224
1216
  type: "integration-workflow-get";
@@ -1380,7 +1372,6 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
1380
1372
  nextId?: string | undefined;
1381
1373
  } | {
1382
1374
  data: {
1383
- ats: "cornerstone";
1384
1375
  integrationId: string;
1385
1376
  };
1386
1377
  type: "integration-workflow-get";
@@ -1547,7 +1538,6 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
1547
1538
  nextId?: string | undefined;
1548
1539
  } | {
1549
1540
  data: {
1550
- ats: "cornerstone";
1551
1541
  integrationId: string;
1552
1542
  };
1553
1543
  type: "integration-workflow-get";
@@ -1723,7 +1713,6 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
1723
1713
  nextId?: string | undefined;
1724
1714
  } | {
1725
1715
  data: {
1726
- ats: "cornerstone";
1727
1716
  integrationId: string;
1728
1717
  };
1729
1718
  type: "integration-workflow-get";
@@ -1900,7 +1889,6 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
1900
1889
  nextId?: string | undefined;
1901
1890
  } | {
1902
1891
  data: {
1903
- ats: "cornerstone";
1904
1892
  integrationId: string;
1905
1893
  };
1906
1894
  type: "integration-workflow-get";
@@ -2062,7 +2050,6 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
2062
2050
  nextId?: string | undefined;
2063
2051
  } | {
2064
2052
  data: {
2065
- ats: "cornerstone";
2066
2053
  integrationId: string;
2067
2054
  };
2068
2055
  type: "integration-workflow-get";
@@ -2229,7 +2216,6 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
2229
2216
  nextId?: string | undefined;
2230
2217
  } | {
2231
2218
  data: {
2232
- ats: "cornerstone";
2233
2219
  integrationId: string;
2234
2220
  };
2235
2221
  type: "integration-workflow-get";
@@ -2403,7 +2389,6 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
2403
2389
  nextId?: string | undefined;
2404
2390
  } | {
2405
2391
  data: {
2406
- ats: "cornerstone";
2407
2392
  integrationId: string;
2408
2393
  };
2409
2394
  type: "integration-workflow-get";
@@ -32,7 +32,6 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
32
32
  nextId?: string | undefined;
33
33
  } | {
34
34
  data: {
35
- ats: "cornerstone";
36
35
  integrationId: string;
37
36
  };
38
37
  type: "integration-workflow-get";
@@ -4758,7 +4758,7 @@ const StatusBar = ({
4758
4758
  })
4759
4759
  });
4760
4760
  };
4761
- const ChatbotBody = M(() => import("./chatbot-body-29d96369.js").then((module) => module.ChatbotBody));
4761
+ const ChatbotBody = M(() => import("./chatbot-body-67894fdd.js").then((module) => module.ChatbotBody));
4762
4762
  const chatbotContentClass = cva("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none", {
4763
4763
  variants: {
4764
4764
  view: {
@@ -4759,7 +4759,7 @@ const StatusBar = ({
4759
4759
  })
4760
4760
  });
4761
4761
  };
4762
- const ChatbotBody = M(() => Promise.resolve().then(() => require("./chatbot-body-08b2c697.cjs")).then((module2) => module2.ChatbotBody));
4762
+ const ChatbotBody = M(() => Promise.resolve().then(() => require("./chatbot-body-c8efca55.cjs")).then((module2) => module2.ChatbotBody));
4763
4763
  const chatbotContentClass = cva("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none", {
4764
4764
  variants: {
4765
4765
  view: {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-8c1e1b09.cjs");
3
+ const index = require("./index-89588fad.cjs");
4
4
  require("@inploi/sdk");
5
5
  exports.chatbotPlugin = index.chatbotPlugin;
@@ -1,4 +1,4 @@
1
- import { M } from "./index-a0ca0101.js";
1
+ import { M } from "./index-18edb2f5.js";
2
2
  import "@inploi/sdk";
3
3
  export {
4
4
  M as chatbotPlugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inploi/plugin-chatbot",
3
- "version": "3.18.0",
3
+ "version": "3.19.0",
4
4
  "type": "module",
5
5
  "main": "dist/plugin-chatbot.js",
6
6
  "types": "dist/index.d.ts",
@@ -66,9 +66,9 @@
66
66
  "vite": "^4.4.5",
67
67
  "vite-plugin-dts": "^3.7.0",
68
68
  "vite-tsconfig-paths": "^4.2.1",
69
- "@inploi/core": "1.14.0",
69
+ "@inploi/core": "1.14.1",
70
70
  "@inploi/design-tokens": "0.2.1",
71
- "@inploi/sdk": "1.13.2",
71
+ "@inploi/sdk": "1.14.0",
72
72
  "eslint-config-custom": "0.1.0",
73
73
  "tsconfig": "0.1.0"
74
74
  },