@alfadocs/ui-kit 1.147.2 → 1.149.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/_chunks/{appointment-timeline-D5qbZ7in.js → appointment-timeline-CuZW-CGT.js} +2 -2
  2. package/dist/_chunks/{bill-line-table-DnkFqMnM.js → bill-line-table-B8Cc2pTH.js} +2 -2
  3. package/dist/_chunks/button-group-CHQD8GJ0.js +449 -0
  4. package/dist/_chunks/{calendar-appointment-editor-dialog-CoIFwj9g.js → calendar-appointment-editor-dialog-Dx9_KIWA.js} +7 -7
  5. package/dist/_chunks/{calendar-waiting-list-panel-DuALuqLD.js → calendar-waiting-list-panel-BKBHfBpn.js} +3 -3
  6. package/dist/_chunks/{calendar.sheets-CueyPkTT.js → calendar.sheets-lgAqJB34.js} +3 -3
  7. package/dist/_chunks/{data-grid-CujX-2tF.js → data-grid-CkzbCZSo.js} +486 -476
  8. package/dist/_chunks/{default-tabs-CqP1uWdx.js → default-tabs-C45FVzsG.js} +3 -3
  9. package/dist/_chunks/{face-scheme-ByYeboH9.js → face-scheme-BC2whb1S.js} +2 -2
  10. package/dist/_chunks/{invoice-upload-list-srvWy5_d.js → invoice-upload-list-BReimsvV.js} +3 -3
  11. package/dist/_chunks/notes-panel-Cw06dLDm.js +1135 -0
  12. package/dist/_chunks/prescription-history-CQuJmd4H.js +1846 -0
  13. package/dist/_chunks/rich-text-editor-eGdYDPK2.js +4405 -0
  14. package/dist/_chunks/task-editor-4zFL10oM.js +1153 -0
  15. package/dist/_chunks/{tasks-panel-DsjfS_k5.js → tasks-panel-BDPQPOP6.js} +475 -461
  16. package/dist/_chunks/{toolbar-z_6tE7zG.js → toolbar-B9oh9XY9.js} +2 -2
  17. package/dist/_chunks/{use-appointment-details-read-CC74Y-r5.js → use-appointment-details-read-Bl1DHXQ2.js} +568 -554
  18. package/dist/agent-catalog.json +9 -7
  19. package/dist/agent-i18n/en.json +4 -4
  20. package/dist/appointment-editor-panel/index.js +1 -1
  21. package/dist/aws-transcribe/index.js +287 -181
  22. package/dist/browser-support.js +1 -1
  23. package/dist/calendar-action-buttons/index.js +1 -1
  24. package/dist/components/_shared/save-outcome.d.ts +23 -0
  25. package/dist/components/appointment-details-panel/index.js +1 -1
  26. package/dist/components/appointment-timeline/index.js +1 -1
  27. package/dist/components/bill-line-table/index.js +1 -1
  28. package/dist/components/bill-table/index.js +1 -1
  29. package/dist/components/button-group/button-group.d.ts +2 -1
  30. package/dist/components/button-group/index.js +1 -1
  31. package/dist/components/data-grid/data-grid.variants.d.ts +7 -1
  32. package/dist/components/data-grid/index.js +2 -2
  33. package/dist/components/face-scheme/index.js +1 -1
  34. package/dist/components/index.d.ts +1 -0
  35. package/dist/components/invoice-upload-list/index.js +1 -1
  36. package/dist/components/notes-panel/index.js +1 -1
  37. package/dist/components/rich-text-editor/help-me-write-overlay.d.ts +12 -1
  38. package/dist/components/rich-text-editor/index.js +1 -1
  39. package/dist/components/rich-text-editor/rich-text-editor.d.ts +5 -3
  40. package/dist/components/task-editor/index.js +1 -1
  41. package/dist/components/task-editor/use-task-editor-form.d.ts +7 -1
  42. package/dist/components/tasks-panel/index.js +1 -1
  43. package/dist/core.css +1 -1
  44. package/dist/find-free-slots-panel/index.js +1 -1
  45. package/dist/host-compat.css +7 -1
  46. package/dist/i18n/locales/ar.d.ts +1 -0
  47. package/dist/i18n/locales/ar.js +2 -1
  48. package/dist/i18n/locales/de.d.ts +1 -0
  49. package/dist/i18n/locales/de.js +2 -1
  50. package/dist/i18n/locales/el.d.ts +1 -0
  51. package/dist/i18n/locales/el.js +2 -1
  52. package/dist/i18n/locales/en.d.ts +1 -0
  53. package/dist/i18n/locales/en.js +2 -1
  54. package/dist/i18n/locales/es.d.ts +1 -0
  55. package/dist/i18n/locales/es.js +2 -1
  56. package/dist/i18n/locales/fr.d.ts +1 -0
  57. package/dist/i18n/locales/fr.js +2 -1
  58. package/dist/i18n/locales/hi.d.ts +1 -0
  59. package/dist/i18n/locales/hi.js +2 -1
  60. package/dist/i18n/locales/it.d.ts +1 -0
  61. package/dist/i18n/locales/it.js +2 -1
  62. package/dist/i18n/locales/ja.d.ts +1 -0
  63. package/dist/i18n/locales/ja.js +2 -1
  64. package/dist/i18n/locales/nl.d.ts +1 -0
  65. package/dist/i18n/locales/nl.js +2 -1
  66. package/dist/i18n/locales/pl.d.ts +1 -0
  67. package/dist/i18n/locales/pl.js +2 -1
  68. package/dist/i18n/locales/pt.d.ts +1 -0
  69. package/dist/i18n/locales/pt.js +2 -1
  70. package/dist/i18n/locales/ro.d.ts +1 -0
  71. package/dist/i18n/locales/ro.js +2 -1
  72. package/dist/i18n/locales/ru.d.ts +1 -0
  73. package/dist/i18n/locales/ru.js +2 -1
  74. package/dist/i18n/locales/sq.d.ts +1 -0
  75. package/dist/i18n/locales/sq.js +2 -1
  76. package/dist/i18n/locales/sv.d.ts +1 -0
  77. package/dist/i18n/locales/sv.js +2 -1
  78. package/dist/i18n/locales/tr.d.ts +1 -0
  79. package/dist/i18n/locales/tr.js +2 -1
  80. package/dist/i18n/locales/zh.d.ts +1 -0
  81. package/dist/i18n/locales/zh.js +2 -1
  82. package/dist/index.js +1408 -1404
  83. package/dist/locales/ar.json +2 -1
  84. package/dist/locales/de.json +2 -1
  85. package/dist/locales/el.json +2 -1
  86. package/dist/locales/en.json +2 -1
  87. package/dist/locales/es.json +2 -1
  88. package/dist/locales/fr.json +2 -1
  89. package/dist/locales/hi.json +2 -1
  90. package/dist/locales/it.json +2 -1
  91. package/dist/locales/ja.json +2 -1
  92. package/dist/locales/nl.json +2 -1
  93. package/dist/locales/pl.json +2 -1
  94. package/dist/locales/pt.json +2 -1
  95. package/dist/locales/ro.json +2 -1
  96. package/dist/locales/ru.json +2 -1
  97. package/dist/locales/sq.json +2 -1
  98. package/dist/locales/sv.json +2 -1
  99. package/dist/locales/tr.json +2 -1
  100. package/dist/locales/zh.json +2 -1
  101. package/dist/online-bookings-panel/index.js +1 -1
  102. package/dist/patterns/calendar/index.js +2 -2
  103. package/dist/patterns/prescription/index.d.ts +1 -1
  104. package/dist/patterns/prescription/index.js +1 -1
  105. package/dist/patterns/prescription/prescription-history.d.ts +28 -0
  106. package/dist/save-outcome/index.js +20 -0
  107. package/dist/speech/aws-transcribe.d.ts +30 -6
  108. package/dist/tokens.css +1 -1
  109. package/dist/waiting-list-panel/index.js +2 -2
  110. package/package.json +5 -1
  111. package/dist/_chunks/button-group-N60L3HMa.js +0 -408
  112. package/dist/_chunks/notes-panel-BHMnLbEH.js +0 -1116
  113. package/dist/_chunks/prescription-history-CFs3JMIE.js +0 -1773
  114. package/dist/_chunks/rich-text-editor-BAcJq1PO.js +0 -4359
  115. package/dist/_chunks/task-editor-B9YpfwcW.js +0 -1095
