@inploi/plugin-chatbot 14.18.0 → 14.18.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 (102) hide show
  1. package/cdn/index.js +8 -9
  2. package/cdn/style.css +1 -1
  3. package/dist/chatbot-body-DjE1hhPI.js +4309 -0
  4. package/dist/chatbot-body-Y8XV3f3-.cjs +5 -0
  5. package/dist/index-C8Gr0Ijn.js +3198 -0
  6. package/dist/index-DSa7ZKqt.cjs +21 -0
  7. package/dist/index.d.cts +547 -0
  8. package/dist/index.d.ts +547 -2
  9. package/dist/plugin-chatbot.cjs +1 -1
  10. package/dist/plugin-chatbot.js +2 -3
  11. package/dist/style.css +1 -1
  12. package/package.json +17 -12
  13. package/dist/accessible-labels.test.d.ts +0 -1
  14. package/dist/chatbot-body-568f8bdb.cjs +0 -5
  15. package/dist/chatbot-body-b81136fe.cjs +0 -5
  16. package/dist/chatbot-body-c8f256af.js +0 -4637
  17. package/dist/chatbot-body-e611f2c7.js +0 -4637
  18. package/dist/chatbot.analytics.d.ts +0 -37
  19. package/dist/chatbot.analytics.test.d.ts +0 -1
  20. package/dist/chatbot.api.d.ts +0 -26
  21. package/dist/chatbot.beacon.d.ts +0 -40
  22. package/dist/chatbot.beacon.test.d.ts +0 -1
  23. package/dist/chatbot.constants.d.ts +0 -2
  24. package/dist/chatbot.context.test.d.ts +0 -1
  25. package/dist/chatbot.d.ts +0 -104
  26. package/dist/chatbot.dom.d.ts +0 -5
  27. package/dist/chatbot.idb.d.ts +0 -73
  28. package/dist/chatbot.lifecycle.test.d.ts +0 -1
  29. package/dist/chatbot.resume.d.ts +0 -15
  30. package/dist/chatbot.resume.test.d.ts +0 -1
  31. package/dist/chatbot.state.d.ts +0 -78
  32. package/dist/chatbot.state.test.d.ts +0 -1
  33. package/dist/chatbot.storage.test.d.ts +0 -1
  34. package/dist/chatbot.utils.d.ts +0 -8
  35. package/dist/components/chat-bubble.d.ts +0 -11
  36. package/dist/components/chat-error.d.ts +0 -3
  37. package/dist/components/chat-input/chat-input.address-countries.test.d.ts +0 -1
  38. package/dist/components/chat-input/chat-input.address-geo.test.d.ts +0 -1
  39. package/dist/components/chat-input/chat-input.address.d.ts +0 -5
  40. package/dist/components/chat-input/chat-input.address.test.d.ts +0 -1
  41. package/dist/components/chat-input/chat-input.boolean.d.ts +0 -11
  42. package/dist/components/chat-input/chat-input.constants.d.ts +0 -1
  43. package/dist/components/chat-input/chat-input.d.ts +0 -12
  44. package/dist/components/chat-input/chat-input.file.d.ts +0 -8
  45. package/dist/components/chat-input/chat-input.file.test.d.ts +0 -1
  46. package/dist/components/chat-input/chat-input.multiple-choice.d.ts +0 -4
  47. package/dist/components/chat-input/chat-input.multiple-choice.test.d.ts +0 -1
  48. package/dist/components/chat-input/chat-input.number.d.ts +0 -4
  49. package/dist/components/chat-input/chat-input.phone-number.d.ts +0 -4
  50. package/dist/components/chat-input/chat-input.submit.d.ts +0 -4
  51. package/dist/components/chat-input/chat-input.submit.test.d.ts +0 -1
  52. package/dist/components/chat-input/chat-input.text.d.ts +0 -5
  53. package/dist/components/chat-input/chat-input.text.test.d.ts +0 -1
  54. package/dist/components/chat-input/input-style.d.ts +0 -3
  55. package/dist/components/chat-loading.d.ts +0 -1
  56. package/dist/components/chatbot-body.d.ts +0 -12
  57. package/dist/components/chatbot-body.lifecycle.test.d.ts +0 -1
  58. package/dist/components/chatbot.d.ts +0 -17
  59. package/dist/components/conversation.d.ts +0 -8
  60. package/dist/components/correction.test.d.ts +0 -1
  61. package/dist/components/input-error.d.ts +0 -5
  62. package/dist/components/job-alerts-offer.d.ts +0 -13
  63. package/dist/components/job-alerts-offer.test.d.ts +0 -1
  64. package/dist/components/job-alerts-privacy-line.test.d.ts +0 -1
  65. package/dist/components/loading-indicator.d.ts +0 -3
  66. package/dist/components/message.link.d.ts +0 -5
  67. package/dist/components/palette-debugger.d.ts +0 -1
  68. package/dist/components/send-button.d.ts +0 -3
  69. package/dist/components/skip-button.d.ts +0 -3
  70. package/dist/components/status-bar.d.ts +0 -22
  71. package/dist/components/status-bar.test.d.ts +0 -1
  72. package/dist/components/transition.d.ts +0 -1
  73. package/dist/components/typing-indicator.d.ts +0 -3
  74. package/dist/components/useChatService.d.ts +0 -17
  75. package/dist/components/useChatService.test.d.ts +0 -1
  76. package/dist/components/useFocus.d.ts +0 -1
  77. package/dist/i18n.d.ts +0 -776
  78. package/dist/index-0fbc8442.js +0 -3756
  79. package/dist/index-19a00d2c.js +0 -3757
  80. package/dist/index-495ec66b.cjs +0 -22
  81. package/dist/index-90fa15a1.cjs +0 -22
  82. package/dist/index.cdn.d.ts +0 -9
  83. package/dist/index.dev.d.ts +0 -8
  84. package/dist/interpreter.test.d.ts +0 -1
  85. package/dist/md.d.ts +0 -1
  86. package/dist/md.test.d.ts +0 -1
  87. package/dist/mocks/browser.d.ts +0 -1
  88. package/dist/mocks/flows.mocks.d.ts +0 -77
  89. package/dist/mocks/handlers.d.ts +0 -14
  90. package/dist/mocks/mocks.utils.d.ts +0 -5
  91. package/dist/mocks/pre-apply.mock.d.ts +0 -296
  92. package/dist/phone.test.d.ts +0 -1
  93. package/dist/progress.d.ts +0 -12
  94. package/dist/progress.test.d.ts +0 -1
  95. package/dist/rpc.d.ts +0 -1
  96. package/dist/style/theme.d.ts +0 -3
  97. package/dist/style/theme.utils.d.ts +0 -6
  98. package/dist/style/tokens.d.ts +0 -86
  99. package/dist/widget-version.d.ts +0 -9
  100. package/dist/widget-version.test.d.ts +0 -1
  101. /package/dist/{common.geo-transport-CJGUJXTA-1d0a086a.js → common.geo-transport-CJGUJXTA-BsgnqoTX.js} +0 -0
  102. /package/dist/{common.geo-transport-CJGUJXTA-2b8bbb52.cjs → common.geo-transport-CJGUJXTA-DQyNyTXw.cjs} +0 -0
