@opencxh/domain 1.172.1 → 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 (82) 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 +5 -5
  11. package/dist/entities/ai-conversation/types.d.ts +12 -12
  12. package/dist/entities/ai-profile/types.d.ts +14 -21
  13. package/dist/entities/ai-settings/types.d.ts +12 -13
  14. package/dist/entities/analytics/index.d.ts +4 -4
  15. package/dist/entities/analytics/source.d.ts +1 -1
  16. package/dist/entities/analytics/usage.d.ts +23 -28
  17. package/dist/entities/artifact/blocks.d.ts +54 -69
  18. package/dist/entities/artifact/markdown.d.ts +2 -3
  19. package/dist/entities/artifact/types.d.ts +46 -54
  20. package/dist/entities/assignment/types.d.ts +74 -88
  21. package/dist/entities/channel/index.d.ts +1 -1
  22. package/dist/entities/channel/signature.d.ts +8 -9
  23. package/dist/entities/communication/index.d.ts +1 -1
  24. package/dist/entities/contact/index.d.ts +1 -1
  25. package/dist/entities/custom-field-def/types.d.ts +14 -14
  26. package/dist/entities/external-identity/types.d.ts +45 -50
  27. package/dist/entities/interaction/index.d.ts +1 -1
  28. package/dist/entities/interaction/types.d.ts +44 -47
  29. package/dist/entities/live-lens/types.d.ts +39 -44
  30. package/dist/entities/mcp/types.d.ts +53 -57
  31. package/dist/entities/memory/alias.d.ts +7 -7
  32. package/dist/entities/memory/browse.d.ts +21 -21
  33. package/dist/entities/memory/ingest.d.ts +24 -28
  34. package/dist/entities/memory/item.d.ts +53 -58
  35. package/dist/entities/memory/kind.d.ts +25 -25
  36. package/dist/entities/memory/query.d.ts +49 -51
  37. package/dist/entities/playbook/actor.d.ts +17 -17
  38. package/dist/entities/playbook/assignment.d.ts +54 -63
  39. package/dist/entities/playbook/index.d.ts +2 -2
  40. package/dist/entities/playbook/labels.d.ts +4 -4
  41. package/dist/entities/playbook/trigger-vars.d.ts +14 -15
  42. package/dist/entities/playbook/types.d.ts +172 -302
  43. package/dist/entities/resource-reminder/types.d.ts +8 -9
  44. package/dist/entities/time-entry/duration.d.ts +11 -11
  45. package/dist/entities/time-entry/types.d.ts +59 -59
  46. package/dist/entities/time-entry/work-type.d.ts +21 -24
  47. package/dist/entities/topic/examples.d.ts +26 -27
  48. package/dist/entities/topic/scope.d.ts +11 -12
  49. package/dist/entities/topic/types.d.ts +26 -28
  50. package/dist/entities/user/types.d.ts +24 -28
  51. package/dist/entities/webhook/types.d.ts +6 -6
  52. package/dist/entities/work/keys.d.ts +25 -26
  53. package/dist/entities/work/ladder.d.ts +48 -52
  54. package/dist/entities/work/types.d.ts +108 -114
  55. package/dist/index.cjs +6 -6
  56. package/dist/index.d.ts +29 -28
  57. package/dist/index.js +1377 -1242
  58. package/dist/platform/account.d.ts +34 -38
  59. package/dist/platform/ai-tools.d.ts +48 -52
  60. package/dist/platform/api.d.ts +9 -10
  61. package/dist/platform/author.d.ts +7 -9
  62. package/dist/platform/capabilities.d.ts +3 -3
  63. package/dist/platform/communication.d.ts +163 -204
  64. package/dist/platform/context.d.ts +8 -8
  65. package/dist/platform/identity.d.ts +16 -19
  66. package/dist/platform/kernel.d.ts +1 -1
  67. package/dist/platform/manifest.d.ts +2 -2
  68. package/dist/platform/media.d.ts +13 -15
  69. package/dist/platform/permission.d.ts +39 -0
  70. package/dist/platform/permission.test.d.ts +1 -0
  71. package/dist/platform/presence.d.ts +30 -30
  72. package/dist/platform/provider.d.ts +14 -15
  73. package/dist/platform/resource-source.d.ts +43 -45
  74. package/dist/platform/resource.d.ts +17 -23
  75. package/dist/platform/scope.d.ts +35 -61
  76. package/dist/platform/services.d.ts +4 -4
  77. package/dist/platform/storage.d.ts +1 -1
  78. package/dist/platform/sync-source.d.ts +196 -216
  79. package/dist/platform/transcript-cadence.d.ts +37 -41
  80. package/dist/platform/ui.d.ts +6 -6
  81. package/dist/text/endpoint.d.ts +11 -27
  82. package/package.json +3 -2