@@ -715,7 +715,8 @@
715
715
  "required": "مطلوب",
716
716
  "optional": "اختياري",
717
717
  "progress_label": "{{percent}} مكتمل",
718
- "freeOfCharge": "مجاني"
718
+ "freeOfCharge": "مجاني",
719
+ "saveOutcomeUnknown": "يستغرق الحفظ وقتًا أطول من المعتاد. أعد تحميل الصفحة للتحقق مما إذا تم حفظ تغييرك."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "مجموعة أزرار",
@@ -715,7 +715,8 @@
715
715
  "required": "erforderlich",
716
716
  "optional": "optional",
717
717
  "progress_label": "{{percent}} abgeschlossen",
718
- "freeOfCharge": "Kostenlos"
718
+ "freeOfCharge": "Kostenlos",
719
+ "saveOutcomeUnknown": "Das Speichern dauert zu lange. Laden Sie die Seite neu, um zu prüfen, ob Ihre Änderung gespeichert wurde."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Schaltflächengruppe",
@@ -715,7 +715,8 @@
715
715
  "required": "υποχρεωτικό",
716
716
  "optional": "προαιρετικό",
717
717
  "progress_label": "{{percent}} ολοκληρώθηκε",
718
- "freeOfCharge": "Δωρεάν"
718
+ "freeOfCharge": "Δωρεάν",
719
+ "saveOutcomeUnknown": "Η αποθήκευση καθυστερεί πολύ. Φορτώστε ξανά τη σελίδα για να ελέγξετε αν η αλλαγή σας αποθηκεύτηκε."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Ομάδα κουμπιών",
@@ -715,7 +715,8 @@
715
715
  "required": "required",
