@opencxh/domain 1.171.0 → 1.172.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/dist/entities/ai-budget/types.d.ts +7 -3
- package/dist/entities/ai-profile/types.d.ts +7 -5
- package/dist/entities/analytics/dashboard.d.ts +1 -1
- package/dist/entities/artifact/types.d.ts +1 -1
- package/dist/entities/calendar-event/types.d.ts +1 -1
- package/dist/entities/communication/message-template.d.ts +1 -1
- package/dist/entities/company/types.d.ts +1 -1
- package/dist/entities/contact/provider.d.ts +2 -1
- package/dist/entities/contact/types.d.ts +1 -10
- package/dist/entities/live-lens/types.d.ts +1 -1
- package/dist/entities/memory/ingest.d.ts +14 -1
- package/dist/entities/memory/kind.d.ts +1 -1
- package/dist/entities/playbook/actor.d.ts +3 -2
- package/dist/entities/playbook/types.d.ts +1 -1
- package/dist/entities/scope/actor.d.ts +16 -0
- package/dist/entities/{note → scope}/index.d.ts +1 -0
- package/dist/entities/scope/scope.test.d.ts +1 -0
- package/dist/entities/scope/types.d.ts +53 -0
- package/dist/entities/task/types.d.ts +1 -1
- package/dist/entities/time-entry/types.d.ts +1 -1
- package/dist/entities/topic/types.d.ts +7 -5
- package/dist/entities/work/types.d.ts +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.d.ts +1 -6
- package/dist/index.js +473 -471
- package/dist/platform/api.d.ts +3 -1
- package/dist/platform/provider.d.ts +0 -61
- package/dist/platform/scope.d.ts +1 -1
- package/dist/platform/settings.d.ts +0 -14
- package/dist/platform/storage.d.ts +1 -1
- package/package.json +1 -4
- package/dist/entities/note/types.d.ts +0 -14
- package/dist/entities/shopify/index.d.ts +0 -1
- package/dist/entities/shopify/types.d.ts +0 -79
- package/dist/platform/lifecycle.d.ts +0 -13
- package/dist/platform/reactive.d.ts +0 -13
- package/dist/platform/sdk.d.ts +0 -182
- package/dist/platform/service-registry.d.ts +0 -13
package/dist/platform/api.d.ts
CHANGED
|
@@ -18,7 +18,9 @@ export interface InvokeOptions {
|
|
|
18
18
|
* mutatie liep gewoon door — de composer maakte zichzelf leeg en de gebruiker dacht dat
|
|
19
19
|
* het bericht verstuurd was. Elke `error:`-handler in de app was daarmee dode code.
|
|
20
20
|
*
|
|
21
|
-
*
|
|
21
|
+
* **Dit staat sinds 2026-08-20 aan als default.** Zet hem op `false` om één aanroep
|
|
22
|
+
* bewust stil te houden — dat is dan een keuze die in de code staat, niet de
|
|
23
|
+
* standaardstand waar iedereen in loopt.
|
|
22
24
|
*/
|
|
23
25
|
throwOnError?: boolean;
|
|
24
26
|
}
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { Interaction } from '../entities/interaction';
|
|
2
2
|
import { Uri } from './communication';
|
|
3
3
|
import { TranscriptSegment } from './media';
|
|
4
|
-
export interface ProviderTranscribeRequest {
|
|
5
|
-
file: Float32Array;
|
|
6
|
-
filename: string;
|
|
7
|
-
mimeType: string;
|
|
8
|
-
accountId?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Vraag segment-niveau output op (timestamps/woorden per segment). Default false:
|
|
11
|
-
* dan komt alleen `text` terug. Aan = provider levert ook `segments` als de
|
|
12
|
-
* onderliggende STT-dienst dat ondersteunt.
|
|
13
|
-
*/
|
|
14
|
-
segments?: boolean;
|
|
15
|
-
}
|
|
16
4
|
export interface ProviderTranscribeResponse {
|
|
17
5
|
/** Volledige transcript-tekst (altijd aanwezig, backwards compatible). */
|
|
18
6
|
text: string;
|
|
@@ -52,11 +40,6 @@ export interface ComposePayload {
|
|
|
52
40
|
*/
|
|
53
41
|
extra?: Record<string, any>;
|
|
54
42
|
}
|
|
55
|
-
export interface ComposeResponse {
|
|
56
|
-
messageId: string;
|
|
57
|
-
type: string;
|
|
58
|
-
payload: any;
|
|
59
|
-
}
|
|
60
43
|
export interface UpsertByExternalProviderIdPayload {
|
|
61
44
|
providerId: string;
|
|
62
45
|
externalIds: string[];
|
|
@@ -71,14 +54,6 @@ export interface SttSettings {
|
|
|
71
54
|
providerId: string;
|
|
72
55
|
providerAccountId?: string;
|
|
73
56
|
}
|
|
74
|
-
export interface TtsSettings {
|
|
75
|
-
providerId: string;
|
|
76
|
-
providerAccountId?: string;
|
|
77
|
-
}
|
|
78
|
-
export interface LlmSettings {
|
|
79
|
-
providerId: string;
|
|
80
|
-
providerAccountId?: string;
|
|
81
|
-
}
|
|
82
57
|
export interface FindByAddressPayload {
|
|
83
58
|
addressUri: {
|
|
84
59
|
scheme: string;
|
|
@@ -99,28 +74,6 @@ export interface FindActivityByExternalProviderIdPayload {
|
|
|
99
74
|
* corresponding provider via these payloads.
|
|
100
75
|
*/
|
|
101
76
|
export type ScheduleResponse = "accepted" | "declined" | "tentative";
|
|
102
|
-
export interface SchedulePayload {
|
|
103
|
-
channelId: string;
|
|
104
|
-
/** Local CalendarEvent without storage-managed fields. */
|
|
105
|
-
event: any;
|
|
106
|
-
}
|
|
107
|
-
export interface ScheduleUpdatePayload {
|
|
108
|
-
channelId: string;
|
|
109
|
-
externalId: string;
|
|
110
|
-
patch: any;
|
|
111
|
-
}
|
|
112
|
-
export interface ScheduleCancelPayload {
|
|
113
|
-
channelId: string;
|
|
114
|
-
externalId: string;
|
|
115
|
-
comment?: string;
|
|
116
|
-
}
|
|
117
|
-
export interface ScheduleRespondPayload {
|
|
118
|
-
channelId: string;
|
|
119
|
-
externalId: string;
|
|
120
|
-
response: ScheduleResponse;
|
|
121
|
-
comment?: string;
|
|
122
|
-
sendResponse?: boolean;
|
|
123
|
-
}
|
|
124
77
|
export interface ScheduleResult {
|
|
125
78
|
externalId?: string;
|
|
126
79
|
/** Provider-side echo for caller persistence (e.g. Graph event id). */
|
|
@@ -142,9 +95,6 @@ export interface FileGetPayload {
|
|
|
142
95
|
filename: string;
|
|
143
96
|
path?: string;
|
|
144
97
|
}
|
|
145
|
-
export interface FileGetResponse {
|
|
146
|
-
file: Uint8Array;
|
|
147
|
-
}
|
|
148
98
|
export interface FileDeletePayload {
|
|
149
99
|
accountId?: string;
|
|
150
100
|
filename: string;
|
|
@@ -153,28 +103,17 @@ export interface FileDeletePayload {
|
|
|
153
103
|
export interface FileDeleteResponse {
|
|
154
104
|
success: boolean;
|
|
155
105
|
}
|
|
156
|
-
export interface FileListPayload {
|
|
157
|
-
accountId?: string;
|
|
158
|
-
path?: string;
|
|
159
|
-
}
|
|
160
106
|
export interface File {
|
|
161
107
|
name: string;
|
|
162
108
|
size: number;
|
|
163
109
|
lastModified: number;
|
|
164
110
|
type: string;
|
|
165
111
|
}
|
|
166
|
-
export interface FileListResponse {
|
|
167
|
-
files: File[];
|
|
168
|
-
}
|
|
169
112
|
export interface FolderCreatePayload {
|
|
170
113
|
accountId?: string;
|
|
171
114
|
name: string;
|
|
172
115
|
path?: string;
|
|
173
116
|
}
|
|
174
|
-
export interface FolderCreateResponse {
|
|
175
|
-
success: boolean;
|
|
176
|
-
url: string;
|
|
177
|
-
}
|
|
178
117
|
export interface ListFilesPayload {
|
|
179
118
|
mimeType?: string;
|
|
180
119
|
name?: string;
|
package/dist/platform/scope.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OwnerScope } from '../entities/
|
|
1
|
+
import { OwnerScope } from '../entities/scope/types';
|
|
2
2
|
import { ActingIdentity } from './identity';
|
|
3
3
|
/** Access decision + whether the scope anchor is team-shared + the SSE audience. */
|
|
4
4
|
export interface ScopeAuth {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
1
|
export interface UserSettings {
|
|
3
2
|
audio: {
|
|
4
3
|
selectedMicrophone: string;
|
|
@@ -30,16 +29,3 @@ export interface DeviceList {
|
|
|
30
29
|
input: MediaDeviceInfo[];
|
|
31
30
|
output: MediaDeviceInfo[];
|
|
32
31
|
}
|
|
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
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencxh/domain",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.172.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -24,9 +24,6 @@
|
|
|
24
24
|
"test:run": "vitest run",
|
|
25
25
|
"test:watch": "vitest --watch"
|
|
26
26
|
},
|
|
27
|
-
"peerDependencies": {
|
|
28
|
-
"rxjs": "^7.8.2"
|
|
29
|
-
},
|
|
30
27
|
"devDependencies": {
|
|
31
28
|
"typescript": "6.0.3",
|
|
32
29
|
"vite": "7.1.7",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Data model for a single Note.
|
|
3
|
-
*/
|
|
4
|
-
export interface Note {
|
|
5
|
-
id: string;
|
|
6
|
-
organizationId: string;
|
|
7
|
-
interactionId: string;
|
|
8
|
-
serviceName: string;
|
|
9
|
-
authorId: string;
|
|
10
|
-
authorDisplayName: string;
|
|
11
|
-
content: string;
|
|
12
|
-
createdAt: Date;
|
|
13
|
-
updatedAt: Date;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './types';
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shopify DTO's — gedeeld tussen de shopify-server (mapping uit Admin API),
|
|
3
|
-
* platform-api (typed client) en de frontend-tool. Geen Shopify-SDK-types
|
|
4
|
-
* lekken naar consumers; dit is de smalle, stabiele contractlaag.
|
|
5
|
-
*/
|
|
6
|
-
export interface ShopifyCustomer {
|
|
7
|
-
id: string;
|
|
8
|
-
firstName?: string;
|
|
9
|
-
lastName?: string;
|
|
10
|
-
email?: string;
|
|
11
|
-
phone?: string;
|
|
12
|
-
ordersCount?: number;
|
|
13
|
-
totalSpent?: string;
|
|
14
|
-
currency?: string;
|
|
15
|
-
/** Klant sinds — ISO-datum uit Shopify. */
|
|
16
|
-
createdAt?: string;
|
|
17
|
-
/** Shopify-klantlabels ("wholesale", "net-30"): segment, betaaltermijn, wat de shop erin zet. */
|
|
18
|
-
tags?: string[];
|
|
19
|
-
defaultAddress?: ShopifyAddress;
|
|
20
|
-
}
|
|
21
|
-
export interface ShopifyLineItem {
|
|
22
|
-
title: string;
|
|
23
|
-
variantTitle?: string;
|
|
24
|
-
quantity: number;
|
|
25
|
-
price: string;
|
|
26
|
-
}
|
|
27
|
-
export interface ShopifyTracking {
|
|
28
|
-
company?: string;
|
|
29
|
-
number?: string;
|
|
30
|
-
url?: string;
|
|
31
|
-
}
|
|
32
|
-
export interface ShopifyAddress {
|
|
33
|
-
name?: string;
|
|
34
|
-
address1?: string;
|
|
35
|
-
address2?: string;
|
|
36
|
-
zip?: string;
|
|
37
|
-
city?: string;
|
|
38
|
-
province?: string;
|
|
39
|
-
country?: string;
|
|
40
|
-
phone?: string;
|
|
41
|
-
}
|
|
42
|
-
export interface ShopifyOrder {
|
|
43
|
-
id: string;
|
|
44
|
-
/** Human order-name, bv. "#1001". */
|
|
45
|
-
name: string;
|
|
46
|
-
createdAt: string;
|
|
47
|
-
financialStatus?: string;
|
|
48
|
-
fulfillmentStatus?: string;
|
|
49
|
-
totalPrice: string;
|
|
50
|
-
/** Opsplitsing van het totaal. Optioneel: oudere orders leveren niet elk veld. */
|
|
51
|
-
subtotalPrice?: string;
|
|
52
|
-
totalShipping?: string;
|
|
53
|
-
totalTax?: string;
|
|
54
|
-
currency: string;
|
|
55
|
-
lineItems: ShopifyLineItem[];
|
|
56
|
-
shippingAddress?: ShopifyAddress;
|
|
57
|
-
tracking: ShopifyTracking[];
|
|
58
|
-
note?: string;
|
|
59
|
-
/** Deep-link naar de order in de Shopify-admin (nieuw tabblad). */
|
|
60
|
-
adminUrl: string;
|
|
61
|
-
}
|
|
62
|
-
export interface ShopifyOrderEvent {
|
|
63
|
-
id: string;
|
|
64
|
-
createdAt: string;
|
|
65
|
-
/** Mensvriendelijke omschrijving van het event. */
|
|
66
|
-
message: string;
|
|
67
|
-
/** Shopify "verb" (bv. "confirmed", "fulfilled", "sale"). */
|
|
68
|
-
verb?: string;
|
|
69
|
-
}
|
|
70
|
-
export interface ShopifyLookupResult {
|
|
71
|
-
/** False = geen verbonden/enabled shop voor deze org (admin moet koppelen). */
|
|
72
|
-
connected: boolean;
|
|
73
|
-
/** De shop waar dit uit komt, bv. "leufgens-shop.myshopify.com". */
|
|
74
|
-
shopDomain?: string;
|
|
75
|
-
customer: ShopifyCustomer | null;
|
|
76
|
-
/** Deep-link naar de klant in de Shopify-admin. */
|
|
77
|
-
customerAdminUrl?: string;
|
|
78
|
-
orders: ShopifyOrder[];
|
|
79
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface AppLifecycle {
|
|
2
|
-
/** * On-load: Registreer services, menu-items en andere metadata.
|
|
3
|
-
* Wordt éénmalig uitgevoerd bij het laden van de JS.
|
|
4
|
-
*/
|
|
5
|
-
setup: () => void;
|
|
6
|
-
/** * On-mount: Render de UI in de meegeleverde container.
|
|
7
|
-
* Wordt uitgevoerd wanneer de gebruiker naar de app navigeert.
|
|
8
|
-
*/
|
|
9
|
-
mount: (container: HTMLElement, props?: any) => void;
|
|
10
|
-
/** * On-unmount: Ruim eventuele listeners of DOM-elementen op.
|
|
11
|
-
*/
|
|
12
|
-
unmount: (container: HTMLElement) => void;
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface Subscriber<T> {
|
|
2
|
-
next: (value?: T) => void;
|
|
3
|
-
error?: (err: any) => void;
|
|
4
|
-
complete?: () => void;
|
|
5
|
-
}
|
|
6
|
-
export interface Observable<T> {
|
|
7
|
-
subscribe(subscriber: Subscriber<T>): () => void;
|
|
8
|
-
}
|
|
9
|
-
export interface Result<T> {
|
|
10
|
-
success: boolean;
|
|
11
|
-
value?: T;
|
|
12
|
-
error?: any;
|
|
13
|
-
}
|
package/dist/platform/sdk.d.ts
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { InvokeOptions, SSEMessage } from './api';
|
|
3
|
-
import { IncomingCallDecision } from './call-lines';
|
|
4
|
-
import { CommsAccount, Session } from './communication';
|
|
5
|
-
import { PlatformConfig, PlatformContext } from './kernel';
|
|
6
|
-
import { AudioPipelineOptions, AudioSegment, MediaPermissionKind, MediaPermissionState, MediaPermissionStatus, TranscriptSegment } from './media';
|
|
7
|
-
import { ServiceCallOptions, ServiceMap } from './services';
|
|
8
|
-
import { DeepPartial, DeviceList, UserSettings } from './settings';
|
|
9
|
-
import { ExtensionConfig, ToastConfig } from './ui';
|
|
10
|
-
type ServiceKey<S extends ServiceMap> = keyof S;
|
|
11
|
-
export type ParamsOf<S extends ServiceMap, K extends ServiceKey<S>> = S[K]['params'];
|
|
12
|
-
export type PayloadOf<S extends ServiceMap, K extends ServiceKey<S>> = S[K]['payload'];
|
|
13
|
-
export type ResponseOf<S extends ServiceMap, K extends ServiceKey<S>> = S[K]['response'];
|
|
14
|
-
export type SSEHandlerOf<S extends ServiceMap, K extends ServiceKey<S>> = (payload: SSEMessage<PayloadOf<S, K>>) => Promise<void>;
|
|
15
|
-
export interface InternalSDK<LocalServices extends ServiceMap = {}, TranslationKeys extends string = string, ModalKeys extends string = string, ExtensionKeys extends string = string> {
|
|
16
|
-
readonly context: PlatformContext;
|
|
17
|
-
readonly config: PlatformConfig;
|
|
18
|
-
readonly services: {
|
|
19
|
-
execute<K extends ServiceKey<LocalServices>>(key: K, options: ServiceCallOptions<ParamsOf<LocalServices, K>, PayloadOf<LocalServices, K>>): Promise<ResponseOf<LocalServices, K>>;
|
|
20
|
-
observe<K extends ServiceKey<LocalServices>>(key: K, options: ServiceCallOptions<ParamsOf<LocalServices, K>, PayloadOf<LocalServices, K>>): Observable<ResponseOf<LocalServices, K>>;
|
|
21
|
-
};
|
|
22
|
-
readonly http: {
|
|
23
|
-
invoke<R = any>(options: InvokeOptions): Promise<R>;
|
|
24
|
-
};
|
|
25
|
-
readonly router: {
|
|
26
|
-
/** Relative to the app's own `/apps/{appName}` prefix. */
|
|
27
|
-
navigate(path: string, options?: any): void;
|
|
28
|
-
/**
|
|
29
|
-
* Straight to a shell path, no prefix.
|
|
30
|
-
*
|
|
31
|
-
* For the app's `public: true` routes: those hang off the manifest's
|
|
32
|
-
* `publicBasePath` (`/help/…`), so the app prefix would point at a page
|
|
33
|
-
* that does not exist.
|
|
34
|
-
*/
|
|
35
|
-
navigateAbsolute(path: string, options?: any): void;
|
|
36
|
-
/**
|
|
37
|
-
* Terug naar de vorige pagina — de echte, inclusief die van een andere app.
|
|
38
|
-
*
|
|
39
|
-
* Waarom dit hier hoort en niet per app: elk detailscherm heeft een terugknop, en zonder
|
|
40
|
-
* gedeelde vorm wordt dat overal een vaste route ("terug" = altijd de lijst) die liegt zodra
|
|
41
|
-
* je van een bord of uit een gesprek komt.
|
|
42
|
-
*
|
|
43
|
-
* `fallback` is app-relatief, net als {@link navigate}, en geldt alleen als er geen vorige
|
|
44
|
-
* pagina ín deze sessie is — dat is precies het geval bij een koud geopende deeplink. Geef je
|
|
45
|
-
* er geen, dan gebeurt er niets: uit het product lopen is geen taak van een terugknop.
|
|
46
|
-
*/
|
|
47
|
-
back(fallback?: string): void;
|
|
48
|
-
/** Is er een vorige pagina in deze sessie? Voor een knop die zichzelf wil verbergen. */
|
|
49
|
-
canGoBack(): boolean;
|
|
50
|
-
currentPath(): string;
|
|
51
|
-
path$: Observable<string>;
|
|
52
|
-
};
|
|
53
|
-
readonly resources: {
|
|
54
|
-
get<T = any>(appName: string, resourceKey: string): Promise<T>;
|
|
55
|
-
};
|
|
56
|
-
readonly localization: {
|
|
57
|
-
/**
|
|
58
|
-
* Vertaal een sleutel.
|
|
59
|
-
*
|
|
60
|
-
* Zonder `:` is het een sleutel van deze app zelf. Mét `:` is hij al genamespaced
|
|
61
|
-
* (`"helpdesk:ticket.added.text"`) en wordt hij ongewijzigd opgezocht — nodig om tekst
|
|
62
|
-
* te tonen die een andere app meestuurde bij iets wat wij renderen.
|
|
63
|
-
*/
|
|
64
|
-
t(key: TranslationKeys | `${string}:${string}`, params?: Record<string, any>): string;
|
|
65
|
-
/**
|
|
66
|
-
* De actieve taal ("nl" | "en").
|
|
67
|
-
*
|
|
68
|
-
* Nodig zodra een app zélf iets moet opmaken in plaats van een sleutel op te
|
|
69
|
-
* zoeken: `Intl.ListFormat` voor een opsomming, `toLocaleTimeString` voor een
|
|
70
|
-
* tijd. Zonder dit viel dat terug op `navigator.language`, die niet meebeweegt
|
|
71
|
-
* als de gebruiker de taal in de app omzet.
|
|
72
|
-
*/
|
|
73
|
-
readonly currentLocale: string;
|
|
74
|
-
};
|
|
75
|
-
readonly ui: {
|
|
76
|
-
modals: {
|
|
77
|
-
open(key: ModalKeys, props?: any): void;
|
|
78
|
-
close(key: ModalKeys): void;
|
|
79
|
-
};
|
|
80
|
-
docks: {
|
|
81
|
-
open(key: string, props?: any): void;
|
|
82
|
-
close(key: string): void;
|
|
83
|
-
minimize(key: string, minimized?: boolean): void;
|
|
84
|
-
expand(key: string, expanded?: boolean): void;
|
|
85
|
-
};
|
|
86
|
-
settings: {
|
|
87
|
-
open(initialPageId?: string): void;
|
|
88
|
-
close(): void;
|
|
89
|
-
};
|
|
90
|
-
toasts: {
|
|
91
|
-
show(config: ToastConfig): void;
|
|
92
|
-
close(id: string): void;
|
|
93
|
-
};
|
|
94
|
-
extensions: {
|
|
95
|
-
getForSlot(slot: string): Observable<ExtensionConfig[]>;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
readonly communication: {
|
|
99
|
-
sessions$: Observable<Session[]>;
|
|
100
|
-
accounts$: Observable<CommsAccount[]>;
|
|
101
|
-
activeSession$: Observable<Session | null>;
|
|
102
|
-
/**
|
|
103
|
-
* Routeert een TransportOp naar de provider die de gegeven session bezit.
|
|
104
|
-
* Vervangt de losse hangupSession/handleSessionAction APIs.
|
|
105
|
-
*/
|
|
106
|
-
dispatchSessionOp(sessionId: string, op: import('./communication').TransportOp): Promise<void>;
|
|
107
|
-
/**
|
|
108
|
-
* Initieert een nieuwe outbound sessie via `session.invite`. Sugar
|
|
109
|
-
* voor `dispatchSessionOp` op het juiste provider; sessieId bestaat
|
|
110
|
-
* pas na invite.
|
|
111
|
-
*/
|
|
112
|
-
invite(target: string, accountId: string): Promise<void>;
|
|
113
|
-
interceptStream(sessionId: string, callback: (stream: MediaStream) => void): Promise<() => void>;
|
|
114
|
-
setActiveSession(sessionId: string): Promise<void>;
|
|
115
|
-
/**
|
|
116
|
-
* Mag dit inkomende gesprek rinkelen? Een transport-provider vraagt dit zodra
|
|
117
|
-
* een invite binnenkomt, vóór het een sessie aanmaakt: het beleid ("zit ik al
|
|
118
|
-
* in een gesprek") kijkt over providers heen, de provider vertaalt alleen het
|
|
119
|
-
* antwoord naar zijn protocol (SIP 486 bijvoorbeeld).
|
|
120
|
-
*/
|
|
121
|
-
admitIncomingCall(options?: {
|
|
122
|
-
exceptSessionId?: string;
|
|
123
|
-
}): Promise<IncomingCallDecision>;
|
|
124
|
-
registerAccount(organizationId: string, userId: string, providerId: string, config: any): Promise<CommsAccount>;
|
|
125
|
-
transcripts: {
|
|
126
|
-
ingest(segments: TranscriptSegment[]): void;
|
|
127
|
-
byCallSession$(sessionId: string): Observable<TranscriptSegment[]>;
|
|
128
|
-
deltas$(sessionId: string): Observable<TranscriptSegment[]>;
|
|
129
|
-
partials$(sessionId: string): Observable<TranscriptSegment>;
|
|
130
|
-
persist(sessionId: string): Promise<void>;
|
|
131
|
-
clear(sessionId: string): void;
|
|
132
|
-
/**
|
|
133
|
-
* `opts.from` is de index waar `segments` in het transcript begint: `0` is het hele
|
|
134
|
-
* transcript, hoger maakt het een delta op wat de ontvanger al heeft. Zonder dat stuurde
|
|
135
|
-
* elke flush (elke ~3s) de complete array opnieuw.
|
|
136
|
-
*/
|
|
137
|
-
setPersister(fn: (sessionId: string, segments: TranscriptSegment[], opts: {
|
|
138
|
-
finalize: boolean;
|
|
139
|
-
from: number;
|
|
140
|
-
}) => Promise<void>): void;
|
|
141
|
-
};
|
|
142
|
-
};
|
|
143
|
-
readonly media: {
|
|
144
|
-
localStream$: Observable<MediaStream | null>;
|
|
145
|
-
audioSegments$: Observable<AudioSegment>;
|
|
146
|
-
devices$: Observable<DeviceList>;
|
|
147
|
-
permissions$: Observable<MediaPermissionStatus>;
|
|
148
|
-
emitAudioSegment(segment: AudioSegment): void;
|
|
149
|
-
configureAudioPipeline(opts: Partial<AudioPipelineOptions>): void;
|
|
150
|
-
setAudioPipelineEnabled(enabled: boolean): void;
|
|
151
|
-
setSessionAudioEnabled(sessionId: string, enabled: boolean): void;
|
|
152
|
-
isSessionAudioPaused(sessionId: string): boolean;
|
|
153
|
-
setInputDevice(deviceId: string): Promise<void>;
|
|
154
|
-
acquireMicStream(deviceId?: string): Promise<MediaStream>;
|
|
155
|
-
deviceChanges$: Observable<string>;
|
|
156
|
-
toggleMute(mute?: boolean): void;
|
|
157
|
-
attachProviderStream(sessionId: string, stream: MediaStream): void;
|
|
158
|
-
detachStream(sessionId: string): void;
|
|
159
|
-
setAudioOutput(deviceId: string): Promise<void>;
|
|
160
|
-
getInputDevices(): MediaDeviceInfo[];
|
|
161
|
-
getOutputDevices(): MediaDeviceInfo[];
|
|
162
|
-
enumerateDevices(): Promise<void>;
|
|
163
|
-
checkPermission(kind: MediaPermissionKind): Promise<MediaPermissionState>;
|
|
164
|
-
requestPermission(kind: MediaPermissionKind): Promise<MediaPermissionState>;
|
|
165
|
-
ensurePermission(kind: MediaPermissionKind): Promise<boolean>;
|
|
166
|
-
refreshPermissions(): Promise<MediaPermissionStatus>;
|
|
167
|
-
};
|
|
168
|
-
readonly settings: {
|
|
169
|
-
settings$: Observable<UserSettings>;
|
|
170
|
-
get(): UserSettings;
|
|
171
|
-
update(partial: DeepPartial<UserSettings>): void;
|
|
172
|
-
getIceServers(): RTCIceServer[];
|
|
173
|
-
getAudioInputDeviceId(): string;
|
|
174
|
-
setAudioInputDeviceId(deviceId: string): void;
|
|
175
|
-
getAudioOutputDeviceId(): string;
|
|
176
|
-
setAudioOutputDeviceId(deviceId: string): void;
|
|
177
|
-
getVideoDeviceId(): string;
|
|
178
|
-
setVideoDeviceId(deviceId: string): void;
|
|
179
|
-
setIceServers(servers: RTCIceServer[]): void;
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Observable } from './reactive';
|
|
2
|
-
export interface Command<TParams = any, TResponse = any> {
|
|
3
|
-
params: TParams;
|
|
4
|
-
response: TResponse;
|
|
5
|
-
}
|
|
6
|
-
export interface Query<TParams = any, TResponse = any> {
|
|
7
|
-
params: TParams;
|
|
8
|
-
response: TResponse;
|
|
9
|
-
}
|
|
10
|
-
export interface ServiceRegistry<TCommands extends Record<string, Command> = any, TQueries extends Record<string, Query> = any> {
|
|
11
|
-
execute<K extends keyof TCommands>(name: K, params: TCommands[K]["params"]): Promise<TCommands[K]["response"]>;
|
|
12
|
-
observe<K extends keyof TQueries>(name: K, params: TQueries[K]["params"]): Observable<TQueries[K]["response"]>;
|
|
13
|
-
}
|