@corti/sdk 2.0.0-templates.5 → 2.0.0-templates.7

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 (259) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +33 -28
  4. package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +1 -2
  5. package/dist/cjs/api/resources/agents/client/Client.js +4 -28
  6. package/dist/cjs/api/resources/alphaDocuments/client/Client.d.ts +35 -0
  7. package/dist/cjs/api/resources/alphaDocuments/client/Client.js +143 -0
  8. package/dist/cjs/api/resources/alphaDocuments/client/index.d.ts +1 -0
  9. package/dist/cjs/api/resources/alphaDocuments/client/index.js +2 -0
  10. package/dist/cjs/api/resources/alphaDocuments/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/alphaDocuments/index.js +17 -0
  12. package/dist/cjs/api/resources/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/index.js +2 -1
  14. package/dist/cjs/api/types/ContextFacts.d.ts +8 -0
  15. package/dist/cjs/api/types/ContextText.d.ts +8 -0
  16. package/dist/cjs/api/types/ContextTranscript.d.ts +8 -0
  17. package/dist/cjs/api/types/GuidedAssemblyRequest.d.ts +13 -0
  18. package/dist/cjs/api/types/GuidedAssemblySectionRef.d.ts +10 -0
  19. package/dist/cjs/api/types/GuidedAssemblySectionRef.js +3 -0
  20. package/dist/cjs/api/types/GuidedDocumentByAssembly.d.ts +12 -0
  21. package/dist/cjs/api/types/GuidedDocumentByAssembly.js +3 -0
  22. package/dist/cjs/api/types/GuidedDocumentByDynamic.d.ts +12 -0
  23. package/dist/cjs/api/types/GuidedDocumentByDynamic.js +3 -0
  24. package/dist/cjs/api/types/GuidedDocumentByTemplateRef.d.ts +12 -0
  25. package/dist/cjs/api/types/GuidedDocumentByTemplateRef.js +3 -0
  26. package/dist/cjs/api/types/GuidedDocumentContext.d.ts +2 -0
  27. package/dist/cjs/api/types/GuidedDocumentContext.js +3 -0
  28. package/dist/cjs/api/types/GuidedDocumentFactMinimal.d.ts +7 -0
  29. package/dist/cjs/api/types/GuidedDocumentFactMinimal.js +3 -0
  30. package/dist/cjs/api/types/GuidedDocumentRequest.d.ts +2 -0
  31. package/dist/cjs/api/types/GuidedDocumentRequest.js +3 -0
  32. package/dist/cjs/api/types/GuidedDocumentResponse.d.ts +8 -0
  33. package/dist/cjs/api/types/GuidedDocumentResponse.js +3 -0
  34. package/dist/cjs/api/types/GuidedDocumentTranscriptMetadataMinimal.d.ts +7 -0
  35. package/dist/cjs/api/types/GuidedDocumentTranscriptMetadataMinimal.js +3 -0
  36. package/dist/cjs/api/types/GuidedDocumentTranscriptMinimal.d.ts +8 -0
  37. package/dist/cjs/api/types/GuidedDocumentTranscriptMinimal.js +3 -0
  38. package/dist/cjs/api/types/GuidedDocumentTranscriptSegmentMinimal.d.ts +17 -0
  39. package/dist/cjs/api/types/GuidedDocumentTranscriptSegmentMinimal.js +3 -0
  40. package/dist/cjs/api/types/GuidedDynamicInline.d.ts +5 -0
  41. package/dist/cjs/api/types/GuidedDynamicInline.js +3 -0
  42. package/dist/cjs/api/types/GuidedDynamicRequest.d.ts +10 -0
  43. package/dist/cjs/api/types/GuidedDynamicRequest.js +3 -0
  44. package/dist/cjs/api/types/GuidedGenerationResult.d.ts +11 -0
  45. package/dist/cjs/api/types/GuidedGenerationResult.js +3 -0
  46. package/dist/cjs/api/types/GuidedGenerationResultUsage.d.ts +4 -0
  47. package/dist/cjs/api/types/GuidedGenerationResultUsage.js +3 -0
  48. package/dist/cjs/api/types/GuidedGenerationResultUsageTokenCount.d.ts +4 -0
  49. package/dist/cjs/api/types/GuidedGenerationResultUsageTokenCount.js +3 -0
  50. package/dist/cjs/api/types/GuidedSectionOverride.d.ts +13 -0
  51. package/dist/cjs/api/types/GuidedSectionOverride.js +3 -0
  52. package/dist/cjs/api/types/GuidedTemplateOverrides.d.ts +7 -0
  53. package/dist/cjs/api/types/GuidedTemplateOverrides.js +3 -0
  54. package/dist/cjs/api/types/GuidedTemplateRef.d.ts +9 -0
  55. package/dist/cjs/api/types/GuidedTemplateRef.js +3 -0
  56. package/dist/cjs/api/types/SectionInstructionsOverride.d.ts +9 -0
  57. package/dist/cjs/api/types/SectionInstructionsOverride.js +3 -0
  58. package/dist/cjs/api/types/SectionOverrides.d.ts +11 -0
  59. package/dist/cjs/api/types/SectionOverrides.js +3 -0
  60. package/dist/cjs/api/types/index.d.ts +25 -4
  61. package/dist/cjs/api/types/index.js +25 -4
  62. package/dist/cjs/serialization/types/ContextFacts.d.ts +11 -0
  63. package/dist/cjs/serialization/types/{AgentsErrorResponse.js → ContextFacts.js} +5 -7
  64. package/dist/cjs/serialization/types/ContextText.d.ts +10 -0
  65. package/dist/cjs/serialization/types/{AgentsValidationErrorErrorsItem.js → ContextText.js} +4 -4
  66. package/dist/cjs/serialization/types/ContextTranscript.d.ts +11 -0
  67. package/dist/cjs/serialization/types/{AgentsValidationError.js → ContextTranscript.js} +5 -8
  68. package/dist/cjs/serialization/types/GuidedAssemblyRequest.d.ts +14 -0
  69. package/dist/cjs/serialization/types/GuidedAssemblyRequest.js +46 -0
  70. package/dist/cjs/serialization/types/GuidedAssemblySectionRef.d.ts +12 -0
  71. package/dist/cjs/serialization/types/GuidedAssemblySectionRef.js +44 -0
  72. package/dist/cjs/serialization/types/GuidedDocumentByAssembly.d.ts +13 -0
  73. package/dist/cjs/serialization/types/GuidedDocumentByAssembly.js +45 -0
  74. package/dist/cjs/serialization/types/GuidedDocumentByDynamic.d.ts +13 -0
  75. package/dist/cjs/serialization/types/GuidedDocumentByDynamic.js +45 -0
  76. package/dist/cjs/serialization/types/GuidedDocumentByTemplateRef.d.ts +13 -0
  77. package/dist/cjs/serialization/types/GuidedDocumentByTemplateRef.js +45 -0
  78. package/dist/cjs/serialization/types/GuidedDocumentContext.d.ts +10 -0
  79. package/dist/cjs/serialization/types/GuidedDocumentContext.js +42 -0
  80. package/dist/cjs/serialization/types/GuidedDocumentFactMinimal.d.ts +9 -0
  81. package/dist/cjs/serialization/types/GuidedDocumentFactMinimal.js +41 -0
  82. package/dist/cjs/serialization/types/GuidedDocumentRequest.d.ts +10 -0
  83. package/dist/cjs/serialization/types/GuidedDocumentRequest.js +46 -0
  84. package/dist/cjs/serialization/types/GuidedDocumentResponse.d.ts +12 -0
  85. package/dist/cjs/serialization/types/GuidedDocumentResponse.js +44 -0
  86. package/dist/cjs/serialization/types/GuidedDocumentTranscriptMetadataMinimal.d.ts +10 -0
  87. package/dist/cjs/serialization/types/GuidedDocumentTranscriptMetadataMinimal.js +42 -0
  88. package/dist/cjs/serialization/types/GuidedDocumentTranscriptMinimal.d.ts +12 -0
  89. package/dist/cjs/serialization/types/GuidedDocumentTranscriptMinimal.js +44 -0
  90. package/dist/cjs/serialization/types/GuidedDocumentTranscriptSegmentMinimal.d.ts +14 -0
  91. package/dist/cjs/serialization/types/GuidedDocumentTranscriptSegmentMinimal.js +46 -0
  92. package/dist/cjs/serialization/types/GuidedDynamicInline.d.ts +12 -0
  93. package/dist/cjs/serialization/types/GuidedDynamicInline.js +44 -0
  94. package/dist/cjs/serialization/types/GuidedDynamicRequest.d.ts +12 -0
  95. package/dist/cjs/serialization/types/{AgentsValidationErrorResponse.js → GuidedDynamicRequest.js} +7 -8
  96. package/dist/cjs/serialization/types/GuidedGenerationResult.d.ts +12 -0
  97. package/dist/cjs/serialization/types/GuidedGenerationResult.js +46 -0
  98. package/dist/cjs/serialization/types/GuidedGenerationResultUsage.d.ts +10 -0
  99. package/dist/cjs/serialization/types/GuidedGenerationResultUsage.js +42 -0
  100. package/dist/cjs/serialization/types/GuidedGenerationResultUsageTokenCount.d.ts +10 -0
  101. package/dist/cjs/serialization/types/GuidedGenerationResultUsageTokenCount.js +42 -0
  102. package/dist/cjs/serialization/types/GuidedSectionOverride.d.ts +13 -0
  103. package/dist/cjs/serialization/types/GuidedSectionOverride.js +46 -0
  104. package/dist/cjs/serialization/types/GuidedTemplateOverrides.d.ts +12 -0
  105. package/dist/cjs/serialization/types/GuidedTemplateOverrides.js +44 -0
  106. package/dist/cjs/serialization/types/GuidedTemplateRef.d.ts +12 -0
  107. package/dist/cjs/serialization/types/GuidedTemplateRef.js +44 -0
  108. package/dist/cjs/serialization/types/SectionInstructionsOverride.d.ts +10 -0
  109. package/dist/cjs/serialization/types/SectionInstructionsOverride.js +42 -0
  110. package/dist/cjs/serialization/types/SectionOverrides.d.ts +12 -0
  111. package/dist/cjs/serialization/types/SectionOverrides.js +45 -0
  112. package/dist/cjs/serialization/types/index.d.ts +25 -4
  113. package/dist/cjs/serialization/types/index.js +25 -4
  114. package/dist/cjs/version.d.ts +1 -1
  115. package/dist/cjs/version.js +1 -1
  116. package/dist/esm/BaseClient.mjs +2 -2
  117. package/dist/esm/Client.d.mts +3 -0
  118. package/dist/esm/Client.mjs +5 -0
  119. package/dist/esm/api/errors/UnprocessableEntityError.d.mts +1 -2
  120. package/dist/esm/api/resources/agents/client/Client.mjs +4 -28
  121. package/dist/esm/api/resources/alphaDocuments/client/Client.d.mts +35 -0
  122. package/dist/esm/api/resources/alphaDocuments/client/Client.mjs +106 -0
  123. package/dist/esm/api/resources/alphaDocuments/client/index.d.mts +1 -0
  124. package/dist/esm/api/resources/alphaDocuments/client/index.mjs +1 -0
  125. package/dist/esm/api/resources/alphaDocuments/index.d.mts +1 -0
  126. package/dist/esm/api/resources/alphaDocuments/index.mjs +1 -0
  127. package/dist/esm/api/resources/index.d.mts +1 -0
  128. package/dist/esm/api/resources/index.mjs +1 -0
  129. package/dist/esm/api/types/ContextFacts.d.mts +8 -0
  130. package/dist/esm/api/types/ContextText.d.mts +8 -0
  131. package/dist/esm/api/types/ContextTranscript.d.mts +8 -0
  132. package/dist/esm/api/types/GuidedAssemblyRequest.d.mts +13 -0
  133. package/dist/esm/api/types/GuidedAssemblySectionRef.d.mts +10 -0
  134. package/dist/esm/api/types/GuidedAssemblySectionRef.mjs +2 -0
  135. package/dist/esm/api/types/GuidedDocumentByAssembly.d.mts +12 -0
  136. package/dist/esm/api/types/GuidedDocumentByAssembly.mjs +2 -0
  137. package/dist/esm/api/types/GuidedDocumentByDynamic.d.mts +12 -0
  138. package/dist/esm/api/types/GuidedDocumentByDynamic.mjs +2 -0
  139. package/dist/esm/api/types/GuidedDocumentByTemplateRef.d.mts +12 -0
  140. package/dist/esm/api/types/GuidedDocumentByTemplateRef.mjs +2 -0
  141. package/dist/esm/api/types/GuidedDocumentContext.d.mts +2 -0
  142. package/dist/esm/api/types/GuidedDocumentContext.mjs +2 -0
  143. package/dist/esm/api/types/GuidedDocumentFactMinimal.d.mts +7 -0
  144. package/dist/esm/api/types/GuidedDocumentFactMinimal.mjs +2 -0
  145. package/dist/esm/api/types/GuidedDocumentRequest.d.mts +2 -0
  146. package/dist/esm/api/types/GuidedDocumentRequest.mjs +2 -0
  147. package/dist/esm/api/types/GuidedDocumentResponse.d.mts +8 -0
  148. package/dist/esm/api/types/GuidedDocumentResponse.mjs +2 -0
  149. package/dist/esm/api/types/GuidedDocumentTranscriptMetadataMinimal.d.mts +7 -0
  150. package/dist/esm/api/types/GuidedDocumentTranscriptMetadataMinimal.mjs +2 -0
  151. package/dist/esm/api/types/GuidedDocumentTranscriptMinimal.d.mts +8 -0
  152. package/dist/esm/api/types/GuidedDocumentTranscriptMinimal.mjs +2 -0
  153. package/dist/esm/api/types/GuidedDocumentTranscriptSegmentMinimal.d.mts +17 -0
  154. package/dist/esm/api/types/GuidedDocumentTranscriptSegmentMinimal.mjs +2 -0
  155. package/dist/esm/api/types/GuidedDynamicInline.d.mts +5 -0
  156. package/dist/esm/api/types/GuidedDynamicInline.mjs +2 -0
  157. package/dist/esm/api/types/GuidedDynamicRequest.d.mts +10 -0
  158. package/dist/esm/api/types/GuidedDynamicRequest.mjs +2 -0
  159. package/dist/esm/api/types/GuidedGenerationResult.d.mts +11 -0
  160. package/dist/esm/api/types/GuidedGenerationResult.mjs +2 -0
  161. package/dist/esm/api/types/GuidedGenerationResultUsage.d.mts +4 -0
  162. package/dist/esm/api/types/GuidedGenerationResultUsage.mjs +2 -0
  163. package/dist/esm/api/types/GuidedGenerationResultUsageTokenCount.d.mts +4 -0
  164. package/dist/esm/api/types/GuidedGenerationResultUsageTokenCount.mjs +2 -0
  165. package/dist/esm/api/types/GuidedSectionOverride.d.mts +13 -0
  166. package/dist/esm/api/types/GuidedSectionOverride.mjs +2 -0
  167. package/dist/esm/api/types/GuidedTemplateOverrides.d.mts +7 -0
  168. package/dist/esm/api/types/GuidedTemplateOverrides.mjs +2 -0
  169. package/dist/esm/api/types/GuidedTemplateRef.d.mts +9 -0
  170. package/dist/esm/api/types/GuidedTemplateRef.mjs +2 -0
  171. package/dist/esm/api/types/SectionInstructionsOverride.d.mts +9 -0
  172. package/dist/esm/api/types/SectionInstructionsOverride.mjs +2 -0
  173. package/dist/esm/api/types/SectionOverrides.d.mts +11 -0
  174. package/dist/esm/api/types/SectionOverrides.mjs +2 -0
  175. package/dist/esm/api/types/index.d.mts +25 -4
  176. package/dist/esm/api/types/index.mjs +25 -4
  177. package/dist/esm/serialization/types/ContextFacts.d.mts +11 -0
  178. package/dist/esm/serialization/types/ContextFacts.mjs +7 -0
  179. package/dist/esm/serialization/types/ContextText.d.mts +10 -0
  180. package/dist/esm/serialization/types/ContextText.mjs +6 -0
  181. package/dist/esm/serialization/types/ContextTranscript.d.mts +11 -0
  182. package/dist/esm/serialization/types/ContextTranscript.mjs +7 -0
  183. package/dist/esm/serialization/types/GuidedAssemblyRequest.d.mts +14 -0
  184. package/dist/esm/serialization/types/GuidedAssemblyRequest.mjs +10 -0
  185. package/dist/esm/serialization/types/GuidedAssemblySectionRef.d.mts +12 -0
  186. package/dist/esm/serialization/types/GuidedAssemblySectionRef.mjs +8 -0
  187. package/dist/esm/serialization/types/GuidedDocumentByAssembly.d.mts +13 -0
  188. package/dist/esm/serialization/types/GuidedDocumentByAssembly.mjs +9 -0
  189. package/dist/esm/serialization/types/GuidedDocumentByDynamic.d.mts +13 -0
  190. package/dist/esm/serialization/types/GuidedDocumentByDynamic.mjs +9 -0
  191. package/dist/esm/serialization/types/GuidedDocumentByTemplateRef.d.mts +13 -0
  192. package/dist/esm/serialization/types/GuidedDocumentByTemplateRef.mjs +9 -0
  193. package/dist/esm/serialization/types/GuidedDocumentContext.d.mts +10 -0
  194. package/dist/esm/serialization/types/GuidedDocumentContext.mjs +6 -0
  195. package/dist/esm/serialization/types/GuidedDocumentFactMinimal.d.mts +9 -0
  196. package/dist/esm/serialization/types/GuidedDocumentFactMinimal.mjs +5 -0
  197. package/dist/esm/serialization/types/GuidedDocumentRequest.d.mts +10 -0
  198. package/dist/esm/serialization/types/GuidedDocumentRequest.mjs +10 -0
  199. package/dist/esm/serialization/types/GuidedDocumentResponse.d.mts +12 -0
  200. package/dist/esm/serialization/types/GuidedDocumentResponse.mjs +8 -0
  201. package/dist/esm/serialization/types/GuidedDocumentTranscriptMetadataMinimal.d.mts +10 -0
  202. package/dist/esm/serialization/types/GuidedDocumentTranscriptMetadataMinimal.mjs +6 -0
  203. package/dist/esm/serialization/types/GuidedDocumentTranscriptMinimal.d.mts +12 -0
  204. package/dist/esm/serialization/types/GuidedDocumentTranscriptMinimal.mjs +8 -0
  205. package/dist/esm/serialization/types/GuidedDocumentTranscriptSegmentMinimal.d.mts +14 -0
  206. package/dist/esm/serialization/types/GuidedDocumentTranscriptSegmentMinimal.mjs +10 -0
  207. package/dist/esm/serialization/types/GuidedDynamicInline.d.mts +12 -0
  208. package/dist/esm/serialization/types/GuidedDynamicInline.mjs +8 -0
  209. package/dist/esm/serialization/types/GuidedDynamicRequest.d.mts +12 -0
  210. package/dist/esm/serialization/types/GuidedDynamicRequest.mjs +8 -0
  211. package/dist/esm/serialization/types/GuidedGenerationResult.d.mts +12 -0
  212. package/dist/esm/serialization/types/GuidedGenerationResult.mjs +10 -0
  213. package/dist/esm/serialization/types/GuidedGenerationResultUsage.d.mts +10 -0
  214. package/dist/esm/serialization/types/GuidedGenerationResultUsage.mjs +6 -0
  215. package/dist/esm/serialization/types/GuidedGenerationResultUsageTokenCount.d.mts +10 -0
  216. package/dist/esm/serialization/types/GuidedGenerationResultUsageTokenCount.mjs +6 -0
  217. package/dist/esm/serialization/types/GuidedSectionOverride.d.mts +13 -0
  218. package/dist/esm/serialization/types/GuidedSectionOverride.mjs +10 -0
  219. package/dist/esm/serialization/types/GuidedTemplateOverrides.d.mts +12 -0
  220. package/dist/esm/serialization/types/GuidedTemplateOverrides.mjs +8 -0
  221. package/dist/esm/serialization/types/GuidedTemplateRef.d.mts +12 -0
  222. package/dist/esm/serialization/types/GuidedTemplateRef.mjs +8 -0
  223. package/dist/esm/serialization/types/SectionInstructionsOverride.d.mts +10 -0
  224. package/dist/esm/serialization/types/SectionInstructionsOverride.mjs +6 -0
  225. package/dist/esm/serialization/types/SectionOverrides.d.mts +12 -0
  226. package/dist/esm/serialization/types/SectionOverrides.mjs +9 -0
  227. package/dist/esm/serialization/types/index.d.mts +25 -4
  228. package/dist/esm/serialization/types/index.mjs +25 -4
  229. package/dist/esm/version.d.mts +1 -1
  230. package/dist/esm/version.mjs +1 -1
  231. package/package.json +1 -1
  232. package/dist/cjs/api/types/AgentsErrorResponse.d.ts +0 -12
  233. package/dist/cjs/api/types/AgentsValidationError.d.ts +0 -8
  234. package/dist/cjs/api/types/AgentsValidationErrorErrorsItem.d.ts +0 -4
  235. package/dist/cjs/api/types/AgentsValidationErrorResponse.d.ts +0 -4
  236. package/dist/cjs/serialization/types/AgentsErrorResponse.d.ts +0 -13
  237. package/dist/cjs/serialization/types/AgentsValidationError.d.ts +0 -14
  238. package/dist/cjs/serialization/types/AgentsValidationErrorErrorsItem.d.ts +0 -10
  239. package/dist/cjs/serialization/types/AgentsValidationErrorResponse.d.ts +0 -11
  240. package/dist/esm/api/types/AgentsErrorResponse.d.mts +0 -12
  241. package/dist/esm/api/types/AgentsValidationError.d.mts +0 -8
  242. package/dist/esm/api/types/AgentsValidationErrorErrorsItem.d.mts +0 -4
  243. package/dist/esm/api/types/AgentsValidationErrorResponse.d.mts +0 -4
  244. package/dist/esm/serialization/types/AgentsErrorResponse.d.mts +0 -13
  245. package/dist/esm/serialization/types/AgentsErrorResponse.mjs +0 -9
  246. package/dist/esm/serialization/types/AgentsValidationError.d.mts +0 -14
  247. package/dist/esm/serialization/types/AgentsValidationError.mjs +0 -10
  248. package/dist/esm/serialization/types/AgentsValidationErrorErrorsItem.d.mts +0 -10
  249. package/dist/esm/serialization/types/AgentsValidationErrorErrorsItem.mjs +0 -6
  250. package/dist/esm/serialization/types/AgentsValidationErrorResponse.d.mts +0 -11
  251. package/dist/esm/serialization/types/AgentsValidationErrorResponse.mjs +0 -9
  252. /package/dist/cjs/api/types/{AgentsErrorResponse.js → ContextFacts.js} +0 -0
  253. /package/dist/cjs/api/types/{AgentsValidationError.js → ContextText.js} +0 -0
  254. /package/dist/cjs/api/types/{AgentsValidationErrorErrorsItem.js → ContextTranscript.js} +0 -0
  255. /package/dist/cjs/api/types/{AgentsValidationErrorResponse.js → GuidedAssemblyRequest.js} +0 -0
  256. /package/dist/esm/api/types/{AgentsErrorResponse.mjs → ContextFacts.mjs} +0 -0
  257. /package/dist/esm/api/types/{AgentsValidationError.mjs → ContextText.mjs} +0 -0
  258. /package/dist/esm/api/types/{AgentsValidationErrorErrorsItem.mjs → ContextTranscript.mjs} +0 -0
  259. /package/dist/esm/api/types/{AgentsValidationErrorResponse.mjs → GuidedAssemblyRequest.mjs} +0 -0
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@corti/sdk",
46
- "X-Fern-SDK-Version": "2.0.0-templates.5",
47
- "User-Agent": "@corti/sdk/2.0.0-templates.5",
46
+ "X-Fern-SDK-Version": "2.0.0-templates.7",
47
+ "User-Agent": "@corti/sdk/2.0.0-templates.7",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  "Tenant-Name": options === null || options === void 0 ? void 0 : options.tenantName,
@@ -1,4 +1,5 @@
1
1
  import { AgentsClient } from "./api/resources/agents/client/Client.js";