716
716
  "optional": "optional",
717
717
  "progress_label": "{{percent}} complete",
718
- "freeOfCharge": "Free"
718
+ "freeOfCharge": "Free",
719
+ "saveOutcomeUnknown": "Saving is taking too long. Reload the page to check whether your change was saved."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Button group",
@@ -715,7 +715,8 @@
715
715
  "required": "obligatorio",
716
716
  "optional": "opcional",
717
717
  "progress_label": "{{percent}} completado",
718
- "freeOfCharge": "Gratis"
718
+ "freeOfCharge": "Gratis",
719
+ "saveOutcomeUnknown": "El guardado está tardando demasiado. Vuelva a cargar la página para comprobar si se guardó su cambio."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Grupo de botones",
@@ -715,7 +715,8 @@
715
715
  "required": "obligatoire",
716
716
  "optional": "facultatif",
717
717
  "progress_label": "Progression : {{percent}}",
718
- "freeOfCharge": "Gratuit"
718
+ "freeOfCharge": "Gratuit",
719
+ "saveOutcomeUnknown": "L'enregistrement prend trop de temps. Rechargez la page pour vérifier si votre modification a été enregistrée."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Groupe de boutons",
@@ -715,7 +715,8 @@
715
715
  "required": "आवश्यक",
716
716
  "optional": "वैकल्पिक",
717
717
  "progress_label": "{{percent}} पूर्ण",
