@corti/sdk 2.0.0-rc → 2.0.0-templates.1

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 (329) 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 +40 -20
  5. package/dist/cjs/api/resources/alphaSectionVersions/client/Client.d.ts +84 -0
  6. package/dist/cjs/api/resources/alphaSectionVersions/client/Client.js +349 -0
  7. package/dist/cjs/api/resources/alphaSectionVersions/client/index.d.ts +1 -0
  8. package/dist/cjs/api/resources/alphaSectionVersions/client/index.js +2 -0
  9. package/dist/cjs/api/resources/alphaSectionVersions/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/alphaSectionVersions/index.js +17 -0
  11. package/dist/cjs/api/resources/alphaSections/client/Client.d.ts +81 -0
  12. package/dist/cjs/api/resources/alphaSections/client/Client.js +353 -0
  13. package/dist/cjs/api/resources/alphaSections/client/index.d.ts +1 -0
  14. package/dist/cjs/api/resources/alphaSections/client/index.js +17 -0
  15. package/dist/cjs/api/resources/alphaSections/client/requests/CreateSectionRequest.d.ts +33 -0
  16. package/dist/cjs/api/resources/alphaSections/client/requests/CreateSectionRequest.js +3 -0
  17. package/dist/cjs/api/resources/alphaSections/client/requests/ListAlphaSectionsRequest.d.ts +12 -0
  18. package/dist/cjs/api/resources/alphaSections/client/requests/ListAlphaSectionsRequest.js +3 -0
  19. package/dist/cjs/api/resources/alphaSections/client/requests/UpdateSectionRequest.d.ts +10 -0
  20. package/dist/cjs/api/resources/alphaSections/client/requests/UpdateSectionRequest.js +3 -0
  21. package/dist/cjs/api/resources/alphaSections/client/requests/index.d.ts +3 -0
  22. package/dist/cjs/api/resources/alphaSections/client/requests/index.js +2 -0
  23. package/dist/cjs/api/resources/alphaSections/index.d.ts +1 -0
  24. package/dist/cjs/api/resources/alphaSections/index.js +17 -0
  25. package/dist/cjs/api/resources/alphaTemplateVersions/client/Client.d.ts +60 -0
  26. package/dist/cjs/api/resources/alphaTemplateVersions/client/Client.js +255 -0
  27. package/dist/cjs/api/resources/alphaTemplateVersions/client/index.d.ts +1 -0
  28. package/dist/cjs/api/resources/alphaTemplateVersions/client/index.js +2 -0
  29. package/dist/cjs/api/resources/alphaTemplateVersions/index.d.ts +1 -0
  30. package/dist/cjs/api/resources/alphaTemplateVersions/index.js +17 -0
  31. package/dist/cjs/api/resources/alphaTemplates/client/Client.d.ts +68 -0
  32. package/dist/cjs/api/resources/alphaTemplates/client/Client.js +299 -0
  33. package/dist/cjs/api/resources/alphaTemplates/client/index.d.ts +1 -0
  34. package/dist/cjs/api/resources/alphaTemplates/client/index.js +17 -0
  35. package/dist/cjs/api/resources/alphaTemplates/client/requests/CreateTemplateRequest.d.ts +28 -0
  36. package/dist/cjs/api/resources/alphaTemplates/client/requests/CreateTemplateRequest.js +3 -0
  37. package/dist/cjs/api/resources/alphaTemplates/client/requests/ListAlphaTemplatesRequest.d.ts +12 -0
  38. package/dist/cjs/api/resources/alphaTemplates/client/requests/ListAlphaTemplatesRequest.js +3 -0
  39. package/dist/cjs/api/resources/alphaTemplates/client/requests/index.d.ts +2 -0
  40. package/dist/cjs/api/resources/alphaTemplates/client/requests/index.js +2 -0
  41. package/dist/cjs/api/resources/alphaTemplates/index.d.ts +2 -0
  42. package/dist/cjs/api/resources/alphaTemplates/index.js +18 -0
  43. package/dist/cjs/api/resources/alphaTemplates/types/CreateTemplateRequestGeneration.d.ts +5 -0
  44. package/dist/cjs/api/resources/alphaTemplates/types/CreateTemplateRequestGeneration.js +3 -0
  45. package/dist/cjs/api/resources/alphaTemplates/types/index.d.ts +1 -0
  46. package/dist/cjs/api/resources/alphaTemplates/types/index.js +17 -0
  47. package/dist/cjs/api/resources/index.d.ts +7 -0
  48. package/dist/cjs/api/resources/index.js +8 -1
  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/StringNode.d.ts +11 -0
  74. package/dist/cjs/api/types/StringNode.js +3 -0
  75. package/dist/cjs/api/types/Template.d.ts +22 -0
  76. package/dist/cjs/api/types/Template.js +3 -0
  77. package/dist/cjs/api/types/TemplateGeneration.d.ts +6 -0
  78. package/dist/cjs/api/types/TemplateGeneration.js +3 -0
  79. package/dist/cjs/api/types/TemplateInstructions.d.ts +4 -0
  80. package/dist/cjs/api/types/TemplateInstructions.js +3 -0
  81. package/dist/cjs/api/types/TemplateVersion.d.ts +8 -0
  82. package/dist/cjs/api/types/TemplateVersion.js +3 -0
  83. package/dist/cjs/api/types/TemplateVersionSectionRequest.d.ts +6 -0
  84. package/dist/cjs/api/types/TemplateVersionSectionRequest.js +3 -0
  85. package/dist/cjs/api/types/index.d.ts +18 -0
  86. package/dist/cjs/api/types/index.js +18 -0
  87. package/dist/cjs/custom/CortiClient.js +2 -2
  88. package/dist/cjs/custom/auth/CortiAuth.js +2 -2
  89. package/dist/cjs/custom/stream/CustomStream.js +2 -2
  90. package/dist/cjs/custom/transcribe/CustomTranscribe.js +3 -3
  91. package/dist/cjs/serialization/resources/alphaSectionVersions/client/index.d.ts +1 -0
  92. package/dist/cjs/serialization/resources/alphaSectionVersions/client/index.js +37 -0
  93. package/dist/cjs/serialization/resources/alphaSectionVersions/client/list.d.ts +8 -0
  94. package/dist/cjs/serialization/resources/alphaSectionVersions/client/list.js +40 -0
  95. package/dist/cjs/serialization/resources/alphaSectionVersions/index.d.ts +1 -0
  96. package/dist/cjs/serialization/resources/alphaSectionVersions/index.js +17 -0
  97. package/dist/cjs/serialization/resources/alphaSections/client/index.d.ts +2 -0
  98. package/dist/cjs/serialization/resources/alphaSections/client/index.js +41 -0
  99. package/dist/cjs/serialization/resources/alphaSections/client/list.d.ts +8 -0
  100. package/dist/cjs/serialization/resources/alphaSections/client/list.js +40 -0
  101. package/dist/cjs/serialization/resources/alphaSections/client/requests/CreateSectionRequest.d.ts +16 -0
  102. package/dist/cjs/serialization/resources/alphaSections/client/requests/CreateSectionRequest.js +48 -0
  103. package/dist/cjs/serialization/resources/alphaSections/client/requests/UpdateSectionRequest.d.ts +12 -0
  104. package/dist/cjs/serialization/resources/alphaSections/client/requests/UpdateSectionRequest.js +44 -0
  105. package/dist/cjs/serialization/resources/alphaSections/client/requests/index.d.ts +2 -0
  106. package/dist/cjs/serialization/resources/alphaSections/client/requests/index.js +7 -0
  107. package/dist/cjs/serialization/resources/alphaSections/index.d.ts +1 -0
  108. package/dist/cjs/serialization/resources/alphaSections/index.js +17 -0
  109. package/dist/cjs/serialization/resources/alphaTemplates/client/index.d.ts +2 -0
  110. package/dist/cjs/serialization/resources/alphaTemplates/client/index.js +41 -0
  111. package/dist/cjs/serialization/resources/alphaTemplates/client/list.d.ts +8 -0
  112. package/dist/cjs/serialization/resources/alphaTemplates/client/list.js +40 -0
  113. package/dist/cjs/serialization/resources/alphaTemplates/client/requests/CreateTemplateRequest.d.ts +16 -0
  114. package/dist/cjs/serialization/resources/alphaTemplates/client/requests/CreateTemplateRequest.js +48 -0
  115. package/dist/cjs/serialization/resources/alphaTemplates/client/requests/index.d.ts +1 -0
  116. package/dist/cjs/serialization/resources/alphaTemplates/client/requests/index.js +5 -0
  117. package/dist/cjs/serialization/resources/alphaTemplates/index.d.ts +2 -0
  118. package/dist/cjs/serialization/resources/alphaTemplates/index.js +18 -0
  119. package/dist/cjs/serialization/resources/alphaTemplates/types/CreateTemplateRequestGeneration.d.ts +12 -0
  120. package/dist/cjs/serialization/resources/alphaTemplates/types/CreateTemplateRequestGeneration.js +44 -0
  121. package/dist/cjs/serialization/resources/alphaTemplates/types/index.d.ts +1 -0
  122. package/dist/cjs/serialization/resources/alphaTemplates/types/index.js +17 -0
  123. package/dist/cjs/serialization/resources/index.d.ts +6 -0
  124. package/dist/cjs/serialization/resources/index.js +7 -1
  125. package/dist/cjs/serialization/types/BoolNode.d.ts +11 -0
  126. package/dist/cjs/serialization/types/BoolNode.js +43 -0
  127. package/dist/cjs/serialization/types/DictNode.d.ts +13 -0
  128. package/dist/cjs/serialization/types/DictNode.js +46 -0
  129. package/dist/cjs/serialization/types/FieldDefinition.d.ts +11 -0
  130. package/dist/cjs/serialization/types/FieldDefinition.js +44 -0
  131. package/dist/cjs/serialization/types/FloatNode.d.ts +14 -0
  132. package/dist/cjs/serialization/types/FloatNode.js +46 -0
  133. package/dist/cjs/serialization/types/IntegerNode.d.ts +14 -0
  134. package/dist/cjs/serialization/types/IntegerNode.js +46 -0
  135. package/dist/cjs/serialization/types/ListNode.d.ts +14 -0
  136. package/dist/cjs/serialization/types/ListNode.js +47 -0
  137. package/dist/cjs/serialization/types/OutputSchema.d.ts +11 -0
  138. package/dist/cjs/serialization/types/OutputSchema.js +51 -0
  139. package/dist/cjs/serialization/types/Section.d.ts +19 -0
  140. package/dist/cjs/serialization/types/Section.js +51 -0
  141. package/dist/cjs/serialization/types/SectionGeneration.d.ts +12 -0
  142. package/dist/cjs/serialization/types/SectionGeneration.js +45 -0
  143. package/dist/cjs/serialization/types/SectionInstructions.d.ts +10 -0
  144. package/dist/cjs/serialization/types/SectionInstructions.js +42 -0
  145. package/dist/cjs/serialization/types/SectionVersion.d.ts +12 -0
  146. package/dist/cjs/serialization/types/SectionVersion.js +44 -0
  147. package/dist/cjs/serialization/types/StatusResponse.d.ts +9 -0
  148. package/dist/cjs/serialization/types/StatusResponse.js +41 -0
  149. package/dist/cjs/serialization/types/StringNode.d.ts +13 -0
  150. package/dist/cjs/serialization/types/StringNode.js +45 -0
  151. package/dist/cjs/serialization/types/Template.d.ts +19 -0
  152. package/dist/cjs/serialization/types/Template.js +51 -0
  153. package/dist/cjs/serialization/types/TemplateGeneration.d.ts +12 -0
  154. package/dist/cjs/serialization/types/TemplateGeneration.js +44 -0
  155. package/dist/cjs/serialization/types/TemplateInstructions.d.ts +9 -0
  156. package/dist/cjs/serialization/types/TemplateInstructions.js +41 -0
  157. package/dist/cjs/serialization/types/TemplateVersion.d.ts +12 -0
  158. package/dist/cjs/serialization/types/TemplateVersion.js +44 -0
  159. package/dist/cjs/serialization/types/TemplateVersionSectionRequest.d.ts +10 -0
  160. package/dist/cjs/serialization/types/TemplateVersionSectionRequest.js +42 -0
  161. package/dist/cjs/serialization/types/index.d.ts +18 -0
  162. package/dist/cjs/serialization/types/index.js +18 -0
  163. package/dist/cjs/version.d.ts +1 -1
  164. package/dist/cjs/version.js +1 -1
  165. package/dist/esm/BaseClient.d.mts +2 -2
  166. package/dist/esm/BaseClient.mjs +2 -2
  167. package/dist/esm/Client.d.mts +12 -0
  168. package/dist/esm/Client.mjs +20 -0
  169. package/dist/esm/api/resources/alphaSectionVersions/client/Client.d.mts +84 -0
  170. package/dist/esm/api/resources/alphaSectionVersions/client/Client.mjs +312 -0
  171. package/dist/esm/api/resources/alphaSectionVersions/client/index.d.mts +1 -0
  172. package/dist/esm/api/resources/alphaSectionVersions/client/index.mjs +1 -0
  173. package/dist/esm/api/resources/alphaSectionVersions/index.d.mts +1 -0
  174. package/dist/esm/api/resources/alphaSectionVersions/index.mjs +1 -0
  175. package/dist/esm/api/resources/alphaSections/client/Client.d.mts +81 -0
  176. package/dist/esm/api/resources/alphaSections/client/Client.mjs +316 -0
  177. package/dist/esm/api/resources/alphaSections/client/index.d.mts +1 -0
  178. package/dist/esm/api/resources/alphaSections/client/index.mjs +1 -0
  179. package/dist/esm/api/resources/alphaSections/client/requests/CreateSectionRequest.d.mts +33 -0
  180. package/dist/esm/api/resources/alphaSections/client/requests/CreateSectionRequest.mjs +2 -0
  181. package/dist/esm/api/resources/alphaSections/client/requests/ListAlphaSectionsRequest.d.mts +12 -0
  182. package/dist/esm/api/resources/alphaSections/client/requests/ListAlphaSectionsRequest.mjs +2 -0
  183. package/dist/esm/api/resources/alphaSections/client/requests/UpdateSectionRequest.d.mts +10 -0
  184. package/dist/esm/api/resources/alphaSections/client/requests/UpdateSectionRequest.mjs +2 -0
  185. package/dist/esm/api/resources/alphaSections/client/requests/index.d.mts +3 -0
  186. package/dist/esm/api/resources/alphaSections/client/requests/index.mjs +1 -0
  187. package/dist/esm/api/resources/alphaSections/index.d.mts +1 -0
  188. package/dist/esm/api/resources/alphaSections/index.mjs +1 -0
  189. package/dist/esm/api/resources/alphaTemplateVersions/client/Client.d.mts +60 -0
  190. package/dist/esm/api/resources/alphaTemplateVersions/client/Client.mjs +218 -0
  191. package/dist/esm/api/resources/alphaTemplateVersions/client/index.d.mts +1 -0
  192. package/dist/esm/api/resources/alphaTemplateVersions/client/index.mjs +1 -0
  193. package/dist/esm/api/resources/alphaTemplateVersions/index.d.mts +1 -0
  194. package/dist/esm/api/resources/alphaTemplateVersions/index.mjs +1 -0
  195. package/dist/esm/api/resources/alphaTemplates/client/Client.d.mts +68 -0
  196. package/dist/esm/api/resources/alphaTemplates/client/Client.mjs +262 -0
  197. package/dist/esm/api/resources/alphaTemplates/client/index.d.mts +1 -0
  198. package/dist/esm/api/resources/alphaTemplates/client/index.mjs +1 -0
  199. package/dist/esm/api/resources/alphaTemplates/client/requests/CreateTemplateRequest.d.mts +28 -0
  200. package/dist/esm/api/resources/alphaTemplates/client/requests/CreateTemplateRequest.mjs +2 -0
  201. package/dist/esm/api/resources/alphaTemplates/client/requests/ListAlphaTemplatesRequest.d.mts +12 -0
  202. package/dist/esm/api/resources/alphaTemplates/client/requests/ListAlphaTemplatesRequest.mjs +2 -0
  203. package/dist/esm/api/resources/alphaTemplates/client/requests/index.d.mts +2 -0
  204. package/dist/esm/api/resources/alphaTemplates/client/requests/index.mjs +1 -0
  205. package/dist/esm/api/resources/alphaTemplates/index.d.mts +2 -0
  206. package/dist/esm/api/resources/alphaTemplates/index.mjs +2 -0
  207. package/dist/esm/api/resources/alphaTemplates/types/CreateTemplateRequestGeneration.d.mts +5 -0
  208. package/dist/esm/api/resources/alphaTemplates/types/CreateTemplateRequestGeneration.mjs +2 -0
  209. package/dist/esm/api/resources/alphaTemplates/types/index.d.mts +1 -0
  210. package/dist/esm/api/resources/alphaTemplates/types/index.mjs +1 -0
  211. package/dist/esm/api/resources/index.d.mts +7 -0
  212. package/dist/esm/api/resources/index.mjs +7 -0
  213. package/dist/esm/api/types/BoolNode.d.mts +7 -0
  214. package/dist/esm/api/types/BoolNode.mjs +2 -0
  215. package/dist/esm/api/types/DictNode.d.mts +12 -0
  216. package/dist/esm/api/types/DictNode.mjs +2 -0
  217. package/dist/esm/api/types/FieldDefinition.d.mts +8 -0
  218. package/dist/esm/api/types/FieldDefinition.mjs +2 -0
  219. package/dist/esm/api/types/FloatNode.d.mts +13 -0
  220. package/dist/esm/api/types/FloatNode.mjs +2 -0
  221. package/dist/esm/api/types/IntegerNode.d.mts +13 -0
  222. package/dist/esm/api/types/IntegerNode.mjs +2 -0
  223. package/dist/esm/api/types/ListNode.d.mts +13 -0
  224. package/dist/esm/api/types/ListNode.mjs +2 -0
  225. package/dist/esm/api/types/OutputSchema.d.mts +2 -0
  226. package/dist/esm/api/types/OutputSchema.mjs +2 -0
  227. package/dist/esm/api/types/Section.d.mts +23 -0
  228. package/dist/esm/api/types/Section.mjs +2 -0
  229. package/dist/esm/api/types/SectionGeneration.d.mts +8 -0
  230. package/dist/esm/api/types/SectionGeneration.mjs +2 -0
  231. package/dist/esm/api/types/SectionInstructions.d.mts +6 -0
  232. package/dist/esm/api/types/SectionInstructions.mjs +2 -0
  233. package/dist/esm/api/types/SectionVersion.d.mts +8 -0
  234. package/dist/esm/api/types/SectionVersion.mjs +2 -0
  235. package/dist/esm/api/types/StatusResponse.d.mts +3 -0
  236. package/dist/esm/api/types/StatusResponse.mjs +2 -0
  237. package/dist/esm/api/types/StringNode.d.mts +11 -0
  238. package/dist/esm/api/types/StringNode.mjs +2 -0
  239. package/dist/esm/api/types/Template.d.mts +22 -0
  240. package/dist/esm/api/types/Template.mjs +2 -0
  241. package/dist/esm/api/types/TemplateGeneration.d.mts +6 -0
  242. package/dist/esm/api/types/TemplateGeneration.mjs +2 -0
  243. package/dist/esm/api/types/TemplateInstructions.d.mts +4 -0
  244. package/dist/esm/api/types/TemplateInstructions.mjs +2 -0
  245. package/dist/esm/api/types/TemplateVersion.d.mts +8 -0
  246. package/dist/esm/api/types/TemplateVersion.mjs +2 -0
  247. package/dist/esm/api/types/TemplateVersionSectionRequest.d.mts +6 -0
  248. package/dist/esm/api/types/TemplateVersionSectionRequest.mjs +2 -0
  249. package/dist/esm/api/types/index.d.mts +18 -0
  250. package/dist/esm/api/types/index.mjs +18 -0
  251. package/dist/esm/custom/CortiClient.mjs +2 -2
  252. package/dist/esm/custom/auth/CortiAuth.mjs +2 -2
  253. package/dist/esm/custom/stream/CustomStream.mjs +2 -2
  254. package/dist/esm/custom/transcribe/CustomTranscribe.mjs +3 -3
  255. package/dist/esm/serialization/resources/alphaSectionVersions/client/index.d.mts +1 -0
  256. package/dist/esm/serialization/resources/alphaSectionVersions/client/index.mjs +1 -0
  257. package/dist/esm/serialization/resources/alphaSectionVersions/client/list.d.mts +8 -0
  258. package/dist/esm/serialization/resources/alphaSectionVersions/client/list.mjs +4 -0
  259. package/dist/esm/serialization/resources/alphaSectionVersions/index.d.mts +1 -0
  260. package/dist/esm/serialization/resources/alphaSectionVersions/index.mjs +1 -0
  261. package/dist/esm/serialization/resources/alphaSections/client/index.d.mts +2 -0
  262. package/dist/esm/serialization/resources/alphaSections/client/index.mjs +2 -0
  263. package/dist/esm/serialization/resources/alphaSections/client/list.d.mts +8 -0
  264. package/dist/esm/serialization/resources/alphaSections/client/list.mjs +4 -0
  265. package/dist/esm/serialization/resources/alphaSections/client/requests/CreateSectionRequest.d.mts +16 -0
  266. package/dist/esm/serialization/resources/alphaSections/client/requests/CreateSectionRequest.mjs +12 -0
  267. package/dist/esm/serialization/resources/alphaSections/client/requests/UpdateSectionRequest.d.mts +12 -0
  268. package/dist/esm/serialization/resources/alphaSections/client/requests/UpdateSectionRequest.mjs +8 -0
  269. package/dist/esm/serialization/resources/alphaSections/client/requests/index.d.mts +2 -0
  270. package/dist/esm/serialization/resources/alphaSections/client/requests/index.mjs +2 -0
  271. package/dist/esm/serialization/resources/alphaSections/index.d.mts +1 -0
  272. package/dist/esm/serialization/resources/alphaSections/index.mjs +1 -0
  273. package/dist/esm/serialization/resources/alphaTemplates/client/index.d.mts +2 -0
  274. package/dist/esm/serialization/resources/alphaTemplates/client/index.mjs +2 -0
  275. package/dist/esm/serialization/resources/alphaTemplates/client/list.d.mts +8 -0
  276. package/dist/esm/serialization/resources/alphaTemplates/client/list.mjs +4 -0
  277. package/dist/esm/serialization/resources/alphaTemplates/client/requests/CreateTemplateRequest.d.mts +16 -0
  278. package/dist/esm/serialization/resources/alphaTemplates/client/requests/CreateTemplateRequest.mjs +12 -0
  279. package/dist/esm/serialization/resources/alphaTemplates/client/requests/index.d.mts +1 -0
  280. package/dist/esm/serialization/resources/alphaTemplates/client/requests/index.mjs +1 -0
  281. package/dist/esm/serialization/resources/alphaTemplates/index.d.mts +2 -0
  282. package/dist/esm/serialization/resources/alphaTemplates/index.mjs +2 -0
  283. package/dist/esm/serialization/resources/alphaTemplates/types/CreateTemplateRequestGeneration.d.mts +12 -0
  284. package/dist/esm/serialization/resources/alphaTemplates/types/CreateTemplateRequestGeneration.mjs +8 -0
  285. package/dist/esm/serialization/resources/alphaTemplates/types/index.d.mts +1 -0
  286. package/dist/esm/serialization/resources/alphaTemplates/types/index.mjs +1 -0
  287. package/dist/esm/serialization/resources/index.d.mts +6 -0
  288. package/dist/esm/serialization/resources/index.mjs +6 -0
  289. package/dist/esm/serialization/types/BoolNode.d.mts +11 -0
  290. package/dist/esm/serialization/types/BoolNode.mjs +7 -0
  291. package/dist/esm/serialization/types/DictNode.d.mts +13 -0
  292. package/dist/esm/serialization/types/DictNode.mjs +10 -0
  293. package/dist/esm/serialization/types/FieldDefinition.d.mts +11 -0
  294. package/dist/esm/serialization/types/FieldDefinition.mjs +8 -0
  295. package/dist/esm/serialization/types/FloatNode.d.mts +14 -0
  296. package/dist/esm/serialization/types/FloatNode.mjs +10 -0
  297. package/dist/esm/serialization/types/IntegerNode.d.mts +14 -0
  298. package/dist/esm/serialization/types/IntegerNode.mjs +10 -0
  299. package/dist/esm/serialization/types/ListNode.d.mts +14 -0
  300. package/dist/esm/serialization/types/ListNode.mjs +11 -0
  301. package/dist/esm/serialization/types/OutputSchema.d.mts +11 -0
  302. package/dist/esm/serialization/types/OutputSchema.mjs +15 -0
  303. package/dist/esm/serialization/types/Section.d.mts +19 -0
  304. package/dist/esm/serialization/types/Section.mjs +15 -0
  305. package/dist/esm/serialization/types/SectionGeneration.d.mts +12 -0
  306. package/dist/esm/serialization/types/SectionGeneration.mjs +9 -0
  307. package/dist/esm/serialization/types/SectionInstructions.d.mts +10 -0
  308. package/dist/esm/serialization/types/SectionInstructions.mjs +6 -0
  309. package/dist/esm/serialization/types/SectionVersion.d.mts +12 -0
  310. package/dist/esm/serialization/types/SectionVersion.mjs +8 -0
  311. package/dist/esm/serialization/types/StatusResponse.d.mts +9 -0
  312. package/dist/esm/serialization/types/StatusResponse.mjs +5 -0
  313. package/dist/esm/serialization/types/StringNode.d.mts +13 -0
  314. package/dist/esm/serialization/types/StringNode.mjs +9 -0
  315. package/dist/esm/serialization/types/Template.d.mts +19 -0
  316. package/dist/esm/serialization/types/Template.mjs +15 -0
  317. package/dist/esm/serialization/types/TemplateGeneration.d.mts +12 -0
  318. package/dist/esm/serialization/types/TemplateGeneration.mjs +8 -0
  319. package/dist/esm/serialization/types/TemplateInstructions.d.mts +9 -0
  320. package/dist/esm/serialization/types/TemplateInstructions.mjs +5 -0
  321. package/dist/esm/serialization/types/TemplateVersion.d.mts +12 -0
  322. package/dist/esm/serialization/types/TemplateVersion.mjs +8 -0
  323. package/dist/esm/serialization/types/TemplateVersionSectionRequest.d.mts +10 -0
  324. package/dist/esm/serialization/types/TemplateVersionSectionRequest.mjs +6 -0
  325. package/dist/esm/serialization/types/index.d.mts +18 -0
  326. package/dist/esm/serialization/types/index.mjs +18 -0
  327. package/dist/esm/version.d.mts +1 -1
  328. package/dist/esm/version.mjs +1 -1
  329. package/package.json +1 -1