2
+ import { AlphaDocumentsClient } from "./api/resources/alphaDocuments/client/Client.js";
2
3
  import { AlphaSectionsClient } from "./api/resources/alphaSections/client/Client.js";
3
4
  import { AlphaSectionVersionsClient } from "./api/resources/alphaSectionVersions/client/Client.js";
4
5
  import { AlphaTemplatesClient } from "./api/resources/alphaTemplates/client/Client.js";
@@ -34,6 +35,7 @@ export declare class CortiClient {
34
35
  protected _alphaTemplateVersions: AlphaTemplateVersionsClient | undefined;
35
36
  protected _alphaSections: AlphaSectionsClient | undefined;
36
37
  protected _alphaSectionVersions: AlphaSectionVersionsClient | undefined;
38
+ protected _alphaDocuments: AlphaDocumentsClient | undefined;
37
39
  protected _agents: AgentsClient | undefined;
38
40
  protected _stream: StreamClient | undefined;
39
41
  protected _transcribe: TranscribeClient | undefined;
@@ -50,6 +52,7 @@ export declare class CortiClient {
50
52
  get alphaTemplateVersions(): AlphaTemplateVersionsClient;
51
53
  get alphaSections(): AlphaSectionsClient;
52
54
  get alphaSectionVersions(): AlphaSectionVersionsClient;
55
+ get alphaDocuments(): AlphaDocumentsClient;
53
56
  get agents(): AgentsClient;
54
57
  get stream(): StreamClient;
55
58
  get transcribe(): TranscribeClient;
@@ -3,20 +3,21 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.CortiClient = void 0;
5
5
  const Client_js_1 = require("./api/resources/agents/client/Client.js");
6
- const Client_js_2 = require("./api/resources/alphaSections/client/Client.js");
7
- const Client_js_3 = require("./api/resources/alphaSectionVersions/client/Client.js");
8
- const Client_js_4 = require("./api/resources/alphaTemplates/client/Client.js");
9
- const Client_js_5 = require("./api/resources/alphaTemplateVersions/client/Client.js");
10
- const Client_js_6 = require("./api/resources/auth/client/Client.js");
11
- const Client_js_7 = require("./api/resources/codes/client/Client.js");
12
- const Client_js_8 = require("./api/resources/documents/client/Client.js");
13
- const Client_js_9 = require("./api/resources/facts/client/Client.js");
14
- const Client_js_10 = require("./api/resources/interactions/client/Client.js");
15
- const Client_js_11 = require("./api/resources/recordings/client/Client.js");
16
- const Client_js_12 = require("./api/resources/stream/client/Client.js");
17
- const Client_js_13 = require("./api/resources/templates/client/Client.js");
18
- const Client_js_14 = require("./api/resources/transcribe/client/Client.js");
19
- const Client_js_15 = require("./api/resources/transcripts/client/Client.js");
6
+ const Client_js_2 = require("./api/resources/alphaDocuments/client/Client.js");
7
+ const Client_js_3 = require("./api/resources/alphaSections/client/Client.js");
8
+ const Client_js_4 = require("./api/resources/alphaSectionVersions/client/Client.js");
9
+ const Client_js_5 = require("./api/resources/alphaTemplates/client/Client.js");
10
+ const Client_js_6 = require("./api/resources/alphaTemplateVersions/client/Client.js");
11
+ const Client_js_7 = require("./api/resources/auth/client/Client.js");
12
+ const Client_js_8 = require("./api/resources/codes/client/Client.js");
13
+ const Client_js_9 = require("./api/resources/documents/client/Client.js");
14
+ const Client_js_10 = require("./api/resources/facts/client/Client.js");
15
+ const Client_js_11 = require("./api/resources/interactions/client/Client.js");
16
+ const Client_js_12 = require("./api/resources/recordings/client/Client.js");
17
+ const Client_js_13 = require("./api/resources/stream/client/Client.js");
18
+ const Client_js_14 = require("./api/resources/templates/client/Client.js");
19
+ const Client_js_15 = require("./api/resources/transcribe/client/Client.js");
20
+ const Client_js_16 = require("./api/resources/transcripts/client/Client.js");
20
21
  const BaseClient_js_1 = require("./BaseClient.js");
21
22
  class CortiClient {
22
23
  constructor(options) {
@@ -24,51 +25,55 @@ class CortiClient {
24
25
  }
25
26
  get auth() {
26
27
  var _a;
27
- return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_6.AuthClient(this._options)));
28
+ return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_7.AuthClient(this._options)));
28
29
  }
