@opencxh/domain 1.171.0 → 1.172.2

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.
Files changed (101) hide show
  1. package/dist/entities/activity/blocks.d.ts +30 -30
  2. package/dist/entities/activity/catalog.d.ts +63 -86
  3. package/dist/entities/activity/descriptor.d.ts +31 -32
  4. package/dist/entities/activity/index.d.ts +2 -2
  5. package/dist/entities/activity/preview.d.ts +7 -7
  6. package/dist/entities/activity/resolve.d.ts +37 -38
  7. package/dist/entities/activity/types.d.ts +34 -34
  8. package/dist/entities/ai-account/types.d.ts +3 -3
  9. package/dist/entities/ai-account/vendors.d.ts +25 -32
  10. package/dist/entities/ai-budget/types.d.ts +12 -8
  11. package/dist/entities/ai-conversation/types.d.ts +12 -12
  12. package/dist/entities/ai-profile/types.d.ts +21 -26
  13. package/dist/entities/ai-settings/types.d.ts +12 -13
  14. package/dist/entities/analytics/dashboard.d.ts +1 -1
  15. package/dist/entities/analytics/index.d.ts +4 -4
  16. package/dist/entities/analytics/source.d.ts +1 -1
  17. package/dist/entities/analytics/usage.d.ts +23 -28
  18. package/dist/entities/artifact/blocks.d.ts +54 -69
  19. package/dist/entities/artifact/markdown.d.ts +2 -3
  20. package/dist/entities/artifact/types.d.ts +47 -55
  21. package/dist/entities/assignment/types.d.ts +74 -88
  22. package/dist/entities/calendar-event/types.d.ts +1 -1
  23. package/dist/entities/channel/index.d.ts +1 -1
  24. package/dist/entities/channel/signature.d.ts +8 -9
  25. package/dist/entities/communication/index.d.ts +1 -1
  26. package/dist/entities/communication/message-template.d.ts +1 -1
  27. package/dist/entities/company/types.d.ts +1 -1
  28. package/dist/entities/contact/index.d.ts +1 -1
  29. package/dist/entities/contact/provider.d.ts +2 -1
  30. package/dist/entities/contact/types.d.ts +1 -10
  31. package/dist/entities/custom-field-def/types.d.ts +14 -14
  32. package/dist/entities/external-identity/types.d.ts +45 -50
  33. package/dist/entities/interaction/index.d.ts +1 -1
  34. package/dist/entities/interaction/types.d.ts +44 -47
  35. package/dist/entities/live-lens/types.d.ts +39 -44
  36. package/dist/entities/mcp/types.d.ts +53 -57
  37. package/dist/entities/memory/alias.d.ts +7 -7
  38. package/dist/entities/memory/browse.d.ts +21 -21
  39. package/dist/entities/memory/ingest.d.ts +26 -17
  40. package/dist/entities/memory/item.d.ts +53 -58
  41. package/dist/entities/memory/kind.d.ts +26 -26
  42. package/dist/entities/memory/query.d.ts +49 -51
  43. package/dist/entities/playbook/actor.d.ts +20 -19
  44. package/dist/entities/playbook/assignment.d.ts +54 -63
  45. package/dist/entities/playbook/index.d.ts +2 -2
  46. package/dist/entities/playbook/labels.d.ts +4 -4
  47. package/dist/entities/playbook/trigger-vars.d.ts +14 -15
  48. package/dist/entities/playbook/types.d.ts +173 -303
  49. package/dist/entities/resource-reminder/types.d.ts +8 -9
  50. package/dist/entities/scope/actor.d.ts +16 -0
  51. package/dist/entities/{note → scope}/index.d.ts +1 -0
  52. package/dist/entities/scope/scope.test.d.ts +1 -0
  53. package/dist/entities/scope/types.d.ts +53 -0
  54. package/dist/entities/task/types.d.ts +1 -1
  55. package/dist/entities/time-entry/duration.d.ts +11 -11
  56. package/dist/entities/time-entry/types.d.ts +60 -60
  57. package/dist/entities/time-entry/work-type.d.ts +21 -24
  58. package/dist/entities/topic/examples.d.ts +26 -27
  59. package/dist/entities/topic/scope.d.ts +11 -12
  60. package/dist/entities/topic/types.d.ts +28 -28
  61. package/dist/entities/user/types.d.ts +24 -28
  62. package/dist/entities/webhook/types.d.ts +6 -6
  63. package/dist/entities/work/keys.d.ts +25 -26
  64. package/dist/entities/work/ladder.d.ts +48 -52
  65. package/dist/entities/work/types.d.ts +109 -115
  66. package/dist/index.cjs +6 -6
  67. package/dist/index.d.ts +29 -33
  68. package/dist/index.js +1391 -1254
  69. package/dist/platform/account.d.ts +34 -38
  70. package/dist/platform/ai-tools.d.ts +48 -52
  71. package/dist/platform/api.d.ts +9 -8
  72. package/dist/platform/author.d.ts +7 -9
  73. package/dist/platform/capabilities.d.ts +3 -3
  74. package/dist/platform/communication.d.ts +163 -204
  75. package/dist/platform/context.d.ts +8 -8
  76. package/dist/platform/identity.d.ts +16 -19
  77. package/dist/platform/kernel.d.ts +1 -1
  78. package/dist/platform/manifest.d.ts +2 -2
  79. package/dist/platform/media.d.ts +13 -15
  80. package/dist/platform/permission.d.ts +39 -0
  81. package/dist/platform/permission.test.d.ts +1 -0
  82. package/dist/platform/presence.d.ts +30 -30
  83. package/dist/platform/provider.d.ts +14 -76
  84. package/dist/platform/resource-source.d.ts +43 -45
  85. package/dist/platform/resource.d.ts +17 -23
  86. package/dist/platform/scope.d.ts +36 -62
  87. package/dist/platform/services.d.ts +4 -4
  88. package/dist/platform/settings.d.ts +0 -14
  89. package/dist/platform/storage.d.ts +2 -2
  90. package/dist/platform/sync-source.d.ts +196 -216
  91. package/dist/platform/transcript-cadence.d.ts +37 -41
  92. package/dist/platform/ui.d.ts +6 -6
  93. package/dist/text/endpoint.d.ts +11 -27
  94. package/package.json +3 -5
  95. package/dist/entities/note/types.d.ts +0 -14
  96. package/dist/entities/shopify/index.d.ts +0 -1
  97. package/dist/entities/shopify/types.d.ts +0 -79
  98. package/dist/platform/lifecycle.d.ts +0 -13
  99. package/dist/platform/reactive.d.ts +0 -13
  100. package/dist/platform/sdk.d.ts +0 -182
  101. package/dist/platform/service-registry.d.ts +0 -13
