@corti/sdk 1.2.0 → 2.0.0-templates

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 (363) hide show
  1. package/dist/cjs/BaseClient.d.ts +2 -2
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +12 -0
  4. package/dist/cjs/Client.js +30 -10
  5. package/dist/cjs/api/resources/index.d.ts +7 -0
  6. package/dist/cjs/api/resources/index.js +8 -1
  7. package/dist/cjs/api/resources/newSectionVersions/client/Client.d.ts +84 -0
  8. package/dist/cjs/api/resources/newSectionVersions/client/Client.js +349 -0
  9. package/dist/cjs/api/resources/newSectionVersions/client/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/newSectionVersions/client/index.js +2 -0
  11. package/dist/cjs/api/resources/newSectionVersions/index.d.ts +1 -0
  12. package/dist/cjs/api/resources/newSectionVersions/index.js +17 -0
  13. package/dist/cjs/api/resources/newSections/client/Client.d.ts +81 -0
  14. package/dist/cjs/api/resources/newSections/client/Client.js +353 -0
  15. package/dist/cjs/api/resources/newSections/client/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/newSections/client/index.js +17 -0
  17. package/dist/cjs/api/resources/newSections/client/requests/CreateSectionRequest.d.ts +33 -0
  18. package/dist/cjs/api/resources/newSections/client/requests/CreateSectionRequest.js +3 -0
  19. package/dist/cjs/api/resources/newSections/client/requests/ListNewSectionsRequest.d.ts +12 -0
  20. package/dist/cjs/api/resources/newSections/client/requests/ListNewSectionsRequest.js +3 -0
  21. package/dist/cjs/api/resources/newSections/client/requests/UpdateSectionRequest.d.ts +10 -0
  22. package/dist/cjs/api/resources/newSections/client/requests/UpdateSectionRequest.js +3 -0
  23. package/dist/cjs/api/resources/newSections/client/requests/index.d.ts +3 -0
  24. package/dist/cjs/api/resources/newSections/client/requests/index.js +2 -0
  25. package/dist/cjs/api/resources/newSections/index.d.ts +1 -0
  26. package/dist/cjs/api/resources/newSections/index.js +17 -0
  27. package/dist/cjs/api/resources/newTemplateVersions/client/Client.d.ts +60 -0
  28. package/dist/cjs/api/resources/newTemplateVersions/client/Client.js +255 -0
  29. package/dist/cjs/api/resources/newTemplateVersions/client/index.d.ts +1 -0
  30. package/dist/cjs/api/resources/newTemplateVersions/client/index.js +2 -0
  31. package/dist/cjs/api/resources/newTemplateVersions/index.d.ts +1 -0
  32. package/dist/cjs/api/resources/newTemplateVersions/index.js +17 -0
  33. package/dist/cjs/api/resources/newTemplates/client/Client.d.ts +68 -0
  34. package/dist/cjs/api/resources/newTemplates/client/Client.js +299 -0
  35. package/dist/cjs/api/resources/newTemplates/client/index.d.ts +1 -0
  36. package/dist/cjs/api/resources/newTemplates/client/index.js +17 -0
  37. package/dist/cjs/api/resources/newTemplates/client/requests/CreateTemplateRequest.d.ts +28 -0
  38. package/dist/cjs/api/resources/newTemplates/client/requests/CreateTemplateRequest.js +3 -0
  39. package/dist/cjs/api/resources/newTemplates/client/requests/ListNewTemplatesRequest.d.ts +12 -0
  40. package/dist/cjs/api/resources/newTemplates/client/requests/ListNewTemplatesRequest.js +3 -0
  41. package/dist/cjs/api/resources/newTemplates/client/requests/index.d.ts +2 -0
  42. package/dist/cjs/api/resources/newTemplates/client/requests/index.js +2 -0
  43. package/dist/cjs/api/resources/newTemplates/index.d.ts +2 -0
  44. package/dist/cjs/api/resources/newTemplates/index.js +18 -0
  45. package/dist/cjs/api/resources/newTemplates/types/CreateTemplateRequestGeneration.d.ts +5 -0
  46. package/dist/cjs/api/resources/newTemplates/types/CreateTemplateRequestGeneration.js +3 -0
  47. package/dist/cjs/api/resources/newTemplates/types/index.d.ts +1 -0
  48. package/dist/cjs/api/resources/newTemplates/types/index.js +17 -0
  49. package/dist/cjs/api/types/BoolNode.d.ts +7 -0
  50. package/dist/cjs/api/types/BoolNode.js +3 -0
  51. package/dist/cjs/api/types/DictNode.d.ts +12 -0
  52. package/dist/cjs/api/types/DictNode.js +3 -0
  53. package/dist/cjs/api/types/FieldDefinition.d.ts +8 -0
  54. package/dist/cjs/api/types/FieldDefinition.js +3 -0
  55. package/dist/cjs/api/types/FloatNode.d.ts +13 -0
  56. package/dist/cjs/api/types/FloatNode.js +3 -0
  57. package/dist/cjs/api/types/IntegerNode.d.ts +13 -0
  58. package/dist/cjs/api/types/IntegerNode.js +3 -0
  59. package/dist/cjs/api/types/ListNode.d.ts +13 -0
  60. package/dist/cjs/api/types/ListNode.js +3 -0
  61. package/dist/cjs/api/types/OutputSchema.d.ts +2 -0
  62. package/dist/cjs/api/types/OutputSchema.js +3 -0
  63. package/dist/cjs/api/types/Section.d.ts +23 -0
  64. package/dist/cjs/api/types/Section.js +3 -0
  65. package/dist/cjs/api/types/SectionGeneration.d.ts +8 -0
  66. package/dist/cjs/api/types/SectionGeneration.js +3 -0
  67. package/dist/cjs/api/types/SectionInstructions.d.ts +6 -0
  68. package/dist/cjs/api/types/SectionInstructions.js +3 -0
  69. package/dist/cjs/api/types/SectionVersion.d.ts +8 -0
  70. package/dist/cjs/api/types/SectionVersion.js +3 -0
  71. package/dist/cjs/api/types/StatusResponse.d.ts +3 -0
  72. package/dist/cjs/api/types/StatusResponse.js +3 -0
  73. package/dist/cjs/api/types/StreamConfig.d.ts +3 -1
  74. package/dist/cjs/api/types/{StreamConfigXCortiRetentionPolicy.d.ts → StreamConfigRetentionPolicy.d.ts} +2 -2
  75. package/dist/cjs/api/types/{StreamConfigXCortiRetentionPolicy.js → StreamConfigRetentionPolicy.js} +2 -2
  76. package/dist/cjs/api/types/StreamConfigStatusMessage.d.ts +2 -0
  77. package/dist/cjs/api/types/StringNode.d.ts +11 -0
  78. package/dist/cjs/api/types/StringNode.js +3 -0
  79. package/dist/cjs/api/types/Template.d.ts +22 -0
  80. package/dist/cjs/api/types/Template.js +3 -0
  81. package/dist/cjs/api/types/TemplateGeneration.d.ts +6 -0
  82. package/dist/cjs/api/types/TemplateGeneration.js +3 -0
  83. package/dist/cjs/api/types/TemplateInstructions.d.ts +4 -0
  84. package/dist/cjs/api/types/TemplateInstructions.js +3 -0
  85. package/dist/cjs/api/types/TemplateVersion.d.ts +8 -0
  86. package/dist/cjs/api/types/TemplateVersion.js +3 -0
  87. package/dist/cjs/api/types/TemplateVersionSectionRequest.d.ts +6 -0
  88. package/dist/cjs/api/types/TemplateVersionSectionRequest.js +3 -0
  89. package/dist/cjs/api/types/TranscribeConfig.d.ts +2 -0
  90. package/dist/cjs/api/types/TranscribeConfigStatusMessage.d.ts +4 -2
  91. package/dist/cjs/api/types/index.d.ts +19 -1
  92. package/dist/cjs/api/types/index.js +19 -1
  93. package/dist/cjs/custom/CortiClient.js +2 -2
  94. package/dist/cjs/custom/auth/CortiAuth.js +2 -2
  95. package/dist/cjs/custom/stream/CustomStream.js +2 -2
  96. package/dist/cjs/custom/transcribe/CustomTranscribe.js +3 -3
  97. package/dist/cjs/serialization/resources/index.d.ts +6 -0
  98. package/dist/cjs/serialization/resources/index.js +7 -1
  99. package/dist/cjs/serialization/resources/newSectionVersions/client/index.d.ts +1 -0
  100. package/dist/cjs/serialization/resources/newSectionVersions/client/index.js +37 -0
  101. package/dist/cjs/serialization/resources/newSectionVersions/client/list.d.ts +8 -0
  102. package/dist/cjs/serialization/resources/newSectionVersions/client/list.js +40 -0
  103. package/dist/cjs/serialization/resources/newSectionVersions/index.d.ts +1 -0
  104. package/dist/cjs/serialization/resources/newSectionVersions/index.js +17 -0
  105. package/dist/cjs/serialization/resources/newSections/client/index.d.ts +2 -0
  106. package/dist/cjs/serialization/resources/newSections/client/index.js +41 -0
  107. package/dist/cjs/serialization/resources/newSections/client/list.d.ts +8 -0
  108. package/dist/cjs/serialization/resources/newSections/client/list.js +40 -0
  109. package/dist/cjs/serialization/resources/newSections/client/requests/CreateSectionRequest.d.ts +16 -0
  110. package/dist/cjs/serialization/resources/newSections/client/requests/CreateSectionRequest.js +48 -0
  111. package/dist/cjs/serialization/resources/newSections/client/requests/UpdateSectionRequest.d.ts +12 -0
  112. package/dist/cjs/serialization/resources/newSections/client/requests/UpdateSectionRequest.js +44 -0
  113. package/dist/cjs/serialization/resources/newSections/client/requests/index.d.ts +2 -0
  114. package/dist/cjs/serialization/resources/newSections/client/requests/index.js +7 -0
  115. package/dist/cjs/serialization/resources/newSections/index.d.ts +1 -0
  116. package/dist/cjs/serialization/resources/newSections/index.js +17 -0
  117. package/dist/cjs/serialization/resources/newTemplates/client/index.d.ts +2 -0
  118. package/dist/cjs/serialization/resources/newTemplates/client/index.js +41 -0
  119. package/dist/cjs/serialization/resources/newTemplates/client/list.d.ts +8 -0
  120. package/dist/cjs/serialization/resources/newTemplates/client/list.js +40 -0
  121. package/dist/cjs/serialization/resources/newTemplates/client/requests/CreateTemplateRequest.d.ts +16 -0
  122. package/dist/cjs/serialization/resources/newTemplates/client/requests/CreateTemplateRequest.js +48 -0
  123. package/dist/cjs/serialization/resources/newTemplates/client/requests/index.d.ts +1 -0
  124. package/dist/cjs/serialization/resources/newTemplates/client/requests/index.js +5 -0
  125. package/dist/cjs/serialization/resources/newTemplates/index.d.ts +2 -0
  126. package/dist/cjs/serialization/resources/newTemplates/index.js +18 -0
  127. package/dist/cjs/serialization/resources/newTemplates/types/CreateTemplateRequestGeneration.d.ts +12 -0
  128. package/dist/cjs/serialization/resources/newTemplates/types/CreateTemplateRequestGeneration.js +44 -0
  129. package/dist/cjs/serialization/resources/newTemplates/types/index.d.ts +1 -0
  130. package/dist/cjs/serialization/resources/newTemplates/types/index.js +17 -0
  131. package/dist/cjs/serialization/types/BoolNode.d.ts +11 -0
  132. package/dist/cjs/serialization/types/BoolNode.js +43 -0
  133. package/dist/cjs/serialization/types/DictNode.d.ts +13 -0
  134. package/dist/cjs/serialization/types/DictNode.js +46 -0
  135. package/dist/cjs/serialization/types/FieldDefinition.d.ts +11 -0
  136. package/dist/cjs/serialization/types/FieldDefinition.js +44 -0
  137. package/dist/cjs/serialization/types/FloatNode.d.ts +14 -0
  138. package/dist/cjs/serialization/types/FloatNode.js +46 -0
  139. package/dist/cjs/serialization/types/IntegerNode.d.ts +14 -0
  140. package/dist/cjs/serialization/types/IntegerNode.js +46 -0
  141. package/dist/cjs/serialization/types/ListNode.d.ts +14 -0
  142. package/dist/cjs/serialization/types/ListNode.js +47 -0
  143. package/dist/cjs/serialization/types/OutputSchema.d.ts +11 -0
  144. package/dist/cjs/serialization/types/OutputSchema.js +51 -0
  145. package/dist/cjs/serialization/types/Section.d.ts +19 -0
  146. package/dist/cjs/serialization/types/Section.js +51 -0
  147. package/dist/cjs/serialization/types/SectionGeneration.d.ts +12 -0
  148. package/dist/cjs/serialization/types/SectionGeneration.js +45 -0
  149. package/dist/cjs/serialization/types/SectionInstructions.d.ts +10 -0
  150. package/dist/cjs/serialization/types/SectionInstructions.js +42 -0
  151. package/dist/cjs/serialization/types/SectionVersion.d.ts +12 -0
  152. package/dist/cjs/serialization/types/SectionVersion.js +44 -0
  153. package/dist/cjs/serialization/types/StatusResponse.d.ts +9 -0
  154. package/dist/cjs/serialization/types/{StreamConfigXCortiRetentionPolicy.js → StatusResponse.js} +4 -2
  155. package/dist/cjs/serialization/types/StreamConfig.d.ts +3 -2
  156. package/dist/cjs/serialization/types/StreamConfig.js +3 -2
  157. package/dist/cjs/serialization/types/StreamConfigRetentionPolicy.d.ts +7 -0
  158. package/dist/cjs/serialization/types/StreamConfigRetentionPolicy.js +39 -0
  159. package/dist/cjs/serialization/types/StreamConfigStatusMessage.d.ts +2 -0
  160. package/dist/cjs/serialization/types/StreamConfigStatusMessage.js +2 -0
  161. package/dist/cjs/serialization/types/StringNode.d.ts +13 -0
  162. package/dist/cjs/serialization/types/StringNode.js +45 -0
  163. package/dist/cjs/serialization/types/Template.d.ts +19 -0
  164. package/dist/cjs/serialization/types/Template.js +51 -0
  165. package/dist/cjs/serialization/types/TemplateGeneration.d.ts +12 -0
  166. package/dist/cjs/serialization/types/TemplateGeneration.js +44 -0
  167. package/dist/cjs/serialization/types/TemplateInstructions.d.ts +9 -0
  168. package/dist/cjs/serialization/types/TemplateInstructions.js +41 -0
  169. package/dist/cjs/serialization/types/TemplateVersion.d.ts +12 -0
  170. package/dist/cjs/serialization/types/TemplateVersion.js +44 -0
  171. package/dist/cjs/serialization/types/TemplateVersionSectionRequest.d.ts +10 -0
  172. package/dist/cjs/serialization/types/TemplateVersionSectionRequest.js +42 -0
  173. package/dist/cjs/serialization/types/TranscribeConfig.d.ts +1 -0
  174. package/dist/cjs/serialization/types/TranscribeConfig.js +1 -0
  175. package/dist/cjs/serialization/types/TranscribeConfigStatusMessage.d.ts +3 -1
  176. package/dist/cjs/serialization/types/TranscribeConfigStatusMessage.js +3 -1
  177. package/dist/cjs/serialization/types/index.d.ts +19 -1
  178. package/dist/cjs/serialization/types/index.js +19 -1
  179. package/dist/cjs/version.d.ts +1 -1
  180. package/dist/cjs/version.js +1 -1
  181. package/dist/esm/BaseClient.d.mts +2 -2
  182. package/dist/esm/BaseClient.mjs +2 -2
  183. package/dist/esm/Client.d.mts +12 -0
  184. package/dist/esm/Client.mjs +20 -0
  185. package/dist/esm/api/resources/index.d.mts +7 -0
  186. package/dist/esm/api/resources/index.mjs +7 -0
  187. package/dist/esm/api/resources/newSectionVersions/client/Client.d.mts +84 -0
  188. package/dist/esm/api/resources/newSectionVersions/client/Client.mjs +312 -0
  189. package/dist/esm/api/resources/newSectionVersions/client/index.d.mts +1 -0
  190. package/dist/esm/api/resources/newSectionVersions/client/index.mjs +1 -0
  191. package/dist/esm/api/resources/newSectionVersions/index.d.mts +1 -0
  192. package/dist/esm/api/resources/newSectionVersions/index.mjs +1 -0
  193. package/dist/esm/api/resources/newSections/client/Client.d.mts +81 -0
  194. package/dist/esm/api/resources/newSections/client/Client.mjs +316 -0
  195. package/dist/esm/api/resources/newSections/client/index.d.mts +1 -0
  196. package/dist/esm/api/resources/newSections/client/index.mjs +1 -0
  197. package/dist/esm/api/resources/newSections/client/requests/CreateSectionRequest.d.mts +33 -0
  198. package/dist/esm/api/resources/newSections/client/requests/CreateSectionRequest.mjs +2 -0
  199. package/dist/esm/api/resources/newSections/client/requests/ListNewSectionsRequest.d.mts +12 -0
  200. package/dist/esm/api/resources/newSections/client/requests/ListNewSectionsRequest.mjs +2 -0
  201. package/dist/esm/api/resources/newSections/client/requests/UpdateSectionRequest.d.mts +10 -0
  202. package/dist/esm/api/resources/newSections/client/requests/UpdateSectionRequest.mjs +2 -0
  203. package/dist/esm/api/resources/newSections/client/requests/index.d.mts +3 -0
  204. package/dist/esm/api/resources/newSections/client/requests/index.mjs +1 -0
  205. package/dist/esm/api/resources/newSections/index.d.mts +1 -0
  206. package/dist/esm/api/resources/newSections/index.mjs +1 -0
  207. package/dist/esm/api/resources/newTemplateVersions/client/Client.d.mts +60 -0
  208. package/dist/esm/api/resources/newTemplateVersions/client/Client.mjs +218 -0
  209. package/dist/esm/api/resources/newTemplateVersions/client/index.d.mts +1 -0
  210. package/dist/esm/api/resources/newTemplateVersions/client/index.mjs +1 -0
  211. package/dist/esm/api/resources/newTemplateVersions/index.d.mts +1 -0
  212. package/dist/esm/api/resources/newTemplateVersions/index.mjs +1 -0
  213. package/dist/esm/api/resources/newTemplates/client/Client.d.mts +68 -0
  214. package/dist/esm/api/resources/newTemplates/client/Client.mjs +262 -0
  215. package/dist/esm/api/resources/newTemplates/client/index.d.mts +1 -0
  216. package/dist/esm/api/resources/newTemplates/client/index.mjs +1 -0
  217. package/dist/esm/api/resources/newTemplates/client/requests/CreateTemplateRequest.d.mts +28 -0
  218. package/dist/esm/api/resources/newTemplates/client/requests/CreateTemplateRequest.mjs +2 -0
  219. package/dist/esm/api/resources/newTemplates/client/requests/ListNewTemplatesRequest.d.mts +12 -0
  220. package/dist/esm/api/resources/newTemplates/client/requests/ListNewTemplatesRequest.mjs +2 -0
  221. package/dist/esm/api/resources/newTemplates/client/requests/index.d.mts +2 -0
  222. package/dist/esm/api/resources/newTemplates/client/requests/index.mjs +1 -0
  223. package/dist/esm/api/resources/newTemplates/index.d.mts +2 -0
  224. package/dist/esm/api/resources/newTemplates/index.mjs +2 -0
  225. package/dist/esm/api/resources/newTemplates/types/CreateTemplateRequestGeneration.d.mts +5 -0
  226. package/dist/esm/api/resources/newTemplates/types/CreateTemplateRequestGeneration.mjs +2 -0
  227. package/dist/esm/api/resources/newTemplates/types/index.d.mts +1 -0
  228. package/dist/esm/api/resources/newTemplates/types/index.mjs +1 -0
  229. package/dist/esm/api/types/BoolNode.d.mts +7 -0
  230. package/dist/esm/api/types/BoolNode.mjs +2 -0
  231. package/dist/esm/api/types/DictNode.d.mts +12 -0
  232. package/dist/esm/api/types/DictNode.mjs +2 -0
  233. package/dist/esm/api/types/FieldDefinition.d.mts +8 -0
  234. package/dist/esm/api/types/FieldDefinition.mjs +2 -0
  235. package/dist/esm/api/types/FloatNode.d.mts +13 -0
  236. package/dist/esm/api/types/FloatNode.mjs +2 -0
  237. package/dist/esm/api/types/IntegerNode.d.mts +13 -0
  238. package/dist/esm/api/types/IntegerNode.mjs +2 -0
  239. package/dist/esm/api/types/ListNode.d.mts +13 -0
  240. package/dist/esm/api/types/ListNode.mjs +2 -0
  241. package/dist/esm/api/types/OutputSchema.d.mts +2 -0
  242. package/dist/esm/api/types/OutputSchema.mjs +2 -0
  243. package/dist/esm/api/types/Section.d.mts +23 -0
  244. package/dist/esm/api/types/Section.mjs +2 -0
  245. package/dist/esm/api/types/SectionGeneration.d.mts +8 -0
  246. package/dist/esm/api/types/SectionGeneration.mjs +2 -0
  247. package/dist/esm/api/types/SectionInstructions.d.mts +6 -0
  248. package/dist/esm/api/types/SectionInstructions.mjs +2 -0
  249. package/dist/esm/api/types/SectionVersion.d.mts +8 -0
  250. package/dist/esm/api/types/SectionVersion.mjs +2 -0
  251. package/dist/esm/api/types/StatusResponse.d.mts +3 -0
  252. package/dist/esm/api/types/StatusResponse.mjs +2 -0
  253. package/dist/esm/api/types/StreamConfig.d.mts +3 -1
  254. package/dist/esm/api/types/{StreamConfigXCortiRetentionPolicy.d.mts → StreamConfigRetentionPolicy.d.mts} +2 -2
  255. package/dist/esm/api/types/{StreamConfigXCortiRetentionPolicy.mjs → StreamConfigRetentionPolicy.mjs} +1 -1
  256. package/dist/esm/api/types/StreamConfigStatusMessage.d.mts +2 -0
  257. package/dist/esm/api/types/StringNode.d.mts +11 -0
  258. package/dist/esm/api/types/StringNode.mjs +2 -0
  259. package/dist/esm/api/types/Template.d.mts +22 -0
  260. package/dist/esm/api/types/Template.mjs +2 -0
  261. package/dist/esm/api/types/TemplateGeneration.d.mts +6 -0
  262. package/dist/esm/api/types/TemplateGeneration.mjs +2 -0
  263. package/dist/esm/api/types/TemplateInstructions.d.mts +4 -0
  264. package/dist/esm/api/types/TemplateInstructions.mjs +2 -0
  265. package/dist/esm/api/types/TemplateVersion.d.mts +8 -0
  266. package/dist/esm/api/types/TemplateVersion.mjs +2 -0
  267. package/dist/esm/api/types/TemplateVersionSectionRequest.d.mts +6 -0
  268. package/dist/esm/api/types/TemplateVersionSectionRequest.mjs +2 -0
  269. package/dist/esm/api/types/TranscribeConfig.d.mts +2 -0
  270. package/dist/esm/api/types/TranscribeConfigStatusMessage.d.mts +4 -2
  271. package/dist/esm/api/types/index.d.mts +19 -1
  272. package/dist/esm/api/types/index.mjs +19 -1
  273. package/dist/esm/custom/CortiClient.mjs +2 -2
  274. package/dist/esm/custom/auth/CortiAuth.mjs +2 -2
  275. package/dist/esm/custom/stream/CustomStream.mjs +2 -2
  276. package/dist/esm/custom/transcribe/CustomTranscribe.mjs +3 -3
  277. package/dist/esm/serialization/resources/index.d.mts +6 -0
  278. package/dist/esm/serialization/resources/index.mjs +6 -0
  279. package/dist/esm/serialization/resources/newSectionVersions/client/index.d.mts +1 -0
  280. package/dist/esm/serialization/resources/newSectionVersions/client/index.mjs +1 -0
  281. package/dist/esm/serialization/resources/newSectionVersions/client/list.d.mts +8 -0
  282. package/dist/esm/serialization/resources/newSectionVersions/client/list.mjs +4 -0
  283. package/dist/esm/serialization/resources/newSectionVersions/index.d.mts +1 -0
  284. package/dist/esm/serialization/resources/newSectionVersions/index.mjs +1 -0
  285. package/dist/esm/serialization/resources/newSections/client/index.d.mts +2 -0
  286. package/dist/esm/serialization/resources/newSections/client/index.mjs +2 -0
  287. package/dist/esm/serialization/resources/newSections/client/list.d.mts +8 -0
  288. package/dist/esm/serialization/resources/newSections/client/list.mjs +4 -0
  289. package/dist/esm/serialization/resources/newSections/client/requests/CreateSectionRequest.d.mts +16 -0
  290. package/dist/esm/serialization/resources/newSections/client/requests/CreateSectionRequest.mjs +12 -0
  291. package/dist/esm/serialization/resources/newSections/client/requests/UpdateSectionRequest.d.mts +12 -0
  292. package/dist/esm/serialization/resources/newSections/client/requests/UpdateSectionRequest.mjs +8 -0
  293. package/dist/esm/serialization/resources/newSections/client/requests/index.d.mts +2 -0
  294. package/dist/esm/serialization/resources/newSections/client/requests/index.mjs +2 -0
  295. package/dist/esm/serialization/resources/newSections/index.d.mts +1 -0
  296. package/dist/esm/serialization/resources/newSections/index.mjs +1 -0
  297. package/dist/esm/serialization/resources/newTemplates/client/index.d.mts +2 -0
  298. package/dist/esm/serialization/resources/newTemplates/client/index.mjs +2 -0
  299. package/dist/esm/serialization/resources/newTemplates/client/list.d.mts +8 -0
  300. package/dist/esm/serialization/resources/newTemplates/client/list.mjs +4 -0
  301. package/dist/esm/serialization/resources/newTemplates/client/requests/CreateTemplateRequest.d.mts +16 -0
  302. package/dist/esm/serialization/resources/newTemplates/client/requests/CreateTemplateRequest.mjs +12 -0
  303. package/dist/esm/serialization/resources/newTemplates/client/requests/index.d.mts +1 -0
  304. package/dist/esm/serialization/resources/newTemplates/client/requests/index.mjs +1 -0
  305. package/dist/esm/serialization/resources/newTemplates/index.d.mts +2 -0
  306. package/dist/esm/serialization/resources/newTemplates/index.mjs +2 -0
  307. package/dist/esm/serialization/resources/newTemplates/types/CreateTemplateRequestGeneration.d.mts +12 -0
  308. package/dist/esm/serialization/resources/newTemplates/types/CreateTemplateRequestGeneration.mjs +8 -0
  309. package/dist/esm/serialization/resources/newTemplates/types/index.d.mts +1 -0
  310. package/dist/esm/serialization/resources/newTemplates/types/index.mjs +1 -0
  311. package/dist/esm/serialization/types/BoolNode.d.mts +11 -0
  312. package/dist/esm/serialization/types/BoolNode.mjs +7 -0
  313. package/dist/esm/serialization/types/DictNode.d.mts +13 -0
  314. package/dist/esm/serialization/types/DictNode.mjs +10 -0
  315. package/dist/esm/serialization/types/FieldDefinition.d.mts +11 -0
  316. package/dist/esm/serialization/types/FieldDefinition.mjs +8 -0
  317. package/dist/esm/serialization/types/FloatNode.d.mts +14 -0
  318. package/dist/esm/serialization/types/FloatNode.mjs +10 -0
  319. package/dist/esm/serialization/types/IntegerNode.d.mts +14 -0
  320. package/dist/esm/serialization/types/IntegerNode.mjs +10 -0
  321. package/dist/esm/serialization/types/ListNode.d.mts +14 -0
  322. package/dist/esm/serialization/types/ListNode.mjs +11 -0
  323. package/dist/esm/serialization/types/OutputSchema.d.mts +11 -0
  324. package/dist/esm/serialization/types/OutputSchema.mjs +15 -0
  325. package/dist/esm/serialization/types/Section.d.mts +19 -0
  326. package/dist/esm/serialization/types/Section.mjs +15 -0
  327. package/dist/esm/serialization/types/SectionGeneration.d.mts +12 -0
  328. package/dist/esm/serialization/types/SectionGeneration.mjs +9 -0
  329. package/dist/esm/serialization/types/SectionInstructions.d.mts +10 -0
  330. package/dist/esm/serialization/types/SectionInstructions.mjs +6 -0
  331. package/dist/esm/serialization/types/SectionVersion.d.mts +12 -0
  332. package/dist/esm/serialization/types/SectionVersion.mjs +8 -0
  333. package/dist/esm/serialization/types/StatusResponse.d.mts +9 -0
  334. package/dist/esm/serialization/types/StatusResponse.mjs +5 -0
  335. package/dist/esm/serialization/types/StreamConfig.d.mts +3 -2
  336. package/dist/esm/serialization/types/StreamConfig.mjs +3 -2
  337. package/dist/esm/serialization/types/StreamConfigRetentionPolicy.d.mts +7 -0
  338. package/dist/esm/serialization/types/{StreamConfigXCortiRetentionPolicy.mjs → StreamConfigRetentionPolicy.mjs} +1 -1
  339. package/dist/esm/serialization/types/StreamConfigStatusMessage.d.mts +2 -0
  340. package/dist/esm/serialization/types/StreamConfigStatusMessage.mjs +2 -0
  341. package/dist/esm/serialization/types/StringNode.d.mts +13 -0
  342. package/dist/esm/serialization/types/StringNode.mjs +9 -0
  343. package/dist/esm/serialization/types/Template.d.mts +19 -0
  344. package/dist/esm/serialization/types/Template.mjs +15 -0
  345. package/dist/esm/serialization/types/TemplateGeneration.d.mts +12 -0
  346. package/dist/esm/serialization/types/TemplateGeneration.mjs +8 -0
  347. package/dist/esm/serialization/types/TemplateInstructions.d.mts +9 -0
  348. package/dist/esm/serialization/types/TemplateInstructions.mjs +5 -0
  349. package/dist/esm/serialization/types/TemplateVersion.d.mts +12 -0
  350. package/dist/esm/serialization/types/TemplateVersion.mjs +8 -0
  351. package/dist/esm/serialization/types/TemplateVersionSectionRequest.d.mts +10 -0
  352. package/dist/esm/serialization/types/TemplateVersionSectionRequest.mjs +6 -0
  353. package/dist/esm/serialization/types/TranscribeConfig.d.mts +1 -0
  354. package/dist/esm/serialization/types/TranscribeConfig.mjs +1 -0
  355. package/dist/esm/serialization/types/TranscribeConfigStatusMessage.d.mts +3 -1
  356. package/dist/esm/serialization/types/TranscribeConfigStatusMessage.mjs +3 -1
  357. package/dist/esm/serialization/types/index.d.mts +19 -1
  358. package/dist/esm/serialization/types/index.mjs +19 -1
  359. package/dist/esm/version.d.mts +1 -1
  360. package/dist/esm/version.mjs +1 -1
  361. package/package.json +4 -2
  362. package/dist/cjs/serialization/types/StreamConfigXCortiRetentionPolicy.d.ts +0 -7
  363. package/dist/esm/serialization/types/StreamConfigXCortiRetentionPolicy.d.mts +0 -7