@@ -1,37 +0,0 @@
1
- import { AnalyticsService } from '@inploi/sdk';
2
- import { StartedFlow } from './chatbot.state';
3
-
4
- type ChatbotFunnelEvent = 'FLOW_START' | 'FLOW_INTERACT';
5
- export declare const logChatbotFunnelEvent: (analytics: Pick<AnalyticsService, "log">, flow: StartedFlow, event: ChatbotFunnelEvent) => Promise<import('@inploi/core/common').ResponseObj<{
6
- anonymous_id: string | null;
7
- session_id: string | null;
8
- candidate_id: string | null;
9
- event: import('@inploi/sdk').AnalyticsLogEvent;
10
- sent_at: string;
11
- context: {
12
- library: {
13
- name: "inploi-sdk";
14
- version: string;
15
- };
16
- page: {
17
- href: string;
18
- referrer: string;
19
- title: string;
20
- };
21
- };
22
- properties: {
23
- job: {
24
- id: string;
25
- id_type: "internal" | "external";
26
- } | undefined;
27
- } & {
28
- flow_id: string;
29
- flow_version: number;
30
- flow_session_id: string;
31
- flow_build: number;
32
- } & {
33
- flow_type?: import('@inploi/sdk').FlowType;
34
- };
35
- custom_properties?: Record<string, unknown>;
36
- }>>;
37
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,26 +0,0 @@
1
- import { FlowNode } from '@inploi/core/flows';
2
-
3
- export { FlowByIdPayloadSchema, FlowByJobPayloadSchema, FlowSchema } from '@inploi/flows/endpoints';
4
- export type { Flow } from '@inploi/flows/endpoints';
5
- export type FlowPayload = {
6
- flow: {
7
- id: string;
8
- version: number;
9
- nodes: FlowNode[];
10
- };
11
- };
12
- export type JobApplication = {
13
- job: {
14
- id: string;
15
- title: string;
16
- };
17
- company: {
18
- name: string;
19
- logo?: string;
20
- };
21
- flow: {
22
- id: string;
23
- version: number;
24
- nodes: FlowNode[];
25
- };
26
- };
@@ -1,40 +0,0 @@
1
- import { BeaconFields, BeaconKind } from '@inploi/flows/beacon';
2
- import { ApiClient, InploiSdkEnvironment } from '@inploi/sdk';
3
-
4
- /**
5
- * The CDN build's own directory (`…/@inploi/plugin-chatbot[@<v>]/cdn/`), whose one file is `index.js`; undefined for an
6
- * npm build, which is part of a host's bundle (Studio's), where no frame can be told to be the chatbot's.
7
- */
8
- export declare const ownBuild: (scriptUrl: string) => string | undefined;
9
- /**
10
- * A caught error's safe detail (`errorDetail`). Its stack keeps only frames of the CDN build's `index.js`, so no other
11
- * file's name (a host frame whose URL embeds this build's, in its query or fragment) is ever sent; an npm build keeps
12
- * none (a newline never occurs in a stack line, so no frame is its own).
13
- */
14
- export declare const chatbotDetail: (error: unknown, cdnBuild: string | undefined, eventMessage?: string) => {
15
- stack: string[];
16
- name: string;
17
- message: string;
18
- foreign: string[];
19
- thrown: import('@inploi/flows/beacon').ThrownShape;
20
- };
21
- export declare const chatbotError: (error: unknown) => {
22
- stack: string[];
23
- name: string;
24
- message: string;
25
- foreign: string[];
26
- thrown: import('@inploi/flows/beacon').ThrownShape;
27
- };
28
- /**
29
- * An api answer's HTTP status. Read from the error's shape, not its class: the CDN build bundles its own SDK, so the
30
- * host SDK's errors are another class's instances.
31
- */
32
- export declare const statusOf: (error: unknown) => number | undefined;
33
- export declare const chatbotBeacon: (kind: BeaconKind, reason?: string, fields?: BeaconFields) => void | undefined;
34
- /**
35
- * One set of beacons per document, from the first chatbot the page registers; none without the build's settings.
36
- * `scriptUrl`: where this code was loaded from (tests pass a CDN one).
37
- */
38
- export declare const startBeacons: (env: InploiSdkEnvironment | undefined, publishableKey: string | undefined, scriptUrl?: string) => void;
39
- /** `/flow/submit` with no answer from any server (network, CORS, blocked), and the retry that got through. */
40
- export declare const withSubmitBeacons: (apiClient: ApiClient) => ApiClient;
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export declare const CHATBOT_WIDGET_ID = "inploi-chatbot";
2
- export declare const CHATBOT_SELECTOR = "[data-widget='inploi-chatbot']";
@@ -1 +0,0 @@
1
- export {};
package/dist/chatbot.d.ts DELETED
@@ -1,104 +0,0 @@
1
- import { FeedbackPlugin, FeedbackPluginParams, feedbackPlugin } from '@inploi/plugin-feedback';
2
- import { Flow } from './chatbot.api';
3
- import { ChatbotDomManager } from './chatbot.dom';
4
- import { ChatbotTranslationTerms } from './i18n';
5
-
6
- type RemoveInternal<T extends object> = {
7
- [P in keyof T as string extends P ? never : P extends `_${string}` ? never : P]: T[P];
8
- };
9
- export type ChatbotTheme = {
10
- /** Rotation for the hue. Between 0 and 360. */
11
- hue: number;
12
- /** Chroma multiplier. Values between 0 and 1.5 work best. */
13
- chroma?: number;
14
- mode: 'light' | 'dark';
15
- };
16
- export type ChatbotFeedback = {
17
- plugin: FeedbackPlugin | Promise<{
18
- feedbackPlugin: typeof feedbackPlugin;
19
- }>;
20
- params?: Pick<FeedbackPluginParams, 'terms'>;
21
- };
22
- type InternalChatbotPluginParams = {
23
- theme: ChatbotTheme;
24
- feedback?: ChatbotFeedback;
25
- terms?: ChatbotTranslationTerms;
26
- /** Offer email alerts after a submitted application reports that the role closed. */
27
- jobAlerts?: boolean;
28
- /** @deprecated For internal usage only */
29
- _internal_domManager?: ChatbotDomManager;
30
- };
31
- export type ChatbotPlugin = typeof chatbotPlugin;
32
- export type ChatbotPluginParams = RemoveInternal<InternalChatbotPluginParams>;
33
- export type Chatbot = ReturnType<ReturnType<ChatbotPlugin>>;
34
- export type OpenChatbotParams = {
35
- /** Overrides the plugin's job-alert offer for this application. */
36
- jobAlerts?: boolean;
37
- /** The application flow to be interpreted */
38
- flow: Flow;
39
- /** Specify the cache keys for restoring this flow from local state.
40
- * This will be appended *in addition* to the flow id and version passed to `flow` property.
41
- * @example [job.id] if you want the flows to be unique per job.
42
- */
43
- flowKeys: string[];
44
- analytics?: {
45
- /** Data to be forwarded to analytics events as custom properties. */
46
- customProperties?: Record<string, unknown>;
47
- };
48
- /** Job context returned by the API; host context wins at every leaf. */
49
- jobContext?: Record<string, unknown>;
50
- /** Host context to be used by nodes internally and to identify saved drafts. */
51
- context?: Record<string, unknown>;
52
- /** Title to display in the status bar */
53
- title: string;
54
- /** Who sends the job alerts the closed-role offer sets up: the api's company name, which their emails come from. */
55
- employer?: string;
56
- job?: {
57
- id: string;
58
- /** Whether the job id is an internal (inploi) or external.
59
- * Use `external` if unsure */
60
- id_type: 'internal' | 'external';
61
- };
62
- /** Coordinates used to order address suggestions by proximity */
63
- locationOrigin?: {
64
- lat?: number;
65
- lng?: number;
66
- };
67
- };
68
- export type FetchFlowByJobIdAdditionalProperties = Partial<OpenChatbotParams & {
69
- /** What type of id to use. Defaults to `ats` */
70
- idType: 'inploi' | 'ats';
71
- }>;
72
- export type FetchFlowByIdAdditionalProperties = Partial<OpenChatbotParams>;
73
- export declare const chatbotPlugin: ({ _internal_domManager: dom, theme, terms, feedback, jobAlerts, }: InternalChatbotPluginParams) => ({ apiClient, rpcClient, logger, analytics, publishableKey, env }: {
74
- apiClient: import('@inploi/sdk').ApiClient;
75
- rpcClient: import('@inploi/sdk').InploiRpcClient;
76
- logger: import('@inploi/sdk').Logger;
77
- analytics: import('@inploi/sdk').AnalyticsService;
78
- publishableKey?: string;
79
- env?: import('@inploi/sdk').InploiSdkEnvironment;
80
- }) => {
81
- /** Optionally eagerly renders the interface ahead of needing the chatbot. */
82
- prepare: () => Promise<void>;
83
- /** Fetches a flow by job ID.
84
- * @param jobId - The job ID to fetch the flow for. This is the job ID according to the **ATS**, and not the inploi job ID.
85
- */
86
- fetchFlowByJobId: (jobId: string, additionalProperties?: FetchFlowByJobIdAdditionalProperties) => Promise<OpenChatbotParams>;
87
- fetchFlowById: (flowId: string, additionalProperties?: FetchFlowByIdAdditionalProperties) => Promise<OpenChatbotParams>;
88
- open: (params: OpenChatbotParams | Promise<OpenChatbotParams>) => Promise<void>;
89
- /**
90
- * Whether this browser holds an application in progress that `open(params)` would load: the same saved state
91
- * under the same key, unfinished, with an answer, including one whose submit started. The candidate loader
92
- * keeps such a candidate on this chatbot rather than move them mid-application (PROD-7342).
93
- */
94
- hasApplicationInProgress: (params: OpenChatbotParams) => Promise<boolean>;
95
- /**
96
- * Whether this browser holds an application in progress for any job: the candidate loader's question when it
97
- * cannot load this page's flow to ask `hasApplicationInProgress` (CF-06). Without the flow's nodes, any saved
98
- * answer counts.
99
- */
100
- hasAnyApplicationInProgress: () => Promise<boolean>;
101
- close: () => Promise<void>;
102
- destroy: () => void;
103
- };
104
- export {};
@@ -1,5 +0,0 @@
1
- export declare const createChatbotDomManager: () => {
2
- getChatbotElement: () => HTMLDivElement | null;
3
- getOrCreateChatbotElement: () => HTMLDivElement;
4
- };
5
- export type ChatbotDomManager = ReturnType<typeof createChatbotDomManager>;
@@ -1,73 +0,0 @@
1
- import { ApplicationRecovery, ChatInput, ChatMessage, KeyToSubmissionMap, SubmitCooldown, SubmitRedirect } from '@inploi/flows/engine';
2
- import { DBSchema } from 'idb';
3
- import { Flow } from './chatbot.api';
4
- import { StartedFlow } from './chatbot.state';
5
-
6
- interface ChatbotDb extends DBSchema {
7
- state: {
8
- key: string;
9
- value: {
10
- currentInput: ChatInput | null;
11
- nodeHistory: string[];
12
- startedWriteNodeIds?: string[];
13
- failedAttemptAt?: Record<string, number>;
14
- unconfirmedAttemptKeys?: string[];
15
- submitCooldown?: SubmitCooldown;
16
- submitRedirects?: Record<string, SubmitRedirect>;
17
- applicationRecovery?: ApplicationRecovery;
18
- flowSessionId: string;
19
- isFinished: boolean;
20
- hasInteracted?: boolean;
21
- messages: (ChatMessage & {
22
- groupId?: string;
23
- })[];
24
- sequence: number;
25
- submissions: KeyToSubmissionMap;
26
- };
27
- };
28
- }
29
- type StoredState = ChatbotDb['state']['value'];
30
- /** IndexedDB stores a structured clone, so drop a link's click handler (FLOW_REDIRECT analytics): a function cannot be cloned. */
31
- export declare const toStorable: (data: StoredState) => StoredState;
32
- export declare const idb: {
33
- getStateData: (flow: Flow, flowKeys: string[], context: Record<string, unknown>) => Promise<{
34
- currentInput: ChatInput | null;
35
- nodeHistory: string[];
36
- startedWriteNodeIds?: string[];
37
- failedAttemptAt?: Record<string, number>;
38
- unconfirmedAttemptKeys?: string[];
39
- submitCooldown?: SubmitCooldown;
40
- submitRedirects?: Record<string, SubmitRedirect>;
41
- applicationRecovery?: ApplicationRecovery;
42
- flowSessionId: string;
43
- isFinished: boolean;
44
- hasInteracted?: boolean;
45
- messages: (ChatMessage & {
46
- groupId?: string;
47
- })[];
48
- sequence: number;
49
- submissions: KeyToSubmissionMap;
50
- } | undefined>;
51
- /** Every application saved in this browser, whatever its job or flow. */
52
- getAllStateData: () => Promise<{
53
- currentInput: ChatInput | null;
54
- nodeHistory: string[];
55
- startedWriteNodeIds?: string[];
56
- failedAttemptAt?: Record<string, number>;
57
- unconfirmedAttemptKeys?: string[];
58
- submitCooldown?: SubmitCooldown;
59
- submitRedirects?: Record<string, SubmitRedirect>;
60
- applicationRecovery?: ApplicationRecovery;
61
- flowSessionId: string;
62
- isFinished: boolean;
63
- hasInteracted?: boolean;
64
- messages: (ChatMessage & {
65
- groupId?: string;
66
- })[];
67
- sequence: number;
68
- submissions: KeyToSubmissionMap;
69
- }[] | never[]>;
70
- setStateData: (params: StartedFlow) => void;
71
- flushStateData: () => Promise<unknown>;
72
- };
73
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
1
- import { ChatService } from '@inploi/flows/engine';
2
- import { TFunction } from './i18n';
3
-
4
- /** The resume prompt's messages share this group, so they can be removed once answered or when left behind. */
5
- export declare const RESUME_PROMPT_GROUP_ID = "resume-prompt";
6
- /**
7
- * Asks a candidate who came back to a saved, unsubmitted application whether to continue it or start again
8
- * (PROD-7338). A bot message, announced by the conversation's live region, then two buttons, the first focused. The
9
- * prompt is removed once answered, so it never builds up in the saved conversation. Resolves `true` to continue.
10
- */
11
- export declare const askToResume: ({ chatService, t, signal, }: {
12
- chatService: Pick<ChatService, "send" | "input">;
13
- t: TFunction;
14
- signal: AbortSignal;
15
- }) => Promise<boolean>;
@@ -1 +0,0 @@
1
- export {};
@@ -1,78 +0,0 @@
1
- import { ApplicationRecovery, ChatInput, ChatMessage, FlowStateData, FlowSubmission } from '@inploi/flows/engine';
2
- import { OpenChatbotParams } from '.';
3
- import { Flow } from './chatbot.api';
4
- import { ChatbotFlowProgress } from './progress';
5
-
6
- export declare const getCacheKey: (flow: Pick<StartedFlow, "flowKeys" | "id" | "version" | "build" | "context" | "hostContext">) => string;
7
- export type StartedFlow = Flow & {
8
- jobAlerts?: boolean;
9
- flowKeys: string[];
10
- title: string;
11
- data: FlowStateData;
12
- startedAt: Date;
13
- context: Record<string, unknown>;
14
- /** Original host context for draft keys when interpretation includes served job context. */
15
- hostContext?: Record<string, unknown>;
16
- job: OpenChatbotParams['job'];
17
- employer?: OpenChatbotParams['employer'];
18
- locationOrigin: OpenChatbotParams['locationOrigin'];
19
- nodeIdToProgress: Record<string, ChatbotFlowProgress>;
20
- analytics: OpenChatbotParams['analytics'];
21
- /**
22
- * The candidate came back to a saved, unsubmitted application and has not yet chosen to continue it or start again
23
- * (PROD-7338). Memory only, never in browser storage: asked on the first open after the page loads, not on a reopen.
24
- */
25
- offerResume?: boolean;
26
- };
27
- /**
28
- * A saved application worth asking about when the candidate comes back: the candidate answered something, it is not finished, and no
29
- * submit has started. A started write may have landed or succeeded, and its own guard already says so. Caches from
30
- * before the write barrier existed count a visited submit node as started, as the interpreter does.
31
- */
32
- export declare const hasUnfinishedApplication: ({ data, nodes }: Pick<StartedFlow, "data" | "nodes">) => boolean;
33
- /**
34
- * A saved application still in the chatbot's hands: not finished, and the candidate answered something or a submit
35
- * started (all questions may have been optional). Unlike the resume prompt's test, a started, pending or unknown
36
- * submit counts, because only the chatbot holds its write barrier and recovery state (PROD-7342: such an application
37
- * finishes in the chatbot).
38
- */
39
- export declare const hasApplicationInProgress: ({ data, nodes }: Pick<StartedFlow, "data" | "nodes">) => boolean;
40
- type CurrentFlow = {
41
- state: 'idle';
42
- flow?: never;
43
- } | {
44
- state: 'loading';
45
- flow?: never;
46
- } | {
47
- state: 'loaded';
48
- flow: StartedFlow;
49
- } | {
50
- state: 'closed';
51
- flow?: never;
52
- }
53
- /** The reason is logged; the candidate sees only the translated heading. */
54
- | {
55
- state: 'error';
56
- flow?: never;
57
- };
58
- export declare const store: {
59
- current$: import('@preact/signals').Signal<CurrentFlow>;
60
- viewState$: import('@preact/signals').Signal<"closed" | "maximised" | "minimised">;
61
- prepareFlow: ({ jobAlerts, flow, context, jobContext, flowKeys, title, analytics, job, employer, locationOrigin, }: OpenChatbotParams) => Promise<StartedFlow>;
62
- commitFlow: (flow: StartedFlow) => void;
63
- /** The candidate chose to continue or start again, so this page does not ask about this application again. */
64
- settleResume: (flow: StartedFlow) => void;
65
- cancelCurrentFlow: () => void;
66
- markAsFinished: () => void;
67
- markAsInteracted: () => void;
68
- setCurrentNodeId: (currentNodeId: string) => void;
69
- setApplicationRecovery: (applicationRecovery?: ApplicationRecovery) => Promise<void>;
70
- restart: () => void;
71
- addMessage: (message: ChatMessage, groupId?: string) => void;
72
- /** Removes messages from nodeId, all the messages that have the groupId passed, until it reaches one that doesn't */
73
- removeMessagesSentByNodeIds: (nodeIds: string[]) => void;
74
- setSubmission: (fieldKey: string, submission: FlowSubmission | null) => void;
75
- setInput: (input: ChatInput | undefined) => void;
76
- persistWriteBarrier: (flow: StartedFlow) => Promise<void>;
77
- };
78
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- import { FlowStateData, FlowSubmission } from '@inploi/flows/engine';
2
-
3
- export declare const isSubmissionOfType: <T extends FlowSubmission["type"]>(type: T) => (submission?: FlowSubmission) => submission is Extract<FlowSubmission, {
4
- type: T;
5
- }>;
6
- export declare function gzip(string: string): string | Promise<string>;
7
- export declare const initialiseFlowStateData: () => FlowStateData;
8
- export declare const getFormSubmitter: (e: Event) => HTMLButtonElement | HTMLInputElement;
@@ -1,11 +0,0 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- import { ComponentProps } from '../../node_modules/preact/compat';
3
-
4
- declare const chatBubbleVariants: (props?: ({
5
- side?: "left" | "right" | null | undefined;
6
- animate?: boolean | null | undefined;
7
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
- type ChatBubbleVariants = VariantProps<typeof chatBubbleVariants>;
9
- type ChatBubbleProps = ComponentProps<'p'> & ChatBubbleVariants;
10
- export declare const ChatBubble: ({ children, className, animate, side, ...props }: ChatBubbleProps) => import("preact").JSX.Element;
11
- export {};
@@ -1,3 +0,0 @@
1
- export declare const ChatError: ({ heading }: {
2
- heading: "error_heading" | "flow_closed";
3
- }) => import("preact").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { AddressInputPayload } from '@inploi/flows/engine';
2
- import { JSX } from 'preact';
3
- import { ChatInputProps } from './chat-input';
4
-
5
- export declare const ChatInputAddress: ({ input, onSubmitSuccess, logger, analytics, rpcClient, }: ChatInputProps<AddressInputPayload>) => JSX.Element;
@@ -1,11 +0,0 @@
1
- import { BooleanChoicePayload } from '@inploi/flows/engine';
2
- import { ChatInputProps } from './chat-input';
3
-
4
- export declare const booleanButtonListClass = "flex items-center flex-wrap gap-2 p-2.5";
5
- export declare const booleanButtonListItemClass = "min-w-0 max-w-full flex-auto";
6
- export declare const BooleanOption: import('preact').FunctionalComponent<Omit<import("preact").JSX.HTMLAttributes<HTMLButtonElement> & {
7
- label: string;
8
- }, "ref"> & {
9
- ref?: import('preact').Ref<HTMLButtonElement> | undefined;
10
- }>;
11
- export declare const ChatInputBoolean: ({ input, onSubmitSuccess }: ChatInputProps<BooleanChoicePayload>) => import("preact").JSX.Element;
@@ -1 +0,0 @@
1
- export { countries } from '@inploi/flows/countries';
@@ -1,12 +0,0 @@
1
- import { ChatbotInput, FlowSubmission } from '@inploi/flows/engine';
2
- import { AnalyticsService, InploiRpcClient, Logger } from '@inploi/sdk';
3
-
4
- export type SubmitSuccessFn = (submission: FlowSubmission | null) => void;
5
- export type ChatInputProps<T extends ChatbotInput> = {
6
- onSubmitSuccess: (value: T['submission']) => void;
7
- input: Omit<T, 'submission'>;
8
- logger: Logger;
9
- analytics: Pick<AnalyticsService, 'log'>;
10
- rpcClient?: InploiRpcClient;
11
- };
12
- export declare const ChatInput: ({ logger, analytics, rpcClient, }: Pick<ChatInputProps<ChatbotInput>, "logger" | "analytics" | "rpcClient">) => import("preact").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { FilePayload, FileToUpload } from '@inploi/flows/engine';
2
- import { ComponentProps } from 'preact';
3
- import { ChatInputProps } from './chat-input';
4
-
5
- export declare const FileThumbnail: ({ file, class: className, ...props }: ComponentProps<"div"> & {
6
- file: Pick<FileToUpload, "name" | "sizeKb">;
7
- }) => import("preact").JSX.Element;
8
- export declare const ChatInputFile: ({ input, onSubmitSuccess, analytics }: ChatInputProps<FilePayload>) => import("preact").JSX.Element;
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import { MultipleChoicePayload } from '@inploi/flows/engine';
2
- import { ChatInputProps } from './chat-input';
3
-
4
- export declare const ChatInputMultipleChoice: ({ input, onSubmitSuccess }: ChatInputProps<MultipleChoicePayload>) => import("preact").JSX.Element;
@@ -1,4 +0,0 @@
1
- import { NumberPayload } from '@inploi/flows/engine';
2
- import { ChatInputProps } from './chat-input';
3
-
4
- export declare const ChatInputNumber: ({ input, onSubmitSuccess }: ChatInputProps<NumberPayload>) => import("preact").JSX.Element;
@@ -1,4 +0,0 @@
1
- import { PhonePayload } from '@inploi/flows/engine';
2
- import { ChatInputProps } from './chat-input';
3
-
4
- export declare const ChatInputPhoneNumber: ({ input, onSubmitSuccess }: ChatInputProps<PhonePayload>) => import("preact").JSX.Element;
@@ -1,4 +0,0 @@
1
- import { SubmitPayload } from '@inploi/flows/engine';
2
- import { ChatInputProps } from './chat-input';
3
-
4
- export declare const ChatInputSubmit: ({ input, onSubmitSuccess }: ChatInputProps<SubmitPayload>) => import("preact").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { TextPayload } from '@inploi/flows/engine';
2
- import { JSX } from 'preact';
3
- import { ChatInputProps } from './chat-input';
4
-
5
- export declare const ChatInputText: ({ input, onSubmitSuccess }: ChatInputProps<TextPayload>) => JSX.Element;
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export declare const chatInputClass: (props?: ({
2
- optional?: boolean | null | undefined;
3
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1 +0,0 @@
1
- export declare const ChatLoading: () => import("preact").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { AnalyticsService, ApiClient, Logger, InploiRpcClient, TalentBankClient } from '@inploi/sdk';
2
-
3
- type ChatbotBodyProps = {
4
- env?: string;
5
- rpcClient?: InploiRpcClient;
6
- apiClient: ApiClient;
7
- logger: Logger;
8
- analytics: AnalyticsService;
9
- talentBankClient?: TalentBankClient;
10
- };
11
- export declare const ChatbotBody: ({ logger, apiClient, rpcClient, analytics, talentBankClient, env }: ChatbotBodyProps) => import("preact").JSX.Element;
12
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,17 +0,0 @@
1
- import { AnalyticsService, ApiClient, Logger, InploiRpcClient, TalentBankClient } from '@inploi/sdk';
2
- import { ReadonlySignal } from '@preact/signals';
3
- import { ChatbotPluginParams } from '..';
4
-
5
- type ChatbotProps = {
6
- env?: string;
7
- rpcClient?: InploiRpcClient;
8
- apiClient: ApiClient;
9
- logger: Logger;
10
- analytics: AnalyticsService;
11
- talentBankClient?: TalentBankClient;
12
- params: ChatbotPluginParams;
13
- /** The feedback plugin has drawn its faces in the header. */
14
- feedbackReady: ReadonlySignal<boolean>;
15
- };
16
- export declare const Chatbot: ({ env, logger, apiClient, rpcClient, analytics, talentBankClient, params, feedbackReady, }: ChatbotProps) => import("preact").JSX.Element;
17
- export {};
@@ -1,8 +0,0 @@
1
- import { InploiRpcClient } from '@inploi/sdk';
2
- import { VNode } from 'preact';
3
-
4
- export declare const Conversation: ({ env, lastSentMessageFooter, rpcClient, }: {
5
- env?: string;
6
- lastSentMessageFooter: VNode | null;
7
- rpcClient?: InploiRpcClient;
8
- }) => import("preact").JSX.Element;
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- export declare const InputError: ({ error }: {
2
- error?: {
3
- message?: string;
4
- };
5
- }) => import("preact").JSX.Element | null;
@@ -1,13 +0,0 @@
1
- import { InploiRpcClient } from '@inploi/sdk';
2
- import { StartedFlow } from '../chatbot.state';
3
- import { TFunction } from '../i18n';
4
-
5
- /**
6
- * Names the employer as the sender, unless the host translated the neutral line but not the named one: then the host's
7
- * own words stay rather than switching the page to English mid-offer.
8
- */
9
- export declare const privacyLine: (t: TFunction, employer: string | undefined) => string;
10
- export declare const JobAlertsOffer: ({ flow, rpcClient }: {
11
- flow: StartedFlow;
12
- rpcClient: InploiRpcClient;
13
- }) => import("preact").JSX.Element | null;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import { ComponentProps } from 'preact';
2
-
3
- export declare const LoadingIndicator: (props: ComponentProps<"svg">) => import("preact").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { LinkMessage as LinkMessageProps } from '@inploi/flows/engine';
2
-
3
- export declare const LinkMessage: ({ message }: {
4
- message: LinkMessageProps;
5
- }) => import("preact").JSX.Element;