@corti/sdk 2.0.0-templates → 2.0.0-templates.2

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 (233) hide show
  1. package/dist/cjs/BaseClient.d.ts +2 -2
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +12 -12
  4. package/dist/cjs/Client.js +22 -22
  5. package/dist/cjs/api/resources/{newSectionVersions → alphaSectionVersions}/client/Client.d.ts +19 -19
  6. package/dist/cjs/api/resources/{newSectionVersions → alphaSectionVersions}/client/Client.js +14 -14
  7. package/dist/cjs/api/resources/{newSections → alphaSections}/client/Client.d.ts +20 -20
  8. package/dist/cjs/api/resources/{newSections → alphaSections}/client/Client.js +15 -15
  9. package/dist/cjs/api/resources/{newSections/client/requests/ListNewSectionsRequest.d.ts → alphaSections/client/requests/ListAlphaSectionsRequest.d.ts} +1 -1
  10. package/dist/cjs/api/resources/{newSections → alphaSections}/client/requests/index.d.ts +1 -1
  11. package/dist/cjs/api/resources/alphaTemplateVersions/client/Client.d.ts +81 -0
  12. package/dist/cjs/api/resources/{newTemplateVersions → alphaTemplateVersions}/client/Client.js +163 -72
  13. package/dist/cjs/api/resources/alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.d.ts +14 -0
  14. package/dist/cjs/api/resources/alphaTemplateVersions/client/requests/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.d.ts +5 -0
  16. package/dist/cjs/api/resources/alphaTemplateVersions/types/index.d.ts +1 -0
  17. package/dist/cjs/api/resources/alphaTemplateVersions/types/index.js +17 -0
  18. package/dist/cjs/api/resources/alphaTemplates/client/Client.d.ts +76 -0
  19. package/dist/cjs/api/resources/{newTemplates → alphaTemplates}/client/Client.js +100 -51
  20. package/dist/cjs/api/resources/alphaTemplates/client/index.d.ts +1 -0
  21. package/dist/cjs/api/resources/alphaTemplates/client/index.js +17 -0
  22. package/dist/cjs/api/resources/{newTemplates/client/requests/ListNewTemplatesRequest.d.ts → alphaTemplates/client/requests/ListAlphaTemplatesRequest.d.ts} +1 -1
  23. package/dist/cjs/api/resources/alphaTemplates/client/requests/ListAlphaTemplatesRequest.js +3 -0
  24. package/dist/cjs/api/resources/alphaTemplates/client/requests/UpdateTemplateRequest.d.ts +10 -0
  25. package/dist/cjs/api/resources/alphaTemplates/client/requests/UpdateTemplateRequest.js +3 -0
  26. package/dist/cjs/api/resources/alphaTemplates/client/requests/index.d.ts +3 -0
  27. package/dist/cjs/api/resources/alphaTemplates/types/CreateTemplateRequestGeneration.js +3 -0
  28. package/dist/cjs/api/resources/index.d.ts +9 -7
  29. package/dist/cjs/api/resources/index.js +10 -8
  30. package/dist/cjs/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/list.d.ts +1 -1
  31. package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/list.d.ts +1 -1
  32. package/dist/cjs/serialization/resources/alphaTemplateVersions/client/list.d.ts +8 -0
  33. package/dist/cjs/serialization/resources/alphaTemplateVersions/client/list.js +40 -0
  34. package/dist/cjs/serialization/resources/alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.d.ts +10 -0
  35. package/dist/cjs/serialization/resources/alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.js +42 -0
  36. package/dist/cjs/serialization/resources/alphaTemplateVersions/client/requests/index.d.ts +1 -0
  37. package/dist/cjs/serialization/resources/alphaTemplateVersions/client/requests/index.js +5 -0
  38. package/dist/cjs/serialization/resources/alphaTemplateVersions/index.d.ts +2 -0
  39. package/dist/cjs/serialization/resources/alphaTemplateVersions/index.js +18 -0
  40. package/dist/cjs/serialization/resources/alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.d.ts +12 -0
  41. package/dist/cjs/serialization/resources/alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.js +44 -0
  42. package/dist/cjs/serialization/resources/alphaTemplateVersions/types/index.d.ts +1 -0
  43. package/dist/cjs/serialization/resources/alphaTemplateVersions/types/index.js +17 -0
  44. package/dist/cjs/serialization/resources/alphaTemplates/client/index.d.ts +2 -0
  45. package/dist/cjs/serialization/resources/alphaTemplates/client/index.js +41 -0
  46. package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/client/list.d.ts +1 -1
  47. package/dist/cjs/serialization/resources/alphaTemplates/client/requests/UpdateTemplateRequest.d.ts +12 -0
  48. package/dist/cjs/serialization/resources/alphaTemplates/client/requests/UpdateTemplateRequest.js +44 -0
  49. package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/client/requests/index.d.ts +1 -0
  50. package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/client/requests/index.js +3 -1
  51. package/dist/cjs/serialization/resources/alphaTemplates/index.d.ts +2 -0
  52. package/dist/cjs/serialization/resources/alphaTemplates/index.js +18 -0
  53. package/dist/cjs/serialization/resources/index.d.ts +9 -6
  54. package/dist/cjs/serialization/resources/index.js +10 -7
  55. package/dist/cjs/version.d.ts +1 -1
  56. package/dist/cjs/version.js +1 -1
  57. package/dist/esm/BaseClient.d.mts +2 -2
  58. package/dist/esm/BaseClient.mjs +2 -2
  59. package/dist/esm/Client.d.mts +12 -12
  60. package/dist/esm/Client.mjs +12 -12
  61. package/dist/esm/api/resources/{newSectionVersions → alphaSectionVersions}/client/Client.d.mts +19 -19
  62. package/dist/esm/api/resources/{newSectionVersions → alphaSectionVersions}/client/Client.mjs +12 -12
  63. package/dist/esm/api/resources/{newSections → alphaSections}/client/Client.d.mts +20 -20
  64. package/dist/esm/api/resources/{newSections → alphaSections}/client/Client.mjs +13 -13
  65. package/dist/esm/api/resources/{newSections/client/requests/ListNewSectionsRequest.d.mts → alphaSections/client/requests/ListAlphaSectionsRequest.d.mts} +1 -1
  66. package/dist/esm/api/resources/{newSections → alphaSections}/client/requests/index.d.mts +1 -1
  67. package/dist/esm/api/resources/alphaTemplateVersions/client/Client.d.mts +81 -0
  68. package/dist/esm/api/resources/{newTemplateVersions → alphaTemplateVersions}/client/Client.mjs +161 -70
  69. package/dist/esm/api/resources/alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.d.mts +14 -0
  70. package/dist/esm/api/resources/alphaTemplateVersions/client/requests/index.d.mts +1 -0
  71. package/dist/esm/api/resources/alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.d.mts +5 -0
  72. package/dist/esm/api/resources/alphaTemplateVersions/types/index.d.mts +1 -0
  73. package/dist/esm/api/resources/alphaTemplateVersions/types/index.mjs +1 -0
  74. package/dist/esm/api/resources/alphaTemplates/client/Client.d.mts +76 -0
  75. package/dist/esm/api/resources/{newTemplates → alphaTemplates}/client/Client.mjs +98 -49
  76. package/dist/esm/api/resources/alphaTemplates/client/index.d.mts +1 -0
  77. package/dist/esm/api/resources/alphaTemplates/client/index.mjs +1 -0
  78. package/dist/esm/api/resources/{newTemplates/client/requests/ListNewTemplatesRequest.d.mts → alphaTemplates/client/requests/ListAlphaTemplatesRequest.d.mts} +1 -1
  79. package/dist/esm/api/resources/alphaTemplates/client/requests/ListAlphaTemplatesRequest.mjs +2 -0
  80. package/dist/esm/api/resources/alphaTemplates/client/requests/UpdateTemplateRequest.d.mts +10 -0
  81. package/dist/esm/api/resources/alphaTemplates/client/requests/UpdateTemplateRequest.mjs +2 -0
  82. package/dist/esm/api/resources/alphaTemplates/client/requests/index.d.mts +3 -0
  83. package/dist/esm/api/resources/alphaTemplates/types/CreateTemplateRequestGeneration.mjs +2 -0
  84. package/dist/esm/api/resources/index.d.mts +9 -7
  85. package/dist/esm/api/resources/index.mjs +9 -7
  86. package/dist/esm/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/list.d.mts +1 -1
  87. package/dist/esm/serialization/resources/{newSections → alphaSections}/client/list.d.mts +1 -1
  88. package/dist/esm/serialization/resources/alphaTemplateVersions/client/list.d.mts +8 -0
  89. package/dist/esm/serialization/resources/alphaTemplateVersions/client/list.mjs +4 -0
  90. package/dist/esm/serialization/resources/alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.d.mts +10 -0
  91. package/dist/esm/serialization/resources/alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.mjs +6 -0
  92. package/dist/esm/serialization/resources/alphaTemplateVersions/client/requests/index.d.mts +1 -0
  93. package/dist/esm/serialization/resources/alphaTemplateVersions/client/requests/index.mjs +1 -0
  94. package/dist/esm/serialization/resources/alphaTemplateVersions/index.d.mts +2 -0
  95. package/dist/esm/serialization/resources/alphaTemplateVersions/index.mjs +2 -0
  96. package/dist/esm/serialization/resources/alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.d.mts +12 -0
  97. package/dist/esm/serialization/resources/alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.mjs +8 -0
  98. package/dist/esm/serialization/resources/alphaTemplateVersions/types/index.d.mts +1 -0
  99. package/dist/esm/serialization/resources/alphaTemplateVersions/types/index.mjs +1 -0
  100. package/dist/esm/serialization/resources/alphaTemplates/client/index.d.mts +2 -0
  101. package/dist/esm/serialization/resources/alphaTemplates/client/index.mjs +2 -0
  102. package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/client/list.d.mts +1 -1
  103. package/dist/esm/serialization/resources/alphaTemplates/client/requests/UpdateTemplateRequest.d.mts +12 -0
  104. package/dist/esm/serialization/resources/alphaTemplates/client/requests/UpdateTemplateRequest.mjs +8 -0
  105. package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/client/requests/index.d.mts +1 -0
  106. package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/client/requests/index.mjs +1 -0
  107. package/dist/esm/serialization/resources/alphaTemplates/index.d.mts +2 -0
  108. package/dist/esm/serialization/resources/alphaTemplates/index.mjs +2 -0
  109. package/dist/esm/serialization/resources/index.d.mts +9 -6
  110. package/dist/esm/serialization/resources/index.mjs +9 -6
  111. package/dist/esm/version.d.mts +1 -1
  112. package/dist/esm/version.mjs +1 -1
  113. package/package.json +2 -4
  114. package/dist/cjs/api/resources/newTemplateVersions/client/Client.d.ts +0 -60
  115. package/dist/cjs/api/resources/newTemplateVersions/client/index.d.ts +0 -1
  116. package/dist/cjs/api/resources/newTemplates/client/Client.d.ts +0 -68
  117. package/dist/cjs/api/resources/newTemplates/client/requests/index.d.ts +0 -2
  118. package/dist/cjs/serialization/resources/newSections/index.d.ts +0 -1
  119. package/dist/cjs/serialization/resources/newSections/index.js +0 -17
  120. package/dist/esm/api/resources/newTemplateVersions/client/Client.d.mts +0 -60
  121. package/dist/esm/api/resources/newTemplateVersions/client/index.d.mts +0 -1
  122. package/dist/esm/api/resources/newTemplates/client/Client.d.mts +0 -68
  123. package/dist/esm/api/resources/newTemplates/client/requests/index.d.mts +0 -2
  124. package/dist/esm/serialization/resources/newSections/index.d.mts +0 -1
  125. package/dist/esm/serialization/resources/newSections/index.mjs +0 -1
  126. /package/dist/cjs/api/resources/{newSectionVersions → alphaSectionVersions}/client/index.d.ts +0 -0
  127. /package/dist/cjs/api/resources/{newSectionVersions → alphaSectionVersions}/client/index.js +0 -0
  128. /package/dist/cjs/api/resources/{newSectionVersions → alphaSectionVersions}/index.d.ts +0 -0
  129. /package/dist/cjs/api/resources/{newSectionVersions → alphaSectionVersions}/index.js +0 -0
  130. /package/dist/cjs/api/resources/{newSections → alphaSections}/client/index.d.ts +0 -0
  131. /package/dist/cjs/api/resources/{newSections → alphaSections}/client/index.js +0 -0
  132. /package/dist/cjs/api/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.d.ts +0 -0
  133. /package/dist/cjs/api/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.js +0 -0
  134. /package/dist/cjs/api/resources/{newSections/client/requests/ListNewSectionsRequest.js → alphaSections/client/requests/ListAlphaSectionsRequest.js} +0 -0
  135. /package/dist/cjs/api/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.d.ts +0 -0
  136. /package/dist/cjs/api/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.js +0 -0
  137. /package/dist/cjs/api/resources/{newSections → alphaSections}/client/requests/index.js +0 -0
  138. /package/dist/cjs/api/resources/{newSections → alphaSections}/index.d.ts +0 -0
  139. /package/dist/cjs/api/resources/{newSections → alphaSections}/index.js +0 -0
  140. /package/dist/cjs/api/resources/{newTemplates → alphaTemplateVersions}/client/index.d.ts +0 -0
  141. /package/dist/cjs/api/resources/{newTemplates → alphaTemplateVersions}/client/index.js +0 -0
  142. /package/dist/cjs/api/resources/{newTemplates/client/requests/CreateTemplateRequest.js → alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.js} +0 -0
  143. /package/dist/cjs/api/resources/{newTemplateVersions/client → alphaTemplateVersions/client/requests}/index.js +0 -0
  144. /package/dist/cjs/api/resources/{newTemplates → alphaTemplateVersions}/index.d.ts +0 -0
  145. /package/dist/cjs/api/resources/{newTemplates → alphaTemplateVersions}/index.js +0 -0
  146. /package/dist/cjs/api/resources/{newTemplates/client/requests/ListNewTemplatesRequest.js → alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.js} +0 -0
  147. /package/dist/cjs/api/resources/{newTemplates → alphaTemplates}/client/requests/CreateTemplateRequest.d.ts +0 -0
  148. /package/dist/cjs/api/resources/{newTemplates/types/CreateTemplateRequestGeneration.js → alphaTemplates/client/requests/CreateTemplateRequest.js} +0 -0
  149. /package/dist/cjs/api/resources/{newTemplates → alphaTemplates}/client/requests/index.js +0 -0
  150. /package/dist/cjs/{serialization/resources/newTemplates → api/resources/alphaTemplates}/index.d.ts +0 -0
  151. /package/dist/cjs/{serialization/resources/newTemplates → api/resources/alphaTemplates}/index.js +0 -0
  152. /package/dist/cjs/api/resources/{newTemplates → alphaTemplates}/types/CreateTemplateRequestGeneration.d.ts +0 -0
  153. /package/dist/cjs/api/resources/{newTemplates → alphaTemplates}/types/index.d.ts +0 -0
  154. /package/dist/cjs/api/resources/{newTemplates → alphaTemplates}/types/index.js +0 -0
  155. /package/dist/cjs/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/index.d.ts +0 -0
  156. /package/dist/cjs/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/index.js +0 -0
  157. /package/dist/cjs/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/list.js +0 -0
  158. /package/dist/cjs/{api/resources/newTemplateVersions → serialization/resources/alphaSectionVersions}/index.d.ts +0 -0
  159. /package/dist/cjs/{api/resources/newTemplateVersions → serialization/resources/alphaSectionVersions}/index.js +0 -0
  160. /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/index.d.ts +0 -0
  161. /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/index.js +0 -0
  162. /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/list.js +0 -0
  163. /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.d.ts +0 -0
  164. /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.js +0 -0
  165. /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.d.ts +0 -0
  166. /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.js +0 -0
  167. /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/requests/index.d.ts +0 -0
  168. /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/requests/index.js +0 -0
  169. /package/dist/cjs/serialization/resources/{newSectionVersions → alphaSections}/index.d.ts +0 -0
  170. /package/dist/cjs/serialization/resources/{newSectionVersions → alphaSections}/index.js +0 -0
  171. /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplateVersions}/client/index.d.ts +0 -0
  172. /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplateVersions}/client/index.js +0 -0
  173. /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/client/list.js +0 -0
  174. /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/client/requests/CreateTemplateRequest.d.ts +0 -0
  175. /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/client/requests/CreateTemplateRequest.js +0 -0
  176. /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/types/CreateTemplateRequestGeneration.d.ts +0 -0
  177. /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/types/CreateTemplateRequestGeneration.js +0 -0
  178. /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/types/index.d.ts +0 -0
  179. /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/types/index.js +0 -0
  180. /package/dist/esm/api/resources/{newSectionVersions → alphaSectionVersions}/client/index.d.mts +0 -0
  181. /package/dist/esm/api/resources/{newSectionVersions → alphaSectionVersions}/client/index.mjs +0 -0
  182. /package/dist/esm/api/resources/{newSectionVersions → alphaSectionVersions}/index.d.mts +0 -0
  183. /package/dist/esm/api/resources/{newSectionVersions → alphaSectionVersions}/index.mjs +0 -0
  184. /package/dist/esm/api/resources/{newSections → alphaSections}/client/index.d.mts +0 -0
  185. /package/dist/esm/api/resources/{newSections → alphaSections}/client/index.mjs +0 -0
  186. /package/dist/esm/api/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.d.mts +0 -0
  187. /package/dist/esm/api/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.mjs +0 -0
  188. /package/dist/esm/api/resources/{newSections/client/requests/ListNewSectionsRequest.mjs → alphaSections/client/requests/ListAlphaSectionsRequest.mjs} +0 -0
  189. /package/dist/esm/api/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.d.mts +0 -0
  190. /package/dist/esm/api/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.mjs +0 -0
  191. /package/dist/esm/api/resources/{newSections → alphaSections}/client/requests/index.mjs +0 -0
  192. /package/dist/esm/api/resources/{newSections → alphaSections}/index.d.mts +0 -0
  193. /package/dist/esm/api/resources/{newSections → alphaSections}/index.mjs +0 -0
  194. /package/dist/esm/api/resources/{newTemplates → alphaTemplateVersions}/client/index.d.mts +0 -0
  195. /package/dist/esm/api/resources/{newTemplates → alphaTemplateVersions}/client/index.mjs +0 -0
  196. /package/dist/esm/api/resources/{newTemplates/client/requests/CreateTemplateRequest.mjs → alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.mjs} +0 -0
  197. /package/dist/esm/api/resources/{newTemplateVersions/client → alphaTemplateVersions/client/requests}/index.mjs +0 -0
  198. /package/dist/esm/api/resources/{newTemplates → alphaTemplateVersions}/index.d.mts +0 -0
  199. /package/dist/esm/api/resources/{newTemplates → alphaTemplateVersions}/index.mjs +0 -0
  200. /package/dist/esm/api/resources/{newTemplates/client/requests/ListNewTemplatesRequest.mjs → alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.mjs} +0 -0
  201. /package/dist/esm/api/resources/{newTemplates → alphaTemplates}/client/requests/CreateTemplateRequest.d.mts +0 -0
  202. /package/dist/esm/api/resources/{newTemplates/types/CreateTemplateRequestGeneration.mjs → alphaTemplates/client/requests/CreateTemplateRequest.mjs} +0 -0
  203. /package/dist/esm/api/resources/{newTemplates → alphaTemplates}/client/requests/index.mjs +0 -0
  204. /package/dist/esm/{serialization/resources/newTemplates → api/resources/alphaTemplates}/index.d.mts +0 -0
  205. /package/dist/esm/{serialization/resources/newTemplates → api/resources/alphaTemplates}/index.mjs +0 -0
  206. /package/dist/esm/api/resources/{newTemplates → alphaTemplates}/types/CreateTemplateRequestGeneration.d.mts +0 -0
  207. /package/dist/esm/api/resources/{newTemplates → alphaTemplates}/types/index.d.mts +0 -0
  208. /package/dist/esm/api/resources/{newTemplates → alphaTemplates}/types/index.mjs +0 -0
  209. /package/dist/esm/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/index.d.mts +0 -0
  210. /package/dist/esm/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/index.mjs +0 -0
  211. /package/dist/esm/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/list.mjs +0 -0
  212. /package/dist/esm/{api/resources/newTemplateVersions → serialization/resources/alphaSectionVersions}/index.d.mts +0 -0
  213. /package/dist/esm/{api/resources/newTemplateVersions → serialization/resources/alphaSectionVersions}/index.mjs +0 -0
  214. /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/index.d.mts +0 -0
  215. /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/index.mjs +0 -0
  216. /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/list.mjs +0 -0
  217. /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.d.mts +0 -0
  218. /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.mjs +0 -0
  219. /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.d.mts +0 -0
  220. /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.mjs +0 -0
  221. /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/requests/index.d.mts +0 -0
  222. /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/requests/index.mjs +0 -0
  223. /package/dist/esm/serialization/resources/{newSectionVersions → alphaSections}/index.d.mts +0 -0
  224. /package/dist/esm/serialization/resources/{newSectionVersions → alphaSections}/index.mjs +0 -0
  225. /package/dist/esm/serialization/resources/{newTemplates → alphaTemplateVersions}/client/index.d.mts +0 -0
  226. /package/dist/esm/serialization/resources/{newTemplates → alphaTemplateVersions}/client/index.mjs +0 -0
  227. /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/client/list.mjs +0 -0
  228. /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/client/requests/CreateTemplateRequest.d.mts +0 -0
  229. /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/client/requests/CreateTemplateRequest.mjs +0 -0
  230. /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/types/CreateTemplateRequestGeneration.d.mts +0 -0
  231. /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/types/CreateTemplateRequestGeneration.mjs +0 -0
  232. /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/types/index.d.mts +0 -0
  233. /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/types/index.mjs +0 -0
