@corti/sdk 1.2.0-templates-beta.4 → 2.0.0-rc

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