@inploi/plugin-chatbot 3.28.2 → 3.28.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.
Files changed (45) hide show
  1. package/cdn/index.js +7 -7
  2. package/dist/{chatbot-body-bed76074.cjs → chatbot-body-30a036fc.cjs} +49 -28
  3. package/dist/{chatbot-body-1f775f40.js → chatbot-body-51e9bd34.js} +49 -28
  4. package/dist/chatbot.api.d.ts +220 -22
  5. package/dist/chatbot.utils.d.ts +20 -2
  6. package/dist/components/chat-bubble.d.ts +10 -0
  7. package/dist/components/chat-error.d.ts +3 -0
  8. package/dist/components/chat-input/chat-input.address.d.ts +16 -0
  9. package/dist/components/chat-input/chat-input.boolean.d.ts +21 -0
  10. package/dist/components/chat-input/chat-input.constants.d.ts +249 -0
  11. package/dist/components/chat-input/chat-input.d.ts +18 -0
  12. package/dist/components/chat-input/chat-input.file.d.ts +18 -0
  13. package/dist/components/chat-input/chat-input.multiple-choice.d.ts +16 -0
  14. package/dist/components/chat-input/chat-input.number.d.ts +16 -0
  15. package/dist/components/chat-input/chat-input.phone-number.d.ts +15 -0
  16. package/dist/components/chat-input/chat-input.phone-number.utils.d.ts +4 -0
  17. package/dist/components/chat-input/chat-input.submit.d.ts +10 -0
  18. package/dist/components/chat-input/chat-input.text.d.ts +17 -0
  19. package/dist/components/chat-loading.d.ts +1 -0
  20. package/dist/components/chatbot-body.d.ts +8 -0
  21. package/dist/components/chatbot.d.ts +8 -0
  22. package/dist/components/conversation.d.ts +4 -0
  23. package/dist/components/input-error.d.ts +5 -0
  24. package/dist/components/loading-indicator.d.ts +2 -0
  25. package/dist/components/message.link.d.ts +4 -0
  26. package/dist/components/palette-debugger.d.ts +1 -0
  27. package/dist/components/send-button.d.ts +2 -0
  28. package/dist/components/skip-button.d.ts +2 -0
  29. package/dist/components/status-bar.d.ts +4 -0
  30. package/dist/components/transition.d.ts +1 -0
  31. package/dist/components/typing-indicator.d.ts +2 -0
  32. package/dist/components/useChatService.d.ts +14 -0
  33. package/dist/components/useFocus.d.ts +1 -0
  34. package/dist/{index-8f799f13.cjs → index-251fe248.cjs} +1 -1
  35. package/dist/{index-5230f617.js → index-5e2a3998.js} +1 -1
  36. package/dist/mocks/browser.d.ts +1 -0
  37. package/dist/mocks/flows.mocks.d.ts +71 -0
  38. package/dist/mocks/handlers.d.ts +14 -0
  39. package/dist/mocks/mocks.utils.d.ts +2 -0
  40. package/dist/plugin-chatbot.cjs +1 -1
  41. package/dist/plugin-chatbot.js +1 -1
  42. package/dist/style/theme.d.ts +2 -0
  43. package/dist/style/theme.utils.d.ts +5 -0
  44. package/dist/style/tokens.d.ts +88 -0
  45. package/package.json +2 -2