@@ -6,7 +6,7 @@ export type BaseClientOptions = {
6
6
  /** Specify a custom URL to connect the client to. */
7
7
  baseUrl?: core.Supplier<string>;
8
8
  /** Override the Tenant-Name header */
9
- tenantName: core.Supplier<string>;
9
+ tenantName?: core.Supplier<string | undefined>;
10
10
  /** Additional headers to include in requests. */
11
11
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
12
12
  /** The default maximum time to wait for a response in seconds. */
@@ -26,7 +26,7 @@ export interface BaseRequestOptions {
26
26
  /** A hook to abort the request. */
27
27
  abortSignal?: AbortSignal;
28
28
  /** Override the Tenant-Name header */
29
- tenantName?: string;
29
+ tenantName?: string | undefined;
30
30
  /** Additional query string parameters to include in the request. */
31
31
  queryParams?: Record<string, unknown>;
32
32
  /** Additional headers to include in the request. */
@@ -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-rc",
47
- "User-Agent": "@corti/sdk/2.0.0-rc",
46
+ "X-Fern-SDK-Version": "2.0.0-templates.1",
47
+ "User-Agent": "@corti/sdk/2.0.0-templates.1",
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,8 @@
1
1
  import { AgentsClient } from "./api/resources/agents/client/Client.js";
2
+ import { AlphaSectionsClient } from "./api/resources/alphaSections/client/Client.js";
3
+ import { AlphaSectionVersionsClient } from "./api/resources/alphaSectionVersions/client/Client.js";
4
+ import { AlphaTemplatesClient } from "./api/resources/alphaTemplates/client/Client.js";
5
+ import { AlphaTemplateVersionsClient } from "./api/resources/alphaTemplateVersions/client/Client.js";
2
6
  import { AuthClient } from "./api/resources/auth/client/Client.js";
3
7
  import { CodesClient } from "./api/resources/codes/client/Client.js";
4
8
  import { DocumentsClient } from "./api/resources/documents/client/Client.js";
@@ -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 _alphaTemplates: AlphaTemplatesClient | undefined;
34
+ protected _alphaSections: AlphaSectionsClient | undefined;
35
+ protected _alphaSectionVersions: AlphaSectionVersionsClient | undefined;
36
+ protected _alphaTemplateVersions: AlphaTemplateVersionsClient | 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 alphaTemplates(): AlphaTemplatesClient;
50
+ get alphaSections(): AlphaSectionsClient;
51
+ get alphaSectionVersions(): AlphaSectionVersionsClient;
52
+ get alphaTemplateVersions(): AlphaTemplateVersionsClient;
41
53
  get agents(): AgentsClient;
42
54
  get stream(): StreamClient;
43
55
  get transcribe(): TranscribeClient;
@@ -3,16 +3,20 @@
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/auth/client/Client.js");
7
- const Client_js_3 = require("./api/resources/codes/client/Client.js");
8
- const Client_js_4 = require("./api/resources/documents/client/Client.js");
9
- const Client_js_5 = require("./api/resources/facts/client/Client.js");
10
- const Client_js_6 = require("./api/resources/interactions/client/Client.js");
11
- const Client_js_7 = require("./api/resources/recordings/client/Client.js");
12
- const Client_js_8 = require("./api/resources/stream/client/Client.js");
13
- const Client_js_9 = require("./api/resources/templates/client/Client.js");
14
- const Client_js_10 = require("./api/resources/transcribe/client/Client.js");
15
- const Client_js_11 = require("./api/resources/transcripts/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");
16
20
  const BaseClient_js_1 = require("./BaseClient.js");
17
21
  class CortiClient {
18
22
  constructor(options) {
@@ -20,35 +24,51 @@ class CortiClient {
20
24
  }
21
25
  get auth() {
22
26
  var _a;
23
- return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_2.AuthClient(this._options)));
27
+ return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_6.AuthClient(this._options)));
24
28
  }
