@corti/sdk 1.2.0 → 2.0.0-templates
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 -0
- package/dist/cjs/Client.js +30 -10
- package/dist/cjs/api/resources/index.d.ts +7 -0
- package/dist/cjs/api/resources/index.js +8 -1
- package/dist/cjs/api/resources/newSectionVersions/client/Client.d.ts +84 -0
- package/dist/cjs/api/resources/newSectionVersions/client/Client.js +349 -0
- package/dist/cjs/api/resources/newSectionVersions/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/newSectionVersions/client/index.js +2 -0
- package/dist/cjs/api/resources/newSectionVersions/index.d.ts +1 -0
- package/dist/cjs/api/resources/newSectionVersions/index.js +17 -0
- package/dist/cjs/api/resources/newSections/client/Client.d.ts +81 -0
- package/dist/cjs/api/resources/newSections/client/Client.js +353 -0
- package/dist/cjs/api/resources/newSections/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/newSections/client/index.js +17 -0
- package/dist/cjs/api/resources/newSections/client/requests/CreateSectionRequest.d.ts +33 -0
- package/dist/cjs/api/resources/newSections/client/requests/CreateSectionRequest.js +3 -0
- package/dist/cjs/api/resources/newSections/client/requests/ListNewSectionsRequest.d.ts +12 -0
- package/dist/cjs/api/resources/newSections/client/requests/ListNewSectionsRequest.js +3 -0
- package/dist/cjs/api/resources/newSections/client/requests/UpdateSectionRequest.d.ts +10 -0
- package/dist/cjs/api/resources/newSections/client/requests/UpdateSectionRequest.js +3 -0
- package/dist/cjs/api/resources/newSections/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/newSections/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/newSections/index.d.ts +1 -0
- package/dist/cjs/api/resources/newSections/index.js +17 -0
- package/dist/cjs/api/resources/newTemplateVersions/client/Client.d.ts +60 -0
- package/dist/cjs/api/resources/newTemplateVersions/client/Client.js +255 -0
- package/dist/cjs/api/resources/newTemplateVersions/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/newTemplateVersions/client/index.js +2 -0
- package/dist/cjs/api/resources/newTemplateVersions/index.d.ts +1 -0
- package/dist/cjs/api/resources/newTemplateVersions/index.js +17 -0
- package/dist/cjs/api/resources/newTemplates/client/Client.d.ts +68 -0
- package/dist/cjs/api/resources/newTemplates/client/Client.js +299 -0
- package/dist/cjs/api/resources/newTemplates/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/newTemplates/client/index.js +17 -0
- package/dist/cjs/api/resources/newTemplates/client/requests/CreateTemplateRequest.d.ts +28 -0
- package/dist/cjs/api/resources/newTemplates/client/requests/CreateTemplateRequest.js +3 -0
- package/dist/cjs/api/resources/newTemplates/client/requests/ListNewTemplatesRequest.d.ts +12 -0
- package/dist/cjs/api/resources/newTemplates/client/requests/ListNewTemplatesRequest.js +3 -0
- package/dist/cjs/api/resources/newTemplates/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/newTemplates/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/newTemplates/index.d.ts +2 -0
- package/dist/cjs/api/resources/newTemplates/index.js +18 -0
- package/dist/cjs/api/resources/newTemplates/types/CreateTemplateRequestGeneration.d.ts +5 -0
- package/dist/cjs/api/resources/newTemplates/types/CreateTemplateRequestGeneration.js +3 -0
- package/dist/cjs/api/resources/newTemplates/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/newTemplates/types/index.js +17 -0
- package/dist/cjs/api/types/BoolNode.d.ts +7 -0
- package/dist/cjs/api/types/BoolNode.js +3 -0
- package/dist/cjs/api/types/DictNode.d.ts +12 -0
- package/dist/cjs/api/types/DictNode.js +3 -0
- package/dist/cjs/api/types/FieldDefinition.d.ts +8 -0
- package/dist/cjs/api/types/FieldDefinition.js +3 -0
- package/dist/cjs/api/types/FloatNode.d.ts +13 -0
- package/dist/cjs/api/types/FloatNode.js +3 -0
- package/dist/cjs/api/types/IntegerNode.d.ts +13 -0
- package/dist/cjs/api/types/IntegerNode.js +3 -0
- package/dist/cjs/api/types/ListNode.d.ts +13 -0
- package/dist/cjs/api/types/ListNode.js +3 -0
- package/dist/cjs/api/types/OutputSchema.d.ts +2 -0
- package/dist/cjs/api/types/OutputSchema.js +3 -0
- package/dist/cjs/api/types/Section.d.ts +23 -0
- package/dist/cjs/api/types/Section.js +3 -0
- package/dist/cjs/api/types/SectionGeneration.d.ts +8 -0
- package/dist/cjs/api/types/SectionGeneration.js +3 -0
- package/dist/cjs/api/types/SectionInstructions.d.ts +6 -0
- package/dist/cjs/api/types/SectionInstructions.js +3 -0
- package/dist/cjs/api/types/SectionVersion.d.ts +8 -0
- package/dist/cjs/api/types/SectionVersion.js +3 -0
- package/dist/cjs/api/types/StatusResponse.d.ts +3 -0
- package/dist/cjs/api/types/StatusResponse.js +3 -0
- package/dist/cjs/api/types/StreamConfig.d.ts +3 -1
- package/dist/cjs/api/types/{StreamConfigXCortiRetentionPolicy.d.ts → StreamConfigRetentionPolicy.d.ts} +2 -2
- package/dist/cjs/api/types/{StreamConfigXCortiRetentionPolicy.js → StreamConfigRetentionPolicy.js} +2 -2
- package/dist/cjs/api/types/StreamConfigStatusMessage.d.ts +2 -0
- package/dist/cjs/api/types/StringNode.d.ts +11 -0
- package/dist/cjs/api/types/StringNode.js +3 -0
- package/dist/cjs/api/types/Template.d.ts +22 -0
- package/dist/cjs/api/types/Template.js +3 -0
- package/dist/cjs/api/types/TemplateGeneration.d.ts +6 -0
- package/dist/cjs/api/types/TemplateGeneration.js +3 -0
- package/dist/cjs/api/types/TemplateInstructions.d.ts +4 -0
- package/dist/cjs/api/types/TemplateInstructions.js +3 -0
- package/dist/cjs/api/types/TemplateVersion.d.ts +8 -0
- package/dist/cjs/api/types/TemplateVersion.js +3 -0
- package/dist/cjs/api/types/TemplateVersionSectionRequest.d.ts +6 -0
- package/dist/cjs/api/types/TemplateVersionSectionRequest.js +3 -0
- package/dist/cjs/api/types/TranscribeConfig.d.ts +2 -0
- package/dist/cjs/api/types/TranscribeConfigStatusMessage.d.ts +4 -2
- package/dist/cjs/api/types/index.d.ts +19 -1
- package/dist/cjs/api/types/index.js +19 -1
- package/dist/cjs/custom/CortiClient.js +2 -2
- package/dist/cjs/custom/auth/CortiAuth.js +2 -2
- package/dist/cjs/custom/stream/CustomStream.js +2 -2
- package/dist/cjs/custom/transcribe/CustomTranscribe.js +3 -3
- package/dist/cjs/serialization/resources/index.d.ts +6 -0
- package/dist/cjs/serialization/resources/index.js +7 -1
- package/dist/cjs/serialization/resources/newSectionVersions/client/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/newSectionVersions/client/index.js +37 -0
- package/dist/cjs/serialization/resources/newSectionVersions/client/list.d.ts +8 -0
- package/dist/cjs/serialization/resources/newSectionVersions/client/list.js +40 -0
- package/dist/cjs/serialization/resources/newSectionVersions/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/newSectionVersions/index.js +17 -0
- package/dist/cjs/serialization/resources/newSections/client/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/newSections/client/index.js +41 -0
- package/dist/cjs/serialization/resources/newSections/client/list.d.ts +8 -0
- package/dist/cjs/serialization/resources/newSections/client/list.js +40 -0
- package/dist/cjs/serialization/resources/newSections/client/requests/CreateSectionRequest.d.ts +16 -0
- package/dist/cjs/serialization/resources/newSections/client/requests/CreateSectionRequest.js +48 -0
- package/dist/cjs/serialization/resources/newSections/client/requests/UpdateSectionRequest.d.ts +12 -0
- package/dist/cjs/serialization/resources/newSections/client/requests/UpdateSectionRequest.js +44 -0
- package/dist/cjs/serialization/resources/newSections/client/requests/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/newSections/client/requests/index.js +7 -0
- package/dist/cjs/serialization/resources/newSections/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/newSections/index.js +17 -0
- package/dist/cjs/serialization/resources/newTemplates/client/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/newTemplates/client/index.js +41 -0
- package/dist/cjs/serialization/resources/newTemplates/client/list.d.ts +8 -0
- package/dist/cjs/serialization/resources/newTemplates/client/list.js +40 -0
- package/dist/cjs/serialization/resources/newTemplates/client/requests/CreateTemplateRequest.d.ts +16 -0
- package/dist/cjs/serialization/resources/newTemplates/client/requests/CreateTemplateRequest.js +48 -0
- package/dist/cjs/serialization/resources/newTemplates/client/requests/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/newTemplates/client/requests/index.js +5 -0
- package/dist/cjs/serialization/resources/newTemplates/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/newTemplates/index.js +18 -0
- package/dist/cjs/serialization/resources/newTemplates/types/CreateTemplateRequestGeneration.d.ts +12 -0
- package/dist/cjs/serialization/resources/newTemplates/types/CreateTemplateRequestGeneration.js +44 -0
- package/dist/cjs/serialization/resources/newTemplates/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/newTemplates/types/index.js +17 -0
- package/dist/cjs/serialization/types/BoolNode.d.ts +11 -0
- package/dist/cjs/serialization/types/BoolNode.js +43 -0
- package/dist/cjs/serialization/types/DictNode.d.ts +13 -0
- package/dist/cjs/serialization/types/DictNode.js +46 -0
- package/dist/cjs/serialization/types/FieldDefinition.d.ts +11 -0
- package/dist/cjs/serialization/types/FieldDefinition.js +44 -0
- package/dist/cjs/serialization/types/FloatNode.d.ts +14 -0
- package/dist/cjs/serialization/types/FloatNode.js +46 -0
- package/dist/cjs/serialization/types/IntegerNode.d.ts +14 -0
- package/dist/cjs/serialization/types/IntegerNode.js +46 -0
- package/dist/cjs/serialization/types/ListNode.d.ts +14 -0
- package/dist/cjs/serialization/types/ListNode.js +47 -0
- package/dist/cjs/serialization/types/OutputSchema.d.ts +11 -0
- package/dist/cjs/serialization/types/OutputSchema.js +51 -0
- package/dist/cjs/serialization/types/Section.d.ts +19 -0
- package/dist/cjs/serialization/types/Section.js +51 -0
- package/dist/cjs/serialization/types/SectionGeneration.d.ts +12 -0
- package/dist/cjs/serialization/types/SectionGeneration.js +45 -0
- package/dist/cjs/serialization/types/SectionInstructions.d.ts +10 -0
- package/dist/cjs/serialization/types/SectionInstructions.js +42 -0
- package/dist/cjs/serialization/types/SectionVersion.d.ts +12 -0
- package/dist/cjs/serialization/types/SectionVersion.js +44 -0
- package/dist/cjs/serialization/types/StatusResponse.d.ts +9 -0
- package/dist/cjs/serialization/types/{StreamConfigXCortiRetentionPolicy.js → StatusResponse.js} +4 -2
- package/dist/cjs/serialization/types/StreamConfig.d.ts +3 -2
- package/dist/cjs/serialization/types/StreamConfig.js +3 -2
- package/dist/cjs/serialization/types/StreamConfigRetentionPolicy.d.ts +7 -0
- package/dist/cjs/serialization/types/StreamConfigRetentionPolicy.js +39 -0
- package/dist/cjs/serialization/types/StreamConfigStatusMessage.d.ts +2 -0
- package/dist/cjs/serialization/types/StreamConfigStatusMessage.js +2 -0
- package/dist/cjs/serialization/types/StringNode.d.ts +13 -0
- package/dist/cjs/serialization/types/StringNode.js +45 -0
- package/dist/cjs/serialization/types/Template.d.ts +19 -0
- package/dist/cjs/serialization/types/Template.js +51 -0
- package/dist/cjs/serialization/types/TemplateGeneration.d.ts +12 -0
- package/dist/cjs/serialization/types/TemplateGeneration.js +44 -0
- package/dist/cjs/serialization/types/TemplateInstructions.d.ts +9 -0
- package/dist/cjs/serialization/types/TemplateInstructions.js +41 -0
- package/dist/cjs/serialization/types/TemplateVersion.d.ts +12 -0
- package/dist/cjs/serialization/types/TemplateVersion.js +44 -0
- package/dist/cjs/serialization/types/TemplateVersionSectionRequest.d.ts +10 -0
- package/dist/cjs/serialization/types/TemplateVersionSectionRequest.js +42 -0
- package/dist/cjs/serialization/types/TranscribeConfig.d.ts +1 -0
- package/dist/cjs/serialization/types/TranscribeConfig.js +1 -0
- package/dist/cjs/serialization/types/TranscribeConfigStatusMessage.d.ts +3 -1
- package/dist/cjs/serialization/types/TranscribeConfigStatusMessage.js +3 -1
- package/dist/cjs/serialization/types/index.d.ts +19 -1
- package/dist/cjs/serialization/types/index.js +19 -1
- 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 -0
- package/dist/esm/Client.mjs +20 -0
- package/dist/esm/api/resources/index.d.mts +7 -0
- package/dist/esm/api/resources/index.mjs +7 -0
- package/dist/esm/api/resources/newSectionVersions/client/Client.d.mts +84 -0
- package/dist/esm/api/resources/newSectionVersions/client/Client.mjs +312 -0
- package/dist/esm/api/resources/newSectionVersions/client/index.d.mts +1 -0
- package/dist/esm/api/resources/newSectionVersions/client/index.mjs +1 -0
- package/dist/esm/api/resources/newSectionVersions/index.d.mts +1 -0
- package/dist/esm/api/resources/newSectionVersions/index.mjs +1 -0
- package/dist/esm/api/resources/newSections/client/Client.d.mts +81 -0
- package/dist/esm/api/resources/newSections/client/Client.mjs +316 -0
- package/dist/esm/api/resources/newSections/client/index.d.mts +1 -0
- package/dist/esm/api/resources/newSections/client/index.mjs +1 -0
- package/dist/esm/api/resources/newSections/client/requests/CreateSectionRequest.d.mts +33 -0
- package/dist/esm/api/resources/newSections/client/requests/CreateSectionRequest.mjs +2 -0
- package/dist/esm/api/resources/newSections/client/requests/ListNewSectionsRequest.d.mts +12 -0
- package/dist/esm/api/resources/newSections/client/requests/ListNewSectionsRequest.mjs +2 -0
- package/dist/esm/api/resources/newSections/client/requests/UpdateSectionRequest.d.mts +10 -0
- package/dist/esm/api/resources/newSections/client/requests/UpdateSectionRequest.mjs +2 -0
- package/dist/esm/api/resources/newSections/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/newSections/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/newSections/index.d.mts +1 -0
- package/dist/esm/api/resources/newSections/index.mjs +1 -0
- package/dist/esm/api/resources/newTemplateVersions/client/Client.d.mts +60 -0
- package/dist/esm/api/resources/newTemplateVersions/client/Client.mjs +218 -0
- package/dist/esm/api/resources/newTemplateVersions/client/index.d.mts +1 -0
- package/dist/esm/api/resources/newTemplateVersions/client/index.mjs +1 -0
- package/dist/esm/api/resources/newTemplateVersions/index.d.mts +1 -0
- package/dist/esm/api/resources/newTemplateVersions/index.mjs +1 -0
- package/dist/esm/api/resources/newTemplates/client/Client.d.mts +68 -0
- package/dist/esm/api/resources/newTemplates/client/Client.mjs +262 -0
- package/dist/esm/api/resources/newTemplates/client/index.d.mts +1 -0
- package/dist/esm/api/resources/newTemplates/client/index.mjs +1 -0
- package/dist/esm/api/resources/newTemplates/client/requests/CreateTemplateRequest.d.mts +28 -0
- package/dist/esm/api/resources/newTemplates/client/requests/CreateTemplateRequest.mjs +2 -0
- package/dist/esm/api/resources/newTemplates/client/requests/ListNewTemplatesRequest.d.mts +12 -0
- package/dist/esm/api/resources/newTemplates/client/requests/ListNewTemplatesRequest.mjs +2 -0
- package/dist/esm/api/resources/newTemplates/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/newTemplates/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/newTemplates/index.d.mts +2 -0
- package/dist/esm/api/resources/newTemplates/index.mjs +2 -0
- package/dist/esm/api/resources/newTemplates/types/CreateTemplateRequestGeneration.d.mts +5 -0
- package/dist/esm/api/resources/newTemplates/types/CreateTemplateRequestGeneration.mjs +2 -0
- package/dist/esm/api/resources/newTemplates/types/index.d.mts +1 -0
- package/dist/esm/api/resources/newTemplates/types/index.mjs +1 -0
- package/dist/esm/api/types/BoolNode.d.mts +7 -0
- package/dist/esm/api/types/BoolNode.mjs +2 -0
- package/dist/esm/api/types/DictNode.d.mts +12 -0
- package/dist/esm/api/types/DictNode.mjs +2 -0
- package/dist/esm/api/types/FieldDefinition.d.mts +8 -0
- package/dist/esm/api/types/FieldDefinition.mjs +2 -0
- package/dist/esm/api/types/FloatNode.d.mts +13 -0
- package/dist/esm/api/types/FloatNode.mjs +2 -0
- package/dist/esm/api/types/IntegerNode.d.mts +13 -0
- package/dist/esm/api/types/IntegerNode.mjs +2 -0
- package/dist/esm/api/types/ListNode.d.mts +13 -0
- package/dist/esm/api/types/ListNode.mjs +2 -0
- package/dist/esm/api/types/OutputSchema.d.mts +2 -0
- package/dist/esm/api/types/OutputSchema.mjs +2 -0
- package/dist/esm/api/types/Section.d.mts +23 -0
- package/dist/esm/api/types/Section.mjs +2 -0
- package/dist/esm/api/types/SectionGeneration.d.mts +8 -0
- package/dist/esm/api/types/SectionGeneration.mjs +2 -0
- package/dist/esm/api/types/SectionInstructions.d.mts +6 -0
- package/dist/esm/api/types/SectionInstructions.mjs +2 -0
- package/dist/esm/api/types/SectionVersion.d.mts +8 -0
- package/dist/esm/api/types/SectionVersion.mjs +2 -0
- package/dist/esm/api/types/StatusResponse.d.mts +3 -0
- package/dist/esm/api/types/StatusResponse.mjs +2 -0
- package/dist/esm/api/types/StreamConfig.d.mts +3 -1
- package/dist/esm/api/types/{StreamConfigXCortiRetentionPolicy.d.mts → StreamConfigRetentionPolicy.d.mts} +2 -2
- package/dist/esm/api/types/{StreamConfigXCortiRetentionPolicy.mjs → StreamConfigRetentionPolicy.mjs} +1 -1
- package/dist/esm/api/types/StreamConfigStatusMessage.d.mts +2 -0
- package/dist/esm/api/types/StringNode.d.mts +11 -0
- package/dist/esm/api/types/StringNode.mjs +2 -0
- package/dist/esm/api/types/Template.d.mts +22 -0
- package/dist/esm/api/types/Template.mjs +2 -0
- package/dist/esm/api/types/TemplateGeneration.d.mts +6 -0
- package/dist/esm/api/types/TemplateGeneration.mjs +2 -0
- package/dist/esm/api/types/TemplateInstructions.d.mts +4 -0
- package/dist/esm/api/types/TemplateInstructions.mjs +2 -0
- package/dist/esm/api/types/TemplateVersion.d.mts +8 -0
- package/dist/esm/api/types/TemplateVersion.mjs +2 -0
- package/dist/esm/api/types/TemplateVersionSectionRequest.d.mts +6 -0
- package/dist/esm/api/types/TemplateVersionSectionRequest.mjs +2 -0
- package/dist/esm/api/types/TranscribeConfig.d.mts +2 -0
- package/dist/esm/api/types/TranscribeConfigStatusMessage.d.mts +4 -2
- package/dist/esm/api/types/index.d.mts +19 -1
- package/dist/esm/api/types/index.mjs +19 -1
- package/dist/esm/custom/CortiClient.mjs +2 -2
- package/dist/esm/custom/auth/CortiAuth.mjs +2 -2
- package/dist/esm/custom/stream/CustomStream.mjs +2 -2
- package/dist/esm/custom/transcribe/CustomTranscribe.mjs +3 -3
- package/dist/esm/serialization/resources/index.d.mts +6 -0
- package/dist/esm/serialization/resources/index.mjs +6 -0
- package/dist/esm/serialization/resources/newSectionVersions/client/index.d.mts +1 -0
- package/dist/esm/serialization/resources/newSectionVersions/client/index.mjs +1 -0
- package/dist/esm/serialization/resources/newSectionVersions/client/list.d.mts +8 -0
- package/dist/esm/serialization/resources/newSectionVersions/client/list.mjs +4 -0
- package/dist/esm/serialization/resources/newSectionVersions/index.d.mts +1 -0
- package/dist/esm/serialization/resources/newSectionVersions/index.mjs +1 -0
- package/dist/esm/serialization/resources/newSections/client/index.d.mts +2 -0
- package/dist/esm/serialization/resources/newSections/client/index.mjs +2 -0
- package/dist/esm/serialization/resources/newSections/client/list.d.mts +8 -0
- package/dist/esm/serialization/resources/newSections/client/list.mjs +4 -0
- package/dist/esm/serialization/resources/newSections/client/requests/CreateSectionRequest.d.mts +16 -0
- package/dist/esm/serialization/resources/newSections/client/requests/CreateSectionRequest.mjs +12 -0
- package/dist/esm/serialization/resources/newSections/client/requests/UpdateSectionRequest.d.mts +12 -0
- package/dist/esm/serialization/resources/newSections/client/requests/UpdateSectionRequest.mjs +8 -0
- package/dist/esm/serialization/resources/newSections/client/requests/index.d.mts +2 -0
- package/dist/esm/serialization/resources/newSections/client/requests/index.mjs +2 -0
- package/dist/esm/serialization/resources/newSections/index.d.mts +1 -0
- package/dist/esm/serialization/resources/newSections/index.mjs +1 -0
- package/dist/esm/serialization/resources/newTemplates/client/index.d.mts +2 -0
- package/dist/esm/serialization/resources/newTemplates/client/index.mjs +2 -0
- package/dist/esm/serialization/resources/newTemplates/client/list.d.mts +8 -0
- package/dist/esm/serialization/resources/newTemplates/client/list.mjs +4 -0
- package/dist/esm/serialization/resources/newTemplates/client/requests/CreateTemplateRequest.d.mts +16 -0
- package/dist/esm/serialization/resources/newTemplates/client/requests/CreateTemplateRequest.mjs +12 -0
- package/dist/esm/serialization/resources/newTemplates/client/requests/index.d.mts +1 -0
- package/dist/esm/serialization/resources/newTemplates/client/requests/index.mjs +1 -0
- package/dist/esm/serialization/resources/newTemplates/index.d.mts +2 -0
- package/dist/esm/serialization/resources/newTemplates/index.mjs +2 -0
- package/dist/esm/serialization/resources/newTemplates/types/CreateTemplateRequestGeneration.d.mts +12 -0
- package/dist/esm/serialization/resources/newTemplates/types/CreateTemplateRequestGeneration.mjs +8 -0
- package/dist/esm/serialization/resources/newTemplates/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/newTemplates/types/index.mjs +1 -0
- package/dist/esm/serialization/types/BoolNode.d.mts +11 -0
- package/dist/esm/serialization/types/BoolNode.mjs +7 -0
- package/dist/esm/serialization/types/DictNode.d.mts +13 -0
- package/dist/esm/serialization/types/DictNode.mjs +10 -0
- package/dist/esm/serialization/types/FieldDefinition.d.mts +11 -0
- package/dist/esm/serialization/types/FieldDefinition.mjs +8 -0
- package/dist/esm/serialization/types/FloatNode.d.mts +14 -0
- package/dist/esm/serialization/types/FloatNode.mjs +10 -0
- package/dist/esm/serialization/types/IntegerNode.d.mts +14 -0
- package/dist/esm/serialization/types/IntegerNode.mjs +10 -0
- package/dist/esm/serialization/types/ListNode.d.mts +14 -0
- package/dist/esm/serialization/types/ListNode.mjs +11 -0
- package/dist/esm/serialization/types/OutputSchema.d.mts +11 -0
- package/dist/esm/serialization/types/OutputSchema.mjs +15 -0
- package/dist/esm/serialization/types/Section.d.mts +19 -0
- package/dist/esm/serialization/types/Section.mjs +15 -0
- package/dist/esm/serialization/types/SectionGeneration.d.mts +12 -0
- package/dist/esm/serialization/types/SectionGeneration.mjs +9 -0
- package/dist/esm/serialization/types/SectionInstructions.d.mts +10 -0
- package/dist/esm/serialization/types/SectionInstructions.mjs +6 -0
- package/dist/esm/serialization/types/SectionVersion.d.mts +12 -0
- package/dist/esm/serialization/types/SectionVersion.mjs +8 -0
- package/dist/esm/serialization/types/StatusResponse.d.mts +9 -0
- package/dist/esm/serialization/types/StatusResponse.mjs +5 -0
- package/dist/esm/serialization/types/StreamConfig.d.mts +3 -2
- package/dist/esm/serialization/types/StreamConfig.mjs +3 -2
- package/dist/esm/serialization/types/StreamConfigRetentionPolicy.d.mts +7 -0
- package/dist/esm/serialization/types/{StreamConfigXCortiRetentionPolicy.mjs → StreamConfigRetentionPolicy.mjs} +1 -1
- package/dist/esm/serialization/types/StreamConfigStatusMessage.d.mts +2 -0
- package/dist/esm/serialization/types/StreamConfigStatusMessage.mjs +2 -0
- package/dist/esm/serialization/types/StringNode.d.mts +13 -0
- package/dist/esm/serialization/types/StringNode.mjs +9 -0
- package/dist/esm/serialization/types/Template.d.mts +19 -0
- package/dist/esm/serialization/types/Template.mjs +15 -0
- package/dist/esm/serialization/types/TemplateGeneration.d.mts +12 -0
- package/dist/esm/serialization/types/TemplateGeneration.mjs +8 -0
- package/dist/esm/serialization/types/TemplateInstructions.d.mts +9 -0
- package/dist/esm/serialization/types/TemplateInstructions.mjs +5 -0
- package/dist/esm/serialization/types/TemplateVersion.d.mts +12 -0
- package/dist/esm/serialization/types/TemplateVersion.mjs +8 -0
- package/dist/esm/serialization/types/TemplateVersionSectionRequest.d.mts +10 -0
- package/dist/esm/serialization/types/TemplateVersionSectionRequest.mjs +6 -0
- package/dist/esm/serialization/types/TranscribeConfig.d.mts +1 -0
- package/dist/esm/serialization/types/TranscribeConfig.mjs +1 -0
- package/dist/esm/serialization/types/TranscribeConfigStatusMessage.d.mts +3 -1
- package/dist/esm/serialization/types/TranscribeConfigStatusMessage.mjs +3 -1
- package/dist/esm/serialization/types/index.d.mts +19 -1
- package/dist/esm/serialization/types/index.mjs +19 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +4 -2
- package/dist/cjs/serialization/types/StreamConfigXCortiRetentionPolicy.d.ts +0 -7
- package/dist/esm/serialization/types/StreamConfigXCortiRetentionPolicy.d.mts +0 -7
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.NewTemplatesClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
50
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
51
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
52
|
+
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
53
|
+
const Corti = __importStar(require("../../../index.js"));
|
|
54
|
+
class NewTemplatesClient {
|
|
55
|
+
constructor(options) {
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @param {Corti.ListNewTemplatesRequest} request
|
|
60
|
+
* @param {NewTemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* await client.newTemplates.list()
|
|
64
|
+
*/
|
|
65
|
+
list(request = {}, requestOptions) {
|
|
66
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
67
|
+
}
|
|
68
|
+
__list() {
|
|
69
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
70
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
71
|
+
const { lang, label, published } = request;
|
|
72
|
+
const _queryParams = {
|
|
73
|
+
lang,
|
|
74
|
+
label,
|
|
75
|
+
published,
|
|
76
|
+
};
|
|
77
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
78
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Tenant-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.tenantName }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
79
|
+
const _response = yield core.fetcher({
|
|
80
|
+
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"),
|
|
81
|
+
method: "GET",
|
|
82
|
+
headers: _headers,
|
|
83
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
84
|
+
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,
|
|
85
|
+
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,
|
|
86
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
87
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
88
|
+
logging: this._options.logging,
|
|
89
|
+
});
|
|
90
|
+
if (_response.ok) {
|
|
91
|
+
return {
|
|
92
|
+
data: serializers.newTemplates.list.Response.parseOrThrow(_response.body, {
|
|
93
|
+
unrecognizedObjectKeys: "passthrough",
|
|
94
|
+
allowUnrecognizedUnionMembers: true,
|
|
95
|
+
allowUnrecognizedEnumValues: true,
|
|
96
|
+
skipValidation: true,
|
|
97
|
+
breadcrumbsPrefix: ["response"],
|
|
98
|
+
}),
|
|
99
|
+
rawResponse: _response.rawResponse,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
if (_response.error.reason === "status-code") {
|
|
103
|
+
throw new errors.CortiError({
|
|
104
|
+
statusCode: _response.error.statusCode,
|
|
105
|
+
body: _response.error.body,
|
|
106
|
+
rawResponse: _response.rawResponse,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/alpha/templates");
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* @param {Corti.CreateTemplateRequest} request
|
|
114
|
+
* @param {NewTemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
115
|
+
*
|
|
116
|
+
* @throws {@link Corti.BadRequestError}
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* await client.newTemplates.create({
|
|
120
|
+
* name: "name",
|
|
121
|
+
* language: "language",
|
|
122
|
+
* generation: {
|
|
123
|
+
* instructions: {
|
|
124
|
+
* prompt: "prompt"
|
|
125
|
+
* }
|
|
126
|
+
* }
|
|
127
|
+
* })
|
|
128
|
+
*/
|
|
129
|
+
create(request, requestOptions) {
|
|
130
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
131
|
+
}
|
|
132
|
+
__create(request, requestOptions) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
135
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
136
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Tenant-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.tenantName }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
137
|
+
const _response = yield core.fetcher({
|
|
138
|
+
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"),
|
|
139
|
+
method: "POST",
|
|
140
|
+
headers: _headers,
|
|
141
|
+
contentType: "application/json",
|
|
142
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
143
|
+
requestType: "json",
|
|
144
|
+
body: serializers.CreateTemplateRequest.jsonOrThrow(request, {
|
|
145
|
+
unrecognizedObjectKeys: "strip",
|
|
146
|
+
omitUndefined: true,
|
|
147
|
+
}),
|
|
148
|
+
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,
|
|
149
|
+
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,
|
|
150
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
151
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
152
|
+
logging: this._options.logging,
|
|
153
|
+
});
|
|
154
|
+
if (_response.ok) {
|
|
155
|
+
return {
|
|
156
|
+
data: serializers.Template.parseOrThrow(_response.body, {
|
|
157
|
+
unrecognizedObjectKeys: "passthrough",
|
|
158
|
+
allowUnrecognizedUnionMembers: true,
|
|
159
|
+
allowUnrecognizedEnumValues: true,
|
|
160
|
+
skipValidation: true,
|
|
161
|
+
breadcrumbsPrefix: ["response"],
|
|
162
|
+
}),
|
|
163
|
+
rawResponse: _response.rawResponse,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
if (_response.error.reason === "status-code") {
|
|
167
|
+
switch (_response.error.statusCode) {
|
|
168
|
+
case 400:
|
|
169
|
+
throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
|
|
170
|
+
default:
|
|
171
|
+
throw new errors.CortiError({
|
|
172
|
+
statusCode: _response.error.statusCode,
|
|
173
|
+
body: _response.error.body,
|
|
174
|
+
rawResponse: _response.rawResponse,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/alpha/templates");
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* @param {string} templateId
|
|
183
|
+
* @param {NewTemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* await client.newTemplates.get("templateId")
|
|
187
|
+
*/
|
|
188
|
+
get(templateId, requestOptions) {
|
|
189
|
+
return core.HttpResponsePromise.fromPromise(this.__get(templateId, requestOptions));
|
|
190
|
+
}
|
|
191
|
+
__get(templateId, requestOptions) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
194
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
195
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Tenant-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.tenantName }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
196
|
+
const _response = yield core.fetcher({
|
|
197
|
+
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)}`),
|
|
198
|
+
method: "GET",
|
|
199
|
+
headers: _headers,
|
|
200
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
201
|
+
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,
|
|
202
|
+
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,
|
|
203
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
204
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
205
|
+
logging: this._options.logging,
|
|
206
|
+
});
|
|
207
|
+
if (_response.ok) {
|
|
208
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
209
|
+
}
|
|
210
|
+
if (_response.error.reason === "status-code") {
|
|
211
|
+
throw new errors.CortiError({
|
|
212
|
+
statusCode: _response.error.statusCode,
|
|
213
|
+
body: _response.error.body,
|
|
214
|
+
rawResponse: _response.rawResponse,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/alpha/templates/{templateId}");
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* @param {string} templateId
|
|
222
|
+
* @param {NewTemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* await client.newTemplates.delete("templateId")
|
|
226
|
+
*/
|
|
227
|
+
delete(templateId, requestOptions) {
|
|
228
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(templateId, requestOptions));
|
|
229
|
+
}
|
|
230
|
+
__delete(templateId, requestOptions) {
|
|
231
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
232
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
233
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
234
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Tenant-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.tenantName }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
235
|
+
const _response = yield core.fetcher({
|
|
236
|
+
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)}`),
|
|
237
|
+
method: "DELETE",
|
|
238
|
+
headers: _headers,
|
|
239
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
240
|
+
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,
|
|
241
|
+
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,
|
|
242
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
243
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
244
|
+
logging: this._options.logging,
|
|
245
|
+
});
|
|
246
|
+
if (_response.ok) {
|
|
247
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
248
|
+
}
|
|
249
|
+
if (_response.error.reason === "status-code") {
|
|
250
|
+
throw new errors.CortiError({
|
|
251
|
+
statusCode: _response.error.statusCode,
|
|
252
|
+
body: _response.error.body,
|
|
253
|
+
rawResponse: _response.rawResponse,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/alpha/templates/{templateId}");
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* @param {string} templateId
|
|
261
|
+
* @param {NewTemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* await client.newTemplates.update("templateId")
|
|
265
|
+
*/
|
|
266
|
+
update(templateId, requestOptions) {
|
|
267
|
+
return core.HttpResponsePromise.fromPromise(this.__update(templateId, requestOptions));
|
|
268
|
+
}
|
|
269
|
+
__update(templateId, requestOptions) {
|
|
270
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
271
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
272
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
273
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Tenant-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.tenantName }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
274
|
+
const _response = yield core.fetcher({
|
|
275
|
+
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)}`),
|
|
276
|
+
method: "PATCH",
|
|
277
|
+
headers: _headers,
|
|
278
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
279
|
+
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,
|
|
280
|
+
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,
|
|
281
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
282
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
283
|
+
logging: this._options.logging,
|
|
284
|
+
});
|
|
285
|
+
if (_response.ok) {
|
|
286
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
287
|
+
}
|
|
288
|
+
if (_response.error.reason === "status-code") {
|
|
289
|
+
throw new errors.CortiError({
|
|
290
|
+
statusCode: _response.error.statusCode,
|
|
291
|
+
body: _response.error.body,
|
|
292
|
+
rawResponse: _response.rawResponse,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/alpha/templates/{templateId}");
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
exports.NewTemplatesClient = NewTemplatesClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type * as Corti from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* name: "name",
|
|
6
|
+
* language: "language",
|
|
7
|
+
* generation: {
|
|
8
|
+
* instructions: {
|
|
9
|
+
* prompt: "prompt"
|
|
10
|
+
* }
|
|
11
|
+
* }
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface CreateTemplateRequest {
|
|
15
|
+
/** The name of this template. Not passed to the LLM. */
|
|
16
|
+
name: string;
|
|
17
|
+
/** A description for this template. Not passed to the LLM. */
|
|
18
|
+
description?: string;
|
|
19
|
+
/** The intended language for outputs as BCP 47 tag. Does not strictly have to match `outputLanguage` in POST /documents request. */
|
|
20
|
+
language: string;
|
|
21
|
+
/** Labels work as query param filter in the LIST /templates endpoint. */
|
|
22
|
+
labels?: string[];
|
|
23
|
+
/** Reference to the template to inherit template instructions and sections from. Inherits from published version unless fields are changed or overridden in the POST /documents request. */
|
|
24
|
+
inheritFromId?: string | null;
|
|
25
|
+
generation: Corti.CreateTemplateRequestGeneration;
|
|
26
|
+
/** Defaults to true when omitted. Set this to false if you do not want the template to automatically show up in LIST templates. */
|
|
27
|
+
publish?: boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {}
|
|
4
|
+
*/
|
|
5
|
+
export interface ListNewTemplatesRequest {
|
|
6
|
+
/** Filter templates by language (BCP 47 tag). Repeatable. */
|
|
7
|
+
lang?: string | string[];
|
|
8
|
+
/** Filter templates by label. Repeatable; matches templates that have any of the given labels. */
|
|
9
|
+
label?: string | string[];
|
|
10
|
+
/** Filter by publish status. Defaults to true when omitted. */
|
|
11
|
+
published?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
18
|
+
__exportStar(require("./types/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./CreateTemplateRequestGeneration.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CreateTemplateRequestGeneration.js"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as Corti from "../index.js";
|
|
2
|
+
export interface DictNode {
|
|
3
|
+
type: "dict";
|
|
4
|
+
/** Can be used to prompt the LLM with more guidance in addition to the section.instructions */
|
|
5
|
+
description?: string;
|
|
6
|
+
/** Controls how subheadings are rendered in the generated output. Use `inline` (default) for `{key}: {value}\n` or `block` for `{key}\n{value}\n`, or provide a custom format string containing both `{key}` and `{value}` placeholders. Mutually exclusive with `objectFormat`. */
|
|
7
|
+
subheadingFormat?: string;
|
|
8
|
+
/** A format string referencing field keys as placeholders (e.g. `{fieldKey}`). All placeholders must correspond to defined field keys. Mutually exclusive with `subheadingFormat`. */
|
|
9
|
+
objectFormat?: string;
|
|
10
|
+
/** Define what fields are possible to return in the dict. */
|
|
11
|
+
fields?: Corti.FieldDefinition[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as Corti from "../index.js";
|
|
2
|
+
export interface FieldDefinition {
|
|
3
|
+
/** Use to set a key to reference. */
|
|
4
|
+
key: string;
|
|
5
|
+
/** Can be used to prompt the LLM with more guidance in addition to the section.instructions */
|
|
6
|
+
description: string;
|
|
7
|
+
value: Corti.OutputSchema;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface FloatNode {
|
|
2
|
+
type: "float";
|
|
3
|
+
/** Can be used to prompt the LLM with more guidance in addition to the section.instructions */
|
|
4
|
+
description?: string;
|
|
5
|
+
/** The default to output if nothing to output. */
|
|
6
|
+
default?: number | null;
|
|
7
|
+
/** Can be used to prompt the LLM for specifically allowed float values to output. */
|
|
8
|
+
enum?: number[];
|
|
9
|
+
/** Use if a minimum value applies. */
|
|
10
|
+
minimum?: number | null;
|
|
11
|
+
/** Use if a maximum value applies. */
|
|
12
|
+
maximum?: number | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IntegerNode {
|
|
2
|
+
type: "integer";
|
|
3
|
+
/** Can be used to prompt the LLM with more guidance in addition to the section.instructions */
|
|
4
|
+
description?: string;
|
|
5
|
+
/** The default to output if nothing to output. */
|
|
6
|
+
default?: number | null;
|
|
7
|
+
/** Can be used to prompt the LLM for specifically allowed integer values to output. */
|
|
8
|
+
enum?: number[];
|
|
9
|
+
/** Use if a minimum value applies. */
|
|
10
|
+
minimum?: number | null;
|
|
11
|
+
/** Use if a maximum value applies. */
|
|
12
|
+
maximum?: number | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as Corti from "../index.js";
|
|
2
|
+
export interface ListNode {
|
|
3
|
+
type: "list";
|
|
4
|
+
/** Can be used to prompt the LLM with more guidance in addition to the section.instructions */
|
|
5
|
+
description?: string;
|
|
6
|
+
items: Corti.OutputSchema;
|
|
7
|
+
/** Controls how each list item is rendered in the generated output. Use `bullet` (default), `numbered`, or `plain`, or provide a custom format string containing the `{item}` placeholder. */
|
|
8
|
+
itemFormat?: string;
|
|
9
|
+
/** Minimum number of list items to generate. */
|
|
10
|
+
minItems?: number | null;
|
|
11
|
+
/** Maximum number of list items to generate. */
|
|
12
|
+
maxItems?: number | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type * as Corti from "../index.js";
|
|
2
|
+
export interface Section {
|
|
3
|
+
/** The UUID of the section. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Reference to the section to inherit generation configuration from. Inherits from published version by default. */
|
|
6
|
+
inheritedFromId?: string | null;
|
|
7
|
+
/** True if the section was auto-generated as part of an inline section-composed POST /documents request. */
|
|
8
|
+
autoGenerated?: boolean;
|
|
9
|
+
/** The name of the section. */
|
|
10
|
+
name: string;
|
|
11
|
+
/** The intended language for outputs as BCP 47 tag. */
|
|
12
|
+
language: string;
|
|
13
|
+
/** The description for the section. */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** The labels available to use as query param filter in the LIST /sections endpoint. */
|
|
16
|
+
labels: string[];
|
|
17
|
+
/** Shows the currently published version of this section. */
|
|
18
|
+
publishedVersion?: Corti.SectionVersion;
|
|
19
|
+
/** The original timestamp when the section was created. */
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
/** The original timestamp when the section was last updated. */
|
|
22
|
+
updatedAt: Date;
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as Corti from "../index.js";
|
|
2
|
+
export interface SectionGeneration {
|
|
3
|
+
/** The title of this section. Passed to the LLM. */
|
|
4
|
+
title: string;
|
|
5
|
+
/** The prompt instructions for this section. */
|
|
6
|
+
instructions: Corti.SectionInstructions;
|
|
7
|
+
outputSchema: Corti.OutputSchema;
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface SectionInstructions {
|
|
2
|
+
/** The content prompt instructs the model what to include for synthesis. For `documentationMode: routed_parallel` this impacts what facts to route to this section. */
|
|
3
|
+
contentPrompt: string;
|
|
4
|
+
/** The writingStyle prompt instructs the model in what tone and style to output. */
|
|
5
|
+
writingStylePrompt: string;
|
|
6
|
+
}
|