29
30
  get interactions() {
30
31
  var _a;
31
- return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Client_js_10.InteractionsClient(this._options)));
32
+ return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Client_js_11.InteractionsClient(this._options)));
32
33
  }
33
34
  get recordings() {
34
35
  var _a;
35
- return ((_a = this._recordings) !== null && _a !== void 0 ? _a : (this._recordings = new Client_js_11.RecordingsClient(this._options)));
36
+ return ((_a = this._recordings) !== null && _a !== void 0 ? _a : (this._recordings = new Client_js_12.RecordingsClient(this._options)));
36
37
  }
37
38
  get transcripts() {
38
39
  var _a;
39
- return ((_a = this._transcripts) !== null && _a !== void 0 ? _a : (this._transcripts = new Client_js_15.TranscriptsClient(this._options)));
40
+ return ((_a = this._transcripts) !== null && _a !== void 0 ? _a : (this._transcripts = new Client_js_16.TranscriptsClient(this._options)));
40
41
  }
41
42
  get facts() {
42
43
  var _a;
43
- return ((_a = this._facts) !== null && _a !== void 0 ? _a : (this._facts = new Client_js_9.FactsClient(this._options)));
44
+ return ((_a = this._facts) !== null && _a !== void 0 ? _a : (this._facts = new Client_js_10.FactsClient(this._options)));
44
45
  }
