@opencxh/domain 1.47.0 → 1.50.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.
@@ -71,11 +71,17 @@ export type AuthState = {
71
71
  } | {
72
72
  type: "password";
73
73
  username: string;
74
- /** Reference into secret-store; never the raw password. */
75
- passwordRef: string;
74
+ /** Rauw wachtwoord (geen secret-store in repo). Alleen via internal-path. */
75
+ password: string;
76
+ /** Toekomstige secret-store-referentie i.p.v. raw `password`. */
77
+ passwordRef?: string;
76
78
  } | {
77
79
  type: "certificate";
78
80
  certRef: string;
81
+ } | {
82
+ type: "apikey";
83
+ /** Rauwe API-key (geen secret-store in repo). Alleen via internal-path. */
84
+ apiKey: string;
79
85
  } | {
80
86
  type: "static";
81
87
  };
@@ -86,7 +92,7 @@ export interface ManagedAccount {
86
92
  /** null = org-level account (geen specifieke user). */
87
93
  userId?: string;
88
94
  providerId: string;
89
- /** "oauth2" | "imap" | "sip" | "webhook" | provider-eigen string */
95
+ /** "oauth2" | "imap" | "sip" | "webhook" | "apikey" | provider-eigen string */
90
96
  protocol: string;
91
97
  displayName: string;
92
98
  status: ManagedAccountStatus;
@@ -267,6 +267,17 @@ export interface RecipientList {
267
267
  /** Blind carbon-copy. Alleen mail-flow. */
268
268
  bcc?: Uri[];
269
269
  }
270
+ /**
271
+ * Uitgaande bijlage zoals de client 'm aanlevert: base64-content + naam +
272
+ * mime-type. `content` is kale base64 (geen `data:`-prefix). Providers embedden
273
+ * de string direct (Graph `contentBytes`, Gmail MIME-part) zonder re-encode.
274
+ */
275
+ export interface OutgoingAttachment {
276
+ filename: string;
277
+ mimeType: string;
278
+ /** Kale base64, zonder `data:<mime>;base64,`-prefix. */
279
+ content: string;
280
+ }
270
281
  export interface NoteBody {
271
282
  text: string;
272
283
  visibility?: "internal" | "team";
@@ -17,7 +17,13 @@ export interface TranscriptWord {
17
17
  }
18
18
  export interface TranscriptSegment {
19
19
  sessionId: string;
20
- speaker: Speaker;
20
+ /**
21
+ * Alleen gezet als bekend is wie lokaal/remote spreekt (live calls). Bij
22
+ * batch- of gediarizeerde transcriptie weten we dat niet — dan blijft dit leeg
23
+ * en gebruikt de UI `speakerLabel`/`speakerId` als tag (Fireflies-stijl, geen
24
+ * links/rechts-alignment).
25
+ */
26
+ speaker?: Speaker;
21
27
  speakerId?: string;
22
28
  speakerLabel?: string;
23
29
  text: string;
@@ -1,13 +1,27 @@
1
1
  import { Interaction } from '../entities/interaction';
2
2
  import { Uri } from './communication';
3
+ import { TranscriptSegment } from './media';
3
4
  export interface ProviderTranscribeRequest {
4
5
  file: Float32Array;
5
6
  filename: string;
6
7
  mimeType: string;
7
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;
8
15
  }
9
16
  export interface ProviderTranscribeResponse {
10
- transcript: string;
17
+ /** Volledige transcript-tekst (altijd aanwezig, backwards compatible). */
18
+ text: string;
19
+ /**
20
+ * Segment-niveau transcript, alleen gevuld als `segments` was aangevraagd én de
21
+ * provider het ondersteunt. `sessionId` wordt door de consumer ingevuld (de
22
+ * provider kent de call-session niet).
23
+ */
24
+ segments?: TranscriptSegment[];
11
25
  }
12
26
  export interface ComposePayload {
13
27
  interactionId?: string;
@@ -20,6 +34,11 @@ export interface ComposePayload {
20
34
  */
21
35
  recipients: import('./communication').RecipientList;
22
36
  subject?: string;
37
+ /**
38
+ * Uitgaande bijlagen (base64 + filename + mimeType). Compose-handlers
39
+ * geven ze door aan de provider-send; metadata belandt op de Activity.
40
+ */
41
+ attachments?: import('./communication').OutgoingAttachment[];
23
42
  /**
24
43
  * The user-intent picked in the starter / contact buttons. Lets a
25
44
  * provider compose-handler dispatch on intent — e.g. a Microsoft
@@ -167,4 +186,6 @@ export interface DownloadAttachmentPayload {
167
186
  accountId?: string;
168
187
  path?: string;
169
188
  id?: string;
189
+ /** Conversatie-id (Teams chatId) — nodig om chat-hostedContent te proxyen. */
190
+ conversationId?: string;
170
191
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencxh/domain",
3
- "version": "1.47.0",
3
+ "version": "1.50.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",