@corti/sdk 3.1.0-rc → 3.1.0-rc.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 (220) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/documents/resources/sections/client/Client.d.ts +6 -0
  3. package/dist/cjs/api/resources/documents/resources/sections/client/Client.js +6 -0
  4. package/dist/cjs/api/resources/documents/resources/templates/client/Client.d.ts +7 -0
  5. package/dist/cjs/api/resources/documents/resources/templates/client/Client.js +7 -0
  6. package/dist/cjs/api/resources/documents/resources/templates/resources/versions/client/Client.d.ts +6 -0
  7. package/dist/cjs/api/resources/documents/resources/templates/resources/versions/client/Client.js +6 -0
  8. package/dist/cjs/api/resources/transcripts/client/Client.d.ts +1 -1
  9. package/dist/cjs/api/resources/transcripts/client/Client.js +1 -1
  10. package/dist/cjs/api/resources/transcripts/client/requests/TranscriptsCreateRequest.d.ts +3 -1
  11. package/dist/cjs/api/types/GuidedArrayNode.d.ts +3 -2
  12. package/dist/cjs/api/types/GuidedBoolNode.d.ts +2 -2
  13. package/dist/cjs/api/types/GuidedDocumentsGenerateBase.d.ts +2 -0
  14. package/dist/cjs/api/types/GuidedEphemeralDocument.d.ts +5 -0
  15. package/dist/cjs/api/types/GuidedFieldDefinition.d.ts +4 -1
  16. package/dist/cjs/api/types/GuidedNumberNode.d.ts +3 -3
  17. package/dist/cjs/api/types/GuidedObjectNode.d.ts +3 -3
  18. package/dist/cjs/api/types/GuidedSection.d.ts +0 -2
  19. package/dist/cjs/api/types/GuidedSectionsCreateBase.d.ts +0 -2
  20. package/dist/cjs/api/types/GuidedStringNode.d.ts +4 -4
  21. package/dist/cjs/api/types/GuidedTemplate.d.ts +0 -2
  22. package/dist/cjs/api/types/GuidedTemplatesCreateBase.d.ts +0 -2
  23. package/dist/cjs/api/types/StreamConfig.d.ts +5 -1
  24. package/dist/cjs/api/types/StreamConfigKeyterms.d.ts +8 -0
  25. package/dist/cjs/api/types/StreamConfigKeytermsTermsItem.d.ts +4 -0
  26. package/dist/cjs/api/types/StreamConfigReplacementsItem.d.ts +6 -0
  27. package/dist/cjs/api/types/StreamErrorDetail.d.ts +7 -5
  28. package/dist/cjs/api/types/TranscribeAudioEventsConfig.d.ts +1 -1
  29. package/dist/cjs/api/types/TranscribeCommand.d.ts +3 -3
  30. package/dist/cjs/api/types/TranscribeCommandVariable.d.ts +6 -5
  31. package/dist/cjs/api/types/TranscribeCommandVariableType.d.ts +6 -0
  32. package/dist/cjs/api/types/TranscribeCommandVariableType.js +9 -0
  33. package/dist/cjs/api/types/TranscribeConfig.d.ts +8 -4
  34. package/dist/cjs/api/types/TranscribeConfigKeyterms.d.ts +8 -0
  35. package/dist/cjs/api/types/TranscribeConfigKeytermsTermsItem.d.ts +4 -0
  36. package/dist/cjs/api/types/TranscribeConfigKeytermsTermsItem.js +3 -0
  37. package/dist/cjs/api/types/TranscribeConfigReplacementsItem.d.ts +6 -0
  38. package/dist/cjs/api/types/TranscribeConfigReplacementsItem.js +3 -0
  39. package/dist/cjs/api/types/TranscribeErrorMessageError.d.ts +7 -5
  40. package/dist/cjs/api/types/TranscribeSupportedLanguage.d.ts +1 -1
  41. package/dist/cjs/api/types/index.d.ts +7 -5
  42. package/dist/cjs/api/types/index.js +7 -5
  43. package/dist/cjs/custom/utils/dictationTranscript.d.ts +26 -0
  44. package/dist/cjs/custom/utils/dictationTranscript.js +77 -0
  45. package/dist/cjs/custom/utils/index.d.ts +1 -0
  46. package/dist/cjs/custom/utils/index.js +3 -1
  47. package/dist/cjs/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.d.ts +1 -0
  48. package/dist/cjs/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.js +1 -0
  49. package/dist/cjs/serialization/types/GuidedDocumentsGenerateBase.d.ts +2 -0
  50. package/dist/cjs/serialization/types/GuidedDocumentsGenerateBase.js +2 -0
  51. package/dist/cjs/serialization/types/GuidedEphemeralDocument.d.ts +3 -0
  52. package/dist/cjs/serialization/types/GuidedEphemeralDocument.js +3 -0
  53. package/dist/cjs/serialization/types/GuidedFieldDefinition.d.ts +1 -0
  54. package/dist/cjs/serialization/types/GuidedFieldDefinition.js +1 -0
  55. package/dist/cjs/serialization/types/GuidedSection.d.ts +0 -2
  56. package/dist/cjs/serialization/types/GuidedSection.js +0 -2
  57. package/dist/cjs/serialization/types/GuidedSectionsCreateBase.d.ts +0 -2
  58. package/dist/cjs/serialization/types/GuidedSectionsCreateBase.js +0 -2
  59. package/dist/cjs/serialization/types/GuidedTemplate.d.ts +0 -2
  60. package/dist/cjs/serialization/types/GuidedTemplate.js +0 -2
  61. package/dist/cjs/serialization/types/GuidedTemplatesCreateBase.d.ts +0 -2
  62. package/dist/cjs/serialization/types/GuidedTemplatesCreateBase.js +0 -2
  63. package/dist/cjs/serialization/types/StreamConfig.d.ts +4 -0
  64. package/dist/cjs/serialization/types/StreamConfig.js +4 -0
  65. package/dist/cjs/serialization/types/StreamConfigKeyterms.d.ts +10 -0
  66. package/dist/cjs/serialization/types/{GuidedTemplatesCreatePolicyRequest.js → StreamConfigKeyterms.js} +4 -5
  67. package/dist/cjs/serialization/types/StreamConfigKeytermsTermsItem.d.ts +9 -0
  68. package/dist/cjs/serialization/types/{GuidedSectionPolicy.js → StreamConfigKeytermsTermsItem.js} +3 -10
  69. package/dist/cjs/serialization/types/StreamConfigReplacementsItem.d.ts +10 -0
  70. package/dist/cjs/serialization/types/StreamConfigReplacementsItem.js +42 -0
  71. package/dist/cjs/serialization/types/StreamErrorDetail.d.ts +6 -5
  72. package/dist/cjs/serialization/types/StreamErrorDetail.js +6 -5
  73. package/dist/cjs/serialization/types/TranscribeAudioEventsConfig.d.ts +1 -1
  74. package/dist/cjs/serialization/types/TranscribeAudioEventsConfig.js +1 -1
  75. package/dist/cjs/serialization/types/TranscribeCommandVariable.d.ts +3 -2
  76. package/dist/cjs/serialization/types/TranscribeCommandVariable.js +3 -2
  77. package/dist/cjs/serialization/types/TranscribeCommandVariableType.d.ts +7 -0
  78. package/dist/cjs/serialization/types/{GuidedTemplatePolicyKind.js → TranscribeCommandVariableType.js} +2 -2
  79. package/dist/cjs/serialization/types/TranscribeConfig.d.ts +4 -0
  80. package/dist/cjs/serialization/types/TranscribeConfig.js +4 -0
  81. package/dist/cjs/serialization/types/TranscribeConfigKeyterms.d.ts +10 -0
  82. package/dist/cjs/serialization/types/TranscribeConfigKeyterms.js +42 -0
  83. package/dist/cjs/serialization/types/TranscribeConfigKeytermsTermsItem.d.ts +9 -0
  84. package/dist/cjs/serialization/types/{GuidedSectionsCreatePolicyRequest.js → TranscribeConfigKeytermsTermsItem.js} +3 -5
  85. package/dist/cjs/serialization/types/TranscribeConfigReplacementsItem.d.ts +10 -0
  86. package/dist/cjs/serialization/types/TranscribeConfigReplacementsItem.js +42 -0
  87. package/dist/cjs/serialization/types/TranscribeErrorMessageError.d.ts +6 -5
  88. package/dist/cjs/serialization/types/TranscribeErrorMessageError.js +6 -5
  89. package/dist/cjs/serialization/types/index.d.ts +7 -5
  90. package/dist/cjs/serialization/types/index.js +7 -5
  91. package/dist/cjs/version.d.ts +1 -1
  92. package/dist/cjs/version.js +1 -1
  93. package/dist/esm/BaseClient.mjs +2 -2
  94. package/dist/esm/api/resources/documents/resources/sections/client/Client.d.mts +6 -0
  95. package/dist/esm/api/resources/documents/resources/sections/client/Client.mjs +6 -0
  96. package/dist/esm/api/resources/documents/resources/templates/client/Client.d.mts +7 -0
  97. package/dist/esm/api/resources/documents/resources/templates/client/Client.mjs +7 -0
  98. package/dist/esm/api/resources/documents/resources/templates/resources/versions/client/Client.d.mts +6 -0
  99. package/dist/esm/api/resources/documents/resources/templates/resources/versions/client/Client.mjs +6 -0
  100. package/dist/esm/api/resources/transcripts/client/Client.d.mts +1 -1
  101. package/dist/esm/api/resources/transcripts/client/Client.mjs +1 -1
  102. package/dist/esm/api/resources/transcripts/client/requests/TranscriptsCreateRequest.d.mts +3 -1
  103. package/dist/esm/api/types/GuidedArrayNode.d.mts +3 -2
  104. package/dist/esm/api/types/GuidedBoolNode.d.mts +2 -2
  105. package/dist/esm/api/types/GuidedDocumentsGenerateBase.d.mts +2 -0
  106. package/dist/esm/api/types/GuidedEphemeralDocument.d.mts +5 -0
  107. package/dist/esm/api/types/GuidedFieldDefinition.d.mts +4 -1
  108. package/dist/esm/api/types/GuidedNumberNode.d.mts +3 -3
  109. package/dist/esm/api/types/GuidedObjectNode.d.mts +3 -3
  110. package/dist/esm/api/types/GuidedSection.d.mts +0 -2
  111. package/dist/esm/api/types/GuidedSectionsCreateBase.d.mts +0 -2
  112. package/dist/esm/api/types/GuidedStringNode.d.mts +4 -4
  113. package/dist/esm/api/types/GuidedTemplate.d.mts +0 -2
  114. package/dist/esm/api/types/GuidedTemplatesCreateBase.d.mts +0 -2
  115. package/dist/esm/api/types/StreamConfig.d.mts +5 -1
  116. package/dist/esm/api/types/StreamConfigKeyterms.d.mts +8 -0
  117. package/dist/esm/api/types/StreamConfigKeytermsTermsItem.d.mts +4 -0
  118. package/dist/esm/api/types/StreamConfigReplacementsItem.d.mts +6 -0
  119. package/dist/esm/api/types/StreamErrorDetail.d.mts +7 -5
  120. package/dist/esm/api/types/TranscribeAudioEventsConfig.d.mts +1 -1
  121. package/dist/esm/api/types/TranscribeCommand.d.mts +3 -3
  122. package/dist/esm/api/types/TranscribeCommandVariable.d.mts +6 -5
  123. package/dist/esm/api/types/TranscribeCommandVariableType.d.mts +6 -0
  124. package/dist/esm/api/types/TranscribeCommandVariableType.mjs +6 -0
  125. package/dist/esm/api/types/TranscribeConfig.d.mts +8 -4
  126. package/dist/esm/api/types/TranscribeConfigKeyterms.d.mts +8 -0
  127. package/dist/esm/api/types/TranscribeConfigKeytermsTermsItem.d.mts +4 -0
  128. package/dist/esm/api/types/TranscribeConfigKeytermsTermsItem.mjs +2 -0
  129. package/dist/esm/api/types/TranscribeConfigReplacementsItem.d.mts +6 -0
  130. package/dist/esm/api/types/TranscribeConfigReplacementsItem.mjs +2 -0
  131. package/dist/esm/api/types/TranscribeErrorMessageError.d.mts +7 -5
  132. package/dist/esm/api/types/TranscribeSupportedLanguage.d.mts +1 -1
  133. package/dist/esm/api/types/index.d.mts +7 -5
  134. package/dist/esm/api/types/index.mjs +7 -5
  135. package/dist/esm/custom/utils/dictationTranscript.d.mts +26 -0
  136. package/dist/esm/custom/utils/dictationTranscript.mjs +74 -0
  137. package/dist/esm/custom/utils/index.d.mts +1 -0
  138. package/dist/esm/custom/utils/index.mjs +1 -0
  139. package/dist/esm/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.d.mts +1 -0
  140. package/dist/esm/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.mjs +1 -0
  141. package/dist/esm/serialization/types/GuidedDocumentsGenerateBase.d.mts +2 -0
  142. package/dist/esm/serialization/types/GuidedDocumentsGenerateBase.mjs +2 -0
  143. package/dist/esm/serialization/types/GuidedEphemeralDocument.d.mts +3 -0
  144. package/dist/esm/serialization/types/GuidedEphemeralDocument.mjs +3 -0
  145. package/dist/esm/serialization/types/GuidedFieldDefinition.d.mts +1 -0
  146. package/dist/esm/serialization/types/GuidedFieldDefinition.mjs +1 -0
  147. package/dist/esm/serialization/types/GuidedSection.d.mts +0 -2
  148. package/dist/esm/serialization/types/GuidedSection.mjs +0 -2
  149. package/dist/esm/serialization/types/GuidedSectionsCreateBase.d.mts +0 -2
  150. package/dist/esm/serialization/types/GuidedSectionsCreateBase.mjs +0 -2
  151. package/dist/esm/serialization/types/GuidedTemplate.d.mts +0 -2
  152. package/dist/esm/serialization/types/GuidedTemplate.mjs +0 -2
  153. package/dist/esm/serialization/types/GuidedTemplatesCreateBase.d.mts +0 -2
  154. package/dist/esm/serialization/types/GuidedTemplatesCreateBase.mjs +0 -2
  155. package/dist/esm/serialization/types/StreamConfig.d.mts +4 -0
  156. package/dist/esm/serialization/types/StreamConfig.mjs +4 -0
  157. package/dist/esm/serialization/types/StreamConfigKeyterms.d.mts +10 -0
  158. package/dist/esm/serialization/types/StreamConfigKeyterms.mjs +6 -0
  159. package/dist/esm/serialization/types/StreamConfigKeytermsTermsItem.d.mts +9 -0
  160. package/dist/esm/serialization/types/StreamConfigKeytermsTermsItem.mjs +5 -0
  161. package/dist/esm/serialization/types/StreamConfigReplacementsItem.d.mts +10 -0
  162. package/dist/esm/serialization/types/StreamConfigReplacementsItem.mjs +6 -0
  163. package/dist/esm/serialization/types/StreamErrorDetail.d.mts +6 -5
  164. package/dist/esm/serialization/types/StreamErrorDetail.mjs +6 -5
  165. package/dist/esm/serialization/types/TranscribeAudioEventsConfig.d.mts +1 -1
  166. package/dist/esm/serialization/types/TranscribeAudioEventsConfig.mjs +1 -1
  167. package/dist/esm/serialization/types/TranscribeCommandVariable.d.mts +3 -2
  168. package/dist/esm/serialization/types/TranscribeCommandVariable.mjs +3 -2
  169. package/dist/esm/serialization/types/TranscribeCommandVariableType.d.mts +7 -0
  170. package/dist/esm/serialization/types/{GuidedTemplatePolicyKind.mjs → TranscribeCommandVariableType.mjs} +1 -1
  171. package/dist/esm/serialization/types/TranscribeConfig.d.mts +4 -0
  172. package/dist/esm/serialization/types/TranscribeConfig.mjs +4 -0
  173. package/dist/esm/serialization/types/TranscribeConfigKeyterms.d.mts +10 -0
  174. package/dist/esm/serialization/types/TranscribeConfigKeyterms.mjs +6 -0
  175. package/dist/esm/serialization/types/TranscribeConfigKeytermsTermsItem.d.mts +9 -0
  176. package/dist/esm/serialization/types/TranscribeConfigKeytermsTermsItem.mjs +5 -0
  177. package/dist/esm/serialization/types/TranscribeConfigReplacementsItem.d.mts +10 -0
  178. package/dist/esm/serialization/types/TranscribeConfigReplacementsItem.mjs +6 -0
  179. package/dist/esm/serialization/types/TranscribeErrorMessageError.d.mts +6 -5
  180. package/dist/esm/serialization/types/TranscribeErrorMessageError.mjs +6 -5
  181. package/dist/esm/serialization/types/index.d.mts +7 -5
  182. package/dist/esm/serialization/types/index.mjs +7 -5
  183. package/dist/esm/version.d.mts +1 -1
  184. package/dist/esm/version.mjs +1 -1
  185. package/package.json +1 -1
  186. package/dist/cjs/api/types/GuidedSectionPolicy.d.ts +0 -16
  187. package/dist/cjs/api/types/GuidedSectionsCreatePolicyRequest.d.ts +0 -6
  188. package/dist/cjs/api/types/GuidedTemplatePolicy.d.ts +0 -16
  189. package/dist/cjs/api/types/GuidedTemplatePolicyKind.d.ts +0 -6
  190. package/dist/cjs/api/types/GuidedTemplatePolicyKind.js +0 -9
  191. package/dist/cjs/api/types/GuidedTemplatesCreatePolicyRequest.d.ts +0 -6
  192. package/dist/cjs/serialization/types/GuidedSectionPolicy.d.ts +0 -16
  193. package/dist/cjs/serialization/types/GuidedSectionsCreatePolicyRequest.d.ts +0 -11
  194. package/dist/cjs/serialization/types/GuidedTemplatePolicy.d.ts +0 -16
  195. package/dist/cjs/serialization/types/GuidedTemplatePolicy.js +0 -48
  196. package/dist/cjs/serialization/types/GuidedTemplatePolicyKind.d.ts +0 -7
  197. package/dist/cjs/serialization/types/GuidedTemplatesCreatePolicyRequest.d.ts +0 -11
  198. package/dist/esm/api/types/GuidedSectionPolicy.d.mts +0 -16
  199. package/dist/esm/api/types/GuidedSectionsCreatePolicyRequest.d.mts +0 -6
  200. package/dist/esm/api/types/GuidedTemplatePolicy.d.mts +0 -16
  201. package/dist/esm/api/types/GuidedTemplatePolicyKind.d.mts +0 -6
  202. package/dist/esm/api/types/GuidedTemplatePolicyKind.mjs +0 -6
  203. package/dist/esm/api/types/GuidedTemplatesCreatePolicyRequest.d.mts +0 -6
  204. package/dist/esm/serialization/types/GuidedSectionPolicy.d.mts +0 -16
  205. package/dist/esm/serialization/types/GuidedSectionPolicy.mjs +0 -12
  206. package/dist/esm/serialization/types/GuidedSectionsCreatePolicyRequest.d.mts +0 -11
  207. package/dist/esm/serialization/types/GuidedSectionsCreatePolicyRequest.mjs +0 -7
  208. package/dist/esm/serialization/types/GuidedTemplatePolicy.d.mts +0 -16
  209. package/dist/esm/serialization/types/GuidedTemplatePolicy.mjs +0 -12
  210. package/dist/esm/serialization/types/GuidedTemplatePolicyKind.d.mts +0 -7
  211. package/dist/esm/serialization/types/GuidedTemplatesCreatePolicyRequest.d.mts +0 -11
  212. package/dist/esm/serialization/types/GuidedTemplatesCreatePolicyRequest.mjs +0 -7
  213. /package/dist/cjs/api/types/{GuidedSectionPolicy.js → StreamConfigKeyterms.js} +0 -0
  214. /package/dist/cjs/api/types/{GuidedSectionsCreatePolicyRequest.js → StreamConfigKeytermsTermsItem.js} +0 -0
  215. /package/dist/cjs/api/types/{GuidedTemplatePolicy.js → StreamConfigReplacementsItem.js} +0 -0
  216. /package/dist/cjs/api/types/{GuidedTemplatesCreatePolicyRequest.js → TranscribeConfigKeyterms.js} +0 -0
  217. /package/dist/esm/api/types/{GuidedSectionPolicy.mjs → StreamConfigKeyterms.mjs} +0 -0
  218. /package/dist/esm/api/types/{GuidedSectionsCreatePolicyRequest.mjs → StreamConfigKeytermsTermsItem.mjs} +0 -0
  219. /package/dist/esm/api/types/{GuidedTemplatePolicy.mjs → StreamConfigReplacementsItem.mjs} +0 -0
  220. /package/dist/esm/api/types/{GuidedTemplatesCreatePolicyRequest.mjs → TranscribeConfigKeyterms.mjs} +0 -0
