@pagelines/sdk 1.0.438 → 1.0.439
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/agent/AgentController.d.ts +67 -0
- package/dist/agent/index.d.ts +10 -0
- package/dist/agent/schema.d.ts +41 -0
- package/dist/agent/test/AgentController.test.d.ts +1 -0
- package/dist/agent/test/utils.test.d.ts +1 -0
- package/dist/agent/test/webhook.test.d.ts +1 -0
- package/dist/agent/ui/AgentChat.vue.d.ts +28 -0
- package/dist/agent/ui/AgentInputEmail.vue.d.ts +9 -0
- package/dist/agent/ui/AgentInputOneTimeCode.vue.d.ts +13 -0
- package/dist/agent/ui/AgentModal.vue.d.ts +16 -0
- package/dist/agent/ui/AgentProvider.vue.d.ts +23 -0
- package/dist/agent/ui/AgentSidebarClose.vue.d.ts +6 -0
- package/dist/agent/ui/AgentWidget.vue.d.ts +17 -0
- package/dist/agent/ui/AgentWrap.vue.d.ts +50 -0
- package/dist/agent/ui/ElAgentAbout.vue.d.ts +7 -0
- package/dist/agent/ui/ElAgentButton.vue.d.ts +26 -0
- package/dist/agent/ui/ElAgentChat.vue.d.ts +20 -0
- package/dist/agent/ui/ElAgentHeader.vue.d.ts +7 -0
- package/dist/agent/ui/ElAgentModeSidebar.vue.d.ts +11 -0
- package/dist/agent/ui/ElAgentSidebar.vue.d.ts +14 -0
- package/dist/agent/ui/ElAuthGate.vue.d.ts +6 -0
- package/dist/agent/ui/ElAuthPanel.vue.d.ts +6 -0
- package/dist/agent/ui/ElCreateAgent.vue.d.ts +190 -0
- package/dist/agent/ui/ElModeHeader.vue.d.ts +9 -0
- package/dist/agent/ui/ElProvisioningStatus.vue.d.ts +13 -0
- package/dist/agent/ui/ElSidebar.vue.d.ts +30 -0
- package/dist/agent/ui/ElTrialGate.vue.d.ts +6 -0
- package/dist/agent/utils.d.ts +35 -0
- package/dist/api.d.ts +28 -0
- package/dist/clients/AgentClient.d.ts +39 -0
- package/dist/clients/AuthClient.d.ts +23 -0
- package/dist/clients/BillingClient.d.ts +22 -0
- package/dist/clients/ChatClient.d.ts +59 -0
- package/dist/clients/UserClient.d.ts +18 -0
- package/dist/clients/types.d.ts +21 -0
- package/dist/constants/socialPlatforms.d.ts +10 -0
- package/dist/demo/index.d.ts +106 -0
- package/dist/index.d.ts +12 -0
- package/dist/sdkClient.d.ts +702 -0
- package/dist/sdkStorage.d.ts +39 -0
- package/dist/test/agent-client.test.d.ts +4 -0
- package/dist/test/api.test.d.ts +1 -0
- package/dist/test/billing-client.test.d.ts +4 -0
- package/dist/test/build.test.d.ts +1 -0
- package/dist/test/chat-authenticated.test.d.ts +1 -0
- package/dist/test/derive-mode.test.d.ts +1 -0
- package/dist/types/SDKAppType.stub.d.ts +6 -0
- package/dist/vite.config.sdk.d.ts +2 -0
- package/dist/vitest.config.d.ts +2 -0
- package/dist/widget/PLWidget.d.ts +64 -0
- package/dist/widget/composables/usePLWidget.d.ts +57 -0
- package/dist/widget/composables/useWidgetState.d.ts +286 -0
- package/dist/widget/index.d.ts +6 -0
- package/dist/widget/ui/AgentWidgetInline.vue.d.ts +17 -0
- package/dist/widget/ui/AgentWidgetModal.vue.d.ts +22 -0
- package/dist/widget/ui/AgentWidgetOnboard.vue.d.ts +7 -0
- package/dist/widget/ui/AgentWidgetPopup.vue.d.ts +22 -0
- package/package.json +1 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { AgentConfig, SettingsObject } from '@pagelines/core';
|
|
3
|
+
import { PageLinesSDK } from '../sdkClient';
|
|
4
|
+
import { AgentMode, ChatAttachment, ChatMessage, TextConnectionState, Agent } from './schema';
|
|
5
|
+
export type ChatStreamFn = (args: {
|
|
6
|
+
message: string;
|
|
7
|
+
attachments?: ChatAttachment[];
|
|
8
|
+
conversationId?: string;
|
|
9
|
+
history: Array<{
|
|
10
|
+
role: 'user' | 'assistant';
|
|
11
|
+
content: string;
|
|
12
|
+
}>;
|
|
13
|
+
onDelta: (text: string) => void;
|
|
14
|
+
onDone: (conversationId: string) => void;
|
|
15
|
+
onError: (error: string) => void;
|
|
16
|
+
onStatus?: (status: string) => void;
|
|
17
|
+
}) => Promise<void>;
|
|
18
|
+
type AgentChatControllerSettings = {
|
|
19
|
+
sdk?: PageLinesSDK;
|
|
20
|
+
agent: Agent | AgentConfig;
|
|
21
|
+
context?: string;
|
|
22
|
+
firstMessage?: string;
|
|
23
|
+
chatStreamFn?: ChatStreamFn;
|
|
24
|
+
};
|
|
25
|
+
/** @deprecated Use AgentChatControllerSettings */
|
|
26
|
+
export type AgentControllerSettings = AgentChatControllerSettings;
|
|
27
|
+
export declare class AgentChatController extends SettingsObject<AgentChatControllerSettings> {
|
|
28
|
+
private isTextMode;
|
|
29
|
+
private lastMessage;
|
|
30
|
+
private isConnecting;
|
|
31
|
+
private conversationId?;
|
|
32
|
+
textState: Ref<TextConnectionState>;
|
|
33
|
+
agentMode: Ref<AgentMode>;
|
|
34
|
+
sharedMessages: Ref<ChatMessage[]>;
|
|
35
|
+
private _agent;
|
|
36
|
+
constructor(settings: AgentChatControllerSettings);
|
|
37
|
+
get chatEnabled(): boolean;
|
|
38
|
+
get chatUnavailableReason(): string | undefined;
|
|
39
|
+
private mapChatError;
|
|
40
|
+
private isTransientError;
|
|
41
|
+
private isDuplicateMessage;
|
|
42
|
+
private addMessage;
|
|
43
|
+
getDynamicSettings(): {
|
|
44
|
+
context: string;
|
|
45
|
+
firstMessage: string;
|
|
46
|
+
};
|
|
47
|
+
private updateState;
|
|
48
|
+
private resetState;
|
|
49
|
+
private setupModeWatcher;
|
|
50
|
+
private handleError;
|
|
51
|
+
setMode(mode: AgentMode): Promise<void>;
|
|
52
|
+
startTextConversation(callbacks?: {
|
|
53
|
+
onConnect?: () => void;
|
|
54
|
+
}): Promise<void>;
|
|
55
|
+
endConversation(): Promise<void>;
|
|
56
|
+
sendChatMessage(message: string, attachments?: ChatAttachment[]): Promise<void>;
|
|
57
|
+
private buildHistory;
|
|
58
|
+
/** Seed the controller with previously-loaded messages (e.g. from a server thread). */
|
|
59
|
+
loadMessages(args: {
|
|
60
|
+
conversationId: string;
|
|
61
|
+
messages: ChatMessage[];
|
|
62
|
+
}): void;
|
|
63
|
+
/** Reset conversation state so the next message starts a fresh server session. */
|
|
64
|
+
resetConversation(): void;
|
|
65
|
+
destroy(): Promise<void>;
|
|
66
|
+
}
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as AgentChat } from './ui/AgentChat.vue';
|
|
2
|
+
import { default as AgentModal } from './ui/AgentModal.vue';
|
|
3
|
+
import { default as AgentProvider } from './ui/AgentProvider.vue';
|
|
4
|
+
import { default as AgentWidget } from './ui/AgentWidget.vue';
|
|
5
|
+
import { default as AgentWrap } from './ui/AgentWrap.vue';
|
|
6
|
+
import { default as ElAgentChat } from './ui/ElAgentChat.vue';
|
|
7
|
+
export { AgentChatController, AgentChatController as AgentController } from './AgentController';
|
|
8
|
+
export type { ChatStreamFn } from './AgentController';
|
|
9
|
+
export * from './schema';
|
|
10
|
+
export { AgentChat, AgentModal, AgentProvider, AgentWidget, AgentWrap, ElAgentChat };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export { Agent } from '@pagelines/core';
|
|
2
|
+
export type { AgentConfig } from '@pagelines/core';
|
|
3
|
+
export interface ChatAttachment {
|
|
4
|
+
type: 'image' | 'audio' | 'video' | 'file';
|
|
5
|
+
url: string;
|
|
6
|
+
name: string;
|
|
7
|
+
mimeType: string;
|
|
8
|
+
mediaId?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ChatMessage {
|
|
11
|
+
id: string;
|
|
12
|
+
text: string;
|
|
13
|
+
sender: 'user' | 'agent' | 'system';
|
|
14
|
+
timestamp: string;
|
|
15
|
+
attachments?: ChatAttachment[];
|
|
16
|
+
}
|
|
17
|
+
export interface TextConnectionState {
|
|
18
|
+
isActive: boolean;
|
|
19
|
+
isConnected: boolean;
|
|
20
|
+
isThinking: boolean;
|
|
21
|
+
connectionStatus: 'connecting' | 'connected' | 'disconnected' | 'error';
|
|
22
|
+
error?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const AGENT_MODES: readonly [{
|
|
25
|
+
readonly mode: "self";
|
|
26
|
+
readonly label: "Overview";
|
|
27
|
+
readonly icon: "i-tabler-user-square-rounded";
|
|
28
|
+
}, {
|
|
29
|
+
readonly mode: "talk";
|
|
30
|
+
readonly label: "Talk";
|
|
31
|
+
readonly icon: "i-tabler-phone";
|
|
32
|
+
}, {
|
|
33
|
+
readonly mode: "chat";
|
|
34
|
+
readonly label: "Chat";
|
|
35
|
+
readonly icon: "i-tabler-message-circle";
|
|
36
|
+
}, {
|
|
37
|
+
readonly mode: "info";
|
|
38
|
+
readonly label: "About";
|
|
39
|
+
readonly icon: "i-tabler-user-circle";
|
|
40
|
+
}];
|
|
41
|
+
export type AgentMode = (typeof AGENT_MODES)[number]['mode'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PageLinesSDK } from '../../sdkClient';
|
|
2
|
+
import { ButtonIconPreset } from '../../widget/PLWidget';
|
|
3
|
+
import { ColorName } from '@pagelines/core';
|
|
4
|
+
import { Agent } from '../schema';
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
sdk: PageLinesSDK;
|
|
7
|
+
agent: Agent;
|
|
8
|
+
context?: string;
|
|
9
|
+
firstMessage?: string;
|
|
10
|
+
buttonText?: string;
|
|
11
|
+
buttonIcon?: ButtonIconPreset;
|
|
12
|
+
hasClose?: boolean;
|
|
13
|
+
isActive?: boolean;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
theme?: ColorName;
|
|
16
|
+
requireAuth?: boolean;
|
|
17
|
+
chatOnly?: boolean;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
error: (message: string) => any;
|
|
21
|
+
close: (value: string) => any;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
|
+
onError?: ((message: string) => any) | undefined;
|
|
24
|
+
onClose?: ((value: string) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
26
|
+
rootElement: HTMLDivElement;
|
|
27
|
+
}, HTMLDivElement>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
5
|
+
"update:modelValue": (value: string) => any;
|
|
6
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLInputElement>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: string;
|
|
3
|
+
length: number;
|
|
4
|
+
focusFirst?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
+
"update:modelValue": (value: string) => any;
|
|
8
|
+
autoSubmit: (value: string) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
11
|
+
onAutoSubmit?: ((value: string) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PageLinesSDK } from '../../sdkClient';
|
|
2
|
+
import { AgentConfig } from '../schema';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
vis?: boolean;
|
|
5
|
+
sdk?: PageLinesSDK;
|
|
6
|
+
agent?: AgentConfig;
|
|
7
|
+
handle?: string;
|
|
8
|
+
context?: string;
|
|
9
|
+
firstMessage?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
"update:vis": (value: boolean) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:vis"?: ((value: boolean) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PageLinesSDK } from '../../sdkClient';
|
|
2
|
+
import { ButtonIconPreset } from '../../widget/PLWidget';
|
|
3
|
+
import { AgentConfig } from '../schema';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
sdk?: PageLinesSDK;
|
|
6
|
+
agent?: AgentConfig;
|
|
7
|
+
handle?: string;
|
|
8
|
+
context?: string;
|
|
9
|
+
firstMessage?: string;
|
|
10
|
+
buttonText?: string;
|
|
11
|
+
buttonIcon?: ButtonIconPreset;
|
|
12
|
+
hasClose?: boolean;
|
|
13
|
+
chatOnly?: boolean;
|
|
14
|
+
apiBase?: string;
|
|
15
|
+
};
|
|
16
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
+
error: (message: string) => any;
|
|
18
|
+
close: (value: string) => any;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
onError?: ((message: string) => any) | undefined;
|
|
21
|
+
onClose?: ((value: string) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
2
|
+
click: (event: MouseEvent) => any;
|
|
3
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLAnchorElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PageLinesSDK } from '../../sdkClient';
|
|
2
|
+
interface Props {
|
|
3
|
+
sdk?: PageLinesSDK;
|
|
4
|
+
handle: string;
|
|
5
|
+
context?: string;
|
|
6
|
+
firstMessage?: string;
|
|
7
|
+
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
8
|
+
}
|
|
9
|
+
declare function toggle(): void;
|
|
10
|
+
declare function open(): void;
|
|
11
|
+
declare function close(): void;
|
|
12
|
+
declare const _default: import('vue').DefineComponent<Props, {
|
|
13
|
+
toggle: typeof toggle;
|
|
14
|
+
open: typeof open;
|
|
15
|
+
close: typeof close;
|
|
16
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { AgentConfig } from '@pagelines/core';
|
|
2
|
+
import { PageLinesSDK } from '../../sdkClient';
|
|
3
|
+
import { ButtonIconPreset } from '../../widget/PLWidget';
|
|
4
|
+
import { Agent } from '../schema';
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
sdk?: PageLinesSDK;
|
|
7
|
+
agent?: AgentConfig;
|
|
8
|
+
handle?: string;
|
|
9
|
+
context?: string;
|
|
10
|
+
firstMessage?: string;
|
|
11
|
+
buttonText?: string;
|
|
12
|
+
buttonIcon?: ButtonIconPreset;
|
|
13
|
+
hasClose?: boolean;
|
|
14
|
+
apiBase?: string;
|
|
15
|
+
};
|
|
16
|
+
declare function __VLS_template(): {
|
|
17
|
+
attrs: Partial<{}>;
|
|
18
|
+
slots: Readonly<{
|
|
19
|
+
default: (props: {
|
|
20
|
+
sdk: PageLinesSDK;
|
|
21
|
+
agent: Agent;
|
|
22
|
+
context?: string;
|
|
23
|
+
firstMessage?: string;
|
|
24
|
+
buttonText?: string;
|
|
25
|
+
buttonIcon?: ButtonIconPreset;
|
|
26
|
+
loading: boolean;
|
|
27
|
+
}) => any;
|
|
28
|
+
}> & {
|
|
29
|
+
default: (props: {
|
|
30
|
+
sdk: PageLinesSDK;
|
|
31
|
+
agent: Agent;
|
|
32
|
+
context?: string;
|
|
33
|
+
firstMessage?: string;
|
|
34
|
+
buttonText?: string;
|
|
35
|
+
buttonIcon?: ButtonIconPreset;
|
|
36
|
+
loading: boolean;
|
|
37
|
+
}) => any;
|
|
38
|
+
};
|
|
39
|
+
refs: {};
|
|
40
|
+
rootEl: HTMLDivElement;
|
|
41
|
+
};
|
|
42
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
43
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
44
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
47
|
+
new (): {
|
|
48
|
+
$slots: S;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Agent } from '../schema';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
agent: Agent;
|
|
4
|
+
isOnline?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type ButtonTheme = 'primary' | 'green' | 'red' | 'default';
|
|
2
|
+
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
theme?: ButtonTheme;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
icon?: string;
|
|
8
|
+
iconAfter?: string;
|
|
9
|
+
};
|
|
10
|
+
declare function __VLS_template(): {
|
|
11
|
+
attrs: Partial<{}>;
|
|
12
|
+
slots: {
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: HTMLButtonElement;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AgentChatController } from '../AgentController';
|
|
2
|
+
import { ChatAttachment } from '../schema';
|
|
3
|
+
import { Agent } from '@pagelines/core';
|
|
4
|
+
type ChatScope = 'private' | 'org' | 'public';
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
chatController?: AgentChatController;
|
|
7
|
+
agent: Agent;
|
|
8
|
+
variant?: 'dark' | 'light';
|
|
9
|
+
uploadFn?: (file: File) => Promise<ChatAttachment>;
|
|
10
|
+
scope?: ChatScope;
|
|
11
|
+
scopeName?: string;
|
|
12
|
+
setupHint?: string;
|
|
13
|
+
emptyStateMessage?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
16
|
+
messagesContainer: HTMLDivElement;
|
|
17
|
+
fileInput: HTMLInputElement;
|
|
18
|
+
textarea: HTMLTextAreaElement;
|
|
19
|
+
}, any>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Agent } from '@pagelines/core';
|
|
2
|
+
interface Props {
|
|
3
|
+
agent: Agent;
|
|
4
|
+
isOnline?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AgentChatController } from '../AgentController';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue: boolean;
|
|
4
|
+
chatController?: AgentChatController;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: boolean) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PageLinesSDK } from '../../sdkClient';
|
|
2
|
+
import { Agent } from '../schema';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
modelValue: boolean;
|
|
5
|
+
agent: Agent;
|
|
6
|
+
sdk: PageLinesSDK;
|
|
7
|
+
title?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (value: boolean) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PageLinesSDK } from '../../sdkClient';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
sdk: PageLinesSDK;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PageLinesSDK } from '../../sdkClient';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
sdk: PageLinesSDK;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { PageLinesSDK } from '../../sdkClient';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
sdk: PageLinesSDK;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
created: (agent: {
|
|
7
|
+
agentId?: string | undefined;
|
|
8
|
+
handle?: string | undefined;
|
|
9
|
+
ownerId?: string | undefined;
|
|
10
|
+
orgId?: string | undefined;
|
|
11
|
+
name?: string | undefined;
|
|
12
|
+
emoji?: string | null | undefined;
|
|
13
|
+
title?: string | null | undefined;
|
|
14
|
+
summary?: string | null | undefined;
|
|
15
|
+
entityType?: string | undefined;
|
|
16
|
+
avatarId?: string | null | undefined;
|
|
17
|
+
coverId?: string | null | undefined;
|
|
18
|
+
avatar?: {
|
|
19
|
+
mediaId?: string | undefined;
|
|
20
|
+
userId?: string | undefined;
|
|
21
|
+
orgId?: string | undefined;
|
|
22
|
+
agentId?: string | null | undefined;
|
|
23
|
+
filename?: string | undefined;
|
|
24
|
+
mimeType?: string | undefined;
|
|
25
|
+
size?: number | undefined;
|
|
26
|
+
src?: string | undefined;
|
|
27
|
+
alt?: string | undefined;
|
|
28
|
+
context?: "avatar" | "cover" | "general" | undefined;
|
|
29
|
+
status?: "processing" | "active" | "failed" | "deleted" | undefined;
|
|
30
|
+
quality?: "high" | "low" | "standard" | undefined;
|
|
31
|
+
createdAt?: string | undefined;
|
|
32
|
+
updatedAt?: string | undefined;
|
|
33
|
+
mediaType?: "image" | "video" | "audio" | undefined;
|
|
34
|
+
className?: string | undefined;
|
|
35
|
+
width?: number | undefined;
|
|
36
|
+
height?: number | undefined;
|
|
37
|
+
duration?: number | undefined;
|
|
38
|
+
blurhash?: string | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
cover?: {
|
|
41
|
+
mediaId?: string | undefined;
|
|
42
|
+
userId?: string | undefined;
|
|
43
|
+
orgId?: string | undefined;
|
|
44
|
+
agentId?: string | null | undefined;
|
|
45
|
+
filename?: string | undefined;
|
|
46
|
+
mimeType?: string | undefined;
|
|
47
|
+
size?: number | undefined;
|
|
48
|
+
src?: string | undefined;
|
|
49
|
+
alt?: string | undefined;
|
|
50
|
+
context?: "avatar" | "cover" | "general" | undefined;
|
|
51
|
+
status?: "processing" | "active" | "failed" | "deleted" | undefined;
|
|
52
|
+
quality?: "high" | "low" | "standard" | undefined;
|
|
53
|
+
createdAt?: string | undefined;
|
|
54
|
+
updatedAt?: string | undefined;
|
|
55
|
+
mediaType?: "image" | "video" | "audio" | undefined;
|
|
56
|
+
className?: string | undefined;
|
|
57
|
+
width?: number | undefined;
|
|
58
|
+
height?: number | undefined;
|
|
59
|
+
duration?: number | undefined;
|
|
60
|
+
blurhash?: string | undefined;
|
|
61
|
+
} | undefined;
|
|
62
|
+
email?: string | null | undefined;
|
|
63
|
+
website?: string | null | undefined;
|
|
64
|
+
accounts?: {
|
|
65
|
+
platform: "email" | "website" | "linkedin" | "x" | "facebook" | "tiktok" | "youtube" | "github" | "instagram" | "threads" | "phone";
|
|
66
|
+
handle: string;
|
|
67
|
+
}[] | null | undefined;
|
|
68
|
+
model?: string | null | undefined;
|
|
69
|
+
lastActivityAt?: string | null | undefined;
|
|
70
|
+
lastMessageAt?: string | null | undefined;
|
|
71
|
+
instanceId?: string | null | undefined;
|
|
72
|
+
instanceProvider?: string | null | undefined;
|
|
73
|
+
imageVersion?: string | null | undefined;
|
|
74
|
+
deployEnv?: string | undefined;
|
|
75
|
+
runtime?: string | undefined;
|
|
76
|
+
consecutiveRestarts?: number | null | undefined;
|
|
77
|
+
lastRestartAt?: string | null | undefined;
|
|
78
|
+
botServerUrl?: string | null | undefined;
|
|
79
|
+
botLastPingAt?: string | null | undefined;
|
|
80
|
+
desiredStatus?: "active" | "stopped" | null | undefined;
|
|
81
|
+
botLastError?: string | null | undefined;
|
|
82
|
+
onboardedAt?: string | null | undefined;
|
|
83
|
+
org?: {
|
|
84
|
+
orgId: string;
|
|
85
|
+
handle: string;
|
|
86
|
+
name: string;
|
|
87
|
+
status: string;
|
|
88
|
+
headline?: string | undefined;
|
|
89
|
+
summary?: string | undefined;
|
|
90
|
+
} | undefined;
|
|
91
|
+
visibility?: "org" | "private" | "public" | undefined;
|
|
92
|
+
status?: string | undefined;
|
|
93
|
+
createdAt?: string | undefined;
|
|
94
|
+
updatedAt?: string | undefined;
|
|
95
|
+
isPrimary?: boolean | undefined;
|
|
96
|
+
}) => any;
|
|
97
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
98
|
+
onCreated?: ((agent: {
|
|
99
|
+
agentId?: string | undefined;
|
|
100
|
+
handle?: string | undefined;
|
|
101
|
+
ownerId?: string | undefined;
|
|
102
|
+
orgId?: string | undefined;
|
|
103
|
+
name?: string | undefined;
|
|
104
|
+
emoji?: string | null | undefined;
|
|
105
|
+
title?: string | null | undefined;
|
|
106
|
+
summary?: string | null | undefined;
|
|
107
|
+
entityType?: string | undefined;
|
|
108
|
+
avatarId?: string | null | undefined;
|
|
109
|
+
coverId?: string | null | undefined;
|
|
110
|
+
avatar?: {
|
|
111
|
+
mediaId?: string | undefined;
|
|
112
|
+
userId?: string | undefined;
|
|
113
|
+
orgId?: string | undefined;
|
|
114
|
+
agentId?: string | null | undefined;
|
|
115
|
+
filename?: string | undefined;
|
|
116
|
+
mimeType?: string | undefined;
|
|
117
|
+
size?: number | undefined;
|
|
118
|
+
src?: string | undefined;
|
|
119
|
+
alt?: string | undefined;
|
|
120
|
+
context?: "avatar" | "cover" | "general" | undefined;
|
|
121
|
+
status?: "processing" | "active" | "failed" | "deleted" | undefined;
|
|
122
|
+
quality?: "high" | "low" | "standard" | undefined;
|
|
123
|
+
createdAt?: string | undefined;
|
|
124
|
+
updatedAt?: string | undefined;
|
|
125
|
+
mediaType?: "image" | "video" | "audio" | undefined;
|
|
126
|
+
className?: string | undefined;
|
|
127
|
+
width?: number | undefined;
|
|
128
|
+
height?: number | undefined;
|
|
129
|
+
duration?: number | undefined;
|
|
130
|
+
blurhash?: string | undefined;
|
|
131
|
+
} | undefined;
|
|
132
|
+
cover?: {
|
|
133
|
+
mediaId?: string | undefined;
|
|
134
|
+
userId?: string | undefined;
|
|
135
|
+
orgId?: string | undefined;
|
|
136
|
+
agentId?: string | null | undefined;
|
|
137
|
+
filename?: string | undefined;
|
|
138
|
+
mimeType?: string | undefined;
|
|
139
|
+
size?: number | undefined;
|
|
140
|
+
src?: string | undefined;
|
|
141
|
+
alt?: string | undefined;
|
|
142
|
+
context?: "avatar" | "cover" | "general" | undefined;
|
|
143
|
+
status?: "processing" | "active" | "failed" | "deleted" | undefined;
|
|
144
|
+
quality?: "high" | "low" | "standard" | undefined;
|
|
145
|
+
createdAt?: string | undefined;
|
|
146
|
+
updatedAt?: string | undefined;
|
|
147
|
+
mediaType?: "image" | "video" | "audio" | undefined;
|
|
148
|
+
className?: string | undefined;
|
|
149
|
+
width?: number | undefined;
|
|
150
|
+
height?: number | undefined;
|
|
151
|
+
duration?: number | undefined;
|
|
152
|
+
blurhash?: string | undefined;
|
|
153
|
+
} | undefined;
|
|
154
|
+
email?: string | null | undefined;
|
|
155
|
+
website?: string | null | undefined;
|
|
156
|
+
accounts?: {
|
|
157
|
+
platform: "email" | "website" | "linkedin" | "x" | "facebook" | "tiktok" | "youtube" | "github" | "instagram" | "threads" | "phone";
|
|
158
|
+
handle: string;
|
|
159
|
+
}[] | null | undefined;
|
|
160
|
+
model?: string | null | undefined;
|
|
161
|
+
lastActivityAt?: string | null | undefined;
|
|
162
|
+
lastMessageAt?: string | null | undefined;
|
|
163
|
+
instanceId?: string | null | undefined;
|
|
164
|
+
instanceProvider?: string | null | undefined;
|
|
165
|
+
imageVersion?: string | null | undefined;
|
|
166
|
+
deployEnv?: string | undefined;
|
|
167
|
+
runtime?: string | undefined;
|
|
168
|
+
consecutiveRestarts?: number | null | undefined;
|
|
169
|
+
lastRestartAt?: string | null | undefined;
|
|
170
|
+
botServerUrl?: string | null | undefined;
|
|
171
|
+
botLastPingAt?: string | null | undefined;
|
|
172
|
+
desiredStatus?: "active" | "stopped" | null | undefined;
|
|
173
|
+
botLastError?: string | null | undefined;
|
|
174
|
+
onboardedAt?: string | null | undefined;
|
|
175
|
+
org?: {
|
|
176
|
+
orgId: string;
|
|
177
|
+
handle: string;
|
|
178
|
+
name: string;
|
|
179
|
+
status: string;
|
|
180
|
+
headline?: string | undefined;
|
|
181
|
+
summary?: string | undefined;
|
|
182
|
+
} | undefined;
|
|
183
|
+
visibility?: "org" | "private" | "public" | undefined;
|
|
184
|
+
status?: string | undefined;
|
|
185
|
+
createdAt?: string | undefined;
|
|
186
|
+
updatedAt?: string | undefined;
|
|
187
|
+
isPrimary?: boolean | undefined;
|
|
188
|
+
}) => any) | undefined;
|
|
189
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
190
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Agent } from '@pagelines/core';
|
|
2
|
+
interface Props {
|
|
3
|
+
agent: Agent;
|
|
4
|
+
size?: 'md' | 'lg';
|
|
5
|
+
isOnline?: boolean;
|
|
6
|
+
layout?: 'centered' | 'horizontal';
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PageLinesSDK } from '../../sdkClient';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
sdk: PageLinesSDK;
|
|
4
|
+
agentId: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
error: (message: string) => any;
|
|
8
|
+
ready: () => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onError?: ((message: string) => any) | undefined;
|
|
11
|
+
onReady?: (() => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|