25
29
  get interactions() {
26
30
  var _a;
27
- return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Client_js_6.InteractionsClient(this._options)));
31
+ return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Client_js_10.InteractionsClient(this._options)));
28
32
  }
29
33
  get recordings() {
30
34
  var _a;
31
- return ((_a = this._recordings) !== null && _a !== void 0 ? _a : (this._recordings = new Client_js_7.RecordingsClient(this._options)));
35
+ return ((_a = this._recordings) !== null && _a !== void 0 ? _a : (this._recordings = new Client_js_11.RecordingsClient(this._options)));
32
36
  }
33
37
  get transcripts() {
34
38
  var _a;
35
- return ((_a = this._transcripts) !== null && _a !== void 0 ? _a : (this._transcripts = new Client_js_11.TranscriptsClient(this._options)));
39
+ return ((_a = this._transcripts) !== null && _a !== void 0 ? _a : (this._transcripts = new Client_js_15.TranscriptsClient(this._options)));
36
40
  }
37
41
  get facts() {
38
42
  var _a;
39
- return ((_a = this._facts) !== null && _a !== void 0 ? _a : (this._facts = new Client_js_5.FactsClient(this._options)));
43
+ return ((_a = this._facts) !== null && _a !== void 0 ? _a : (this._facts = new Client_js_9.FactsClient(this._options)));
40
44
  }