45
46
  get documents() {
46
47
  var _a;
47
- return ((_a = this._documents) !== null && _a !== void 0 ? _a : (this._documents = new Client_js_8.DocumentsClient(this._options)));
48
+ return ((_a = this._documents) !== null && _a !== void 0 ? _a : (this._documents = new Client_js_9.DocumentsClient(this._options)));
48
49
  }
49
50
  get templates() {
50
51
  var _a;
51
- return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_js_13.TemplatesClient(this._options)));
52
+ return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_js_14.TemplatesClient(this._options)));
52
53
  }
53
54
  get codes() {
54
55
  var _a;
55
- return ((_a = this._codes) !== null && _a !== void 0 ? _a : (this._codes = new Client_js_7.CodesClient(this._options)));
56
+ return ((_a = this._codes) !== null && _a !== void 0 ? _a : (this._codes = new Client_js_8.CodesClient(this._options)));
56
57
  }
57
58
  get alphaTemplates() {
58
59
  var _a;
59
- return ((_a = this._alphaTemplates) !== null && _a !== void 0 ? _a : (this._alphaTemplates = new Client_js_4.AlphaTemplatesClient(this._options)));
60
+ return ((_a = this._alphaTemplates) !== null && _a !== void 0 ? _a : (this._alphaTemplates = new Client_js_5.AlphaTemplatesClient(this._options)));
60
61
  }
