@lilaquadrat/chat 0.1.6 → 0.1.8
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/studio-chat-module.js +0 -1
- package/dist/studio-chat-module.umd.cjs +1 -1
- package/dist/types/src/composables/useChatVisibility.d.ts +7 -1
- package/dist/types/src/config/bootstrap.d.ts +8 -0
- package/dist/types/src/helpers/participants.d.ts +1 -1
- package/dist/types/src/helpers/rights.d.ts +19 -0
- package/dist/types/src/helpers/sounds.d.ts +8 -0
- package/dist/types/src/libs/StudioSDK.d.ts +10 -0
- package/dist/types/src/locales/de.d.ts +37 -5
- package/dist/types/src/locales/en.d.ts +37 -5
- package/dist/types/src/plugins/i18n.d.ts +37 -5
- package/dist/types/src/standalone/settings.d.ts +4 -0
- package/dist/types/src/stores/conversations.store.d.ts +14 -2
- package/dist/types/src/stores/main.store.d.ts +90 -27
- package/dist/types/tsconfig.build.tsbuildinfo +1 -1
- package/dist/wc/lilaquadrat-studio-chat.js +9 -19253
- package/dist/wc/lilaquadrat-studio-chat.umd.cjs +1 -43
- package/package.json +5 -5
- package/dist/settings/settings.example.json +0 -17
- package/dist/wc/settings/settings.example.json +0 -17
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(n){"function"==typeof define&&define.amd
|
|
1
|
+
!function(n){"function"==typeof define&&define.amd&&define([],n)}(function(){});
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
/**
|
|
3
3
|
* tracks whether the chat is actually visible to the user:
|
|
4
|
-
* - the element must intersect the viewport (catches display:none
|
|
4
|
+
* - the element must intersect the viewport (catches display:none, collapsed hosts, and a
|
|
5
|
+
* host that parks the widget off screen — the supported way to hide an embedded instance)
|
|
5
6
|
* - the tab must be in the foreground
|
|
6
7
|
* - in compact mode no left panel may overlay the chat (occlusion is not detectable
|
|
7
8
|
* cross-browser, so our own overlay state is checked explicitly)
|
|
9
|
+
*
|
|
10
|
+
* Purely visual hiding — `opacity: 0` — is deliberately NOT detected: no observer reports it
|
|
11
|
+
* and probing for it means walking every ancestor's computed style on each check. Hosts hide
|
|
12
|
+
* the widget by moving it out of the viewport (or `display: none`) instead.
|
|
8
13
|
*/
|
|
9
14
|
export declare function useChatVisibility(element: Ref<HTMLElement | undefined>): {
|
|
10
15
|
chatVisible: import("vue").ComputedRef<boolean>;
|
|
16
|
+
isVisibleNow: () => boolean;
|
|
11
17
|
};
|
|
12
18
|
export default useChatVisibility;
|
|
@@ -44,6 +44,14 @@ export interface ChatModuleConfig {
|
|
|
44
44
|
}) => void;
|
|
45
45
|
/** called when the close button in the header is clicked */
|
|
46
46
|
close?: () => void;
|
|
47
|
+
/**
|
|
48
|
+
* notification sounds. On at full volume by default; `false` silences them.
|
|
49
|
+
* A sound is only played for remote events the user cannot currently see.
|
|
50
|
+
*/
|
|
51
|
+
sound?: boolean | {
|
|
52
|
+
enabled?: boolean;
|
|
53
|
+
volume?: number;
|
|
54
|
+
};
|
|
47
55
|
/** the host's auth token (Auth0 JWT). Identity is derived from its `sub`; sent as Bearer + WS auth. */
|
|
48
56
|
token?: string;
|
|
49
57
|
/**
|
|
@@ -21,5 +21,5 @@ export type Participant = string | ParticipantUser;
|
|
|
21
21
|
export declare function participantId(participant: Participant): string;
|
|
22
22
|
/** map a participant list to its ids (e.g. before sending to the backend) */
|
|
23
23
|
export declare function participantIds(participants?: Participant[]): string[];
|
|
24
|
-
/** human-readable name:
|
|
24
|
+
/** human-readable name: "lastname, prename", else host name, else the raw id */
|
|
25
25
|
export declare function participantName(participant: Participant): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ConversationRightsSource {
|
|
2
|
+
isNew?: boolean;
|
|
3
|
+
participant?: {
|
|
4
|
+
state?: string;
|
|
5
|
+
rights?: string[];
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
type Conversation = ConversationRightsSource | null | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* still a member? drafts count, every non-active backend state does not — the server
|
|
11
|
+
* knows 'active' | 'left' | 'removed' | 'blocked' | 'deleted' and keeps only 'active'
|
|
12
|
+
* participants in `conversation.participants` (see participants.service).
|
|
13
|
+
* A missing state means the payload does not track it — treated as a member, the
|
|
14
|
+
* rights check below still applies.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isActiveParticipant(conversation: Conversation): boolean;
|
|
17
|
+
/** membership plus the named right ('read' | 'write' | 'rename' | 'participants' | 'block') */
|
|
18
|
+
export declare function can(conversation: Conversation, right: string): boolean;
|
|
19
|
+
export default can;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type SoundName = 'new-message' | 'new-conversation';
|
|
2
|
+
/**
|
|
3
|
+
* Play a notification sound. Never throws and never rejects: browsers refuse audio until
|
|
4
|
+
* the page has seen a user gesture, and a machine without an output device rejects too —
|
|
5
|
+
* neither is worth surfacing for something purely decorative.
|
|
6
|
+
*/
|
|
7
|
+
export declare function playSound(name: SoundName, volume?: number): void;
|
|
8
|
+
export default playSound;
|
|
@@ -78,6 +78,11 @@ export default class StudioSDK {
|
|
|
78
78
|
static handleCall<T, D = any>(call: AxiosRequestConfig<D>, options?: SDKCallOptions): Promise<SDKResponse<T>>;
|
|
79
79
|
static cache<T>(url: string, response?: AxiosResponse<T>, options?: SDKCallOptions): SDKResponse<any> & SDKCache;
|
|
80
80
|
static flushCache(group?: string, action?: string): void;
|
|
81
|
+
/**
|
|
82
|
+
* one id can hold several entries (one per query string, e.g. every `beforeId` page of a
|
|
83
|
+
* conversation), so flushing has to drop all of them — otherwise a new message would only
|
|
84
|
+
* invalidate the page whose url happened to match.
|
|
85
|
+
*/
|
|
81
86
|
static flushId(id: string): void;
|
|
82
87
|
conversations: {
|
|
83
88
|
list: () => Promise<SDKResponse<any>>;
|
|
@@ -88,6 +93,11 @@ export default class StudioSDK {
|
|
|
88
93
|
rename: (conversationId: string, name: string) => Promise<SDKResponse<any>>;
|
|
89
94
|
participants: (conversationId: string, add: string[], remove: string[]) => Promise<SDKResponse<any>>;
|
|
90
95
|
leave: (conversationId: string) => Promise<SDKResponse<any>>;
|
|
96
|
+
/**
|
|
97
|
+
* POST, not DELETE: this removes the conversation for the CALLER only (their participant
|
|
98
|
+
* state goes to 'deleted' server-side), it does not delete the resource for everyone.
|
|
99
|
+
*/
|
|
100
|
+
delete: (conversationId: string) => Promise<SDKResponse<any>>;
|
|
91
101
|
listParticipants: (conversationId: string) => Promise<SDKResponse<any>>;
|
|
92
102
|
rights: (conversationId: string, user: string, rights: string[]) => Promise<SDKResponse<any>>;
|
|
93
103
|
block: (conversationId: string, user: string, block: boolean) => Promise<SDKResponse<any>>;
|
|
@@ -3,40 +3,72 @@ declare const _default: {
|
|
|
3
3
|
connected: string;
|
|
4
4
|
disconnected: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
retry: string;
|
|
8
|
-
};
|
|
6
|
+
retry: string;
|
|
9
7
|
'new chat': string;
|
|
10
8
|
conversations: string;
|
|
11
9
|
'contact support': string;
|
|
12
10
|
support: string;
|
|
13
11
|
options: string;
|
|
12
|
+
actions: string;
|
|
14
13
|
mute: string;
|
|
15
14
|
delete: string;
|
|
16
15
|
leave: string;
|
|
17
16
|
'leave now': string;
|
|
17
|
+
'delete now': string;
|
|
18
18
|
'select contacts': string;
|
|
19
19
|
'conversation options': string;
|
|
20
20
|
'save edits': string;
|
|
21
21
|
'cancel edits': string;
|
|
22
|
-
|
|
22
|
+
abandon: string;
|
|
23
|
+
close: string;
|
|
24
|
+
rights: string;
|
|
25
|
+
members: string;
|
|
26
|
+
'update members': string;
|
|
23
27
|
read: string;
|
|
24
28
|
write: string;
|
|
25
29
|
rename: string;
|
|
30
|
+
save: string;
|
|
31
|
+
'conversation name': string;
|
|
32
|
+
'you left this conversation': string;
|
|
26
33
|
participants: string;
|
|
27
|
-
members: string;
|
|
34
|
+
'filter members': string;
|
|
35
|
+
'filter contacts': string;
|
|
36
|
+
'member count': string;
|
|
37
|
+
'created at': string;
|
|
38
|
+
'last activity': string;
|
|
39
|
+
messages: string;
|
|
28
40
|
accept: string;
|
|
29
41
|
decline: string;
|
|
42
|
+
'confirm action': string;
|
|
30
43
|
block: string;
|
|
31
44
|
unblock: string;
|
|
45
|
+
dismiss: string;
|
|
46
|
+
errors: {
|
|
47
|
+
unknown: string;
|
|
48
|
+
RATE_LIMIT_EXCEEDED: string;
|
|
49
|
+
NOT_ALLOWED: string;
|
|
50
|
+
ACTION_NOT_ALLOWED: string;
|
|
51
|
+
NOT_A_CONTACT: string;
|
|
52
|
+
CONVERSATION_NOT_FOUND: string;
|
|
53
|
+
CONVERSATION_ALREADY_EXISTS: string;
|
|
54
|
+
MIN_PARTICIPANTS: string;
|
|
55
|
+
CONTACT_NOT_FOUND: string;
|
|
56
|
+
CANNOT_BLOCK_SELF: string;
|
|
57
|
+
UNKNOWN_MESSAGE_TYPE: string;
|
|
58
|
+
INVALID_LAST_READ_ID: string;
|
|
59
|
+
INTERNAL_ERROR: string;
|
|
60
|
+
};
|
|
32
61
|
system: {
|
|
33
62
|
renamed: string;
|
|
34
63
|
created: string;
|
|
35
64
|
left: string;
|
|
65
|
+
blocked: string;
|
|
66
|
+
unblocked: string;
|
|
36
67
|
participants: {
|
|
37
68
|
addedAndRemoved: string;
|
|
38
69
|
added: string;
|
|
39
70
|
removed: string;
|
|
71
|
+
updated: string;
|
|
40
72
|
};
|
|
41
73
|
};
|
|
42
74
|
};
|
|
@@ -3,40 +3,72 @@ declare const _default: {
|
|
|
3
3
|
connected: string;
|
|
4
4
|
disconnected: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
retry: string;
|
|
8
|
-
};
|
|
6
|
+
retry: string;
|
|
9
7
|
'new chat': string;
|
|
10
8
|
conversations: string;
|
|
11
9
|
'contact support': string;
|
|
12
10
|
support: string;
|
|
13
11
|
options: string;
|
|
12
|
+
actions: string;
|
|
14
13
|
mute: string;
|
|
15
14
|
delete: string;
|
|
16
15
|
leave: string;
|
|
17
16
|
'leave now': string;
|
|
17
|
+
'delete now': string;
|
|
18
18
|
'select contacts': string;
|
|
19
19
|
'conversation options': string;
|
|
20
20
|
'save edits': string;
|
|
21
21
|
'cancel edits': string;
|
|
22
|
-
|
|
22
|
+
abandon: string;
|
|
23
|
+
close: string;
|
|
24
|
+
rights: string;
|
|
25
|
+
members: string;
|
|
26
|
+
'update members': string;
|
|
23
27
|
read: string;
|
|
24
28
|
write: string;
|
|
25
29
|
rename: string;
|
|
30
|
+
save: string;
|
|
31
|
+
'conversation name': string;
|
|
32
|
+
'you left this conversation': string;
|
|
26
33
|
participants: string;
|
|
27
|
-
members: string;
|
|
34
|
+
'filter members': string;
|
|
35
|
+
'filter contacts': string;
|
|
36
|
+
'member count': string;
|
|
37
|
+
'created at': string;
|
|
38
|
+
'last activity': string;
|
|
39
|
+
messages: string;
|
|
28
40
|
accept: string;
|
|
29
41
|
decline: string;
|
|
42
|
+
'confirm action': string;
|
|
30
43
|
block: string;
|
|
31
44
|
unblock: string;
|
|
45
|
+
dismiss: string;
|
|
46
|
+
errors: {
|
|
47
|
+
unknown: string;
|
|
48
|
+
RATE_LIMIT_EXCEEDED: string;
|
|
49
|
+
NOT_ALLOWED: string;
|
|
50
|
+
ACTION_NOT_ALLOWED: string;
|
|
51
|
+
NOT_A_CONTACT: string;
|
|
52
|
+
CONVERSATION_NOT_FOUND: string;
|
|
53
|
+
CONVERSATION_ALREADY_EXISTS: string;
|
|
54
|
+
MIN_PARTICIPANTS: string;
|
|
55
|
+
CONTACT_NOT_FOUND: string;
|
|
56
|
+
CANNOT_BLOCK_SELF: string;
|
|
57
|
+
UNKNOWN_MESSAGE_TYPE: string;
|
|
58
|
+
INVALID_LAST_READ_ID: string;
|
|
59
|
+
INTERNAL_ERROR: string;
|
|
60
|
+
};
|
|
32
61
|
system: {
|
|
33
62
|
renamed: string;
|
|
34
63
|
created: string;
|
|
35
64
|
left: string;
|
|
65
|
+
blocked: string;
|
|
66
|
+
unblocked: string;
|
|
36
67
|
participants: {
|
|
37
68
|
addedAndRemoved: string;
|
|
38
69
|
added: string;
|
|
39
70
|
removed: string;
|
|
71
|
+
updated: string;
|
|
40
72
|
};
|
|
41
73
|
};
|
|
42
74
|
};
|
|
@@ -7,40 +7,72 @@ declare const i18n: import("vue-i18n").I18n<{
|
|
|
7
7
|
connected: string;
|
|
8
8
|
disconnected: string;
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
retry: string;
|
|
12
|
-
};
|
|
10
|
+
retry: string;
|
|
13
11
|
'new chat': string;
|
|
14
12
|
conversations: string;
|
|
15
13
|
'contact support': string;
|
|
16
14
|
support: string;
|
|
17
15
|
options: string;
|
|
16
|
+
actions: string;
|
|
18
17
|
mute: string;
|
|
19
18
|
delete: string;
|
|
20
19
|
leave: string;
|
|
21
20
|
'leave now': string;
|
|
21
|
+
'delete now': string;
|
|
22
22
|
'select contacts': string;
|
|
23
23
|
'conversation options': string;
|
|
24
24
|
'save edits': string;
|
|
25
25
|
'cancel edits': string;
|
|
26
|
-
|
|
26
|
+
abandon: string;
|
|
27
|
+
close: string;
|
|
28
|
+
rights: string;
|
|
29
|
+
members: string;
|
|
30
|
+
'update members': string;
|
|
27
31
|
read: string;
|
|
28
32
|
write: string;
|
|
29
33
|
rename: string;
|
|
34
|
+
save: string;
|
|
35
|
+
'conversation name': string;
|
|
36
|
+
'you left this conversation': string;
|
|
30
37
|
participants: string;
|
|
31
|
-
members: string;
|
|
38
|
+
'filter members': string;
|
|
39
|
+
'filter contacts': string;
|
|
40
|
+
'member count': string;
|
|
41
|
+
'created at': string;
|
|
42
|
+
'last activity': string;
|
|
43
|
+
messages: string;
|
|
32
44
|
accept: string;
|
|
33
45
|
decline: string;
|
|
46
|
+
'confirm action': string;
|
|
34
47
|
block: string;
|
|
35
48
|
unblock: string;
|
|
49
|
+
dismiss: string;
|
|
50
|
+
errors: {
|
|
51
|
+
unknown: string;
|
|
52
|
+
RATE_LIMIT_EXCEEDED: string;
|
|
53
|
+
NOT_ALLOWED: string;
|
|
54
|
+
ACTION_NOT_ALLOWED: string;
|
|
55
|
+
NOT_A_CONTACT: string;
|
|
56
|
+
CONVERSATION_NOT_FOUND: string;
|
|
57
|
+
CONVERSATION_ALREADY_EXISTS: string;
|
|
58
|
+
MIN_PARTICIPANTS: string;
|
|
59
|
+
CONTACT_NOT_FOUND: string;
|
|
60
|
+
CANNOT_BLOCK_SELF: string;
|
|
61
|
+
UNKNOWN_MESSAGE_TYPE: string;
|
|
62
|
+
INVALID_LAST_READ_ID: string;
|
|
63
|
+
INTERNAL_ERROR: string;
|
|
64
|
+
};
|
|
36
65
|
system: {
|
|
37
66
|
renamed: string;
|
|
38
67
|
created: string;
|
|
39
68
|
left: string;
|
|
69
|
+
blocked: string;
|
|
70
|
+
unblocked: string;
|
|
40
71
|
participants: {
|
|
41
72
|
addedAndRemoved: string;
|
|
42
73
|
added: string;
|
|
43
74
|
removed: string;
|
|
75
|
+
updated: string;
|
|
44
76
|
};
|
|
45
77
|
};
|
|
46
78
|
};
|
|
@@ -48,7 +48,11 @@ export declare const useConversationsStore: import("pinia").StoreDefinition<"con
|
|
|
48
48
|
executeParticipantsEdit: (conversation: string, add: string[], remove: string[]) => Promise<import("@/libs/StudioSDK").SDKResponse<any>>;
|
|
49
49
|
updateConversationParticipant: (conversation: string, state: string) => void;
|
|
50
50
|
leave: (conversation: string) => Promise<import("@/libs/StudioSDK").SDKResponse<any>>;
|
|
51
|
-
|
|
51
|
+
deleteConversation: (conversation: string) => Promise<void>;
|
|
52
|
+
lastActiveConversation: import("vue").Ref<any, any>;
|
|
53
|
+
activateLastConversation: () => void;
|
|
54
|
+
readLastActiveConversation: () => void;
|
|
55
|
+
}, "conversations" | "typing" | "activeConversation" | "lastActiveConversation">, Pick<{
|
|
52
56
|
getAllConversations: () => Promise<void>;
|
|
53
57
|
refreshConversations: () => Promise<void>;
|
|
54
58
|
handleReconnect: () => Promise<void>;
|
|
@@ -94,6 +98,10 @@ export declare const useConversationsStore: import("pinia").StoreDefinition<"con
|
|
|
94
98
|
executeParticipantsEdit: (conversation: string, add: string[], remove: string[]) => Promise<import("@/libs/StudioSDK").SDKResponse<any>>;
|
|
95
99
|
updateConversationParticipant: (conversation: string, state: string) => void;
|
|
96
100
|
leave: (conversation: string) => Promise<import("@/libs/StudioSDK").SDKResponse<any>>;
|
|
101
|
+
deleteConversation: (conversation: string) => Promise<void>;
|
|
102
|
+
lastActiveConversation: import("vue").Ref<any, any>;
|
|
103
|
+
activateLastConversation: () => void;
|
|
104
|
+
readLastActiveConversation: () => void;
|
|
97
105
|
}, "unreadConversations" | "totalUnreadCount" | "totalUnreadConversations">, Pick<{
|
|
98
106
|
getAllConversations: () => Promise<void>;
|
|
99
107
|
refreshConversations: () => Promise<void>;
|
|
@@ -140,5 +148,9 @@ export declare const useConversationsStore: import("pinia").StoreDefinition<"con
|
|
|
140
148
|
executeParticipantsEdit: (conversation: string, add: string[], remove: string[]) => Promise<import("@/libs/StudioSDK").SDKResponse<any>>;
|
|
141
149
|
updateConversationParticipant: (conversation: string, state: string) => void;
|
|
142
150
|
leave: (conversation: string) => Promise<import("@/libs/StudioSDK").SDKResponse<any>>;
|
|
143
|
-
|
|
151
|
+
deleteConversation: (conversation: string) => Promise<void>;
|
|
152
|
+
lastActiveConversation: import("vue").Ref<any, any>;
|
|
153
|
+
activateLastConversation: () => void;
|
|
154
|
+
readLastActiveConversation: () => void;
|
|
155
|
+
}, "leave" | "rename" | "getAllConversations" | "refreshConversations" | "handleReconnect" | "setTyping" | "loadParticipants" | "setRights" | "blockUser" | "updateParticipantRights" | "create" | "createNew" | "startSupport" | "activateConversation" | "convertTempToConversation" | "getMessagesFromApi" | "addMessagesToConversation" | "getMessagesForConversation" | "updateLastMessage" | "updateUnread" | "updateAllUnread" | "increaseMessageCount" | "increaseMessageCountSystem" | "setLastReadId" | "getConversation" | "addParticipant" | "removeParticipant" | "setParticipants" | "toggleParticipant" | "getConversationViaParticipantsAndName" | "cleanConversations" | "abandonConversation" | "inactivateConversation" | "conversationRenamed" | "executeParticipantsEdit" | "updateConversationParticipant" | "deleteConversation" | "activateLastConversation" | "readLastActiveConversation">>;
|
|
144
156
|
export default useConversationsStore;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
export type Feature = 'chat' | 'support';
|
|
2
|
-
export type LeftTarget = 'conversations' | 'contacts-new' | 'contacts-edit';
|
|
2
|
+
export type LeftTarget = 'conversations' | 'contacts-new' | 'contacts-edit' | 'contacts-rights' | 'rename';
|
|
3
3
|
export type MainTarget = 'chat';
|
|
4
4
|
export declare const useMainStore: import("pinia").StoreDefinition<"main", Pick<{
|
|
5
|
-
leftTarget: import("vue").Ref<LeftTarget, LeftTarget>;
|
|
6
|
-
mainTarget: import("vue").Ref<"chat", "chat">;
|
|
7
5
|
state: import("vue").Ref<"connected" | "disconnected", "connected" | "disconnected">;
|
|
8
6
|
fullscreen: import("vue").Ref<boolean, boolean>;
|
|
9
7
|
features: import("vue").Ref<Feature[], Feature[]>;
|
|
10
8
|
hasChat: import("vue").ComputedRef<boolean>;
|
|
11
9
|
hasSupport: import("vue").ComputedRef<boolean>;
|
|
12
10
|
isSupportOnly: import("vue").ComputedRef<boolean>;
|
|
13
|
-
viewMode: import("vue").Ref<"
|
|
14
|
-
setViewMode: (newViewMode: "
|
|
11
|
+
viewMode: import("vue").Ref<"mobile" | "tablet" | "desktop", "mobile" | "tablet" | "desktop">;
|
|
12
|
+
setViewMode: (newViewMode: "mobile" | "tablet" | "desktop") => void;
|
|
13
|
+
chatVisible: import("vue").Ref<boolean, boolean>;
|
|
14
|
+
soundEnabled: import("vue").Ref<boolean, boolean>;
|
|
15
|
+
soundVolume: import("vue").Ref<number, number>;
|
|
15
16
|
supportParticipants: import("vue").Ref<string[], string[]>;
|
|
16
17
|
wsUrl: import("vue").Ref<string, string>;
|
|
17
18
|
apiUrl: import("vue").Ref<string, string>;
|
|
@@ -25,21 +26,42 @@ export declare const useMainStore: import("pinia").StoreDefinition<"main", Pick<
|
|
|
25
26
|
unreadConversations: number;
|
|
26
27
|
}) => void>;
|
|
27
28
|
closeCallback: import("vue").Ref<() => void, () => void>;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
setContent: (type: string, target: "left" | "main" | "right") => void;
|
|
30
|
+
unsetContent: (target: "left" | "main" | "right") => void;
|
|
31
|
+
content: import("vue").Ref<{
|
|
32
|
+
left: string | undefined;
|
|
33
|
+
main: string | undefined;
|
|
34
|
+
right: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
left: string | undefined;
|
|
37
|
+
main: string | undefined;
|
|
38
|
+
right: string | undefined;
|
|
39
|
+
} | {
|
|
40
|
+
left: string | undefined;
|
|
41
|
+
main: string | undefined;
|
|
42
|
+
right: string | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
lastError: import("vue").Ref<{
|
|
45
|
+
error: string;
|
|
46
|
+
messageType?: string;
|
|
47
|
+
}, {
|
|
48
|
+
error: string;
|
|
49
|
+
messageType?: string;
|
|
50
|
+
}>;
|
|
51
|
+
setError: (error: string, messageType?: string) => void;
|
|
52
|
+
clearError: () => void;
|
|
53
|
+
}, "state" | "fullscreen" | "features" | "viewMode" | "chatVisible" | "soundEnabled" | "soundVolume" | "supportParticipants" | "wsUrl" | "apiUrl" | "mediaUrl" | "authToken" | "unreadCallback" | "closeCallback" | "content" | "lastError">, Pick<{
|
|
35
54
|
state: import("vue").Ref<"connected" | "disconnected", "connected" | "disconnected">;
|
|
36
55
|
fullscreen: import("vue").Ref<boolean, boolean>;
|
|
37
56
|
features: import("vue").Ref<Feature[], Feature[]>;
|
|
38
57
|
hasChat: import("vue").ComputedRef<boolean>;
|
|
39
58
|
hasSupport: import("vue").ComputedRef<boolean>;
|
|
40
59
|
isSupportOnly: import("vue").ComputedRef<boolean>;
|
|
41
|
-
viewMode: import("vue").Ref<"
|
|
42
|
-
setViewMode: (newViewMode: "
|
|
60
|
+
viewMode: import("vue").Ref<"mobile" | "tablet" | "desktop", "mobile" | "tablet" | "desktop">;
|
|
61
|
+
setViewMode: (newViewMode: "mobile" | "tablet" | "desktop") => void;
|
|
62
|
+
chatVisible: import("vue").Ref<boolean, boolean>;
|
|
63
|
+
soundEnabled: import("vue").Ref<boolean, boolean>;
|
|
64
|
+
soundVolume: import("vue").Ref<number, number>;
|
|
43
65
|
supportParticipants: import("vue").Ref<string[], string[]>;
|
|
44
66
|
wsUrl: import("vue").Ref<string, string>;
|
|
45
67
|
apiUrl: import("vue").Ref<string, string>;
|
|
@@ -53,21 +75,42 @@ export declare const useMainStore: import("pinia").StoreDefinition<"main", Pick<
|
|
|
53
75
|
unreadConversations: number;
|
|
54
76
|
}) => void>;
|
|
55
77
|
closeCallback: import("vue").Ref<() => void, () => void>;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
78
|
+
setContent: (type: string, target: "left" | "main" | "right") => void;
|
|
79
|
+
unsetContent: (target: "left" | "main" | "right") => void;
|
|
80
|
+
content: import("vue").Ref<{
|
|
81
|
+
left: string | undefined;
|
|
82
|
+
main: string | undefined;
|
|
83
|
+
right: string | undefined;
|
|
84
|
+
}, {
|
|
85
|
+
left: string | undefined;
|
|
86
|
+
main: string | undefined;
|
|
87
|
+
right: string | undefined;
|
|
88
|
+
} | {
|
|
89
|
+
left: string | undefined;
|
|
90
|
+
main: string | undefined;
|
|
91
|
+
right: string | undefined;
|
|
92
|
+
}>;
|
|
93
|
+
lastError: import("vue").Ref<{
|
|
94
|
+
error: string;
|
|
95
|
+
messageType?: string;
|
|
96
|
+
}, {
|
|
97
|
+
error: string;
|
|
98
|
+
messageType?: string;
|
|
99
|
+
}>;
|
|
100
|
+
setError: (error: string, messageType?: string) => void;
|
|
101
|
+
clearError: () => void;
|
|
60
102
|
}, "hasChat" | "hasSupport" | "isSupportOnly">, Pick<{
|
|
61
|
-
leftTarget: import("vue").Ref<LeftTarget, LeftTarget>;
|
|
62
|
-
mainTarget: import("vue").Ref<"chat", "chat">;
|
|
63
103
|
state: import("vue").Ref<"connected" | "disconnected", "connected" | "disconnected">;
|
|
64
104
|
fullscreen: import("vue").Ref<boolean, boolean>;
|
|
65
105
|
features: import("vue").Ref<Feature[], Feature[]>;
|
|
66
106
|
hasChat: import("vue").ComputedRef<boolean>;
|
|
67
107
|
hasSupport: import("vue").ComputedRef<boolean>;
|
|
68
108
|
isSupportOnly: import("vue").ComputedRef<boolean>;
|
|
69
|
-
viewMode: import("vue").Ref<"
|
|
70
|
-
setViewMode: (newViewMode: "
|
|
109
|
+
viewMode: import("vue").Ref<"mobile" | "tablet" | "desktop", "mobile" | "tablet" | "desktop">;
|
|
110
|
+
setViewMode: (newViewMode: "mobile" | "tablet" | "desktop") => void;
|
|
111
|
+
chatVisible: import("vue").Ref<boolean, boolean>;
|
|
112
|
+
soundEnabled: import("vue").Ref<boolean, boolean>;
|
|
113
|
+
soundVolume: import("vue").Ref<number, number>;
|
|
71
114
|
supportParticipants: import("vue").Ref<string[], string[]>;
|
|
72
115
|
wsUrl: import("vue").Ref<string, string>;
|
|
73
116
|
apiUrl: import("vue").Ref<string, string>;
|
|
@@ -81,9 +124,29 @@ export declare const useMainStore: import("pinia").StoreDefinition<"main", Pick<
|
|
|
81
124
|
unreadConversations: number;
|
|
82
125
|
}) => void>;
|
|
83
126
|
closeCallback: import("vue").Ref<() => void, () => void>;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
127
|
+
setContent: (type: string, target: "left" | "main" | "right") => void;
|
|
128
|
+
unsetContent: (target: "left" | "main" | "right") => void;
|
|
129
|
+
content: import("vue").Ref<{
|
|
130
|
+
left: string | undefined;
|
|
131
|
+
main: string | undefined;
|
|
132
|
+
right: string | undefined;
|
|
133
|
+
}, {
|
|
134
|
+
left: string | undefined;
|
|
135
|
+
main: string | undefined;
|
|
136
|
+
right: string | undefined;
|
|
137
|
+
} | {
|
|
138
|
+
left: string | undefined;
|
|
139
|
+
main: string | undefined;
|
|
140
|
+
right: string | undefined;
|
|
141
|
+
}>;
|
|
142
|
+
lastError: import("vue").Ref<{
|
|
143
|
+
error: string;
|
|
144
|
+
messageType?: string;
|
|
145
|
+
}, {
|
|
146
|
+
error: string;
|
|
147
|
+
messageType?: string;
|
|
148
|
+
}>;
|
|
149
|
+
setError: (error: string, messageType?: string) => void;
|
|
150
|
+
clearError: () => void;
|
|
151
|
+
}, "setViewMode" | "setContent" | "unsetContent" | "setError" | "clearError">>;
|
|
89
152
|
export default useMainStore;
|