@inploi/plugin-chatbot 13.0.0 → 13.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.
@@ -1,11 +1,12 @@
1
1
  import { Flow } from './chatbot.api';
2
- import { ChatMessage, KeyToSubmissionMap, StartedFlow } from './chatbot.state';
2
+ import { ApplicationRecovery, ChatMessage, KeyToSubmissionMap, StartedFlow } from './chatbot.state';
3
3
  import { ChatInput } from './components/chat-input/chat-input';
4
4
 
5
5
  export declare const idb: {
6
6
  getStateData: (flow: Flow, flowKeys: string[], context: Record<string, unknown>) => Promise<{
7
7
  currentInput: ChatInput | null;
8
8
  nodeHistory: string[];
9
+ applicationRecovery?: ApplicationRecovery;
9
10
  flowSessionId: string;
10
11
  isFinished: boolean;
11
12
  hasInteracted?: boolean;
@@ -272,6 +272,7 @@ export declare const store: {
272
272
  markAsFinished: () => void;
273
273
  markAsInteracted: () => void;
274
274
  setCurrentNodeId: (currentNodeId: string) => void;
275
+ setApplicationRecovery: (applicationRecovery?: ApplicationRecovery) => Promise<void>;
275
276
  restart: () => void;
276
277
  addMessage: (message: ChatMessage, groupId?: string) => void;
277
278
  /** Removes messages from nodeId, all the messages that have the groupId passed, until it reaches one that doesn't */
@@ -357,6 +358,10 @@ export type FlowSubmission = FlowSubmissionString | FlowSubmissionBoolean | Flow
357
358
  export type KeyToSubmissionMap = {
358
359
  [key: string]: FlowSubmission;
359
360
  };
361
+ export type ApplicationRecovery = {
362
+ fileQuestionNodeId: string;
363
+ submitNodeId: string;
364
+ };
360
365
  /** Dynamic part of a flow */
361
366
  export type FlowStateData = {
362
367
  /** History of messages left in the chat */
@@ -365,6 +370,7 @@ export type FlowStateData = {
365
370
  })[];
366
371
  submissions: KeyToSubmissionMap;
367
372
  nodeHistory: string[];
373
+ applicationRecovery?: ApplicationRecovery;
368
374
  /** Needs to be separate because a node can have many inputs */
369
375
  currentInput: ChatInput | null;
370
376
  isFinished: boolean;
@@ -0,0 +1 @@
1
+ export {};
package/dist/i18n.d.ts CHANGED
@@ -5,6 +5,11 @@ export declare const TranslationProvider: (props: {
5
5
  readonly send: "Send";
6
6
  readonly skip: "Skip";
7
7
  readonly skipped: "Skipped";
8
+ readonly submission_closed: "This role is no longer accepting applications.";
9
+ readonly submission_duplicate: "It looks like you've already applied for this role.";
10
+ readonly submission_retryable: "We couldn't submit your application. Please try again.";
11
+ readonly submission_unknown: "We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.";
12
+ readonly submission_unreadable_document: "We couldn't read that file. Please upload a different one.";
8
13
  readonly maximize: "Maximise";
9
14
  readonly minimize: "Minimise";
10
15
  readonly submission_redirect_message: "Almost there! Please complete your submission here:";
@@ -77,6 +82,11 @@ export declare const TranslationProvider: (props: {
77
82
  readonly send: "Send";
78
83
  readonly skip: "Skip";
79
84
  readonly skipped: "Skipped";
85
+ readonly submission_closed: "This role is no longer accepting applications.";
86
+ readonly submission_duplicate: "It looks like you've already applied for this role.";
87
+ readonly submission_retryable: "We couldn't submit your application. Please try again.";
88
+ readonly submission_unknown: "We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.";
89
+ readonly submission_unreadable_document: "We couldn't read that file. Please upload a different one.";
80
90
  readonly maximize: "Maximise";
81
91
  readonly minimize: "Minimise";
82
92
  readonly submission_redirect_message: "Almost there! Please complete your submission here:";
@@ -146,6 +156,11 @@ export declare const TranslationProvider: (props: {
146
156
  readonly send: "Send";
147
157
  readonly skip: "Skip";
148
158
  readonly skipped: "Skipped";
159
+ readonly submission_closed: "This role is no longer accepting applications.";
160
+ readonly submission_duplicate: "It looks like you've already applied for this role.";
161
+ readonly submission_retryable: "We couldn't submit your application. Please try again.";
162
+ readonly submission_unknown: "We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.";
163
+ readonly submission_unreadable_document: "We couldn't read that file. Please upload a different one.";
149
164
  readonly maximize: "Maximise";
150
165
  readonly minimize: "Minimise";
151
166
  readonly submission_redirect_message: "Almost there! Please complete your submission here:";
@@ -218,6 +233,11 @@ export declare const TranslationProvider: (props: {
218
233
  readonly send: "Send";
219
234
  readonly skip: "Skip";
220
235
  readonly skipped: "Skipped";
236
+ readonly submission_closed: "This role is no longer accepting applications.";
237
+ readonly submission_duplicate: "It looks like you've already applied for this role.";
238
+ readonly submission_retryable: "We couldn't submit your application. Please try again.";
239
+ readonly submission_unknown: "We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.";
240
+ readonly submission_unreadable_document: "We couldn't read that file. Please upload a different one.";
221
241
  readonly maximize: "Maximise";
222
242
  readonly minimize: "Minimise";
223
243
  readonly submission_redirect_message: "Almost there! Please complete your submission here:";
@@ -287,6 +307,11 @@ export declare const TranslationProvider: (props: {
287
307
  readonly send: "Send";
288
308
  readonly skip: "Skip";
289
309
  readonly skipped: "Skipped";
310
+ readonly submission_closed: "This role is no longer accepting applications.";
311
+ readonly submission_duplicate: "It looks like you've already applied for this role.";
312
+ readonly submission_retryable: "We couldn't submit your application. Please try again.";
313
+ readonly submission_unknown: "We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.";
314
+ readonly submission_unreadable_document: "We couldn't read that file. Please upload a different one.";
290
315
  readonly maximize: "Maximise";
291
316
  readonly minimize: "Minimise";
292
317
  readonly submission_redirect_message: "Almost there! Please complete your submission here:";
@@ -357,6 +382,11 @@ export declare const TranslationProvider: (props: {
357
382
  readonly send: "Send";
358
383
  readonly skip: "Skip";
359
384
  readonly skipped: "Skipped";
385
+ readonly submission_closed: "This role is no longer accepting applications.";
386
+ readonly submission_duplicate: "It looks like you've already applied for this role.";
387
+ readonly submission_retryable: "We couldn't submit your application. Please try again.";
388
+ readonly submission_unknown: "We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.";
389
+ readonly submission_unreadable_document: "We couldn't read that file. Please upload a different one.";
360
390
  readonly maximize: "Maximise";
361
391
  readonly minimize: "Minimise";
362
392
  readonly submission_redirect_message: "Almost there! Please complete your submission here:";