@novo-learning/novo-sdk
Version:
SDK for the Novolanguage Speech Analysis API
780 lines (719 loc) • 29 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Exercise API
* The exericse API is used to store and retrieve exercises. Exercises stored in the exercise API are optimized for faster processing by the speech recognizer.
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from './configuration';
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
/**
*
* @export
* @interface ChoiceDtoV1
*/
export interface ChoiceDtoV1 {
/**
* The correct option(s) in this choice exercise
* @type {Array<OptionDtoV1>}
* @memberof ChoiceDtoV1
*/
'correctOptions': Array<OptionDtoV1>;
/**
* The incorrect option(s) in this choice exercise
* @type {Array<OptionDtoV1>}
* @memberof ChoiceDtoV1
*/
'incorrectOptions'?: Array<OptionDtoV1>;
}
/**
*
* @export
* @interface CreateExerciseDtoV1
*/
export interface CreateExerciseDtoV1 {
/**
* A description of this exercise
* @type {string}
* @memberof CreateExerciseDtoV1
*/
'description': string;
/**
*
* @type {LanguageCode}
* @memberof CreateExerciseDtoV1
*/
'languageCode': LanguageCode;
/**
*
* @type {ExerciseType}
* @memberof CreateExerciseDtoV1
*/
'type': ExerciseType;
/**
* The exercise
* @type {PronunciationDtoV1 | ChoiceDtoV1 | WordCloudDtoV1}
* @memberof CreateExerciseDtoV1
*/
'exercise': PronunciationDtoV1 | ChoiceDtoV1 | WordCloudDtoV1;
/**
* Record with custom properties
* @type {object}
* @memberof CreateExerciseDtoV1
*/
'customProperties'?: object;
}
/**
*
* @export
* @interface ExerciseDescriptorDtoV1
*/
export interface ExerciseDescriptorDtoV1 {
/**
*
* @type {string}
* @memberof ExerciseDescriptorDtoV1
*/
'id': string;
/**
*
* @type {string}
* @memberof ExerciseDescriptorDtoV1
*/
'description': string;
/**
*
* @type {string}
* @memberof ExerciseDescriptorDtoV1
*/
'languageCode': ExerciseDescriptorDtoV1LanguageCodeEnum;
/**
*
* @type {string}
* @memberof ExerciseDescriptorDtoV1
*/
'type': ExerciseDescriptorDtoV1TypeEnum;
}
export const ExerciseDescriptorDtoV1LanguageCodeEnum = {
ar_idn: 'ar-idn',
en: 'en',
nl: 'nl',
zh: 'zh',
fr: 'fr',
de: 'de',
es: 'es'
} as const;
export type ExerciseDescriptorDtoV1LanguageCodeEnum = typeof ExerciseDescriptorDtoV1LanguageCodeEnum[keyof typeof ExerciseDescriptorDtoV1LanguageCodeEnum];
export const ExerciseDescriptorDtoV1TypeEnum = {
choice: 'choice',
pronunciation: 'pronunciation',
word_cloud: 'word-cloud'
} as const;
export type ExerciseDescriptorDtoV1TypeEnum = typeof ExerciseDescriptorDtoV1TypeEnum[keyof typeof ExerciseDescriptorDtoV1TypeEnum];
/**
*
* @export
* @interface ExerciseResponseDtoV1
*/
export interface ExerciseResponseDtoV1 {
/**
*
* @type {string}
* @memberof ExerciseResponseDtoV1
*/
'id'?: string;
/**
* A description of this exercise
* @type {string}
* @memberof ExerciseResponseDtoV1
*/
'description': string;
/**
*
* @type {LanguageCode}
* @memberof ExerciseResponseDtoV1
*/
'languageCode': LanguageCode;
/**
*
* @type {ExerciseType}
* @memberof ExerciseResponseDtoV1
*/
'type': ExerciseType;
/**
* The exercise
* @type {PronunciationDtoV1 | ChoiceDtoV1 | WordCloudDtoV1}
* @memberof ExerciseResponseDtoV1
*/
'exercise': PronunciationDtoV1 | ChoiceDtoV1 | WordCloudDtoV1;
/**
* Record with custom properties
* @type {object}
* @memberof ExerciseResponseDtoV1
*/
'customProperties'?: object;
}
/**
*
* @export
* @enum {string}
*/
export const ExerciseType = {
choice: 'choice',
pronunciation: 'pronunciation',
word_cloud: 'word-cloud'
} as const;
export type ExerciseType = typeof ExerciseType[keyof typeof ExerciseType];
/**
*
* @export
* @enum {string}
*/
export const LanguageCode = {
ar_idn: 'ar-idn',
en: 'en',
nl: 'nl',
zh: 'zh',
fr: 'fr',
de: 'de',
es: 'es'
} as const;
export type LanguageCode = typeof LanguageCode[keyof typeof LanguageCode];
/**
*
* @export
* @interface OptionDtoV1
*/
export interface OptionDtoV1 {
/**
* A textual representation of an option (text of at least one word)
* @type {string}
* @memberof OptionDtoV1
*/
'label': string;
/**
* A list of pronunciations of the words in this option
* @type {Array<OptionWordDtoV1>}
* @memberof OptionDtoV1
*/
'words': Array<OptionWordDtoV1>;
}
/**
*
* @export
* @interface OptionWordDtoV1
*/
export interface OptionWordDtoV1 {
/**
* A textual representation of a word
* @type {string}
* @memberof OptionWordDtoV1
*/
'label': string;
/**
* A list of pronunciations which are considered correct in the context of the exercise
* @type {Array<PhonemeListDtoV1>}
* @memberof OptionWordDtoV1
*/
'pronunciations': Array<PhonemeListDtoV1>;
}
/**
*
* @export
* @interface PhonemeEnableFeedbackDtoV1
*/
export interface PhonemeEnableFeedbackDtoV1 {
/**
* A phoneme representing the desired utterance
* @type {string}
* @memberof PhonemeEnableFeedbackDtoV1
*/
'phoneme': string;
/**
* Indicates if this phoneme is taken into account when determining the feedback, default true
* @type {boolean}
* @memberof PhonemeEnableFeedbackDtoV1
*/
'evaluate'?: boolean;
}
/**
*
* @export
* @interface PhonemeListDtoV1
*/
export interface PhonemeListDtoV1 {
/**
* A list of phonemes making up a pronunciation of a word
* @type {Array<PhonemeEnableFeedbackDtoV1>}
* @memberof PhonemeListDtoV1
*/
'phonemes': Array<PhonemeEnableFeedbackDtoV1>;
}
/**
*
* @export
* @interface PronunciationDtoV1
*/
export interface PronunciationDtoV1 {
/**
* The words which need to be pronounced in the exercise
* @type {Array<WordDtoV1>}
* @memberof PronunciationDtoV1
*/
'words': Array<WordDtoV1>;
}
/**
*
* @export
* @interface ReplaceExerciseDtoV1
*/
export interface ReplaceExerciseDtoV1 {
/**
* A description of this exercise
* @type {string}
* @memberof ReplaceExerciseDtoV1
*/
'description': string;
/**
*
* @type {LanguageCode}
* @memberof ReplaceExerciseDtoV1
*/
'languageCode': LanguageCode;
/**
*
* @type {ExerciseType}
* @memberof ReplaceExerciseDtoV1
*/
'type': ExerciseType;
/**
* The exercise
* @type {PronunciationDtoV1 | ChoiceDtoV1 | WordCloudDtoV1}
* @memberof ReplaceExerciseDtoV1
*/
'exercise': PronunciationDtoV1 | ChoiceDtoV1 | WordCloudDtoV1;
/**
* Record with custom properties
* @type {object}
* @memberof ReplaceExerciseDtoV1
*/
'customProperties'?: object;
}
/**
*
* @export
* @interface WordCloudDtoV1
*/
export interface WordCloudDtoV1 {
/**
* The pronunciations which makeup this exercise
* @type {Array<PronunciationDtoV1>}
* @memberof WordCloudDtoV1
*/
'pronunciations': Array<PronunciationDtoV1>;
}
/**
*
* @export
* @interface WordDtoV1
*/
export interface WordDtoV1 {
/**
* A textual representation of a word
* @type {string}
* @memberof WordDtoV1
*/
'label': string;
/**
* A list of pronunciations which are considered correct in the context of the exercise
* @type {Array<PhonemeListDtoV1>}
* @memberof WordDtoV1
*/
'correctPronunciations': Array<PhonemeListDtoV1>;
/**
* A list of pronunciations which are considered incorrect in the context of the exercise
* @type {Array<PhonemeListDtoV1>}
* @memberof WordDtoV1
*/
'incorrectPronunciations': Array<PhonemeListDtoV1>;
/**
* A phoneme which needs to be uttered at the end of the word due to its context in a sentence
* @type {string}
* @memberof WordDtoV1
*/
'liaisonPhoneme'?: string;
/**
* Indicates if this word is taken into account when determining the feedback, default true
* @type {boolean}
* @memberof WordDtoV1
*/
'evaluate'?: boolean;
}
/**
* ExercisesApi - axios parameter creator
* @export
*/
export const ExercisesApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Create an exercise
* @param {CreateExerciseDtoV1} createExerciseDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createExercise: async (createExerciseDtoV1: CreateExerciseDtoV1, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'createExerciseDtoV1' is not null or undefined
assertParamExists('createExercise', 'createExerciseDtoV1', createExerciseDtoV1)
const localVarPath = `/v1/exercises`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication exercise_edit required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(createExerciseDtoV1, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Delete an exercise
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExercise: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('deleteExercise', 'id', id)
const localVarPath = `/v1/exercises/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication exercise_delete required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Get an exercise
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getExercise: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('getExercise', 'id', id)
const localVarPath = `/v1/exercises/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication access_token required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Get a list of exercises
* @param {string} [custom] Filter applied on a custom property (can occur multiple times in the querystring). The filter value has the form \"key:value\" where the key can contain a \".\" to specify a subproperty within a custom property. Note: filter only works on string values
* @param {'choice' | 'pronunciation' | 'word-cloud'} [exerciseType] Filter on exercise type
* @param {'ar-idn' | 'en' | 'nl' | 'zh' | 'fr' | 'de' | 'es'} [languageCode] Filter on language
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getExerciseList: async (custom?: string, exerciseType?: 'choice' | 'pronunciation' | 'word-cloud', languageCode?: 'ar-idn' | 'en' | 'nl' | 'zh' | 'fr' | 'de' | 'es', options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/v1/exercises`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication access_token required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (custom !== undefined) {
localVarQueryParameter['custom'] = custom;
}
if (exerciseType !== undefined) {
localVarQueryParameter['exerciseType'] = exerciseType;
}
if (languageCode !== undefined) {
localVarQueryParameter['languageCode'] = languageCode;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Replace an exercise
* @param {string} id
* @param {ReplaceExerciseDtoV1} replaceExerciseDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
replaceExercise: async (id: string, replaceExerciseDtoV1: ReplaceExerciseDtoV1, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('replaceExercise', 'id', id)
// verify required parameter 'replaceExerciseDtoV1' is not null or undefined
assertParamExists('replaceExercise', 'replaceExerciseDtoV1', replaceExerciseDtoV1)
const localVarPath = `/v1/exercises/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication exercise_edit required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(replaceExerciseDtoV1, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* ExercisesApi - functional programming interface
* @export
*/
export const ExercisesApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = ExercisesApiAxiosParamCreator(configuration)
return {
/**
* Create an exercise
* @param {CreateExerciseDtoV1} createExerciseDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createExercise(createExerciseDtoV1: CreateExerciseDtoV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExerciseResponseDtoV1>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createExercise(createExerciseDtoV1, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Delete an exercise
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteExercise(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteExercise(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Get an exercise
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getExercise(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExerciseResponseDtoV1>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getExercise(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Get a list of exercises
* @param {string} [custom] Filter applied on a custom property (can occur multiple times in the querystring). The filter value has the form \"key:value\" where the key can contain a \".\" to specify a subproperty within a custom property. Note: filter only works on string values
* @param {'choice' | 'pronunciation' | 'word-cloud'} [exerciseType] Filter on exercise type
* @param {'ar-idn' | 'en' | 'nl' | 'zh' | 'fr' | 'de' | 'es'} [languageCode] Filter on language
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getExerciseList(custom?: string, exerciseType?: 'choice' | 'pronunciation' | 'word-cloud', languageCode?: 'ar-idn' | 'en' | 'nl' | 'zh' | 'fr' | 'de' | 'es', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ExerciseDescriptorDtoV1>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getExerciseList(custom, exerciseType, languageCode, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Replace an exercise
* @param {string} id
* @param {ReplaceExerciseDtoV1} replaceExerciseDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async replaceExercise(id: string, replaceExerciseDtoV1: ReplaceExerciseDtoV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExerciseResponseDtoV1>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.replaceExercise(id, replaceExerciseDtoV1, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* ExercisesApi - factory interface
* @export
*/
export const ExercisesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = ExercisesApiFp(configuration)
return {
/**
* Create an exercise
* @param {CreateExerciseDtoV1} createExerciseDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createExercise(createExerciseDtoV1: CreateExerciseDtoV1, options?: any): AxiosPromise<ExerciseResponseDtoV1> {
return localVarFp.createExercise(createExerciseDtoV1, options).then((request) => request(axios, basePath));
},
/**
* Delete an exercise
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExercise(id: string, options?: any): AxiosPromise<void> {
return localVarFp.deleteExercise(id, options).then((request) => request(axios, basePath));
},
/**
* Get an exercise
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getExercise(id: string, options?: any): AxiosPromise<ExerciseResponseDtoV1> {
return localVarFp.getExercise(id, options).then((request) => request(axios, basePath));
},
/**
* Get a list of exercises
* @param {string} [custom] Filter applied on a custom property (can occur multiple times in the querystring). The filter value has the form \"key:value\" where the key can contain a \".\" to specify a subproperty within a custom property. Note: filter only works on string values
* @param {'choice' | 'pronunciation' | 'word-cloud'} [exerciseType] Filter on exercise type
* @param {'ar-idn' | 'en' | 'nl' | 'zh' | 'fr' | 'de' | 'es'} [languageCode] Filter on language
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getExerciseList(custom?: string, exerciseType?: 'choice' | 'pronunciation' | 'word-cloud', languageCode?: 'ar-idn' | 'en' | 'nl' | 'zh' | 'fr' | 'de' | 'es', options?: any): AxiosPromise<Array<ExerciseDescriptorDtoV1>> {
return localVarFp.getExerciseList(custom, exerciseType, languageCode, options).then((request) => request(axios, basePath));
},
/**
* Replace an exercise
* @param {string} id
* @param {ReplaceExerciseDtoV1} replaceExerciseDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
replaceExercise(id: string, replaceExerciseDtoV1: ReplaceExerciseDtoV1, options?: any): AxiosPromise<ExerciseResponseDtoV1> {
return localVarFp.replaceExercise(id, replaceExerciseDtoV1, options).then((request) => request(axios, basePath));
},
};
};
/**
* ExercisesApi - object-oriented interface
* @export
* @class ExercisesApi
* @extends {BaseAPI}
*/
export class ExercisesApi extends BaseAPI {
/**
* Create an exercise
* @param {CreateExerciseDtoV1} createExerciseDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExercisesApi
*/
public createExercise(createExerciseDtoV1: CreateExerciseDtoV1, options?: AxiosRequestConfig) {
return ExercisesApiFp(this.configuration).createExercise(createExerciseDtoV1, options).then((request) => request(this.axios, this.basePath));
}
/**
* Delete an exercise
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExercisesApi
*/
public deleteExercise(id: string, options?: AxiosRequestConfig) {
return ExercisesApiFp(this.configuration).deleteExercise(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Get an exercise
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExercisesApi
*/
public getExercise(id: string, options?: AxiosRequestConfig) {
return ExercisesApiFp(this.configuration).getExercise(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Get a list of exercises
* @param {string} [custom] Filter applied on a custom property (can occur multiple times in the querystring). The filter value has the form \"key:value\" where the key can contain a \".\" to specify a subproperty within a custom property. Note: filter only works on string values
* @param {'choice' | 'pronunciation' | 'word-cloud'} [exerciseType] Filter on exercise type
* @param {'ar-idn' | 'en' | 'nl' | 'zh' | 'fr' | 'de' | 'es'} [languageCode] Filter on language
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExercisesApi
*/
public getExerciseList(custom?: string, exerciseType?: 'choice' | 'pronunciation' | 'word-cloud', languageCode?: 'ar-idn' | 'en' | 'nl' | 'zh' | 'fr' | 'de' | 'es', options?: AxiosRequestConfig) {
return ExercisesApiFp(this.configuration).getExerciseList(custom, exerciseType, languageCode, options).then((request) => request(this.axios, this.basePath));
}
/**
* Replace an exercise
* @param {string} id
* @param {ReplaceExerciseDtoV1} replaceExerciseDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExercisesApi
*/
public replaceExercise(id: string, replaceExerciseDtoV1: ReplaceExerciseDtoV1, options?: AxiosRequestConfig) {
return ExercisesApiFp(this.configuration).replaceExercise(id, replaceExerciseDtoV1, options).then((request) => request(this.axios, this.basePath));
}
}