@@ -0,0 +1,81 @@
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 AlphaTemplateVersionsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class AlphaTemplateVersionsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<AlphaTemplateVersionsClient.Options>;
12
+ constructor(options: AlphaTemplateVersionsClient.Options);
13
+ /**
14
+ * @param {string} templateID
15
+ * @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
16
+ *
17
+ * @throws {@link Corti.NotFoundError}
18
+ *
19
+ * @example
20
+ * await client.alphaTemplateVersions.list("templateID")
21
+ */
22
+ list(templateID: string, requestOptions?: AlphaTemplateVersionsClient.RequestOptions): core.HttpResponsePromise<Corti.TemplateVersion[]>;
23
+ private __list;
24
+ /**
25
+ * @param {string} templateID
26
+ * @param {Corti.CreateTemplateVersionRequest} request
27
+ * @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @throws {@link Corti.BadRequestError}
30
+ * @throws {@link Corti.NotFoundError}
31
+ *
32
+ * @example
33
+ * await client.alphaTemplateVersions.create("templateID", {
34
+ * generation: {
35
+ * instructions: {
36
+ * prompt: "prompt"
37
+ * }
38
+ * }
39
+ * })
40
+ */
41
+ create(templateID: string, request: Corti.CreateTemplateVersionRequest, requestOptions?: AlphaTemplateVersionsClient.RequestOptions): core.HttpResponsePromise<Corti.TemplateVersion>;
42
+ private __create;
43
+ /**
44
+ * @param {string} templateID
45
+ * @param {string} versionID
46
+ * @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
47
+ *
48
+ * @throws {@link Corti.NotFoundError}
49
+ *
50
+ * @example
51
+ * await client.alphaTemplateVersions.get("templateID", "versionID")
52
+ */
53
+ get(templateID: string, versionID: string, requestOptions?: AlphaTemplateVersionsClient.RequestOptions): core.HttpResponsePromise<Corti.TemplateVersion>;
54
+ private __get;
55
+ /**
56
+ * @param {string} templateID
57
+ * @param {string} versionID
58
+ * @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
59
+ *
60
+ * @throws {@link Corti.NotFoundError}
61
+ *
62
+ * @example
63
+ * await client.alphaTemplateVersions.delete("templateID", "versionID")
64
+ */
65
+ delete(templateID: string, versionID: string, requestOptions?: AlphaTemplateVersionsClient.RequestOptions): core.HttpResponsePromise<void>;
66
+ private __delete;
67
+ /**
68
+ * Sets this version as the published version of the template.
69
+ *
70
+ * @param {string} templateID
71
+ * @param {string} versionID
72
+ * @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
73
+ *
74
+ * @throws {@link Corti.NotFoundError}
75
+ *
76
+ * @example
77
+ * await client.alphaTemplateVersions.publish("templateID", "versionID")
78
+ */
79
+ publish(templateID: string, versionID: string, requestOptions?: AlphaTemplateVersionsClient.RequestOptions): core.HttpResponsePromise<Corti.StatusResponse>;
80
+ private __publish;
81
+ }
@@ -43,33 +43,37 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
43
43
  });
