@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.
- package/dist/cjs/BaseClient.d.ts +2 -2
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +12 -12
- package/dist/cjs/Client.js +22 -22
- package/dist/cjs/api/resources/{newSectionVersions → alphaSectionVersions}/client/Client.d.ts +19 -19
- package/dist/cjs/api/resources/{newSectionVersions → alphaSectionVersions}/client/Client.js +14 -14
- package/dist/cjs/api/resources/{newSections → alphaSections}/client/Client.d.ts +20 -20
- package/dist/cjs/api/resources/{newSections → alphaSections}/client/Client.js +15 -15
- package/dist/cjs/api/resources/{newSections/client/requests/ListNewSectionsRequest.d.ts → alphaSections/client/requests/ListAlphaSectionsRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/{newSections → alphaSections}/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/alphaTemplateVersions/client/Client.d.ts +81 -0
- package/dist/cjs/api/resources/{newTemplateVersions → alphaTemplateVersions}/client/Client.js +163 -72
- package/dist/cjs/api/resources/alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.d.ts +14 -0
- package/dist/cjs/api/resources/alphaTemplateVersions/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.d.ts +5 -0
- package/dist/cjs/api/resources/alphaTemplateVersions/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/alphaTemplateVersions/types/index.js +17 -0
- package/dist/cjs/api/resources/alphaTemplates/client/Client.d.ts +76 -0
- package/dist/cjs/api/resources/{newTemplates → alphaTemplates}/client/Client.js +100 -51
- package/dist/cjs/api/resources/alphaTemplates/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/alphaTemplates/client/index.js +17 -0
- package/dist/cjs/api/resources/{newTemplates/client/requests/ListNewTemplatesRequest.d.ts → alphaTemplates/client/requests/ListAlphaTemplatesRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/alphaTemplates/client/requests/ListAlphaTemplatesRequest.js +3 -0
- package/dist/cjs/api/resources/alphaTemplates/client/requests/UpdateTemplateRequest.d.ts +10 -0
- package/dist/cjs/api/resources/alphaTemplates/client/requests/UpdateTemplateRequest.js +3 -0
- package/dist/cjs/api/resources/alphaTemplates/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/alphaTemplates/types/CreateTemplateRequestGeneration.js +3 -0
- package/dist/cjs/api/resources/index.d.ts +9 -7
- package/dist/cjs/api/resources/index.js +10 -8
- package/dist/cjs/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/list.d.ts +1 -1
- package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/list.d.ts +1 -1
- package/dist/cjs/serialization/resources/alphaTemplateVersions/client/list.d.ts +8 -0
- package/dist/cjs/serialization/resources/alphaTemplateVersions/client/list.js +40 -0
- package/dist/cjs/serialization/resources/alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.d.ts +10 -0
- package/dist/cjs/serialization/resources/alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.js +42 -0
- package/dist/cjs/serialization/resources/alphaTemplateVersions/client/requests/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/alphaTemplateVersions/client/requests/index.js +5 -0
- package/dist/cjs/serialization/resources/alphaTemplateVersions/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/alphaTemplateVersions/index.js +18 -0
- package/dist/cjs/serialization/resources/alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.d.ts +12 -0
- package/dist/cjs/serialization/resources/alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.js +44 -0
- package/dist/cjs/serialization/resources/alphaTemplateVersions/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/alphaTemplateVersions/types/index.js +17 -0
- package/dist/cjs/serialization/resources/alphaTemplates/client/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/alphaTemplates/client/index.js +41 -0
- package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/client/list.d.ts +1 -1
- package/dist/cjs/serialization/resources/alphaTemplates/client/requests/UpdateTemplateRequest.d.ts +12 -0
- package/dist/cjs/serialization/resources/alphaTemplates/client/requests/UpdateTemplateRequest.js +44 -0
- package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/client/requests/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/client/requests/index.js +3 -1
- package/dist/cjs/serialization/resources/alphaTemplates/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/alphaTemplates/index.js +18 -0
- package/dist/cjs/serialization/resources/index.d.ts +9 -6
- package/dist/cjs/serialization/resources/index.js +10 -7
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +2 -2
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +12 -12
- package/dist/esm/Client.mjs +12 -12
- package/dist/esm/api/resources/{newSectionVersions → alphaSectionVersions}/client/Client.d.mts +19 -19
- package/dist/esm/api/resources/{newSectionVersions → alphaSectionVersions}/client/Client.mjs +12 -12
- package/dist/esm/api/resources/{newSections → alphaSections}/client/Client.d.mts +20 -20
- package/dist/esm/api/resources/{newSections → alphaSections}/client/Client.mjs +13 -13
- package/dist/esm/api/resources/{newSections/client/requests/ListNewSectionsRequest.d.mts → alphaSections/client/requests/ListAlphaSectionsRequest.d.mts} +1 -1
- package/dist/esm/api/resources/{newSections → alphaSections}/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/alphaTemplateVersions/client/Client.d.mts +81 -0
- package/dist/esm/api/resources/{newTemplateVersions → alphaTemplateVersions}/client/Client.mjs +161 -70
- package/dist/esm/api/resources/alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.d.mts +14 -0
- package/dist/esm/api/resources/alphaTemplateVersions/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.d.mts +5 -0
- package/dist/esm/api/resources/alphaTemplateVersions/types/index.d.mts +1 -0
- package/dist/esm/api/resources/alphaTemplateVersions/types/index.mjs +1 -0
- package/dist/esm/api/resources/alphaTemplates/client/Client.d.mts +76 -0
- package/dist/esm/api/resources/{newTemplates → alphaTemplates}/client/Client.mjs +98 -49
- package/dist/esm/api/resources/alphaTemplates/client/index.d.mts +1 -0
- package/dist/esm/api/resources/alphaTemplates/client/index.mjs +1 -0
- package/dist/esm/api/resources/{newTemplates/client/requests/ListNewTemplatesRequest.d.mts → alphaTemplates/client/requests/ListAlphaTemplatesRequest.d.mts} +1 -1
- package/dist/esm/api/resources/alphaTemplates/client/requests/ListAlphaTemplatesRequest.mjs +2 -0
- package/dist/esm/api/resources/alphaTemplates/client/requests/UpdateTemplateRequest.d.mts +10 -0
- package/dist/esm/api/resources/alphaTemplates/client/requests/UpdateTemplateRequest.mjs +2 -0
- package/dist/esm/api/resources/alphaTemplates/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/alphaTemplates/types/CreateTemplateRequestGeneration.mjs +2 -0
- package/dist/esm/api/resources/index.d.mts +9 -7
- package/dist/esm/api/resources/index.mjs +9 -7
- package/dist/esm/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/list.d.mts +1 -1
- package/dist/esm/serialization/resources/{newSections → alphaSections}/client/list.d.mts +1 -1
- package/dist/esm/serialization/resources/alphaTemplateVersions/client/list.d.mts +8 -0
- package/dist/esm/serialization/resources/alphaTemplateVersions/client/list.mjs +4 -0
- package/dist/esm/serialization/resources/alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.d.mts +10 -0
- package/dist/esm/serialization/resources/alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.mjs +6 -0
- package/dist/esm/serialization/resources/alphaTemplateVersions/client/requests/index.d.mts +1 -0
- package/dist/esm/serialization/resources/alphaTemplateVersions/client/requests/index.mjs +1 -0
- package/dist/esm/serialization/resources/alphaTemplateVersions/index.d.mts +2 -0
- package/dist/esm/serialization/resources/alphaTemplateVersions/index.mjs +2 -0
- package/dist/esm/serialization/resources/alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.d.mts +12 -0
- package/dist/esm/serialization/resources/alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.mjs +8 -0
- package/dist/esm/serialization/resources/alphaTemplateVersions/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/alphaTemplateVersions/types/index.mjs +1 -0
- package/dist/esm/serialization/resources/alphaTemplates/client/index.d.mts +2 -0
- package/dist/esm/serialization/resources/alphaTemplates/client/index.mjs +2 -0
- package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/client/list.d.mts +1 -1
- package/dist/esm/serialization/resources/alphaTemplates/client/requests/UpdateTemplateRequest.d.mts +12 -0
- package/dist/esm/serialization/resources/alphaTemplates/client/requests/UpdateTemplateRequest.mjs +8 -0
- package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/client/requests/index.d.mts +1 -0
- package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/client/requests/index.mjs +1 -0
- package/dist/esm/serialization/resources/alphaTemplates/index.d.mts +2 -0
- package/dist/esm/serialization/resources/alphaTemplates/index.mjs +2 -0
- package/dist/esm/serialization/resources/index.d.mts +9 -6
- package/dist/esm/serialization/resources/index.mjs +9 -6
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -4
- package/dist/cjs/api/resources/newTemplateVersions/client/Client.d.ts +0 -60
- package/dist/cjs/api/resources/newTemplateVersions/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/newTemplates/client/Client.d.ts +0 -68
- package/dist/cjs/api/resources/newTemplates/client/requests/index.d.ts +0 -2
- package/dist/cjs/serialization/resources/newSections/index.d.ts +0 -1
- package/dist/cjs/serialization/resources/newSections/index.js +0 -17
- package/dist/esm/api/resources/newTemplateVersions/client/Client.d.mts +0 -60
- package/dist/esm/api/resources/newTemplateVersions/client/index.d.mts +0 -1
- package/dist/esm/api/resources/newTemplates/client/Client.d.mts +0 -68
- package/dist/esm/api/resources/newTemplates/client/requests/index.d.mts +0 -2
- package/dist/esm/serialization/resources/newSections/index.d.mts +0 -1
- package/dist/esm/serialization/resources/newSections/index.mjs +0 -1
- /package/dist/cjs/api/resources/{newSectionVersions → alphaSectionVersions}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{newSectionVersions → alphaSectionVersions}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{newSectionVersions → alphaSectionVersions}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{newSectionVersions → alphaSectionVersions}/index.js +0 -0
- /package/dist/cjs/api/resources/{newSections → alphaSections}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{newSections → alphaSections}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.js +0 -0
- /package/dist/cjs/api/resources/{newSections/client/requests/ListNewSectionsRequest.js → alphaSections/client/requests/ListAlphaSectionsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.js +0 -0
- /package/dist/cjs/api/resources/{newSections → alphaSections}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{newSections → alphaSections}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{newSections → alphaSections}/index.js +0 -0
- /package/dist/cjs/api/resources/{newTemplates → alphaTemplateVersions}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{newTemplates → alphaTemplateVersions}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{newTemplates/client/requests/CreateTemplateRequest.js → alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.js} +0 -0
- /package/dist/cjs/api/resources/{newTemplateVersions/client → alphaTemplateVersions/client/requests}/index.js +0 -0
- /package/dist/cjs/api/resources/{newTemplates → alphaTemplateVersions}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{newTemplates → alphaTemplateVersions}/index.js +0 -0
- /package/dist/cjs/api/resources/{newTemplates/client/requests/ListNewTemplatesRequest.js → alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.js} +0 -0
- /package/dist/cjs/api/resources/{newTemplates → alphaTemplates}/client/requests/CreateTemplateRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/{newTemplates/types/CreateTemplateRequestGeneration.js → alphaTemplates/client/requests/CreateTemplateRequest.js} +0 -0
- /package/dist/cjs/api/resources/{newTemplates → alphaTemplates}/client/requests/index.js +0 -0
- /package/dist/cjs/{serialization/resources/newTemplates → api/resources/alphaTemplates}/index.d.ts +0 -0
- /package/dist/cjs/{serialization/resources/newTemplates → api/resources/alphaTemplates}/index.js +0 -0
- /package/dist/cjs/api/resources/{newTemplates → alphaTemplates}/types/CreateTemplateRequestGeneration.d.ts +0 -0
- /package/dist/cjs/api/resources/{newTemplates → alphaTemplates}/types/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{newTemplates → alphaTemplates}/types/index.js +0 -0
- /package/dist/cjs/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/index.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/index.js +0 -0
- /package/dist/cjs/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/list.js +0 -0
- /package/dist/cjs/{api/resources/newTemplateVersions → serialization/resources/alphaSectionVersions}/index.d.ts +0 -0
- /package/dist/cjs/{api/resources/newTemplateVersions → serialization/resources/alphaSectionVersions}/index.js +0 -0
- /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/index.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/index.js +0 -0
- /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/list.js +0 -0
- /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.js +0 -0
- /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.js +0 -0
- /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/requests/index.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{newSections → alphaSections}/client/requests/index.js +0 -0
- /package/dist/cjs/serialization/resources/{newSectionVersions → alphaSections}/index.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{newSectionVersions → alphaSections}/index.js +0 -0
- /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplateVersions}/client/index.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplateVersions}/client/index.js +0 -0
- /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/client/list.js +0 -0
- /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/client/requests/CreateTemplateRequest.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/client/requests/CreateTemplateRequest.js +0 -0
- /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/types/CreateTemplateRequestGeneration.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/types/CreateTemplateRequestGeneration.js +0 -0
- /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/types/index.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{newTemplates → alphaTemplates}/types/index.js +0 -0
- /package/dist/esm/api/resources/{newSectionVersions → alphaSectionVersions}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{newSectionVersions → alphaSectionVersions}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{newSectionVersions → alphaSectionVersions}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{newSectionVersions → alphaSectionVersions}/index.mjs +0 -0
- /package/dist/esm/api/resources/{newSections → alphaSections}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{newSections → alphaSections}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.d.mts +0 -0
- /package/dist/esm/api/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.mjs +0 -0
- /package/dist/esm/api/resources/{newSections/client/requests/ListNewSectionsRequest.mjs → alphaSections/client/requests/ListAlphaSectionsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.d.mts +0 -0
- /package/dist/esm/api/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.mjs +0 -0
- /package/dist/esm/api/resources/{newSections → alphaSections}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{newSections → alphaSections}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{newSections → alphaSections}/index.mjs +0 -0
- /package/dist/esm/api/resources/{newTemplates → alphaTemplateVersions}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{newTemplates → alphaTemplateVersions}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{newTemplates/client/requests/CreateTemplateRequest.mjs → alphaTemplateVersions/client/requests/CreateTemplateVersionRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{newTemplateVersions/client → alphaTemplateVersions/client/requests}/index.mjs +0 -0
- /package/dist/esm/api/resources/{newTemplates → alphaTemplateVersions}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{newTemplates → alphaTemplateVersions}/index.mjs +0 -0
- /package/dist/esm/api/resources/{newTemplates/client/requests/ListNewTemplatesRequest.mjs → alphaTemplateVersions/types/CreateTemplateVersionRequestGeneration.mjs} +0 -0
- /package/dist/esm/api/resources/{newTemplates → alphaTemplates}/client/requests/CreateTemplateRequest.d.mts +0 -0
- /package/dist/esm/api/resources/{newTemplates/types/CreateTemplateRequestGeneration.mjs → alphaTemplates/client/requests/CreateTemplateRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{newTemplates → alphaTemplates}/client/requests/index.mjs +0 -0
- /package/dist/esm/{serialization/resources/newTemplates → api/resources/alphaTemplates}/index.d.mts +0 -0
- /package/dist/esm/{serialization/resources/newTemplates → api/resources/alphaTemplates}/index.mjs +0 -0
- /package/dist/esm/api/resources/{newTemplates → alphaTemplates}/types/CreateTemplateRequestGeneration.d.mts +0 -0
- /package/dist/esm/api/resources/{newTemplates → alphaTemplates}/types/index.d.mts +0 -0
- /package/dist/esm/api/resources/{newTemplates → alphaTemplates}/types/index.mjs +0 -0
- /package/dist/esm/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/index.d.mts +0 -0
- /package/dist/esm/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/index.mjs +0 -0
- /package/dist/esm/serialization/resources/{newSectionVersions → alphaSectionVersions}/client/list.mjs +0 -0
- /package/dist/esm/{api/resources/newTemplateVersions → serialization/resources/alphaSectionVersions}/index.d.mts +0 -0
- /package/dist/esm/{api/resources/newTemplateVersions → serialization/resources/alphaSectionVersions}/index.mjs +0 -0
- /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/index.d.mts +0 -0
- /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/index.mjs +0 -0
- /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/list.mjs +0 -0
- /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.d.mts +0 -0
- /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/requests/CreateSectionRequest.mjs +0 -0
- /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.d.mts +0 -0
- /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/requests/UpdateSectionRequest.mjs +0 -0
- /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/requests/index.d.mts +0 -0
- /package/dist/esm/serialization/resources/{newSections → alphaSections}/client/requests/index.mjs +0 -0
- /package/dist/esm/serialization/resources/{newSectionVersions → alphaSections}/index.d.mts +0 -0
- /package/dist/esm/serialization/resources/{newSectionVersions → alphaSections}/index.mjs +0 -0
- /package/dist/esm/serialization/resources/{newTemplates → alphaTemplateVersions}/client/index.d.mts +0 -0
- /package/dist/esm/serialization/resources/{newTemplates → alphaTemplateVersions}/client/index.mjs +0 -0
- /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/client/list.mjs +0 -0
- /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/client/requests/CreateTemplateRequest.d.mts +0 -0
- /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/client/requests/CreateTemplateRequest.mjs +0 -0
- /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/types/CreateTemplateRequestGeneration.d.mts +0 -0
- /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/types/CreateTemplateRequestGeneration.mjs +0 -0
- /package/dist/esm/serialization/resources/{newTemplates → alphaTemplates}/types/index.d.mts +0 -0
- /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
|
|
5
|
+
export declare namespace AlphaSectionsClient {
|
|
6
6
|
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
export declare class
|
|
11
|
-
protected readonly _options: NormalizedClientOptionsWithAuth<
|
|
12
|
-
constructor(options:
|
|
10
|
+
export declare class AlphaSectionsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<AlphaSectionsClient.Options>;
|
|
12
|
+
constructor(options: AlphaSectionsClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
* @param {Corti.
|
|
15
|
-
* @param {
|
|
14
|
+
* @param {Corti.ListAlphaSectionsRequest} request
|
|
15
|
+
* @param {AlphaSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
|
-
* await client.
|
|
18
|
+
* await client.alphaSections.list()
|
|
19
19
|
*/
|
|
20
|
-
list(request?: Corti.
|
|
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 {
|
|
24
|
+
* @param {AlphaSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
25
|
*
|
|
26
26
|
* @throws {@link Corti.BadRequestError}
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
|
-
* await client.
|
|
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?:
|
|
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 {
|
|
48
|
+
* @param {AlphaSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
49
49
|
*
|
|
50
50
|
* @throws {@link Corti.NotFoundError}
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
|
-
* await client.
|
|
53
|
+
* await client.alphaSections.get("sectionID")
|
|
54
54
|
*/
|
|
55
|
-
get(sectionID: string, requestOptions?:
|
|
55
|
+
get(sectionID: string, requestOptions?: AlphaSectionsClient.RequestOptions): core.HttpResponsePromise<Corti.Section>;
|
|
56
56
|
private __get;
|
|
57
57
|
/**
|
|
58
58
|
* @param {string} sectionID
|
|
59
|
-
* @param {
|
|
59
|
+
* @param {AlphaSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
60
|
*
|
|
61
61
|
* @throws {@link Corti.NotFoundError}
|
|
62
62
|
*
|
|
63
63
|
* @example
|
|
64
|
-
* await client.
|
|
64
|
+
* await client.alphaSections.delete("sectionID")
|
|
65
65
|
*/
|
|
66
|
-
delete(sectionID: string, requestOptions?:
|
|
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 {
|
|
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.
|
|
77
|
+
* await client.alphaSections.update("sectionID")
|
|
78
78
|
*/
|
|
79
|
-
update(sectionID: string, request?: Corti.UpdateSectionRequest, requestOptions?:
|
|
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
|
|
18
|
+
export class AlphaSectionsClient {
|
|
19
19
|
constructor(options) {
|
|
20
20
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* @param {Corti.
|
|
24
|
-
* @param {
|
|
23
|
+
* @param {Corti.ListAlphaSectionsRequest} request
|
|
24
|
+
* @param {AlphaSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
|
-
* await client.
|
|
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.
|
|
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 {
|
|
78
|
+
* @param {AlphaSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
79
|
*
|
|
80
80
|
* @throws {@link Corti.BadRequestError}
|
|
81
81
|
*
|
|
82
82
|
* @example
|
|
83
|
-
* await client.
|
|
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 {
|
|
152
|
+
* @param {AlphaSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
153
153
|
*
|
|
154
154
|
* @throws {@link Corti.NotFoundError}
|
|
155
155
|
*
|
|
156
156
|
* @example
|
|
157
|
-
* await client.
|
|
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 {
|
|
207
|
+
* @param {AlphaSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
208
208
|
*
|
|
209
209
|
* @throws {@link Corti.NotFoundError}
|
|
210
210
|
*
|
|
211
211
|
* @example
|
|
212
|
-
* await client.
|
|
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 {
|
|
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.
|
|
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
|
|
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 {
|
|
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
|
+
}
|
package/dist/esm/api/resources/{newTemplateVersions → alphaTemplateVersions}/client/Client.mjs
RENAMED
|
@@ -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
|
-
|
|
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}
|
|
22
|
-
* @param {
|
|
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.
|
|
29
|
+
* await client.alphaTemplateVersions.list("templateID")
|
|
26
30
|
*/
|
|
27
|
-
list(
|
|
28
|
-
return core.HttpResponsePromise.fromPromise(this.__list(
|
|
31
|
+
list(templateID, requestOptions) {
|
|
32
|
+
return core.HttpResponsePromise.fromPromise(this.__list(templateID, requestOptions));
|
|
29
33
|
}
|
|
30
|
-
__list(
|
|
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(
|
|
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 {
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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/{
|
|
74
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/alpha/templates/{templateID}/versions");
|
|
57
75
|
});
|
|
58
76
|
}
|
|
59
77
|
/**
|
|
60
|
-
* @param {string}
|
|
61
|
-
* @param {
|
|
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.
|
|
86
|
+
* await client.alphaTemplateVersions.create("templateID", {
|
|
87
|
+
* generation: {
|
|
88
|
+
* instructions: {
|
|
89
|
+
* prompt: "prompt"
|
|
90
|
+
* }
|
|
91
|
+
* }
|
|
92
|
+
* })
|
|
65
93
|
*/
|
|
66
|
-
create(
|
|
67
|
-
return core.HttpResponsePromise.fromPromise(this.__create(
|
|
94
|
+
create(templateID, request, requestOptions) {
|
|
95
|
+
return core.HttpResponsePromise.fromPromise(this.__create(templateID, request, requestOptions));
|
|
68
96
|
}
|
|
69
|
-
__create(
|
|
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(
|
|
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 {
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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/{
|
|
145
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/alpha/templates/{templateID}/versions");
|
|
96
146
|
});
|
|
97
147
|
}
|
|
98
148
|
/**
|
|
99
|
-
* @param {string}
|
|
149
|
+
* @param {string} templateID
|
|
100
150
|
* @param {string} versionID
|
|
101
|
-
* @param {
|
|
151
|
+
* @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
152
|
+
*
|
|
153
|
+
* @throws {@link Corti.NotFoundError}
|
|
102
154
|
*
|
|
103
155
|
* @example
|
|
104
|
-
* await client.
|
|
156
|
+
* await client.alphaTemplateVersions.get("templateID", "versionID")
|
|
105
157
|
*/
|
|
106
|
-
get(
|
|
107
|
-
return core.HttpResponsePromise.fromPromise(this.__get(
|
|
158
|
+
get(templateID, versionID, requestOptions) {
|
|
159
|
+
return core.HttpResponsePromise.fromPromise(this.__get(templateID, versionID, requestOptions));
|
|
108
160
|
}
|
|
109
|
-
__get(
|
|
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(
|
|
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 {
|
|
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
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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/{
|
|
201
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/alpha/templates/{templateID}/versions/{versionID}");
|
|
136
202
|
});
|
|
137
203
|
}
|
|
138
204
|
/**
|
|
139
|
-
* @param {string}
|
|
205
|
+
* @param {string} templateID
|
|
140
206
|
* @param {string} versionID
|
|
141
|
-
* @param {
|
|
207
|
+
* @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
208
|
+
*
|
|
209
|
+
* @throws {@link Corti.NotFoundError}
|
|
142
210
|
*
|
|
143
211
|
* @example
|
|
144
|
-
* await client.
|
|
212
|
+
* await client.alphaTemplateVersions.delete("templateID", "versionID")
|
|
145
213
|
*/
|
|
146
|
-
delete(
|
|
147
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(
|
|
214
|
+
delete(templateID, versionID, requestOptions) {
|
|
215
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(templateID, versionID, requestOptions));
|
|
148
216
|
}
|
|
149
|
-
__delete(
|
|
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(
|
|
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
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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/{
|
|
248
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/alpha/templates/{templateID}/versions/{versionID}");
|
|
176
249
|
});
|
|
177
250
|
}
|
|
178
251
|
/**
|
|
179
|
-
*
|
|
252
|
+
* Sets this version as the published version of the template.
|
|
253
|
+
*
|
|
254
|
+
* @param {string} templateID
|
|
180
255
|
* @param {string} versionID
|
|
181
|
-
* @param {
|
|
256
|
+
* @param {AlphaTemplateVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
257
|
+
*
|
|
258
|
+
* @throws {@link Corti.NotFoundError}
|
|
182
259
|
*
|
|
183
260
|
* @example
|
|
184
|
-
* await client.
|
|
261
|
+
* await client.alphaTemplateVersions.publish("templateID", "versionID")
|
|
185
262
|
*/
|
|
186
|
-
publish(
|
|
187
|
-
return core.HttpResponsePromise.fromPromise(this.__publish(
|
|
263
|
+
publish(templateID, versionID, requestOptions) {
|
|
264
|
+
return core.HttpResponsePromise.fromPromise(this.__publish(templateID, versionID, requestOptions));
|
|
188
265
|
}
|
|
189
|
-
__publish(
|
|
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(
|
|
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 {
|
|
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
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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/{
|
|
306
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/alpha/templates/{templateID}/versions/{versionID}/publish");
|
|
216
307
|
});
|
|
217
308
|
}
|
|
218
309
|
}
|