718
- "freeOfCharge": "निःशुल्क"
718
+ "freeOfCharge": "निःशुल्क",
719
+ "saveOutcomeUnknown": "सहेजने में बहुत समय लग रहा है। यह जांचने के लिए पृष्ठ को फिर से लोड करें कि आपका बदलाव सहेजा गया या नहीं।"
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "बटन समूह",
@@ -715,7 +715,8 @@
715
715
  "required": "obbligatorio",
716
716
  "optional": "facoltativo",
717
717
  "progress_label": "{{percent}} completato",
718
- "freeOfCharge": "Gratuito"
718
+ "freeOfCharge": "Gratuito",
719
+ "saveOutcomeUnknown": "Il salvataggio sta richiedendo troppo tempo. Ricarica la pagina per verificare se la tua modifica è stata salvata."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Gruppo di pulsanti",
@@ -715,7 +715,8 @@
715
715
  "required": "必須",
716
716
  "optional": "任意",
717
717
  "progress_label": "{{percent}} 完了",
718
- "freeOfCharge": "無料"
718
+ "freeOfCharge": "無料",
719
+ "saveOutcomeUnknown": "保存に時間がかかっています。ページを再読み込みして、変更が保存されたかどうかをご確認ください。"
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "ボタングループ",
@@ -715,7 +715,8 @@
715
715
  "required": "verplicht",
716
716
  "optional": "optioneel",
717
717
  "progress_label": "{{percent}} voltooid",
718
- "freeOfCharge": "Gratis"
718
+ "freeOfCharge": "Gratis",
719
+ "saveOutcomeUnknown": "Opslaan duurt te lang. Laad de pagina opnieuw om te controleren of uw wijziging is opgeslagen."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Knopgroep",
@@ -715,7 +715,8 @@
715
715
  "required": "wymagane",
716
716
  "optional": "opcjonalne",
717
717
  "progress_label": "Ukończono: {{percent}}",
718
- "freeOfCharge": "Bezpłatnie"
718
+ "freeOfCharge": "Bezpłatnie",
719
+ "saveOutcomeUnknown": "Zapisywanie trwa zbyt długo. Odśwież stronę, aby sprawdzić, czy zmiana została zapisana."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Grupa przycisków",
@@ -715,7 +715,8 @@
715
715
  "required": "obrigatório",
716
716
  "optional": "facultativo",
717
717
  "progress_label": "{{percent}} concluído",
718
- "freeOfCharge": "Gratuito"
718
+ "freeOfCharge": "Gratuito",
719
+ "saveOutcomeUnknown": "Guardar está a demorar demasiado. Recarregue a página para verificar se a sua alteração foi guardada."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Grupo de botões",
@@ -715,7 +715,8 @@
715
715
  "required": "obligatoriu",
716
716
  "optional": "opțional",
717
717
  "progress_label": "{{percent}} finalizat",
718
- "freeOfCharge": "Gratuit"
718
+ "freeOfCharge": "Gratuit",
719
+ "saveOutcomeUnknown": "Salvarea durează prea mult. Reîncărcați pagina pentru a verifica dacă modificarea dvs. a fost salvată."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Grup de butoane",
@@ -715,7 +715,8 @@
715
715
  "required": "обязательно",
716
716
  "optional": "необязательно",
717
717
  "progress_label": "{{percent}} выполнено",
718
- "freeOfCharge": "Бесплатно"
718
+ "freeOfCharge": "Бесплатно",
719
+ "saveOutcomeUnknown": "Сохранение занимает слишком много времени. Перезагрузите страницу, чтобы проверить, сохранилось ли изменение."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Группа кнопок",
@@ -715,7 +715,8 @@
715
715
  "required": "i detyrueshëm",
716
716
  "optional": "opsional",
717
717
  "progress_label": "Përfunduar: {{percent}}",
718
- "freeOfCharge": "Falas"
718
+ "freeOfCharge": "Falas",
719
+ "saveOutcomeUnknown": "Ruajtja po zgjat shumë. Ringarkoni faqen për të parë nëse ndryshimi juaj u ruajt."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Grup butonash",
@@ -715,7 +715,8 @@
715
715
  "required": "obligatorisk",