44
44
  };
45
45
  Object.defineProperty(exports, "__esModule", { value: true });
46
- exports.NewTemplateVersionsClient = void 0;
46
+ exports.AlphaTemplateVersionsClient = void 0;
47
47
  const BaseClient_js_1 = require("../../../../BaseClient.js");
48
48
  const headers_js_1 = require("../../../../core/headers.js");
49
49
  const core = __importStar(require("../../../../core/index.js"));
50
50
  const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
51
51
  const errors = __importStar(require("../../../../errors/index.js"));
52
- class NewTemplateVersionsClient {
52
+ const serializers = __importStar(require("../../../../serialization/index.js"));
53
+ const Corti = __importStar(require("../../../index.js"));
54
+ class AlphaTemplateVersionsClient {
53
55
  constructor(options) {
54
56
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
55
57
  }
56
58
  /**
57
- * @param {string} templateId
58
- * @param {NewTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
59
+ * @param {string} templateID
60
+ * @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
61
+ *
62
+ * @throws {@link Corti.NotFoundError}
59
63
  *
60
64
  * @example
61
- * await client.newTemplateVersions.list("templateId")
65
+ * await client.alphaTemplateVersions.list("templateID")
62
66
  */
63
- list(templateId, requestOptions) {
64
- return core.HttpResponsePromise.fromPromise(this.__list(templateId, requestOptions));
67
+ list(templateID, requestOptions) {
68
+ return core.HttpResponsePromise.fromPromise(this.__list(templateID, requestOptions));
65
69
  }
66
- __list(templateId, requestOptions) {
70
+ __list(templateID, requestOptions) {
67
71
  return __awaiter(this, void 0, void 0, function* () {
68
72
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
69
73
  const _authRequest = yield this._options.authProvider.getAuthRequest();
70
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);
71
75
  const _response = yield core.fetcher({
72
- url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment)).base, `alpha/templates/${core.url.encodePathParam(templateId)}/versions`),
76
+ url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment)).base, `alpha/templates/${core.url.encodePathParam(templateID)}/versions`),
73
77
  method: "GET",
74
78
  headers: _headers,
75
79
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -80,38 +84,68 @@ class NewTemplateVersionsClient {
80
84
  logging: this._options.logging,
81
85
  });
82
86
  if (_response.ok) {
83
- return { data: undefined, rawResponse: _response.rawResponse };
87
+ return {
88
+ data: serializers.alphaTemplateVersions.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
+ };
84
97
  }
85
98
  if (_response.error.reason === "status-code") {
86
- throw new errors.CortiError({
87
- statusCode: _response.error.statusCode,
88
- body: _response.error.body,
89
- rawResponse: _response.rawResponse,
90
- });
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
+ }
91
109
  }
92
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/alpha/templates/{templateId}/versions");
110
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/alpha/templates/{templateID}/versions");
93
111
  });
94
112
  }
95
113
  /**
96
- * @param {string} templateId
97
- * @param {NewTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
114
+ * @param {string} templateID
115
+ * @param {Corti.CreateTemplateVersionRequest} request
116
+ * @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
117
+ *
118
+ * @throws {@link Corti.BadRequestError}
119
+ * @throws {@link Corti.NotFoundError}
98
120
  *
99
121
  * @example
100
- * await client.newTemplateVersions.create("templateId")
122
+ * await client.alphaTemplateVersions.create("templateID", {
123
+ * generation: {
124
+ * instructions: {
125
+ * prompt: "prompt"
126
+ * }
127
+ * }
128
+ * })
101
129
  */
102
- create(templateId, requestOptions) {
103
- return core.HttpResponsePromise.fromPromise(this.__create(templateId, requestOptions));
130
+ create(templateID, request, requestOptions) {
131
+ return core.HttpResponsePromise.fromPromise(this.__create(templateID, request, requestOptions));
104
132
  }
105
- __create(templateId, requestOptions) {
133
+ __create(templateID, request, requestOptions) {
106
134
  return __awaiter(this, void 0, void 0, function* () {
107
135
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
108
136
  const _authRequest = yield this._options.authProvider.getAuthRequest();
109
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);
110
138
  const _response = yield core.fetcher({
111
- url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment)).base, `alpha/templates/${core.url.encodePathParam(templateId)}/versions`),
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, `alpha/templates/${core.url.encodePathParam(templateID)}/versions`),
112
140
  method: "POST",
113
141
  headers: _headers,
142
+ contentType: "application/json",
114
143
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
144
+ requestType: "json",
145
+ body: serializers.CreateTemplateVersionRequest.jsonOrThrow(request, {
146
+ unrecognizedObjectKeys: "strip",
147
+ omitUndefined: true,
148
+ }),
115
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,
116
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,
117
151
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -119,36 +153,54 @@ class NewTemplateVersionsClient {
119
153
  logging: this._options.logging,
120
154
  });
121
155
  if (_response.ok) {
122
- return { data: undefined, rawResponse: _response.rawResponse };
156
+ return {
157
+ data: serializers.TemplateVersion.parseOrThrow(_response.body, {
158
+ unrecognizedObjectKeys: "passthrough",
159
+ allowUnrecognizedUnionMembers: true,
160
+ allowUnrecognizedEnumValues: true,
161
+ skipValidation: true,
162
+ breadcrumbsPrefix: ["response"],
163
+ }),
164
+ rawResponse: _response.rawResponse,
165
+ };
123
166
  }
124
167
  if (_response.error.reason === "status-code") {
125
- throw new errors.CortiError({
126
- statusCode: _response.error.statusCode,
127
- body: _response.error.body,
128
- rawResponse: _response.rawResponse,
129
- });
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
+ }
130
180
  }
131
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/alpha/templates/{templateId}/versions");
181
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/alpha/templates/{templateID}/versions");
132
182
  });
133
183
  }
134
184
  /**
135
- * @param {string} templateId
185
+ * @param {string} templateID
136
186
  * @param {string} versionID
137
- * @param {NewTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
187
+ * @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
188
+ *
189
+ * @throws {@link Corti.NotFoundError}
138
190
  *
139
191
  * @example
140
- * await client.newTemplateVersions.get("templateId", "versionID")
192
+ * await client.alphaTemplateVersions.get("templateID", "versionID")
141
193
  */
142
- get(templateId, versionID, requestOptions) {
143
- return core.HttpResponsePromise.fromPromise(this.__get(templateId, versionID, requestOptions));
194
+ get(templateID, versionID, requestOptions) {
195
+ return core.HttpResponsePromise.fromPromise(this.__get(templateID, versionID, requestOptions));
144
196
  }
145
- __get(templateId, versionID, requestOptions) {
197
+ __get(templateID, versionID, requestOptions) {
146
198
  return __awaiter(this, void 0, void 0, function* () {
147
199
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
148
200
  const _authRequest = yield this._options.authProvider.getAuthRequest();
149
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);
150
202
  const _response = yield core.fetcher({
151
- url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment)).base, `alpha/templates/${core.url.encodePathParam(templateId)}/versions/${core.url.encodePathParam(versionID)}`),
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, `alpha/templates/${core.url.encodePathParam(templateID)}/versions/${core.url.encodePathParam(versionID)}`),
152
204
  method: "GET",
153
205
  headers: _headers,
154
206
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -159,36 +211,52 @@ class NewTemplateVersionsClient {
159
211
  logging: this._options.logging,
160
212
  });
161
213
  if (_response.ok) {
162
- return { data: undefined, rawResponse: _response.rawResponse };
214
+ return {
215
+ data: serializers.TemplateVersion.parseOrThrow(_response.body, {
216
+ unrecognizedObjectKeys: "passthrough",
217
+ allowUnrecognizedUnionMembers: true,
218
+ allowUnrecognizedEnumValues: true,
219
+ skipValidation: true,
220
+ breadcrumbsPrefix: ["response"],
221
+ }),
222
+ rawResponse: _response.rawResponse,
223
+ };
163
224
  }
164
225
  if (_response.error.reason === "status-code") {
165
- throw new errors.CortiError({
166
- statusCode: _response.error.statusCode,
167
- body: _response.error.body,
168
- rawResponse: _response.rawResponse,
169
- });
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
+ }
170
236
  }
171
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/alpha/templates/{templateId}/versions/{versionID}");
237
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/alpha/templates/{templateID}/versions/{versionID}");
172
238
  });
173
239
  }
174
240
  /**
175
- * @param {string} templateId
241
+ * @param {string} templateID
176
242
  * @param {string} versionID
177
- * @param {NewTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
243
+ * @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
244
+ *
245
+ * @throws {@link Corti.NotFoundError}
178
246
  *
179
247
  * @example
180
- * await client.newTemplateVersions.delete("templateId", "versionID")
248
+ * await client.alphaTemplateVersions.delete("templateID", "versionID")
181
249
  */
182
- delete(templateId, versionID, requestOptions) {
183
- return core.HttpResponsePromise.fromPromise(this.__delete(templateId, versionID, requestOptions));
250
+ delete(templateID, versionID, requestOptions) {
251
+ return core.HttpResponsePromise.fromPromise(this.__delete(templateID, versionID, requestOptions));
184
252
  }
185
- __delete(templateId, versionID, requestOptions) {
253
+ __delete(templateID, versionID, requestOptions) {
186
254
  return __awaiter(this, void 0, void 0, function* () {
187
255
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
188
256
  const _authRequest = yield this._options.authProvider.getAuthRequest();
189
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);
190
258
  const _response = yield core.fetcher({
191
- url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment)).base, `alpha/templates/${core.url.encodePathParam(templateId)}/versions/${core.url.encodePathParam(versionID)}`),
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, `alpha/templates/${core.url.encodePathParam(templateID)}/versions/${core.url.encodePathParam(versionID)}`),
192
260
  method: "DELETE",
193
261
  headers: _headers,
194
262
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -202,33 +270,42 @@ class NewTemplateVersionsClient {
202
270
  return { data: undefined, rawResponse: _response.rawResponse };
203
271
  }
204
272
  if (_response.error.reason === "status-code") {
205
- throw new errors.CortiError({
206
- statusCode: _response.error.statusCode,
207
- body: _response.error.body,
208
- rawResponse: _response.rawResponse,
209
- });
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
+ }
210
283
  }
211
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/alpha/templates/{templateId}/versions/{versionID}");
284
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/alpha/templates/{templateID}/versions/{versionID}");
212
285
  });
213
286
  }
214
287
  /**
215
- * @param {string} templateId
288
+ * Sets this version as the published version of the template.
289
+ *
290
+ * @param {string} templateID
216
291
  * @param {string} versionID
217
- * @param {NewTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
292
+ * @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
293
+ *
294
+ * @throws {@link Corti.NotFoundError}
218
295
  *
219
296
  * @example
220
- * await client.newTemplateVersions.publish("templateId", "versionID")
297
+ * await client.alphaTemplateVersions.publish("templateID", "versionID")
221
298
  */
222
- publish(templateId, versionID, requestOptions) {
223
- return core.HttpResponsePromise.fromPromise(this.__publish(templateId, versionID, requestOptions));
299
+ publish(templateID, versionID, requestOptions) {
300
+ return core.HttpResponsePromise.fromPromise(this.__publish(templateID, versionID, requestOptions));
224
301
  }
225
- __publish(templateId, versionID, requestOptions) {
302
+ __publish(templateID, versionID, requestOptions) {
226
303
  return __awaiter(this, void 0, void 0, function* () {
227
304
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
228
305
  const _authRequest = yield this._options.authProvider.getAuthRequest();
229
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);
230
307
  const _response = yield core.fetcher({
231
- url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment)).base, `alpha/templates/${core.url.encodePathParam(templateId)}/versions/${core.url.encodePathParam(versionID)}/publish`),
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, `alpha/templates/${core.url.encodePathParam(templateID)}/versions/${core.url.encodePathParam(versionID)}/publish`),
232
309
  method: "POST",
233
310
  headers: _headers,
234
311
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -239,17 +316,31 @@ class NewTemplateVersionsClient {
239
316
  logging: this._options.logging,
240
317
  });
241
318
  if (_response.ok) {
242
- return { data: undefined, rawResponse: _response.rawResponse };
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
+ };
243
329
  }
244
330
  if (_response.error.reason === "status-code") {
245
- throw new errors.CortiError({
246
- statusCode: _response.error.statusCode,
247
- body: _response.error.body,
248
- rawResponse: _response.rawResponse,
249
- });
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
+ }
250
341
  }
251
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/alpha/templates/{templateId}/versions/{versionID}/publish");
342
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/alpha/templates/{templateID}/versions/{versionID}/publish");
252
343
  });
253
344
  }
254
345
  }
255
- exports.NewTemplateVersionsClient = NewTemplateVersionsClient;
346
+ exports.AlphaTemplateVersionsClient = AlphaTemplateVersionsClient;
@@ -0,0 +1,14 @@
1
+ import type * as Corti from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * generation: {
6
+ * instructions: {
7
+ * prompt: "prompt"
8
+ * }
9
+ * }
10
+ * }
11
+ */
12
+ export interface CreateTemplateVersionRequest {
13
+ generation: Corti.CreateTemplateVersionRequestGeneration;
14
+ }
@@ -0,0 +1 @@
1
+ export type { CreateTemplateVersionRequest } from "./CreateTemplateVersionRequest.js";
@@ -0,0 +1,5 @@
1
+ import type * as Corti from "../../../index.js";
2
+ export interface CreateTemplateVersionRequestGeneration {
3
+ instructions: Corti.TemplateInstructions;
4
+ sections?: Corti.TemplateVersionSectionRequest[];
5
+ }
@@ -0,0 +1 @@
1
+ export * from "./CreateTemplateVersionRequestGeneration.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("./CreateTemplateVersionRequestGeneration.js"), exports);
@@ -0,0 +1,76 @@
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 AlphaTemplatesClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class AlphaTemplatesClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<AlphaTemplatesClient.Options>;
12
+ constructor(options: AlphaTemplatesClient.Options);
13
+ /**
14
+ * @param {Corti.ListAlphaTemplatesRequest} request
15
+ * @param {AlphaTemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
16
+ *
17
+ * @example
18
+ * await client.alphaTemplates.list()
19
+ */
20
+ list(request?: Corti.ListAlphaTemplatesRequest, requestOptions?: AlphaTemplatesClient.RequestOptions): core.HttpResponsePromise<Corti.Template[]>;
21
+ private __list;
22
+ /**
23
+ * @param {Corti.CreateTemplateRequest} request
24
+ * @param {AlphaTemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
25
+ *
26
+ * @throws {@link Corti.BadRequestError}
27
+ *
28
+ * @example
29
+ * await client.alphaTemplates.create({
30
+ * name: "name",
31
+ * language: "language",
32
+ * generation: {
33
+ * instructions: {
34
+ * prompt: "prompt"
35
+ * }
36
+ * }
37
+ * })
38
+ */
39
+ create(request: Corti.CreateTemplateRequest, requestOptions?: AlphaTemplatesClient.RequestOptions): core.HttpResponsePromise<Corti.Template>;
40
+ private __create;
41
+ /**
42
+ * @param {string} templateID
43
+ * @param {AlphaTemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
44
+ *
45
+ * @throws {@link Corti.NotFoundError}
46
+ *
47
+ * @example
48
+ * await client.alphaTemplates.get("templateID")
49
+ */
50
+ get(templateID: string, requestOptions?: AlphaTemplatesClient.RequestOptions): core.HttpResponsePromise<Corti.Template>;
51
+ private __get;
52
+ /**
53
+ * @param {string} templateID
54
+ * @param {AlphaTemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
55
+ *
56
+ * @throws {@link Corti.NotFoundError}
57
+ *
58
+ * @example
59
+ * await client.alphaTemplates.delete("templateID")
60
+ */
61
+ delete(templateID: string, requestOptions?: AlphaTemplatesClient.RequestOptions): core.HttpResponsePromise<void>;
62
+ private __delete;
63
+ /**
64
+ * @param {string} templateID
65
+ * @param {Corti.UpdateTemplateRequest} request
66
+ * @param {AlphaTemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
67
+ *
68
+ * @throws {@link Corti.BadRequestError}
69
+ * @throws {@link Corti.NotFoundError}
70
+ *
71
+ * @example
72
+ * await client.alphaTemplates.update("templateID")
73
+ */
74
+ update(templateID: string, request?: Corti.UpdateTemplateRequest, requestOptions?: AlphaTemplatesClient.RequestOptions): core.HttpResponsePromise<Corti.Template>;
75
+ private __update;
76
+ }