@@ -18,19 +18,19 @@ export interface HostContext {
18
18
  /** Highest wins when multiple apps claim the same route. */
19
19
  priority?: number;
20
20
  /**
21
- * De interactie waar dit oppervlak over gaat, als er één is.
21
+ * The interaction this surface is about, when there is one.
22
22
  *
23
- * Als **veld** en niet als losse `slices`-sleutel: een paneel dat hierop leunt hoort te
24
- * kunnen vertrouwen dat het er is. `CallTranscriptTab` hing zijn "Opslaan als notitie" hier
25
- * al aan terwijl niemand het vulde, dus die knop was permanent uitgeschakeld — een
26
- * toevallige sleutel geeft geen typefout, een ontbrekend veld wel.
23
+ * As a **field** and not as a loose `slices` key: a panel leaning on this should be able to
24
+ * trust it is there. `CallTranscriptTab` already hung its "save as note" off it while nobody
25
+ * filled it, so that button was permanently disabled — an accidental key gives no type error, a
26
+ * missing field does.
27
27
  */
28
28
  interactionId?: string;
29
29
  /**
30
- * De **live** gesprekssessie, alleen gevuld zolang er een verbinding staat.
30
+ * The **live** call session, only filled while a connection stands.
31
31
  *
32
- * Dit is de sleutel waarmee een paneel zich op `transcripts.deltas$(sessionId)` abonneert.
33
- * Zonder dit veld toonde de transcript-tab altijd de lege staat, ongeacht wat er gezegd werd.
32
+ * This is the key a panel subscribes to `transcripts.deltas$(sessionId)` with. Without this
33
+ * field the transcript tab always showed the empty state, whatever was being said.
34
34
  */
35
35
  sessionId?: string;
36
36
  /** Extra data providers attach (e.g. interaction, activities, transcripts). */
@@ -1,14 +1,13 @@
1
1
  /**
2
- * Namens wie een actie gebeurt.
2
+ * Who an action happens on behalf of.
3
3
  *
4
- * Orthogonaal aan *wie* er belt (dat is `Caller` in `@opencxh/platform-api`): een
5
- * app kan bellen namens een gebruiker, namens een team, of namens de organisatie.
6
- * Een app-to-app call draagt van zichzelf geen bruikbare identiteit — de auth die
7
- * de runtime meestuurt is die van de oorspronkelijke beller, niet van degene
8
- * namens wie gehandeld wordt. Vandaar dit eigen, expliciete kanaal.
4
+ * Orthogonal to *who* is calling (that is `Caller` in `@opencxh/platform-api`): an app can call on
5
+ * behalf of a user, of a team, or of the organisation. An app-to-app call carries no usable
6
+ * identity of its own — the auth the runtime passes along is the original caller's, not that of
7
+ * whoever is being acted for. Hence this separate, explicit channel.
9
8
  *
10
- * `MutationAuthor` wordt hieruit *afgeleid* (attributie is een projectie van
11
- * identiteit), niet parallel bijgehouden. Zie `resolveAuthor`.
9
+ * `MutationAuthor` is *derived* from this (attribution is a projection of identity), not tracked in
10
+ * parallel. See `resolveAuthor`.
12
11
  */
13
12
  export type ActingIdentity = {
14
13
  kind: "user";
@@ -20,23 +19,21 @@ export type ActingIdentity = {
20
19
  kind: "org";
21
20
  };
22
21
  /**
23
- * Compacte, header-veilige vorm: `"user:<id>"` | `"team:<id>"` | `"org"`.
24
- * ASCII, geen JSON — een header hoort geen gestructureerde payload te dragen, en
25
- * dit blijft leesbaar in logs.
22
+ * Compact, header-safe form: `"user:<id>"` | `"team:<id>"` | `"org"`. ASCII, no JSON — a header
23
+ * should not carry a structured payload, and this stays readable in logs.
26
24
  */
27
25
  export declare function formatActingIdentity(actor: ActingIdentity): string;
28
26
  /**
29
- * Leest de compacte vorm terug. Strikt: een onbekende soort, een ontbrekende of
30
- * lege ref levert `undefined` — nooit een gok en nooit een half-gevulde identiteit
31
- * zoals `{ kind: "user", userId: "" }`, want die zou als geldig door een gate
32
- * glippen.
27
+ * Reads the compact form back. Strict: an unknown kind, a missing or empty ref yields `undefined` —
28
+ * never a guess and never a half-filled identity like `{ kind: "user", userId: "" }`, which would
29
+ * slip through a gate as valid.
33
30
  *
34
- * Round-trip: `parseActingIdentity(formatActingIdentity(a))` is diep gelijk aan `a`.
31
+ * Round-trip: `parseActingIdentity(formatActingIdentity(a))` deep-equals `a`.
35
32
  */
36
33
  export declare function parseActingIdentity(raw: string | null | undefined): ActingIdentity | undefined;
37
34
  /**
38
- * Stabiele sleutel om identiteiten te vergelijken of te dedupliceren (bijvoorbeeld
39
- * "één autorisatie-call per distincte actor"). Gelijk aan de wire-vorm; apart
40
- * genoemd omdat de bedoeling anders is dan transporteren.
35
+ * Stable key for comparing or deduplicating identities ("one authorization call per distinct
36
+ * actor", say). Identical to the wire form; named separately because the intent differs from
37
+ * transporting.
41
38
  */
42
39
  export declare function actingIdentityKey(actor: ActingIdentity): string;
@@ -4,7 +4,7 @@ export interface PlatformContext {
4
4
  user: User | null;
5
5
  activeOrg: Organization | null;
6
6
  availableOrganizations: Organization[];
7
- env: 'production' | 'staging' | 'dev';
7
+ env: "production" | "staging" | "dev";
8
8
  locale: string;
9
9
  isAuthenticated: boolean;
10
10
  isOrgSelected: boolean;
@@ -53,7 +53,7 @@ export interface AppManifest<TSDK = any> {
53
53
  /**
54
54
  * The framework of the application.
55
55
  */
56
- framework?: 'react' | 'svelte' | 'other';
56
+ framework?: "react" | "svelte" | "other";
57
57
  /**
58
58
  * Optional short description of the application.
59
59
  */
@@ -93,7 +93,7 @@ export interface AppManifest<TSDK = any> {
93
93
  /**
94
94
  * Optional documentation URL for the application.
95
95
  */
96
- visibility?: 'public' | 'private';
96
+ visibility?: "public" | "private";
97
97
  /**
98
98
  * Defines the security permissions for this app. The SDK will deny any
99
99
  * action not explicitly granted here, following the principle of least privilege.
@@ -1,4 +1,4 @@
1
- export type Speaker = 'local' | 'remote';
1
+ export type Speaker = "local" | "remote";
2
2
  export interface AudioSegment {
3
3
  sessionId: string;
4
4
  speaker: Speaker;
@@ -10,14 +10,13 @@ export interface AudioSegment {
10
10
  avgRMS: number;
11
11
  isFinal: boolean;
12
12
  /**
13
- * Dit segment begint midden in een lopende zin, omdat de VAD op
14
- * `maxSpeechDurationMs` hard moest knippen in plaats van op een stilte.
13
+ * This segment starts mid-sentence, because the VAD had to cut hard on
14
+ * `maxSpeechDurationMs` instead of on a silence.
15
15
  *
16
- * Dit is het enige geval waarin twee opeenvolgende segmenten elkaars tekst kunnen
17
- * overlappen, en dus het enige geval waarin de naad geplakt moet worden. Een knip op
18
- * stilte valt tussen twee woorden: daar valt niets te ontdubbelen. Zonder deze vlag
19
- * moest de ontvanger dat verschil raden, en dat raden was de hele reden dat er drie
20
- * fuzzy dedupe-lagen bestonden.
16
+ * The only case in which two consecutive segments can overlap each other's text, and therefore
17
+ * the only case in which the seam has to be glued. A cut on silence falls between two words:
18
+ * nothing to deduplicate there. Without this flag the receiver had to guess that difference, and
19
+ * that guessing was the whole reason three fuzzy dedupe layers existed.
21
20
  */
22
21
  continuesPrevious?: boolean;
23
22
  }
@@ -29,10 +28,9 @@ export interface TranscriptWord {
29
28
  export interface TranscriptSegment {
30
29
  sessionId: string;
31
30
  /**
32
- * Alleen gezet als bekend is wie lokaal/remote spreekt (live calls). Bij
33
- * batch- of gediarizeerde transcriptie weten we dat niet — dan blijft dit leeg
34
- * en gebruikt de UI `speakerLabel`/`speakerId` als tag (Fireflies-stijl, geen
35
- * links/rechts-alignment).
31
+ * Only set when it is known who speaks locally/remotely (live calls). With batch or diarized
32
+ * transcription we do not know — then this stays empty and the UI uses
33
+ * `speakerLabel`/`speakerId` as a tag (Fireflies style, no left/right alignment).
36
34
  */
37
35
  speaker?: Speaker;
38
36
  speakerId?: string;
@@ -44,7 +42,7 @@ export interface TranscriptSegment {
44
42
  endedAt: number;
45
43
  language?: string;
46
44
  confidence?: number;
47
- /** Zie {@link AudioSegment.continuesPrevious} — reist mee zodat de store de naad kent. */
45
+ /** See {@link AudioSegment.continuesPrevious} — travels along so the store knows the seam. */
48
46
  continuesPrevious?: boolean;
49
47
  }
50
48
  export interface AudioPipelineOptions {
@@ -53,9 +51,9 @@ export interface AudioPipelineOptions {
53
51
  speechFrameRatio: number;
54
52
  silenceDurationMs: number;
55
53
  maxSpeechDurationMs: number;
56
- /** Naad-overlap, uitsluitend toegepast na een harde `maxSpeechDurationMs`-knip. */
54
+ /** Seam overlap, applied only after a hard `maxSpeechDurationMs` cut. */
57
55
  overlapMs: number;
58
- /** Audio die vóór de spraak-onset bewaard blijft, zodat de eerste klank niet wegvalt. */
56
+ /** Audio kept before the speech onset, so the first sound is not lost. */
59
57
  preRollMs: number;
60
58
  }
61
59
  export type MediaPermissionKind = "microphone" | "camera";
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The platform-wide permission vocabulary — the only place permission strings are declared.
3
+ *
4
+ * The shape is the locked `resource.action` convention, dot-separated and WITHOUT an app prefix:
5
+ * the app key comes from the router (`routes(app, APP)` in platform-api passes it once), and
6
+ * grants in `auth.permissions` are grouped per app (`Record<app, string[]>`), so the string itself
7
+ * need not repeat the app. Verbs are `read` / `write` / `publish` — no create/update/delete split;
8
+ * `write` covers every mutation. A third segment (like `billing.write`) is field level within a
9
+ * resource.
10
+ *
11
+ * `as const` and not an enum or a loose union: the declaration sites want literal types (a typo in
12
+ * `permissions: ["inbox.wirte"]` has to go red), and the runtime value is needed for tests and
13
+ * later for seeding roles.
14
+ */
15
+ export declare const APP_PERMISSIONS: {
16
+ readonly ai: readonly ["account.read", "account.write", "agent.read", "agent.write", "assignment.read", "budget.read", "budget.write", "connector.read", "connector.write", "context.read", "context.write", "conversation.read", "conversation.write", "lens.read", "lens.write", "message.read", "message.write", "playbook.read", "playbook.write", "profile.read", "profile.write", "run.read", "run.write", "settings.read", "settings.write", "tool.read", "transcript.write", "usage.read"];
17
+ readonly analytics: readonly ["report.read"];
18
+ readonly "app-store": readonly ["app.publish", "app.read", "app.write", "setting.read", "setting.write"];
19
+ readonly automations: readonly ["sync.read", "sync.write", "webhook.read", "webhook.write"];
20
+ readonly communication: readonly ["account.read", "account.write", "activity-type.read", "activity.read", "activity.write", "attachment.read", "attribute.read", "attribute.write", "calendar.read", "calendar.write", "channel.read", "channel.write", "custom-field.read", "custom-field.write", "folder.read", "folder.write", "inbox.read", "inbox.write", "interaction.read", "interaction.write", "reminder.read", "task.read", "task.write", "template.read", "template.write", "topic.read", "topic.write"];
21
+ readonly context: readonly ["kind.read", "kind.write", "memory.read", "memory.write"];
22
+ readonly crm: readonly ["company.read", "company.write", "contact.read", "contact.write"];
23
+ readonly "eylo-voip": readonly ["account.read", "account.write", "callflow.read", "callflow.write", "channel.read", "channel.write", "contact.read", "contact.write", "device.read", "device.write", "group.read", "group.write", "interaction.read", "interaction.write", "media.read", "media.write", "menu.read", "menu.write", "phone-number.read", "phone-number.write", "recording.read", "recording.write", "sip.read", "temporal-rule.read", "temporal-rule.write", "user.read", "user.write", "vmbox.read", "vmbox.write", "webhook.read", "webhook.write"];
24
+ readonly google: readonly ["account.read", "account.write", "contact.read"];
25
+ readonly kb: readonly ["article.read", "article.write", "category.read", "category.write", "help-center.read", "help-center.write", "kb.read", "kb.write"];
26
+ readonly mail: readonly ["account.write"];
27
+ readonly meta: readonly ["account.read", "account.write"];
28
+ readonly microsoft: readonly ["account.read", "account.write", "contact.read", "sync.write"];
29
+ readonly organization: readonly ["billing.read", "billing.write", "settings.read", "settings.write", "team.read", "team.write"];
30
+ readonly shopify: readonly ["account.read", "account.write", "order.read"];
31
+ readonly slack: readonly ["thread.read", "thread.write"];
32
+ readonly storage: readonly ["artifact.read", "artifact.write", "file.read", "file.write", "mount.read", "mount.write"];
33
+ readonly time: readonly ["entry.read", "entry.write", "work-type.read", "work-type.write"];
34
+ readonly user: readonly ["user.read", "user.write"];
35
+ readonly work: readonly ["item.read", "item.write", "project.read", "project.write"];
36
+ };
37
+ export type PermissionApp = keyof typeof APP_PERMISSIONS;
38
+ /** One app's permission strings, as a literal union (`"inbox.read" | "inbox.write"`). */
39
+ export type PermissionOf<A extends PermissionApp> = (typeof APP_PERMISSIONS)[A][number];
@@ -0,0 +1 @@
1
+ export {};
@@ -98,37 +98,37 @@ export interface AgeablePresence {
98
98
  */
99
99
  export declare function agePresenceEntry<T extends AgeablePresence>(entry: T, now: number): T;
100
100
  /**
101
- * Voor welk **team** iemand nu werkt.
101
+ * Which **team** someone is working for right now.
102
102
  *
103
- * De rol van een medewerker is een eigenschap van de persoon en niet van het gesprek: een
104
- * support-medewerker doet meestal één ding, en op een persoonlijk kanaal is er niets aan het
105
- * gesprek af te lezen. Deze instelling staat naast presence om dezelfde reden dat presence
106
- * bestaat — het is "hoe ben ik nu", niet "wie ben ik".
103
+ * An agent's role is a property of the person and not of the conversation: a support agent usually
104
+ * does one thing, and on a personal channel there is nothing to read off the conversation. This
105
+ * setting sits next to presence for the same reason presence exists — it is "how am I now", not
106
+ * "who am I".
107
107
  *
108
- * Waarde is een `teamId` en geen profielverwijzing: team is de scope waar profielen, onderwerpen,
109
- * workflows en inboxen al op gescoped zijn, en het is ook wat een gerouteerd gesprek oplevert
110
- * (`assignedInboxId` → `Inbox.teamId`). Eén keuze lost ze allemaal consistent op.
108
+ * The value is a `teamId` and not a profile reference: team is the scope profiles, topics,
109
+ * workflows and inboxes are already scoped on, and it is also what a routed conversation yields
110
+ * (`assignedInboxId` → `Inbox.teamId`). One choice resolves them all consistently.
111
111
  */
112
112
  export interface WorkMode {
113
113
  userId: string;
114
114
  teamId: string;
115
- /** `"manual"` of een bron die het namens de gebruiker zette (een rooster, later). */
115
+ /** `"manual"` or a source that set it on the user's behalf (a schedule, later). */
116
116
  source: string;
117
117
  }
118
118
  /**
119
- * Voor welk team deze gebruiker nu werkt, en of hij daarvoor iets moet kiezen.
119
+ * Which team this user is working for right now, and whether they have to choose one first.
120
120
  *
121
- * Drie uitkomsten, en de derde is het hele punt:
121
+ * Three outcomes, and the third is the whole point:
122
122
  *
123
- * - **`teamId`** — óf expliciet gezet, óf impliciet omdat er maar één team is. Wie één ding doet
124
- * hoeft nooit iets in te stellen.
125
- * - **`undefined` met `mustChoose: false`** — geen enkel team; er is niets te kiezen en niets te
126
- * doen.
127
- * - **`undefined` met `mustChoose: true`** — meer dan één team en niets gekozen. Dan hoort een
128
- * oppervlak dat op de rol leunt te **zwijgen** in plaats van er één te raden: fout gokken is
129
- * erger dan niets tonen, en dat is dezelfde fail-closed regel als bij de account↔kanaal-binding.
123
+ * - **`teamId`** — either set explicitly, or implicit because there is only one team. Whoever does
124
+ * one thing never has to configure anything.
125
+ * - **`undefined` with `mustChoose: false`** — no team at all; there is nothing to choose and
126
+ * nothing to do.
127
+ * - **`undefined` with `mustChoose: true`** — more than one team and nothing chosen. A surface
128
+ * leaning on the role should then **stay quiet** instead of guessing one: guessing wrong is
129
+ * worse than showing nothing, the same fail-closed rule as the account↔channel binding.
130
130
  *
131
- * Pure functie, want dit is de enige echte beslissing in de werkmodus — de rest is opslag.
131
+ * A pure function, because this is the only real decision in the work mode — the rest is storage.
132
132
  */
133
133
  export declare function resolveWorkMode(stored: {
134
134
  teamId?: string;
@@ -137,20 +137,20 @@ export declare function resolveWorkMode(stored: {
137
137
  mustChoose: boolean;
138
138
  };
139
139
  /**
140
- * Mag de audio-pijplijn lopen — en dus: mag er meegelezen worden?
140
+ * May the audio pipeline run — and therefore: may anything listen along?
141
141
  *
142
- * Twee onafhankelijke voorwaarden, en dat is precies waarom dit een functie is en geen `&&` op
143
- * de plek van gebruik:
142
+ * Two independent conditions, which is exactly why this is a function and not an `&&` at the point
143
+ * of use:
144
144
  *
145
- * - **`providerAvailable`** — is er een STT-provider geregistreerd. Dat was tot nu toe de énige
146
- * voorwaarde, en daarmee was "de AI-app is geïnstalleerd" hetzelfde als "we luisteren mee bij
147
- * elk gesprek, org-breed". Een technische toevalligheid als beleid.
148
- * - **`allowed`** — wil de organisatie dat. Een assistent die ongevraagd meeleest hoort niet te
149
- * bestaan zonder dat je hem kunt stoppen.
145
+ * - **`providerAvailable`** — is an STT provider registered. That used to be the *only* condition,
146
+ * making "the AI app is installed" the same as "we listen in on every call, org-wide". A
147
+ * technical accident as policy.
148
+ * - **`allowed`** — does the organisation want it. An assistant listening unasked should not exist
149
+ * without a way to stop it.
150
150
  *
151
- * De gate wordt elke twee seconden opnieuw geasserteerd (federated remotes kunnen hun handler
152
- * later registreren dan deze app boot), dus een schakelaar die niet in deze functie zit racet
153
- * tegen die tik en gaat vanzelf weer aan.
151
+ * The gate is re-asserted every two seconds (federated remotes may register their handler later
152
+ * than this app boots), so a switch that is not inside this function races that tick and turns
153
+ * itself back on.
154
154
  */
155
155
  export declare function shouldRunAudioPipeline(input: {
156
156
  providerAvailable: boolean;
@@ -1,25 +1,12 @@
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
- /** Volledige transcript-tekst (altijd aanwezig, backwards compatible). */
5
+ /** Full transcript text (always present, backwards compatible). */
18
6
  text: string;
19
7
  /**
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).
8
+ * Segment-level transcript, only filled when `segments` was requested and the provider supports
9
+ * it. `sessionId` is filled in by the consumer (the provider does not know the call session).
23
10
  */
24
11
  segments?: TranscriptSegment[];
25
12
  }
@@ -29,14 +16,14 @@ export interface ComposePayload {
29
16
  channelId: string;
30
17
  channelUri?: Uri;
31
18
  /**
32
- * Adressering-envelope. `to` verplicht (1+); `cc`/`bcc` alleen voor
33
- * mail. Niet-mail providers gebruiken `to[0]`.
19
+ * Addressing envelope. `to` is required (1+); `cc`/`bcc` are mail only. Non-mail providers use
20
+ * `to[0]`.
34
21
  */
35
22
  recipients: import('./communication').RecipientList;
36
23
  subject?: string;
37
24
  /**
38
- * Uitgaande bijlagen (base64 + filename + mimeType). Compose-handlers
39
- * geven ze door aan de provider-send; metadata belandt op de Activity.
25
+ * Outgoing attachments (base64 + filename + mimeType). Compose handlers pass them to the
26
+ * provider send; the metadata lands on the Activity.
40
27
  */
41
28
  attachments?: import('./communication').OutgoingAttachment[];
42
29
  /**
@@ -52,11 +39,6 @@ export interface ComposePayload {
52
39
  */
53
40
  extra?: Record<string, any>;
54
41
  }
55
- export interface ComposeResponse {
56
- messageId: string;
57
- type: string;
58
- payload: any;
59
- }
60
42
  export interface UpsertByExternalProviderIdPayload {
61
43
  providerId: string;
62
44
  externalIds: string[];
@@ -71,14 +53,6 @@ export interface SttSettings {
71
53
  providerId: string;
72
54
  providerAccountId?: string;
73
55
  }
74
- export interface TtsSettings {
75
- providerId: string;
76
- providerAccountId?: string;
77
- }
78
- export interface LlmSettings {
79
- providerId: string;
80
- providerAccountId?: string;
81
- }
82
56
  export interface FindByAddressPayload {
83
57
  addressUri: {
84
58
  scheme: string;
@@ -99,28 +73,6 @@ export interface FindActivityByExternalProviderIdPayload {
99
73
  * corresponding provider via these payloads.
100
74
  */
101
75
  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
76
  export interface ScheduleResult {
125
77
  externalId?: string;
126
78
  /** Provider-side echo for caller persistence (e.g. Graph event id). */
@@ -142,9 +94,6 @@ export interface FileGetPayload {
142
94
  filename: string;
143
95
  path?: string;
144
96
  }
145
- export interface FileGetResponse {
146
- file: Uint8Array;
147
- }
148
97
  export interface FileDeletePayload {
149
98
  accountId?: string;
150
99
  filename: string;
@@ -153,28 +102,17 @@ export interface FileDeletePayload {
153
102
  export interface FileDeleteResponse {
154
103
  success: boolean;
155
104
  }
156
- export interface FileListPayload {
157
- accountId?: string;
158
- path?: string;
159
- }
160
105
  export interface File {
161
106
  name: string;
162
107
  size: number;
163
108
  lastModified: number;
164
109
  type: string;
165
110
  }
166
- export interface FileListResponse {
167
- files: File[];
168
- }
169
111
  export interface FolderCreatePayload {
170
112
  accountId?: string;
171
113
  name: string;
172
114
  path?: string;
173
115
  }
174
- export interface FolderCreateResponse {
175
- success: boolean;
176
- url: string;
177
- }
178
116
  export interface ListFilesPayload {
179
117
  mimeType?: string;
180
118
  name?: string;
@@ -182,17 +120,17 @@ export interface ListFilesPayload {
182
120
  path?: string;
183
121
  }
184
122
  /**
185
- * Kijken over mappen heen in plaats van in één map (`POST storage/file/browse`).
123
+ * Looking across folders instead of inside one (`POST storage/file/browse`).
186
124
  *
187
- * Geen `mountId` en geen `path`: de vraag is juist "waar dan ook waar ik mag
188
- * kijken". De server bepaalt zelf welke mappen dat zijn — zie `readableMounts`.
125
+ * No `mountId` and no `path`: the question is precisely "anywhere I am allowed to look". The
126
+ * server decides which folders those are — see `readableMounts`.
189
127
  */
190
128
  export interface BrowseFilesPayload {
191
- /** Vrije tekst op de bestandsnaam; hoofdletterongevoelig, deelreeks. */
129
+ /** Free text on the file name; case-insensitive, substring. */
192
130
  name?: string;
193
- /** `mine` beperkt tot wat je zelf hebt toegevoegd; standaard alles. */
131
+ /** `mine` restricts to what you added yourself; everything by default. */
194
132
  scope?: "all" | "mine";
195
- /** Plafond op het aantal rijen; de server kapt hem af op zijn eigen maximum. */
133
+ /** Ceiling on the number of rows; the server truncates it at its own maximum. */
196
134
  limit?: number;
197
135
  }
198
136
  export interface DownloadAttachmentPayload {
@@ -200,6 +138,6 @@ export interface DownloadAttachmentPayload {
200
138
  accountId?: string;
201
139
  path?: string;
202
140
  id?: string;
203
- /** Conversatie-id (Teams chatId) — nodig om chat-hostedContent te proxyen. */
141
+ /** Conversation id (Teams chatId) — needed to proxy chat hostedContent. */
204
142
  conversationId?: string;
205
143
  }