@n8n/chat 0.5.2 → 0.6.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.
- package/README.md +6 -0
- package/chat.bundle.es.js +670 -677
- package/chat.bundle.umd.js +10 -10
- package/chat.es.js +6864 -0
- package/chat.umd.js +18 -0
- package/package.json +9 -40
- package/types/src/App.vue.d.ts +0 -8
- package/types/src/__stories__/App.stories.d.ts +0 -17
- package/types/src/__tests__/index.spec.d.ts +0 -1
- package/types/src/__tests__/setup.d.ts +0 -0
- package/types/src/__tests__/utils/create.d.ts +0 -5
- package/types/src/__tests__/utils/fetch.d.ts +0 -4
- package/types/src/__tests__/utils/index.d.ts +0 -3
- package/types/src/__tests__/utils/selectors.d.ts +0 -12
- package/types/src/api/generic.d.ts +0 -6
- package/types/src/api/index.d.ts +0 -2
- package/types/src/api/message.d.ts +0 -3
- package/types/src/components/Button.vue.d.ts +0 -9
- package/types/src/components/Chat.vue.d.ts +0 -2
- package/types/src/components/ChatWindow.vue.d.ts +0 -2
- package/types/src/components/GetStarted.vue.d.ts +0 -2
- package/types/src/components/GetStartedFooter.vue.d.ts +0 -2
- package/types/src/components/Input.vue.d.ts +0 -2
- package/types/src/components/Layout.vue.d.ts +0 -11
- package/types/src/components/Message.vue.d.ts +0 -21
- package/types/src/components/MessageTyping.vue.d.ts +0 -15
- package/types/src/components/MessagesList.vue.d.ts +0 -14
- package/types/src/components/PoweredBy.vue.d.ts +0 -2
- package/types/src/components/index.d.ts +0 -10
- package/types/src/composables/index.d.ts +0 -3
- package/types/src/composables/useChat.d.ts +0 -2
- package/types/src/composables/useI18n.d.ts +0 -4
- package/types/src/composables/useOptions.d.ts +0 -4
- package/types/src/constants/defaults.d.ts +0 -3
- package/types/src/constants/index.d.ts +0 -3
- package/types/src/constants/localStorage.d.ts +0 -2
- package/types/src/constants/symbols.d.ts +0 -4
- package/types/src/event-buses/chatEventBus.d.ts +0 -1
- package/types/src/event-buses/index.d.ts +0 -1
- package/types/src/index.d.ts +0 -2
- package/types/src/plugins/chat.d.ts +0 -3
- package/types/src/plugins/index.d.ts +0 -1
- package/types/src/types/chat.d.ts +0 -11
- package/types/src/types/index.d.ts +0 -4
- package/types/src/types/messages.d.ts +0 -6
- package/types/src/types/options.d.ts +0 -25
- package/types/src/types/webhook.d.ts +0 -15
- package/types/src/utils/event-bus.d.ts +0 -8
- package/types/src/utils/index.d.ts +0 -2
- package/types/src/utils/mount.d.ts +0 -1
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
|
2
|
-
default?(_: {}): any;
|
|
3
|
-
}>;
|
|
4
|
-
export default _default;
|
|
5
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
6
|
-
new (): {
|
|
7
|
-
$slots: S;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
|
2
|
-
header?(_: {}): any;
|
|
3
|
-
default?(_: {}): any;
|
|
4
|
-
footer?(_: {}): any;
|
|
5
|
-
}>;
|
|
6
|
-
export default _default;
|
|
7
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
8
|
-
new (): {
|
|
9
|
-
$slots: S;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ChatMessage } from '../types';
|
|
2
|
-
import type { PropType } from 'vue';
|
|
3
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
4
|
-
message: {
|
|
5
|
-
type: PropType<ChatMessage>;
|
|
6
|
-
required: true;
|
|
7
|
-
};
|
|
8
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
-
message: {
|
|
10
|
-
type: PropType<ChatMessage>;
|
|
11
|
-
required: true;
|
|
12
|
-
};
|
|
13
|
-
}>>, {}, {}>, {
|
|
14
|
-
default?(_: {}): any;
|
|
15
|
-
}>;
|
|
16
|
-
export default _default;
|
|
17
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
-
new (): {
|
|
19
|
-
$slots: S;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { PropType } from 'vue';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
animation: {
|
|
4
|
-
type: PropType<"bouncing" | "scaling">;
|
|
5
|
-
default: string;
|
|
6
|
-
};
|
|
7
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
-
animation: {
|
|
9
|
-
type: PropType<"bouncing" | "scaling">;
|
|
10
|
-
default: string;
|
|
11
|
-
};
|
|
12
|
-
}>>, {
|
|
13
|
-
animation: "bouncing" | "scaling";
|
|
14
|
-
}, {}>;
|
|
15
|
-
export default _default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { PropType } from 'vue';
|
|
2
|
-
import type { ChatMessage } from '../types';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
|
4
|
-
messages: {
|
|
5
|
-
type: PropType<ChatMessage[]>;
|
|
6
|
-
required: true;
|
|
7
|
-
};
|
|
8
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
-
messages: {
|
|
10
|
-
type: PropType<ChatMessage[]>;
|
|
11
|
-
required: true;
|
|
12
|
-
};
|
|
13
|
-
}>>, {}, {}>;
|
|
14
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './Button.vue';
|
|
2
|
-
export { default as Chat } from './Chat.vue';
|
|
3
|
-
export { default as ChatWindow } from './ChatWindow.vue';
|
|
4
|
-
export { default as GetStarted } from './GetStarted.vue';
|
|
5
|
-
export { default as GetStartedFooter } from './GetStartedFooter.vue';
|
|
6
|
-
export { default as Input } from './Input.vue';
|
|
7
|
-
export { default as Layout } from './Layout.vue';
|
|
8
|
-
export { default as Message } from './Message.vue';
|
|
9
|
-
export { default as MessagesList } from './MessagesList.vue';
|
|
10
|
-
export { default as PoweredBy } from './PoweredBy.vue';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const chatEventBus: import('../utils').EventBus;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './chatEventBus';
|
package/types/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './chat';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ChatMessage } from '../types/messages';
|
|
2
|
-
import type { Ref } from 'vue';
|
|
3
|
-
export interface Chat {
|
|
4
|
-
initialMessages: Ref<ChatMessage[]>;
|
|
5
|
-
messages: Ref<ChatMessage[]>;
|
|
6
|
-
currentSessionId: Ref<string | null>;
|
|
7
|
-
waitingForResponse: Ref<boolean>;
|
|
8
|
-
loadPreviousSession: () => Promise<string | undefined>;
|
|
9
|
-
startNewSession: () => Promise<void>;
|
|
10
|
-
sendMessage: (text: string) => Promise<void>;
|
|
11
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface ChatOptions {
|
|
2
|
-
webhookUrl: string;
|
|
3
|
-
webhookConfig?: {
|
|
4
|
-
method?: 'GET' | 'POST';
|
|
5
|
-
headers?: Record<string, string>;
|
|
6
|
-
};
|
|
7
|
-
target?: string | Element;
|
|
8
|
-
mode?: 'window' | 'fullscreen';
|
|
9
|
-
showWelcomeScreen?: boolean;
|
|
10
|
-
loadPreviousSession?: boolean;
|
|
11
|
-
chatInputKey?: string;
|
|
12
|
-
chatSessionKey?: string;
|
|
13
|
-
defaultLanguage?: 'en';
|
|
14
|
-
initialMessages?: string[];
|
|
15
|
-
metadata?: Record<string, unknown>;
|
|
16
|
-
i18n: Record<string, {
|
|
17
|
-
title: string;
|
|
18
|
-
subtitle: string;
|
|
19
|
-
footer: string;
|
|
20
|
-
getStarted: string;
|
|
21
|
-
inputPlaceholder: string;
|
|
22
|
-
[message: string]: string;
|
|
23
|
-
}>;
|
|
24
|
-
theme?: {};
|
|
25
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface LoadPreviousSessionResponseItem {
|
|
2
|
-
id: string[];
|
|
3
|
-
kwargs: {
|
|
4
|
-
content: string;
|
|
5
|
-
additional_kwargs: Record<string, unknown>;
|
|
6
|
-
};
|
|
7
|
-
lc: number;
|
|
8
|
-
type: string;
|
|
9
|
-
}
|
|
10
|
-
export interface LoadPreviousSessionResponse {
|
|
11
|
-
data: LoadPreviousSessionResponseItem[];
|
|
12
|
-
}
|
|
13
|
-
export interface SendMessageResponse {
|
|
14
|
-
output: string;
|
|
15
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type CallbackFn = Function;
|
|
2
|
-
export type UnregisterFn = () => void;
|
|
3
|
-
export interface EventBus {
|
|
4
|
-
on: (eventName: string, fn: CallbackFn) => UnregisterFn;
|
|
5
|
-
off: (eventName: string, fn: CallbackFn) => void;
|
|
6
|
-
emit: <T = Event>(eventName: string, event?: T) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare function createEventBus(): EventBus;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function createDefaultMountingTarget(mountingTarget: string): void;
|