61
62
  get alphaTemplateVersions() {
62
63
  var _a;
63
- return ((_a = this._alphaTemplateVersions) !== null && _a !== void 0 ? _a : (this._alphaTemplateVersions = new Client_js_5.AlphaTemplateVersionsClient(this._options)));
64
+ return ((_a = this._alphaTemplateVersions) !== null && _a !== void 0 ? _a : (this._alphaTemplateVersions = new Client_js_6.AlphaTemplateVersionsClient(this._options)));
64
65
  }
65
66
  get alphaSections() {
66
67
  var _a;
67
- return ((_a = this._alphaSections) !== null && _a !== void 0 ? _a : (this._alphaSections = new Client_js_2.AlphaSectionsClient(this._options)));
68
+ return ((_a = this._alphaSections) !== null && _a !== void 0 ? _a : (this._alphaSections = new Client_js_3.AlphaSectionsClient(this._options)));
68
69
  }
69
70
  get alphaSectionVersions() {
70
71
  var _a;
71
- return ((_a = this._alphaSectionVersions) !== null && _a !== void 0 ? _a : (this._alphaSectionVersions = new Client_js_3.AlphaSectionVersionsClient(this._options)));
72
+ return ((_a = this._alphaSectionVersions) !== null && _a !== void 0 ? _a : (this._alphaSectionVersions = new Client_js_4.AlphaSectionVersionsClient(this._options)));
73
+ }
74
+ get alphaDocuments() {
75
+ var _a;
76
+ return ((_a = this._alphaDocuments) !== null && _a !== void 0 ? _a : (this._alphaDocuments = new Client_js_2.AlphaDocumentsClient(this._options)));
72
77
  }