41
45
  get documents() {
42
46
  var _a;
43
- return ((_a = this._documents) !== null && _a !== void 0 ? _a : (this._documents = new Client_js_4.DocumentsClient(this._options)));
47
+ return ((_a = this._documents) !== null && _a !== void 0 ? _a : (this._documents = new Client_js_8.DocumentsClient(this._options)));
44
48
  }
45
49
  get templates() {
46
50
  var _a;
47
- return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_js_9.TemplatesClient(this._options)));
51
+ return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_js_13.TemplatesClient(this._options)));
48
52
  }
49
53
  get codes() {
50
54
  var _a;
51
- return ((_a = this._codes) !== null && _a !== void 0 ? _a : (this._codes = new Client_js_3.CodesClient(this._options)));
55
+ return ((_a = this._codes) !== null && _a !== void 0 ? _a : (this._codes = new Client_js_7.CodesClient(this._options)));
56
+ }
57
+ get alphaTemplates() {
58
+ var _a;
59
+ return ((_a = this._alphaTemplates) !== null && _a !== void 0 ? _a : (this._alphaTemplates = new Client_js_4.AlphaTemplatesClient(this._options)));
60
+ }
61
+ get alphaSections() {
62
+ var _a;
63
+ return ((_a = this._alphaSections) !== null && _a !== void 0 ? _a : (this._alphaSections = new Client_js_2.AlphaSectionsClient(this._options)));
64
+ }
65
+ get alphaSectionVersions() {
66
+ var _a;
67
+ return ((_a = this._alphaSectionVersions) !== null && _a !== void 0 ? _a : (this._alphaSectionVersions = new Client_js_3.AlphaSectionVersionsClient(this._options)));
68
+ }
69
+ get alphaTemplateVersions() {
70
+ var _a;
71
+ return ((_a = this._alphaTemplateVersions) !== null && _a !== void 0 ? _a : (this._alphaTemplateVersions = new Client_js_5.AlphaTemplateVersionsClient(this._options)));
52
72
  }