716
716
  "optional": "valfri",
717
717
  "progress_label": "{{percent}} slutfört",
718
- "freeOfCharge": "Gratis"
718
+ "freeOfCharge": "Gratis",
719
+ "saveOutcomeUnknown": "Det tar för lång tid att spara. Ladda om sidan för att kontrollera om ändringen sparades."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Knappar",
@@ -715,7 +715,8 @@
715
715
  "required": "zorunlu",
716
716
  "optional": "isteğe bağlı",
717
717
  "progress_label": "{{percent}} tamamlandı",
718
- "freeOfCharge": "Ücretsiz"
718
+ "freeOfCharge": "Ücretsiz",
719
+ "saveOutcomeUnknown": "Kaydetme çok uzun sürüyor. Değişikliğinizin kaydedilip kaydedilmediğini kontrol etmek için sayfayı yeniden yükleyin."
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "Düğme grubu",
@@ -715,7 +715,8 @@
715
715
  "required": "必填",
716
716
  "optional": "可选",
717
717
  "progress_label": "已完成 {{percent}}",
718
- "freeOfCharge": "免费"
718
+ "freeOfCharge": "免费",
719
+ "saveOutcomeUnknown": "保存耗时过长。请重新加载页面,查看您的更改是否已保存。"
719
720
  },
