@inploi/plugin-chatbot 3.7.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +16 -20
- package/dist/chatbot.d.ts +2 -3
- package/dist/chatbot.dom.d.ts +1 -2
- package/dist/chatbot.state.d.ts +2 -2
- package/dist/chatbot.utils.d.ts +6 -7
- package/dist/{index-09e54786.cjs → index-210f3179.cjs} +485 -3424
- package/dist/{index-1808db67.js → index-6a43f107.js} +496 -3435
- package/dist/interpreter.d.ts +5 -4
- package/dist/{job-application-content-205c66b2.js → job-application-content-6683c944.js} +250 -44
- package/dist/{job-application-content-43128b7f.cjs → job-application-content-cdd9aeb2.cjs} +250 -44
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +2 -2
- package/package.json +7 -4
package/dist/chatbot.d.ts
CHANGED
|
@@ -6,17 +6,16 @@ export type ChatbotPlugin = typeof chatbotPlugin;
|
|
|
6
6
|
export type ChatbotPluginParams = RemoveInternal<Parameters<ChatbotPlugin>[0]>;
|
|
7
7
|
export type Chatbot = ReturnType<ReturnType<ChatbotPlugin>>;
|
|
8
8
|
export declare const chatbotPlugin: ({ _internal_domManager: dom, theme, }: {
|
|
9
|
-
geolocationApiKey?: string | undefined;
|
|
10
9
|
theme: {
|
|
11
10
|
/** Rotation for the hue. Between 0 and 360. */
|
|
12
11
|
hue: number;
|
|
13
12
|
/** Chroma multiplier. Values between 0 and 1.5 work best. */
|
|
14
13
|
chroma?: number;
|
|
14
|
+
mode: 'light' | 'dark';
|
|
15
15
|
};
|
|
16
16
|
/** @deprecated For internal usage only */
|
|
17
17
|
_internal_domManager?: {
|
|
18
|
-
getOrCreateChatbotElement: () =>
|
|
19
|
-
addStyle: (css: string, id: string) => void;
|
|
18
|
+
getOrCreateChatbotElement: () => HTMLElement;
|
|
20
19
|
} | undefined;
|
|
21
20
|
}) => ({ apiClient, logger, analytics }: {
|
|
22
21
|
apiClient: import("@inploi/sdk").ApiClient;
|
package/dist/chatbot.dom.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const createChatbotDomManager: () => {
|
|
2
|
-
getOrCreateChatbotElement: () =>
|
|
3
|
-
addStyle: (css: string, id: string) => void;
|
|
2
|
+
getOrCreateChatbotElement: () => HTMLElement;
|
|
4
3
|
};
|
|
5
4
|
export type ChatbotDomManager = ReturnType<typeof createChatbotDomManager>;
|
package/dist/chatbot.state.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Signal } from '@preact/signals';
|
|
2
2
|
import { JobApplication } from './chatbot.api';
|
|
3
3
|
import { DistributivePick } from './chatbot.utils';
|
|
4
|
-
import { ChatInput } from './
|
|
5
|
-
import { ChatbotInput } from './
|
|
4
|
+
import { ChatInput } from './components/chat-input/chat-input';
|
|
5
|
+
import { ChatbotInput } from './components/chat-input/chat-input';
|
|
6
6
|
export declare const getCacheKey: (application: JobApplication) => string;
|
|
7
7
|
export type ViewState = 'maximised' | 'minimised';
|
|
8
8
|
export declare const viewState: Signal<ViewState>;
|
package/dist/chatbot.utils.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FlowNode } from '@inploi/core/flows';
|
|
2
2
|
import { ApplicationSubmission, KeyToSubmissionMap } from './chatbot.state';
|
|
3
3
|
export type DistributivePick<T, K extends keyof T> = T extends unknown ? Pick<T, K> : never;
|
|
4
|
+
export declare const kbToReadableSize: (kb: number) => string;
|
|
4
5
|
export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
5
6
|
id: string;
|
|
6
7
|
data: {
|
|
@@ -20,8 +21,6 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
20
21
|
} | {
|
|
21
22
|
id: string;
|
|
22
23
|
data: {
|
|
23
|
-
type: "partial" | "full";
|
|
24
|
-
ats: "cornerstone";
|
|
25
24
|
integrationId: string;
|
|
26
25
|
};
|
|
27
26
|
type: "integration-application-submit";
|
|
@@ -160,14 +159,14 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
160
159
|
isHead?: boolean | undefined;
|
|
161
160
|
nextId?: string | undefined;
|
|
162
161
|
};
|
|
163
|
-
export declare const getApplicationSubmissionsPayload: (submissions: KeyToSubmissionMap) => Record<string, string | string[] | import("./
|
|
164
|
-
export declare const isSubmissionOfType: <T extends "boolean" | "text" | "multiple-choice" | "file">(type: T) => (submission?: ApplicationSubmission) => submission is Extract<Pick<import("./
|
|
162
|
+
export declare const getApplicationSubmissionsPayload: (submissions: KeyToSubmissionMap) => Record<string, string | string[] | import("./components/chat-input/chat-input.file").FileToUpload[] | null>;
|
|
163
|
+
export declare const isSubmissionOfType: <T extends "boolean" | "text" | "multiple-choice" | "file">(type: T) => (submission?: ApplicationSubmission) => submission is Extract<Pick<import("./components/chat-input/chat-input.text").TextPayload, "value" | "type">, {
|
|
165
164
|
type: T;
|
|
166
|
-
}> | Extract<Pick<import("./
|
|
165
|
+
}> | Extract<Pick<import("./components/chat-input/chat-input.multiple-choice").MultipleChoicePayload, "value" | "type">, {
|
|
167
166
|
type: T;
|
|
168
|
-
}> | Extract<Pick<import("./
|
|
167
|
+
}> | Extract<Pick<import("./components/chat-input/chat-input.boolean").BooleanChoicePayload, "value" | "type">, {
|
|
169
168
|
type: T;
|
|
170
|
-
}> | Extract<Pick<import("./
|
|
169
|
+
}> | Extract<Pick<import("./components/chat-input/chat-input.file").FilePayload, "value" | "type">, {
|
|
171
170
|
type: T;
|
|
172
171
|
}>;
|
|
173
172
|
export declare function gzip(string: string): string | Promise<string>;
|