@novo-learning/novo-sdk
Version:
SDK for the Novolanguage Speech Analysis API
1,569 lines (1,475 loc) • 74.2 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Publisher API
* the publisher api stores publishers
*
* 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 AuthSettingsDto
*/
export interface AuthSettingsDto {
/**
* Authentication settings
* @type {OAuthSettingsDto}
* @memberof AuthSettingsDto
*/
'oauth'?: OAuthSettingsDto;
/**
* Api key a publisher uses to authenticate with the auth-api to get signed JWT tokens
* @type {string}
* @memberof AuthSettingsDto
*/
'apiKey': string;
/**
* Whether a user is allowed to log in anonymously, e.g. to try out the application
* @type {boolean}
* @memberof AuthSettingsDto
*/
'allowAnonymousLogin': boolean;
}
/**
*
* @export
* @interface AuthSettingsResponseDto
*/
export interface AuthSettingsResponseDto {
/**
* Is anonymous login enabled for this publisher
* @type {boolean}
* @memberof AuthSettingsResponseDto
*/
'allowAnonymousLogin': boolean;
}
/**
*
* @export
* @interface ConfigurationCreateDtoV1
*/
export interface ConfigurationCreateDtoV1 {
/**
* The name of the configuration
* @type {string}
* @memberof ConfigurationCreateDtoV1
*/
'name': string;
/**
*
* @type {LanguageCode}
* @memberof ConfigurationCreateDtoV1
*/
'languageCode': LanguageCode;
/**
* Is this the default configuration to use
* @type {boolean}
* @memberof ConfigurationCreateDtoV1
*/
'isDefault': boolean;
/**
* The thresholds to use in this configuration
* @type {ThresholdsDtoV1}
* @memberof ConfigurationCreateDtoV1
*/
'thresholds': ThresholdsDtoV1;
}
/**
*
* @export
* @interface ConfigurationDtoV1
*/
export interface ConfigurationDtoV1 {
/**
* The identifier of the configuration
* @type {string}
* @memberof ConfigurationDtoV1
*/
'id': string;
/**
* The name of the configuration
* @type {string}
* @memberof ConfigurationDtoV1
*/
'name': string;
/**
*
* @type {LanguageCode}
* @memberof ConfigurationDtoV1
*/
'languageCode': LanguageCode;
/**
* Is this the default configuration to use
* @type {boolean}
* @memberof ConfigurationDtoV1
*/
'isDefault': boolean;
/**
* The thresholds to use in this configuration
* @type {ThresholdsDtoV1}
* @memberof ConfigurationDtoV1
*/
'thresholds': ThresholdsDtoV1;
}
/**
*
* @export
* @interface ConfigurationResponseDtoV1
*/
export interface ConfigurationResponseDtoV1 {
/**
* The identifier of the configuration
* @type {string}
* @memberof ConfigurationResponseDtoV1
*/
'id': string;
/**
* The name of the configuration
* @type {string}
* @memberof ConfigurationResponseDtoV1
*/
'name': string;
/**
*
* @type {LanguageCode}
* @memberof ConfigurationResponseDtoV1
*/
'languageCode': LanguageCode;
/**
* Is this the default configuration to use
* @type {boolean}
* @memberof ConfigurationResponseDtoV1
*/
'isDefault': boolean;
/**
* The thresholds to use in this configuration
* @type {ThresholdsDtoV1}
* @memberof ConfigurationResponseDtoV1
*/
'thresholds': ThresholdsDtoV1;
/**
* The owner of the configuration
* @type {string}
* @memberof ConfigurationResponseDtoV1
*/
'publisherId': string;
}
/**
*
* @export
* @interface CreatePublisherDto
*/
export interface CreatePublisherDto {
/**
* Publisher name
* @type {string}
* @memberof CreatePublisherDto
*/
'name': string;
/**
* Identifier for the publisher. Used for authorization
* @type {string}
* @memberof CreatePublisherDto
*/
'key'?: string;
/**
* Specific settings for the publisher. Include storage settings, recognition settings, etc.
* @type {PublisherSettingsDto}
* @memberof CreatePublisherDto
*/
'settings': PublisherSettingsDto;
}
/**
*
* @export
* @interface FeedbackSettingsDto
*/
export interface FeedbackSettingsDto {
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'correctness'?: boolean;
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'phone'?: boolean;
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'timing'?: boolean;
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'confidence'?: boolean;
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'alignment'?: boolean;
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'accuracy'?: boolean;
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'fluency'?: boolean;
/**
*
* @type {string}
* @memberof FeedbackSettingsDto
*/
'attempt'?: FeedbackSettingsDtoAttemptEnum;
/**
*
* @type {string}
* @memberof FeedbackSettingsDto
*/
'purpose'?: FeedbackSettingsDtoPurposeEnum;
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'detectSpeech'?: boolean;
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'duration'?: boolean;
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'letterAlignment'?: boolean;
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'pauses'?: boolean;
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'intonation'?: boolean;
/**
*
* @type {boolean}
* @memberof FeedbackSettingsDto
*/
'evaluateWordFeature'?: boolean;
}
export const FeedbackSettingsDtoAttemptEnum = {
immediate: 'immediate',
none: 'none',
delayed: 'delayed'
} as const;
export type FeedbackSettingsDtoAttemptEnum = typeof FeedbackSettingsDtoAttemptEnum[keyof typeof FeedbackSettingsDtoAttemptEnum];
export const FeedbackSettingsDtoPurposeEnum = {
reading: 'reading',
pronunciation: 'pronunciation'
} as const;
export type FeedbackSettingsDtoPurposeEnum = typeof FeedbackSettingsDtoPurposeEnum[keyof typeof FeedbackSettingsDtoPurposeEnum];
/**
*
* @export
* @interface IntermediateResultSettingsDto
*/
export interface IntermediateResultSettingsDto {
/**
* When true sends an eos signal when the entire prompt has been recognized
* @type {boolean}
* @memberof IntermediateResultSettingsDto
*/
'eosDetection'?: boolean;
/**
* When true sends the prompt up until the next word to be recognized
* @type {boolean}
* @memberof IntermediateResultSettingsDto
*/
'reportRecognized'?: boolean;
/**
* Timeout in milliseconds for speech detection. When the timeout has passed a timeout signal is given
* @type {number}
* @memberof IntermediateResultSettingsDto
*/
'speechTimeout': number;
}
/**
* The language for which this is a configuration
* @export
* @enum {string}
*/
export const LanguageCode = {
ar_idn: 'ar-idn',
de: 'de',
en: 'en',
nl: 'nl',
zh: 'zh',
fr: 'fr',
es: 'es'
} as const;
export type LanguageCode = typeof LanguageCode[keyof typeof LanguageCode];
/**
*
* @export
* @interface LanguageSettingsDto
*/
export interface LanguageSettingsDto {
/**
* Language configurations
* @type {{ [key: string]: Array<ModelConfigurationDto>; }}
* @memberof LanguageSettingsDto
*/
'configurations'?: { [key: string]: Array<ModelConfigurationDto>; };
}
/**
*
* @export
* @interface LogSettingsDto
*/
export interface LogSettingsDto {
/**
* The log settings for this publisher
* @type {boolean}
* @memberof LogSettingsDto
*/
'confirmAudioReceived'?: boolean;
}
/**
*
* @export
* @interface ModelConfigurationDto
*/
export interface ModelConfigurationDto {
/**
* The identifier for the acoustic model
* @type {string}
* @memberof ModelConfigurationDto
*/
'model': string;
/**
* Phone set identifier
* @type {string}
* @memberof ModelConfigurationDto
*/
'phoneSet': ModelConfigurationDtoPhoneSetEnum;
}
export const ModelConfigurationDtoPhoneSetEnum = {
cmu69: 'cmu69',
novo_nl37: 'novo-nl37',
novo_cmn111: 'novo-cmn111',
novo_fr37: 'novo-fr37',
novo_fr_nl61: 'novo-fr-nl61',
novo_de45: 'novo-de45',
novo_es27: 'novo-es27',
novo_ar38: 'novo-ar38',
novo_ar37: 'novo-ar37'
} as const;
export type ModelConfigurationDtoPhoneSetEnum = typeof ModelConfigurationDtoPhoneSetEnum[keyof typeof ModelConfigurationDtoPhoneSetEnum];
/**
*
* @export
* @interface OAuthSettingsDto
*/
export interface OAuthSettingsDto {
/**
*
* @type {string}
* @memberof OAuthSettingsDto
*/
'authorizationURL': string;
/**
*
* @type {string}
* @memberof OAuthSettingsDto
*/
'tokenURL': string;
/**
*
* @type {string}
* @memberof OAuthSettingsDto
*/
'clientID': string;
/**
*
* @type {string}
* @memberof OAuthSettingsDto
*/
'clientSecret': string;
}
/**
* Permissions the publisher can give their users through the auth-api
* @export
* @enum {string}
*/
export const PermissionType = {
attempt_read_result: 'attempt_read_result',
attempt_read_audio: 'attempt_read_audio',
attempt_read_group_result: 'attempt_read_group_result',
attempt_read_group_audio: 'attempt_read_group_audio',
attempt_edit: 'attempt_edit',
attempt_delete: 'attempt_delete',
attempt_maintenance: 'attempt_maintenance',
exercise_edit: 'exercise_edit',
exercise_delete: 'exercise_delete',
exercise_maintenance: 'exercise_maintenance',
publisher_edit: 'publisher_edit',
publisher_read: 'publisher_read',
publisher_maintenance: 'publisher_maintenance',
publisher_configuration_read: 'publisher_configuration_read',
publisher_configuration_edit: 'publisher_configuration_edit',
pronunciation_edit: 'pronunciation_edit'
} as const;
export type PermissionType = typeof PermissionType[keyof typeof PermissionType];
/**
*
* @export
* @interface PublisherDescriptorDto
*/
export interface PublisherDescriptorDto {
/**
*
* @type {string}
* @memberof PublisherDescriptorDto
*/
'name': string;
/**
*
* @type {string}
* @memberof PublisherDescriptorDto
*/
'id': string;
}
/**
*
* @export
* @interface PublisherResponseDto
*/
export interface PublisherResponseDto {
/**
* Unique publisher id
* @type {string}
* @memberof PublisherResponseDto
*/
'id': string;
/**
* Publisher name
* @type {string}
* @memberof PublisherResponseDto
*/
'name'?: string;
/**
* Specific settings for the publisher. Include storage settings, recognition settings, etc.
* @type {PublisherSettingsResponseDto}
* @memberof PublisherResponseDto
*/
'settings'?: PublisherSettingsResponseDto;
}
/**
*
* @export
* @interface PublisherSettingsDto
*/
export interface PublisherSettingsDto {
/**
* Number of days to retain analysis data in the data-api, use -1 to keep them forever
* @type {number}
* @memberof PublisherSettingsDto
*/
'retentionDays': number;
/**
* Authentication settings
* @type {AuthSettingsDto}
* @memberof PublisherSettingsDto
*/
'authSettings': AuthSettingsDto;
/**
* Log settings
* @type {LogSettingsDto}
* @memberof PublisherSettingsDto
*/
'logSettings': LogSettingsDto;
/**
* Feedback settings to include in the output of the speech api
* @type {FeedbackSettingsDto}
* @memberof PublisherSettingsDto
*/
'feedbackSettings': FeedbackSettingsDto;
/**
* Feedback settings to include in the output of the speech api
* @type {IntermediateResultSettingsDto}
* @memberof PublisherSettingsDto
*/
'intermediateResultsSettings': IntermediateResultSettingsDto;
/**
*
* @type {Array<PermissionType>}
* @memberof PublisherSettingsDto
*/
'allowedPermissions': Array<PermissionType>;
/**
*
* @type {Array<LanguageCode>}
* @memberof PublisherSettingsDto
*/
'allowedLanguages': Array<LanguageCode>;
/**
* The last day the publisher is able to generate access tokens
* @type {string}
* @memberof PublisherSettingsDto
*/
'expirationDate'?: string;
/**
* Custom language settings for the publisher
* @type {LanguageSettingsDto}
* @memberof PublisherSettingsDto
*/
'languageSettings'?: LanguageSettingsDto;
}
/**
*
* @export
* @interface PublisherSettingsResponseDto
*/
export interface PublisherSettingsResponseDto {
/**
* Number of days to retain analysis data in the data-api, use -1 to keep them forever
* @type {number}
* @memberof PublisherSettingsResponseDto
*/
'retentionDays': number;
/**
* Authentication settings
* @type {AuthSettingsResponseDto}
* @memberof PublisherSettingsResponseDto
*/
'authSettings': AuthSettingsResponseDto;
/**
* Feedback settings to include in the output of the speech api
* @type {FeedbackSettingsDto}
* @memberof PublisherSettingsResponseDto
*/
'feedbackSettings': FeedbackSettingsDto;
/**
* Feedback settings to include in the output of the speech api
* @type {IntermediateResultSettingsDto}
* @memberof PublisherSettingsResponseDto
*/
'intermediateResultsSettings': IntermediateResultSettingsDto;
/**
* Log settings
* @type {LogSettingsDto}
* @memberof PublisherSettingsResponseDto
*/
'logSettings': LogSettingsDto;
/**
* Language settings
* @type {LanguageSettingsDto}
* @memberof PublisherSettingsResponseDto
*/
'languageSettings': LanguageSettingsDto;
/**
*
* @type {Array<PermissionType>}
* @memberof PublisherSettingsResponseDto
*/
'allowedPermissions': Array<PermissionType>;
/**
*
* @type {Array<LanguageCode>}
* @memberof PublisherSettingsResponseDto
*/
'allowedLanguages': Array<LanguageCode>;
/**
* The last day an access token can be issued by this publisher
* @type {string}
* @memberof PublisherSettingsResponseDto
*/
'expirationDate'?: string;
}
/**
*
* @export
* @interface RequestAccountDto
*/
export interface RequestAccountDto {
/**
* Contact name
* @type {string}
* @memberof RequestAccountDto
*/
'contactName': string;
/**
* E-mail contact
* @type {string}
* @memberof RequestAccountDto
*/
'email': string;
/**
* Name of the account
* @type {string}
* @memberof RequestAccountDto
*/
'accountName': string;
/**
*
* @type {Array<LanguageCode>}
* @memberof RequestAccountDto
*/
'languages': Array<LanguageCode>;
/**
* Additional information about the account requester
* @type {object}
* @memberof RequestAccountDto
*/
'metadata'?: object;
}
/**
*
* @export
* @interface ThresholdsDtoV1
*/
export interface ThresholdsDtoV1 {
/**
*
* @type {number}
* @memberof ThresholdsDtoV1
*/
'defaultThreshold': number;
}
/**
*
* @export
* @interface UpdateAuthSettingsDto
*/
export interface UpdateAuthSettingsDto {
/**
* Api key a publisher uses to authenticate with the auth-api to get signed JWT tokens
* @type {string}
* @memberof UpdateAuthSettingsDto
*/
'apiKey'?: string;
/**
* Whether a user is allowed to log in anonymously, e.g. to try out the application
* @type {boolean}
* @memberof UpdateAuthSettingsDto
*/
'allowAnonymousLogin'?: boolean;
/**
* Authentication settings
* @type {UpdateOAuthSettingsDto}
* @memberof UpdateAuthSettingsDto
*/
'oauth'?: UpdateOAuthSettingsDto;
}
/**
*
* @export
* @interface UpdateFeedbackSettings
*/
export interface UpdateFeedbackSettings {
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'correctness'?: boolean;
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'phone'?: boolean;
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'timing'?: boolean;
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'confidence'?: boolean;
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'alignment'?: boolean;
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'accuracy'?: boolean;
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'fluency'?: boolean;
/**
*
* @type {string}
* @memberof UpdateFeedbackSettings
*/
'attempt'?: UpdateFeedbackSettingsAttemptEnum;
/**
*
* @type {string}
* @memberof UpdateFeedbackSettings
*/
'purpose'?: UpdateFeedbackSettingsPurposeEnum;
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'detectSpeech'?: boolean;
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'duration'?: boolean;
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'letterAlignment'?: boolean;
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'pauses'?: boolean;
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'intonation'?: boolean;
/**
*
* @type {boolean}
* @memberof UpdateFeedbackSettings
*/
'evaluateWordFeature'?: boolean;
}
export const UpdateFeedbackSettingsAttemptEnum = {
immediate: 'immediate',
none: 'none',
delayed: 'delayed'
} as const;
export type UpdateFeedbackSettingsAttemptEnum = typeof UpdateFeedbackSettingsAttemptEnum[keyof typeof UpdateFeedbackSettingsAttemptEnum];
export const UpdateFeedbackSettingsPurposeEnum = {
reading: 'reading',
pronunciation: 'pronunciation'
} as const;
export type UpdateFeedbackSettingsPurposeEnum = typeof UpdateFeedbackSettingsPurposeEnum[keyof typeof UpdateFeedbackSettingsPurposeEnum];
/**
*
* @export
* @interface UpdateIntermediateResultSettingsDto
*/
export interface UpdateIntermediateResultSettingsDto {
/**
* When true sends an eos signal when the entire prompt has been recognized
* @type {boolean}
* @memberof UpdateIntermediateResultSettingsDto
*/
'eosDetection'?: boolean;
/**
* When true sends the prompt up until the next word to be recognized
* @type {boolean}
* @memberof UpdateIntermediateResultSettingsDto
*/
'reportRecognized'?: boolean;
/**
* Timeout in milliseconds for speech detection. When the timeout has passed a timeout signal is given
* @type {number}
* @memberof UpdateIntermediateResultSettingsDto
*/
'speechTimeout'?: number;
}
/**
*
* @export
* @interface UpdateLanguageSettings
*/
export interface UpdateLanguageSettings {
/**
* Language configurations
* @type {{ [key: string]: Array<ModelConfigurationDto>; }}
* @memberof UpdateLanguageSettings
*/
'configurations'?: { [key: string]: Array<ModelConfigurationDto>; };
}
/**
*
* @export
* @interface UpdateOAuthSettingsDto
*/
export interface UpdateOAuthSettingsDto {
/**
*
* @type {string}
* @memberof UpdateOAuthSettingsDto
*/
'authorizationURL'?: string;
/**
*
* @type {string}
* @memberof UpdateOAuthSettingsDto
*/
'tokenURL'?: string;
/**
*
* @type {string}
* @memberof UpdateOAuthSettingsDto
*/
'clientID'?: string;
/**
*
* @type {string}
* @memberof UpdateOAuthSettingsDto
*/
'clientSecret'?: string;
}
/**
*
* @export
* @interface UpdatePublisherDto
*/
export interface UpdatePublisherDto {
/**
* Publisher name
* @type {string}
* @memberof UpdatePublisherDto
*/
'name'?: string;
/**
* Identifier for the publisher. Used for authorization
* @type {string}
* @memberof UpdatePublisherDto
*/
'key'?: string;
/**
*
* @type {UpdatePublisherSettingsDto}
* @memberof UpdatePublisherDto
*/
'settings'?: UpdatePublisherSettingsDto;
}
/**
*
* @export
* @interface UpdatePublisherSettingsDto
*/
export interface UpdatePublisherSettingsDto {
/**
* Number of days to retain analysis data in the data-api, use -1 to keep them forever
* @type {number}
* @memberof UpdatePublisherSettingsDto
*/
'retentionDays'?: number;
/**
* Log settings
* @type {LogSettingsDto}
* @memberof UpdatePublisherSettingsDto
*/
'logSettings'?: LogSettingsDto;
/**
*
* @type {Array<PermissionType>}
* @memberof UpdatePublisherSettingsDto
*/
'allowedPermissions'?: Array<PermissionType>;
/**
*
* @type {Array<LanguageCode>}
* @memberof UpdatePublisherSettingsDto
*/
'allowedLanguages'?: Array<LanguageCode>;
/**
* The last day the publisher is able to generate access tokens
* @type {string}
* @memberof UpdatePublisherSettingsDto
*/
'expirationDate'?: string;
/**
* Authentication settings
* @type {UpdateAuthSettingsDto}
* @memberof UpdatePublisherSettingsDto
*/
'authSettings'?: UpdateAuthSettingsDto;
/**
* Feedback settings to include in the output of the speech api
* @type {UpdateFeedbackSettings}
* @memberof UpdatePublisherSettingsDto
*/
'feedbackSettings'?: UpdateFeedbackSettings;
/**
* Intermediate results settings
* @type {UpdateIntermediateResultSettingsDto}
* @memberof UpdatePublisherSettingsDto
*/
'intermediateResultsSettings'?: UpdateIntermediateResultSettingsDto;
/**
* Language settings
* @type {UpdateLanguageSettings}
* @memberof UpdatePublisherSettingsDto
*/
'languageSettings'?: UpdateLanguageSettings;
}
/**
* ConfigurationsApi - axios parameter creator
* @export
*/
export const ConfigurationsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @param {ConfigurationCreateDtoV1} configurationCreateDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createConfiguration: async (configurationCreateDtoV1: ConfigurationCreateDtoV1, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'configurationCreateDtoV1' is not null or undefined
assertParamExists('createConfiguration', 'configurationCreateDtoV1', configurationCreateDtoV1)
const localVarPath = `/configurations`;
// 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;
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(configurationCreateDtoV1, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteConfiguration: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('deleteConfiguration', 'id', id)
const localVarPath = `/configurations/{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;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
* @param {ConfigurationDtoV1} configurationDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
editConfiguration: async (id: string, configurationDtoV1: ConfigurationDtoV1, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('editConfiguration', 'id', id)
// verify required parameter 'configurationDtoV1' is not null or undefined
assertParamExists('editConfiguration', 'configurationDtoV1', configurationDtoV1)
const localVarPath = `/configurations/{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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(configurationDtoV1, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
findAllConfigurations: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/configurations`;
// 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;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
findConfiguration: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('findConfiguration', 'id', id)
const localVarPath = `/configurations/{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;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* ConfigurationsApi - functional programming interface
* @export
*/
export const ConfigurationsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = ConfigurationsApiAxiosParamCreator(configuration)
return {
/**
*
* @param {ConfigurationCreateDtoV1} configurationCreateDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createConfiguration(configurationCreateDtoV1: ConfigurationCreateDtoV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConfigurationResponseDtoV1>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createConfiguration(configurationCreateDtoV1, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteConfiguration(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteConfiguration(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id
* @param {ConfigurationDtoV1} configurationDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async editConfiguration(id: string, configurationDtoV1: ConfigurationDtoV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConfigurationResponseDtoV1>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.editConfiguration(id, configurationDtoV1, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async findAllConfigurations(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ConfigurationResponseDtoV1>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.findAllConfigurations(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async findConfiguration(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConfigurationResponseDtoV1>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.findConfiguration(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* ConfigurationsApi - factory interface
* @export
*/
export const ConfigurationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = ConfigurationsApiFp(configuration)
return {
/**
*
* @param {ConfigurationCreateDtoV1} configurationCreateDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createConfiguration(configurationCreateDtoV1: ConfigurationCreateDtoV1, options?: any): AxiosPromise<ConfigurationResponseDtoV1> {
return localVarFp.createConfiguration(configurationCreateDtoV1, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteConfiguration(id: string, options?: any): AxiosPromise<void> {
return localVarFp.deleteConfiguration(id, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} id
* @param {ConfigurationDtoV1} configurationDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
editConfiguration(id: string, configurationDtoV1: ConfigurationDtoV1, options?: any): AxiosPromise<ConfigurationResponseDtoV1> {
return localVarFp.editConfiguration(id, configurationDtoV1, options).then((request) => request(axios, basePath));
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
findAllConfigurations(options?: any): AxiosPromise<Array<ConfigurationResponseDtoV1>> {
return localVarFp.findAllConfigurations(options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
findConfiguration(id: string, options?: any): AxiosPromise<ConfigurationResponseDtoV1> {
return localVarFp.findConfiguration(id, options).then((request) => request(axios, basePath));
},
};
};
/**
* ConfigurationsApi - object-oriented interface
* @export
* @class ConfigurationsApi
* @extends {BaseAPI}
*/
export class ConfigurationsApi extends BaseAPI {
/**
*
* @param {ConfigurationCreateDtoV1} configurationCreateDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ConfigurationsApi
*/
public createConfiguration(configurationCreateDtoV1: ConfigurationCreateDtoV1, options?: AxiosRequestConfig) {
return ConfigurationsApiFp(this.configuration).createConfiguration(configurationCreateDtoV1, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ConfigurationsApi
*/
public deleteConfiguration(id: string, options?: AxiosRequestConfig) {
return ConfigurationsApiFp(this.configuration).deleteConfiguration(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} id
* @param {ConfigurationDtoV1} configurationDtoV1
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ConfigurationsApi
*/
public editConfiguration(id: string, configurationDtoV1: ConfigurationDtoV1, options?: AxiosRequestConfig) {
return ConfigurationsApiFp(this.configuration).editConfiguration(id, configurationDtoV1, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ConfigurationsApi
*/
public findAllConfigurations(options?: AxiosRequestConfig) {
return ConfigurationsApiFp(this.configuration).findAllConfigurations(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ConfigurationsApi
*/
public findConfiguration(id: string, options?: AxiosRequestConfig) {
return ConfigurationsApiFp(this.configuration).findConfiguration(id, options).then((request) => request(this.axios, this.basePath));
}
}
/**
* PublishersApi - axios parameter creator
* @export
*/
export const PublishersApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @param {CreatePublisherDto} createPublisherDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addPublisher: async (createPublisherDto: CreatePublisherDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'createPublisherDto' is not null or undefined
assertParamExists('addPublisher', 'createPublisherDto', createPublisherDto)
const localVarPath = `/publishers`;
// 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;
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(createPublisherDto, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
* @param {Array<string>} requestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addUsageData: async (id: string, requestBody: Array<string>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('addUsageData', 'id', id)
// verify required parameter 'requestBody' is not null or undefined
assertParamExists('addUsageData', 'requestBody', requestBody)
const localVarPath = `/publishers/{id}/usage`
.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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(requestBody, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePublisher: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('deletePublisher', 'id', id)
const localVarPath = `/publishers/{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;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
findAllPublishers: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/publishers`;
// 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;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
* @param {string} [apiKey] if supplied, the publisher is validated and no JWT token is necessary
* @param {boolean} [anonymous] if supplied, the publisher (id) is returned if they allow anonymous login, no JWT necessary
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAndValidatePublisher: async (id: string, apiKey?: string, anonymous?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('getAndValidatePublisher', 'id', id)
const localVarPath = `/publishers/{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;
if (apiKey !== undefined) {
localVarQueryParameter['apiKey'] = apiKey;
}
if (anonymous !== undefined) {
localVarQueryParameter['anonymous'] = anonymous;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPublisherOAuthSettings: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('getPublisherOAuthSettings', 'id', id)
const localVarPath = `/publishers/{id}/oauth`
.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;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
* @param {string} from The first day of usage report in the format YYYY-MM-DD
* @param {string} to The last day of usage report in the format YYYY-MM-DD
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPublisherUsageSummary: async (id: string, from: string, to: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('getPublisherUsageSummary', 'id', id)
// verify required parameter 'from' is not null or undefined