@@ -4,6 +4,10 @@ import { CodesClient } from "./api/resources/codes/client/Client.mjs";
4
4
  import { DocumentsClient } from "./api/resources/documents/client/Client.mjs";
5
5
  import { FactsClient } from "./api/resources/facts/client/Client.mjs";
6
6
  import { InteractionsClient } from "./api/resources/interactions/client/Client.mjs";
7
+ import { NewSectionsClient } from "./api/resources/newSections/client/Client.mjs";
8
+ import { NewSectionVersionsClient } from "./api/resources/newSectionVersions/client/Client.mjs";
9
+ import { NewTemplatesClient } from "./api/resources/newTemplates/client/Client.mjs";
10
+ import { NewTemplateVersionsClient } from "./api/resources/newTemplateVersions/client/Client.mjs";
7
11
  import { RecordingsClient } from "./api/resources/recordings/client/Client.mjs";
8
12
  import { StreamClient } from "./api/resources/stream/client/Client.mjs";
9
13
  import { TemplatesClient } from "./api/resources/templates/client/Client.mjs";
@@ -26,6 +30,10 @@ export declare class CortiClient {
26
30
  protected _documents: DocumentsClient | undefined;
27
31
  protected _templates: TemplatesClient | undefined;
28
32
  protected _codes: CodesClient | undefined;
33
+ protected _newTemplates: NewTemplatesClient | undefined;
34
+ protected _newSections: NewSectionsClient | undefined;
35
+ protected _newSectionVersions: NewSectionVersionsClient | undefined;
36
+ protected _newTemplateVersions: NewTemplateVersionsClient | undefined;
29
37
  protected _agents: AgentsClient | undefined;
30
38
  protected _stream: StreamClient | undefined;
31
39
  protected _transcribe: TranscribeClient | undefined;
@@ -38,6 +46,10 @@ export declare class CortiClient {
38
46
  get documents(): DocumentsClient;
39
47
  get templates(): TemplatesClient;
40
48
  get codes(): CodesClient;
49
+ get newTemplates(): NewTemplatesClient;
50
+ get newSections(): NewSectionsClient;
51
+ get newSectionVersions(): NewSectionVersionsClient;
52
+ get newTemplateVersions(): NewTemplateVersionsClient;
41
53
  get agents(): AgentsClient;
42
54
  get stream(): StreamClient;
43
55
  get transcribe(): TranscribeClient;
@@ -5,6 +5,10 @@ import { CodesClient } from "./api/resources/codes/client/Client.mjs";
5
5
  import { DocumentsClient } from "./api/resources/documents/client/Client.mjs";
6
6
  import { FactsClient } from "./api/resources/facts/client/Client.mjs";
7
7
  import { InteractionsClient } from "./api/resources/interactions/client/Client.mjs";
8
+ import { NewSectionsClient } from "./api/resources/newSections/client/Client.mjs";
9
+ import { NewSectionVersionsClient } from "./api/resources/newSectionVersions/client/Client.mjs";
10
+ import { NewTemplatesClient } from "./api/resources/newTemplates/client/Client.mjs";
11
+ import { NewTemplateVersionsClient } from "./api/resources/newTemplateVersions/client/Client.mjs";
8
12
  import { RecordingsClient } from "./api/resources/recordings/client/Client.mjs";
9
13
  import { StreamClient } from "./api/resources/stream/client/Client.mjs";
10
14
  import { TemplatesClient } from "./api/resources/templates/client/Client.mjs";
@@ -47,6 +51,22 @@ export class CortiClient {
47
51
  var _a;
48
52
  return ((_a = this._codes) !== null && _a !== void 0 ? _a : (this._codes = new CodesClient(this._options)));
49
53
  }
54
+ get newTemplates() {
55
+ var _a;
56
+ return ((_a = this._newTemplates) !== null && _a !== void 0 ? _a : (this._newTemplates = new NewTemplatesClient(this._options)));
57
+ }
58
+ get newSections() {
59
+ var _a;
60
+ return ((_a = this._newSections) !== null && _a !== void 0 ? _a : (this._newSections = new NewSectionsClient(this._options)));
61
+ }
62
+ get newSectionVersions() {
63
+ var _a;
64
+ return ((_a = this._newSectionVersions) !== null && _a !== void 0 ? _a : (this._newSectionVersions = new NewSectionVersionsClient(this._options)));
65
+ }
66
+ get newTemplateVersions() {
67
+ var _a;
68
+ return ((_a = this._newTemplateVersions) !== null && _a !== void 0 ? _a : (this._newTemplateVersions = new NewTemplateVersionsClient(this._options)));
69
+ }
50
70
  get agents() {
51
71
  var _a;
52
72
  return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new AgentsClient(this._options)));
@@ -12,6 +12,13 @@ export * as facts from "./facts/index.mjs";
12
12
  export * from "./interactions/client/requests/index.mjs";
13
13
  export * as interactions from "./interactions/index.mjs";
14
14
  export * from "./interactions/types/index.mjs";
15
+ export * from "./newSections/client/requests/index.mjs";
16
+ export * as newSections from "./newSections/index.mjs";
17
+ export * as newSectionVersions from "./newSectionVersions/index.mjs";
18
+ export * from "./newTemplates/client/requests/index.mjs";
19
+ export * as newTemplates from "./newTemplates/index.mjs";
20
+ export * from "./newTemplates/types/index.mjs";
21
+ export * as newTemplateVersions from "./newTemplateVersions/index.mjs";
15
22
  export * as recordings from "./recordings/index.mjs";
16
23
  export * as stream from "./stream/index.mjs";
17
24
  export * from "./templates/client/requests/index.mjs";
@@ -12,6 +12,13 @@ export * as facts from "./facts/index.mjs";
12
12
  export * from "./interactions/client/requests/index.mjs";
13
13
  export * as interactions from "./interactions/index.mjs";
14
14
  export * from "./interactions/types/index.mjs";
15
+ export * from "./newSections/client/requests/index.mjs";
16
+ export * as newSections from "./newSections/index.mjs";
17
+ export * as newSectionVersions from "./newSectionVersions/index.mjs";
18
+ export * from "./newTemplates/client/requests/index.mjs";
19
+ export * as newTemplates from "./newTemplates/index.mjs";
20
+ export * from "./newTemplates/types/index.mjs";
21
+ export * as newTemplateVersions from "./newTemplateVersions/index.mjs";
15
22
  export * as recordings from "./recordings/index.mjs";
16
23
  export * as stream from "./stream/index.mjs";
17
24
  export * from "./templates/client/requests/index.mjs";
@@ -0,0 +1,84 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
+ import * as core from "../../../../core/index.mjs";
4
+ import * as Corti from "../../../index.mjs";
5
+ export declare namespace NewSectionVersionsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class NewSectionVersionsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<NewSectionVersionsClient.Options>;
12
+ constructor(options: NewSectionVersionsClient.Options);
13
+ /**
14
+ * @param {string} sectionID
15
+ * @param {NewSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
16
+ *
17
+ * @throws {@link Corti.NotFoundError}
18
+ *
19
+ * @example
20
+ * await client.newSectionVersions.list("sectionID")
21
+ */
22
+ list(sectionID: string, requestOptions?: NewSectionVersionsClient.RequestOptions): core.HttpResponsePromise<Corti.SectionVersion[]>;
23
+ private __list;
24
+ /**
25
+ * @param {string} sectionID
26
+ * @param {Corti.SectionGeneration} request
27
+ * @param {NewSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @throws {@link Corti.BadRequestError}
30
+ * @throws {@link Corti.NotFoundError}
31
+ *
32
+ * @example
33
+ * await client.newSectionVersions.create("sectionID", {
34
+ * title: "title",
35
+ * instructions: {
36
+ * contentPrompt: "contentPrompt",
37
+ * writingStylePrompt: "writingStylePrompt"
38
+ * },
39
+ * outputSchema: {
40
+ * type: "string"
41
+ * }
42
+ * })
43
+ */
44
+ create(sectionID: string, request: Corti.SectionGeneration, requestOptions?: NewSectionVersionsClient.RequestOptions): core.HttpResponsePromise<Corti.SectionVersion>;
45
+ private __create;
46
+ /**
47
+ * @param {string} sectionID
48
+ * @param {string} versionID
49
+ * @param {NewSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
50
+ *
51
+ * @throws {@link Corti.NotFoundError}
52
+ *
53
+ * @example
54
+ * await client.newSectionVersions.get("sectionID", "versionID")
55
+ */
56
+ get(sectionID: string, versionID: string, requestOptions?: NewSectionVersionsClient.RequestOptions): core.HttpResponsePromise<Corti.SectionVersion>;
57
+ private __get;
58
+ /**
59
+ * @param {string} sectionID
60
+ * @param {string} versionID
61
+ * @param {NewSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
62
+ *
63
+ * @throws {@link Corti.NotFoundError}
64
+ *
65
+ * @example
66
+ * await client.newSectionVersions.delete("sectionID", "versionID")
67
+ */
68
+ delete(sectionID: string, versionID: string, requestOptions?: NewSectionVersionsClient.RequestOptions): core.HttpResponsePromise<void>;
69
+ private __delete;
70
+ /**
71
+ * Sets this version as the published version of the section.
72
+ *
73
+ * @param {string} sectionID
74
+ * @param {string} versionID
75
+ * @param {NewSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
76
+ *
77
+ * @throws {@link Corti.NotFoundError}
78
+ *
79
+ * @example
80
+ * await client.newSectionVersions.publish("sectionID", "versionID")
81
+ */
82
+ publish(sectionID: string, versionID: string, requestOptions?: NewSectionVersionsClient.RequestOptions): core.HttpResponsePromise<Corti.StatusResponse>;
83
+ private __publish;
84
+ }
@@ -0,0 +1,312 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
13
+ import * as core from "../../../../core/index.mjs";
14
+ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
15
+ import * as errors from "../../../../errors/index.mjs";
16
+ import * as serializers from "../../../../serialization/index.mjs";
17
+ import * as Corti from "../../../index.mjs";
18
+ export class NewSectionVersionsClient {
19
+ constructor(options) {
20
+ this._options = normalizeClientOptionsWithAuth(options);
21
+ }
22
+ /**
23
+ * @param {string} sectionID
24
+ * @param {NewSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
25
+ *
26
+ * @throws {@link Corti.NotFoundError}
27
+ *
28
+ * @example
29
+ * await client.newSectionVersions.list("sectionID")
30
+ */
31
+ list(sectionID, requestOptions) {
32
+ return core.HttpResponsePromise.fromPromise(this.__list(sectionID, requestOptions));
33
+ }
34
+ __list(sectionID, requestOptions) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
37
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
38
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
39
+ const _response = yield core.fetcher({
40
+ 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/sections/${core.url.encodePathParam(sectionID)}/versions`),
41
+ method: "GET",
42
+ headers: _headers,
43
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
44
+ 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,
45
+ 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,
46
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
47
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
48
+ logging: this._options.logging,
49
+ });
50
+ if (_response.ok) {
51
+ return {
52
+ data: serializers.newSectionVersions.list.Response.parseOrThrow(_response.body, {
53
+ unrecognizedObjectKeys: "passthrough",
54
+ allowUnrecognizedUnionMembers: true,
55
+ allowUnrecognizedEnumValues: true,
56
+ skipValidation: true,
57
+ breadcrumbsPrefix: ["response"],
58
+ }),
59
+ rawResponse: _response.rawResponse,
60
+ };
61
+ }
62
+ if (_response.error.reason === "status-code") {
63
+ switch (_response.error.statusCode) {
64
+ case 404:
65
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
66
+ default:
67
+ throw new errors.CortiError({
68
+ statusCode: _response.error.statusCode,
69
+ body: _response.error.body,
70
+ rawResponse: _response.rawResponse,
71
+ });
72
+ }
73
+ }
74
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/alpha/sections/{sectionID}/versions");
75
+ });
76
+ }
77
+ /**
78
+ * @param {string} sectionID
79
+ * @param {Corti.SectionGeneration} request
80
+ * @param {NewSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
81
+ *
82
+ * @throws {@link Corti.BadRequestError}
83
+ * @throws {@link Corti.NotFoundError}
84
+ *
85
+ * @example
86
+ * await client.newSectionVersions.create("sectionID", {
87
+ * title: "title",
88
+ * instructions: {
89
+ * contentPrompt: "contentPrompt",
90
+ * writingStylePrompt: "writingStylePrompt"
91
+ * },
92
+ * outputSchema: {
93
+ * type: "string"
94
+ * }
95
+ * })
96
+ */
97
+ create(sectionID, request, requestOptions) {
98
+ return core.HttpResponsePromise.fromPromise(this.__create(sectionID, request, requestOptions));
99
+ }
100
+ __create(sectionID, request, requestOptions) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
103
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
104
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
105
+ const _response = yield core.fetcher({
106
+ 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/sections/${core.url.encodePathParam(sectionID)}/versions`),
107
+ method: "POST",
108
+ headers: _headers,
109
+ contentType: "application/json",
110
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
111
+ requestType: "json",
112
+ body: serializers.SectionGeneration.jsonOrThrow(request, {
113
+ unrecognizedObjectKeys: "strip",
114
+ omitUndefined: true,
115
+ }),
116
+ 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,
117
+ 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,
118
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
119
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
120
+ logging: this._options.logging,
121
+ });
122
+ if (_response.ok) {
123
+ return {
124
+ data: serializers.SectionVersion.parseOrThrow(_response.body, {
125
+ unrecognizedObjectKeys: "passthrough",
126
+ allowUnrecognizedUnionMembers: true,
127
+ allowUnrecognizedEnumValues: true,
128
+ skipValidation: true,
129
+ breadcrumbsPrefix: ["response"],
130
+ }),
131
+ rawResponse: _response.rawResponse,
132
+ };
133
+ }
134
+ if (_response.error.reason === "status-code") {
135
+ switch (_response.error.statusCode) {
136
+ case 400:
137
+ throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
138
+ case 404:
139
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
140
+ default:
141
+ throw new errors.CortiError({
142
+ statusCode: _response.error.statusCode,
143
+ body: _response.error.body,
144
+ rawResponse: _response.rawResponse,
145
+ });
146
+ }
147
+ }
148
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/alpha/sections/{sectionID}/versions");
149
+ });
150
+ }
151
+ /**
152
+ * @param {string} sectionID
153
+ * @param {string} versionID
154
+ * @param {NewSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
155
+ *
156
+ * @throws {@link Corti.NotFoundError}
157
+ *
158
+ * @example
159
+ * await client.newSectionVersions.get("sectionID", "versionID")
160
+ */
161
+ get(sectionID, versionID, requestOptions) {
162
+ return core.HttpResponsePromise.fromPromise(this.__get(sectionID, versionID, requestOptions));
163
+ }
164
+ __get(sectionID, versionID, requestOptions) {
165
+ return __awaiter(this, void 0, void 0, function* () {
166
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
167
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
168
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
169
+ const _response = yield core.fetcher({
170
+ 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/sections/${core.url.encodePathParam(sectionID)}/versions/${core.url.encodePathParam(versionID)}`),
171
+ method: "GET",
172
+ headers: _headers,
173
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
174
+ 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,
175
+ 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,
176
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
177
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
178
+ logging: this._options.logging,
179
+ });
180
+ if (_response.ok) {
181
+ return {
182
+ data: serializers.SectionVersion.parseOrThrow(_response.body, {
183
+ unrecognizedObjectKeys: "passthrough",
184
+ allowUnrecognizedUnionMembers: true,
185
+ allowUnrecognizedEnumValues: true,
186
+ skipValidation: true,
187
+ breadcrumbsPrefix: ["response"],
188
+ }),
189
+ rawResponse: _response.rawResponse,
190
+ };
191
+ }
192
+ if (_response.error.reason === "status-code") {
193
+ switch (_response.error.statusCode) {
194
+ case 404:
195
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
196
+ default:
197
+ throw new errors.CortiError({
198
+ statusCode: _response.error.statusCode,
199
+ body: _response.error.body,
200
+ rawResponse: _response.rawResponse,
201
+ });
202
+ }
203
+ }
204
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/alpha/sections/{sectionID}/versions/{versionID}");
205
+ });
206
+ }
207
+ /**
208
+ * @param {string} sectionID
209
+ * @param {string} versionID
210
+ * @param {NewSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
211
+ *
212
+ * @throws {@link Corti.NotFoundError}
213
+ *
214
+ * @example
215
+ * await client.newSectionVersions.delete("sectionID", "versionID")
216
+ */
217
+ delete(sectionID, versionID, requestOptions) {
218
+ return core.HttpResponsePromise.fromPromise(this.__delete(sectionID, versionID, requestOptions));
219
+ }
220
+ __delete(sectionID, versionID, requestOptions) {
221
+ return __awaiter(this, void 0, void 0, function* () {
222
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
223
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
224
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
225
+ const _response = yield core.fetcher({
226
+ 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/sections/${core.url.encodePathParam(sectionID)}/versions/${core.url.encodePathParam(versionID)}`),
227
+ method: "DELETE",
228
+ headers: _headers,
229
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
230
+ 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,
231
+ 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,
232
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
233
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
234
+ logging: this._options.logging,
235
+ });
236
+ if (_response.ok) {
237
+ return { data: undefined, rawResponse: _response.rawResponse };
238
+ }
239
+ if (_response.error.reason === "status-code") {
240
+ switch (_response.error.statusCode) {
241
+ case 404:
242
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
243
+ default:
244
+ throw new errors.CortiError({
245
+ statusCode: _response.error.statusCode,
246
+ body: _response.error.body,
247
+ rawResponse: _response.rawResponse,
248
+ });
249
+ }
250
+ }
251
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/alpha/sections/{sectionID}/versions/{versionID}");
252
+ });
253
+ }
254
+ /**
255
+ * Sets this version as the published version of the section.
256
+ *
257
+ * @param {string} sectionID
258
+ * @param {string} versionID
259
+ * @param {NewSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
260
+ *
261
+ * @throws {@link Corti.NotFoundError}
262
+ *
263
+ * @example
264
+ * await client.newSectionVersions.publish("sectionID", "versionID")
265
+ */
266
+ publish(sectionID, versionID, requestOptions) {
267
+ return core.HttpResponsePromise.fromPromise(this.__publish(sectionID, versionID, requestOptions));
268
+ }
269
+ __publish(sectionID, versionID, requestOptions) {
270
+ return __awaiter(this, void 0, void 0, function* () {
271
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
272
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
273
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
274
+ const _response = yield core.fetcher({
275
+ 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/sections/${core.url.encodePathParam(sectionID)}/versions/${core.url.encodePathParam(versionID)}/publish`),
276
+ method: "POST",
277
+ headers: _headers,
278
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
279
+ 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,
280
+ 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,
281
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
282
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
283
+ logging: this._options.logging,
284
+ });
285
+ if (_response.ok) {
286
+ return {
287
+ data: serializers.StatusResponse.parseOrThrow(_response.body, {
288
+ unrecognizedObjectKeys: "passthrough",
289
+ allowUnrecognizedUnionMembers: true,
290
+ allowUnrecognizedEnumValues: true,
291
+ skipValidation: true,
292
+ breadcrumbsPrefix: ["response"],
293
+ }),
294
+ rawResponse: _response.rawResponse,
295
+ };
296
+ }
297
+ if (_response.error.reason === "status-code") {
298
+ switch (_response.error.statusCode) {
299
+ case 404:
300
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
301
+ default:
302
+ throw new errors.CortiError({
303
+ statusCode: _response.error.statusCode,
304
+ body: _response.error.body,
305
+ rawResponse: _response.rawResponse,
306
+ });
307
+ }
308
+ }
309
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/alpha/sections/{sectionID}/versions/{versionID}/publish");
310
+ });
311
+ }
312
+ }
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1,81 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
+ import * as core from "../../../../core/index.mjs";
4
+ import * as Corti from "../../../index.mjs";
5
+ export declare namespace NewSectionsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class NewSectionsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<NewSectionsClient.Options>;
12
+ constructor(options: NewSectionsClient.Options);
13
+ /**
14
+ * @param {Corti.ListNewSectionsRequest} request
15
+ * @param {NewSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
16
+ *
17
+ * @example
18
+ * await client.newSections.list()
19
+ */
20
+ list(request?: Corti.ListNewSectionsRequest, requestOptions?: NewSectionsClient.RequestOptions): core.HttpResponsePromise<Corti.Section[]>;
21
+ private __list;
22
+ /**
23
+ * @param {Corti.CreateSectionRequest} request
24
+ * @param {NewSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
25
+ *
26
+ * @throws {@link Corti.BadRequestError}
27
+ *
28
+ * @example
29
+ * await client.newSections.create({
30
+ * name: "name",
31
+ * language: "language",
32
+ * generation: {
33
+ * title: "title",
34
+ * instructions: {
35
+ * contentPrompt: "contentPrompt",
36
+ * writingStylePrompt: "writingStylePrompt"
37
+ * },
38
+ * outputSchema: {
39
+ * type: "string"
40
+ * }
41
+ * }
42
+ * })
43
+ */
44
+ create(request: Corti.CreateSectionRequest, requestOptions?: NewSectionsClient.RequestOptions): core.HttpResponsePromise<Corti.Section>;
45
+ private __create;
46
+ /**
47
+ * @param {string} sectionID
48
+ * @param {NewSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
49
+ *
50
+ * @throws {@link Corti.NotFoundError}
51
+ *
52
+ * @example
53
+ * await client.newSections.get("sectionID")
54
+ */
55
+ get(sectionID: string, requestOptions?: NewSectionsClient.RequestOptions): core.HttpResponsePromise<Corti.Section>;
56
+ private __get;
57
+ /**
58
+ * @param {string} sectionID
59
+ * @param {NewSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
60
+ *
61
+ * @throws {@link Corti.NotFoundError}
62
+ *
63
+ * @example
64
+ * await client.newSections.delete("sectionID")
65
+ */
66
+ delete(sectionID: string, requestOptions?: NewSectionsClient.RequestOptions): core.HttpResponsePromise<void>;
67
+ private __delete;
68
+ /**
69
+ * @param {string} sectionID
70
+ * @param {Corti.UpdateSectionRequest} request
71
+ * @param {NewSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
72
+ *
73
+ * @throws {@link Corti.BadRequestError}
74
+ * @throws {@link Corti.NotFoundError}
75
+ *
76
+ * @example
77
+ * await client.newSections.update("sectionID")
78
+ */
79
+ update(sectionID: string, request?: Corti.UpdateSectionRequest, requestOptions?: NewSectionsClient.RequestOptions): core.HttpResponsePromise<Corti.Section>;
80
+ private __update;
81
+ }