chatbot-lex-design-builder 1.0.0 → 1.0.1

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.
Files changed (71) hide show
  1. package/dist/cjs/types/graph/graph.d.ts +70 -10
  2. package/dist/cjs/types/nodes/closing-response.d.ts +201 -0
  3. package/dist/cjs/types/nodes/closing-response.js +16 -0
  4. package/dist/cjs/types/nodes/closing-response.js.map +1 -0
  5. package/dist/cjs/types/nodes/codehook-node.d.ts +1 -2
  6. package/dist/cjs/types/nodes/codehook-node.js +7 -4
  7. package/dist/cjs/types/nodes/codehook-node.js.map +1 -1
  8. package/dist/cjs/types/nodes/condition-node.d.ts +23 -8
  9. package/dist/cjs/types/nodes/condition-node.js +8 -6
  10. package/dist/cjs/types/nodes/condition-node.js.map +1 -1
  11. package/dist/cjs/types/nodes/confirmation-node.d.ts +1 -2
  12. package/dist/cjs/types/nodes/confirmation-node.js +4 -4
  13. package/dist/cjs/types/nodes/confirmation-node.js.map +1 -1
  14. package/dist/cjs/types/nodes/fullfillment-node.d.ts +1 -2
  15. package/dist/cjs/types/nodes/fullfillment-node.js +3 -3
  16. package/dist/cjs/types/nodes/fullfillment-node.js.map +1 -1
  17. package/dist/cjs/types/nodes/intent-node.d.ts +1 -2
  18. package/dist/cjs/types/nodes/intent-node.js +7 -7
  19. package/dist/cjs/types/nodes/intent-node.js.map +1 -1
  20. package/dist/cjs/types/nodes/node.d.ts +48 -8
  21. package/dist/cjs/types/nodes/node.js +2 -2
  22. package/dist/cjs/types/nodes/node.js.map +1 -1
  23. package/dist/cjs/types/nodes/slot-node.d.ts +53 -9
  24. package/dist/cjs/types/nodes/slot-node.js +7 -7
  25. package/dist/cjs/types/nodes/slot-node.js.map +1 -1
  26. package/dist/cjs/types/others/bot-flow.d.ts +206 -26
  27. package/dist/cjs/utils/get-next-step.js +1 -1
  28. package/dist/cjs/utils/get-next-step.js.map +1 -1
  29. package/dist/cjs/utils/index.d.ts +0 -1
  30. package/dist/cjs/utils/index.js +0 -1
  31. package/dist/cjs/utils/index.js.map +1 -1
  32. package/dist/cjs/utils/node-builders/build-closing-response.d.ts +1 -1
  33. package/dist/esm/types/graph/graph.d.ts +70 -10
  34. package/dist/esm/types/nodes/closing-response.d.ts +201 -0
  35. package/dist/esm/types/nodes/closing-response.js +13 -0
  36. package/dist/esm/types/nodes/closing-response.js.map +1 -0
  37. package/dist/esm/types/nodes/codehook-node.d.ts +1 -2
  38. package/dist/esm/types/nodes/codehook-node.js +5 -2
  39. package/dist/esm/types/nodes/codehook-node.js.map +1 -1
  40. package/dist/esm/types/nodes/condition-node.d.ts +23 -8
  41. package/dist/esm/types/nodes/condition-node.js +6 -4
  42. package/dist/esm/types/nodes/condition-node.js.map +1 -1
  43. package/dist/esm/types/nodes/confirmation-node.d.ts +1 -2
  44. package/dist/esm/types/nodes/confirmation-node.js +2 -2
  45. package/dist/esm/types/nodes/confirmation-node.js.map +1 -1
  46. package/dist/esm/types/nodes/fullfillment-node.d.ts +1 -2
  47. package/dist/esm/types/nodes/fullfillment-node.js +1 -1
  48. package/dist/esm/types/nodes/fullfillment-node.js.map +1 -1
  49. package/dist/esm/types/nodes/intent-node.d.ts +1 -2
  50. package/dist/esm/types/nodes/intent-node.js +5 -5
  51. package/dist/esm/types/nodes/intent-node.js.map +1 -1
  52. package/dist/esm/types/nodes/node.d.ts +48 -8
  53. package/dist/esm/types/nodes/node.js +1 -1
  54. package/dist/esm/types/nodes/node.js.map +1 -1
  55. package/dist/esm/types/nodes/slot-node.d.ts +53 -9
  56. package/dist/esm/types/nodes/slot-node.js +5 -5
  57. package/dist/esm/types/nodes/slot-node.js.map +1 -1
  58. package/dist/esm/types/others/bot-flow.d.ts +206 -26
  59. package/dist/esm/utils/get-next-step.js +1 -1
  60. package/dist/esm/utils/get-next-step.js.map +1 -1
  61. package/dist/esm/utils/index.d.ts +0 -1
  62. package/dist/esm/utils/index.js +0 -1
  63. package/dist/esm/utils/index.js.map +1 -1
  64. package/dist/esm/utils/node-builders/build-closing-response.d.ts +1 -1
  65. package/package.json +1 -5
  66. package/dist/cjs/utils/file-exporter.d.ts +0 -8
  67. package/dist/cjs/utils/file-exporter.js +0 -37
  68. package/dist/cjs/utils/file-exporter.js.map +0 -1
  69. package/dist/esm/utils/file-exporter.d.ts +0 -8
  70. package/dist/esm/utils/file-exporter.js +0 -30
  71. package/dist/esm/utils/file-exporter.js.map +0 -1
