@omniloy/sofia-sdk 1.0.8 → 1.0.10

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.
@@ -21,6 +21,14 @@ declare interface CuratedReport {
21
21
  */
22
22
  declare type ExistingTemplateValues = Record<string, unknown>;
23
23
 
24
+ /**
25
+ * A single extracted action item. Its shape is defined entirely by the host's
26
+ * `templateExtras` schema and passed through untouched — the SDK does NOT
27
+ * remap or normalise fields. For SINA, for example, each item is
28
+ * `{ type: string; description: string }`.
29
+ */
30
+ declare type Extra = Record<string, unknown>;
31
+
24
32
  declare interface InsertionPreviewClassNames {
25
33
  backdrop?: string;
26
34
  panel?: string;
@@ -142,8 +150,18 @@ export declare interface OmniscribeProps {
142
150
  disablegenerate?: boolean;
143
151
  /** Enable debug logging */
144
152
  debug?: boolean;
145
- /** Doctor's medical specialty at the time of the event. Optional. When provided, it is attached to every tracked event for analytics segmentation. */
146
- userMedicalSpecialty?: string;
153
+ /**
154
+ * Doctor's medical specialty at the time of the event. Optional. When
155
+ * provided, it is attached to every tracked event for analytics segmentation.
156
+ *
157
+ * All-lowercase, matching the other string props (`userid`, `patientid`,
158
+ * `templateid`) and the attribute the Web Component exposes.
159
+ *
160
+ * BREAKING (since v1.0.9): this replaces the camelCase `userMedicalSpecialty`
161
+ * that shipped in v1.0.8. React hosts passing the old name must rename it —
162
+ * the old spelling is no longer read and the value is silently dropped.
163
+ */
164
+ usermedicalspecialty?: string;
147
165
  /** Expose function to get last generated report */
148
166
  setGetLastReport?: (fn: () => Promise<object | undefined>) => void;
149
167
  /**
@@ -170,6 +188,36 @@ export declare interface OmniscribeProps {
170
188
  * for fields with no readable content (generation degrades gracefully).
171
189
  */
172
190
  updateTemplate?: UpdateTemplateCallback;
191
+ /**
192
+ * Template fields configuration for extras (petitions, tests, appointments, etc.).
193
+ * Enables the extras action button when provided (together with a transcript
194
+ * and a wired `handleExtras`). Each HIS defines its own field names and enum
195
+ * values in this template — the SDK passes them through without transformation.
196
+ *
197
+ * Follows the canonical "camelCase JS property, kebab HTML attribute" contract
198
+ * used by the other camelCase props (`handleReport`, `updateTemplate`,
199
+ * `insertionPreviewClassNames`): assign it as `el.templateExtras` (or the
200
+ * `template-extras` attribute on the web component).
201
+ */
202
+ templateExtras?: object;
203
+ /**
204
+ * Generic callback for the actions detected from the transcription.
205
+ * Fired when the user clicks an extras category button. Receives the array
206
+ * of items for that category, passed through EXACTLY as the LLM produced it
207
+ * against the `templateExtras` schema — the SDK does no field remapping or
208
+ * normalisation. The item shape is therefore defined by the host's schema.
209
+ *
210
+ * Example (SINA petitions — `templateExtras` items are `{ type, description }`):
211
+ * ```
212
+ * handleExtras([
213
+ * { type: '3', description: 'Solicitar TAC con contraste.' },
214
+ * { type: '1', description: 'Solicitar analítica completa.' },
215
+ * ])
216
+ * ```
217
+ * The host reads whatever fields its schema defined (e.g. `type`) to trigger
218
+ * the appropriate action. To change the delivered shape, change templateExtras.
219
+ */
220
+ handleExtras?: (extras: Extra[]) => void;
173
221
  }
174
222
 
175
223
  export declare const SofiaSDK: CustomElementConstructor;