@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
@@ -1,36 +1,36 @@
1
1
  import { ActivityText } from './descriptor';
2
2
  /**
3
- * De blokken waaruit een gedeclareerde tijdlijnrij is opgebouwd.
3
+ * The blocks a declared timeline row is built from.
4
4
  *
5
- * Geleend van Slack's Block Kit: dezelfde namen en dezelfde grammatica, zodat iemand die
6
- * ooit een Slack-app bouwde ze herkent — en wij schrijven Block Kit zelf al
7
- * (`apps/slack/server/src/thread/context-blocks.ts`). Maar niet de hele catalogus: Block
8
- * Kit telt inmiddels 21 bloktypes, waarvan de invoervelden-helft een compleet
9
- * formuliersysteem is dat we al hebben in `ui-kit`'s `Form`.
5
+ * Borrowed from Slack's Block Kit: the same names and the same grammar, so anyone who once built a
6
+ * Slack app recognizes them — and we already write Block Kit ourselves
7
+ * (`apps/slack/server/src/thread/context-blocks.ts`). But not the whole catalog: Block Kit now
8
+ * counts 21 block types, the input-field half of which is a complete form system we already have
9
+ * in `ui-kit`'s `Form`.
10
10
  *
11
- * De scheiding die dat mogelijk maakt: **de blokken beschrijven de binnenkant van de rij,
12
- * de descriptor-semantiek de buitenkant.** Uitlijning op `direction`, de avatar, de
13
- * groepering van opeenvolgende bubbels en de tijdstempel blijven van de host — Block Kit
14
- * kent die begrippen niet, want daar is een bericht een losstaande kaart.
11
+ * The separation that makes that possible: **the blocks describe the inside of the row, the
12
+ * descriptor semantics the outside.** Alignment on `direction`, the avatar, the grouping of
13
+ * consecutive bubbles and the timestamp stay with the host — Block Kit has no notion of those,
14
+ * because there a message is a standalone card.
15
15
  */
16
- /** Semantische kleur. Geen vrije kleuren, zodat dark mode en de tokens blijven kloppen. */
16
+ /** Semantic colour. No free colours, so dark mode and the tokens keep working. */
17
17
  export type ActivityTone = "info" | "success" | "warning" | "destructive";
18
18
  export interface ActivityBadge {
19
19
  text: ActivityText;
20
20
  tone?: ActivityTone;
21
21
  }
22
22
  export interface ActivityAction {
23
- /** Stabiel binnen de rij; routeert de klik en laat de host één knop hertekenen. */
23
+ /** Stable within the row; routes the click and lets the host redraw one button. */
24
24
  action_id: string;
25
25
  text: ActivityText;
26
26
  /**
27
- * De route waar de klik heen gaat, `"<app>.<scope>.<route>"`.
27
+ * The route the click goes to, `"<app>.<scope>.<route>"`.
28
28
  *
29
- * Let op: `sdk.http.invoke` maakt van elke `.` een URL-`/`. Een id met punten hoort dus
30
- * in {@link params} en niet in de action zelf.
29
+ * Note: `sdk.http.invoke` turns every `.` into a URL `/`. An id with dots therefore belongs in
30
+ * {@link params} and not in the action itself.
31
31
  */
32
32
  invoke: string;
33
- /** Paden in de activity; de host leest ze uit en stuurt ze als body mee. */
33
+ /** Paths into the activity; the host reads them out and sends them as the body. */
34
34
  params?: Record<string, string>;
35
35
  style?: "primary" | "secondary" | "destructive";
36
36
  }