73
78
  get agents() {
74
79
  var _a;
@@ -76,11 +81,11 @@ class CortiClient {
76
81
  }
77
82
  get stream() {
78
83
  var _a;
79
- return ((_a = this._stream) !== null && _a !== void 0 ? _a : (this._stream = new Client_js_12.StreamClient(this._options)));
84
+ return ((_a = this._stream) !== null && _a !== void 0 ? _a : (this._stream = new Client_js_13.StreamClient(this._options)));
80
85
  }
81
86
  get transcribe() {
82
87
  var _a;
83
- return ((_a = this._transcribe) !== null && _a !== void 0 ? _a : (this._transcribe = new Client_js_14.TranscribeClient(this._options)));
88
+ return ((_a = this._transcribe) !== null && _a !== void 0 ? _a : (this._transcribe = new Client_js_15.TranscribeClient(this._options)));
84
89
  }
85
90
  }
86
91
  exports.CortiClient = CortiClient;
@@ -1,6 +1,5 @@
1
1
  import type * as core from "../../core/index.js";
2
2
  import * as errors from "../../errors/index.js";
3
- import type * as Corti from "../index.js";
4
3
  export declare class UnprocessableEntityError extends errors.CortiError {
5
- constructor(body: Corti.AgentsValidationErrorResponse, rawResponse?: core.RawResponse);
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
6
5
  }