@@ -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;
@@ -2,12 +2,11 @@ import { Interaction } from '../entities/interaction';
2
2
  import { Uri } from './communication';
3
3
  import { TranscriptSegment } from './media';
4
4
  export interface ProviderTranscribeResponse {
5
- /** Volledige transcript-tekst (altijd aanwezig, backwards compatible). */
5
+ /** Full transcript text (always present, backwards compatible). */
6
6
  text: string;
7
7
  /**
8
- * Segment-niveau transcript, alleen gevuld als `segments` was aangevraagd én de
9
- * provider het ondersteunt. `sessionId` wordt door de consumer ingevuld (de
10
- * 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).
11
10
  */
12
11
  segments?: TranscriptSegment[];
13
12
  }
@@ -17,14 +16,14 @@ export interface ComposePayload {
17
16
  channelId: string;
18
17
  channelUri?: Uri;
19
18
  /**
20
- * Adressering-envelope. `to` verplicht (1+); `cc`/`bcc` alleen voor
21
- * 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]`.
22
21
  */
23
22
  recipients: import('./communication').RecipientList;
24
23
  subject?: string;
25
24
  /**
26
- * Uitgaande bijlagen (base64 + filename + mimeType). Compose-handlers
27
- * 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.
28
27
  */
29
28
  attachments?: import('./communication').OutgoingAttachment[];
30
29
  /**
@@ -121,17 +120,17 @@ export interface ListFilesPayload {
121
120
  path?: string;
122
121
  }
123
122
  /**
124
- * 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`).
125
124
  *
126
- * Geen `mountId` en geen `path`: de vraag is juist "waar dan ook waar ik mag
127
- * 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`.
128
127
  */
129
128
  export interface BrowseFilesPayload {
130
- /** Vrije tekst op de bestandsnaam; hoofdletterongevoelig, deelreeks. */
129
+ /** Free text on the file name; case-insensitive, substring. */
131
130
  name?: string;
132
- /** `mine` beperkt tot wat je zelf hebt toegevoegd; standaard alles. */
131
+ /** `mine` restricts to what you added yourself; everything by default. */
133
132
  scope?: "all" | "mine";
134
- /** 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. */
135
134
  limit?: number;
136
135
  }
137
136
  export interface DownloadAttachmentPayload {
@@ -139,6 +138,6 @@ export interface DownloadAttachmentPayload {
139
138
  accountId?: string;
140
139
  path?: string;
141
140
  id?: string;
142
- /** Conversatie-id (Teams chatId) — nodig om chat-hostedContent te proxyen. */
141
+ /** Conversation id (Teams chatId) — needed to proxy chat hostedContent. */
143
142
  conversationId?: string;
144
143
  }
@@ -1,94 +1,92 @@
1
1
  /**
2
- * Aanwijsbare resources, over app-grenzen heen.
2
+ * Pointable resources, across app boundaries.
3
3
  *
4
- * Eén vraag die in dit platform steeds terugkwam en tot nu toe per geval werd opgelost: *welke
5
- * dingen kan ik hier aanwijzen, en hoe heten ze?* Een werkitem koppelen aan een gesprek, een
6
- * `resource_ref`-veld invullen, straks een bestand aanhaken — drie keer dezelfde vraag aan drie
7
- * verschillende apps.
4
+ * One question that kept coming back in this platform and was solved case by case until now:
5
+ * *which things can I point at here, and what are they called?* Linking a work item to a
6
+ * conversation, filling a `resource_ref` field, attaching a file later — the same question asked
7
+ * of three different apps three times.
8
8
  *
9
- * Het antwoord is een **contract op de servicebus**, niet een HTTP-providerrol: beide vragen
10
- * worden op de client gesteld door een gebruiker die de bron-app toch al open heeft, en die app
11
- * heeft zijn gesprekken en bedrijven al in een store staan. Een providerrol zou daar een
12
- * round-trip van maken voor gegevens die in het geheugen liggen.
9
+ * The answer is a **service-bus contract**, not an HTTP provider role: both questions are asked on
10
+ * the client by a user who has the source app open anyway, and that app already has its
11
+ * conversations and companies in a store. A provider role would turn that into a round trip for
12
+ * data sitting in memory.
13
13
  *
14
- * Drie sleutels, alle drie via `sdk.services.execute` (die de antwoorden van elke geïnstalleerde
15
- * app als array teruggeeft):
14
+ * Three keys, all three through `sdk.services.execute` (which returns the answers of every
15
+ * installed app as an array):
16
16
  *
17
- * | Sleutel | Params | Antwoord |
17
+ * | Key | Params | Answer |
18
18
  * |---|---|---|
19
19
  * | `resources.describe` | — | {@link ResourceSourceDescribe} |
20
20
  * | `resources.search` | {@link ResourceSearchParams} | {@link ResourceSummary}`[]` |
21
21
  * | `resources.resolve` | {@link ResourceResolveParams} | {@link ResourceSummary}`[]` |
22
22
  *
23
- * `describe` is niet cosmetisch: een kiezer tekent zijn soort-filters uit wat er daadwerkelijk
24
- * antwoordt. Zonder die call zou hij een vaste lijst tonen met tabbladen die leeg blijven zodra
25
- * een app niet geïnstalleerd is — precies de per-provider aanname die dit contract vermijdt.
23
+ * `describe` is not cosmetic: a picker draws its kind filters from what actually answers. Without
24
+ * that call it would show a fixed list with tabs that stay empty as soon as an app is not
25
+ * installed — exactly the per-provider assumption this contract avoids.
26
26
  */
27
- /** De servicebus-sleutels, als constante zodat een typefout niet stil een lege lijst oplevert. */
27
+ /** The service-bus keys, as constants so a typo does not silently yield an empty list. */
28
28
  export declare const RESOURCE_DESCRIBE_SERVICE = "resources.describe";
29
29
  export declare const RESOURCE_SEARCH_SERVICE = "resources.search";
30
30
  export declare const RESOURCE_RESOLVE_SERVICE = "resources.resolve";
31
- /** Eén aanwijsbare resource, zoals de app die hem bezit hem toont. */
31
+ /** One pointable resource, as the app that owns it shows it. */
32
32
  export interface ResourceSummary {
33
33
  /**
34
- * `<kind>:<ref>` — dezelfde vorm die `ScopeAuth` autoriseert en `WorkLink.toKey` draagt.
34
+ * `<kind>:<ref>` — the same shape `ScopeAuth` authorizes and `WorkLink.toKey` carries.
35
35
  *
36
- * Dit is de identiteit: twee aanbieders die dezelfde resource kennen (comms federeert
37
- * adresboeken, crm heeft eigen contacten) leveren dezelfde sleutel, en een consument
38
- * ontdubbelt daarop.
36
+ * This is the identity: two providers knowing the same resource (comms federates address books,
37
+ * crm has its own contacts) deliver the same key, and a consumer deduplicates on it.
39
38
  */
40
39
  scopeKey: string;
41
- /** Het voorvoegsel van {@link ResourceSummary.scopeKey}, apart zodat filteren geen split vraagt. */
40
+ /** The prefix of {@link ResourceSummary.scopeKey}, separate so filtering needs no split. */
42
41
  kind: string;
43
42
  title: string;
44
- /** Tweede regel: afzender, e-mailadres, bedrijfsnaam, statuslabel. */
43
+ /** Second line: sender, email address, company name, status label. */
45
44
  subtitle?: string;
46
- /** Lucide-icoonnaam, zoals `TimeTarget.icon`. Afwezig = de consument kiest er zelf één bij de soort. */
45
+ /** Lucide icon name, like `TimeTarget.icon`. Absent = the consumer picks one for the kind. */
47
46
  icon?: string;
48
47
  /**
49
- * Pad binnen de shell om deze resource te openen.
48
+ * Path inside the shell to open this resource.
50
49
  *
51
- * Afwezig = de regel is niet aanklikbaar. Dat is bewust een aparte staat en geen gok: een
52
- * verzonnen pad levert een doodlopende navigatie op, en dat is erger dan geen link.
50
+ * Absent = the row is not clickable. Deliberately a separate state and not a guess: an invented
51
+ * path yields a dead-end navigation, which is worse than no link.
53
52
  */
54
53
  href?: string;
55
- /** Sorteerhint; recenter staat hoger. Afwezig telt als oudst. */
54
+ /** Sort hint; more recent ranks higher. Absent counts as oldest. */
56
55
  updatedAt?: number;
57
56
  /**
58
- * Andere scopeKeys die bij deze resource horen — het contact en het bedrijf achter een
59
- * gesprek, de klant achter een zaak.
57
+ * Other scopeKeys belonging to this resource — the contact and the company behind a
58
+ * conversation, the customer behind a case.
60
59
  *
61
- * **De bron zegt het, de consument raadt het niet.** Comms weet dat een interactie
62
- * `partyKeys` heeft; `apps/work` weet dat niet en hoort dat ook niet te weten. Zonder dit
63
- * veld zou "neem het contact mee" in de koppel-flow een `if (kind === "interaction")` met
64
- * een comms-specifieke veldnaam worden, en dat breekt bij de volgende aanbieder.
60
+ * **The source says it, the consumer does not guess it.** Comms knows an interaction has
61
+ * `partyKeys`; `apps/work` does not and should not. Without this field, "bring the contact
62
+ * along" in the link flow would become an `if (kind === "interaction")` with a comms-specific
63
+ * field name, and that breaks at the next provider.
65
64
  *
66
- * Alleen één hop, en alleen wat de bron zelf al in handen heeft: dit is een hint voor een
67
- * kiezer, geen graaf.
65
+ * One hop only, and only what the source already holds: this is a hint for a picker, not a graph.
68
66
  */
69
67
  related?: string[];
70
68
  }
71
- /** Antwoord op `resources.describe`: welke soorten deze app kan zoeken en oplossen. */
69
+ /** Answer to `resources.describe`: which kinds this app can search and resolve. */
72
70
  export interface ResourceSourceDescribe {
73
71
  kinds: string[];
74
72
  }
75
- /** Params voor `resources.search`. */
73
+ /** Params for `resources.search`. */
76
74
  export interface ResourceSearchParams {
77
- /** Vrije tekst. Leeg = "wat is er recent", niet "alles". */
75
+ /** Free text. Empty = "what is recent", not "everything". */
78
76
  query: string;
79
- /** Beperk tot deze soorten. Leeg/afwezig = alles wat de aanbieder heeft. */
77
+ /** Restrict to these kinds. Empty/absent = everything the provider has. */
80
78
  kinds?: string[];
81
- /** Maximum per aanbieder, niet in totaal — de consument kapt zelf af na het ontdubbelen. */
79
+ /** Maximum per provider, not in total — the consumer truncates after deduplicating. */
82
80
  limit?: number;
83
81
  }
84
- /** Params voor `resources.resolve`: van sleutel naar leesbare rij. */
82
+ /** Params for `resources.resolve`: from key to readable row. */
85
83
  export interface ResourceResolveParams {
86
84
  scopeKeys: string[];
87
85
  }
88
86
  /**
89
- * De soort uit een scopeKey, zonder de rest te hoeven splitsen.
87
+ * The kind out of a scopeKey, without having to split the rest.
90
88
  *
91
- * Losse helper en geen `splitScopeKey`-hergebruik: die zit in `platform-api` (server), en dit
92
- * contract wordt vooral op de client gelezen.
89
+ * A separate helper and not a reuse of `splitScopeKey`: that one sits in `platform-api` (server),
90
+ * and this contract is read mostly on the client.
93
91
  */
94
92
  export declare function resourceKindOf(scopeKey: string): string;