@opencxh/domain 1.112.0 → 1.113.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.
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export type SessionState = 'idle' | 'ringing' | 'connecting' | 'connected' | 'on_hold' | 'ended' | 'failed';
|
|
2
|
+
/**
|
|
3
|
+
* `"appName:ResourceName"` — how the platform addresses a federated resource.
|
|
4
|
+
* Not to be confused with the read-state `ResourceRef`, which points at a
|
|
5
|
+
* domain object rather than at a piece of UI.
|
|
6
|
+
*/
|
|
7
|
+
export type FederatedResourceRef = `${string}:${string}`;
|
|
2
8
|
export interface Session {
|
|
3
9
|
id: string;
|
|
4
10
|
accountId: string;
|
|
@@ -25,8 +31,8 @@ export interface Session {
|
|
|
25
31
|
*/
|
|
26
32
|
externalId?: string;
|
|
27
33
|
ui: {
|
|
28
|
-
canvas:
|
|
29
|
-
actionTray?:
|
|
34
|
+
canvas: FederatedResourceRef;
|
|
35
|
+
actionTray?: FederatedResourceRef;
|
|
30
36
|
};
|
|
31
37
|
}
|
|
32
38
|
export interface CommsAccount<T = any> {
|
|
@@ -278,6 +284,37 @@ export declare const InteractionParticipantRole: {
|
|
|
278
284
|
readonly PARTICIPANT: "participant";
|
|
279
285
|
};
|
|
280
286
|
export type InteractionParticipantRoleValue = typeof InteractionParticipantRole[keyof typeof InteractionParticipantRole];
|
|
287
|
+
/** Props the host passes to a provider's `ui.actionTray` resource. */
|
|
288
|
+
export interface CallActionTrayProps {
|
|
289
|
+
session: Session;
|
|
290
|
+
account?: CommsAccount;
|
|
291
|
+
/**
|
|
292
|
+
* Resource currently shown in place of `ui.canvas`, or null for the canvas
|
|
293
|
+
* itself. The canvas and the tray are separate federated resources and
|
|
294
|
+
* cannot hold state between them, so the host holds this one value and both
|
|
295
|
+
* sides speak the same currency they already use for `ui.canvas`: a
|
|
296
|
+
* resource reference.
|
|
297
|
+
*
|
|
298
|
+
* Deliberately a reference and not an enum of known panels. A keypad or a
|
|
299
|
+
* transfer form is not the same everywhere — a provider that transfers to a
|
|
300
|
+
* directory rather than to a dialled number points this at its own
|
|
301
|
+
* resource, and a provider that can do neither leaves the affordance out.
|
|
302
|
+
* `communication:CallKeypad` and `communication:CallTransfer` are there to
|
|
303
|
+
* be reused by any provider that wants the plain ones.
|
|
304
|
+
*
|
|
305
|
+
* Both are absent when the host does not support overriding the canvas; a
|
|
306
|
+
* tray must then not offer the affordance.
|
|
307
|
+
*/
|
|
308
|
+
canvasOverride?: FederatedResourceRef | null;
|
|
309
|
+
onCanvasOverride?: (resource: FederatedResourceRef | null) => void;
|
|
310
|
+
}
|
|
311
|
+
/** Props the host passes to a resource shown via `canvasOverride`. */
|
|
312
|
+
export interface CallCanvasOverrideProps {
|
|
313
|
+
session: Session;
|
|
314
|
+
account?: CommsAccount;
|
|
315
|
+
/** Return to the provider's own canvas. */
|
|
316
|
+
onClose: () => void;
|
|
317
|
+
}
|
|
281
318
|
export interface SessionAction {
|
|
282
319
|
id: string;
|
|
283
320
|
label: string;
|