@@ -1,10 +1,10 @@
1
1
  export interface GuidedNumberNode {
2
2
  type: "number";
3
- /** Can be used to prompt the LLM with more guidance in addition to the section.instructions */
3
+ /** Guide the LLM in what to output for this node. Supplements the section-level instructions. */
4
4
  description?: string;
5
- /** The default to output if nothing to output. */
5
+ /** If nothing is outputted, this default is used. */
6
6
  default?: number | null;
7
- /** Can be used to prompt the LLM for specifically allowed numeric values to output. */
7
+ /** Can be used to guide the LLM with specific values to output. */
8
8
  enum?: number[];
9
9
  /** Use if a minimum value applies. */
10
10
  minimum?: number | null;
@@ -1,14 +1,14 @@
1
1
  import type * as Corti from "../index.mjs";
2
2
  export interface GuidedObjectNode {
3
3
  type: "object";
4
- /** Can be used to prompt the LLM with more guidance in addition to the section.instructions */
4
+ /** Guide the LLM in what to output for this node. Supplements the section-level instructions. */
5
5
  description?: string;
6
6
  /**
7
7
  * Free-form format string that controls how an object's fields are rendered into the final text output. Operates in one of two modes determined by which placeholders appear:
8
8
  *
9
- * **Subheading mode** (default: `"{key}: {value}\n"`): triggered when the format contains both `{key}` and `{value}`. Applied per field — each field becomes a key/value line. Fields that render to null are skipped.
9
+ * **Subheading mode** (default: `"{key}: {value}\n"`): triggered when the format contains both `{key}` and `{value}`. Applied per field — each field becomes a key/value line. When a field has no relevant input/output and no `default` is set, the entire key/value line for that field is omitted from the rendered output.
10
10
  *
11
- * **Object mode** (e.g. `"{name} ({age})"`): triggered when `{key}` and `{value}` are absent. Placeholders must be actual field keys defined in `fields`. Applied once for the whole object, composing all fields into a single string. Fields rendering to null become empty string.
11
+ * **Object mode** (e.g. `"{name} ({age})"`): triggered when `{key}` and `{value}` are absent. Placeholders must be actual field keys defined in `fields`. Applied once for the whole object, composing all fields into a single string. When a field has no relevant input/output and no `default` is set, its placeholder is replaced with an empty string (`""`).
12
12
  *
13
13
  * Validation rules: format must not be empty; if either `{key}` or `{value}` appears, both must be present; in subheading mode no extra placeholders are allowed; in object mode every placeholder must match a defined field key.
14
14
  */
@@ -28,6 +28,4 @@ export interface GuidedSection {
28
28
  updatedAt: Date;
29
29
  /** Present when the section has been deleted. GET by ID still returns the full resource with this field populated. */
30
30
  deletedAt?: Date | null;
31
- /** Access policies for this section. */
32
- policies?: Corti.GuidedSectionPolicy[];
33
31
  }
@@ -14,6 +14,4 @@ export interface GuidedSectionsCreateBase {
14
14
  labels?: Corti.GuidedLabel[];
15
15
  /** Defaults to true when omitted. Set this to false if you do not want the section to automatically show up in LIST /sections. */
16
16
  publish?: boolean;
17
- /** Access policies to apply to the section on creation. */
18
- policies?: Corti.GuidedSectionsCreatePolicyRequest[];
19
17
  }
@@ -1,11 +1,11 @@
1
1
  export interface GuidedStringNode {
2
2
  type: "string";
3
- /** Can be used to prompt the LLM with more guidance in addition to the section.instructions */
3
+ /** Guide the LLM in what to output for this node. Supplements the section-level instructions. */
4
4
  description?: string;
5
- /** The default to output if nothing to output. */
5
+ /** If nothing is outputted, this default is used. When `enum` is set, the default must be one of the enum values. */
6
6
  default?: string | null;
7
- /** Can be used to prompt the LLM with specific values to output. */
7
+ /** Can be used to guide the LLM with specific values to output. */
8
8
  enum?: string[];
9
- /** Can be used to prompt the LLM for a specific output pattern. */
9
+ /** Can be used to constrain the LLM to output a specific pattern. */
10
10
  pattern?: string | null;
11
11
  }
@@ -20,8 +20,6 @@ export interface GuidedTemplate {
20
20
  specialties: string[];
21
21
  /** The available labels to use as query param filter in the LIST /templates endpoint. */
22
22
  labels: Corti.GuidedLabel[];
23
- /** Access policies for this template. */
24
- policies?: Corti.GuidedTemplatePolicy[];
25
23
  /** The currently published version with inheritance fully resolved. Present when a version has been published. */
26
24
  publishedVersion?: Corti.GuidedTemplateVersion;
27
25
  /** The original timestamp when the template was created. */
@@ -14,6 +14,4 @@ export interface GuidedTemplatesCreateBase {
14
14
  labels?: Corti.GuidedLabel[];
15
15
  /** Defaults to true when omitted. Set this to false if you do not want the template to automatically show up in LIST templates. */
16
16
  publish?: boolean;
17
- /** Access policies to apply to the template on creation. */
18
- policies?: Corti.GuidedTemplatesCreatePolicyRequest[];
19
17
  }
@@ -5,6 +5,10 @@ export interface StreamConfig {
5
5
  /** Optional parameter to specify data retention policy for the generated transcripts and facts. Use value 'none' to indicate data should not be stored in the database. Use value 'retain' to indicate that the data should be retained according to standard retention policies. If configuration is not provided, then the default retention policy will apply. */
6
6
  retentionPolicy?: Corti.StreamConfigRetentionPolicy;
7
7
  audioEvents?: Corti.StreamAudioEventsConfig;
8
- /** The audio format of the incoming audio stream */
8
+ /** Define the audio format of the incoming audio stream - optional but recommended. When omitted, the server auto-detects the format from the first audio chunk using ffprobe. Supported audio will be processed. Unsupported return an error but might in some cases error silently. If provided (recommended), the provided MIME type must be supported and the audio must match the MIME type. An unsupported MIME type results in `CONFIG_REJECTED`. Audio that differs from the MIME type will return audio validation errors on the socket. See full list of supported MIME types [here](/stt/audio). */
9
9
  audioFormat?: string;
10
+ /** Define replacements to have terms (single words or multi-word phrases) replaced in final text output with your preferred style. For example, replace "BID" with "twice daily". Configuration is case insensitive and limited to 1,000 replacements per stream. */
11
+ replacements?: Corti.StreamConfigReplacementsItem[];
12
+ /** Define words, terms, and phrases to be recognized by Corti speech-to-text. Especially useful for proper nouns (e.g., surnames), but also supportive of words not being recognized consistently. Configuration is case sensitive and limited to 1,000 key terms per stream. */
13
+ keyterms?: Corti.StreamConfigKeyterms;
10
14
  }
@@ -0,0 +1,8 @@
1
+ import type * as Corti from "../index.mjs";
2
+ /**
3
+ * Define words, terms, and phrases to be recognized by Corti speech-to-text. Especially useful for proper nouns (e.g., surnames), but also supportive of words not being recognized consistently. Configuration is case sensitive and limited to 1,000 key terms per stream.
4
+ */
5
+ export interface StreamConfigKeyterms {
6
+ /** Ordered list of words to be recognized. */
7
+ terms?: Corti.StreamConfigKeytermsTermsItem[];
8
+ }
@@ -0,0 +1,4 @@
1
+ export interface StreamConfigKeytermsTermsItem {
2
+ /** The word to be recognized, defined in its expected written form. */
3
+ term: string;
4
+ }
@@ -0,0 +1,6 @@
1
+ export interface StreamConfigReplacementsItem {
2
+ /** The term to be replaced, such as "BID". */
3
+ find: string;
4
+ /** The preferred replacement for the term, such as "twice daily". */
5
+ replace: string;
6
+ }
@@ -1,12 +1,14 @@
1
1
  export interface StreamErrorDetail {
2
+ /** Unique identifier for the request, for support and debugging. */
3
+ requestid?: string;
2
4
  /** Error identifier */
3
- id: string;
5
+ id?: string;
4
6
  /** Error title */
5
- title: string;
7
+ title?: string;
6
8
  /** HTTP status code or similar error code */
7
- status: number;
9
+ status?: number;
8
10
  /** Detailed error message */
9
- details: string;
11
+ details?: string;
10
12
  /** Link to documentation or further information */
11
- doc: string;
13
+ doc?: string;
12
14
  }
@@ -1,4 +1,4 @@
1
1
  export interface TranscribeAudioEventsConfig {
2
2
  /** When true, enables audio quality and speech activity events to be sent over the WebSocket. Disabled by default. */
3
- enabled?: boolean;
3
+ enabled: boolean;
4
4
  }
@@ -1,9 +1,9 @@
1
1
  import type * as Corti from "../index.mjs";
2
2
  export interface TranscribeCommand {
3
- /** To identify the command when it gets detected and returned over the WebSocket */
3
+ /** Unique value to identify the command when it is detected and returned over the WebSocket */
4
4
  id: string;
5
- /** The spoken phrases that should trigger the command */
5
+ /** One or more word sequence(s) that can be spoken to trigger the command. At least one phrase is required per command. */
6
6
  phrases: string[];
7
- /** Variables for the command */
7
+ /** Placeholders that can (optionally) be added in phrases to provide flexibility and extensibility for triggering commands. */
8
8
  variables?: Corti.TranscribeCommandVariable[];
9
9
  }
@@ -1,8 +1,9 @@
1
+ import type * as Corti from "../index.mjs";
1
2
  export interface TranscribeCommandVariable {
2
- /** Variable key identifier */
3
+ /** Define the variable used in command phrases. */
3
4
  key: string;
4
- /** Variable type */
5
- type: "enum";
6
- /** Enum values for the variable */
7
- enum: string[];
5
+ /** Variable type. Use `enum` to define a fixed list of values that can be recognized for the variable. Use `wildcard` to recognize any undefined, open-ended free-text utterance. When using `wildcard`, the phrase must include a literal trigger word before the wildcard variable (a phrase may not begin with a wildcard variable), and multiple wildcard variables in a single phrase must be separated by a non-empty literal string (e.g. `select {text1} end select {text2}` is valid; `{text1} {text2}` is not). */
6
+ type: Corti.TranscribeCommandVariableType;
7
+ /** List of values that should be recognized for the defined variable. Required when `type` is `enum`. Not used (and ignored) when `type` is `wildcard`. */
8
+ enum?: string[];
8
9
  }
@@ -0,0 +1,6 @@
1
+ /** Variable type. Use `enum` to define a fixed list of values that can be recognized for the variable. Use `wildcard` to recognize any undefined, open-ended free-text utterance. When using `wildcard`, the phrase must include a literal trigger word before the wildcard variable (a phrase may not begin with a wildcard variable), and multiple wildcard variables in a single phrase must be separated by a non-empty literal string (e.g. `select {text1} end select {text2}` is valid; `{text1} {text2}` is not). */
2
+ export declare const TranscribeCommandVariableType: {
3
+ readonly Enum: "enum";
4
+ readonly Wildcard: "wildcard";
5
+ };
6
+ export type TranscribeCommandVariableType = (typeof TranscribeCommandVariableType)[keyof typeof TranscribeCommandVariableType];
@@ -0,0 +1,6 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Variable type. Use `enum` to define a fixed list of values that can be recognized for the variable. Use `wildcard` to recognize any undefined, open-ended free-text utterance. When using `wildcard`, the phrase must include a literal trigger word before the wildcard variable (a phrase may not begin with a wildcard variable), and multiple wildcard variables in a single phrase must be separated by a non-empty literal string (e.g. `select {text1} end select {text2}` is valid; `{text1} {text2}` is not). */
3
+ export const TranscribeCommandVariableType = {
4
+ Enum: "enum",
5
+ Wildcard: "wildcard",
6
+ };
@@ -2,16 +2,20 @@ import type * as Corti from "../index.mjs";
2
2
  export interface TranscribeConfig {
3
3
  /** The locale of the primary spoken language. */
4
4
  primaryLanguage: Corti.TranscribeSupportedLanguage;
5
- /** When true, returns interim results for reduced latency */
5
+ /** When true, returns interim (preview) transcript results (`isFinal=false`) for reduced latency than final transcripts. Defaults to false. */
6
6
  interimResults?: boolean;
7
- /** When true, converts spoken punctuation such as 'period' or 'slash' into '.' or '/' */
7
+ /** When true, converts spoken punctuation such as 'period' or 'slash' into '.' or '/'. Defaults to false. Overrides automaticPunctuation when both are enabled. */
8
8
  spokenPunctuation?: boolean;
9
- /** When true, automatically punctuates and capitalizes in the final transcript */
9
+ /** When true, automatically punctuates and capitalizes in the final transcript. Defaults to false. Overridden by spokenPunctuation when both are enabled. */
10
10
  automaticPunctuation?: boolean;
11
11
  /** Commands that should be registered and detected */
12
12
  commands?: Corti.TranscribeCommand[];
13
13
  formatting?: Corti.TranscribeFormatting;
14
14
  audioEvents?: Corti.TranscribeAudioEventsConfig;
15
- /** The audio format of the incoming audio stream */
15
+ /** Define the audio format of the incoming audio stream - optional but recommended. When omitted, the server auto-detects the format from the first audio chunk using ffprobe. Supported audio will be processed. Unsupported return an error but might in some cases error silently. If provided (recommended), the provided MIME type must be supported and the audio must match the MIME type. An unsupported MIME type results in `CONFIG_REJECTED`. Audio that differs from the MIME type will return audio validation errors on the socket. See full list of supported MIME types [here](/stt/audio). */
16
16
  audioFormat?: string;
17
+ /** Define replacements to have terms (single words or multi-word phrases) replaced in final text output with your preferred style. For example, replace "BID" with "twice daily". Configuration is case insensitive and limited to 1,000 replacements per stream. */
18
+ replacements?: Corti.TranscribeConfigReplacementsItem[];
19
+ /** Define words, terms, and phrases to be recognized by Corti speech-to-text. Especially useful for proper nouns (e.g., surnames), but also supportive of words not being recognized consistently. Configuration is case sensitive and limited to 1,000 key terms per stream. */
20
+ keyterms?: Corti.TranscribeConfigKeyterms;
17
21
  }
@@ -0,0 +1,8 @@
1
+ import type * as Corti from "../index.mjs";
2
+ /**
3
+ * Define words, terms, and phrases to be recognized by Corti speech-to-text. Especially useful for proper nouns (e.g., surnames), but also supportive of words not being recognized consistently. Configuration is case sensitive and limited to 1,000 key terms per stream.
4
+ */
5
+ export interface TranscribeConfigKeyterms {
6
+ /** Ordered list of words to be recognized. */
7
+ terms?: Corti.TranscribeConfigKeytermsTermsItem[];
8
+ }
@@ -0,0 +1,4 @@
1
+ export interface TranscribeConfigKeytermsTermsItem {
2
+ /** The word to be recognized, defined in its expected written form. */
3
+ term: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface TranscribeConfigReplacementsItem {
2
+ /** The term to be replaced, such as "BID". */
3
+ find: string;
4
+ /** The preferred replacement for the term, such as "twice daily". */
5
+ replace: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,12 +1,14 @@
1
1
  export interface TranscribeErrorMessageError {
2
+ /** Unique identifier for the request, for support and debugging. */
3
+ requestid?: string;
2
4
  /** Unique error identifier */
3
- id: string;
5
+ id?: string;
4
6
  /** Error title */
5
- title: string;
7
+ title?: string;
6
8
  /** HTTP status code */
7
- status: number;
9
+ status?: number;
8
10
  /** Detailed error description */
9
- details: string;
11
+ details?: string;
10
12
  /** Link to documentation */
11
- doc: string;
13
+ doc?: string;
12
14
  }
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Supported language codes for transcription
2
+ * Supported language codes for transcription. See details and available language codes [here](https://docs.corti.ai/stt/languages).
3
3
  */
4
4
  export type TranscribeSupportedLanguage = string;
@@ -143,12 +143,10 @@ export * from "./GuidedSectionInstructionsOverride.mjs";
143
143
  export * from "./GuidedSectionInstructionsPartial.mjs";
144
144
  export * from "./GuidedSectionOverride.mjs";
145
145
  export * from "./GuidedSectionOverrides.mjs";
146
- export * from "./GuidedSectionPolicy.mjs";
147
146
  export * from "./GuidedSectionSource.mjs";
148
147
  export * from "./GuidedSectionsCreateBase.mjs";
149
148
  export * from "./GuidedSectionsCreateFromInheritanceRequest.mjs";
150
149
  export * from "./GuidedSectionsCreateFromScratchRequest.mjs";
151
- export * from "./GuidedSectionsCreatePolicyRequest.mjs";
152
150
  export * from "./GuidedSectionsCreateRequest.mjs";
153
151
  export * from "./GuidedSectionVersion.mjs";
154
152
  export * from "./GuidedShallowTemplateGeneration.mjs";
@@ -160,8 +158,6 @@ export * from "./GuidedTemplateGeneration.mjs";
160
158
  export * from "./GuidedTemplateInstructions.mjs";
161
159
  export * from "./GuidedTemplateInstructionsPartial.mjs";
162
160
  export * from "./GuidedTemplateOverrides.mjs";
163
- export * from "./GuidedTemplatePolicy.mjs";
164
- export * from "./GuidedTemplatePolicyKind.mjs";
165
161
  export * from "./GuidedTemplateRef.mjs";
166
162
  export * from "./GuidedTemplateSource.mjs";
167
163
  export * from "./GuidedTemplatesCreateBase.mjs";
@@ -169,7 +165,6 @@ export * from "./GuidedTemplatesCreateFromInheritanceRequest.mjs";
169
165
  export * from "./GuidedTemplatesCreateFromInheritanceRequestGeneration.mjs";
170
166
  export * from "./GuidedTemplatesCreateFromScratchRequest.mjs";
171
167
  export * from "./GuidedTemplatesCreateFromScratchRequestGeneration.mjs";
172
- export * from "./GuidedTemplatesCreatePolicyRequest.mjs";
173
168
  export * from "./GuidedTemplatesCreateRequest.mjs";
174
169
  export * from "./GuidedTemplatesVersionGeneration.mjs";
175
170
  export * from "./GuidedTemplatesVersionSectionRequest.mjs";
@@ -195,12 +190,15 @@ export * from "./StreamAudioEventDataEvent.mjs";
195
190
  export * from "./StreamAudioEventMessage.mjs";
196
191
  export * from "./StreamAudioEventsConfig.mjs";
197
192
  export * from "./StreamConfig.mjs";
193
+ export * from "./StreamConfigKeyterms.mjs";
194
+ export * from "./StreamConfigKeytermsTermsItem.mjs";
198
195
  export * from "./StreamConfigMessage.mjs";
199
196
  export * from "./StreamConfigMode.mjs";
200
197
  export * from "./StreamConfigModeFactGenerationInterval.mjs";
201
198
  export * from "./StreamConfigModeType.mjs";
202
199
  export * from "./StreamConfigParticipant.mjs";
203
200
  export * from "./StreamConfigParticipantRole.mjs";
201
+ export * from "./StreamConfigReplacementsItem.mjs";
204
202
  export * from "./StreamConfigRetentionPolicy.mjs";
205
203
  export * from "./StreamConfigStatusMessage.mjs";
206
204
  export * from "./StreamConfigStatusMessageType.mjs";
@@ -238,8 +236,12 @@ export * from "./TranscribeCommand.mjs";
238
236
  export * from "./TranscribeCommandData.mjs";
239
237
  export * from "./TranscribeCommandMessage.mjs";
240
238
  export * from "./TranscribeCommandVariable.mjs";
239
+ export * from "./TranscribeCommandVariableType.mjs";
241
240
  export * from "./TranscribeConfig.mjs";
241
+ export * from "./TranscribeConfigKeyterms.mjs";
242
+ export * from "./TranscribeConfigKeytermsTermsItem.mjs";
242
243
  export * from "./TranscribeConfigMessage.mjs";
244
+ export * from "./TranscribeConfigReplacementsItem.mjs";
243
245
  export * from "./TranscribeConfigStatusMessage.mjs";
244
246
  export * from "./TranscribeConfigStatusMessageType.mjs";
245
247
  export * from "./TranscribeDeltaUsageMessage.mjs";
@@ -143,12 +143,10 @@ export * from "./GuidedSectionInstructionsOverride.mjs";
143
143
  export * from "./GuidedSectionInstructionsPartial.mjs";
144
144
  export * from "./GuidedSectionOverride.mjs";
145
145
  export * from "./GuidedSectionOverrides.mjs";
146
- export * from "./GuidedSectionPolicy.mjs";
147
146
  export * from "./GuidedSectionSource.mjs";
148
147
  export * from "./GuidedSectionsCreateBase.mjs";
149
148
  export * from "./GuidedSectionsCreateFromInheritanceRequest.mjs";
150
149
  export * from "./GuidedSectionsCreateFromScratchRequest.mjs";
151
- export * from "./GuidedSectionsCreatePolicyRequest.mjs";
152
150
  export * from "./GuidedSectionsCreateRequest.mjs";
153
151
  export * from "./GuidedSectionVersion.mjs";
154
152
  export * from "./GuidedShallowTemplateGeneration.mjs";
@@ -160,8 +158,6 @@ export * from "./GuidedTemplateGeneration.mjs";
160
158
  export * from "./GuidedTemplateInstructions.mjs";
161
159
  export * from "./GuidedTemplateInstructionsPartial.mjs";
162
160
  export * from "./GuidedTemplateOverrides.mjs";
163
- export * from "./GuidedTemplatePolicy.mjs";
164
- export * from "./GuidedTemplatePolicyKind.mjs";
165
161
  export * from "./GuidedTemplateRef.mjs";
166
162
  export * from "./GuidedTemplateSource.mjs";
167
163
  export * from "./GuidedTemplatesCreateBase.mjs";
@@ -169,7 +165,6 @@ export * from "./GuidedTemplatesCreateFromInheritanceRequest.mjs";
169
165
  export * from "./GuidedTemplatesCreateFromInheritanceRequestGeneration.mjs";
170
166
  export * from "./GuidedTemplatesCreateFromScratchRequest.mjs";
171
167
  export * from "./GuidedTemplatesCreateFromScratchRequestGeneration.mjs";
172
- export * from "./GuidedTemplatesCreatePolicyRequest.mjs";
173
168
  export * from "./GuidedTemplatesCreateRequest.mjs";
174
169
  export * from "./GuidedTemplatesVersionGeneration.mjs";
175
170
  export * from "./GuidedTemplatesVersionSectionRequest.mjs";
@@ -195,12 +190,15 @@ export * from "./StreamAudioEventDataEvent.mjs";
195
190
  export * from "./StreamAudioEventMessage.mjs";
196
191
  export * from "./StreamAudioEventsConfig.mjs";
197
192
  export * from "./StreamConfig.mjs";
193
+ export * from "./StreamConfigKeyterms.mjs";
194
+ export * from "./StreamConfigKeytermsTermsItem.mjs";
198
195
  export * from "./StreamConfigMessage.mjs";
199
196
  export * from "./StreamConfigMode.mjs";
200
197
  export * from "./StreamConfigModeFactGenerationInterval.mjs";
201
198
  export * from "./StreamConfigModeType.mjs";
202
199
  export * from "./StreamConfigParticipant.mjs";
203
200
  export * from "./StreamConfigParticipantRole.mjs";
201
+ export * from "./StreamConfigReplacementsItem.mjs";
204
202
  export * from "./StreamConfigRetentionPolicy.mjs";
205
203
  export * from "./StreamConfigStatusMessage.mjs";
206
204
  export * from "./StreamConfigStatusMessageType.mjs";
@@ -238,8 +236,12 @@ export * from "./TranscribeCommand.mjs";
238
236
  export * from "./TranscribeCommandData.mjs";
239
237
  export * from "./TranscribeCommandMessage.mjs";
240
238
  export * from "./TranscribeCommandVariable.mjs";
239
+ export * from "./TranscribeCommandVariableType.mjs";
241
240
  export * from "./TranscribeConfig.mjs";
241
+ export * from "./TranscribeConfigKeyterms.mjs";
242
+ export * from "./TranscribeConfigKeytermsTermsItem.mjs";
242
243
  export * from "./TranscribeConfigMessage.mjs";
244
+ export * from "./TranscribeConfigReplacementsItem.mjs";
243
245
  export * from "./TranscribeConfigStatusMessage.mjs";
244
246
  export * from "./TranscribeConfigStatusMessageType.mjs";
245
247
  export * from "./TranscribeDeltaUsageMessage.mjs";
@@ -0,0 +1,26 @@
1
+ import type { TranscribeTranscriptData } from "../../api/types/TranscribeTranscriptData.mjs";
2
+ export interface DictationTranscriptSnapshot {
3
+ /** Finalized text. Use this for copy, clear, and JSON export. */
4
+ committedText: string;
5
+ /**
6
+ * Active interim preview. Empty string when none.
7
+ * Includes its leading boundary space so the UI can render it verbatim
8
+ * immediately after committedText.
9
+ */
10
+ interimText: string;
11
+ /** @internal */
12
+ _finalizedStarts: ReadonlySet<number>;
13
+ /** @internal */
14
+ _latestFinalEnd: number;
15
+ }
16
+ /**
17
+ * Pure function that applies a single transcript message to the previous
18
+ * snapshot and returns a new snapshot with updated committed/interim text.
19
+ *
20
+ * - Handles the two-layer committed + interim model (DXG-844).
21
+ * - Ignores late interims that overlap an already-finalized timeline (DXG-1093).
22
+ *
23
+ * @param previous - The last snapshot, or `undefined` on first call.
24
+ * @param message - The incoming transcript packet (subset of TranscribeTranscriptData).
25
+ */
26
+ export declare function applyDictationTranscript(previous: DictationTranscriptSnapshot | undefined, message: Pick<TranscribeTranscriptData, "text" | "start" | "end" | "isFinal">): DictationTranscriptSnapshot;
@@ -0,0 +1,74 @@
1
+ const NO_SPACE_AFTER = new Set(["(", "[", "{", '"', "'", "\u2018", "\u201c"]);
2
+ const LEFT_ATTACH = new Set([",", ".", ":", ";", "!", "?", ")", "]", "}", "%"]);
3
+ /**
4
+ * Returns the segment text prefixed with at most one space, applying
5
+ * punctuation-aware boundary rules so callers never produce double-spaces
6
+ * or spaces before attachment characters.
7
+ */
8
+ function buildInsertion(committed, segment) {
9
+ var _a;
10
+ if (!segment)
11
+ return segment;
12
+ const prevChar = committed.length > 0 ? committed[committed.length - 1] : "";
13
+ const nextChar = (_a = segment[0]) !== null && _a !== void 0 ? _a : "";
14
+ const needsSpace = committed.length > 0 && !/\s/.test(prevChar) && !NO_SPACE_AFTER.has(prevChar) && !LEFT_ATTACH.has(nextChar);
15
+ return needsSpace ? ` ${segment}` : segment;
16
+ }
17
+ /**
18
+ * Pure function that applies a single transcript message to the previous
19
+ * snapshot and returns a new snapshot with updated committed/interim text.
20
+ *
21
+ * - Handles the two-layer committed + interim model (DXG-844).
22
+ * - Ignores late interims that overlap an already-finalized timeline (DXG-1093).
23
+ *
24
+ * @param previous - The last snapshot, or `undefined` on first call.
25
+ * @param message - The incoming transcript packet (subset of TranscribeTranscriptData).
26
+ */
27
+ export function applyDictationTranscript(previous, message) {
28
+ var _a, _b, _c;
29
+ const committedText = (_a = previous === null || previous === void 0 ? void 0 : previous.committedText) !== null && _a !== void 0 ? _a : "";
30
+ const finalizedStarts = (_b = previous === null || previous === void 0 ? void 0 : previous._finalizedStarts) !== null && _b !== void 0 ? _b : new Set();
31
+ const latestFinalEnd = (_c = previous === null || previous === void 0 ? void 0 : previous._latestFinalEnd) !== null && _c !== void 0 ? _c : -Infinity;
32
+ if (message.isFinal) {
33
+ if (finalizedStarts.has(message.start)) {
34
+ return {
35
+ committedText,
36
+ interimText: "",
37
+ _finalizedStarts: finalizedStarts,
38
+ _latestFinalEnd: latestFinalEnd,
39
+ };
40
+ }
41
+ const nextFinalizedStarts = new Set(finalizedStarts);
42
+ nextFinalizedStarts.add(message.start);
43
+ const newCommitted = committedText + buildInsertion(committedText, message.text);
44
+ return {
45
+ committedText: newCommitted,
46
+ interimText: "",
47
+ _finalizedStarts: nextFinalizedStarts,
48
+ _latestFinalEnd: Math.max(latestFinalEnd, message.end),
49
+ };
50
+ }
51
+ // Interim path.
52
+ if (finalizedStarts.has(message.start)) {
53
+ return (previous !== null && previous !== void 0 ? previous : {
54
+ committedText: "",
55
+ interimText: "",
56
+ _finalizedStarts: finalizedStarts,
57
+ _latestFinalEnd: latestFinalEnd,
58
+ });
59
+ }
60
+ if (message.start < latestFinalEnd) {
61
+ return (previous !== null && previous !== void 0 ? previous : {
62
+ committedText: "",
63
+ interimText: "",
64
+ _finalizedStarts: finalizedStarts,
65
+ _latestFinalEnd: latestFinalEnd,
66
+ });
67
+ }
68
+ return {
69
+ committedText,
70
+ interimText: buildInsertion(committedText, message.text),
71
+ _finalizedStarts: finalizedStarts,
72
+ _latestFinalEnd: latestFinalEnd,
73
+ };
74
+ }
@@ -1,3 +1,4 @@
1
1
  export { type DecodedToken, decodeToken } from "./decodeToken.mjs";
2
+ export { applyDictationTranscript, type DictationTranscriptSnapshot, } from "./dictationTranscript.mjs";
2
3
  export { getEnvironment } from "./environment.mjs";
3
4
  export { generateCodeChallenge, generateCodeVerifier } from "./pkceHelpers.mjs";
@@ -1,3 +1,4 @@
1
1
  export { decodeToken } from "./decodeToken.mjs";
2
+ export { applyDictationTranscript, } from "./dictationTranscript.mjs";
2
3
  export { getEnvironment } from "./environment.mjs";
3
4
  export { generateCodeChallenge, generateCodeVerifier } from "./pkceHelpers.mjs";
@@ -12,5 +12,6 @@ export declare namespace TranscriptsCreateRequest {
12
12
  isMultichannel?: boolean | null;
13
13
  diarize?: boolean | null;
14
14
  participants?: TranscriptsParticipant.Raw[] | null;
15
+ async?: boolean | null;
15
16
  }
16
17
  }
@@ -9,4 +9,5 @@ export const TranscriptsCreateRequest = core.serialization.object({
9
9
  isMultichannel: core.serialization.boolean().optional(),
10
10
  diarize: core.serialization.boolean().optional(),
11
11
  participants: core.serialization.list(TranscriptsParticipant).optional(),
12
+ async: core.serialization.boolean().optional(),
12
13
  });
@@ -2,11 +2,13 @@ import type * as Corti from "../../api/index.mjs";
2
2
  import * as core from "../../core/index.mjs";
3
3
  import type * as serializers from "../index.mjs";
4
4
  import { GuidedDocumentContext } from "./GuidedDocumentContext.mjs";
5
+ import { GuidedLabel } from "./GuidedLabel.mjs";
5
6
  export declare const GuidedDocumentsGenerateBase: core.serialization.ObjectSchema<serializers.GuidedDocumentsGenerateBase.Raw, Corti.GuidedDocumentsGenerateBase>;
6
7
  export declare namespace GuidedDocumentsGenerateBase {
7
8
  interface Raw {
8
9
  outputLanguage: string;
9
10
  context?: GuidedDocumentContext.Raw[] | null;
10
11
  interactionId?: string | null;
12
+ labels?: GuidedLabel.Raw[] | null;
11
13
  }
12
14
  }
@@ -1,8 +1,10 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../core/index.mjs";
3
3
  import { GuidedDocumentContext } from "./GuidedDocumentContext.mjs";
4
+ import { GuidedLabel } from "./GuidedLabel.mjs";
4
5
  export const GuidedDocumentsGenerateBase = core.serialization.object({
5
6
  outputLanguage: core.serialization.string(),
6
7
  context: core.serialization.list(GuidedDocumentContext).optional(),
7
8
  interactionId: core.serialization.string().optional(),
9
+ labels: core.serialization.list(GuidedLabel).optional(),
8
10
  });
@@ -1,6 +1,7 @@
1
1
  import type * as Corti from "../../api/index.mjs";
2
2
  import * as core from "../../core/index.mjs";
3
3
  import type * as serializers from "../index.mjs";
4
+ import { GuidedLabel } from "./GuidedLabel.mjs";
4
5
  export declare const GuidedEphemeralDocument: core.serialization.ObjectSchema<serializers.GuidedEphemeralDocument.Raw, Corti.GuidedEphemeralDocument>;
5
6
  export declare namespace GuidedEphemeralDocument {
6
7
  interface Raw {
@@ -8,7 +9,9 @@ export declare namespace GuidedEphemeralDocument {
8
9
  templateId: string;
9
10
  templateVersionId: string;
10
11
  language: string;
12
+ interactionId?: (string | null | undefined) | null;
11
13
  stringDocument: Record<string, string>;
12
14
  structuredDocument?: (Record<string, unknown> | null | undefined) | null;
15
+ labels: GuidedLabel.Raw[];
13
16
  }
14
17
  }
@@ -1,12 +1,15 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../core/index.mjs";
3
+ import { GuidedLabel } from "./GuidedLabel.mjs";
3
4
  export const GuidedEphemeralDocument = core.serialization.object({
4
5
  name: core.serialization.string(),
5
6
  templateId: core.serialization.string(),
6
7
  templateVersionId: core.serialization.string(),
7
8
  language: core.serialization.string(),
9
+ interactionId: core.serialization.string().optionalNullable(),
8
10
  stringDocument: core.serialization.record(core.serialization.string(), core.serialization.string()),
9
11
  structuredDocument: core.serialization
10
12
  .record(core.serialization.string(), core.serialization.unknown())
11
13
  .optionalNullable(),
14
+ labels: core.serialization.list(GuidedLabel),
12
15
  });
@@ -7,5 +7,6 @@ export declare namespace GuidedFieldDefinition {
7
7
  key: string;
8
8
  description: string;
9
9
  value: serializers.GuidedOutputSchema.Raw;
10
+ default?: (string | null | undefined) | null;
10
11
  }
11
12
  }
@@ -5,4 +5,5 @@ export const GuidedFieldDefinition = core.serialization.object({
5
5
  key: core.serialization.string(),
6
6
  description: core.serialization.string(),
7
7
  value: core.serialization.lazy(() => serializers.GuidedOutputSchema),
8
+ default: core.serialization.string().optionalNullable(),
8
9
  });