@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/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: () => HTMLDivElement;
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;
@@ -1,5 +1,4 @@
1
1
  export declare const createChatbotDomManager: () => {
2
- getOrCreateChatbotElement: () => HTMLDivElement;
3
- addStyle: (css: string, id: string) => void;
2
+ getOrCreateChatbotElement: () => HTMLElement;
4
3
  };
5
4
  export type ChatbotDomManager = ReturnType<typeof createChatbotDomManager>;
@@ -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 './ui/chat-input/chat-input';
5
- import { ChatbotInput } from './ui/chat-input/chat-input';
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>;
@@ -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("./ui/chat-input/chat-input.file").FileToUpload[] | null>;
164
- export declare const isSubmissionOfType: <T extends "boolean" | "text" | "multiple-choice" | "file">(type: T) => (submission?: ApplicationSubmission) => submission is Extract<Pick<import("./ui/chat-input/chat-input.text").TextPayload, "value" | "type">, {
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("./ui/chat-input/chat-input.multiple-choice").MultipleChoicePayload, "value" | "type">, {
165
+ }> | Extract<Pick<import("./components/chat-input/chat-input.multiple-choice").MultipleChoicePayload, "value" | "type">, {
167
166
  type: T;
168
- }> | Extract<Pick<import("./ui/chat-input/chat-input.boolean").BooleanChoicePayload, "value" | "type">, {
167
+ }> | Extract<Pick<import("./components/chat-input/chat-input.boolean").BooleanChoicePayload, "value" | "type">, {
169
168
  type: T;
170
- }> | Extract<Pick<import("./ui/chat-input/chat-input.file").FilePayload, "value" | "type">, {
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>;