720
721
  "buttonGroup": {
721
722
  "label": "按钮组",
@@ -2,7 +2,7 @@ import { jsx as n } from "react/jsx-runtime";
2
2
  import { useState as h, useMemo as g } from "react";
3
3
  import { a as k } from "../_chunks/tooltip-uEBdD1-5.js";
4
4
  import { C as v } from "../_chunks/calendar-editor-guard-9fShhNIA.js";
5
- import { S as B, B as O } from "../_chunks/calendar.sheets-CueyPkTT.js";
5
+ import { S as B, B as O } from "../_chunks/calendar.sheets-lgAqJB34.js";
6
6
  import { c as P, o as S } from "../_chunks/calendar-workspace.model-4zmA3BFE.js";
7
7
  function A({
8
8
  rows: e,
@@ -1,7 +1,7 @@
1
- import { A as r, C as s, i as o } from "../../_chunks/calendar-appointment-editor-dialog-CoIFwj9g.js";
1
+ import { A as r, C as s, i as o } from "../../_chunks/calendar-appointment-editor-dialog-Dx9_KIWA.js";
2
2
  import { C, a as S, b as E } from "../../_chunks/calendar-editor-discard-host-DWS_kM-a.js";
3
3
  import { C as i, u as A } from "../../_chunks/calendar-editor-guard-9fShhNIA.js";
4
- import { C as d, S as p, u as D } from "../../_chunks/calendar.sheets-CueyPkTT.js";
4
+ import { C as d, S as p, u as D } from "../../_chunks/calendar.sheets-lgAqJB34.js";
5
5
  import { C as _, D as m, a as O, V as f, W as L, b as R, m as W, r as c, u as I } from "../../_chunks/calendar-workspace.model-4zmA3BFE.js";
6
6
  export {
7
7
  r as AppointmentEditorDialog,
@@ -3,7 +3,7 @@ export type { PrescriptionComposerProps, PrescriptionComposerHandle, } from './p
3
3
  export { PrescriptionSheet } from './prescription-sheet';
4
4
  export type { PrescriptionSheetProps, PrescriptionSheetHandle, PrescriptionSheetAction, } from './prescription-sheet';
5
5
  export { PrescriptionHistory } from './prescription-history';
6
- export type { PrescriptionHistoryProps } from './prescription-history';
6
+ export type { PrescriptionHistoryProps, PrescriptionHistoryNewAction, } from './prescription-history';
7
7
  export { validatePrescriptionDraft, isPrescriptionDraftValid, normalisePrescriptionDraft, isBlankPrescriptionItem, } from './prescription-validation';
8
8
  export type { PrescriptionDraftErrors, PrescriptionItemErrors, PrescriptionFieldError, PrescriptionValidationOptions, } from './prescription-validation';
9
9
  export { createEmptyPrescriptionDraft, EMPTY_PRESCRIPTION_ITEM, } from './prescription-types';
@@ -1,4 +1,4 @@
1
- import { E as s, P as a, a as t, b as e, c as o, i as P, d as n, n as p, v as c } from "../../_chunks/prescription-history-CFs3JMIE.js";
1
+ import { E as s, P as a, a as t, b as e, c as o, i as P, d as n, n as p, v as c } from "../../_chunks/prescription-history-CQuJmd4H.js";
2
2
  export {
3
3
  s as EMPTY_PRESCRIPTION_ITEM,
4
4
  a as PrescriptionComposer,
@@ -11,6 +11,12 @@
11
11
  */
12
12
  import { type HTMLAttributes } from 'react';
13
13
  import type { PrescriptionRecord } from './prescription-types';
14
+ /** The list's main action, drawn as the first button of the tools group. */
15
+ export interface PrescriptionHistoryNewAction {
16
+ /** The host's label. It is the button's tooltip and accessible name. */
17
+ label: string;
18
+ onClick: () => void;
19
+ }
14
20
  export interface PrescriptionHistoryProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
15
21
  /** Saved prescriptions, in any order. Shown newest first until the user sorts. */
16
22
  records: readonly PrescriptionRecord[];
@@ -42,6 +48,28 @@ export interface PrescriptionHistoryProps extends Omit<HTMLAttributes<HTMLDivEle
42
48
  * record has a `sendStatus`, so a host that sends nothing sees neither.
43
49
  */
44
50
  showSendStatus?: boolean;
51
+ /**
52
+ * The title. When given and non-empty (an empty string counts as not
53
+ * given), the history draws the page-header split of the
54
+ * kit's index pages: the heading on the inline-start, the quick search and
55
+ * the tools group on the inline-end, all on the page background, and the
56
+ * grid gets no toolbar of its own. The host supplies the text.
57
+ */
58
+ heading?: string;
59
+ /**
60
+ * 1 is the page's own title: an h1 in the page-title type. 2 is a section
61
+ * of a page: an h2 in the section-title type. Only matters with `heading`.
62
+ * Default 2.
63
+ */
64
+ headingLevel?: 1 | 2;
65
+ /** One line under the heading, in the muted colour. Only with `heading`. */
66
+ description?: string;
67
+ /**
68
+ * The list's main action, drawn as the first button of the tools group: a
69
+ * primary icon button with a Plus icon, `label` as its tooltip and
70
+ * accessible name, and `data-action="new"`. The host supplies the label.
71
+ */
72
+ newAction?: PrescriptionHistoryNewAction;
45
73
  id?: string;
46
74
  }
47
75
  export declare const PrescriptionHistory: import("react").ForwardRefExoticComponent<PrescriptionHistoryProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,20 @@
1
+ import { useTranslation as a } from "react-i18next";
2
+ const o = "SaveOutcomeUnknownError";
3
+ class c extends Error {
4
+ constructor(e = "Saving is taking too long. Reload the page to check whether your change was saved.", t) {
5
+ super(e, t), this.name = o;
6
+ }
7
+ }
8
+ function r(n) {
9
+ return typeof n == "object" && n !== null && "name" in n && n.name === o;
10
+ }
11
+ function u() {
12
+ const { t: n } = a("ui");
13
+ return n("common.saveOutcomeUnknown");
14
+ }
15
+ export {
16
+ c as SaveOutcomeUnknownError,
17
+ r as isSaveOutcomeUnknownError,
18
+ u as useSaveOutcomeUnknownMessage
19
+ };
20
+ //# sourceMappingURL=index.js.map
@@ -5,14 +5,35 @@ export interface AwsTranscribeUrlRequest {
5
5
  readonly mediaEncoding: 'pcm';
6
6
  /** Hz. One of 8000, 16000, 44100 or 48000, matching the audio sent. */
7
7
  readonly sampleRate: number;
8
+ /**
9
+ * Set only when the kit reopens a stream that dropped while the user was
10
+ * still dictating: the token this dictation received with its last URL.
11
+ * The key is absent on the first request of every dictation. Send it to
12
+ * your server as it is. Never store it between dictations: a request
13
+ * without it is a new session.
14
+ */
15
+ readonly reconnectToken?: string;
8
16
  }
17
+ /**
18
+ * What `getUrl` may resolve to: the URL alone, or the URL with the reconnect
19
+ * token your server returned. Returning a token turns reconnects on for that
20
+ * dictation; the server decides how a reconnect is counted.
21
+ */
22
+ export type AwsTranscribeSignedUrl = string | {
23
+ readonly url: string;
24
+ readonly reconnectToken?: string | null;
25
+ };
9
26
  export interface AwsTranscribeDictationOptions {
10
27
  /**
11
28
  * Fetches a pre-signed `wss://transcribestreaming.<region>.amazonaws.com`
12
29
  * URL for this request from the host's server. Honour `signal`: it aborts
13
- * when the user stops before the stream opens.
30
+ * when the user stops before the stream opens. Return
31
+ * `{ url, reconnectToken }` to let the kit reopen a dropped stream: it
32
+ * calls this again with `request.reconnectToken`. A rejection on that call
33
+ * (for example HTTP 429) ends the dictation. It should settle within
34
+ * seconds: the kit gives up on a reconnect call after 10 s.
14
35
  */
15
- getUrl: (request: AwsTranscribeUrlRequest, signal: AbortSignal) => Promise<string>;
36
+ getUrl: (request: AwsTranscribeUrlRequest, signal: AbortSignal) => Promise<AwsTranscribeSignedUrl>;
16
37
  /** The Transcribe language code, or a function read at each start. */
17
38
  languageCode: string | (() => string);
18
39
  }
@@ -44,7 +65,7 @@ export type AwsTranscribeErrorCode =
44
65
  | 'service';
45
66
  export declare class AwsTranscribeError extends Error {
46
67
  readonly code: AwsTranscribeErrorCode;
47
- constructor(code: AwsTranscribeErrorCode, detail?: string);
68
+ constructor(code: AwsTranscribeErrorCode, detail?: string, cause?: unknown);
48
69
  }
49
70
  /** `it` or `it-IT` → `it-IT`; null for a language this map does not cover. */
50
71
  export declare function awsLanguageCode(uiLanguage: string): string | null;
@@ -66,9 +87,12 @@ export declare function isAwsTranscribeSupported(): boolean;
66
87
  *
67
88
  * Each call is one session: it resolves when the stream ends (after the user
68
89
  * stops and Transcribe has sent its last phrase) and rejects with an
69
- * `AwsTranscribeError` when it cannot start or fails. Finished phrases arrive
70
- * through `onFinalTranscript`, including one that completes just after the
71
- * user stops; the phrase being spoken arrives through `onPartialTranscript`.
90
+ * `AwsTranscribeError` when it cannot start or fails. If `getUrl` returned a
91
+ * reconnect token and the stream drops while the user is still dictating, the
92
+ * session reopens it and stays pending (see `AwsTranscribeSignedUrl`).
93
+ * Finished phrases arrive through `onFinalTranscript`, including one that
94
+ * completes just after the user stops; the phrase being spoken arrives
95
+ * through `onPartialTranscript`.
72
96
  */
73
97
  export declare function createAwsTranscribeDictation(options: AwsTranscribeDictationOptions): DictationSession;
74
98
  //# sourceMappingURL=aws-transcribe.d.ts.map