@@ -0,0 +1,249 @@
1
+ export declare const countries: {
2
+ Afghanistan: string;
3
+ Albania: string;
4
+ Algeria: string;
5
+ 'American Samoa': string;
6
+ Andorra: string;
7
+ Angola: string;
8
+ Anguilla: string;
9
+ Antarctica: string;
10
+ 'Antigua and Barbuda': string;
11
+ Argentina: string;
12
+ Armenia: string;
13
+ Aruba: string;
14
+ Australia: string;
15
+ Austria: string;
16
+ Azerbaijan: string;
17
+ Bahrain: string;
18
+ Bangladesh: string;
19
+ Barbados: string;
20
+ Belarus: string;
21
+ Belgium: string;
22
+ Belize: string;
23
+ Benin: string;
24
+ Bermuda: string;
25
+ Bhutan: string;
26
+ Bolivia: string;
27
+ 'Bosnia and Herzegovina': string;
28
+ Botswana: string;
29
+ 'Bouvet Island': string;
30
+ Brazil: string;
31
+ 'British Indian Ocean Territory': string;
32
+ 'British Virgin Islands': string;
33
+ Brunei: string;
34
+ Bulgaria: string;
35
+ 'Burkina Faso': string;
36
+ Burundi: string;
37
+ 'Cabo Verde': string;
38
+ Cambodia: string;
39
+ Cameroon: string;
40
+ Canada: string;
41
+ 'Caribbean Netherlands': string;
42
+ 'Cayman Islands': string;
43
+ 'Central African Republic': string;
44
+ Chad: string;
45
+ Chile: string;
46
+ China: string;
47
+ 'Christmas Island': string;
48
+ 'Cocos (Keeling) Islands': string;
49
+ Colombia: string;
50
+ Comoros: string;
51
+ 'Cook Islands': string;
52
+ 'Costa Rica': string;
53
+ Croatia: string;
54
+ Cuba: string;
55
+ Curaçao: string;
56
+ Cyprus: string;
57
+ Czechia: string;
58
+ "C\u00F4te d'Ivoire": string;
59
+ 'Democratic Republic of the Congo': string;
60
+ Denmark: string;
61
+ Djibouti: string;
62
+ 'Dominican Republic': string;
63
+ Ecuador: string;
64
+ Egypt: string;
65
+ 'El Salvador': string;
66
+ 'Equatorial Guinea': string;
67
+ Eritrea: string;
68
+ Estonia: string;
69
+ Eswatini: string;
70
+ Ethiopia: string;
71
+ 'Falkland Islands (Islas Malvinas)': string;
72
+ 'Faroe Islands': string;
73
+ Fiji: string;
74
+ Finland: string;
75
+ France: string;
76
+ 'French Guiana': string;
77
+ 'French Polynesia': string;
78
+ 'French Southern and Antarctic Lands': string;
79
+ Gabon: string;
80
+ Georgia: string;
81
+ Germany: string;
82
+ Ghana: string;
83
+ Gibraltar: string;
84
+ Greece: string;
85
+ Greenland: string;
86
+ Grenada: string;
87
+ Guadeloupe: string;
88
+ Guam: string;
89
+ Guatemala: string;
90
+ Guernsey: string;
91
+ Guinea: string;
92
+ 'Guinea-Bissau': string;
93
+ Guyana: string;
94
+ Haiti: string;
95
+ Honduras: string;
96
+ 'Hong Kong': string;
97
+ Hungary: string;
98
+ Iceland: string;
99
+ India: string;
100
+ Indonesia: string;
101
+ Iran: string;
102
+ Iraq: string;
103
+ Ireland: string;
104
+ 'Isle of Man': string;
105
+ Israel: string;
106
+ Italy: string;
107
+ Jamaica: string;
108
+ Japan: string;
109
+ Jersey: string;
110
+ Jordan: string;
111
+ Kazakhstan: string;
112
+ Kenya: string;
113
+ Kiribati: string;
114
+ Kosovo: string;
115
+ Kuwait: string;
116
+ Kyrgyzstan: string;
117
+ Laos: string;
118
+ Latvia: string;
119
+ Lebanon: string;
120
+ Lesotho: string;
121
+ Liberia: string;
122
+ Libya: string;
123
+ Liechtenstein: string;
124
+ Lithuania: string;
125
+ Luxembourg: string;
126
+ Macao: string;
127
+ Madagascar: string;
128
+ Malawi: string;
129
+ Malaysia: string;
130
+ Maldives: string;
131
+ Mali: string;
132
+ Malta: string;
133
+ 'Marshall Islands': string;
134
+ Martinique: string;
135
+ Mauritania: string;
136
+ Mauritius: string;
137
+ Mayotte: string;
138
+ Mexico: string;
139
+ Micronesia: string;
140
+ Moldova: string;
141
+ Monaco: string;
142
+ Mongolia: string;
143
+ Montenegro: string;
144
+ Montserrat: string;
145
+ Morocco: string;
146
+ Mozambique: string;
147
+ 'Myanmar (Burma)': string;
148
+ Namibia: string;
149
+ Nauru: string;
150
+ Nepal: string;
151
+ Netherlands: string;
152
+ 'New Caledonia': string;
153
+ 'New Zealand': string;
154
+ Nicaragua: string;
155
+ Niger: string;
156
+ Nigeria: string;
157
+ Niue: string;
158
+ 'Norfolk Island': string;
159
+ 'North Korea': string;
160
+ 'North Macedonia': string;
161
+ 'Northern Mariana Islands': string;
162
+ Norway: string;
163
+ Oman: string;
164
+ Pakistan: string;
165
+ Palau: string;
166
+ Palestine: string;
167
+ Panama: string;
168
+ 'Papua New Guinea': string;
169
+ Paraguay: string;
170
+ Peru: string;
171
+ Philippines: string;
172
+ 'Pitcairn Islands': string;
173
+ Poland: string;
174
+ Portugal: string;
175
+ 'Puerto Rico': string;
176
+ Qatar: string;
177
+ Romania: string;
178
+ Russia: string;
179
+ Rwanda: string;
180
+ Réunion: string;
181
+ 'Saint Barth\u00E9lemy': string;
182
+ 'Saint Helena, Ascension and Tristan da Cunha': string;
183
+ 'Saint Kitts and Nevis': string;
184
+ 'Saint Lucia': string;
185
+ 'Saint Martin': string;
186
+ 'Saint Pierre and Miquelon': string;
187
+ 'Saint Vincent and the Grenadines': string;
188
+ Samoa: string;
189
+ 'San Marino': string;
190
+ 'Saudi Arabia': string;
191
+ Senegal: string;
192
+ Serbia: string;
193
+ Seychelles: string;
194
+ 'Sierra Leone': string;
195
+ Singapore: string;
196
+ 'Sint Maarten': string;
197
+ Slovakia: string;
198
+ Slovenia: string;
199
+ 'Solomon Islands': string;
200
+ Somalia: string;
201
+ 'South Africa': string;
202
+ 'South Georgia and the South Sandwich Islands': string;
203
+ 'South Korea': string;
204
+ 'South Sudan': string;
205
+ Spain: string;
206
+ 'Sri Lanka': string;
207
+ Sudan: string;
208
+ Suriname: string;
209
+ 'Svalbard and Jan Mayen': string;
210
+ Sweden: string;
211
+ Switzerland: string;
212
+ Syria: string;
213
+ 'S\u00E3o Tom\u00E9 and Pr\u00EDncipe': string;
214
+ Taiwan: string;
215
+ Tajikistan: string;
216
+ Tanzania: string;
217
+ Thailand: string;
218
+ 'The Bahamas': string;
219
+ 'The Gambia': string;
220
+ 'Timor-Leste': string;
221
+ Togo: string;
222
+ Tokelau: string;
223
+ Tonga: string;
224
+ 'Trinidad and Tobago': string;
225
+ Tunisia: string;
226
+ Turkmenistan: string;
227
+ 'Turks and Caicos Islands': string;
228
+ Tuvalu: string;
229
+ Türkiye: string;
230
+ 'U.S. Virgin Islands': string;
231
+ Uganda: string;
232
+ Ukraine: string;
233
+ 'United Arab Emirates': string;
234
+ 'United Kingdom': string;
235
+ 'United States': string;
236
+ 'United States Minor Outlying Islands': string;
237
+ Uruguay: string;
238
+ Uzbekistan: string;
239
+ Vanuatu: string;
240
+ 'Vatican City': string;
241
+ Venezuela: string;
242
+ Vietnam: string;
243
+ 'Wallis and Futuna': string;
244
+ 'Western Sahara': string;
245
+ Yemen: string;
246
+ Zambia: string;
247
+ Zimbabwe: string;
248
+ '\u00C5land Islands': string;
249
+ };
@@ -0,0 +1,18 @@
1
+ import { DistributivePick } from '../../chatbot.utils';
2
+ import { FlowSubmission } from '../../chatbot.state';
3
+ import { AddressInputPayload } from './chat-input.address';
4
+ import { BooleanChoicePayload } from './chat-input.boolean';
5
+ import { FilePayload } from './chat-input.file';
6
+ import { MultipleChoicePayload } from './chat-input.multiple-choice';
7
+ import { NumberPayload } from './chat-input.number';
8
+ import { PhonePayload } from './chat-input.phone-number';
9
+ import { SubmitPayload } from './chat-input.submit';
10
+ import { TextPayload } from './chat-input.text';
11
+ export type SubmitSuccessFn = (submission: FlowSubmission | null) => void;
12
+ export type ChatInputProps<T extends ChatbotInput> = {
13
+ onSubmitSuccess: (value: T['submission']) => void;
14
+ input: Omit<T, 'submission'>;
15
+ };
16
+ export type ChatbotInput = TextPayload | NumberPayload | MultipleChoicePayload | BooleanChoicePayload | FilePayload | SubmitPayload | AddressInputPayload | PhonePayload;
17
+ export type ChatInput = DistributivePick<ChatbotInput, 'type' | 'config' | 'key'>;
18
+ export declare const ChatInput: () => import("preact").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { ComponentProps } from 'preact';
2
+ import { FileToUpload, FlowSubmissionFile } from '../../chatbot.state';
3
+ import { ChatInputProps } from './chat-input';
4
+ export type FilePayload = {
5
+ type: 'file';
6
+ config: {
7
+ optional: boolean;
8
+ extensions: string[];
9
+ fileSizeLimitKib?: number;
10
+ allowMultiple: boolean;
11
+ };
12
+ key: string;
13
+ submission: FlowSubmissionFile | null;
14
+ };
15
+ export declare const FileThumbnail: ({ file, class: className, ...props }: ComponentProps<'div'> & {
16
+ file: Pick<FileToUpload, 'name' | 'sizeKb'>;
17
+ }) => import("preact").JSX.Element;
18
+ export declare const ChatInputFile: ({ input, onSubmitSuccess }: ChatInputProps<FilePayload>) => import("preact").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { FlowSubmissionEnum } from '../../chatbot.state';
2
+ import { ChatInputProps } from './chat-input';
3
+ export type MultipleChoicePayload = {
4
+ type: 'multiple-choice';
5
+ key: string | undefined;
6
+ config: {
7
+ options: {
8
+ value: string;
9
+ label: string;
10
+ }[];
11
+ minSelected?: number;
12
+ maxSelected?: number;
13
+ };
14
+ submission: FlowSubmissionEnum;
15
+ };
16
+ export declare const ChatInputMultipleChoice: ({ input, onSubmitSuccess }: ChatInputProps<MultipleChoicePayload>) => import("preact").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { FlowSubmissionNumber } from '../../chatbot.state';
2
+ import { ChatInputProps } from './chat-input';
3
+ export type NumberPayload = {
4
+ type: 'number';
5
+ key: string | undefined;
6
+ config: {
7
+ optional: boolean;
8
+ placeholder?: string;
9
+ defaultValue?: string;
10
+ decimalCases?: number;
11
+ min?: number;
12
+ max?: number;
13
+ };
14
+ submission: FlowSubmissionNumber | null;
15
+ };
16
+ export declare const ChatInputNumber: ({ input, onSubmitSuccess }: ChatInputProps<NumberPayload>) => import("preact").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { FlowSubmissionString } from '../../chatbot.state';
2
+ import { ChatInputProps } from './chat-input';
3
+ export type PhonePayload = {
4
+ type: 'phone';
5
+ key: string | undefined;
6
+ config: {
7
+ optional: boolean;
8
+ placeholder?: string;
9
+ defaultValue?: string;
10
+ minChars?: number;
11
+ maxChars?: number;
12
+ };
13
+ submission: FlowSubmissionString | null;
14
+ };
15
+ export declare const ChatInputPhoneNumber: ({ input, onSubmitSuccess }: ChatInputProps<PhonePayload>) => import("preact").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const getPhoneNumberParts: (input: string) => {
2
+ countryCode: string;
3
+ phoneNumber: string;
4
+ };
@@ -0,0 +1,10 @@
1
+ import { ChatInputProps } from './chat-input';
2
+ export type SubmitPayload = {
3
+ type: 'submit';
4
+ config: {
5
+ label: string;
6
+ };
7
+ key: string | undefined;
8
+ submission: null;
9
+ };
10
+ export declare const ChatInputSubmit: ({ input, onSubmitSuccess }: ChatInputProps<SubmitPayload>) => import("preact").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import type { JSX } from 'preact';
2
+ import { FlowSubmissionString } from '../../chatbot.state';
3
+ import { ChatInputProps } from './chat-input';
4
+ export type TextPayload = {
5
+ type: 'text';
6
+ key: string | undefined;
7
+ config: {
8
+ optional: boolean;
9
+ placeholder?: string;
10
+ format: 'text' | 'email' | 'url';
11
+ defaultValue?: string;
12
+ maxChars: number | undefined;
13
+ minChars: number | undefined;
14
+ };
15
+ submission: FlowSubmissionString | null;
16
+ };
17
+ export declare const ChatInputText: ({ input, onSubmitSuccess }: ChatInputProps<TextPayload>) => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const ChatLoading: () => import("preact").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { AnalyticsService, ApiClient, Logger } from '@inploi/sdk';
2
+ type ChatbotBodyProps = {
3
+ apiClient: ApiClient;
4
+ logger: Logger;
5
+ analytics: AnalyticsService;
6
+ };
7
+ export declare const ChatbotBody: ({ logger, apiClient, analytics }: ChatbotBodyProps) => import("preact/compat").JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { AnalyticsService, ApiClient, Logger } from '@inploi/sdk';
2
+ type ChatbotProps = {
3
+ apiClient: ApiClient;
4
+ logger: Logger;
5
+ analytics: AnalyticsService;
6
+ };
7
+ export declare const Chatbot: ({ logger, apiClient, analytics }: ChatbotProps) => import("preact/compat").JSX.Element;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ import { VNode } from 'preact';
2
+ export declare const Conversation: ({ lastSentMessageFooter }: {
3
+ lastSentMessageFooter: VNode | null;
4
+ }) => import("preact").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const InputError: ({ error }: {
2
+ error?: {
3
+ message?: string;
4
+ };
5
+ }) => import("preact").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { ComponentProps } from 'preact';
2
+ export declare const LoadingIndicator: (props: ComponentProps<'svg'>) => import("preact").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { LinkMessage as LinkMessageProps } from '../chatbot.state';
2
+ export declare const LinkMessage: ({ message }: {
3
+ message: LinkMessageProps;
4
+ }) => import("preact").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const PaletteDebugger: () => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ComponentProps } from 'preact';
2
+ export declare const SendButton: ({ class: className, ...props }: ComponentProps<'button'>) => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ComponentProps } from 'preact';
2
+ export declare const SkipButton: ({ class: className, ...props }: ComponentProps<'button'>) => import("preact").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ComponentChildren } from 'preact';
2
+ export declare const StatusBar: ({ children }: {
3
+ children?: ComponentChildren;
4
+ }) => import("preact").JSX.Element;
@@ -0,0 +1 @@
1
+ export type TransitionState = 'entering' | 'entered' | 'exiting' | 'exited';
@@ -0,0 +1,2 @@
1
+ import { ComponentProps } from '../../node_modules/preact/compat';
2
+ export declare const TypingIndicator: ({ className, ...props }: ComponentProps<'div'>) => import("preact/compat").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { ChatService } from '../interpreter';
2
+ import { SubmitSuccessFn } from './chat-input/chat-input';
3
+ export declare const chatStore: {
4
+ onSubmitSuccessFn$: import("@preact/signals").Signal<SubmitSuccessFn>;
5
+ isBotTyping$: import("@preact/signals").Signal<boolean>;
6
+ scrollToEnd: {
7
+ instant: () => void;
8
+ smooth: () => void;
9
+ };
10
+ };
11
+ export declare const useChatService: () => {
12
+ chatRef: import("preact/hooks").Ref<HTMLDivElement>;
13
+ chatService: ChatService;
14
+ };
@@ -0,0 +1 @@
1
+ export declare const useFocusOnMount: () => import("preact/hooks").MutableRef<any>;
@@ -5321,7 +5321,7 @@ const StatusBar = ({
5321
5321
  };
5322
5322
  function noop() {
5323
5323
  }
5324
- const ChatbotBody = M(() => Promise.resolve().then(() => require("./chatbot-body-bed76074.cjs")).then((module2) => module2.ChatbotBody));
5324
+ const ChatbotBody = M(() => Promise.resolve().then(() => require("./chatbot-body-30a036fc.cjs")).then((module2) => module2.ChatbotBody));
5325
5325
  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 [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out", {
5326
5326
  variants: {
5327
5327
  view: {
@@ -5320,7 +5320,7 @@ const StatusBar = ({
5320
5320
  };
5321
5321
  function noop() {
5322
5322
  }
5323
- const ChatbotBody = M(() => import("./chatbot-body-1f775f40.js").then((module) => module.ChatbotBody));
5323
+ const ChatbotBody = M(() => import("./chatbot-body-51e9bd34.js").then((module) => module.ChatbotBody));
5324
5324
  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 [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out", {
5325
5325
  variants: {
5326
5326
  view: {
@@ -0,0 +1 @@
1
+ export declare const worker: import("msw/browser").SetupWorker;
@@ -0,0 +1,71 @@
1
+ import { FlowNodeInput } from '@inploi/core/flows';
2
+ /** Modify only for integration tests */
3
+ export declare const automatedTestFlow: [{
4
+ readonly id: "1";
5
+ readonly isHead: true;
6
+ readonly nextId: "2";
7
+ readonly data: {
8
+ readonly text: "Test context: {{$context.context_var}}";
9
+ };
10
+ readonly type: "text";
11
+ }, {
12
+ readonly id: "2";
13
+ readonly nextId: "3";
14
+ readonly data: {
15
+ readonly key: "name";
16
+ readonly question: "What is your name?";
17
+ readonly placeholder: "John";
18
+ readonly format: "text";
19
+ };
20
+ readonly type: "question-text";
21
+ }, {
22
+ readonly id: "3";
23
+ readonly nextId: "4";
24
+ readonly data: {
25
+ readonly key: "age";
26
+ readonly question: "How old are you?";
27
+ readonly placeholder: "25";
28
+ readonly format: "text";
29
+ };
30
+ readonly type: "question-text";
31
+ }, {
32
+ readonly id: "4";
33
+ readonly data: {
34
+ readonly key: "question";
35
+ readonly question: "Do you have right to work in Mars?";
36
+ readonly trueLabel: "Yes";
37
+ readonly falseLabel: "No";
38
+ };
39
+ readonly type: "question-boolean";
40
+ readonly nextId: "ac6db6af-5bc9-4d0f-9282-ecdf204d6c7b";
41
+ }, {
42
+ readonly id: "ac6db6af-5bc9-4d0f-9282-ecdf204d6c7b";
43
+ readonly data: {
44
+ readonly compareKey: "question";
45
+ readonly compareValue: "false";
46
+ readonly compare: "equals";
47
+ };
48
+ readonly type: "if-block";
49
+ readonly branchId: "1d4fdae3-174a-415a-861e-593dd6ef9346";
50
+ readonly nextId: "1a70e4e7-12b4-4ab6-bb96-05af6e77b2af";
51
+ }, {
52
+ readonly id: "1d4fdae3-174a-415a-861e-593dd6ef9346";
53
+ readonly data: {
54
+ readonly text: "u cant";
55
+ };
56
+ readonly type: "text";
57
+ readonly nextId: "f391acce-c045-4310-9c7b-845f731ac069";
58
+ }, {
59
+ readonly id: "f391acce-c045-4310-9c7b-845f731ac069";
60
+ readonly data: {
61
+ readonly systemMessage: "Conversation ended";
62
+ };
63
+ readonly type: "end-flow";
64
+ }, {
65
+ readonly id: "1a70e4e7-12b4-4ab6-bb96-05af6e77b2af";
66
+ readonly data: {
67
+ readonly text: "nice one!";
68
+ };
69
+ readonly type: "text";
70
+ }];
71
+ export declare const debugFlow: FlowNodeInput[];
@@ -0,0 +1,14 @@
1
+ export declare const TEST_API_BASE_URL = "https://api.staging.inploi.com";
2
+ export declare const getFlowMockHandler: {
3
+ test_unmet_schema: import("msw").HttpHandler;
4
+ test: import("msw").HttpHandler;
5
+ /** Returns a valid flow. */
6
+ success: import("msw").HttpHandler;
7
+ /** Returns an invalid payload with a 200 code.
8
+ * E.g.: if the backend returns something incompatible with the frontend.
9
+ */
10
+ invalid_payload: import("msw").HttpHandler;
11
+ /** Returns a laravel-structured error */
12
+ exception: import("msw").HttpHandler;
13
+ };
14
+ export declare const defaultMockHandlers: import("msw").HttpHandler[];
@@ -0,0 +1,2 @@
1
+ import { FlowNode } from '@inploi/core/flows';
2
+ export declare const mockGetFlowEndpoint: (nodes: FlowNode[]) => import("msw").HttpHandler;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-8f799f13.cjs");
3
+ const index = require("./index-251fe248.cjs");
4
4
  require("@inploi/sdk");
5
5
  exports.chatbotPlugin = index.chatbotPlugin;
@@ -1,4 +1,4 @@
1
- import { R } from "./index-5230f617.js";
1
+ import { R } from "./index-5e2a3998.js";
2
2
  import "@inploi/sdk";
3
3
  export {
4
4
  R as chatbotPlugin
@@ -0,0 +1,2 @@
1
+ import { ChatbotPluginParams } from '..';
2
+ export declare const generateColorThemeCss: (theme: ChatbotPluginParams['theme']) => string;
@@ -0,0 +1,5 @@
1
+ import { ChatbotPluginParams } from '..';
2
+ export type Theme = ChatbotPluginParams['theme'];
3
+ export declare const prefixInploi: <T extends string | number>(v: T) => `--i-${T}`;
4
+ export declare const prefixVar: <T extends string | number>(v: T) => `var(--i-${T})`;
5
+ export type PrefixedVar<T extends string | number> = `var(--i-${T})`;