@bacca2095/webphone 0.0.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 +73 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +19288 -0
- package/dist/src/components/WebPhone.vue.d.ts +21 -0
- package/dist/src/components/panels/CalendarPanel.vue.d.ts +7 -0
- package/dist/src/components/panels/ContactsPanel.vue.d.ts +11 -0
- package/dist/src/components/panels/HistoryPanel.vue.d.ts +9 -0
- package/dist/src/components/panels/NotesPanel.vue.d.ts +6 -0
- package/dist/src/components/webphone/AudioSettings.vue.d.ts +3 -0
- package/dist/src/components/webphone/CallControls.vue.d.ts +28 -0
- package/dist/src/components/webphone/CallDisplay.vue.d.ts +7 -0
- package/dist/src/components/webphone/ChannelTabs.vue.d.ts +12 -0
- package/dist/src/components/webphone/DialSection.vue.d.ts +19 -0
- package/dist/src/components/webphone/PanelToggle.vue.d.ts +13 -0
- package/dist/src/components/webphone/PhoneHeader.vue.d.ts +23 -0
- package/dist/src/composables/useAudioDevices.d.ts +24 -0
- package/dist/src/composables/useContacts.d.ts +17 -0
- package/dist/src/composables/useSipConfig.d.ts +5 -0
- package/dist/src/composables/useSounds.d.ts +4 -0
- package/dist/src/composables/useWebPhone.d.ts +46 -0
- package/dist/src/core/db.d.ts +13 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/stores/webphone.d.ts +293 -0
- package/dist/src/types/index.d.ts +52 -0
- package/dist/src/webphone.ce.d.ts +5 -0
- package/dist/style.css +2 -0
- package/dist/webphone.es.js +25962 -0
- package/dist/webphone.iife.js +58 -0
- package/package.json +91 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { WebPhoneConfig, Contact } from '../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
config?: WebPhoneConfig;
|
|
4
|
+
float?: boolean;
|
|
5
|
+
contacts?: Contact[];
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
|
|
8
|
+
el: Readonly<import('vue').ShallowRef<HTMLElement | null>>;
|
|
9
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
"open-history": () => any;
|
|
11
|
+
"open-notes": (remoteUri?: string | undefined) => any;
|
|
12
|
+
"open-contacts": () => any;
|
|
13
|
+
"open-calendar": () => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
"onOpen-history"?: (() => any) | undefined;
|
|
16
|
+
"onOpen-notes"?: ((remoteUri?: string | undefined) => any) | undefined;
|
|
17
|
+
"onOpen-contacts"?: (() => any) | undefined;
|
|
18
|
+
"onOpen-calendar"?: (() => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
2
|
+
call: (remoteUri: string) => any;
|
|
3
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
onCall?: ((remoteUri: string) => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Contact } from '../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
externalContacts?: Contact[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
call: (phone: string) => any;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onCall?: ((phone: string) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
2
|
+
call: (remoteUri: string) => any;
|
|
3
|
+
"open-notes": (remoteUri: string) => any;
|
|
4
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
5
|
+
onCall?: ((remoteUri: string) => any) | undefined;
|
|
6
|
+
"onOpen-notes"?: ((remoteUri: string) => any) | undefined;
|
|
7
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
targetUri?: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CallInfo } from '../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
selected?: CallInfo;
|
|
4
|
+
callBtnMode: 'call' | 'disabled';
|
|
5
|
+
isSpeakerMuted: boolean;
|
|
6
|
+
lastDialed: string | null;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
hold: (id: string) => any;
|
|
10
|
+
call: () => any;
|
|
11
|
+
answer: (id: string) => any;
|
|
12
|
+
hangup: (id: string) => any;
|
|
13
|
+
mute: (id: string) => any;
|
|
14
|
+
unmute: (id: string) => any;
|
|
15
|
+
resume: (id: string) => any;
|
|
16
|
+
"toggle-speaker": () => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onHold?: ((id: string) => any) | undefined;
|
|
19
|
+
onCall?: (() => any) | undefined;
|
|
20
|
+
onAnswer?: ((id: string) => any) | undefined;
|
|
21
|
+
onHangup?: ((id: string) => any) | undefined;
|
|
22
|
+
onMute?: ((id: string) => any) | undefined;
|
|
23
|
+
onUnmute?: ((id: string) => any) | undefined;
|
|
24
|
+
onResume?: ((id: string) => any) | undefined;
|
|
25
|
+
"onToggle-speaker"?: (() => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CallInfo } from '../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
channel: CallInfo;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CallInfo } from '../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
channels: CallInfo[];
|
|
4
|
+
selectedId: string | null;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
select: (id: string | null) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onSelect?: ((id: string | null) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Contact } from '../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue: string;
|
|
4
|
+
externalContacts?: Contact[];
|
|
5
|
+
hasActiveCall?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
call: () => any;
|
|
9
|
+
"update:modelValue": (value: string) => any;
|
|
10
|
+
digit: (k: string) => any;
|
|
11
|
+
back: () => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onCall?: (() => any) | undefined;
|
|
14
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
15
|
+
onDigit?: ((k: string) => any) | undefined;
|
|
16
|
+
onBack?: (() => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
showPad: boolean;
|
|
3
|
+
hasNotes: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
"open-notes": () => any;
|
|
7
|
+
"toggle-pad": () => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
"onOpen-notes"?: (() => any) | undefined;
|
|
10
|
+
"onToggle-pad"?: (() => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
isRegistered: boolean;
|
|
3
|
+
isConnecting: boolean;
|
|
4
|
+
isDark: boolean;
|
|
5
|
+
rootEl: HTMLElement | null;
|
|
6
|
+
float?: boolean;
|
|
7
|
+
isDragging?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
"toggle-dark": () => any;
|
|
11
|
+
"open-history": () => any;
|
|
12
|
+
"open-notes": () => any;
|
|
13
|
+
"open-contacts": () => any;
|
|
14
|
+
"open-calendar": () => any;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
"onToggle-dark"?: (() => any) | undefined;
|
|
17
|
+
"onOpen-history"?: (() => any) | undefined;
|
|
18
|
+
"onOpen-notes"?: (() => any) | undefined;
|
|
19
|
+
"onOpen-contacts"?: (() => any) | undefined;
|
|
20
|
+
"onOpen-calendar"?: (() => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type MicPermission = 'unknown' | 'prompt' | 'granted' | 'denied';
|
|
2
|
+
export declare const useAudioDevices: () => {
|
|
3
|
+
permission: import('vue').Ref<MicPermission, MicPermission>;
|
|
4
|
+
inputDevices: import('vue').ComputedRef<{
|
|
5
|
+
readonly deviceId: string;
|
|
6
|
+
readonly groupId: string;
|
|
7
|
+
readonly kind: MediaDeviceKind;
|
|
8
|
+
readonly label: string;
|
|
9
|
+
toJSON: () => any;
|
|
10
|
+
}[]>;
|
|
11
|
+
outputDevices: import('vue').ComputedRef<{
|
|
12
|
+
readonly deviceId: string;
|
|
13
|
+
readonly groupId: string;
|
|
14
|
+
readonly kind: MediaDeviceKind;
|
|
15
|
+
readonly label: string;
|
|
16
|
+
toJSON: () => any;
|
|
17
|
+
}[]>;
|
|
18
|
+
selectedInputId: import('vue').Ref<string, string>;
|
|
19
|
+
selectedOutputId: import('vue').Ref<string, string>;
|
|
20
|
+
inputVolume: import('vue').Ref<number, number>;
|
|
21
|
+
outputVolume: import('vue').Ref<number, number>;
|
|
22
|
+
requestPermission: () => Promise<void>;
|
|
23
|
+
checkPermission: () => Promise<void>;
|
|
24
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Contact } from '../types';
|
|
2
|
+
export declare const useContacts: () => {
|
|
3
|
+
contacts: import('vue').Ref<{
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
phone: string;
|
|
7
|
+
type?: import('..').ContactType | undefined;
|
|
8
|
+
}[], Contact[] | {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
phone: string;
|
|
12
|
+
type?: import('..').ContactType | undefined;
|
|
13
|
+
}[]>;
|
|
14
|
+
addContact: (contact: Omit<Contact, "id">) => void;
|
|
15
|
+
updateContact: (updated: Contact) => void;
|
|
16
|
+
deleteContact: (id: string) => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { WebPhoneConfig, NoteColor } from '../types';
|
|
2
|
+
export declare const useWebPhone: () => {
|
|
3
|
+
channels: import('vue').ComputedRef<{
|
|
4
|
+
id: string;
|
|
5
|
+
direction: import('..').CallDirection;
|
|
6
|
+
status: import('..').CallStatus;
|
|
7
|
+
remoteUri: string;
|
|
8
|
+
remoteName: string;
|
|
9
|
+
startTime: Date | null;
|
|
10
|
+
duration: number;
|
|
11
|
+
isMuted: boolean;
|
|
12
|
+
}[]>;
|
|
13
|
+
isRegistered: import('vue').ComputedRef<boolean>;
|
|
14
|
+
isConnecting: import('vue').ComputedRef<boolean>;
|
|
15
|
+
history: import('vue').ComputedRef<{
|
|
16
|
+
id: string;
|
|
17
|
+
direction: import('..').CallDirection;
|
|
18
|
+
remoteUri: string;
|
|
19
|
+
remoteName: string;
|
|
20
|
+
duration: number;
|
|
21
|
+
outcome: import('../types').CallOutcome;
|
|
22
|
+
endedAt: Date;
|
|
23
|
+
notes?: string | undefined;
|
|
24
|
+
}[]>;
|
|
25
|
+
notes: import('vue').ComputedRef<{
|
|
26
|
+
id: string;
|
|
27
|
+
remoteUri: string;
|
|
28
|
+
remoteName: string;
|
|
29
|
+
text: string;
|
|
30
|
+
color?: NoteColor | undefined;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
}[]>;
|
|
33
|
+
lastDialed: import('vue').ComputedRef<string | null>;
|
|
34
|
+
connect: (config: WebPhoneConfig) => void;
|
|
35
|
+
disconnect: () => void;
|
|
36
|
+
call: (target: string) => Promise<void>;
|
|
37
|
+
answer: (channelId: string) => Promise<void>;
|
|
38
|
+
hangup: (channelId: string) => void;
|
|
39
|
+
hold: (channelId: string) => void;
|
|
40
|
+
resume: (channelId: string) => void;
|
|
41
|
+
mute: (channelId: string) => void;
|
|
42
|
+
unmute: (channelId: string) => void;
|
|
43
|
+
addNote: (remoteUri: string, remoteName: string, text: string, color?: NoteColor) => void;
|
|
44
|
+
removeNote: (id: string) => void;
|
|
45
|
+
sendDTMF: (channelId: string, tone: string) => void;
|
|
46
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CallRecord, PhoneNote, Contact, ScheduledCall } from '../types';
|
|
2
|
+
export declare const MAX_HISTORY = 50;
|
|
3
|
+
export declare const loadHistory: () => Promise<CallRecord[]>;
|
|
4
|
+
export declare const saveRecord: (record: CallRecord) => Promise<void>;
|
|
5
|
+
export declare const loadNotes: () => Promise<PhoneNote[]>;
|
|
6
|
+
export declare const saveNote: (note: PhoneNote) => Promise<void>;
|
|
7
|
+
export declare const deleteNote: (id: string) => Promise<void>;
|
|
8
|
+
export declare const loadContacts: () => Promise<Contact[]>;
|
|
9
|
+
export declare const saveContact: (contact: Contact) => Promise<void>;
|
|
10
|
+
export declare const deleteContact: (id: string) => Promise<void>;
|
|
11
|
+
export declare const loadScheduledCalls: () => Promise<ScheduledCall[]>;
|
|
12
|
+
export declare const saveScheduledCall: (s: ScheduledCall) => Promise<void>;
|
|
13
|
+
export declare const deleteScheduledCall: (id: string) => Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
|
+
export { useWebPhone } from './composables/useWebPhone';
|
|
3
|
+
export { useAudioDevices } from './composables/useAudioDevices';
|
|
4
|
+
export { useWebPhoneStore } from './stores/webphone';
|
|
5
|
+
export { default as WebPhone } from './components/WebPhone.vue';
|
|
6
|
+
export { default as NotesPanel } from './components/panels/NotesPanel.vue';
|
|
7
|
+
export { default as HistoryPanel } from './components/panels/HistoryPanel.vue';
|
|
8
|
+
export { default as ContactsPanel } from './components/panels/ContactsPanel.vue';
|
|
9
|
+
export { default as CalendarPanel } from './components/panels/CalendarPanel.vue';
|
|
10
|
+
export { useContacts } from './composables/useContacts';
|
|
11
|
+
export type { CallInfo, CallStatus, CallDirection, WebPhoneConfig, Contact, ContactType, PhoneNote, NoteColor, ScheduledCall } from './types';
|
|
12
|
+
export type { MicPermission } from './composables/useAudioDevices';
|
|
13
|
+
export declare const WebPhonePlugin: Plugin;
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { CallInfo, CallStatus, CallRecord, CallOutcome, PhoneNote, NoteColor, ScheduledCall } from '../types';
|
|
2
|
+
export declare const useWebPhoneStore: import('pinia').StoreDefinition<"webphone", Pick<{
|
|
3
|
+
channels: import('vue').Ref<{
|
|
4
|
+
id: string;
|
|
5
|
+
direction: import('..').CallDirection;
|
|
6
|
+
status: CallStatus;
|
|
7
|
+
remoteUri: string;
|
|
8
|
+
remoteName: string;
|
|
9
|
+
startTime: Date | null;
|
|
10
|
+
duration: number;
|
|
11
|
+
isMuted: boolean;
|
|
12
|
+
}[], CallInfo[] | {
|
|
13
|
+
id: string;
|
|
14
|
+
direction: import('..').CallDirection;
|
|
15
|
+
status: CallStatus;
|
|
16
|
+
remoteUri: string;
|
|
17
|
+
remoteName: string;
|
|
18
|
+
startTime: Date | null;
|
|
19
|
+
duration: number;
|
|
20
|
+
isMuted: boolean;
|
|
21
|
+
}[]>;
|
|
22
|
+
isRegistered: import('vue').Ref<boolean, boolean>;
|
|
23
|
+
isConnecting: import('vue').Ref<boolean, boolean>;
|
|
24
|
+
history: import('vue').Ref<{
|
|
25
|
+
id: string;
|
|
26
|
+
direction: import('..').CallDirection;
|
|
27
|
+
remoteUri: string;
|
|
28
|
+
remoteName: string;
|
|
29
|
+
duration: number;
|
|
30
|
+
outcome: CallOutcome;
|
|
31
|
+
endedAt: Date;
|
|
32
|
+
notes?: string | undefined;
|
|
33
|
+
}[], CallRecord[] | {
|
|
34
|
+
id: string;
|
|
35
|
+
direction: import('..').CallDirection;
|
|
36
|
+
remoteUri: string;
|
|
37
|
+
remoteName: string;
|
|
38
|
+
duration: number;
|
|
39
|
+
outcome: CallOutcome;
|
|
40
|
+
endedAt: Date;
|
|
41
|
+
notes?: string | undefined;
|
|
42
|
+
}[]>;
|
|
43
|
+
notes: import('vue').Ref<{
|
|
44
|
+
id: string;
|
|
45
|
+
remoteUri: string;
|
|
46
|
+
remoteName: string;
|
|
47
|
+
text: string;
|
|
48
|
+
color?: NoteColor | undefined;
|
|
49
|
+
createdAt: Date;
|
|
50
|
+
}[], PhoneNote[] | {
|
|
51
|
+
id: string;
|
|
52
|
+
remoteUri: string;
|
|
53
|
+
remoteName: string;
|
|
54
|
+
text: string;
|
|
55
|
+
color?: NoteColor | undefined;
|
|
56
|
+
createdAt: Date;
|
|
57
|
+
}[]>;
|
|
58
|
+
lastDialed: import('vue').ComputedRef<string | null>;
|
|
59
|
+
incomingChannels: import('vue').ComputedRef<{
|
|
60
|
+
id: string;
|
|
61
|
+
direction: import('..').CallDirection;
|
|
62
|
+
status: CallStatus;
|
|
63
|
+
remoteUri: string;
|
|
64
|
+
remoteName: string;
|
|
65
|
+
startTime: Date | null;
|
|
66
|
+
duration: number;
|
|
67
|
+
isMuted: boolean;
|
|
68
|
+
}[]>;
|
|
69
|
+
activeChannels: import('vue').ComputedRef<{
|
|
70
|
+
id: string;
|
|
71
|
+
direction: import('..').CallDirection;
|
|
72
|
+
status: CallStatus;
|
|
73
|
+
remoteUri: string;
|
|
74
|
+
remoteName: string;
|
|
75
|
+
startTime: Date | null;
|
|
76
|
+
duration: number;
|
|
77
|
+
isMuted: boolean;
|
|
78
|
+
}[]>;
|
|
79
|
+
addChannel: (info: CallInfo) => boolean;
|
|
80
|
+
updateStatus: (id: string, status: CallStatus) => void;
|
|
81
|
+
updateMute: (id: string, isMuted: boolean) => void;
|
|
82
|
+
startTimer: (id: string) => void;
|
|
83
|
+
removeChannel: (id: string) => void;
|
|
84
|
+
addNote: (remoteUri: string, remoteName: string, text: string, color?: NoteColor) => void;
|
|
85
|
+
removeNote: (id: string) => void;
|
|
86
|
+
scheduledCalls: import('vue').Ref<{
|
|
87
|
+
id: string;
|
|
88
|
+
remoteUri: string;
|
|
89
|
+
scheduledAt: Date;
|
|
90
|
+
note?: string | undefined;
|
|
91
|
+
}[], ScheduledCall[] | {
|
|
92
|
+
id: string;
|
|
93
|
+
remoteUri: string;
|
|
94
|
+
scheduledAt: Date;
|
|
95
|
+
note?: string | undefined;
|
|
96
|
+
}[]>;
|
|
97
|
+
addScheduledCall: (data: Omit<ScheduledCall, "id">) => void;
|
|
98
|
+
removeScheduledCall: (id: string) => void;
|
|
99
|
+
}, "notes" | "channels" | "isRegistered" | "isConnecting" | "history" | "scheduledCalls">, Pick<{
|
|
100
|
+
channels: import('vue').Ref<{
|
|
101
|
+
id: string;
|
|
102
|
+
direction: import('..').CallDirection;
|
|
103
|
+
status: CallStatus;
|
|
104
|
+
remoteUri: string;
|
|
105
|
+
remoteName: string;
|
|
106
|
+
startTime: Date | null;
|
|
107
|
+
duration: number;
|
|
108
|
+
isMuted: boolean;
|
|
109
|
+
}[], CallInfo[] | {
|
|
110
|
+
id: string;
|
|
111
|
+
direction: import('..').CallDirection;
|
|
112
|
+
status: CallStatus;
|
|
113
|
+
remoteUri: string;
|
|
114
|
+
remoteName: string;
|
|
115
|
+
startTime: Date | null;
|
|
116
|
+
duration: number;
|
|
117
|
+
isMuted: boolean;
|
|
118
|
+
}[]>;
|
|
119
|
+
isRegistered: import('vue').Ref<boolean, boolean>;
|
|
120
|
+
isConnecting: import('vue').Ref<boolean, boolean>;
|
|
121
|
+
history: import('vue').Ref<{
|
|
122
|
+
id: string;
|
|
123
|
+
direction: import('..').CallDirection;
|
|
124
|
+
remoteUri: string;
|
|
125
|
+
remoteName: string;
|
|
126
|
+
duration: number;
|
|
127
|
+
outcome: CallOutcome;
|
|
128
|
+
endedAt: Date;
|
|
129
|
+
notes?: string | undefined;
|
|
130
|
+
}[], CallRecord[] | {
|
|
131
|
+
id: string;
|
|
132
|
+
direction: import('..').CallDirection;
|
|
133
|
+
remoteUri: string;
|
|
134
|
+
remoteName: string;
|
|
135
|
+
duration: number;
|
|
136
|
+
outcome: CallOutcome;
|
|
137
|
+
endedAt: Date;
|
|
138
|
+
notes?: string | undefined;
|
|
139
|
+
}[]>;
|
|
140
|
+
notes: import('vue').Ref<{
|
|
141
|
+
id: string;
|
|
142
|
+
remoteUri: string;
|
|
143
|
+
remoteName: string;
|
|
144
|
+
text: string;
|
|
145
|
+
color?: NoteColor | undefined;
|
|
146
|
+
createdAt: Date;
|
|
147
|
+
}[], PhoneNote[] | {
|
|
148
|
+
id: string;
|
|
149
|
+
remoteUri: string;
|
|
150
|
+
remoteName: string;
|
|
151
|
+
text: string;
|
|
152
|
+
color?: NoteColor | undefined;
|
|
153
|
+
createdAt: Date;
|
|
154
|
+
}[]>;
|
|
155
|
+
lastDialed: import('vue').ComputedRef<string | null>;
|
|
156
|
+
incomingChannels: import('vue').ComputedRef<{
|
|
157
|
+
id: string;
|
|
158
|
+
direction: import('..').CallDirection;
|
|
159
|
+
status: CallStatus;
|
|
160
|
+
remoteUri: string;
|
|
161
|
+
remoteName: string;
|
|
162
|
+
startTime: Date | null;
|
|
163
|
+
duration: number;
|
|
164
|
+
isMuted: boolean;
|
|
165
|
+
}[]>;
|
|
166
|
+
activeChannels: import('vue').ComputedRef<{
|
|
167
|
+
id: string;
|
|
168
|
+
direction: import('..').CallDirection;
|
|
169
|
+
status: CallStatus;
|
|
170
|
+
remoteUri: string;
|
|
171
|
+
remoteName: string;
|
|
172
|
+
startTime: Date | null;
|
|
173
|
+
duration: number;
|
|
174
|
+
isMuted: boolean;
|
|
175
|
+
}[]>;
|
|
176
|
+
addChannel: (info: CallInfo) => boolean;
|
|
177
|
+
updateStatus: (id: string, status: CallStatus) => void;
|
|
178
|
+
updateMute: (id: string, isMuted: boolean) => void;
|
|
179
|
+
startTimer: (id: string) => void;
|
|
180
|
+
removeChannel: (id: string) => void;
|
|
181
|
+
addNote: (remoteUri: string, remoteName: string, text: string, color?: NoteColor) => void;
|
|
182
|
+
removeNote: (id: string) => void;
|
|
183
|
+
scheduledCalls: import('vue').Ref<{
|
|
184
|
+
id: string;
|
|
185
|
+
remoteUri: string;
|
|
186
|
+
scheduledAt: Date;
|
|
187
|
+
note?: string | undefined;
|
|
188
|
+
}[], ScheduledCall[] | {
|
|
189
|
+
id: string;
|
|
190
|
+
remoteUri: string;
|
|
191
|
+
scheduledAt: Date;
|
|
192
|
+
note?: string | undefined;
|
|
193
|
+
}[]>;
|
|
194
|
+
addScheduledCall: (data: Omit<ScheduledCall, "id">) => void;
|
|
195
|
+
removeScheduledCall: (id: string) => void;
|
|
196
|
+
}, "lastDialed" | "incomingChannels" | "activeChannels">, Pick<{
|
|
197
|
+
channels: import('vue').Ref<{
|
|
198
|
+
id: string;
|
|
199
|
+
direction: import('..').CallDirection;
|
|
200
|
+
status: CallStatus;
|
|
201
|
+
remoteUri: string;
|
|
202
|
+
remoteName: string;
|
|
203
|
+
startTime: Date | null;
|
|
204
|
+
duration: number;
|
|
205
|
+
isMuted: boolean;
|
|
206
|
+
}[], CallInfo[] | {
|
|
207
|
+
id: string;
|
|
208
|
+
direction: import('..').CallDirection;
|
|
209
|
+
status: CallStatus;
|
|
210
|
+
remoteUri: string;
|
|
211
|
+
remoteName: string;
|
|
212
|
+
startTime: Date | null;
|
|
213
|
+
duration: number;
|
|
214
|
+
isMuted: boolean;
|
|
215
|
+
}[]>;
|
|
216
|
+
isRegistered: import('vue').Ref<boolean, boolean>;
|
|
217
|
+
isConnecting: import('vue').Ref<boolean, boolean>;
|
|
218
|
+
history: import('vue').Ref<{
|
|
219
|
+
id: string;
|
|
220
|
+
direction: import('..').CallDirection;
|
|
221
|
+
remoteUri: string;
|
|
222
|
+
remoteName: string;
|
|
223
|
+
duration: number;
|
|
224
|
+
outcome: CallOutcome;
|
|
225
|
+
endedAt: Date;
|
|
226
|
+
notes?: string | undefined;
|
|
227
|
+
}[], CallRecord[] | {
|
|
228
|
+
id: string;
|
|
229
|
+
direction: import('..').CallDirection;
|
|
230
|
+
remoteUri: string;
|
|
231
|
+
remoteName: string;
|
|
232
|
+
duration: number;
|
|
233
|
+
outcome: CallOutcome;
|
|
234
|
+
endedAt: Date;
|
|
235
|
+
notes?: string | undefined;
|
|
236
|
+
}[]>;
|
|
237
|
+
notes: import('vue').Ref<{
|
|
238
|
+
id: string;
|
|
239
|
+
remoteUri: string;
|
|
240
|
+
remoteName: string;
|
|
241
|
+
text: string;
|
|
242
|
+
color?: NoteColor | undefined;
|
|
243
|
+
createdAt: Date;
|
|
244
|
+
}[], PhoneNote[] | {
|
|
245
|
+
id: string;
|
|
246
|
+
remoteUri: string;
|
|
247
|
+
remoteName: string;
|
|
248
|
+
text: string;
|
|
249
|
+
color?: NoteColor | undefined;
|
|
250
|
+
createdAt: Date;
|
|
251
|
+
}[]>;
|
|
252
|
+
lastDialed: import('vue').ComputedRef<string | null>;
|
|
253
|
+
incomingChannels: import('vue').ComputedRef<{
|
|
254
|
+
id: string;
|
|
255
|
+
direction: import('..').CallDirection;
|
|
256
|
+
status: CallStatus;
|
|
257
|
+
remoteUri: string;
|
|
258
|
+
remoteName: string;
|
|
259
|
+
startTime: Date | null;
|
|
260
|
+
duration: number;
|
|
261
|
+
isMuted: boolean;
|
|
262
|
+
}[]>;
|
|
263
|
+
activeChannels: import('vue').ComputedRef<{
|
|
264
|
+
id: string;
|
|
265
|
+
direction: import('..').CallDirection;
|
|
266
|
+
status: CallStatus;
|
|
267
|
+
remoteUri: string;
|
|
268
|
+
remoteName: string;
|
|
269
|
+
startTime: Date | null;
|
|
270
|
+
duration: number;
|
|
271
|
+
isMuted: boolean;
|
|
272
|
+
}[]>;
|
|
273
|
+
addChannel: (info: CallInfo) => boolean;
|
|
274
|
+
updateStatus: (id: string, status: CallStatus) => void;
|
|
275
|
+
updateMute: (id: string, isMuted: boolean) => void;
|
|
276
|
+
startTimer: (id: string) => void;
|
|
277
|
+
removeChannel: (id: string) => void;
|
|
278
|
+
addNote: (remoteUri: string, remoteName: string, text: string, color?: NoteColor) => void;
|
|
279
|
+
removeNote: (id: string) => void;
|
|
280
|
+
scheduledCalls: import('vue').Ref<{
|
|
281
|
+
id: string;
|
|
282
|
+
remoteUri: string;
|
|
283
|
+
scheduledAt: Date;
|
|
284
|
+
note?: string | undefined;
|
|
285
|
+
}[], ScheduledCall[] | {
|
|
286
|
+
id: string;
|
|
287
|
+
remoteUri: string;
|
|
288
|
+
scheduledAt: Date;
|
|
289
|
+
note?: string | undefined;
|
|
290
|
+
}[]>;
|
|
291
|
+
addScheduledCall: (data: Omit<ScheduledCall, "id">) => void;
|
|
292
|
+
removeScheduledCall: (id: string) => void;
|
|
293
|
+
}, "addChannel" | "updateStatus" | "updateMute" | "startTimer" | "removeChannel" | "addNote" | "removeNote" | "addScheduledCall" | "removeScheduledCall">>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export type CallDirection = 'incoming' | 'outgoing';
|
|
2
|
+
export type CallOutcome = 'answered' | 'missed' | 'failed';
|
|
3
|
+
export interface CallRecord {
|
|
4
|
+
id: string;
|
|
5
|
+
direction: CallDirection;
|
|
6
|
+
remoteUri: string;
|
|
7
|
+
remoteName: string;
|
|
8
|
+
duration: number;
|
|
9
|
+
outcome: CallOutcome;
|
|
10
|
+
endedAt: Date;
|
|
11
|
+
notes?: string;
|
|
12
|
+
}
|
|
13
|
+
export type CallStatus = 'ringing' | 'connecting' | 'active' | 'held' | 'remote_held' | 'ended' | 'failed';
|
|
14
|
+
export interface CallInfo {
|
|
15
|
+
id: string;
|
|
16
|
+
direction: CallDirection;
|
|
17
|
+
status: CallStatus;
|
|
18
|
+
remoteUri: string;
|
|
19
|
+
remoteName: string;
|
|
20
|
+
startTime: Date | null;
|
|
21
|
+
duration: number;
|
|
22
|
+
isMuted: boolean;
|
|
23
|
+
}
|
|
24
|
+
export type NoteColor = 'yellow' | 'green' | 'blue' | 'pink' | 'orange' | 'purple';
|
|
25
|
+
export interface PhoneNote {
|
|
26
|
+
id: string;
|
|
27
|
+
remoteUri: string;
|
|
28
|
+
remoteName: string;
|
|
29
|
+
text: string;
|
|
30
|
+
color?: NoteColor;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
}
|
|
33
|
+
export type ContactType = 'internal' | 'external' | 'service' | 'emergency';
|
|
34
|
+
export interface Contact {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
phone: string;
|
|
38
|
+
type?: ContactType;
|
|
39
|
+
}
|
|
40
|
+
export interface ScheduledCall {
|
|
41
|
+
id: string;
|
|
42
|
+
remoteUri: string;
|
|
43
|
+
scheduledAt: Date;
|
|
44
|
+
note?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface WebPhoneConfig {
|
|
47
|
+
server: string;
|
|
48
|
+
uri: string;
|
|
49
|
+
password: string;
|
|
50
|
+
displayName?: string;
|
|
51
|
+
iceServers?: RTCIceServer[];
|
|
52
|
+
}
|