@opencxh/domain 1.11.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/channel/types.d.ts +1 -0
- package/dist/entities/inbox/types.d.ts +2 -0
- package/dist/entities/interaction/types.d.ts +1 -0
- package/dist/entities/team/index.d.ts +1 -0
- package/dist/entities/team/types.d.ts +10 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/platform/communication.d.ts +32 -1
- package/dist/platform/sdk.d.ts +18 -0
- package/dist/platform/settings.d.ts +45 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=s=>!!s.assignedUserId||!!s.assignedInboxId,l=s=>s.status==="closed",g=s=>({urgent:10,high:5,normal:2,low:1})[s.priority]||0,d=(s,r=30)=>s.title.length<=r?s.title:`${s.title.substring(0,r)}...`;var t=(s=>(s.MAILTO="mailto",s.SIP="sip",s.TEL="tel",s.WEBHOOK="webhook",s.USERNAME="username",s.ID="id",s.CUSTOM="custom",s.URL="url",s.TELEGRAM="telegram",s.WHATSAPP="whatsapp",s.VIBER="viber",s.SMS="sms",s.FAX="fax",s))(t||{});exports.CommunicationScheme=t;exports.getShortTitle=d;exports.getUrgencyScore=g;exports.isAssigned=e;exports.isClosed=l;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=s=>!!s.assignedUserId||!!s.assignedInboxId,l=s=>s.status==="closed",g=s=>({urgent:10,high:5,normal:2,low:1})[s.priority]||0,d=(s,r=30)=>s.title.length<=r?s.title:`${s.title.substring(0,r)}...`;var t=(s=>(s.MAILTO="mailto",s.SIP="sip",s.TEL="tel",s.WEBHOOK="webhook",s.USERNAME="username",s.ID="id",s.CUSTOM="custom",s.URL="url",s.TELEGRAM="telegram",s.WHATSAPP="whatsapp",s.VIBER="viber",s.SMS="sms",s.FAX="fax",s.TEAMS="teams",s))(t||{});exports.CommunicationScheme=t;exports.getShortTitle=d;exports.getUrgencyScore=g;exports.isAssigned=e;exports.isClosed=l;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './entities/contact';
|
|
|
11
11
|
export * from './entities/inbox';
|
|
12
12
|
export * from './entities/interaction';
|
|
13
13
|
export * from './entities/note';
|
|
14
|
+
export * from './entities/team';
|
|
14
15
|
export * from './entities/organization';
|
|
15
16
|
export * from './entities/transcript';
|
|
16
17
|
export * from './entities/user';
|
|
@@ -27,6 +28,7 @@ export * from './platform/menu';
|
|
|
27
28
|
export * from './platform/reactive';
|
|
28
29
|
export * from './platform/routing';
|
|
29
30
|
export * from './platform/sdk';
|
|
31
|
+
export * from './platform/settings';
|
|
30
32
|
export * from './platform/service-registry';
|
|
31
33
|
export * from './platform/services';
|
|
32
34
|
export * from './platform/ui';
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ const l = (s) => !!s.assignedUserId || !!s.assignedInboxId, g = (s) => s.status
|
|
|
4
4
|
normal: 2,
|
|
5
5
|
low: 1
|
|
6
6
|
})[s.priority] || 0, A = (s, r = 30) => s.title.length <= r ? s.title : `${s.title.substring(0, r)}...`;
|
|
7
|
-
var t = /* @__PURE__ */ ((s) => (s.MAILTO = "mailto", s.SIP = "sip", s.TEL = "tel", s.WEBHOOK = "webhook", s.USERNAME = "username", s.ID = "id", s.CUSTOM = "custom", s.URL = "url", s.TELEGRAM = "telegram", s.WHATSAPP = "whatsapp", s.VIBER = "viber", s.SMS = "sms", s.FAX = "fax", s))(t || {});
|
|
7
|
+
var t = /* @__PURE__ */ ((s) => (s.MAILTO = "mailto", s.SIP = "sip", s.TEL = "tel", s.WEBHOOK = "webhook", s.USERNAME = "username", s.ID = "id", s.CUSTOM = "custom", s.URL = "url", s.TELEGRAM = "telegram", s.WHATSAPP = "whatsapp", s.VIBER = "viber", s.SMS = "sms", s.FAX = "fax", s.TEAMS = "teams", s))(t || {});
|
|
8
8
|
export {
|
|
9
9
|
t as CommunicationScheme,
|
|
10
10
|
A as getShortTitle,
|
|
@@ -58,7 +58,8 @@ export declare enum CommunicationScheme {
|
|
|
58
58
|
WHATSAPP = "whatsapp",
|
|
59
59
|
VIBER = "viber",
|
|
60
60
|
SMS = "sms",
|
|
61
|
-
FAX = "fax"
|
|
61
|
+
FAX = "fax",
|
|
62
|
+
TEAMS = "teams"
|
|
62
63
|
}
|
|
63
64
|
export interface ProviderDescription {
|
|
64
65
|
id?: string;
|
|
@@ -66,9 +67,39 @@ export interface ProviderDescription {
|
|
|
66
67
|
capabilities: Capability[];
|
|
67
68
|
supportedSchemes: CommunicationScheme[];
|
|
68
69
|
}
|
|
70
|
+
export interface PersonalAuthOption {
|
|
71
|
+
id: string;
|
|
72
|
+
label: string;
|
|
73
|
+
description?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface PersonalAuthField {
|
|
76
|
+
name: string;
|
|
77
|
+
label: string;
|
|
78
|
+
type: "text" | "password" | "email" | "url";
|
|
79
|
+
required?: boolean;
|
|
80
|
+
placeholder?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Describes how to connect a personal account for a provider.
|
|
84
|
+
* - mode "redirect": user picks an option → OAuth redirect flow
|
|
85
|
+
* - mode "form": user fills in fields → credentials submitted server-side
|
|
86
|
+
* - mode "unavailable": provider does not support personal connections (or no options configured)
|
|
87
|
+
*/
|
|
88
|
+
export interface PersonalAuthDescription {
|
|
89
|
+
mode: "redirect" | "form" | "unavailable";
|
|
90
|
+
options?: PersonalAuthOption[];
|
|
91
|
+
fields?: PersonalAuthField[];
|
|
92
|
+
message?: string;
|
|
93
|
+
}
|
|
94
|
+
export interface PersonalAuthStartResult {
|
|
95
|
+
redirectUrl?: string;
|
|
96
|
+
success?: boolean;
|
|
97
|
+
message?: string;
|
|
98
|
+
}
|
|
69
99
|
export interface Uri {
|
|
70
100
|
scheme: CommunicationScheme;
|
|
71
101
|
resource: string;
|
|
102
|
+
displayName?: string;
|
|
72
103
|
}
|
|
73
104
|
export interface SessionAction {
|
|
74
105
|
id: string;
|
package/dist/platform/sdk.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { CommsAccount, Session } from './communication';
|
|
|
4
4
|
import { PlatformConfig, PlatformContext } from './kernel';
|
|
5
5
|
import { AudioChunk } from './media';
|
|
6
6
|
import { ServiceCallOptions, ServiceMap } from './services';
|
|
7
|
+
import { DeepPartial, DeviceList, UserSettings } from './settings';
|
|
7
8
|
import { ExtensionConfig, ToastConfig } from './ui';
|
|
8
9
|
type ServiceKey<S extends ServiceMap> = keyof S;
|
|
9
10
|
export type ParamsOf<S extends ServiceMap, K extends ServiceKey<S>> = S[K]['params'];
|
|
@@ -58,12 +59,29 @@ export interface InternalSDK<LocalServices extends ServiceMap = {}, TranslationK
|
|
|
58
59
|
readonly media: {
|
|
59
60
|
localStream$: Observable<MediaStream | null>;
|
|
60
61
|
audioChunks$: Observable<AudioChunk>;
|
|
62
|
+
devices$: Observable<DeviceList>;
|
|
61
63
|
emitAudioChunk(chunk: AudioChunk): void;
|
|
62
64
|
setInputDevice(deviceId: string): Promise<void>;
|
|
63
65
|
toggleMute(mute?: boolean): void;
|
|
64
66
|
attachProviderStream(sessionId: string, stream: MediaStream): void;
|
|
65
67
|
detachStream(sessionId: string): void;
|
|
66
68
|
setAudioOutput(deviceId: string): Promise<void>;
|
|
69
|
+
getInputDevices(): MediaDeviceInfo[];
|
|
70
|
+
getOutputDevices(): MediaDeviceInfo[];
|
|
71
|
+
enumerateDevices(): Promise<void>;
|
|
72
|
+
};
|
|
73
|
+
readonly settings: {
|
|
74
|
+
settings$: Observable<UserSettings>;
|
|
75
|
+
get(): UserSettings;
|
|
76
|
+
update(partial: DeepPartial<UserSettings>): void;
|
|
77
|
+
getIceServers(): RTCIceServer[];
|
|
78
|
+
getAudioInputDeviceId(): string;
|
|
79
|
+
setAudioInputDeviceId(deviceId: string): void;
|
|
80
|
+
getAudioOutputDeviceId(): string;
|
|
81
|
+
setAudioOutputDeviceId(deviceId: string): void;
|
|
82
|
+
getVideoDeviceId(): string;
|
|
83
|
+
setVideoDeviceId(deviceId: string): void;
|
|
84
|
+
setIceServers(servers: RTCIceServer[]): void;
|
|
67
85
|
};
|
|
68
86
|
}
|
|
69
87
|
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export interface UserSettings {
|
|
3
|
+
audio: {
|
|
4
|
+
selectedMicrophone: string;
|
|
5
|
+
selectedSpeaker: string;
|
|
6
|
+
microphoneVolume: number;
|
|
7
|
+
speakerVolume: number;
|
|
8
|
+
};
|
|
9
|
+
video: {
|
|
10
|
+
selectedCamera: string;
|
|
11
|
+
cameraEnabled: boolean;
|
|
12
|
+
videoQuality: string;
|
|
13
|
+
};
|
|
14
|
+
communication: {
|
|
15
|
+
ringtoneEnabled: boolean;
|
|
16
|
+
ringbackEnabled: boolean;
|
|
17
|
+
callWaitingEnabled: boolean;
|
|
18
|
+
autoAnswerCall: boolean;
|
|
19
|
+
iceServers: RTCIceServer[];
|
|
20
|
+
};
|
|
21
|
+
notifications: {
|
|
22
|
+
soundEnabled: boolean;
|
|
23
|
+
desktopNotifications: boolean;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export type DeepPartial<T> = {
|
|
27
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
28
|
+
};
|
|
29
|
+
export interface DeviceList {
|
|
30
|
+
input: MediaDeviceInfo[];
|
|
31
|
+
output: MediaDeviceInfo[];
|
|
32
|
+
}
|
|
33
|
+
export interface ISettingsManager {
|
|
34
|
+
readonly settings$: Observable<UserSettings>;
|
|
35
|
+
get(): UserSettings;
|
|
36
|
+
update(partial: DeepPartial<UserSettings>): void;
|
|
37
|
+
getIceServers(): RTCIceServer[];
|
|
38
|
+
getAudioInputDeviceId(): string;
|
|
39
|
+
setAudioInputDeviceId(deviceId: string): void;
|
|
40
|
+
getAudioOutputDeviceId(): string;
|
|
41
|
+
setAudioOutputDeviceId(deviceId: string): void;
|
|
42
|
+
getVideoDeviceId(): string;
|
|
43
|
+
setVideoDeviceId(deviceId: string): void;
|
|
44
|
+
setIceServers(servers: RTCIceServer[]): void;
|
|
45
|
+
}
|