UNPKG

@novo-learning/novo-sdk

Version:

SDK for the Novolanguage Speech Analysis API

312 lines (311 loc) 16.8 kB
import { Configuration } from './configuration'; import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { RequestArgs, BaseAPI } from './base'; export interface AuthSettingsDto { 'oauth'?: OAuthSettingsDto; 'apiKey': string; 'allowAnonymousLogin': boolean; } export interface AuthSettingsResponseDto { 'allowAnonymousLogin': boolean; } export interface ConfigurationCreateDtoV1 { 'name': string; 'languageCode': LanguageCode; 'isDefault': boolean; 'thresholds': ThresholdsDtoV1; } export interface ConfigurationDtoV1 { 'id': string; 'name': string; 'languageCode': LanguageCode; 'isDefault': boolean; 'thresholds': ThresholdsDtoV1; } export interface ConfigurationResponseDtoV1 { 'id': string; 'name': string; 'languageCode': LanguageCode; 'isDefault': boolean; 'thresholds': ThresholdsDtoV1; 'publisherId': string; } export interface CreatePublisherDto { 'name': string; 'key'?: string; 'settings': PublisherSettingsDto; } export interface FeedbackSettingsDto { 'correctness'?: boolean; 'phone'?: boolean; 'timing'?: boolean; 'confidence'?: boolean; 'alignment'?: boolean; 'accuracy'?: boolean; 'fluency'?: boolean; 'attempt'?: FeedbackSettingsDtoAttemptEnum; 'purpose'?: FeedbackSettingsDtoPurposeEnum; 'detectSpeech'?: boolean; 'duration'?: boolean; 'letterAlignment'?: boolean; 'pauses'?: boolean; 'intonation'?: boolean; 'evaluateWordFeature'?: boolean; } export declare const FeedbackSettingsDtoAttemptEnum: { readonly immediate: "immediate"; readonly none: "none"; readonly delayed: "delayed"; }; export declare type FeedbackSettingsDtoAttemptEnum = typeof FeedbackSettingsDtoAttemptEnum[keyof typeof FeedbackSettingsDtoAttemptEnum]; export declare const FeedbackSettingsDtoPurposeEnum: { readonly reading: "reading"; readonly pronunciation: "pronunciation"; }; export declare type FeedbackSettingsDtoPurposeEnum = typeof FeedbackSettingsDtoPurposeEnum[keyof typeof FeedbackSettingsDtoPurposeEnum]; export interface IntermediateResultSettingsDto { 'eosDetection'?: boolean; 'reportRecognized'?: boolean; 'speechTimeout': number; } export declare const LanguageCode: { readonly ar_idn: "ar-idn"; readonly de: "de"; readonly en: "en"; readonly nl: "nl"; readonly zh: "zh"; readonly fr: "fr"; readonly es: "es"; }; export declare type LanguageCode = typeof LanguageCode[keyof typeof LanguageCode]; export interface LanguageSettingsDto { 'configurations'?: { [key: string]: Array<ModelConfigurationDto>; }; } export interface LogSettingsDto { 'confirmAudioReceived'?: boolean; } export interface ModelConfigurationDto { 'model': string; 'phoneSet': ModelConfigurationDtoPhoneSetEnum; } export declare const ModelConfigurationDtoPhoneSetEnum: { readonly cmu69: "cmu69"; readonly novo_nl37: "novo-nl37"; readonly novo_cmn111: "novo-cmn111"; readonly novo_fr37: "novo-fr37"; readonly novo_fr_nl61: "novo-fr-nl61"; readonly novo_de45: "novo-de45"; readonly novo_es27: "novo-es27"; readonly novo_ar38: "novo-ar38"; readonly novo_ar37: "novo-ar37"; }; export declare type ModelConfigurationDtoPhoneSetEnum = typeof ModelConfigurationDtoPhoneSetEnum[keyof typeof ModelConfigurationDtoPhoneSetEnum]; export interface OAuthSettingsDto { 'authorizationURL': string; 'tokenURL': string; 'clientID': string; 'clientSecret': string; } export declare const PermissionType: { readonly attempt_read_result: "attempt_read_result"; readonly attempt_read_audio: "attempt_read_audio"; readonly attempt_read_group_result: "attempt_read_group_result"; readonly attempt_read_group_audio: "attempt_read_group_audio"; readonly attempt_edit: "attempt_edit"; readonly attempt_delete: "attempt_delete"; readonly attempt_maintenance: "attempt_maintenance"; readonly exercise_edit: "exercise_edit"; readonly exercise_delete: "exercise_delete"; readonly exercise_maintenance: "exercise_maintenance"; readonly publisher_edit: "publisher_edit"; readonly publisher_read: "publisher_read"; readonly publisher_maintenance: "publisher_maintenance"; readonly publisher_configuration_read: "publisher_configuration_read"; readonly publisher_configuration_edit: "publisher_configuration_edit"; readonly pronunciation_edit: "pronunciation_edit"; }; export declare type PermissionType = typeof PermissionType[keyof typeof PermissionType]; export interface PublisherDescriptorDto { 'name': string; 'id': string; } export interface PublisherResponseDto { 'id': string; 'name'?: string; 'settings'?: PublisherSettingsResponseDto; } export interface PublisherSettingsDto { 'retentionDays': number; 'authSettings': AuthSettingsDto; 'logSettings': LogSettingsDto; 'feedbackSettings': FeedbackSettingsDto; 'intermediateResultsSettings': IntermediateResultSettingsDto; 'allowedPermissions': Array<PermissionType>; 'allowedLanguages': Array<LanguageCode>; 'expirationDate'?: string; 'languageSettings'?: LanguageSettingsDto; } export interface PublisherSettingsResponseDto { 'retentionDays': number; 'authSettings': AuthSettingsResponseDto; 'feedbackSettings': FeedbackSettingsDto; 'intermediateResultsSettings': IntermediateResultSettingsDto; 'logSettings': LogSettingsDto; 'languageSettings': LanguageSettingsDto; 'allowedPermissions': Array<PermissionType>; 'allowedLanguages': Array<LanguageCode>; 'expirationDate'?: string; } export interface RequestAccountDto { 'contactName': string; 'email': string; 'accountName': string; 'languages': Array<LanguageCode>; 'metadata'?: object; } export interface ThresholdsDtoV1 { 'defaultThreshold': number; } export interface UpdateAuthSettingsDto { 'apiKey'?: string; 'allowAnonymousLogin'?: boolean; 'oauth'?: UpdateOAuthSettingsDto; } export interface UpdateFeedbackSettings { 'correctness'?: boolean; 'phone'?: boolean; 'timing'?: boolean; 'confidence'?: boolean; 'alignment'?: boolean; 'accuracy'?: boolean; 'fluency'?: boolean; 'attempt'?: UpdateFeedbackSettingsAttemptEnum; 'purpose'?: UpdateFeedbackSettingsPurposeEnum; 'detectSpeech'?: boolean; 'duration'?: boolean; 'letterAlignment'?: boolean; 'pauses'?: boolean; 'intonation'?: boolean; 'evaluateWordFeature'?: boolean; } export declare const UpdateFeedbackSettingsAttemptEnum: { readonly immediate: "immediate"; readonly none: "none"; readonly delayed: "delayed"; }; export declare type UpdateFeedbackSettingsAttemptEnum = typeof UpdateFeedbackSettingsAttemptEnum[keyof typeof UpdateFeedbackSettingsAttemptEnum]; export declare const UpdateFeedbackSettingsPurposeEnum: { readonly reading: "reading"; readonly pronunciation: "pronunciation"; }; export declare type UpdateFeedbackSettingsPurposeEnum = typeof UpdateFeedbackSettingsPurposeEnum[keyof typeof UpdateFeedbackSettingsPurposeEnum]; export interface UpdateIntermediateResultSettingsDto { 'eosDetection'?: boolean; 'reportRecognized'?: boolean; 'speechTimeout'?: number; } export interface UpdateLanguageSettings { 'configurations'?: { [key: string]: Array<ModelConfigurationDto>; }; } export interface UpdateOAuthSettingsDto { 'authorizationURL'?: string; 'tokenURL'?: string; 'clientID'?: string; 'clientSecret'?: string; } export interface UpdatePublisherDto { 'name'?: string; 'key'?: string; 'settings'?: UpdatePublisherSettingsDto; } export interface UpdatePublisherSettingsDto { 'retentionDays'?: number; 'logSettings'?: LogSettingsDto; 'allowedPermissions'?: Array<PermissionType>; 'allowedLanguages'?: Array<LanguageCode>; 'expirationDate'?: string; 'authSettings'?: UpdateAuthSettingsDto; 'feedbackSettings'?: UpdateFeedbackSettings; 'intermediateResultsSettings'?: UpdateIntermediateResultSettingsDto; 'languageSettings'?: UpdateLanguageSettings; } export declare const ConfigurationsApiAxiosParamCreator: (configuration?: Configuration) => { createConfiguration: (configurationCreateDtoV1: ConfigurationCreateDtoV1, options?: AxiosRequestConfig) => Promise<RequestArgs>; deleteConfiguration: (id: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; editConfiguration: (id: string, configurationDtoV1: ConfigurationDtoV1, options?: AxiosRequestConfig) => Promise<RequestArgs>; findAllConfigurations: (options?: AxiosRequestConfig) => Promise<RequestArgs>; findConfiguration: (id: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; }; export declare const ConfigurationsApiFp: (configuration?: Configuration) => { createConfiguration(configurationCreateDtoV1: ConfigurationCreateDtoV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConfigurationResponseDtoV1>>; deleteConfiguration(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; editConfiguration(id: string, configurationDtoV1: ConfigurationDtoV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConfigurationResponseDtoV1>>; findAllConfigurations(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ConfigurationResponseDtoV1>>>; findConfiguration(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConfigurationResponseDtoV1>>; }; export declare const ConfigurationsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { createConfiguration(configurationCreateDtoV1: ConfigurationCreateDtoV1, options?: any): AxiosPromise<ConfigurationResponseDtoV1>; deleteConfiguration(id: string, options?: any): AxiosPromise<void>; editConfiguration(id: string, configurationDtoV1: ConfigurationDtoV1, options?: any): AxiosPromise<ConfigurationResponseDtoV1>; findAllConfigurations(options?: any): AxiosPromise<Array<ConfigurationResponseDtoV1>>; findConfiguration(id: string, options?: any): AxiosPromise<ConfigurationResponseDtoV1>; }; export declare class ConfigurationsApi extends BaseAPI { createConfiguration(configurationCreateDtoV1: ConfigurationCreateDtoV1, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ConfigurationResponseDtoV1, any, {}>>; deleteConfiguration(id: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>; editConfiguration(id: string, configurationDtoV1: ConfigurationDtoV1, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ConfigurationResponseDtoV1, any, {}>>; findAllConfigurations(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ConfigurationResponseDtoV1[], any, {}>>; findConfiguration(id: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ConfigurationResponseDtoV1, any, {}>>; } export declare const PublishersApiAxiosParamCreator: (configuration?: Configuration) => { addPublisher: (createPublisherDto: CreatePublisherDto, options?: AxiosRequestConfig) => Promise<RequestArgs>; addUsageData: (id: string, requestBody: Array<string>, options?: AxiosRequestConfig) => Promise<RequestArgs>; deletePublisher: (id: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; findAllPublishers: (options?: AxiosRequestConfig) => Promise<RequestArgs>; getAndValidatePublisher: (id: string, apiKey?: string, anonymous?: boolean, options?: AxiosRequestConfig) => Promise<RequestArgs>; getPublisherOAuthSettings: (id: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; getPublisherUsageSummary: (id: string, from: string, to: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; getUsageSummary: (from: string, to: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; requestAccount: (requestAccountDto: RequestAccountDto, options?: AxiosRequestConfig) => Promise<RequestArgs>; updatePublisher: (id: string, updatePublisherDto: UpdatePublisherDto, apiKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; }; export declare const PublishersApiFp: (configuration?: Configuration) => { addPublisher(createPublisherDto: CreatePublisherDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePublisherDto>>; addUsageData(id: string, requestBody: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; deletePublisher(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; findAllPublishers(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PublisherDescriptorDto>>>; getAndValidatePublisher(id: string, apiKey?: string, anonymous?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PublisherResponseDto>>; getPublisherOAuthSettings(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OAuthSettingsDto>>; getPublisherUsageSummary(id: string, from: string, to: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; getUsageSummary(from: string, to: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; requestAccount(requestAccountDto: RequestAccountDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; updatePublisher(id: string, updatePublisherDto: UpdatePublisherDto, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PublisherResponseDto>>; }; export declare const PublishersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { addPublisher(createPublisherDto: CreatePublisherDto, options?: any): AxiosPromise<CreatePublisherDto>; addUsageData(id: string, requestBody: Array<string>, options?: any): AxiosPromise<void>; deletePublisher(id: string, options?: any): AxiosPromise<void>; findAllPublishers(options?: any): AxiosPromise<Array<PublisherDescriptorDto>>; getAndValidatePublisher(id: string, apiKey?: string, anonymous?: boolean, options?: any): AxiosPromise<PublisherResponseDto>; getPublisherOAuthSettings(id: string, options?: any): AxiosPromise<OAuthSettingsDto>; getPublisherUsageSummary(id: string, from: string, to: string, options?: any): AxiosPromise<void>; getUsageSummary(from: string, to: string, options?: any): AxiosPromise<void>; requestAccount(requestAccountDto: RequestAccountDto, options?: any): AxiosPromise<void>; updatePublisher(id: string, updatePublisherDto: UpdatePublisherDto, apiKey?: string, options?: any): AxiosPromise<PublisherResponseDto>; }; export declare class PublishersApi extends BaseAPI { addPublisher(createPublisherDto: CreatePublisherDto, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePublisherDto, any, {}>>; addUsageData(id: string, requestBody: Array<string>, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>; deletePublisher(id: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>; findAllPublishers(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PublisherDescriptorDto[], any, {}>>; getAndValidatePublisher(id: string, apiKey?: string, anonymous?: boolean, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PublisherResponseDto, any, {}>>; getPublisherOAuthSettings(id: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OAuthSettingsDto, any, {}>>; getPublisherUsageSummary(id: string, from: string, to: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>; getUsageSummary(from: string, to: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>; requestAccount(requestAccountDto: RequestAccountDto, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>; updatePublisher(id: string, updatePublisherDto: UpdatePublisherDto, apiKey?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PublisherResponseDto, any, {}>>; }