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