@@ -484,7 +484,7 @@ export declare const GraphSchema: z.ZodObject<{
484
484
  action?: string | null | undefined;
485
485
  }[] | null | undefined;
486
486
  }>]>, "many">>;
487
- branches: z.ZodCatch<z.ZodArray<z.ZodObject<{
487
+ branches: z.ZodArray<z.ZodObject<{
488
488
  id: z.ZodString;
489
489
  name: z.ZodString;
490
490
  expression: z.ZodString;
@@ -571,7 +571,7 @@ export declare const GraphSchema: z.ZodObject<{
571
571
  name: string;
572
572
  expression: string;
573
573
  response?: unknown;
574
- }>, "many">>;
574
+ }>, "many">;
575
575
  }, "strip", z.ZodTypeAny, {
576
576
  response: ({
577
577
  type: import("../responses").MessageType.text;
@@ -611,8 +611,13 @@ export declare const GraphSchema: z.ZodObject<{
611
611
  expression: string;
612
612
  }[];
613
613
  }, {
614
+ branches: {
615
+ id: string;
616
+ name: string;
617
+ expression: string;
618
+ response?: unknown;
619
+ }[];
614
620
  response?: unknown;
615
- branches?: unknown;
616
621
  }>;
617
622
  }, "strip", z.ZodTypeAny, {
618
623
  type: import("../nodes").NodeType.conditionNode;
@@ -659,8 +664,13 @@ export declare const GraphSchema: z.ZodObject<{
659
664
  }, {
660
665
  type: import("../nodes").NodeType.conditionNode;
661
666
  data: {
667
+ branches: {
668
+ id: string;
669
+ name: string;
670
+ expression: string;
671
+ response?: unknown;
672
+ }[];
662
673
  response?: unknown;
663
- branches?: unknown;
664
674
  };
665
675
  id: string;
666
676
  }>, z.ZodObject<{
@@ -1471,7 +1481,7 @@ export declare const GraphSchema: z.ZodObject<{
1471
1481
  required: z.ZodNullable<z.ZodBoolean>;
1472
1482
  utterances: z.ZodString;
1473
1483
  label: z.ZodString;
1474
- prompt: z.ZodCatch<z.ZodArray<z.ZodUnion<[z.ZodObject<{
1484
+ prompt: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1475
1485
  id: z.ZodString;
1476
1486
  type: z.ZodLiteral<import("../responses").MessageType.text>;
1477
1487
  title: z.ZodString;
@@ -1528,7 +1538,7 @@ export declare const GraphSchema: z.ZodObject<{
1528
1538
  buttonTitle: string;
1529
1539
  action?: string | null | undefined;
1530
1540
  }[] | null | undefined;
1531
- }>]>, "many">>;
1541
+ }>]>, "many">;
1532
1542
  success: z.ZodCatch<z.ZodArray<z.ZodUnion<[z.ZodObject<{
1533
1543
  id: z.ZodString;
1534
1544
  type: z.ZodLiteral<import("../responses").MessageType.text>;
@@ -1706,9 +1716,24 @@ export declare const GraphSchema: z.ZodObject<{
1706
1716
  type: string;
1707
1717
  name: string;
1708
1718
  label: string;
1719
+ prompt: ({
1720
+ type: import("../responses").MessageType.text;
1721
+ id: string;
1722
+ title: string;
1723
+ } | {
1724
+ type: import("../responses").MessageType.textWithButton;
1725
+ id: string;
1726
+ title: string;
1727
+ buttons?: {
1728
+ id: string;
1729
+ value: string;
1730
+ actionType: "url" | "post";
1731
+ buttonTitle: string;
1732
+ action?: string | null | undefined;
1733
+ }[] | null | undefined;
1734
+ })[];
1709
1735
  utterances: string;
1710
1736
  description?: unknown;
1711
- prompt?: unknown;
1712
1737
  success?: unknown;
1713
1738
  failure?: unknown;
1714
1739
  }>;
@@ -1778,9 +1803,24 @@ export declare const GraphSchema: z.ZodObject<{
1778
1803
  type: string;
1779
1804
  name: string;
1780
1805
  label: string;
1806
+ prompt: ({
1807
+ type: import("../responses").MessageType.text;
1808
+ id: string;
1809
+ title: string;
1810
+ } | {
1811
+ type: import("../responses").MessageType.textWithButton;
1812
+ id: string;
1813
+ title: string;
1814
+ buttons?: {
1815
+ id: string;
1816
+ value: string;
1817
+ actionType: "url" | "post";
1818
+ buttonTitle: string;
1819
+ action?: string | null | undefined;
1820
+ }[] | null | undefined;
1821
+ })[];
1781
1822
  utterances: string;
1782
1823
  description?: unknown;
1783
- prompt?: unknown;
1784
1824
  success?: unknown;
1785
1825
  failure?: unknown;
1786
1826
  };
@@ -2160,8 +2200,13 @@ export declare const GraphSchema: z.ZodObject<{
2160
2200
  } | {
2161
2201
  type: import("../nodes").NodeType.conditionNode;
2162
2202
  data: {
2203
+ branches: {
2204
+ id: string;
2205
+ name: string;
2206
+ expression: string;
2207
+ response?: unknown;
2208
+ }[];
2163
2209
  response?: unknown;
2164
- branches?: unknown;
2165
2210
  };
2166
2211
  id: string;
2167
2212
  } | {
@@ -2226,9 +2271,24 @@ export declare const GraphSchema: z.ZodObject<{
2226
2271
  type: string;
2227
2272
  name: string;
2228
2273
  label: string;
2274
+ prompt: ({
2275
+ type: import("../responses").MessageType.text;
2276
+ id: string;
2277
+ title: string;
2278
+ } | {
2279
+ type: import("../responses").MessageType.textWithButton;
2280
+ id: string;
2281
+ title: string;
2282
+ buttons?: {
2283
+ id: string;
2284
+ value: string;
2285
+ actionType: "url" | "post";
2286
+ buttonTitle: string;
2287
+ action?: string | null | undefined;
2288
+ }[] | null | undefined;
2289
+ })[];
2229
2290
  utterances: string;
2230
2291
  description?: unknown;
2231
- prompt?: unknown;
2232
2292
  success?: unknown;
2233
2293
  failure?: unknown;
2234
2294
  };
@@ -0,0 +1,201 @@
1
+ import { z } from "zod";
2
+ import { NodeType } from "./node-type";
3
+ export declare const ClosingResponseNodeDataSchema: z.ZodObject<{
4
+ active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5
+ response: z.ZodCatch<z.ZodArray<z.ZodUnion<[z.ZodObject<{
6
+ id: z.ZodString;
7
+ type: z.ZodLiteral<import("../responses").MessageType.text>;
8
+ title: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ type: import("../responses").MessageType.text;
11
+ id: string;
12
+ title: string;
13
+ }, {
14
+ type: import("../responses").MessageType.text;
15
+ id: string;
16
+ title: string;
17
+ }>, z.ZodObject<{
18
+ id: z.ZodString;
19
+ type: z.ZodLiteral<import("../responses").MessageType.textWithButton>;
20
+ title: z.ZodString;
21
+ buttons: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
22
+ id: z.ZodString;
23
+ actionType: z.ZodEnum<["post", "url"]>;
24
+ buttonTitle: z.ZodString;
25
+ value: z.ZodString;
26
+ action: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ id: string;
29
+ value: string;
30
+ actionType: "url" | "post";
31
+ buttonTitle: string;
32
+ action?: string | null | undefined;
33
+ }, {
34
+ id: string;
35
+ value: string;
36
+ actionType: "url" | "post";
37
+ buttonTitle: string;
38
+ action?: string | null | undefined;
39
+ }>, "many">>>>>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ type: import("../responses").MessageType.textWithButton;
42
+ id: string;
43
+ title: string;
44
+ buttons?: {
45
+ id: string;
46
+ value: string;
47
+ actionType: "url" | "post";
48
+ buttonTitle: string;
49
+ action?: string | null | undefined;
50
+ }[] | null | undefined;
51
+ }, {
52
+ type: import("../responses").MessageType.textWithButton;
53
+ id: string;
54
+ title: string;
55
+ buttons?: {
56
+ id: string;
57
+ value: string;
58
+ actionType: "url" | "post";
59
+ buttonTitle: string;
60
+ action?: string | null | undefined;
61
+ }[] | null | undefined;
62
+ }>]>, "many">>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ response: ({
65
+ type: import("../responses").MessageType.text;
66
+ id: string;
67
+ title: string;
68
+ } | {
69
+ type: import("../responses").MessageType.textWithButton;
70
+ id: string;
71
+ title: string;
72
+ buttons?: {
73
+ id: string;
74
+ value: string;
75
+ actionType: "url" | "post";
76
+ buttonTitle: string;
77
+ action?: string | null | undefined;
78
+ }[] | null | undefined;
79
+ })[];
80
+ active?: boolean | null | undefined;
81
+ }, {
82
+ active?: boolean | null | undefined;
83
+ response?: unknown;
84
+ }>;
85
+ export type ClosingResponseNodeData = z.infer<typeof ClosingResponseNodeDataSchema>;
86
+ export declare const ClosingResponseNodeSchema: z.ZodObject<{
87
+ id: z.ZodString;
88
+ type: z.ZodLiteral<NodeType.closingResponseNode>;
89
+ data: z.ZodObject<{
90
+ active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
91
+ response: z.ZodCatch<z.ZodArray<z.ZodUnion<[z.ZodObject<{
92
+ id: z.ZodString;
93
+ type: z.ZodLiteral<import("../responses").MessageType.text>;
94
+ title: z.ZodString;
95
+ }, "strip", z.ZodTypeAny, {
96
+ type: import("../responses").MessageType.text;
97
+ id: string;
98
+ title: string;
99
+ }, {
100
+ type: import("../responses").MessageType.text;
101
+ id: string;
102
+ title: string;
103
+ }>, z.ZodObject<{
104
+ id: z.ZodString;
105
+ type: z.ZodLiteral<import("../responses").MessageType.textWithButton>;
106
+ title: z.ZodString;
107
+ buttons: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
108
+ id: z.ZodString;
109
+ actionType: z.ZodEnum<["post", "url"]>;
110
+ buttonTitle: z.ZodString;
111
+ value: z.ZodString;
112
+ action: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ id: string;
115
+ value: string;
116
+ actionType: "url" | "post";
117
+ buttonTitle: string;
118
+ action?: string | null | undefined;
119
+ }, {
120
+ id: string;
121
+ value: string;
122
+ actionType: "url" | "post";
123
+ buttonTitle: string;
124
+ action?: string | null | undefined;
125
+ }>, "many">>>>>;
126
+ }, "strip", z.ZodTypeAny, {
127
+ type: import("../responses").MessageType.textWithButton;
128
+ id: string;
129
+ title: string;
130
+ buttons?: {
131
+ id: string;
132
+ value: string;
133
+ actionType: "url" | "post";
134
+ buttonTitle: string;
135
+ action?: string | null | undefined;
136
+ }[] | null | undefined;
137
+ }, {
138
+ type: import("../responses").MessageType.textWithButton;
139
+ id: string;
140
+ title: string;
141
+ buttons?: {
142
+ id: string;
143
+ value: string;
144
+ actionType: "url" | "post";
145
+ buttonTitle: string;
146
+ action?: string | null | undefined;
147
+ }[] | null | undefined;
148
+ }>]>, "many">>;
149
+ }, "strip", z.ZodTypeAny, {
150
+ response: ({
151
+ type: import("../responses").MessageType.text;
152
+ id: string;
153
+ title: string;
154
+ } | {
155
+ type: import("../responses").MessageType.textWithButton;
156
+ id: string;
157
+ title: string;
158
+ buttons?: {
159
+ id: string;
160
+ value: string;
161
+ actionType: "url" | "post";
162
+ buttonTitle: string;
163
+ action?: string | null | undefined;
164
+ }[] | null | undefined;
165
+ })[];
166
+ active?: boolean | null | undefined;
167
+ }, {
168
+ active?: boolean | null | undefined;
169
+ response?: unknown;
170
+ }>;
171
+ }, "strip", z.ZodTypeAny, {
172
+ type: NodeType.closingResponseNode;
173
+ data: {
174
+ response: ({
175
+ type: import("../responses").MessageType.text;
176
+ id: string;
177
+ title: string;
178
+ } | {
179
+ type: import("../responses").MessageType.textWithButton;
180
+ id: string;
181
+ title: string;
182
+ buttons?: {
183
+ id: string;
184
+ value: string;
185
+ actionType: "url" | "post";
186
+ buttonTitle: string;
187
+ action?: string | null | undefined;
188
+ }[] | null | undefined;
189
+ })[];
190
+ active?: boolean | null | undefined;
191
+ };
192
+ id: string;
193
+ }, {
194
+ type: NodeType.closingResponseNode;
195
+ data: {
196
+ active?: boolean | null | undefined;
197
+ response?: unknown;
198
+ };
199
+ id: string;
200
+ }>;
201
+ export type ClosingResponseNode = z.infer<typeof ClosingResponseNodeSchema>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClosingResponseNodeSchema = exports.ClosingResponseNodeDataSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const message_1 = require("../responses/message");
6
+ const node_type_1 = require("./node-type");
7
+ exports.ClosingResponseNodeDataSchema = zod_1.z.object({
8
+ active: zod_1.z.boolean().nullable().optional(),
9
+ response: message_1.MessageSchema.array().catch([]),
10
+ });
11
+ exports.ClosingResponseNodeSchema = zod_1.z.object({
12
+ id: zod_1.z.string(),
13
+ type: zod_1.z.literal(node_type_1.NodeType.closingResponseNode),
14
+ data: exports.ClosingResponseNodeDataSchema,
15
+ });
16
+ //# sourceMappingURL=closing-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"closing-response.js","sourceRoot":"","sources":["../../../../types/nodes/closing-response.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAqD;AACrD,2CAAuC;AAE1B,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;CAC1C,CAAC,CAAC;AAKU,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAQ,CAAC,mBAAmB,CAAC;IAC7C,IAAI,EAAE,qCAA6B;CACpC,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { NodeType } from "./node-type";
3
- declare const CodeHookNodeDataSchema: z.ZodObject<{
3
+ export declare const CodeHookNodeDataSchema: z.ZodObject<{
4
4
  label: z.ZodString;
5
5
  invocationLabel: z.ZodString;
6
6
  active: z.ZodNullable<z.ZodBoolean>;
@@ -549,4 +549,3 @@ export declare const CodeHookNodeSchema: z.ZodObject<{
549
549
  id: string;
550
550
  }>;
551
551
  export type CodeHookNode = z.infer<typeof CodeHookNodeSchema>;
552
- export {};
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CodeHookNodeSchema = void 0;
3
+ exports.CodeHookNodeSchema = exports.CodeHookNodeDataSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const message_1 = require("../responses/message");
6
6
  const node_type_1 = require("./node-type");
7
- const CodeHookNodeDataSchema = zod_1.z.object({
7
+ exports.CodeHookNodeDataSchema = zod_1.z.object({
8
8
  label: zod_1.z.string(),
9
- invocationLabel: zod_1.z.string().trim(),
9
+ invocationLabel: zod_1.z
10
+ .string()
11
+ .trim()
12
+ .min(1, { message: "invocation label is required" }),
10
13
  active: zod_1.z.boolean().nullable(),
11
14
  success: message_1.MessageSchema.array().catch([]),
12
15
  failure: message_1.MessageSchema.array().catch([]),
@@ -15,6 +18,6 @@ const CodeHookNodeDataSchema = zod_1.z.object({
15
18
  exports.CodeHookNodeSchema = zod_1.z.object({
16
19
  id: zod_1.z.string(),
17
20
  type: zod_1.z.literal(node_type_1.NodeType.codeHookNode),
18
- data: CodeHookNodeDataSchema,
21
+ data: exports.CodeHookNodeDataSchema,
19
22
  });
20
23
  //# sourceMappingURL=codehook-node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"codehook-node.js","sourceRoot":"","sources":["../../../../types/nodes/codehook-node.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAqD;AACrD,2CAAuC;AAEvC,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAClC,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC9B,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;CACzC,CAAC,CAAC;AAIU,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAQ,CAAC,YAAY,CAAC;IACtC,IAAI,EAAE,sBAAsB;CAC7B,CAAC,CAAC"}
1
+ {"version":3,"file":"codehook-node.js","sourceRoot":"","sources":["../../../../types/nodes/codehook-node.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAqD;AACrD,2CAAuC;AAE1B,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,eAAe,EAAE,OAAC;SACf,MAAM,EAAE;SACR,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;IACtD,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC9B,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;CACzC,CAAC,CAAC;AAIU,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAQ,CAAC,YAAY,CAAC;IACtC,IAAI,EAAE,8BAAsB;CAC7B,CAAC,CAAC"}
@@ -88,7 +88,7 @@ declare const BranchSchema: z.ZodObject<{
88
88
  expression: string;
89
89
  response?: unknown;
90
90
  }>;
91
- declare const ConditionalNodeDataSchema: z.ZodObject<{
91
+ export declare const ConditionalNodeDataSchema: z.ZodObject<{
92
92
  response: z.ZodCatch<z.ZodArray<z.ZodUnion<[z.ZodObject<{
93
93
  id: z.ZodString;
94
94
  type: z.ZodLiteral<import("../responses").MessageType.text>;
@@ -147,7 +147,7 @@ declare const ConditionalNodeDataSchema: z.ZodObject<{
147
147
  action?: string | null | undefined;
148
148
  }[] | null | undefined;
149
149
  }>]>, "many">>;
150
- branches: z.ZodCatch<z.ZodArray<z.ZodObject<{
150
+ branches: z.ZodArray<z.ZodObject<{
151
151
  id: z.ZodString;
152
152
  name: z.ZodString;
153
153
  expression: z.ZodString;
@@ -234,7 +234,7 @@ declare const ConditionalNodeDataSchema: z.ZodObject<{
234
234
  name: string;
235
235
  expression: string;
236
236
  response?: unknown;
237
- }>, "many">>;
237
+ }>, "many">;
238
238
  }, "strip", z.ZodTypeAny, {
239
239
  response: ({
240
240
  type: import("../responses").MessageType.text;
@@ -274,8 +274,13 @@ declare const ConditionalNodeDataSchema: z.ZodObject<{
274
274
  expression: string;
275
275
  }[];
276
276
  }, {
277
+ branches: {
278
+ id: string;
279
+ name: string;
280
+ expression: string;
281
+ response?: unknown;
282
+ }[];
277
283
  response?: unknown;
278
- branches?: unknown;
279
284
  }>;
280
285
  export type ConditionalNodeData = z.infer<typeof ConditionalNodeDataSchema>;
281
286
  export type Branch = z.infer<typeof BranchSchema>;
@@ -341,7 +346,7 @@ export declare const ConditionNodeSchema: z.ZodObject<{
341
346
  action?: string | null | undefined;
342
347
  }[] | null | undefined;
343
348
  }>]>, "many">>;
344
- branches: z.ZodCatch<z.ZodArray<z.ZodObject<{
349
+ branches: z.ZodArray<z.ZodObject<{
345
350
  id: z.ZodString;
346
351
  name: z.ZodString;
347
352
  expression: z.ZodString;
@@ -428,7 +433,7 @@ export declare const ConditionNodeSchema: z.ZodObject<{
428
433
  name: string;
429
434
  expression: string;
430
435
  response?: unknown;
431
- }>, "many">>;
436
+ }>, "many">;
432
437
  }, "strip", z.ZodTypeAny, {
433
438
  response: ({
434
439
  type: import("../responses").MessageType.text;
@@ -468,8 +473,13 @@ export declare const ConditionNodeSchema: z.ZodObject<{
468
473
  expression: string;
469
474
  }[];
470
475
  }, {
476
+ branches: {
477
+ id: string;
478
+ name: string;
479
+ expression: string;
480
+ response?: unknown;
481
+ }[];
471
482
  response?: unknown;
472
- branches?: unknown;
473
483
  }>;
474
484
  }, "strip", z.ZodTypeAny, {
475
485
  type: NodeType.conditionNode;
@@ -516,8 +526,13 @@ export declare const ConditionNodeSchema: z.ZodObject<{
516
526
  }, {
517
527
  type: NodeType.conditionNode;
518
528
  data: {
529
+ branches: {
530
+ id: string;
531
+ name: string;
532
+ expression: string;
533
+ response?: unknown;
534
+ }[];
519
535
  response?: unknown;
520
- branches?: unknown;
521
536
  };
522
537
  id: string;
523
538
  }>;
@@ -1,22 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConditionNodeSchema = void 0;
3
+ exports.ConditionNodeSchema = exports.ConditionalNodeDataSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const message_1 = require("../responses/message");
6
6
  const node_type_1 = require("./node-type");
7
7
  const BranchSchema = zod_1.z.object({
8
8
  id: zod_1.z.string(),
9
- name: zod_1.z.string(),
10
- expression: zod_1.z.string().trim().min(3),
9
+ name: zod_1.z.string().trim().min(1, "name is required"),
10
+ expression: zod_1.z.string().trim().min(1, "expression is required"),
11
11
  response: message_1.MessageSchema.array().catch([]),
12
12
  });
13
- const ConditionalNodeDataSchema = zod_1.z.object({
13
+ exports.ConditionalNodeDataSchema = zod_1.z.object({
14
14
  response: message_1.MessageSchema.array().catch([]),
15
- branches: BranchSchema.array().catch([]),
15
+ branches: BranchSchema.array()
16
+ .min(1, "branches is required")
17
+ .max(4, "branches can't be more than 4"),
16
18
  });
17
19
  exports.ConditionNodeSchema = zod_1.z.object({
18
20
  id: zod_1.z.string(),
19
21
  type: zod_1.z.literal(node_type_1.NodeType.conditionNode),
20
- data: ConditionalNodeDataSchema,
22
+ data: exports.ConditionalNodeDataSchema,
21
23
  });
22
24
  //# sourceMappingURL=condition-node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"condition-node.js","sourceRoot":"","sources":["../../../../types/nodes/condition-node.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAqD;AACrD,2CAAuC;AAEvC,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,QAAQ,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;CAC1C,CAAC,CAAC;AAEH,MAAM,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACzC,QAAQ,EAAE,YAAY,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;CACzC,CAAC,CAAC;AAIU,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAQ,CAAC,aAAa,CAAC;IACvC,IAAI,EAAE,yBAAyB;CAChC,CAAC,CAAC"}
1
+ {"version":3,"file":"condition-node.js","sourceRoot":"","sources":["../../../../types/nodes/condition-node.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAqD;AACrD,2CAAuC;AAEvC,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC;IAClD,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;IAC9D,QAAQ,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;CAC1C,CAAC,CAAC;AAEU,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,QAAQ,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACzC,QAAQ,EAAE,YAAY,CAAC,KAAK,EAAE;SAC3B,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC;SAC9B,GAAG,CAAC,CAAC,EAAE,+BAA+B,CAAC;CAC3C,CAAC,CAAC;AAIU,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAQ,CAAC,aAAa,CAAC;IACvC,IAAI,EAAE,iCAAyB;CAChC,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { NodeType } from "./node-type";
3
- declare const ConfirmationNodeDataSchema: z.ZodObject<{
3
+ export declare const ConfirmationNodeDataSchema: z.ZodObject<{
4
4
  label: z.ZodString;
5
5
  prompt: z.ZodArray<z.ZodUnion<[z.ZodObject<{
6
6
  id: z.ZodString;
@@ -745,4 +745,3 @@ export declare const ConfirmationNodeSchema: z.ZodObject<{
745
745
  id: string;
746
746
  }>;
747
747
  export type ConfirmationNode = z.infer<typeof ConfirmationNodeSchema>;
748
- export {};
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConfirmationNodeSchema = void 0;
3
+ exports.ConfirmationNodeSchema = exports.ConfirmationNodeDataSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const message_1 = require("../responses/message");
6
6
  const node_type_1 = require("./node-type");
7
- const ConfirmationNodeDataSchema = zod_1.z.object({
7
+ exports.ConfirmationNodeDataSchema = zod_1.z.object({
8
8
  label: zod_1.z.string(),
9
- prompt: message_1.MessageSchema.array(),
9
+ prompt: message_1.MessageSchema.array().min(1, { message: "prompt is required" }),
10
10
  success: message_1.MessageSchema.array().catch([]),
11
11
  failure: message_1.MessageSchema.array().catch([]),
12
12
  decline: message_1.MessageSchema.array().catch([]),
@@ -14,6 +14,6 @@ const ConfirmationNodeDataSchema = zod_1.z.object({
14
14
  exports.ConfirmationNodeSchema = zod_1.z.object({
15
15
  id: zod_1.z.string(),
16
16
  type: zod_1.z.literal(node_type_1.NodeType.confirmationNode),
17
- data: ConfirmationNodeDataSchema,
17
+ data: exports.ConfirmationNodeDataSchema,
18
18
  });
19
19
  //# sourceMappingURL=confirmation-node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"confirmation-node.js","sourceRoot":"","sources":["../../../../types/nodes/confirmation-node.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAqD;AACrD,2CAAuC;AAEvC,MAAM,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,uBAAa,CAAC,KAAK,EAAE;IAC7B,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;CACzC,CAAC,CAAC;AAGU,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAQ,CAAC,gBAAgB,CAAC;IAC1C,IAAI,EAAE,0BAA0B;CACjC,CAAC,CAAC"}
1
+ {"version":3,"file":"confirmation-node.js","sourceRoot":"","sources":["../../../../types/nodes/confirmation-node.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAqD;AACrD,2CAAuC;AAE1B,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;IACvE,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;CACzC,CAAC,CAAC;AAGU,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAQ,CAAC,gBAAgB,CAAC;IAC1C,IAAI,EAAE,kCAA0B;CACjC,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { NodeType } from "./node-type";
3
- declare const FullfillmentNodeDataSchema: z.ZodObject<{
3
+ export declare const FullfillmentNodeDataSchema: z.ZodObject<{
4
4
  label: z.ZodString;
5
5
  invocationLabel: z.ZodString;
6
6
  active: z.ZodNullable<z.ZodBoolean>;
@@ -549,4 +549,3 @@ export declare const FullfillmentNodeSchema: z.ZodObject<{
549
549
  id: string;
550
550
  }>;
551
551
  export type FullfillmentNode = z.infer<typeof FullfillmentNodeSchema>;
552
- export {};
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FullfillmentNodeSchema = void 0;
3
+ exports.FullfillmentNodeSchema = exports.FullfillmentNodeDataSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const message_1 = require("../responses/message");
6
6
  const node_type_1 = require("./node-type");
7
- const FullfillmentNodeDataSchema = zod_1.z.object({
7
+ exports.FullfillmentNodeDataSchema = zod_1.z.object({
8
8
  label: zod_1.z.string(),
9
9
  invocationLabel: zod_1.z.string().trim(),
10
10
  active: zod_1.z.boolean().nullable(),
@@ -15,6 +15,6 @@ const FullfillmentNodeDataSchema = zod_1.z.object({
15
15
  exports.FullfillmentNodeSchema = zod_1.z.object({
16
16
  id: zod_1.z.string(),
17
17
  type: zod_1.z.literal(node_type_1.NodeType.fullfillmentNode),
18
- data: FullfillmentNodeDataSchema,
18
+ data: exports.FullfillmentNodeDataSchema,
19
19
  });
20
20
  //# sourceMappingURL=fullfillment-node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fullfillment-node.js","sourceRoot":"","sources":["../../../../types/nodes/fullfillment-node.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAqD;AACrD,2CAAuC;AAEvC,MAAM,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAClC,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC9B,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;CACzC,CAAC,CAAC;AAIU,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAQ,CAAC,gBAAgB,CAAC;IAC1C,IAAI,EAAE,0BAA0B;CACjC,CAAC,CAAC"}
1
+ {"version":3,"file":"fullfillment-node.js","sourceRoot":"","sources":["../../../../types/nodes/fullfillment-node.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAqD;AACrD,2CAAuC;AAE1B,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAClC,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC9B,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;CACzC,CAAC,CAAC;AAIU,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAQ,CAAC,gBAAgB,CAAC;IAC1C,IAAI,EAAE,kCAA0B;CACjC,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { NodeType } from "./node-type";
3
- declare const IntentNodeDataSchema: z.ZodObject<{
3
+ export declare const IntentNodeDataSchema: z.ZodObject<{
4
4
  label: z.ZodString;
5
5
  name: z.ZodString;
6
6
  description: z.ZodString;
@@ -56,4 +56,3 @@ export declare const IntentNodeSchema: z.ZodObject<{
56
56
  id: string;
57
57
  }>;
58
58
  export type IntentNode = z.infer<typeof IntentNodeSchema>;
59
- export {};