53
73
  get agents() {
54
74
  var _a;
@@ -56,11 +76,11 @@ class CortiClient {
56
76
  }
57
77
  get stream() {
58
78
  var _a;
59
- return ((_a = this._stream) !== null && _a !== void 0 ? _a : (this._stream = new Client_js_8.StreamClient(this._options)));
79
+ return ((_a = this._stream) !== null && _a !== void 0 ? _a : (this._stream = new Client_js_12.StreamClient(this._options)));
60
80
  }
61
81
  get transcribe() {
62
82
  var _a;
63
- return ((_a = this._transcribe) !== null && _a !== void 0 ? _a : (this._transcribe = new Client_js_10.TranscribeClient(this._options)));
83
+ return ((_a = this._transcribe) !== null && _a !== void 0 ? _a : (this._transcribe = new Client_js_14.TranscribeClient(this._options)));
64
84
  }
65
85
  }
66
86
  exports.CortiClient = CortiClient;
@@ -0,0 +1,84 @@
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 AlphaSectionVersionsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class AlphaSectionVersionsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<AlphaSectionVersionsClient.Options>;
12
+ constructor(options: AlphaSectionVersionsClient.Options);
13
+ /**
14
+ * @param {string} sectionID
15
+ * @param {AlphaSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
16
+ *
17
+ * @throws {@link Corti.NotFoundError}
18
+ *
19
+ * @example
20
+ * await client.alphaSectionVersions.list("sectionID")
21
+ */
22
+ list(sectionID: string, requestOptions?: AlphaSectionVersionsClient.RequestOptions): core.HttpResponsePromise<Corti.SectionVersion[]>;
23
+ private __list;
24
+ /**
25
+ * @param {string} sectionID
26
+ * @param {Corti.SectionGeneration} request
27
+ * @param {AlphaSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @throws {@link Corti.BadRequestError}
30
+ * @throws {@link Corti.NotFoundError}
31
+ *
32
+ * @example
33
+ * await client.alphaSectionVersions.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?: AlphaSectionVersionsClient.RequestOptions): core.HttpResponsePromise<Corti.SectionVersion>;
45
+ private __create;
46
+ /**
47
+ * @param {string} sectionID
48
+ * @param {string} versionID
49
+ * @param {AlphaSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
50
+ *
51
+ * @throws {@link Corti.NotFoundError}
52
+ *
53
+ * @example
54
+ * await client.alphaSectionVersions.get("sectionID", "versionID")
55
+ */
56
+ get(sectionID: string, versionID: string, requestOptions?: AlphaSectionVersionsClient.RequestOptions): core.HttpResponsePromise<Corti.SectionVersion>;
57
+ private __get;
58
+ /**
59
+ * @param {string} sectionID
60
+ * @param {string} versionID
61
+ * @param {AlphaSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
62
+ *
63
+ * @throws {@link Corti.NotFoundError}
64
+ *
65
+ * @example
66
+ * await client.alphaSectionVersions.delete("sectionID", "versionID")
67
+ */
68
+ delete(sectionID: string, versionID: string, requestOptions?: AlphaSectionVersionsClient.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 {AlphaSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
76
+ *
77
+ * @throws {@link Corti.NotFoundError}
78
+ *
79
+ * @example
80
+ * await client.alphaSectionVersions.publish("sectionID", "versionID")
81
+ */
82
+ publish(sectionID: string, versionID: string, requestOptions?: AlphaSectionVersionsClient.RequestOptions): core.HttpResponsePromise<Corti.StatusResponse>;
83
+ private __publish;
84
+ }
@@ -0,0 +1,349 @@
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.AlphaSectionVersionsClient = 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 AlphaSectionVersionsClient {
55
+ constructor(options) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * @param {string} sectionID
60
+ * @param {AlphaSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
61
+ *
62
+ * @throws {@link Corti.NotFoundError}
63
+ *
64
+ * @example
65
+ * await client.alphaSectionVersions.list("sectionID")
66
+ */
67
+ list(sectionID, requestOptions) {
68
+ return core.HttpResponsePromise.fromPromise(this.__list(sectionID, requestOptions));
69
+ }
70
+ __list(sectionID, requestOptions) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
73
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
74
+ 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);
75
+ const _response = yield core.fetcher({
76
+ 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`),
77
+ method: "GET",
78
+ headers: _headers,
79
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
80
+ 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,
81
+ 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,
82
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
83
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
84
+ logging: this._options.logging,
85
+ });
86
+ if (_response.ok) {
87
+ return {
88
+ data: serializers.alphaSectionVersions.list.Response.parseOrThrow(_response.body, {
89
+ unrecognizedObjectKeys: "passthrough",
90
+ allowUnrecognizedUnionMembers: true,
91
+ allowUnrecognizedEnumValues: true,
92
+ skipValidation: true,
93
+ breadcrumbsPrefix: ["response"],
94
+ }),
95
+ rawResponse: _response.rawResponse,
96
+ };
97
+ }
98
+ if (_response.error.reason === "status-code") {
99
+ switch (_response.error.statusCode) {
100
+ case 404:
101
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
102
+ default:
103
+ throw new errors.CortiError({
104
+ statusCode: _response.error.statusCode,
105
+ body: _response.error.body,
106
+ rawResponse: _response.rawResponse,
107
+ });
108
+ }
109
+ }
110
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/alpha/sections/{sectionID}/versions");
111
+ });
112
+ }
113
+ /**
114
+ * @param {string} sectionID
115
+ * @param {Corti.SectionGeneration} request
116
+ * @param {AlphaSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
117
+ *
118
+ * @throws {@link Corti.BadRequestError}
119
+ * @throws {@link Corti.NotFoundError}
120
+ *
121
+ * @example
122
+ * await client.alphaSectionVersions.create("sectionID", {
123
+ * title: "title",
124
+ * instructions: {
125
+ * contentPrompt: "contentPrompt",
126
+ * writingStylePrompt: "writingStylePrompt"
127
+ * },
128
+ * outputSchema: {
129
+ * type: "string"
130
+ * }
131
+ * })
132
+ */
133
+ create(sectionID, request, requestOptions) {
134
+ return core.HttpResponsePromise.fromPromise(this.__create(sectionID, request, requestOptions));
135
+ }
136
+ __create(sectionID, request, requestOptions) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
139
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
140
+ 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);
141
+ const _response = yield core.fetcher({
142
+ 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`),
143
+ method: "POST",
144
+ headers: _headers,
145
+ contentType: "application/json",
146
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
147
+ requestType: "json",
148
+ body: serializers.SectionGeneration.jsonOrThrow(request, {
149
+ unrecognizedObjectKeys: "strip",
150
+ omitUndefined: true,
151
+ }),
152
+ 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,
153
+ 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,
154
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
155
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
156
+ logging: this._options.logging,
157
+ });
158
+ if (_response.ok) {
159
+ return {
160
+ data: serializers.SectionVersion.parseOrThrow(_response.body, {
161
+ unrecognizedObjectKeys: "passthrough",
162
+ allowUnrecognizedUnionMembers: true,
163
+ allowUnrecognizedEnumValues: true,
164
+ skipValidation: true,
165
+ breadcrumbsPrefix: ["response"],
166
+ }),
167
+ rawResponse: _response.rawResponse,
168
+ };
169
+ }
170
+ if (_response.error.reason === "status-code") {
171
+ switch (_response.error.statusCode) {
172
+ case 400:
173
+ throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
174
+ case 404:
175
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
176
+ default:
177
+ throw new errors.CortiError({
178
+ statusCode: _response.error.statusCode,
179
+ body: _response.error.body,
180
+ rawResponse: _response.rawResponse,
181
+ });
182
+ }
183
+ }
184
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/alpha/sections/{sectionID}/versions");
185
+ });
186
+ }
187
+ /**
188
+ * @param {string} sectionID
189
+ * @param {string} versionID
190
+ * @param {AlphaSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
191
+ *
192
+ * @throws {@link Corti.NotFoundError}
193
+ *
194
+ * @example
195
+ * await client.alphaSectionVersions.get("sectionID", "versionID")
196
+ */
197
+ get(sectionID, versionID, requestOptions) {
198
+ return core.HttpResponsePromise.fromPromise(this.__get(sectionID, versionID, requestOptions));
199
+ }
200
+ __get(sectionID, versionID, requestOptions) {
201
+ return __awaiter(this, void 0, void 0, function* () {
202
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
203
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
204
+ 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);
205
+ const _response = yield core.fetcher({
206
+ 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)}`),
207
+ method: "GET",
208
+ headers: _headers,
209
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
210
+ 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,
211
+ 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,
212
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
213
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
214
+ logging: this._options.logging,
215
+ });
216
+ if (_response.ok) {
217
+ return {
218
+ data: serializers.SectionVersion.parseOrThrow(_response.body, {
219
+ unrecognizedObjectKeys: "passthrough",
220
+ allowUnrecognizedUnionMembers: true,
221
+ allowUnrecognizedEnumValues: true,
222
+ skipValidation: true,
223
+ breadcrumbsPrefix: ["response"],
224
+ }),
225
+ rawResponse: _response.rawResponse,
226
+ };
227
+ }
228
+ if (_response.error.reason === "status-code") {
229
+ switch (_response.error.statusCode) {
230
+ case 404:
231
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
232
+ default:
233
+ throw new errors.CortiError({
234
+ statusCode: _response.error.statusCode,
235
+ body: _response.error.body,
236
+ rawResponse: _response.rawResponse,
237
+ });
238
+ }
239
+ }
240
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/alpha/sections/{sectionID}/versions/{versionID}");
241
+ });
242
+ }
243
+ /**
244
+ * @param {string} sectionID
245
+ * @param {string} versionID
246
+ * @param {AlphaSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
247
+ *
248
+ * @throws {@link Corti.NotFoundError}
249
+ *
250
+ * @example
251
+ * await client.alphaSectionVersions.delete("sectionID", "versionID")
252
+ */
253
+ delete(sectionID, versionID, requestOptions) {
254
+ return core.HttpResponsePromise.fromPromise(this.__delete(sectionID, versionID, requestOptions));
255
+ }
256
+ __delete(sectionID, versionID, requestOptions) {
257
+ return __awaiter(this, void 0, void 0, function* () {
258
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
259
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
260
+ 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);
261
+ const _response = yield core.fetcher({
262
+ 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)}`),
263
+ method: "DELETE",
264
+ headers: _headers,
265
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
266
+ 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,
267
+ 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,
268
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
269
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
270
+ logging: this._options.logging,
271
+ });
272
+ if (_response.ok) {
273
+ return { data: undefined, rawResponse: _response.rawResponse };
274
+ }
275
+ if (_response.error.reason === "status-code") {
276
+ switch (_response.error.statusCode) {
277
+ case 404:
278
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
279
+ default:
280
+ throw new errors.CortiError({
281
+ statusCode: _response.error.statusCode,
282
+ body: _response.error.body,
283
+ rawResponse: _response.rawResponse,
284
+ });
285
+ }
286
+ }
287
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/alpha/sections/{sectionID}/versions/{versionID}");
288
+ });
289
+ }
290
+ /**
291
+ * Sets this version as the published version of the section.
292
+ *
293
+ * @param {string} sectionID
294
+ * @param {string} versionID
295
+ * @param {AlphaSectionVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
296
+ *
297
+ * @throws {@link Corti.NotFoundError}
298
+ *
299
+ * @example
300
+ * await client.alphaSectionVersions.publish("sectionID", "versionID")
301
+ */
302
+ publish(sectionID, versionID, requestOptions) {
303
+ return core.HttpResponsePromise.fromPromise(this.__publish(sectionID, versionID, requestOptions));
304
+ }
305
+ __publish(sectionID, versionID, requestOptions) {
306
+ return __awaiter(this, void 0, void 0, function* () {
307
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
308
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
309
+ 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);
310
+ const _response = yield core.fetcher({
311
+ 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`),
312
+ method: "POST",
313
+ headers: _headers,
314
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
315
+ 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,
316
+ 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,
317
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
318
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
319
+ logging: this._options.logging,
320
+ });
321
+ if (_response.ok) {
322
+ return {
323
+ data: serializers.StatusResponse.parseOrThrow(_response.body, {
324
+ unrecognizedObjectKeys: "passthrough",
325
+ allowUnrecognizedUnionMembers: true,
326
+ allowUnrecognizedEnumValues: true,
327
+ skipValidation: true,
328
+ breadcrumbsPrefix: ["response"],
329
+ }),
330
+ rawResponse: _response.rawResponse,
331
+ };
332
+ }
333
+ if (_response.error.reason === "status-code") {
334
+ switch (_response.error.statusCode) {
335
+ case 404:
336
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
337
+ default:
338
+ throw new errors.CortiError({
339
+ statusCode: _response.error.statusCode,
340
+ body: _response.error.body,
341
+ rawResponse: _response.rawResponse,
342
+ });
343
+ }
344
+ }
345
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/alpha/sections/{sectionID}/versions/{versionID}/publish");
346
+ });
347
+ }
348
+ }
349
+ exports.AlphaSectionVersionsClient = AlphaSectionVersionsClient;
@@ -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);