@@ -48,12 +48,12 @@ export type ActivityBlock = {
48
48
  block_id?: string;
49
49
  type: "section";
50
50
  text?: ActivityText;
51
- /** Tweekoloms sleutel/waarde. */
51
+ /** Two-column key/value. */
52
52
  fields?: {
53
53
  label: ActivityText;
54
54
  value: ActivityText;
55
55
  }[];
56
- /** Het rechterslot. Voorlopig alleen een badge — een knop hoort in `actions`. */
56
+ /** The right-hand slot. A badge for now — a button belongs in `actions`. */
57
57
  accessory?: ActivityBadge;
58
58
  } | {
59
59
  block_id?: string;
@@ -70,9 +70,9 @@ export type ActivityBlock = {
70
70
  alt: string;
71
71
  }
72
72
  /**
73
- * Een rij per item. Kwam erbij door `ProposedActionCard` om te zetten: die toont een
74
- * regel per voorgestelde actie, en `section.fields` is een rooster dat dat niet kan.
75
- * Ticketregels en orderregels lopen op hetzelfde aan.
73
+ * One row per item. Came in while converting `ProposedActionCard`: that one shows a line per
74
+ * proposed action, and `section.fields` is a grid that cannot do it. Ticket lines and order
75
+ * lines run into the same thing.
76
76
  */
77
77
  | {
78
78
  block_id?: string;
@@ -83,27 +83,27 @@ export type ActivityBlock = {
83
83
  type: "actions";
84
84
  elements: ActivityAction[];
85
85
  }
86
- /** Alleen aanzetten; de host tekent `activity.attachments` en regelt het downloaden. */
86
+ /** Switch on only; the host draws `activity.attachments` and handles the downloading. */
87
87
  | {
88
88
  block_id?: string;
89
89
  type: "attachments";
90
90
  };
91
91
  /**
92
- * Een tijdlijnrij van vijftig blokken breekt de feed. Slack hanteert 50 per bericht; een
93
- * rij in een lijst verdraagt minder, want hij staat tussen tientallen andere.
92
+ * A timeline row of fifty blocks breaks the feed. Slack allows 50 per message; a row in a list
93
+ * tolerates fewer, because it sits among dozens of others.
94
94
  */
95
95
  export declare const MAX_BLOCKS = 10;
96
96
  export declare const MAX_FIELDS = 10;
97
97
  export declare const MAX_LIST_ITEMS = 10;
98
98
  export declare const MAX_ACTIONS = 5;
99
99
  /**
100
- * Snoeit een gedeclareerde blokkenlijst tot iets wat de feed veilig kan tekenen.
100
+ * Prunes a declared block list down to something the feed can safely draw.
101
101
  *
102
- * Weigeren en niet afkappen zou de hele rij laten verdwijnen om één slecht blok; dit laat
103
- * de rest staan. Draait bij het samenstellen van de catalogus, zodat een verkeerde
104
- * declaratie één keer gemeld wordt in plaats van bij elke render.
102
+ * Refusing instead of truncating would make the whole row disappear over one bad block; this
103
+ * keeps the rest. Runs while composing the catalog, so a wrong declaration is reported once
104
+ * instead of on every render.
105
105
  *
106
- * `onDrop` krijgt te horen wat er wegviel — stil snoeien maakt "waarom staat mijn knop er
107
- * niet?" onbeantwoordbaar.
106
+ * `onDrop` is told what fell away — silent pruning makes "why is my button missing?"
107
+ * unanswerable.
108
108
  */
109
109
  export declare function normalizeBlocks(blocks: unknown, onDrop?: (reason: string) => void): ActivityBlock[];
@@ -1,99 +1,79 @@
1
1
  import { Activity, ActivityType } from './types';
2
2
  /**
3
- * Eén plek die beschrijft wat een activity-type *betekent* en hoe het als tekst leest.
3
+ * Single source of truth for what an activity type *means* and how it reads as text.
4
4
  *
5
- * Waarom dit bestaat: dezelfde vraag stond zes keer los in de codebase — "is dit een echt
6
- * bericht?" in `summarize`, in `lastMessagePreview`, in `attentionScore`, in
7
- * `reply-to-interaction`, in de analytics-rollup en in de playbook-dry-run, elke keer met
8
- * nét een andere lijst. Een nieuw type moest dus op zes plekken worden bijgeschreven, en
9
- * een vergeten plek faalt *stil*: het type verdwijnt uit de focus-score of uit de
10
- * analytics zonder dat er iets kapotgaat.
11
- *
12
- * Daarnaast werd de kanaalsoort geraden uit het type-voorvoegsel (`startsWith("EMAIL")`),
13
- * op de server én — als losse regex — in de playbook-editor.
14
- *
15
- * Deze catalogus is bewust een platte declaratie en geen gedragslaag: hij beantwoordt
16
- * vragen over een type, hij voert niets uit. De tekstfuncties zijn letterlijk verplaatst
17
- * uit `preview.ts` en `TimelineEvent.tsx`, niet herschreven — de uitvoer is byte-identiek.
5
+ * "Is this a real message?" used to live in six places (summarize, lastMessagePreview,
6
+ * attentionScore, reply-to-interaction, analytics rollup, playbook dry-run), each with a
7
+ * slightly different list — a forgotten spot failed *silently*. Channel kind was guessed
8
+ * from the type prefix (`startsWith("EMAIL")`), on the server and as a regex in the
9
+ * playbook editor. Deliberately a flat declaration, not a behavior layer: it answers
10
+ * questions about a type, executes nothing. The text functions were moved verbatim from
11
+ * `preview.ts` and `TimelineEvent.tsx` — output is byte-identical.
18
12
  */
19
13
  /**
20
- * Wat voor soort ding is dit op de tijdlijn?
21
- *
22
- * - `message` — een bericht van of aan de tegenpartij, met een leesbare body.
23
- * - `note` — interne tekst, zichtbaar voor collega's maar niet voor de tegenpartij.
24
- * - `artifact` — meegeleverde inhoud die geen bericht is (bestand, transcript).
25
- * - `event` — een gebeurtenis zonder eigen inhoud (gesprek gestart, status gewijzigd).
14
+ * What kind of thing is this on the timeline?
15
+ * - `message` — to/from the counterparty, with a readable body.
16
+ * - `note` — internal text, visible to colleagues but not the counterparty.
17
+ * - `artifact` — attached content that is not a message (file, transcript).
18
+ * - `event` — an occurrence without content of its own (call started, status changed).
26
19
  */
27
20
  export type ActivityShape = "message" | "note" | "artifact" | "event";
28
- /** Kanaalsoort, voorheen geraden uit het type-voorvoegsel. */
21
+ /** Channel kind; previously guessed from the type prefix. */
29
22
  export type ActivityChannelKind = "mail" | "chat" | "voice" | "video";
30
- /** De arm van de `Activity`-union die bij precies dit type hoort. */
23
+ /** The arm of the `Activity` union for exactly this type. */
31
24
  type ActivityOf<T extends ActivityType> = Extract<Activity, {
32
25
  type: T;
33
26
  }>;
34
27
  interface ActivityTypeInfo<T extends ActivityType = ActivityType> {
35
28
  shape: ActivityShape;
36
29
  channelKind?: ActivityChannelKind;
37
- /** Lucide-icoonnaam, gedeeld door web en mobiel. */
30
+ /** Lucide icon name, shared by web and mobile. */
38
31
  icon: string;
39
32
  /**
40
- * Kan een mens hierop antwoorden? Een interne notitie draagt wél tekst maar is geen
41
- * antwoordbaar bericht — daarom een eigen vlag en niet afgeleid van `shape`.
33
+ * Can a human reply to it? An internal note carries text but is not a replyable
34
+ * message — hence its own flag, not derived from `shape`.
42
35
  */
43
36
  replyable?: boolean;
44
- /** Telt mee als in-/uitgaand bericht in de analytics-rollup. */
37
+ /** Counts as an in-/outbound message in the analytics rollup. */
45
38
  countsAs?: "inbound_message" | "outbound_message";
46
39
  /**
47
- * Draagt dit type door mensen geschreven tekst die de moeite waard is om aan een model
48
- * te voeren? Ruimer dan `shape === "message"`: een transcript is een artifact maar wel
49
- * leesbare inhoud.
40
+ * Carries human-written text worth feeding to a model. Broader than
41
+ * `shape === "message"`: a transcript is an artifact but still readable content.
50
42
  */
51
43
  carriesText?: boolean;
52
- /** Door de engine zelf geschreven; mag geen nieuwe playbook-run openen. */
44
+ /** Written by the engine itself; must not open a new playbook run. */
53
45
  playbookAuthored?: boolean;
54
46
  /**
55
- * Betekent dit type dat er daadwerkelijk contact tot stand kwam — dat er gesproken is?
56
- *
57
- * Nodig omdat "is hier echt iets uitgewisseld" niet uit berichten alleen te bepalen valt: een
58
- * aangenomen telefoongesprek is een volwaardige casus met nul berichten, en een gemiste oproep
59
- * is het tegenovergestelde. Een eigen vlag en niet afgeleid van `shape`, want beide zijn
60
- * `event` — het verschil zit in de betekenis, niet in de vorm.
61
- *
62
- * Bewust hier en niet als lijstje in de app die de vraag stelt: dat is precies hoe "is dit een
63
- * bericht?" zes keer los kwam te staan.
47
+ * Did actual contact happen — was there a conversation? Not derivable from messages
48
+ * alone: an answered phone call is a full case with zero messages, a missed call is
49
+ * the opposite. Its own flag, not derived from `shape` — both are `event`; the
50
+ * difference is meaning, not form. Deliberately declared here, not as a list in the
51
+ * asking app: that is exactly how "is this a message?" ended up in six places.
64
52
  */
65
53
  connected?: boolean;
66
54
  /**
67
- * Verschijnt in de trigger-keuzelijst van playbooks en webhooks.
68
- *
69
- * Niet elk type is een zinnig startsignaal: op "gesprek in de wacht" wil niemand een
70
- * playbook hangen. Dit zijn exact de vijf die de builder tot nu toe hardcodeerde, nu op
71
- * de plek waar een app zijn eigen type er ook aan toe kan voegen.
55
+ * Appears in the playbook/webhook trigger picker. Not every type is a sensible start
56
+ * signal; these are exactly the five the builder used to hardcode, now in the place
57
+ * where an app can add its own type too.
72
58
  */
73
59
  triggerable?: boolean;
74
60
  /**
75
- * Vertaalsleutel voor de naam in een keuzelijst. Alleen nodig zodra een type
76
- * {@link triggerable} is — pas dan moet iemand het bij naam kunnen kiezen.
61
+ * Translation key for the name in a picker. Only needed once a type is
62
+ * {@link triggerable}.
77
63
  */
78
64
  displayNameKey?: string;
79
65
  /**
80
- * Eigen component voor de feed, als `"<app>:<Resource>"`.
81
- *
82
- * Bewust hetzelfde veld dat een externe app straks in zijn descriptor zet: onze eigen
83
- * rijke types (mail, chat, notitie, ...) lopen daarmee door precies dezelfde resolver
84
- * als een helpdesk-app die `helpdesk:TicketActivity` meebrengt. Zou dit een aparte
85
- * lijst in de comms-app zijn, dan zou dat pad alleen door vreemde apps gedragen worden
86
- * en zouden de gaten erin pas bij de eerste externe bouwer opvallen.
87
- *
88
- * Spiegelt `TransportConfig.ui.canvas`, dat op dezelfde manier naar
89
- * `communication:CallCanvas` wijst.
66
+ * Custom feed component, as `"<app>:<Resource>"`. Deliberately the same field an
67
+ * external app sets in its descriptor: our own rich types run through exactly the
68
+ * resolver a foreign `helpdesk:TicketActivity` would, so gaps surface before the
69
+ * first external builder hits them. Mirrors `TransportConfig.ui.canvas`.
90
70
  */
91
71
  component?: `${string}:${string}`;
92
- /** Regel voor de inboxlijst. Verplaatst uit `preview.ts`. */
72
+ /** Inbox-list line. Moved from `preview.ts`. */
93
73
  snippet?: (activity: ActivityOf<T>) => string;
94
- /** Regel voor de tijdlijn. Verplaatst uit `TimelineEvent.tsx`. */
74
+ /** Timeline line. Moved from `TimelineEvent.tsx`. */
95
75
  timeline?: (activity: ActivityOf<T>, authorName: string) => string;
96
- /** Deelnameknop op de tijdlijnregel. Verplaatst uit `TimelineEvent.tsx`. */
76
+ /** Join button on the timeline line. Moved from `TimelineEvent.tsx`. */
97
77
  joinUrl?: (activity: ActivityOf<T>) => string | undefined;
98
78
  }
99
79
  export declare function stripHtml(input: string): string;
@@ -101,54 +81,51 @@ type Catalog = {
101
81
  [T in ActivityType]: ActivityTypeInfo<T>;
102
82
  };
103
83
  export declare const ACTIVITY_CATALOG: Catalog;
104
- /** Onbekende types (van een app die zijn type nog niet declareert) geven `undefined`. */
84
+ /** Unknown types (from an app that has not declared its type yet) return `undefined`. */
105
85
  export declare function activityTypeInfo(type: string): ActivityTypeInfo | undefined;
106
- /** Lucide-icoonnaam; `circle` voor onbekende types. */
86
+ /** Lucide icon name; `circle` for unknown types. */
107
87
  export declare function activityIconOf(type: string): string;
108
- /** `mail` | `chat` | `voice` | `video`, of `undefined` voor een levenscyclus-event. */
88
+ /** `mail` | `chat` | `voice` | `video`, or `undefined` for a lifecycle event. */
109
89
  export declare function channelKindOf(type: string): ActivityChannelKind | undefined;
110
90
  /**
111
- * Draagt deze vorm een bericht of een interne notitie — iets wat een mens schreef en wat als
112
- * "het gesprek" telt? Sluit transcripten uit; die zijn wel tekst, maar geen bericht.
91
+ * Does this shape carry a message or internal note — human-written text that counts as
92
+ * "the conversation"? Excludes transcripts: text, but not messages.
113
93
  *
114
- * Op de **shape** en niet op het type, zodat er precies één definitie van "is dit een
115
- * bericht" bestaat. {@link isMessageType} beantwoordt hem voor de ingebouwde types;
116
- * `ActivityTypeRegistry.isMessage` doet hetzelfde voor een type dat een app declareerde.
117
- * Zonder die splitsing had elk van beide zijn eigen kopie van de regel gekregen — en dat is
118
- * precies hoe er twaalf hardgecodeerde typelijstjes door de codebase zijn ontstaan.
94
+ * Keyed on the **shape**, not the type, so exactly one definition of "is this a message"
95
+ * exists. {@link isMessageType} answers it for the built-in types;
96
+ * `ActivityTypeRegistry.isMessage` for app-declared ones. Without that split each would
97
+ * have grown its own copy of the rule — how the hardcoded type lists arose before.
119
98
  */
120
99
  export declare function isMessageShape(shape: ActivityShape | undefined): boolean;
121
- /** Zie {@link isMessageShape}. Voor de ingebouwde types. */
100
+ /** See {@link isMessageShape}. For the built-in types. */
122
101
  export declare function isMessageType(type: string): boolean;
123
- /** Kan een mens hierop antwoorden? Notities niet — die gaan nergens heen. */
102
+ /** Can a human reply to it? Not to notes — those go nowhere. */
124
103
  export declare function isReplyableType(type: string): boolean;
125
104
  /**
126
- * Leesbare inhoud voor een model: berichten, notities én transcripten. Ruimer dan
127
- * {@link isMessageType}, en dat verschil is opzettelijk — zie de dry-run van playbooks.
105
+ * Readable content for a model: messages, notes, and transcripts. Broader than
106
+ * {@link isMessageType}, and that difference is deliberate — see the playbook dry-run.
128
107
  */
129
108
  export declare function carriesText(type: string): boolean;
130
- /** Telt mee als in- of uitgaand bericht in de analytics-rollup. */
109
+ /** Counts as an in- or outbound message in the analytics rollup. */
131
110
  export declare function messageCountsAs(type: string): "inbound_message" | "outbound_message" | undefined;
132
- /** Door de playbook-engine zelf geschreven; mag geen nieuwe run openen. */
111
+ /** Written by the playbook engine itself; must not open a new run. */
133
112
  export declare function isPlaybookAuthoredType(type: string): boolean;
134
- /** Kwam er met dit type daadwerkelijk contact tot stand? Zie {@link ActivityTypeInfo.connected}. */
113
+ /** Did this type establish actual contact? See {@link ActivityTypeInfo.connected}. */
135
114
  export declare function isConnectedType(type: string): boolean;
136
115
  /**
137
- * Is dit een transcript-achtig artefact — meegeleverde inhoud die leesbare tekst draagt?
138
- *
139
- * Het onderscheid met een bestand zit al in de catalogus (`FILE_UPLOADED` draagt geen tekst), dus
140
- * dit is geen nieuwe lijst maar een combinatie van twee bestaande antwoorden. Zo telt het
141
- * transcript van een externe provider mee zodra die app zijn type declareert, zonder dat hier een
142
- * naam bij hoeft.
116
+ * Transcript-like artifact — attached content that carries readable text. Not a new
117
+ * list but a combination of two existing catalog answers (`FILE_UPLOADED` carries no
118
+ * text), so an external provider's transcript counts as soon as its app declares the
119
+ * type, without adding a name here.
143
120
  */
144
121
  export declare function isTranscriptType(type: string): boolean;
145
- /** De inboxlijst-regel, of `""` wanneer het type er geen heeft. */
122
+ /** The inbox-list line, or `""` when the type has none. */
146
123
  export declare function activitySnippet(activity: Activity): string;
147
124
  /**
148
- * De tijdlijnregel. Valt terug op het ontstreepte type — precies wat de feed vandaag doet
149
- * voor elk type zonder eigen tekst.
125
+ * The timeline line. Falls back to the de-underscored type — what the feed does today
126
+ * for any type without its own text.
150
127
  */
151
128
  export declare function activityTimelineText(activity: Activity, authorName: string): string;
152
- /** Deelnamelink op de tijdlijnregel, wanneer het type er een draagt. */
129
+ /** Join link on the timeline line, when the type carries one. */
153
130
  export declare function activityJoinUrl(activity: Activity): string | undefined;
154
131
  export {};
@@ -2,27 +2,26 @@ import { LocaleBundle } from '../analytics/dashboard';
2
2
  import { ActivityBlock } from './blocks';
3
3
  import { ActivityChannelKind, ActivityShape } from './catalog';
4
4
  /**
5
- * Wat een app over zijn eigen activity-soort declareert.
5
+ * What an app declares about its own activity kind.
6
6
  *
7
- * Dit is de JSON-tegenhanger van `ActivityTypeInfo`: dezelfde vragen, maar over de draad.
8
- * Waar de ingebouwde catalogus functies gebruikt voor zijn teksten, gebruikt een
9
- * gedeclareerd type een vertaalsleutel plus parameters — een functie overleeft geen
10
- * HTTP-hop, en een letterlijke zin is niet te vertalen.
7
+ * The JSON counterpart of `ActivityTypeInfo`: the same questions, but over the wire. Where the
8
+ * built-in catalog uses functions for its texts, a declared type uses a translation key plus
9
+ * parameters — a function does not survive an HTTP hop, and a literal sentence cannot be
10
+ * translated.
11
11
  */
12
12
  /**
13
- * Een stuk tekst in een descriptor.
13
+ * A piece of text in a descriptor.
14
14
  *
15
- * Twee vormen, omdat er twee soorten tekst zijn:
15
+ * Two shapes, because there are two kinds of text:
16
16
  *
17
- * - **chrome** — door de app geschreven ("Ticket #{number} aangemaakt"). Vertaalbaar, dus
18
- * een sleutel met parameters. De plaatshouders staan ín de vertaalde zin, zodat de
19
- * woordvolgorde per taal mag verschillen; zou je de tekst eromheen plakken, dan is dat
20
- * precies wat er stukgaat.
21
- * - **data** — door een mens getypt (het onderwerp van het ticket). Valt niets te
22
- * vertalen, dus een pad naar de waarde in de activity.
17
+ * - **chrome** — written by the app ("Ticket #{number} created"). Translatable, so a key with
18
+ * parameters. The placeholders sit *inside* the translated sentence, so word order may differ
19
+ * per language; gluing the text around them is exactly what breaks.
20
+ * - **data** — typed by a person (the ticket's subject). Nothing to translate, so a path to the
21
+ * value in the activity.
23
22
  *
24
- * `format` bepaalt of de weergave de tekst als platte tekst neemt of door de rijke
25
- * renderer haalt. Nooit geraden: het staat op het tekstobject zelf.
23
+ * `format` decides whether the view takes the text as plain text or runs it through the rich
24
+ * renderer. Never guessed: it sits on the text object itself.
26
25
  */
27
26
  export type ActivityText = string | {
28
27
  key: string;
@@ -33,55 +32,55 @@ export type ActivityText = string | {
33
32
  format?: "plain" | "rich";
34
33
  };
35
34
  export interface ActivityTypeDescriptor {
36
- /** Plat en app-geprefixt, bv. `HELPDESK_TICKET_ADDED`. */
35
+ /** Flat and app-prefixed, e.g. `HELPDESK_TICKET_ADDED`. */
37
36
  type: string;
38
- /** Vertaalsleutel voor de naam van dit type (keuzelijsten, filters). */
37
+ /** Translation key for this type's name (pickers, filters). */
39
38
  displayNameKey: string;
40
- /** Lucide-icoonnaam; werkt op web en native. */
39
+ /** Lucide icon name; works on web and native. */
41
40
  icon?: string;
42
41
  shape: ActivityShape;
43
42
  channelKind?: ActivityChannelKind;
44
43
  replyable?: boolean;
45
44
  countsAs?: "inbound_message" | "outbound_message";
46
45
  carriesText?: boolean;
47
- /** Verschijnt in de trigger-keuzelijst van playbooks en webhooks. */
46
+ /** Appears in the trigger picker of playbooks and webhooks. */
48
47
  triggerable?: boolean;
49
48
  /**
50
- * De regel voor de inboxlijst, de zoekindex en de assistent. **Altijd platte tekst**,
51
- * los van hoe de rij eruitziet: opmaak hier lekt naar plekken die geen opmaak kunnen.
49
+ * The line for the inbox list, the search index and the assistant. **Always plain text**,
50
+ * regardless of how the row looks: markup here leaks into places that cannot render markup.
52
51
  */
53
52
  text?: ActivityText;
54
53
  /**
55
- * Declaratieve blokken voor de feed. Rendert op web én mobiel, want er komt geen bundel
56
- * aan te pas — en de host houdt de uitlijning, de avatar en de tijdstempel.
54
+ * Declarative blocks for the feed. Renders on web and mobile, because no bundle is involved —
55
+ * and the host keeps the alignment, the avatar and the timestamp.
57
56
  */
58
57
  render?: ActivityBlock[];
59
58
  /**
60
- * Eigen component voor de feed, `"<app>:<Resource>"`. **Alleen web**: op native bestaat
61
- * geen module federation, dus daar zakt de rij terug naar {@link render} of {@link text}.
59
+ * Own component for the feed, `"<app>:<Resource>"`. **Web only**: native has no module
60
+ * federation, so there the row falls back to {@link render} or {@link text}.
62
61
  */
63
62
  component?: `${string}:${string}`;
64
63
  }
65
- /** Wat de comms-app aan de client teruggeeft: de gedeclareerde types plus hun vertalingen. */
64
+ /** What the comms app returns to the client: the declared types plus their translations. */
66
65
  export interface ActivityTypeCatalog {
67
66
  types: ActivityTypeDescriptor[];
68
67
  locales: LocaleBundle;
69
68
  }
70
- /** Wat een `activity-source` op `GET /provider/activity-types/describe` teruggeeft. */
69
+ /** What an `activity-source` returns on `GET /provider/activity-types/describe`. */
71
70
  export interface ActivityTypeSourceDescription {
72
71
  types: ActivityTypeDescriptor[];
73
72
  locales?: LocaleBundle;
74
73
  }
75
- /** Leest `payload.number` / `author.name` uit een object; geeft "" als het pad niet bestaat. */
74
+ /** Reads `payload.number` / `author.name` from an object; returns "" when the path is absent. */
76
75
  export declare function readPath(source: unknown, path: string): string;
77
76
  /**
78
- * Lost een `ActivityText` op tegen een activity.
77
+ * Resolves an `ActivityText` against an activity.
79
78
  *
80
- * Geeft `null` terug wanneer er niets te tonen is, zodat de aanroeper kan terugvallen in
81
- * plaats van een lege regel te tekenen.
79
+ * Returns `null` when there is nothing to show, so the caller can fall back instead of drawing an
80
+ * empty line.
82
81
  */
83
82
  export declare function resolveActivityText(text: ActivityText | undefined, activity: unknown, translate: (key: string, params?: Record<string, string>) => string): string | null;
84
- /** De parameters die een `ActivityText` uit de activity leest — voor een opgeslagen preview. */
83
+ /** The parameters an `ActivityText` reads from the activity — for a stored preview. */
85
84
  export declare function activityTextParams(text: ActivityText | undefined, activity: unknown): {
86
85
  key: string;
87
86
  params: Record<string, string>;
@@ -1,8 +1,8 @@
1
- export * from './types';
2
1
  export * from './blocks';
3
2
  export * from './catalog';
4
3
  export * from './descriptor';
5
- export * from './resolve';
6
4
  export * from './preview';
5
+ export * from './resolve';
7
6
  export * from './seen';
8
7
  export * from './timestamp';
8
+ export * from './types';
@@ -2,14 +2,14 @@ import { ActivityPreview } from '../interaction/types';
2
2
  import { ActivityTypeDescriptor } from './descriptor';
3
3
  import { Activity } from './types';
4
4
  /**
5
- * De regel die in de inboxlijst onder de afzender staat.
5
+ * The line under the sender in the inbox list.
6
6
  *
7
- * De per-type tekst zelf staat in {@link ACTIVITY_CATALOG}, niet hier: dezelfde vraag
8
- * werd op zes plekken los beantwoord en dreef uit elkaar. Hier blijft alleen wat écht
9
- * over de *preview* gaat — de lengtegrens en de velden die op de interactie belanden.
7
+ * The per-type text itself lives in {@link ACTIVITY_CATALOG}, not here: the same question was
8
+ * answered separately in six places and drifted apart. Only what is really about the *preview*
9
+ * stays here — the length limit and the fields that land on the interaction.
10
10
  *
11
- * `descriptor` is er voor types die een app zelf meebracht. Die dragen een vertaalsleutel
12
- * in plaats van een zin, en die sleutel wordt méé opgeslagen: de preview wordt eenmalig
13
- * server-side berekend, maar elke lezer heeft zijn eigen taal.
11
+ * `descriptor` is there for types an app brought itself. Those carry a translation key instead of
12
+ * a sentence, and that key is stored along: the preview is computed once server-side, but every
13
+ * reader has their own language.
14
14
  */
15
15
  export declare function buildActivityPreview(activity: Activity, descriptor?: ActivityTypeDescriptor): ActivityPreview;