@@ -196,13 +196,7 @@ class AgentsClient {
196
196
  case 401:
197
197
  throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
198
198
  case 422:
199
- throw new Corti.UnprocessableEntityError(serializers.AgentsValidationErrorResponse.parseOrThrow(_response.error.body, {
200
- unrecognizedObjectKeys: "passthrough",
201
- allowUnrecognizedUnionMembers: true,
202
- allowUnrecognizedEnumValues: true,
203
- skipValidation: true,
204
- breadcrumbsPrefix: ["response"],
205
- }), _response.rawResponse);
199
+ throw new Corti.UnprocessableEntityError(_response.error.body, _response.rawResponse);
206
200
  default:
207
201
  throw new errors.CortiError({
208
202
  statusCode: _response.error.statusCode,
@@ -392,13 +386,7 @@ class AgentsClient {
392
386
  case 404:
393
387
  throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
394
388
  case 422:
395
- throw new Corti.UnprocessableEntityError(serializers.AgentsValidationErrorResponse.parseOrThrow(_response.error.body, {
396
- unrecognizedObjectKeys: "passthrough",
397
- allowUnrecognizedUnionMembers: true,
398
- allowUnrecognizedEnumValues: true,
399
- skipValidation: true,
400
- breadcrumbsPrefix: ["response"],
401
- }), _response.rawResponse);
389
+ throw new Corti.UnprocessableEntityError(_response.error.body, _response.rawResponse);
402
390
  default:
403
391
  throw new errors.CortiError({
404
392
  statusCode: _response.error.statusCode,
@@ -547,13 +535,7 @@ class AgentsClient {
547
535
  case 404:
548
536
  throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
549
537
  case 422:
550
- throw new Corti.UnprocessableEntityError(serializers.AgentsValidationErrorResponse.parseOrThrow(_response.error.body, {
551
- unrecognizedObjectKeys: "passthrough",
552
- allowUnrecognizedUnionMembers: true,
553
- allowUnrecognizedEnumValues: true,
554
- skipValidation: true,
555
- breadcrumbsPrefix: ["response"],
556
- }), _response.rawResponse);
538
+ throw new Corti.UnprocessableEntityError(_response.error.body, _response.rawResponse);
557
539
  default:
558
540
  throw new errors.CortiError({
559
541
  statusCode: _response.error.statusCode,
@@ -766,13 +748,7 @@ class AgentsClient {
766
748
  case 401:
767
749
  throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
768
750
  case 422:
769
- throw new Corti.UnprocessableEntityError(serializers.AgentsValidationErrorResponse.parseOrThrow(_response.error.body, {
770
- unrecognizedObjectKeys: "passthrough",
771
- allowUnrecognizedUnionMembers: true,
772
- allowUnrecognizedEnumValues: true,
773
- skipValidation: true,
774
- breadcrumbsPrefix: ["response"],
775
- }), _response.rawResponse);
751
+ throw new Corti.UnprocessableEntityError(_response.error.body, _response.rawResponse);
776
752
  default:
777
753
  throw new errors.CortiError({
778
754
  statusCode: _response.error.statusCode,
@@ -0,0 +1,35 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as Corti from "../../../index.js";
5
+ export declare namespace AlphaDocumentsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class AlphaDocumentsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<AlphaDocumentsClient.Options>;
12
+ constructor(options: AlphaDocumentsClient.Options);
13
+ /**
14
+ * Generates a structured document using one of four template-supply paths: a stored template reference (optionally with runtime overrides), an ad-hoc assembly of stored sections, or a fully inline dynamic template. Exactly one of `templateRef`, `assemblyTemplate`, or `dynamicTemplate` must be provided.
15
+ *
16
+ * With the exception of the plain `templateRef` path (no overrides), every call persists a new auto-generated template aggregate that snapshots the resolved content. The snapshot is drift-proof: subsequent edits to base templates or sections do not affect previously generated documents.
17
+ *
18
+ * @param {Corti.GuidedDocumentRequest} request
19
+ * @param {AlphaDocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
20
+ *
21
+ * @throws {@link Corti.BadRequestError}
22
+ * @throws {@link Corti.NotFoundError}
23
+ * @throws {@link Corti.UnprocessableEntityError}
24
+ * @throws {@link Corti.BadGatewayError}
25
+ *
26
+ * @example
27
+ * await client.alphaDocuments.generate({
28
+ * templateRef: {
29
+ * templateId: "templateId"
30
+ * }
31
+ * })
32
+ */
33
+ generate(request: Corti.GuidedDocumentRequest, requestOptions?: AlphaDocumentsClient.RequestOptions): core.HttpResponsePromise<Corti.GuidedDocumentResponse>;
34
+ private __generate;
35
+ }
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.AlphaDocumentsClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../core/index.js"));
50
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
51
+ const errors = __importStar(require("../../../../errors/index.js"));
52
+ const serializers = __importStar(require("../../../../serialization/index.js"));
53
+ const Corti = __importStar(require("../../../index.js"));
54
+ class AlphaDocumentsClient {
55
+ constructor(options) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * Generates a structured document using one of four template-supply paths: a stored template reference (optionally with runtime overrides), an ad-hoc assembly of stored sections, or a fully inline dynamic template. Exactly one of `templateRef`, `assemblyTemplate`, or `dynamicTemplate` must be provided.
60
+ *
61
+ * With the exception of the plain `templateRef` path (no overrides), every call persists a new auto-generated template aggregate that snapshots the resolved content. The snapshot is drift-proof: subsequent edits to base templates or sections do not affect previously generated documents.
62
+ *
63
+ * @param {Corti.GuidedDocumentRequest} request
64
+ * @param {AlphaDocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
65
+ *
66
+ * @throws {@link Corti.BadRequestError}
67
+ * @throws {@link Corti.NotFoundError}
68
+ * @throws {@link Corti.UnprocessableEntityError}
69
+ * @throws {@link Corti.BadGatewayError}
70
+ *
71
+ * @example
72
+ * await client.alphaDocuments.generate({
73
+ * templateRef: {
74
+ * templateId: "templateId"
75
+ * }
76
+ * })
77
+ */
78
+ generate(request, requestOptions) {
79
+ return core.HttpResponsePromise.fromPromise(this.__generate(request, requestOptions));
80
+ }
81
+ __generate(request, requestOptions) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
84
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
85
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Tenant-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.tenantName }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
86
+ const _response = yield core.fetcher({
87
+ url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment)).base, "alpha/documents"),
88
+ method: "POST",
89
+ headers: _headers,
90
+ contentType: "application/json",
91
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
92
+ requestType: "json",
93
+ body: serializers.GuidedDocumentRequest.jsonOrThrow(request, {
94
+ unrecognizedObjectKeys: "strip",
95
+ omitUndefined: true,
96
+ }),
97
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
98
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
99
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
100
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
101
+ logging: this._options.logging,
102
+ });
103
+ if (_response.ok) {
104
+ return {
105
+ data: serializers.GuidedDocumentResponse.parseOrThrow(_response.body, {
106
+ unrecognizedObjectKeys: "passthrough",
107
+ allowUnrecognizedUnionMembers: true,
108
+ allowUnrecognizedEnumValues: true,
109
+ skipValidation: true,
110
+ breadcrumbsPrefix: ["response"],
111
+ }),
112
+ rawResponse: _response.rawResponse,
113
+ };
114
+ }
115
+ if (_response.error.reason === "status-code") {
116
+ switch (_response.error.statusCode) {
117
+ case 400:
118
+ throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
119
+ case 404:
120
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
121
+ case 422:
122
+ throw new Corti.UnprocessableEntityError(_response.error.body, _response.rawResponse);
123
+ case 502:
124
+ throw new Corti.BadGatewayError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
125
+ unrecognizedObjectKeys: "passthrough",
126
+ allowUnrecognizedUnionMembers: true,
127
+ allowUnrecognizedEnumValues: true,
128
+ skipValidation: true,
129
+ breadcrumbsPrefix: ["response"],
130
+ }), _response.rawResponse);
131
+ default:
132
+ throw new errors.CortiError({
133
+ statusCode: _response.error.statusCode,
134
+ body: _response.error.body,
135
+ rawResponse: _response.rawResponse,
136
+ });
137
+ }
138
+ }
139
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/alpha/documents");
140
+ });
141
+ }
142
+ }
143
+ exports.AlphaDocumentsClient = AlphaDocumentsClient;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -1,6 +1,7 @@
1
1
  export * from "./agents/client/requests/index.js";
2
2
  export * as agents from "./agents/index.js";
3
3
  export * from "./agents/types/index.js";
4
+ export * as alphaDocuments from "./alphaDocuments/index.js";
4
5
  export * from "./alphaSections/client/requests/index.js";
5
6
  export * as alphaSections from "./alphaSections/index.js";
6
7
  export * as alphaSectionVersions from "./alphaSectionVersions/index.js";
@@ -36,10 +36,11 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.transcripts = exports.transcribe = exports.templates = exports.stream = exports.recordings = exports.interactions = exports.facts = exports.documents = exports.codes = exports.auth = exports.alphaTemplateVersions = exports.alphaTemplates = exports.alphaSectionVersions = exports.alphaSections = exports.agents = void 0;
39
+ exports.transcripts = exports.transcribe = exports.templates = exports.stream = exports.recordings = exports.interactions = exports.facts = exports.documents = exports.codes = exports.auth = exports.alphaTemplateVersions = exports.alphaTemplates = exports.alphaSectionVersions = exports.alphaSections = exports.alphaDocuments = exports.agents = void 0;
40
40
  __exportStar(require("./agents/client/requests/index.js"), exports);
41
41
  exports.agents = __importStar(require("./agents/index.js"));
42
42
  __exportStar(require("./agents/types/index.js"), exports);
43
+ exports.alphaDocuments = __importStar(require("./alphaDocuments/index.js"));
43
44
  __exportStar(require("./alphaSections/client/requests/index.js"), exports);
44
45
  exports.alphaSections = __importStar(require("./alphaSections/index.js"));
45
46
  exports.alphaSectionVersions = __importStar(require("./alphaSectionVersions/index.js"));
@@ -0,0 +1,8 @@
1
+ import type * as Corti from "../index.js";
2
+ /**
3
+ * A single fact provided as input context to the model.
4
+ */
5
+ export interface ContextFacts {
6
+ type: "facts";
7
+ fact: Corti.GuidedDocumentFactMinimal;
8
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * A freeform text snippet provided as input context to the model.
3
+ */
4
+ export interface ContextText {
5
+ type: "text";
6
+ /** Arbitrary text to be reasoned over. */
7
+ text: string;
8
+ }
@@ -0,0 +1,8 @@
1
+ import type * as Corti from "../index.js";
2
+ /**
3
+ * A transcript provided as input context to the model.
4
+ */
5
+ export interface ContextTranscript {
6
+ type: "transcript";
7
+ transcript: Corti.GuidedDocumentTranscriptMinimal;
8
+ }
@@ -0,0 +1,13 @@
1
+ import type * as Corti from "../index.js";
2
+ /**
3
+ * Compose a template by referencing existing stored sections in declaration order.
4
+ */
5
+ export interface GuidedAssemblyRequest {
6
+ /** Name for the auto-generated template aggregate that will be persisted. */
7
+ name: string;
8
+ /** BCP 47 language tag. */
9
+ language: string;
10
+ /** Template-level instructions for the assembled template. */
11
+ instructions?: Corti.TemplateInstructions;
12
+ sectionRefs: Corti.GuidedAssemblySectionRef[];
13
+ }
@@ -0,0 +1,10 @@
1
+ import type * as Corti from "../index.js";
2
+ /**
3
+ * Per-section reference for the assembly path.
4
+ */
5
+ export interface GuidedAssemblySectionRef {
6
+ sectionId: string;
7
+ /** Optional explicit section version. Defaults to the section's published version when omitted. */
8
+ sectionVersionId?: string | null;
9
+ overrides?: Corti.SectionOverrides;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import type * as Corti from "../index.js";
2
+ /**
3
+ * Generate a document by assembling a template from existing stored sections. The resulting template aggregate is auto-saved and can be referenced in future calls. At least one of `context` or `interactionId` must be supplied as input context for the model.
4
+ */
5
+ export interface GuidedDocumentByAssembly {
6
+ /** Ordered list of context items the model reasons over. Each item is one of text, a transcript (with optional metadata and segments), or a single fact. Items are interleaved by timestamps where present on transcript segments; otherwise array order is preserved. */
7
+ context?: Corti.GuidedDocumentContext[];
8
+ /** When supplied, all facts and transcripts already attached to the referenced interaction are passed implicitly as input context. */
9
+ interactionId?: string;
10
+ /** Assemble a template from existing stored sections. */
11
+ assemblyTemplate: Corti.GuidedAssemblyRequest;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import type * as Corti from "../index.js";
2
+ /**
3
+ * Generate a document from a fully inline template definition supplied in the request body. Sections and the wrapping template are created and immediately published as auto-generated resources. At least one of `context` or `interactionId` must be supplied as input context for the model.
4
+ */
5
+ export interface GuidedDocumentByDynamic {
6
+ /** Ordered list of context items the model reasons over. Each item is one of text, a transcript (with optional metadata and segments), or a single fact. Items are interleaved by timestamps where present on transcript segments; otherwise array order is preserved. */
7
+ context?: Corti.GuidedDocumentContext[];
8
+ /** When supplied, all facts and transcripts already attached to the referenced interaction are passed implicitly as input context. */
9
+ interactionId?: string;
10
+ /** Fully inline template defined in the request body. */
11
+ dynamicTemplate: Corti.GuidedDynamicRequest;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import type * as Corti from "../index.js";
2
+ /**
3
+ * Generate a document using a stored template. Optionally supply runtime overrides to patch instructions or sections without mutating the base template. At least one of `context` or `interactionId` must be supplied as input context for the model.
4
+ */
5
+ export interface GuidedDocumentByTemplateRef {
6
+ /** Ordered list of context items the model reasons over. Each item is one of text, a transcript (with optional metadata and segments), or a single fact. Items are interleaved by timestamps where present on transcript segments; otherwise array order is preserved. */
7
+ context?: Corti.GuidedDocumentContext[];
8
+ /** When supplied, all facts and transcripts already attached to the referenced interaction are passed implicitly as input context. */
9
+ interactionId?: string;
10
+ /** Reference an existing stored template, optionally with overrides. */
11
+ templateRef: Corti.GuidedTemplateRef;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import type * as Corti from "../index.js";
2
+ export type GuidedDocumentContext = Corti.ContextText | Corti.ContextTranscript | Corti.ContextFacts;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Minimal fact shape. Only `text` is required.
3
+ */
4
+ export interface GuidedDocumentFactMinimal {
5
+ /** The text of the fact. */
6
+ text: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import type * as Corti from "../index.js";
2
+ export type GuidedDocumentRequest = Corti.GuidedDocumentByTemplateRef | Corti.GuidedDocumentByAssembly | Corti.GuidedDocumentByDynamic;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import type * as Corti from "../index.js";
2
+ export interface GuidedDocumentResponse {
3
+ /** The template ID used for generation. For Path 1 (plain `templateRef` with no overrides), this is the referenced template. For other paths, it is the newly saved, auto-generated template aggregate. */
4
+ templateId: string;
5
+ /** The specific template version that was used for generation. */
6
+ templateVersionId: string;
7
+ result: Corti.GuidedGenerationResult;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });