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